openapi.json 1.0 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/capabilities": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.capabilities.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Experimental capabilities",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ExperimentalCapabilities"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. }
  856. },
  857. "description": "Get experimental features enabled on the OpenCode server.",
  858. "summary": "Get experimental capabilities",
  859. "x-codeSamples": [
  860. {
  861. "lang": "js",
  862. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.capabilities.get({\n ...\n})"
  863. }
  864. ]
  865. }
  866. },
  867. "/experimental/console": {
  868. "get": {
  869. "tags": ["experimental"],
  870. "operationId": "experimental.console.get",
  871. "parameters": [
  872. {
  873. "name": "directory",
  874. "in": "query",
  875. "schema": {
  876. "type": "string"
  877. },
  878. "required": false
  879. },
  880. {
  881. "name": "workspace",
  882. "in": "query",
  883. "schema": {
  884. "type": "string"
  885. },
  886. "required": false
  887. }
  888. ],
  889. "responses": {
  890. "200": {
  891. "description": "Active Console provider metadata",
  892. "content": {
  893. "application/json": {
  894. "schema": {
  895. "$ref": "#/components/schemas/ConsoleState"
  896. }
  897. }
  898. }
  899. },
  900. "400": {
  901. "description": "Bad request",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "$ref": "#/components/schemas/BadRequestError"
  906. }
  907. }
  908. }
  909. },
  910. "500": {
  911. "description": "InternalServerError",
  912. "content": {
  913. "application/json": {
  914. "schema": {
  915. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  916. }
  917. }
  918. }
  919. }
  920. },
  921. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  922. "summary": "Get active Console provider metadata",
  923. "x-codeSamples": [
  924. {
  925. "lang": "js",
  926. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  927. }
  928. ]
  929. }
  930. },
  931. "/experimental/console/orgs": {
  932. "get": {
  933. "tags": ["experimental"],
  934. "operationId": "experimental.console.listOrgs",
  935. "parameters": [
  936. {
  937. "name": "directory",
  938. "in": "query",
  939. "schema": {
  940. "type": "string"
  941. },
  942. "required": false
  943. },
  944. {
  945. "name": "workspace",
  946. "in": "query",
  947. "schema": {
  948. "type": "string"
  949. },
  950. "required": false
  951. }
  952. ],
  953. "responses": {
  954. "200": {
  955. "description": "Switchable Console orgs",
  956. "content": {
  957. "application/json": {
  958. "schema": {
  959. "type": "object",
  960. "properties": {
  961. "orgs": {
  962. "type": "array",
  963. "items": {
  964. "type": "object",
  965. "properties": {
  966. "accountID": {
  967. "type": "string"
  968. },
  969. "accountEmail": {
  970. "type": "string"
  971. },
  972. "accountUrl": {
  973. "type": "string"
  974. },
  975. "orgID": {
  976. "type": "string"
  977. },
  978. "orgName": {
  979. "type": "string"
  980. },
  981. "active": {
  982. "type": "boolean"
  983. }
  984. },
  985. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  986. "additionalProperties": false
  987. }
  988. }
  989. },
  990. "required": ["orgs"],
  991. "additionalProperties": false,
  992. "description": "Switchable Console orgs"
  993. }
  994. }
  995. }
  996. },
  997. "400": {
  998. "description": "Bad request",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "$ref": "#/components/schemas/BadRequestError"
  1003. }
  1004. }
  1005. }
  1006. },
  1007. "500": {
  1008. "description": "InternalServerError",
  1009. "content": {
  1010. "application/json": {
  1011. "schema": {
  1012. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  1013. }
  1014. }
  1015. }
  1016. }
  1017. },
  1018. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  1019. "summary": "List switchable Console orgs",
  1020. "x-codeSamples": [
  1021. {
  1022. "lang": "js",
  1023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  1024. }
  1025. ]
  1026. }
  1027. },
  1028. "/experimental/console/switch": {
  1029. "post": {
  1030. "tags": ["experimental"],
  1031. "operationId": "experimental.console.switchOrg",
  1032. "parameters": [
  1033. {
  1034. "name": "directory",
  1035. "in": "query",
  1036. "schema": {
  1037. "type": "string"
  1038. },
  1039. "required": false
  1040. },
  1041. {
  1042. "name": "workspace",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. }
  1049. ],
  1050. "responses": {
  1051. "200": {
  1052. "description": "Switch success",
  1053. "content": {
  1054. "application/json": {
  1055. "schema": {
  1056. "type": "boolean",
  1057. "description": "Switch success"
  1058. }
  1059. }
  1060. }
  1061. }
  1062. },
  1063. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1064. "summary": "Switch active Console org",
  1065. "requestBody": {
  1066. "content": {
  1067. "application/json": {
  1068. "schema": {
  1069. "type": "object",
  1070. "properties": {
  1071. "accountID": {
  1072. "type": "string"
  1073. },
  1074. "orgID": {
  1075. "type": "string"
  1076. }
  1077. },
  1078. "required": ["accountID", "orgID"],
  1079. "additionalProperties": false
  1080. }
  1081. }
  1082. }
  1083. },
  1084. "x-codeSamples": [
  1085. {
  1086. "lang": "js",
  1087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1088. }
  1089. ]
  1090. }
  1091. },
  1092. "/experimental/tool": {
  1093. "get": {
  1094. "tags": ["experimental"],
  1095. "operationId": "tool.list",
  1096. "parameters": [
  1097. {
  1098. "name": "directory",
  1099. "in": "query",
  1100. "schema": {
  1101. "type": "string"
  1102. },
  1103. "required": false
  1104. },
  1105. {
  1106. "name": "workspace",
  1107. "in": "query",
  1108. "schema": {
  1109. "type": "string"
  1110. },
  1111. "required": false
  1112. },
  1113. {
  1114. "name": "provider",
  1115. "in": "query",
  1116. "schema": {
  1117. "type": "string"
  1118. },
  1119. "required": true
  1120. },
  1121. {
  1122. "name": "model",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": true
  1128. }
  1129. ],
  1130. "responses": {
  1131. "200": {
  1132. "description": "Tools",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/ToolList"
  1137. }
  1138. }
  1139. }
  1140. },
  1141. "400": {
  1142. "description": "BadRequest | InvalidRequestError",
  1143. "content": {
  1144. "application/json": {
  1145. "schema": {
  1146. "anyOf": [
  1147. {
  1148. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1149. },
  1150. {
  1151. "$ref": "#/components/schemas/InvalidRequestError"
  1152. }
  1153. ]
  1154. }
  1155. }
  1156. }
  1157. }
  1158. },
  1159. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1160. "summary": "List tools",
  1161. "x-codeSamples": [
  1162. {
  1163. "lang": "js",
  1164. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1165. }
  1166. ]
  1167. }
  1168. },
  1169. "/experimental/tool/ids": {
  1170. "get": {
  1171. "tags": ["experimental"],
  1172. "operationId": "tool.ids",
  1173. "parameters": [
  1174. {
  1175. "name": "directory",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. },
  1182. {
  1183. "name": "workspace",
  1184. "in": "query",
  1185. "schema": {
  1186. "type": "string"
  1187. },
  1188. "required": false
  1189. }
  1190. ],
  1191. "responses": {
  1192. "200": {
  1193. "description": "Tool IDs",
  1194. "content": {
  1195. "application/json": {
  1196. "schema": {
  1197. "$ref": "#/components/schemas/ToolIDs"
  1198. }
  1199. }
  1200. }
  1201. },
  1202. "400": {
  1203. "description": "BadRequest | InvalidRequestError",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "anyOf": [
  1208. {
  1209. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1210. },
  1211. {
  1212. "$ref": "#/components/schemas/InvalidRequestError"
  1213. }
  1214. ]
  1215. }
  1216. }
  1217. }
  1218. }
  1219. },
  1220. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1221. "summary": "List tool IDs",
  1222. "x-codeSamples": [
  1223. {
  1224. "lang": "js",
  1225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1226. }
  1227. ]
  1228. }
  1229. },
  1230. "/experimental/worktree": {
  1231. "get": {
  1232. "tags": ["experimental"],
  1233. "operationId": "worktree.list",
  1234. "parameters": [
  1235. {
  1236. "name": "directory",
  1237. "in": "query",
  1238. "schema": {
  1239. "type": "string"
  1240. },
  1241. "required": false
  1242. },
  1243. {
  1244. "name": "workspace",
  1245. "in": "query",
  1246. "schema": {
  1247. "type": "string"
  1248. },
  1249. "required": false
  1250. }
  1251. ],
  1252. "responses": {
  1253. "200": {
  1254. "description": "List of worktree directories",
  1255. "content": {
  1256. "application/json": {
  1257. "schema": {
  1258. "type": "array",
  1259. "items": {
  1260. "type": "string"
  1261. },
  1262. "description": "List of worktree directories"
  1263. }
  1264. }
  1265. }
  1266. },
  1267. "400": {
  1268. "description": "WorktreeError | InvalidRequestError",
  1269. "content": {
  1270. "application/json": {
  1271. "schema": {
  1272. "anyOf": [
  1273. {
  1274. "$ref": "#/components/schemas/WorktreeError"
  1275. },
  1276. {
  1277. "$ref": "#/components/schemas/InvalidRequestError"
  1278. }
  1279. ]
  1280. }
  1281. }
  1282. }
  1283. }
  1284. },
  1285. "description": "List all sandbox worktrees for the current project.",
  1286. "summary": "List worktrees",
  1287. "x-codeSamples": [
  1288. {
  1289. "lang": "js",
  1290. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1291. }
  1292. ]
  1293. },
  1294. "post": {
  1295. "tags": ["experimental"],
  1296. "operationId": "worktree.create",
  1297. "parameters": [
  1298. {
  1299. "name": "directory",
  1300. "in": "query",
  1301. "schema": {
  1302. "type": "string"
  1303. },
  1304. "required": false
  1305. },
  1306. {
  1307. "name": "workspace",
  1308. "in": "query",
  1309. "schema": {
  1310. "type": "string"
  1311. },
  1312. "required": false
  1313. }
  1314. ],
  1315. "responses": {
  1316. "200": {
  1317. "description": "Worktree created",
  1318. "content": {
  1319. "application/json": {
  1320. "schema": {
  1321. "$ref": "#/components/schemas/Worktree"
  1322. }
  1323. }
  1324. }
  1325. },
  1326. "400": {
  1327. "description": "WorktreeError | InvalidRequestError",
  1328. "content": {
  1329. "application/json": {
  1330. "schema": {
  1331. "anyOf": [
  1332. {
  1333. "$ref": "#/components/schemas/WorktreeError"
  1334. },
  1335. {
  1336. "$ref": "#/components/schemas/InvalidRequestError"
  1337. }
  1338. ]
  1339. }
  1340. }
  1341. }
  1342. }
  1343. },
  1344. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1345. "summary": "Create worktree",
  1346. "requestBody": {
  1347. "content": {
  1348. "application/json": {
  1349. "schema": {
  1350. "$ref": "#/components/schemas/WorktreeCreateInput"
  1351. }
  1352. }
  1353. }
  1354. },
  1355. "x-codeSamples": [
  1356. {
  1357. "lang": "js",
  1358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1359. }
  1360. ]
  1361. },
  1362. "delete": {
  1363. "tags": ["experimental"],
  1364. "operationId": "worktree.remove",
  1365. "parameters": [
  1366. {
  1367. "name": "directory",
  1368. "in": "query",
  1369. "schema": {
  1370. "type": "string"
  1371. },
  1372. "required": false
  1373. },
  1374. {
  1375. "name": "workspace",
  1376. "in": "query",
  1377. "schema": {
  1378. "type": "string"
  1379. },
  1380. "required": false
  1381. }
  1382. ],
  1383. "responses": {
  1384. "200": {
  1385. "description": "Worktree removed",
  1386. "content": {
  1387. "application/json": {
  1388. "schema": {
  1389. "type": "boolean",
  1390. "description": "Worktree removed"
  1391. }
  1392. }
  1393. }
  1394. },
  1395. "400": {
  1396. "description": "WorktreeError | InvalidRequestError",
  1397. "content": {
  1398. "application/json": {
  1399. "schema": {
  1400. "anyOf": [
  1401. {
  1402. "$ref": "#/components/schemas/WorktreeError"
  1403. },
  1404. {
  1405. "$ref": "#/components/schemas/InvalidRequestError"
  1406. }
  1407. ]
  1408. }
  1409. }
  1410. }
  1411. }
  1412. },
  1413. "description": "Remove a git worktree and delete its branch.",
  1414. "summary": "Remove worktree",
  1415. "requestBody": {
  1416. "content": {
  1417. "application/json": {
  1418. "schema": {
  1419. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1420. }
  1421. }
  1422. }
  1423. },
  1424. "x-codeSamples": [
  1425. {
  1426. "lang": "js",
  1427. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1428. }
  1429. ]
  1430. }
  1431. },
  1432. "/experimental/worktree/reset": {
  1433. "post": {
  1434. "tags": ["experimental"],
  1435. "operationId": "worktree.reset",
  1436. "parameters": [
  1437. {
  1438. "name": "directory",
  1439. "in": "query",
  1440. "schema": {
  1441. "type": "string"
  1442. },
  1443. "required": false
  1444. },
  1445. {
  1446. "name": "workspace",
  1447. "in": "query",
  1448. "schema": {
  1449. "type": "string"
  1450. },
  1451. "required": false
  1452. }
  1453. ],
  1454. "responses": {
  1455. "200": {
  1456. "description": "Worktree reset",
  1457. "content": {
  1458. "application/json": {
  1459. "schema": {
  1460. "type": "boolean",
  1461. "description": "Worktree reset"
  1462. }
  1463. }
  1464. }
  1465. },
  1466. "400": {
  1467. "description": "WorktreeError | InvalidRequestError",
  1468. "content": {
  1469. "application/json": {
  1470. "schema": {
  1471. "anyOf": [
  1472. {
  1473. "$ref": "#/components/schemas/WorktreeError"
  1474. },
  1475. {
  1476. "$ref": "#/components/schemas/InvalidRequestError"
  1477. }
  1478. ]
  1479. }
  1480. }
  1481. }
  1482. }
  1483. },
  1484. "description": "Reset a worktree branch to the primary default branch.",
  1485. "summary": "Reset worktree",
  1486. "requestBody": {
  1487. "content": {
  1488. "application/json": {
  1489. "schema": {
  1490. "$ref": "#/components/schemas/WorktreeResetInput"
  1491. }
  1492. }
  1493. }
  1494. },
  1495. "x-codeSamples": [
  1496. {
  1497. "lang": "js",
  1498. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1499. }
  1500. ]
  1501. }
  1502. },
  1503. "/experimental/session": {
  1504. "get": {
  1505. "tags": ["experimental"],
  1506. "operationId": "experimental.session.list",
  1507. "parameters": [
  1508. {
  1509. "name": "directory",
  1510. "in": "query",
  1511. "schema": {
  1512. "type": "string"
  1513. },
  1514. "required": false
  1515. },
  1516. {
  1517. "name": "workspace",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "roots",
  1526. "in": "query",
  1527. "schema": {
  1528. "anyOf": [
  1529. {
  1530. "type": "boolean"
  1531. },
  1532. {
  1533. "type": "string",
  1534. "enum": ["true", "false"]
  1535. }
  1536. ]
  1537. },
  1538. "required": false
  1539. },
  1540. {
  1541. "name": "start",
  1542. "in": "query",
  1543. "schema": {
  1544. "type": "number"
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "cursor",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "number"
  1553. },
  1554. "required": false
  1555. },
  1556. {
  1557. "name": "search",
  1558. "in": "query",
  1559. "schema": {
  1560. "type": "string"
  1561. },
  1562. "required": false
  1563. },
  1564. {
  1565. "name": "limit",
  1566. "in": "query",
  1567. "schema": {
  1568. "type": "number"
  1569. },
  1570. "required": false
  1571. },
  1572. {
  1573. "name": "archived",
  1574. "in": "query",
  1575. "schema": {
  1576. "anyOf": [
  1577. {
  1578. "type": "boolean"
  1579. },
  1580. {
  1581. "type": "string",
  1582. "enum": ["true", "false"]
  1583. }
  1584. ]
  1585. },
  1586. "required": false
  1587. }
  1588. ],
  1589. "responses": {
  1590. "200": {
  1591. "description": "List of sessions",
  1592. "content": {
  1593. "application/json": {
  1594. "schema": {
  1595. "type": "array",
  1596. "items": {
  1597. "$ref": "#/components/schemas/GlobalSession"
  1598. },
  1599. "description": "List of sessions"
  1600. }
  1601. }
  1602. }
  1603. },
  1604. "400": {
  1605. "description": "Bad request",
  1606. "content": {
  1607. "application/json": {
  1608. "schema": {
  1609. "$ref": "#/components/schemas/BadRequestError"
  1610. }
  1611. }
  1612. }
  1613. }
  1614. },
  1615. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1616. "summary": "List sessions",
  1617. "x-codeSamples": [
  1618. {
  1619. "lang": "js",
  1620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1621. }
  1622. ]
  1623. }
  1624. },
  1625. "/experimental/session/{sessionID}/background": {
  1626. "post": {
  1627. "tags": ["experimental"],
  1628. "operationId": "experimental.session.background",
  1629. "parameters": [
  1630. {
  1631. "name": "sessionID",
  1632. "in": "path",
  1633. "schema": {
  1634. "type": "string",
  1635. "pattern": "^ses"
  1636. },
  1637. "required": true
  1638. },
  1639. {
  1640. "name": "directory",
  1641. "in": "query",
  1642. "schema": {
  1643. "type": "string"
  1644. },
  1645. "required": false
  1646. },
  1647. {
  1648. "name": "workspace",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. }
  1655. ],
  1656. "responses": {
  1657. "200": {
  1658. "description": "Backgrounded subagents",
  1659. "content": {
  1660. "application/json": {
  1661. "schema": {
  1662. "type": "boolean",
  1663. "description": "Backgrounded subagents"
  1664. }
  1665. }
  1666. }
  1667. },
  1668. "400": {
  1669. "description": "BadRequest | InvalidRequestError",
  1670. "content": {
  1671. "application/json": {
  1672. "schema": {
  1673. "anyOf": [
  1674. {
  1675. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1676. },
  1677. {
  1678. "$ref": "#/components/schemas/InvalidRequestError"
  1679. }
  1680. ]
  1681. }
  1682. }
  1683. }
  1684. }
  1685. },
  1686. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1687. "summary": "Background subagents",
  1688. "x-codeSamples": [
  1689. {
  1690. "lang": "js",
  1691. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1692. }
  1693. ]
  1694. }
  1695. },
  1696. "/experimental/resource": {
  1697. "get": {
  1698. "tags": ["experimental"],
  1699. "operationId": "experimental.resource.list",
  1700. "parameters": [
  1701. {
  1702. "name": "directory",
  1703. "in": "query",
  1704. "schema": {
  1705. "type": "string"
  1706. },
  1707. "required": false
  1708. },
  1709. {
  1710. "name": "workspace",
  1711. "in": "query",
  1712. "schema": {
  1713. "type": "string"
  1714. },
  1715. "required": false
  1716. }
  1717. ],
  1718. "responses": {
  1719. "200": {
  1720. "description": "MCP resources",
  1721. "content": {
  1722. "application/json": {
  1723. "schema": {
  1724. "type": "object",
  1725. "additionalProperties": {
  1726. "$ref": "#/components/schemas/McpResource"
  1727. },
  1728. "description": "MCP resources"
  1729. }
  1730. }
  1731. }
  1732. },
  1733. "400": {
  1734. "description": "Bad request",
  1735. "content": {
  1736. "application/json": {
  1737. "schema": {
  1738. "$ref": "#/components/schemas/BadRequestError"
  1739. }
  1740. }
  1741. }
  1742. }
  1743. },
  1744. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1745. "summary": "Get MCP resources",
  1746. "x-codeSamples": [
  1747. {
  1748. "lang": "js",
  1749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1750. }
  1751. ]
  1752. }
  1753. },
  1754. "/find": {
  1755. "get": {
  1756. "tags": ["file"],
  1757. "operationId": "find.text",
  1758. "parameters": [
  1759. {
  1760. "name": "directory",
  1761. "in": "query",
  1762. "schema": {
  1763. "type": "string"
  1764. },
  1765. "required": false
  1766. },
  1767. {
  1768. "name": "workspace",
  1769. "in": "query",
  1770. "schema": {
  1771. "type": "string"
  1772. },
  1773. "required": false
  1774. },
  1775. {
  1776. "name": "pattern",
  1777. "in": "query",
  1778. "schema": {
  1779. "type": "string"
  1780. },
  1781. "required": true
  1782. }
  1783. ],
  1784. "responses": {
  1785. "200": {
  1786. "description": "Matches",
  1787. "content": {
  1788. "application/json": {
  1789. "schema": {
  1790. "type": "array",
  1791. "items": {
  1792. "type": "object",
  1793. "properties": {
  1794. "path": {
  1795. "type": "object",
  1796. "properties": {
  1797. "text": {
  1798. "type": "string"
  1799. }
  1800. },
  1801. "required": ["text"],
  1802. "additionalProperties": false
  1803. },
  1804. "lines": {
  1805. "type": "object",
  1806. "properties": {
  1807. "text": {
  1808. "type": "string"
  1809. }
  1810. },
  1811. "required": ["text"],
  1812. "additionalProperties": false
  1813. },
  1814. "line_number": {
  1815. "type": "integer",
  1816. "minimum": 0
  1817. },
  1818. "absolute_offset": {
  1819. "type": "integer",
  1820. "minimum": 0
  1821. },
  1822. "submatches": {
  1823. "type": "array",
  1824. "items": {
  1825. "type": "object",
  1826. "properties": {
  1827. "match": {
  1828. "type": "object",
  1829. "properties": {
  1830. "text": {
  1831. "type": "string"
  1832. }
  1833. },
  1834. "required": ["text"],
  1835. "additionalProperties": false
  1836. },
  1837. "start": {
  1838. "type": "integer",
  1839. "minimum": 0
  1840. },
  1841. "end": {
  1842. "type": "integer",
  1843. "minimum": 0
  1844. }
  1845. },
  1846. "required": ["match", "start", "end"],
  1847. "additionalProperties": false
  1848. }
  1849. }
  1850. },
  1851. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1852. "additionalProperties": false
  1853. },
  1854. "description": "Matches"
  1855. }
  1856. }
  1857. }
  1858. },
  1859. "400": {
  1860. "description": "Bad request",
  1861. "content": {
  1862. "application/json": {
  1863. "schema": {
  1864. "$ref": "#/components/schemas/BadRequestError"
  1865. }
  1866. }
  1867. }
  1868. }
  1869. },
  1870. "description": "Search for text patterns across files in the project using ripgrep.",
  1871. "summary": "Find text",
  1872. "x-codeSamples": [
  1873. {
  1874. "lang": "js",
  1875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1876. }
  1877. ]
  1878. }
  1879. },
  1880. "/find/file": {
  1881. "get": {
  1882. "tags": ["file"],
  1883. "operationId": "find.files",
  1884. "parameters": [
  1885. {
  1886. "name": "directory",
  1887. "in": "query",
  1888. "schema": {
  1889. "type": "string"
  1890. },
  1891. "required": false
  1892. },
  1893. {
  1894. "name": "workspace",
  1895. "in": "query",
  1896. "schema": {
  1897. "type": "string"
  1898. },
  1899. "required": false
  1900. },
  1901. {
  1902. "name": "query",
  1903. "in": "query",
  1904. "schema": {
  1905. "type": "string"
  1906. },
  1907. "required": true
  1908. },
  1909. {
  1910. "name": "dirs",
  1911. "in": "query",
  1912. "schema": {
  1913. "type": "string",
  1914. "enum": ["true", "false"]
  1915. },
  1916. "required": false
  1917. },
  1918. {
  1919. "name": "type",
  1920. "in": "query",
  1921. "schema": {
  1922. "type": "string",
  1923. "enum": ["file", "directory"]
  1924. },
  1925. "required": false
  1926. },
  1927. {
  1928. "name": "limit",
  1929. "in": "query",
  1930. "schema": {
  1931. "type": "integer",
  1932. "minimum": 1,
  1933. "maximum": 200
  1934. },
  1935. "required": false
  1936. }
  1937. ],
  1938. "responses": {
  1939. "200": {
  1940. "description": "File paths",
  1941. "content": {
  1942. "application/json": {
  1943. "schema": {
  1944. "type": "array",
  1945. "items": {
  1946. "type": "string"
  1947. },
  1948. "description": "File paths"
  1949. }
  1950. }
  1951. }
  1952. },
  1953. "400": {
  1954. "description": "Bad request",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "$ref": "#/components/schemas/BadRequestError"
  1959. }
  1960. }
  1961. }
  1962. }
  1963. },
  1964. "description": "Search for files or directories by name or pattern in the project directory.",
  1965. "summary": "Find files",
  1966. "x-codeSamples": [
  1967. {
  1968. "lang": "js",
  1969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1970. }
  1971. ]
  1972. }
  1973. },
  1974. "/find/symbol": {
  1975. "get": {
  1976. "tags": ["file"],
  1977. "operationId": "find.symbols",
  1978. "parameters": [
  1979. {
  1980. "name": "directory",
  1981. "in": "query",
  1982. "schema": {
  1983. "type": "string"
  1984. },
  1985. "required": false
  1986. },
  1987. {
  1988. "name": "workspace",
  1989. "in": "query",
  1990. "schema": {
  1991. "type": "string"
  1992. },
  1993. "required": false
  1994. },
  1995. {
  1996. "name": "query",
  1997. "in": "query",
  1998. "schema": {
  1999. "type": "string"
  2000. },
  2001. "required": true
  2002. }
  2003. ],
  2004. "responses": {
  2005. "200": {
  2006. "description": "Symbols",
  2007. "content": {
  2008. "application/json": {
  2009. "schema": {
  2010. "type": "array",
  2011. "items": {
  2012. "$ref": "#/components/schemas/Symbol"
  2013. },
  2014. "description": "Symbols"
  2015. }
  2016. }
  2017. }
  2018. },
  2019. "400": {
  2020. "description": "Bad request",
  2021. "content": {
  2022. "application/json": {
  2023. "schema": {
  2024. "$ref": "#/components/schemas/BadRequestError"
  2025. }
  2026. }
  2027. }
  2028. }
  2029. },
  2030. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  2031. "summary": "Find symbols",
  2032. "x-codeSamples": [
  2033. {
  2034. "lang": "js",
  2035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  2036. }
  2037. ]
  2038. }
  2039. },
  2040. "/file": {
  2041. "get": {
  2042. "tags": ["file"],
  2043. "operationId": "file.list",
  2044. "parameters": [
  2045. {
  2046. "name": "directory",
  2047. "in": "query",
  2048. "schema": {
  2049. "type": "string"
  2050. },
  2051. "required": false
  2052. },
  2053. {
  2054. "name": "workspace",
  2055. "in": "query",
  2056. "schema": {
  2057. "type": "string"
  2058. },
  2059. "required": false
  2060. },
  2061. {
  2062. "name": "path",
  2063. "in": "query",
  2064. "schema": {
  2065. "type": "string"
  2066. },
  2067. "required": true
  2068. }
  2069. ],
  2070. "responses": {
  2071. "200": {
  2072. "description": "Files and directories",
  2073. "content": {
  2074. "application/json": {
  2075. "schema": {
  2076. "type": "array",
  2077. "items": {
  2078. "$ref": "#/components/schemas/FileNode"
  2079. },
  2080. "description": "Files and directories"
  2081. }
  2082. }
  2083. }
  2084. },
  2085. "400": {
  2086. "description": "Bad request",
  2087. "content": {
  2088. "application/json": {
  2089. "schema": {
  2090. "$ref": "#/components/schemas/BadRequestError"
  2091. }
  2092. }
  2093. }
  2094. }
  2095. },
  2096. "description": "List files and directories in a specified path.",
  2097. "summary": "List files",
  2098. "x-codeSamples": [
  2099. {
  2100. "lang": "js",
  2101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2102. }
  2103. ]
  2104. }
  2105. },
  2106. "/file/content": {
  2107. "get": {
  2108. "tags": ["file"],
  2109. "operationId": "file.read",
  2110. "parameters": [
  2111. {
  2112. "name": "directory",
  2113. "in": "query",
  2114. "schema": {
  2115. "type": "string"
  2116. },
  2117. "required": false
  2118. },
  2119. {
  2120. "name": "workspace",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "path",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": true
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File content",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "$ref": "#/components/schemas/FileContent"
  2143. }
  2144. }
  2145. }
  2146. },
  2147. "400": {
  2148. "description": "Bad request",
  2149. "content": {
  2150. "application/json": {
  2151. "schema": {
  2152. "$ref": "#/components/schemas/BadRequestError"
  2153. }
  2154. }
  2155. }
  2156. }
  2157. },
  2158. "description": "Read the content of a specified file.",
  2159. "summary": "Read file",
  2160. "x-codeSamples": [
  2161. {
  2162. "lang": "js",
  2163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2164. }
  2165. ]
  2166. }
  2167. },
  2168. "/file/status": {
  2169. "get": {
  2170. "tags": ["file"],
  2171. "operationId": "file.status",
  2172. "parameters": [
  2173. {
  2174. "name": "directory",
  2175. "in": "query",
  2176. "schema": {
  2177. "type": "string"
  2178. },
  2179. "required": false
  2180. },
  2181. {
  2182. "name": "workspace",
  2183. "in": "query",
  2184. "schema": {
  2185. "type": "string"
  2186. },
  2187. "required": false
  2188. }
  2189. ],
  2190. "responses": {
  2191. "200": {
  2192. "description": "File status",
  2193. "content": {
  2194. "application/json": {
  2195. "schema": {
  2196. "type": "array",
  2197. "items": {
  2198. "$ref": "#/components/schemas/File"
  2199. },
  2200. "description": "File status"
  2201. }
  2202. }
  2203. }
  2204. },
  2205. "400": {
  2206. "description": "Bad request",
  2207. "content": {
  2208. "application/json": {
  2209. "schema": {
  2210. "$ref": "#/components/schemas/BadRequestError"
  2211. }
  2212. }
  2213. }
  2214. }
  2215. },
  2216. "description": "Get the git status of all files in the project.",
  2217. "summary": "Get file status",
  2218. "x-codeSamples": [
  2219. {
  2220. "lang": "js",
  2221. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2222. }
  2223. ]
  2224. }
  2225. },
  2226. "/instance/dispose": {
  2227. "post": {
  2228. "tags": ["instance"],
  2229. "operationId": "instance.dispose",
  2230. "parameters": [
  2231. {
  2232. "name": "directory",
  2233. "in": "query",
  2234. "schema": {
  2235. "type": "string"
  2236. },
  2237. "required": false
  2238. },
  2239. {
  2240. "name": "workspace",
  2241. "in": "query",
  2242. "schema": {
  2243. "type": "string"
  2244. },
  2245. "required": false
  2246. }
  2247. ],
  2248. "responses": {
  2249. "200": {
  2250. "description": "Instance disposed",
  2251. "content": {
  2252. "application/json": {
  2253. "schema": {
  2254. "type": "boolean",
  2255. "description": "Instance disposed"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2272. "summary": "Dispose instance",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/path": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "path.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "Path",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/Path"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2326. "summary": "Get paths",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.get",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS info",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "$ref": "#/components/schemas/VcsInfo"
  2364. }
  2365. }
  2366. }
  2367. },
  2368. "400": {
  2369. "description": "Bad request",
  2370. "content": {
  2371. "application/json": {
  2372. "schema": {
  2373. "$ref": "#/components/schemas/BadRequestError"
  2374. }
  2375. }
  2376. }
  2377. }
  2378. },
  2379. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2380. "summary": "Get VCS info",
  2381. "x-codeSamples": [
  2382. {
  2383. "lang": "js",
  2384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2385. }
  2386. ]
  2387. }
  2388. },
  2389. "/vcs/status": {
  2390. "get": {
  2391. "tags": ["instance"],
  2392. "operationId": "vcs.status",
  2393. "parameters": [
  2394. {
  2395. "name": "directory",
  2396. "in": "query",
  2397. "schema": {
  2398. "type": "string"
  2399. },
  2400. "required": false
  2401. },
  2402. {
  2403. "name": "workspace",
  2404. "in": "query",
  2405. "schema": {
  2406. "type": "string"
  2407. },
  2408. "required": false
  2409. }
  2410. ],
  2411. "responses": {
  2412. "200": {
  2413. "description": "VCS status",
  2414. "content": {
  2415. "application/json": {
  2416. "schema": {
  2417. "type": "array",
  2418. "items": {
  2419. "$ref": "#/components/schemas/VcsFileStatus"
  2420. },
  2421. "description": "VCS status"
  2422. }
  2423. }
  2424. }
  2425. },
  2426. "400": {
  2427. "description": "Bad request",
  2428. "content": {
  2429. "application/json": {
  2430. "schema": {
  2431. "$ref": "#/components/schemas/BadRequestError"
  2432. }
  2433. }
  2434. }
  2435. }
  2436. },
  2437. "description": "Retrieve changed files in the current working tree without patches.",
  2438. "summary": "Get VCS status",
  2439. "x-codeSamples": [
  2440. {
  2441. "lang": "js",
  2442. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2443. }
  2444. ]
  2445. }
  2446. },
  2447. "/vcs/diff": {
  2448. "get": {
  2449. "tags": ["instance"],
  2450. "operationId": "vcs.diff",
  2451. "parameters": [
  2452. {
  2453. "name": "directory",
  2454. "in": "query",
  2455. "schema": {
  2456. "type": "string"
  2457. },
  2458. "required": false
  2459. },
  2460. {
  2461. "name": "workspace",
  2462. "in": "query",
  2463. "schema": {
  2464. "type": "string"
  2465. },
  2466. "required": false
  2467. },
  2468. {
  2469. "name": "mode",
  2470. "in": "query",
  2471. "schema": {
  2472. "type": "string",
  2473. "enum": ["git", "branch"]
  2474. },
  2475. "required": true
  2476. },
  2477. {
  2478. "name": "context",
  2479. "in": "query",
  2480. "schema": {
  2481. "type": "integer",
  2482. "minimum": 0
  2483. },
  2484. "required": false
  2485. }
  2486. ],
  2487. "responses": {
  2488. "200": {
  2489. "description": "VCS diff",
  2490. "content": {
  2491. "application/json": {
  2492. "schema": {
  2493. "type": "array",
  2494. "items": {
  2495. "$ref": "#/components/schemas/VcsFileDiff"
  2496. },
  2497. "description": "VCS diff"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2514. "summary": "Get VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/diff/raw": {
  2524. "get": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.diff.raw",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "Raw VCS diff",
  2548. "content": {
  2549. "text/x-diff; charset=utf-8": {
  2550. "schema": {
  2551. "type": "string"
  2552. }
  2553. }
  2554. }
  2555. },
  2556. "400": {
  2557. "description": "Bad request",
  2558. "content": {
  2559. "application/json": {
  2560. "schema": {
  2561. "$ref": "#/components/schemas/BadRequestError"
  2562. }
  2563. }
  2564. }
  2565. }
  2566. },
  2567. "description": "Retrieve a raw patch for current uncommitted changes.",
  2568. "summary": "Get raw VCS diff",
  2569. "x-codeSamples": [
  2570. {
  2571. "lang": "js",
  2572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2573. }
  2574. ]
  2575. }
  2576. },
  2577. "/vcs/apply": {
  2578. "post": {
  2579. "tags": ["instance"],
  2580. "operationId": "vcs.apply",
  2581. "parameters": [
  2582. {
  2583. "name": "directory",
  2584. "in": "query",
  2585. "schema": {
  2586. "type": "string"
  2587. },
  2588. "required": false
  2589. },
  2590. {
  2591. "name": "workspace",
  2592. "in": "query",
  2593. "schema": {
  2594. "type": "string"
  2595. },
  2596. "required": false
  2597. }
  2598. ],
  2599. "responses": {
  2600. "200": {
  2601. "description": "VCS patch applied",
  2602. "content": {
  2603. "application/json": {
  2604. "schema": {
  2605. "type": "object",
  2606. "properties": {
  2607. "applied": {
  2608. "type": "boolean"
  2609. }
  2610. },
  2611. "required": ["applied"],
  2612. "additionalProperties": false,
  2613. "description": "VCS patch applied"
  2614. }
  2615. }
  2616. }
  2617. },
  2618. "400": {
  2619. "description": "VcsApplyError | InvalidRequestError",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "anyOf": [
  2624. {
  2625. "$ref": "#/components/schemas/VcsApplyError"
  2626. },
  2627. {
  2628. "$ref": "#/components/schemas/InvalidRequestError"
  2629. }
  2630. ]
  2631. }
  2632. }
  2633. }
  2634. }
  2635. },
  2636. "description": "Apply a raw patch to the current working tree.",
  2637. "summary": "Apply VCS patch",
  2638. "requestBody": {
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "type": "object",
  2643. "properties": {
  2644. "patch": {
  2645. "type": "string"
  2646. }
  2647. },
  2648. "required": ["patch"],
  2649. "additionalProperties": false
  2650. }
  2651. }
  2652. }
  2653. },
  2654. "x-codeSamples": [
  2655. {
  2656. "lang": "js",
  2657. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2658. }
  2659. ]
  2660. }
  2661. },
  2662. "/command": {
  2663. "get": {
  2664. "tags": ["instance"],
  2665. "operationId": "command.list",
  2666. "parameters": [
  2667. {
  2668. "name": "directory",
  2669. "in": "query",
  2670. "schema": {
  2671. "type": "string"
  2672. },
  2673. "required": false
  2674. },
  2675. {
  2676. "name": "workspace",
  2677. "in": "query",
  2678. "schema": {
  2679. "type": "string"
  2680. },
  2681. "required": false
  2682. }
  2683. ],
  2684. "responses": {
  2685. "200": {
  2686. "description": "List of commands",
  2687. "content": {
  2688. "application/json": {
  2689. "schema": {
  2690. "type": "array",
  2691. "items": {
  2692. "$ref": "#/components/schemas/Command"
  2693. },
  2694. "description": "List of commands"
  2695. }
  2696. }
  2697. }
  2698. },
  2699. "400": {
  2700. "description": "Bad request",
  2701. "content": {
  2702. "application/json": {
  2703. "schema": {
  2704. "$ref": "#/components/schemas/BadRequestError"
  2705. }
  2706. }
  2707. }
  2708. }
  2709. },
  2710. "description": "Get a list of all available commands in the OpenCode system.",
  2711. "summary": "List commands",
  2712. "x-codeSamples": [
  2713. {
  2714. "lang": "js",
  2715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2716. }
  2717. ]
  2718. }
  2719. },
  2720. "/agent": {
  2721. "get": {
  2722. "tags": ["instance"],
  2723. "operationId": "app.agents",
  2724. "parameters": [
  2725. {
  2726. "name": "directory",
  2727. "in": "query",
  2728. "schema": {
  2729. "type": "string"
  2730. },
  2731. "required": false
  2732. },
  2733. {
  2734. "name": "workspace",
  2735. "in": "query",
  2736. "schema": {
  2737. "type": "string"
  2738. },
  2739. "required": false
  2740. }
  2741. ],
  2742. "responses": {
  2743. "200": {
  2744. "description": "List of agents",
  2745. "content": {
  2746. "application/json": {
  2747. "schema": {
  2748. "type": "array",
  2749. "items": {
  2750. "$ref": "#/components/schemas/Agent"
  2751. },
  2752. "description": "List of agents"
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "400": {
  2758. "description": "Bad request",
  2759. "content": {
  2760. "application/json": {
  2761. "schema": {
  2762. "$ref": "#/components/schemas/BadRequestError"
  2763. }
  2764. }
  2765. }
  2766. }
  2767. },
  2768. "description": "Get a list of all available AI agents in the OpenCode system.",
  2769. "summary": "List agents",
  2770. "x-codeSamples": [
  2771. {
  2772. "lang": "js",
  2773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2774. }
  2775. ]
  2776. }
  2777. },
  2778. "/skill": {
  2779. "get": {
  2780. "tags": ["instance"],
  2781. "operationId": "app.skills",
  2782. "parameters": [
  2783. {
  2784. "name": "directory",
  2785. "in": "query",
  2786. "schema": {
  2787. "type": "string"
  2788. },
  2789. "required": false
  2790. },
  2791. {
  2792. "name": "workspace",
  2793. "in": "query",
  2794. "schema": {
  2795. "type": "string"
  2796. },
  2797. "required": false
  2798. }
  2799. ],
  2800. "responses": {
  2801. "200": {
  2802. "description": "List of skills",
  2803. "content": {
  2804. "application/json": {
  2805. "schema": {
  2806. "type": "array",
  2807. "items": {
  2808. "type": "object",
  2809. "properties": {
  2810. "name": {
  2811. "type": "string"
  2812. },
  2813. "description": {
  2814. "type": "string"
  2815. },
  2816. "location": {
  2817. "type": "string"
  2818. },
  2819. "content": {
  2820. "type": "string"
  2821. }
  2822. },
  2823. "required": ["name", "location", "content"],
  2824. "additionalProperties": false
  2825. },
  2826. "description": "List of skills"
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "400": {
  2832. "description": "Bad request",
  2833. "content": {
  2834. "application/json": {
  2835. "schema": {
  2836. "$ref": "#/components/schemas/BadRequestError"
  2837. }
  2838. }
  2839. }
  2840. }
  2841. },
  2842. "description": "Get a list of all available skills in the OpenCode system.",
  2843. "summary": "List skills",
  2844. "x-codeSamples": [
  2845. {
  2846. "lang": "js",
  2847. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2848. }
  2849. ]
  2850. }
  2851. },
  2852. "/lsp": {
  2853. "get": {
  2854. "tags": ["instance"],
  2855. "operationId": "lsp.status",
  2856. "parameters": [
  2857. {
  2858. "name": "directory",
  2859. "in": "query",
  2860. "schema": {
  2861. "type": "string"
  2862. },
  2863. "required": false
  2864. },
  2865. {
  2866. "name": "workspace",
  2867. "in": "query",
  2868. "schema": {
  2869. "type": "string"
  2870. },
  2871. "required": false
  2872. }
  2873. ],
  2874. "responses": {
  2875. "200": {
  2876. "description": "LSP server status",
  2877. "content": {
  2878. "application/json": {
  2879. "schema": {
  2880. "type": "array",
  2881. "items": {
  2882. "$ref": "#/components/schemas/LSPStatus"
  2883. },
  2884. "description": "LSP server status"
  2885. }
  2886. }
  2887. }
  2888. },
  2889. "400": {
  2890. "description": "Bad request",
  2891. "content": {
  2892. "application/json": {
  2893. "schema": {
  2894. "$ref": "#/components/schemas/BadRequestError"
  2895. }
  2896. }
  2897. }
  2898. }
  2899. },
  2900. "description": "Get LSP server status",
  2901. "summary": "Get LSP status",
  2902. "x-codeSamples": [
  2903. {
  2904. "lang": "js",
  2905. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2906. }
  2907. ]
  2908. }
  2909. },
  2910. "/formatter": {
  2911. "get": {
  2912. "tags": ["instance"],
  2913. "operationId": "formatter.status",
  2914. "parameters": [
  2915. {
  2916. "name": "directory",
  2917. "in": "query",
  2918. "schema": {
  2919. "type": "string"
  2920. },
  2921. "required": false
  2922. },
  2923. {
  2924. "name": "workspace",
  2925. "in": "query",
  2926. "schema": {
  2927. "type": "string"
  2928. },
  2929. "required": false
  2930. }
  2931. ],
  2932. "responses": {
  2933. "200": {
  2934. "description": "Formatter status",
  2935. "content": {
  2936. "application/json": {
  2937. "schema": {
  2938. "type": "array",
  2939. "items": {
  2940. "$ref": "#/components/schemas/FormatterStatus"
  2941. },
  2942. "description": "Formatter status"
  2943. }
  2944. }
  2945. }
  2946. },
  2947. "400": {
  2948. "description": "Bad request",
  2949. "content": {
  2950. "application/json": {
  2951. "schema": {
  2952. "$ref": "#/components/schemas/BadRequestError"
  2953. }
  2954. }
  2955. }
  2956. }
  2957. },
  2958. "description": "Get formatter status",
  2959. "summary": "Get formatter status",
  2960. "x-codeSamples": [
  2961. {
  2962. "lang": "js",
  2963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2964. }
  2965. ]
  2966. }
  2967. },
  2968. "/mcp": {
  2969. "get": {
  2970. "tags": ["mcp"],
  2971. "operationId": "mcp.status",
  2972. "parameters": [
  2973. {
  2974. "name": "directory",
  2975. "in": "query",
  2976. "schema": {
  2977. "type": "string"
  2978. },
  2979. "required": false
  2980. },
  2981. {
  2982. "name": "workspace",
  2983. "in": "query",
  2984. "schema": {
  2985. "type": "string"
  2986. },
  2987. "required": false
  2988. }
  2989. ],
  2990. "responses": {
  2991. "200": {
  2992. "description": "MCP server status",
  2993. "content": {
  2994. "application/json": {
  2995. "schema": {
  2996. "type": "object",
  2997. "additionalProperties": {
  2998. "$ref": "#/components/schemas/MCPStatus"
  2999. },
  3000. "description": "MCP server status"
  3001. }
  3002. }
  3003. }
  3004. },
  3005. "400": {
  3006. "description": "Bad request",
  3007. "content": {
  3008. "application/json": {
  3009. "schema": {
  3010. "$ref": "#/components/schemas/BadRequestError"
  3011. }
  3012. }
  3013. }
  3014. }
  3015. },
  3016. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  3017. "summary": "Get MCP status",
  3018. "x-codeSamples": [
  3019. {
  3020. "lang": "js",
  3021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  3022. }
  3023. ]
  3024. },
  3025. "post": {
  3026. "tags": ["mcp"],
  3027. "operationId": "mcp.add",
  3028. "parameters": [
  3029. {
  3030. "name": "directory",
  3031. "in": "query",
  3032. "schema": {
  3033. "type": "string"
  3034. },
  3035. "required": false
  3036. },
  3037. {
  3038. "name": "workspace",
  3039. "in": "query",
  3040. "schema": {
  3041. "type": "string"
  3042. },
  3043. "required": false
  3044. }
  3045. ],
  3046. "responses": {
  3047. "200": {
  3048. "description": "MCP server added successfully",
  3049. "content": {
  3050. "application/json": {
  3051. "schema": {
  3052. "type": "object",
  3053. "additionalProperties": {
  3054. "$ref": "#/components/schemas/MCPStatus"
  3055. },
  3056. "description": "MCP server added successfully"
  3057. }
  3058. }
  3059. }
  3060. },
  3061. "400": {
  3062. "description": "BadRequest | InvalidRequestError",
  3063. "content": {
  3064. "application/json": {
  3065. "schema": {
  3066. "anyOf": [
  3067. {
  3068. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3069. },
  3070. {
  3071. "$ref": "#/components/schemas/InvalidRequestError"
  3072. }
  3073. ]
  3074. }
  3075. }
  3076. }
  3077. }
  3078. },
  3079. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3080. "summary": "Add MCP server",
  3081. "requestBody": {
  3082. "content": {
  3083. "application/json": {
  3084. "schema": {
  3085. "type": "object",
  3086. "properties": {
  3087. "name": {
  3088. "type": "string"
  3089. },
  3090. "config": {
  3091. "anyOf": [
  3092. {
  3093. "$ref": "#/components/schemas/McpLocalConfig"
  3094. },
  3095. {
  3096. "$ref": "#/components/schemas/McpRemoteConfig"
  3097. }
  3098. ]
  3099. }
  3100. },
  3101. "required": ["name", "config"],
  3102. "additionalProperties": false
  3103. }
  3104. }
  3105. }
  3106. },
  3107. "x-codeSamples": [
  3108. {
  3109. "lang": "js",
  3110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3111. }
  3112. ]
  3113. }
  3114. },
  3115. "/mcp/{name}/auth": {
  3116. "post": {
  3117. "tags": ["mcp"],
  3118. "operationId": "mcp.auth.start",
  3119. "parameters": [
  3120. {
  3121. "name": "name",
  3122. "in": "path",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": true
  3127. },
  3128. {
  3129. "name": "directory",
  3130. "in": "query",
  3131. "schema": {
  3132. "type": "string"
  3133. },
  3134. "required": false
  3135. },
  3136. {
  3137. "name": "workspace",
  3138. "in": "query",
  3139. "schema": {
  3140. "type": "string"
  3141. },
  3142. "required": false
  3143. }
  3144. ],
  3145. "responses": {
  3146. "200": {
  3147. "description": "OAuth flow started",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "type": "object",
  3152. "properties": {
  3153. "authorizationUrl": {
  3154. "type": "string"
  3155. },
  3156. "oauthState": {
  3157. "type": "string"
  3158. }
  3159. },
  3160. "required": ["authorizationUrl", "oauthState"],
  3161. "additionalProperties": false,
  3162. "description": "OAuth flow started"
  3163. }
  3164. }
  3165. }
  3166. },
  3167. "400": {
  3168. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3169. "content": {
  3170. "application/json": {
  3171. "schema": {
  3172. "anyOf": [
  3173. {
  3174. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3175. },
  3176. {
  3177. "$ref": "#/components/schemas/InvalidRequestError"
  3178. }
  3179. ]
  3180. }
  3181. }
  3182. }
  3183. },
  3184. "404": {
  3185. "description": "McpServerNotFoundError",
  3186. "content": {
  3187. "application/json": {
  3188. "schema": {
  3189. "$ref": "#/components/schemas/McpServerNotFoundError"
  3190. }
  3191. }
  3192. }
  3193. }
  3194. },
  3195. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3196. "summary": "Start MCP OAuth",
  3197. "x-codeSamples": [
  3198. {
  3199. "lang": "js",
  3200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3201. }
  3202. ]
  3203. },
  3204. "delete": {
  3205. "tags": ["mcp"],
  3206. "operationId": "mcp.auth.remove",
  3207. "parameters": [
  3208. {
  3209. "name": "name",
  3210. "in": "path",
  3211. "schema": {
  3212. "type": "string"
  3213. },
  3214. "required": true
  3215. },
  3216. {
  3217. "name": "directory",
  3218. "in": "query",
  3219. "schema": {
  3220. "type": "string"
  3221. },
  3222. "required": false
  3223. },
  3224. {
  3225. "name": "workspace",
  3226. "in": "query",
  3227. "schema": {
  3228. "type": "string"
  3229. },
  3230. "required": false
  3231. }
  3232. ],
  3233. "responses": {
  3234. "200": {
  3235. "description": "OAuth credentials removed",
  3236. "content": {
  3237. "application/json": {
  3238. "schema": {
  3239. "type": "object",
  3240. "properties": {
  3241. "success": {
  3242. "type": "boolean",
  3243. "enum": [true]
  3244. }
  3245. },
  3246. "required": ["success"],
  3247. "additionalProperties": false,
  3248. "description": "OAuth credentials removed"
  3249. }
  3250. }
  3251. }
  3252. },
  3253. "400": {
  3254. "description": "Bad request",
  3255. "content": {
  3256. "application/json": {
  3257. "schema": {
  3258. "$ref": "#/components/schemas/BadRequestError"
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "404": {
  3264. "description": "McpServerNotFoundError",
  3265. "content": {
  3266. "application/json": {
  3267. "schema": {
  3268. "$ref": "#/components/schemas/McpServerNotFoundError"
  3269. }
  3270. }
  3271. }
  3272. }
  3273. },
  3274. "description": "Remove OAuth credentials for an MCP server.",
  3275. "summary": "Remove MCP OAuth",
  3276. "x-codeSamples": [
  3277. {
  3278. "lang": "js",
  3279. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3280. }
  3281. ]
  3282. }
  3283. },
  3284. "/mcp/{name}/auth/callback": {
  3285. "post": {
  3286. "tags": ["mcp"],
  3287. "operationId": "mcp.auth.callback",
  3288. "parameters": [
  3289. {
  3290. "name": "name",
  3291. "in": "path",
  3292. "schema": {
  3293. "type": "string"
  3294. },
  3295. "required": true
  3296. },
  3297. {
  3298. "name": "directory",
  3299. "in": "query",
  3300. "schema": {
  3301. "type": "string"
  3302. },
  3303. "required": false
  3304. },
  3305. {
  3306. "name": "workspace",
  3307. "in": "query",
  3308. "schema": {
  3309. "type": "string"
  3310. },
  3311. "required": false
  3312. }
  3313. ],
  3314. "responses": {
  3315. "200": {
  3316. "description": "OAuth authentication completed",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/MCPStatus"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "400": {
  3326. "description": "BadRequest | InvalidRequestError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "anyOf": [
  3331. {
  3332. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3333. },
  3334. {
  3335. "$ref": "#/components/schemas/InvalidRequestError"
  3336. }
  3337. ]
  3338. }
  3339. }
  3340. }
  3341. },
  3342. "404": {
  3343. "description": "McpServerNotFoundError",
  3344. "content": {
  3345. "application/json": {
  3346. "schema": {
  3347. "$ref": "#/components/schemas/McpServerNotFoundError"
  3348. }
  3349. }
  3350. }
  3351. }
  3352. },
  3353. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3354. "summary": "Complete MCP OAuth",
  3355. "requestBody": {
  3356. "content": {
  3357. "application/json": {
  3358. "schema": {
  3359. "type": "object",
  3360. "properties": {
  3361. "code": {
  3362. "type": "string"
  3363. }
  3364. },
  3365. "required": ["code"],
  3366. "additionalProperties": false
  3367. }
  3368. }
  3369. }
  3370. },
  3371. "x-codeSamples": [
  3372. {
  3373. "lang": "js",
  3374. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3375. }
  3376. ]
  3377. }
  3378. },
  3379. "/mcp/{name}/auth/authenticate": {
  3380. "post": {
  3381. "tags": ["mcp"],
  3382. "operationId": "mcp.auth.authenticate",
  3383. "parameters": [
  3384. {
  3385. "name": "name",
  3386. "in": "path",
  3387. "schema": {
  3388. "type": "string"
  3389. },
  3390. "required": true
  3391. },
  3392. {
  3393. "name": "directory",
  3394. "in": "query",
  3395. "schema": {
  3396. "type": "string"
  3397. },
  3398. "required": false
  3399. },
  3400. {
  3401. "name": "workspace",
  3402. "in": "query",
  3403. "schema": {
  3404. "type": "string"
  3405. },
  3406. "required": false
  3407. }
  3408. ],
  3409. "responses": {
  3410. "200": {
  3411. "description": "OAuth authentication completed",
  3412. "content": {
  3413. "application/json": {
  3414. "schema": {
  3415. "$ref": "#/components/schemas/MCPStatus"
  3416. }
  3417. }
  3418. }
  3419. },
  3420. "400": {
  3421. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3422. "content": {
  3423. "application/json": {
  3424. "schema": {
  3425. "anyOf": [
  3426. {
  3427. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3428. },
  3429. {
  3430. "$ref": "#/components/schemas/InvalidRequestError"
  3431. }
  3432. ]
  3433. }
  3434. }
  3435. }
  3436. },
  3437. "404": {
  3438. "description": "McpServerNotFoundError",
  3439. "content": {
  3440. "application/json": {
  3441. "schema": {
  3442. "$ref": "#/components/schemas/McpServerNotFoundError"
  3443. }
  3444. }
  3445. }
  3446. }
  3447. },
  3448. "description": "Start OAuth flow and wait for callback (opens browser).",
  3449. "summary": "Authenticate MCP OAuth",
  3450. "x-codeSamples": [
  3451. {
  3452. "lang": "js",
  3453. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3454. }
  3455. ]
  3456. }
  3457. },
  3458. "/mcp/{name}/connect": {
  3459. "post": {
  3460. "tags": ["mcp"],
  3461. "operationId": "mcp.connect",
  3462. "parameters": [
  3463. {
  3464. "name": "name",
  3465. "in": "path",
  3466. "schema": {
  3467. "type": "string"
  3468. },
  3469. "required": true
  3470. },
  3471. {
  3472. "name": "directory",
  3473. "in": "query",
  3474. "schema": {
  3475. "type": "string"
  3476. },
  3477. "required": false
  3478. },
  3479. {
  3480. "name": "workspace",
  3481. "in": "query",
  3482. "schema": {
  3483. "type": "string"
  3484. },
  3485. "required": false
  3486. }
  3487. ],
  3488. "responses": {
  3489. "200": {
  3490. "description": "MCP server connected successfully",
  3491. "content": {
  3492. "application/json": {
  3493. "schema": {
  3494. "type": "boolean",
  3495. "description": "MCP server connected successfully"
  3496. }
  3497. }
  3498. }
  3499. },
  3500. "400": {
  3501. "description": "Bad request",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "$ref": "#/components/schemas/BadRequestError"
  3506. }
  3507. }
  3508. }
  3509. },
  3510. "404": {
  3511. "description": "McpServerNotFoundError",
  3512. "content": {
  3513. "application/json": {
  3514. "schema": {
  3515. "$ref": "#/components/schemas/McpServerNotFoundError"
  3516. }
  3517. }
  3518. }
  3519. }
  3520. },
  3521. "description": "Connect an MCP server.",
  3522. "x-codeSamples": [
  3523. {
  3524. "lang": "js",
  3525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3526. }
  3527. ]
  3528. }
  3529. },
  3530. "/mcp/{name}/disconnect": {
  3531. "post": {
  3532. "tags": ["mcp"],
  3533. "operationId": "mcp.disconnect",
  3534. "parameters": [
  3535. {
  3536. "name": "name",
  3537. "in": "path",
  3538. "schema": {
  3539. "type": "string"
  3540. },
  3541. "required": true
  3542. },
  3543. {
  3544. "name": "directory",
  3545. "in": "query",
  3546. "schema": {
  3547. "type": "string"
  3548. },
  3549. "required": false
  3550. },
  3551. {
  3552. "name": "workspace",
  3553. "in": "query",
  3554. "schema": {
  3555. "type": "string"
  3556. },
  3557. "required": false
  3558. }
  3559. ],
  3560. "responses": {
  3561. "200": {
  3562. "description": "MCP server disconnected successfully",
  3563. "content": {
  3564. "application/json": {
  3565. "schema": {
  3566. "type": "boolean",
  3567. "description": "MCP server disconnected successfully"
  3568. }
  3569. }
  3570. }
  3571. },
  3572. "400": {
  3573. "description": "Bad request",
  3574. "content": {
  3575. "application/json": {
  3576. "schema": {
  3577. "$ref": "#/components/schemas/BadRequestError"
  3578. }
  3579. }
  3580. }
  3581. },
  3582. "404": {
  3583. "description": "McpServerNotFoundError",
  3584. "content": {
  3585. "application/json": {
  3586. "schema": {
  3587. "$ref": "#/components/schemas/McpServerNotFoundError"
  3588. }
  3589. }
  3590. }
  3591. }
  3592. },
  3593. "description": "Disconnect an MCP server.",
  3594. "x-codeSamples": [
  3595. {
  3596. "lang": "js",
  3597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3598. }
  3599. ]
  3600. }
  3601. },
  3602. "/project": {
  3603. "get": {
  3604. "tags": ["project"],
  3605. "operationId": "project.list",
  3606. "parameters": [
  3607. {
  3608. "name": "directory",
  3609. "in": "query",
  3610. "schema": {
  3611. "type": "string"
  3612. },
  3613. "required": false
  3614. },
  3615. {
  3616. "name": "workspace",
  3617. "in": "query",
  3618. "schema": {
  3619. "type": "string"
  3620. },
  3621. "required": false
  3622. }
  3623. ],
  3624. "responses": {
  3625. "200": {
  3626. "description": "List of projects",
  3627. "content": {
  3628. "application/json": {
  3629. "schema": {
  3630. "type": "array",
  3631. "items": {
  3632. "$ref": "#/components/schemas/Project"
  3633. },
  3634. "description": "List of projects"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Get a list of projects that have been opened with OpenCode.",
  3651. "summary": "List all projects",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/current": {
  3661. "get": {
  3662. "tags": ["project"],
  3663. "operationId": "project.current",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Current project information",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Retrieve the currently active project that OpenCode is working with.",
  3705. "summary": "Get current project",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/git/init": {
  3715. "post": {
  3716. "tags": ["project"],
  3717. "operationId": "project.initGit",
  3718. "parameters": [
  3719. {
  3720. "name": "directory",
  3721. "in": "query",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": false
  3726. },
  3727. {
  3728. "name": "workspace",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. }
  3735. ],
  3736. "responses": {
  3737. "200": {
  3738. "description": "Project information after git initialization",
  3739. "content": {
  3740. "application/json": {
  3741. "schema": {
  3742. "$ref": "#/components/schemas/Project"
  3743. }
  3744. }
  3745. }
  3746. },
  3747. "400": {
  3748. "description": "Bad request",
  3749. "content": {
  3750. "application/json": {
  3751. "schema": {
  3752. "$ref": "#/components/schemas/BadRequestError"
  3753. }
  3754. }
  3755. }
  3756. }
  3757. },
  3758. "description": "Create a git repository for the current project and return the refreshed project info.",
  3759. "summary": "Initialize git repository",
  3760. "x-codeSamples": [
  3761. {
  3762. "lang": "js",
  3763. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3764. }
  3765. ]
  3766. }
  3767. },
  3768. "/project/{projectID}": {
  3769. "patch": {
  3770. "tags": ["project"],
  3771. "operationId": "project.update",
  3772. "parameters": [
  3773. {
  3774. "name": "projectID",
  3775. "in": "path",
  3776. "schema": {
  3777. "type": "string"
  3778. },
  3779. "required": true
  3780. },
  3781. {
  3782. "name": "directory",
  3783. "in": "query",
  3784. "schema": {
  3785. "type": "string"
  3786. },
  3787. "required": false
  3788. },
  3789. {
  3790. "name": "workspace",
  3791. "in": "query",
  3792. "schema": {
  3793. "type": "string"
  3794. },
  3795. "required": false
  3796. }
  3797. ],
  3798. "responses": {
  3799. "200": {
  3800. "description": "Updated project information",
  3801. "content": {
  3802. "application/json": {
  3803. "schema": {
  3804. "$ref": "#/components/schemas/Project"
  3805. }
  3806. }
  3807. }
  3808. },
  3809. "400": {
  3810. "description": "BadRequest | InvalidRequestError",
  3811. "content": {
  3812. "application/json": {
  3813. "schema": {
  3814. "anyOf": [
  3815. {
  3816. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3817. },
  3818. {
  3819. "$ref": "#/components/schemas/InvalidRequestError"
  3820. }
  3821. ]
  3822. }
  3823. }
  3824. }
  3825. },
  3826. "404": {
  3827. "description": "ProjectNotFoundError",
  3828. "content": {
  3829. "application/json": {
  3830. "schema": {
  3831. "$ref": "#/components/schemas/ProjectNotFoundError"
  3832. }
  3833. }
  3834. }
  3835. }
  3836. },
  3837. "description": "Update project properties such as name, icon, and commands.",
  3838. "summary": "Update project",
  3839. "requestBody": {
  3840. "content": {
  3841. "application/json": {
  3842. "schema": {
  3843. "type": "object",
  3844. "properties": {
  3845. "name": {
  3846. "type": "string"
  3847. },
  3848. "icon": {
  3849. "$ref": "#/components/schemas/ProjectIcon"
  3850. },
  3851. "commands": {
  3852. "$ref": "#/components/schemas/ProjectCommands"
  3853. }
  3854. },
  3855. "additionalProperties": false
  3856. }
  3857. }
  3858. }
  3859. },
  3860. "x-codeSamples": [
  3861. {
  3862. "lang": "js",
  3863. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3864. }
  3865. ]
  3866. }
  3867. },
  3868. "/project/{projectID}/directories": {
  3869. "get": {
  3870. "tags": ["project"],
  3871. "operationId": "project.directories",
  3872. "parameters": [
  3873. {
  3874. "name": "projectID",
  3875. "in": "path",
  3876. "schema": {
  3877. "type": "string"
  3878. },
  3879. "required": true
  3880. },
  3881. {
  3882. "name": "directory",
  3883. "in": "query",
  3884. "schema": {
  3885. "type": "string"
  3886. },
  3887. "required": false
  3888. },
  3889. {
  3890. "name": "workspace",
  3891. "in": "query",
  3892. "schema": {
  3893. "type": "string"
  3894. },
  3895. "required": false
  3896. }
  3897. ],
  3898. "responses": {
  3899. "200": {
  3900. "description": "Project directories",
  3901. "content": {
  3902. "application/json": {
  3903. "schema": {
  3904. "$ref": "#/components/schemas/ProjectDirectories"
  3905. }
  3906. }
  3907. }
  3908. },
  3909. "400": {
  3910. "description": "Bad request",
  3911. "content": {
  3912. "application/json": {
  3913. "schema": {
  3914. "$ref": "#/components/schemas/BadRequestError"
  3915. }
  3916. }
  3917. }
  3918. }
  3919. },
  3920. "description": "List known local absolute directories for a project.",
  3921. "summary": "List project directories",
  3922. "x-codeSamples": [
  3923. {
  3924. "lang": "js",
  3925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3926. }
  3927. ]
  3928. }
  3929. },
  3930. "/experimental/project/{projectID}/copy/generate-name": {
  3931. "post": {
  3932. "tags": ["projectCopy"],
  3933. "operationId": "experimental.projectCopy.generateName",
  3934. "parameters": [
  3935. {
  3936. "name": "projectID",
  3937. "in": "path",
  3938. "schema": {
  3939. "type": "string"
  3940. },
  3941. "required": true
  3942. },
  3943. {
  3944. "name": "directory",
  3945. "in": "query",
  3946. "schema": {
  3947. "type": "string"
  3948. },
  3949. "required": false
  3950. },
  3951. {
  3952. "name": "workspace",
  3953. "in": "query",
  3954. "schema": {
  3955. "type": "string"
  3956. },
  3957. "required": false
  3958. }
  3959. ],
  3960. "responses": {
  3961. "200": {
  3962. "description": "Success",
  3963. "content": {
  3964. "application/json": {
  3965. "schema": {
  3966. "type": "object",
  3967. "properties": {
  3968. "name": {
  3969. "type": "string"
  3970. }
  3971. },
  3972. "required": ["name"],
  3973. "additionalProperties": false
  3974. }
  3975. }
  3976. }
  3977. },
  3978. "400": {
  3979. "description": "Bad request",
  3980. "content": {
  3981. "application/json": {
  3982. "schema": {
  3983. "$ref": "#/components/schemas/BadRequestError"
  3984. }
  3985. }
  3986. }
  3987. }
  3988. },
  3989. "description": "Generate a short name for a project copy from task context.",
  3990. "summary": "Generate project copy name",
  3991. "requestBody": {
  3992. "content": {
  3993. "application/json": {
  3994. "schema": {
  3995. "type": "object",
  3996. "properties": {
  3997. "context": {
  3998. "type": "string"
  3999. }
  4000. },
  4001. "additionalProperties": false
  4002. }
  4003. }
  4004. }
  4005. },
  4006. "x-codeSamples": [
  4007. {
  4008. "lang": "js",
  4009. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"
  4010. }
  4011. ]
  4012. }
  4013. },
  4014. "/pty/shells": {
  4015. "get": {
  4016. "tags": ["pty"],
  4017. "operationId": "pty.shells",
  4018. "parameters": [
  4019. {
  4020. "name": "directory",
  4021. "in": "query",
  4022. "schema": {
  4023. "type": "string"
  4024. },
  4025. "required": false
  4026. },
  4027. {
  4028. "name": "workspace",
  4029. "in": "query",
  4030. "schema": {
  4031. "type": "string"
  4032. },
  4033. "required": false
  4034. }
  4035. ],
  4036. "responses": {
  4037. "200": {
  4038. "description": "List of shells",
  4039. "content": {
  4040. "application/json": {
  4041. "schema": {
  4042. "type": "array",
  4043. "items": {
  4044. "type": "object",
  4045. "properties": {
  4046. "path": {
  4047. "type": "string"
  4048. },
  4049. "name": {
  4050. "type": "string"
  4051. },
  4052. "acceptable": {
  4053. "type": "boolean"
  4054. }
  4055. },
  4056. "required": ["path", "name", "acceptable"],
  4057. "additionalProperties": false
  4058. },
  4059. "description": "List of shells"
  4060. }
  4061. }
  4062. }
  4063. },
  4064. "400": {
  4065. "description": "Bad request",
  4066. "content": {
  4067. "application/json": {
  4068. "schema": {
  4069. "$ref": "#/components/schemas/BadRequestError"
  4070. }
  4071. }
  4072. }
  4073. }
  4074. },
  4075. "description": "Get a list of available shells on the system.",
  4076. "summary": "List available shells",
  4077. "x-codeSamples": [
  4078. {
  4079. "lang": "js",
  4080. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4081. }
  4082. ]
  4083. }
  4084. },
  4085. "/pty": {
  4086. "get": {
  4087. "tags": ["pty"],
  4088. "operationId": "pty.list",
  4089. "parameters": [
  4090. {
  4091. "name": "directory",
  4092. "in": "query",
  4093. "schema": {
  4094. "type": "string"
  4095. },
  4096. "required": false
  4097. },
  4098. {
  4099. "name": "workspace",
  4100. "in": "query",
  4101. "schema": {
  4102. "type": "string"
  4103. },
  4104. "required": false
  4105. }
  4106. ],
  4107. "responses": {
  4108. "200": {
  4109. "description": "List of sessions",
  4110. "content": {
  4111. "application/json": {
  4112. "schema": {
  4113. "type": "array",
  4114. "items": {
  4115. "$ref": "#/components/schemas/Pty"
  4116. },
  4117. "description": "List of sessions"
  4118. }
  4119. }
  4120. }
  4121. },
  4122. "400": {
  4123. "description": "Bad request",
  4124. "content": {
  4125. "application/json": {
  4126. "schema": {
  4127. "$ref": "#/components/schemas/BadRequestError"
  4128. }
  4129. }
  4130. }
  4131. }
  4132. },
  4133. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4134. "summary": "List PTY sessions",
  4135. "x-codeSamples": [
  4136. {
  4137. "lang": "js",
  4138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4139. }
  4140. ]
  4141. },
  4142. "post": {
  4143. "tags": ["pty"],
  4144. "operationId": "pty.create",
  4145. "parameters": [
  4146. {
  4147. "name": "directory",
  4148. "in": "query",
  4149. "schema": {
  4150. "type": "string"
  4151. },
  4152. "required": false
  4153. },
  4154. {
  4155. "name": "workspace",
  4156. "in": "query",
  4157. "schema": {
  4158. "type": "string"
  4159. },
  4160. "required": false
  4161. }
  4162. ],
  4163. "responses": {
  4164. "200": {
  4165. "description": "Created session",
  4166. "content": {
  4167. "application/json": {
  4168. "schema": {
  4169. "$ref": "#/components/schemas/Pty"
  4170. }
  4171. }
  4172. }
  4173. },
  4174. "400": {
  4175. "description": "BadRequest | InvalidRequestError",
  4176. "content": {
  4177. "application/json": {
  4178. "schema": {
  4179. "anyOf": [
  4180. {
  4181. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4182. },
  4183. {
  4184. "$ref": "#/components/schemas/InvalidRequestError"
  4185. }
  4186. ]
  4187. }
  4188. }
  4189. }
  4190. }
  4191. },
  4192. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4193. "summary": "Create PTY session",
  4194. "requestBody": {
  4195. "content": {
  4196. "application/json": {
  4197. "schema": {
  4198. "type": "object",
  4199. "properties": {
  4200. "command": {
  4201. "type": "string"
  4202. },
  4203. "args": {
  4204. "type": "array",
  4205. "items": {
  4206. "type": "string"
  4207. }
  4208. },
  4209. "cwd": {
  4210. "type": "string"
  4211. },
  4212. "title": {
  4213. "type": "string"
  4214. },
  4215. "env": {
  4216. "type": "object",
  4217. "additionalProperties": {
  4218. "type": "string"
  4219. }
  4220. }
  4221. },
  4222. "additionalProperties": false
  4223. }
  4224. }
  4225. }
  4226. },
  4227. "x-codeSamples": [
  4228. {
  4229. "lang": "js",
  4230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4231. }
  4232. ]
  4233. }
  4234. },
  4235. "/pty/{ptyID}": {
  4236. "get": {
  4237. "tags": ["pty"],
  4238. "operationId": "pty.get",
  4239. "parameters": [
  4240. {
  4241. "name": "ptyID",
  4242. "in": "path",
  4243. "schema": {
  4244. "type": "string",
  4245. "pattern": "^pty"
  4246. },
  4247. "required": true
  4248. },
  4249. {
  4250. "name": "directory",
  4251. "in": "query",
  4252. "schema": {
  4253. "type": "string"
  4254. },
  4255. "required": false
  4256. },
  4257. {
  4258. "name": "workspace",
  4259. "in": "query",
  4260. "schema": {
  4261. "type": "string"
  4262. },
  4263. "required": false
  4264. }
  4265. ],
  4266. "responses": {
  4267. "200": {
  4268. "description": "Session info",
  4269. "content": {
  4270. "application/json": {
  4271. "schema": {
  4272. "$ref": "#/components/schemas/Pty"
  4273. }
  4274. }
  4275. }
  4276. },
  4277. "400": {
  4278. "description": "Bad request",
  4279. "content": {
  4280. "application/json": {
  4281. "schema": {
  4282. "$ref": "#/components/schemas/BadRequestError"
  4283. }
  4284. }
  4285. }
  4286. },
  4287. "404": {
  4288. "description": "PtyNotFoundError",
  4289. "content": {
  4290. "application/json": {
  4291. "schema": {
  4292. "$ref": "#/components/schemas/PtyNotFoundError"
  4293. }
  4294. }
  4295. }
  4296. }
  4297. },
  4298. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4299. "summary": "Get PTY session",
  4300. "x-codeSamples": [
  4301. {
  4302. "lang": "js",
  4303. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4304. }
  4305. ]
  4306. },
  4307. "put": {
  4308. "tags": ["pty"],
  4309. "operationId": "pty.update",
  4310. "parameters": [
  4311. {
  4312. "name": "ptyID",
  4313. "in": "path",
  4314. "schema": {
  4315. "type": "string",
  4316. "pattern": "^pty"
  4317. },
  4318. "required": true
  4319. },
  4320. {
  4321. "name": "directory",
  4322. "in": "query",
  4323. "schema": {
  4324. "type": "string"
  4325. },
  4326. "required": false
  4327. },
  4328. {
  4329. "name": "workspace",
  4330. "in": "query",
  4331. "schema": {
  4332. "type": "string"
  4333. },
  4334. "required": false
  4335. }
  4336. ],
  4337. "responses": {
  4338. "200": {
  4339. "description": "Updated session",
  4340. "content": {
  4341. "application/json": {
  4342. "schema": {
  4343. "$ref": "#/components/schemas/Pty"
  4344. }
  4345. }
  4346. }
  4347. },
  4348. "400": {
  4349. "description": "BadRequest | InvalidRequestError",
  4350. "content": {
  4351. "application/json": {
  4352. "schema": {
  4353. "anyOf": [
  4354. {
  4355. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4356. },
  4357. {
  4358. "$ref": "#/components/schemas/InvalidRequestError"
  4359. }
  4360. ]
  4361. }
  4362. }
  4363. }
  4364. },
  4365. "404": {
  4366. "description": "PtyNotFoundError",
  4367. "content": {
  4368. "application/json": {
  4369. "schema": {
  4370. "$ref": "#/components/schemas/PtyNotFoundError"
  4371. }
  4372. }
  4373. }
  4374. }
  4375. },
  4376. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4377. "summary": "Update PTY session",
  4378. "requestBody": {
  4379. "content": {
  4380. "application/json": {
  4381. "schema": {
  4382. "type": "object",
  4383. "properties": {
  4384. "title": {
  4385. "type": "string"
  4386. },
  4387. "size": {
  4388. "type": "object",
  4389. "properties": {
  4390. "rows": {
  4391. "type": "integer",
  4392. "exclusiveMinimum": 0
  4393. },
  4394. "cols": {
  4395. "type": "integer",
  4396. "exclusiveMinimum": 0
  4397. }
  4398. },
  4399. "required": ["rows", "cols"],
  4400. "additionalProperties": false
  4401. }
  4402. },
  4403. "additionalProperties": false
  4404. }
  4405. }
  4406. }
  4407. },
  4408. "x-codeSamples": [
  4409. {
  4410. "lang": "js",
  4411. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4412. }
  4413. ]
  4414. },
  4415. "delete": {
  4416. "tags": ["pty"],
  4417. "operationId": "pty.remove",
  4418. "parameters": [
  4419. {
  4420. "name": "ptyID",
  4421. "in": "path",
  4422. "schema": {
  4423. "type": "string",
  4424. "pattern": "^pty"
  4425. },
  4426. "required": true
  4427. },
  4428. {
  4429. "name": "directory",
  4430. "in": "query",
  4431. "schema": {
  4432. "type": "string"
  4433. },
  4434. "required": false
  4435. },
  4436. {
  4437. "name": "workspace",
  4438. "in": "query",
  4439. "schema": {
  4440. "type": "string"
  4441. },
  4442. "required": false
  4443. }
  4444. ],
  4445. "responses": {
  4446. "200": {
  4447. "description": "Session removed",
  4448. "content": {
  4449. "application/json": {
  4450. "schema": {
  4451. "type": "boolean",
  4452. "description": "Session removed"
  4453. }
  4454. }
  4455. }
  4456. },
  4457. "400": {
  4458. "description": "Bad request",
  4459. "content": {
  4460. "application/json": {
  4461. "schema": {
  4462. "$ref": "#/components/schemas/BadRequestError"
  4463. }
  4464. }
  4465. }
  4466. },
  4467. "404": {
  4468. "description": "PtyNotFoundError",
  4469. "content": {
  4470. "application/json": {
  4471. "schema": {
  4472. "$ref": "#/components/schemas/PtyNotFoundError"
  4473. }
  4474. }
  4475. }
  4476. }
  4477. },
  4478. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4479. "summary": "Remove PTY session",
  4480. "x-codeSamples": [
  4481. {
  4482. "lang": "js",
  4483. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4484. }
  4485. ]
  4486. }
  4487. },
  4488. "/pty/{ptyID}/connect-token": {
  4489. "post": {
  4490. "tags": ["pty"],
  4491. "operationId": "pty.connectToken",
  4492. "parameters": [
  4493. {
  4494. "name": "ptyID",
  4495. "in": "path",
  4496. "schema": {
  4497. "type": "string",
  4498. "pattern": "^pty"
  4499. },
  4500. "required": true
  4501. },
  4502. {
  4503. "name": "directory",
  4504. "in": "query",
  4505. "schema": {
  4506. "type": "string"
  4507. },
  4508. "required": false
  4509. },
  4510. {
  4511. "name": "workspace",
  4512. "in": "query",
  4513. "schema": {
  4514. "type": "string"
  4515. },
  4516. "required": false
  4517. }
  4518. ],
  4519. "responses": {
  4520. "200": {
  4521. "description": "WebSocket connect token",
  4522. "content": {
  4523. "application/json": {
  4524. "schema": {
  4525. "$ref": "#/components/schemas/PtyTicketConnectToken"
  4526. }
  4527. }
  4528. }
  4529. },
  4530. "400": {
  4531. "description": "Bad request",
  4532. "content": {
  4533. "application/json": {
  4534. "schema": {
  4535. "$ref": "#/components/schemas/BadRequestError"
  4536. }
  4537. }
  4538. }
  4539. },
  4540. "403": {
  4541. "description": "PtyForbiddenError",
  4542. "content": {
  4543. "application/json": {
  4544. "schema": {
  4545. "$ref": "#/components/schemas/PtyForbiddenError"
  4546. }
  4547. }
  4548. }
  4549. },
  4550. "404": {
  4551. "description": "PtyNotFoundError",
  4552. "content": {
  4553. "application/json": {
  4554. "schema": {
  4555. "$ref": "#/components/schemas/PtyNotFoundError"
  4556. }
  4557. }
  4558. }
  4559. }
  4560. },
  4561. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4562. "summary": "Create PTY WebSocket token",
  4563. "x-codeSamples": [
  4564. {
  4565. "lang": "js",
  4566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4567. }
  4568. ]
  4569. }
  4570. },
  4571. "/question": {
  4572. "get": {
  4573. "tags": ["question"],
  4574. "operationId": "question.list",
  4575. "parameters": [
  4576. {
  4577. "name": "directory",
  4578. "in": "query",
  4579. "schema": {
  4580. "type": "string"
  4581. },
  4582. "required": false
  4583. },
  4584. {
  4585. "name": "workspace",
  4586. "in": "query",
  4587. "schema": {
  4588. "type": "string"
  4589. },
  4590. "required": false
  4591. }
  4592. ],
  4593. "responses": {
  4594. "200": {
  4595. "description": "List of pending questions",
  4596. "content": {
  4597. "application/json": {
  4598. "schema": {
  4599. "type": "array",
  4600. "items": {
  4601. "$ref": "#/components/schemas/QuestionRequest"
  4602. },
  4603. "description": "List of pending questions"
  4604. }
  4605. }
  4606. }
  4607. },
  4608. "400": {
  4609. "description": "Bad request",
  4610. "content": {
  4611. "application/json": {
  4612. "schema": {
  4613. "$ref": "#/components/schemas/BadRequestError"
  4614. }
  4615. }
  4616. }
  4617. }
  4618. },
  4619. "description": "Get all pending question requests across all sessions.",
  4620. "summary": "List pending questions",
  4621. "x-codeSamples": [
  4622. {
  4623. "lang": "js",
  4624. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4625. }
  4626. ]
  4627. }
  4628. },
  4629. "/question/{requestID}/reply": {
  4630. "post": {
  4631. "tags": ["question"],
  4632. "operationId": "question.reply",
  4633. "parameters": [
  4634. {
  4635. "name": "requestID",
  4636. "in": "path",
  4637. "schema": {
  4638. "type": "string",
  4639. "pattern": "^que"
  4640. },
  4641. "required": true
  4642. },
  4643. {
  4644. "name": "directory",
  4645. "in": "query",
  4646. "schema": {
  4647. "type": "string"
  4648. },
  4649. "required": false
  4650. },
  4651. {
  4652. "name": "workspace",
  4653. "in": "query",
  4654. "schema": {
  4655. "type": "string"
  4656. },
  4657. "required": false
  4658. }
  4659. ],
  4660. "responses": {
  4661. "200": {
  4662. "description": "Question answered successfully",
  4663. "content": {
  4664. "application/json": {
  4665. "schema": {
  4666. "type": "boolean",
  4667. "description": "Question answered successfully"
  4668. }
  4669. }
  4670. }
  4671. },
  4672. "400": {
  4673. "description": "BadRequest | InvalidRequestError",
  4674. "content": {
  4675. "application/json": {
  4676. "schema": {
  4677. "anyOf": [
  4678. {
  4679. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4680. },
  4681. {
  4682. "$ref": "#/components/schemas/InvalidRequestError"
  4683. }
  4684. ]
  4685. }
  4686. }
  4687. }
  4688. },
  4689. "404": {
  4690. "description": "QuestionNotFoundError",
  4691. "content": {
  4692. "application/json": {
  4693. "schema": {
  4694. "$ref": "#/components/schemas/QuestionNotFoundError"
  4695. }
  4696. }
  4697. }
  4698. }
  4699. },
  4700. "description": "Provide answers to a question request from the AI assistant.",
  4701. "summary": "Reply to question request",
  4702. "requestBody": {
  4703. "content": {
  4704. "application/json": {
  4705. "schema": {
  4706. "type": "object",
  4707. "properties": {
  4708. "answers": {
  4709. "type": "array",
  4710. "items": {
  4711. "$ref": "#/components/schemas/QuestionAnswer"
  4712. },
  4713. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4714. }
  4715. },
  4716. "required": ["answers"],
  4717. "additionalProperties": false
  4718. }
  4719. }
  4720. }
  4721. },
  4722. "x-codeSamples": [
  4723. {
  4724. "lang": "js",
  4725. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4726. }
  4727. ]
  4728. }
  4729. },
  4730. "/question/{requestID}/reject": {
  4731. "post": {
  4732. "tags": ["question"],
  4733. "operationId": "question.reject",
  4734. "parameters": [
  4735. {
  4736. "name": "requestID",
  4737. "in": "path",
  4738. "schema": {
  4739. "type": "string",
  4740. "pattern": "^que"
  4741. },
  4742. "required": true
  4743. },
  4744. {
  4745. "name": "directory",
  4746. "in": "query",
  4747. "schema": {
  4748. "type": "string"
  4749. },
  4750. "required": false
  4751. },
  4752. {
  4753. "name": "workspace",
  4754. "in": "query",
  4755. "schema": {
  4756. "type": "string"
  4757. },
  4758. "required": false
  4759. }
  4760. ],
  4761. "responses": {
  4762. "200": {
  4763. "description": "Question rejected successfully",
  4764. "content": {
  4765. "application/json": {
  4766. "schema": {
  4767. "type": "boolean",
  4768. "description": "Question rejected successfully"
  4769. }
  4770. }
  4771. }
  4772. },
  4773. "400": {
  4774. "description": "BadRequest | InvalidRequestError",
  4775. "content": {
  4776. "application/json": {
  4777. "schema": {
  4778. "anyOf": [
  4779. {
  4780. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4781. },
  4782. {
  4783. "$ref": "#/components/schemas/InvalidRequestError"
  4784. }
  4785. ]
  4786. }
  4787. }
  4788. }
  4789. },
  4790. "404": {
  4791. "description": "QuestionNotFoundError",
  4792. "content": {
  4793. "application/json": {
  4794. "schema": {
  4795. "$ref": "#/components/schemas/QuestionNotFoundError"
  4796. }
  4797. }
  4798. }
  4799. }
  4800. },
  4801. "description": "Reject a question request from the AI assistant.",
  4802. "summary": "Reject question request",
  4803. "x-codeSamples": [
  4804. {
  4805. "lang": "js",
  4806. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4807. }
  4808. ]
  4809. }
  4810. },
  4811. "/permission": {
  4812. "get": {
  4813. "tags": ["permission"],
  4814. "operationId": "permission.list",
  4815. "parameters": [
  4816. {
  4817. "name": "directory",
  4818. "in": "query",
  4819. "schema": {
  4820. "type": "string"
  4821. },
  4822. "required": false
  4823. },
  4824. {
  4825. "name": "workspace",
  4826. "in": "query",
  4827. "schema": {
  4828. "type": "string"
  4829. },
  4830. "required": false
  4831. }
  4832. ],
  4833. "responses": {
  4834. "200": {
  4835. "description": "List of pending permissions",
  4836. "content": {
  4837. "application/json": {
  4838. "schema": {
  4839. "type": "array",
  4840. "items": {
  4841. "$ref": "#/components/schemas/PermissionRequest"
  4842. },
  4843. "description": "List of pending permissions"
  4844. }
  4845. }
  4846. }
  4847. },
  4848. "400": {
  4849. "description": "Bad request",
  4850. "content": {
  4851. "application/json": {
  4852. "schema": {
  4853. "$ref": "#/components/schemas/BadRequestError"
  4854. }
  4855. }
  4856. }
  4857. }
  4858. },
  4859. "description": "Get all pending permission requests across all sessions.",
  4860. "summary": "List pending permissions",
  4861. "x-codeSamples": [
  4862. {
  4863. "lang": "js",
  4864. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4865. }
  4866. ]
  4867. }
  4868. },
  4869. "/permission/{requestID}/reply": {
  4870. "post": {
  4871. "tags": ["permission"],
  4872. "operationId": "permission.reply",
  4873. "parameters": [
  4874. {
  4875. "name": "requestID",
  4876. "in": "path",
  4877. "schema": {
  4878. "type": "string",
  4879. "pattern": "^per"
  4880. },
  4881. "required": true
  4882. },
  4883. {
  4884. "name": "directory",
  4885. "in": "query",
  4886. "schema": {
  4887. "type": "string"
  4888. },
  4889. "required": false
  4890. },
  4891. {
  4892. "name": "workspace",
  4893. "in": "query",
  4894. "schema": {
  4895. "type": "string"
  4896. },
  4897. "required": false
  4898. }
  4899. ],
  4900. "responses": {
  4901. "200": {
  4902. "description": "Permission processed successfully",
  4903. "content": {
  4904. "application/json": {
  4905. "schema": {
  4906. "type": "boolean",
  4907. "description": "Permission processed successfully"
  4908. }
  4909. }
  4910. }
  4911. },
  4912. "400": {
  4913. "description": "BadRequest | InvalidRequestError",
  4914. "content": {
  4915. "application/json": {
  4916. "schema": {
  4917. "anyOf": [
  4918. {
  4919. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4920. },
  4921. {
  4922. "$ref": "#/components/schemas/InvalidRequestError"
  4923. }
  4924. ]
  4925. }
  4926. }
  4927. }
  4928. },
  4929. "404": {
  4930. "description": "PermissionNotFoundError",
  4931. "content": {
  4932. "application/json": {
  4933. "schema": {
  4934. "$ref": "#/components/schemas/PermissionNotFoundError"
  4935. }
  4936. }
  4937. }
  4938. }
  4939. },
  4940. "description": "Approve or deny a permission request from the AI assistant.",
  4941. "summary": "Respond to permission request",
  4942. "requestBody": {
  4943. "content": {
  4944. "application/json": {
  4945. "schema": {
  4946. "type": "object",
  4947. "properties": {
  4948. "reply": {
  4949. "type": "string",
  4950. "enum": ["once", "always", "reject"]
  4951. },
  4952. "message": {
  4953. "type": "string"
  4954. }
  4955. },
  4956. "required": ["reply"],
  4957. "additionalProperties": false
  4958. }
  4959. }
  4960. }
  4961. },
  4962. "x-codeSamples": [
  4963. {
  4964. "lang": "js",
  4965. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4966. }
  4967. ]
  4968. }
  4969. },
  4970. "/provider": {
  4971. "get": {
  4972. "tags": ["provider"],
  4973. "operationId": "provider.list",
  4974. "parameters": [
  4975. {
  4976. "name": "directory",
  4977. "in": "query",
  4978. "schema": {
  4979. "type": "string"
  4980. },
  4981. "required": false
  4982. },
  4983. {
  4984. "name": "workspace",
  4985. "in": "query",
  4986. "schema": {
  4987. "type": "string"
  4988. },
  4989. "required": false
  4990. }
  4991. ],
  4992. "responses": {
  4993. "200": {
  4994. "description": "List of providers",
  4995. "content": {
  4996. "application/json": {
  4997. "schema": {
  4998. "type": "object",
  4999. "properties": {
  5000. "all": {
  5001. "type": "array",
  5002. "items": {
  5003. "$ref": "#/components/schemas/Provider"
  5004. }
  5005. },
  5006. "default": {
  5007. "type": "object",
  5008. "additionalProperties": {
  5009. "type": "string"
  5010. }
  5011. },
  5012. "connected": {
  5013. "type": "array",
  5014. "items": {
  5015. "type": "string"
  5016. }
  5017. }
  5018. },
  5019. "required": ["all", "default", "connected"],
  5020. "additionalProperties": false,
  5021. "description": "List of providers"
  5022. }
  5023. }
  5024. }
  5025. },
  5026. "400": {
  5027. "description": "Bad request",
  5028. "content": {
  5029. "application/json": {
  5030. "schema": {
  5031. "$ref": "#/components/schemas/BadRequestError"
  5032. }
  5033. }
  5034. }
  5035. }
  5036. },
  5037. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5038. "summary": "List providers",
  5039. "x-codeSamples": [
  5040. {
  5041. "lang": "js",
  5042. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5043. }
  5044. ]
  5045. }
  5046. },
  5047. "/provider/auth": {
  5048. "get": {
  5049. "tags": ["provider"],
  5050. "operationId": "provider.auth",
  5051. "parameters": [
  5052. {
  5053. "name": "directory",
  5054. "in": "query",
  5055. "schema": {
  5056. "type": "string"
  5057. },
  5058. "required": false
  5059. },
  5060. {
  5061. "name": "workspace",
  5062. "in": "query",
  5063. "schema": {
  5064. "type": "string"
  5065. },
  5066. "required": false
  5067. }
  5068. ],
  5069. "responses": {
  5070. "200": {
  5071. "description": "Provider auth methods",
  5072. "content": {
  5073. "application/json": {
  5074. "schema": {
  5075. "type": "object",
  5076. "additionalProperties": {
  5077. "type": "array",
  5078. "items": {
  5079. "$ref": "#/components/schemas/ProviderAuthMethod"
  5080. }
  5081. },
  5082. "description": "Provider auth methods"
  5083. }
  5084. }
  5085. }
  5086. },
  5087. "400": {
  5088. "description": "Bad request",
  5089. "content": {
  5090. "application/json": {
  5091. "schema": {
  5092. "$ref": "#/components/schemas/BadRequestError"
  5093. }
  5094. }
  5095. }
  5096. }
  5097. },
  5098. "description": "Retrieve available authentication methods for all AI providers.",
  5099. "summary": "Get provider auth methods",
  5100. "x-codeSamples": [
  5101. {
  5102. "lang": "js",
  5103. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5104. }
  5105. ]
  5106. }
  5107. },
  5108. "/provider/{providerID}/oauth/authorize": {
  5109. "post": {
  5110. "tags": ["provider"],
  5111. "operationId": "provider.oauth.authorize",
  5112. "parameters": [
  5113. {
  5114. "name": "providerID",
  5115. "in": "path",
  5116. "schema": {
  5117. "type": "string"
  5118. },
  5119. "required": true
  5120. },
  5121. {
  5122. "name": "directory",
  5123. "in": "query",
  5124. "schema": {
  5125. "type": "string"
  5126. },
  5127. "required": false
  5128. },
  5129. {
  5130. "name": "workspace",
  5131. "in": "query",
  5132. "schema": {
  5133. "type": "string"
  5134. },
  5135. "required": false
  5136. }
  5137. ],
  5138. "responses": {
  5139. "200": {
  5140. "description": "Authorization URL and method",
  5141. "content": {
  5142. "application/json": {
  5143. "schema": {
  5144. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5145. }
  5146. }
  5147. }
  5148. },
  5149. "400": {
  5150. "description": "ProviderAuthError | InvalidRequestError",
  5151. "content": {
  5152. "application/json": {
  5153. "schema": {
  5154. "anyOf": [
  5155. {
  5156. "$ref": "#/components/schemas/ProviderAuthError1"
  5157. },
  5158. {
  5159. "$ref": "#/components/schemas/InvalidRequestError"
  5160. }
  5161. ]
  5162. }
  5163. }
  5164. }
  5165. }
  5166. },
  5167. "description": "Start the OAuth authorization flow for a provider.",
  5168. "summary": "Start OAuth authorization",
  5169. "requestBody": {
  5170. "content": {
  5171. "application/json": {
  5172. "schema": {
  5173. "type": "object",
  5174. "properties": {
  5175. "method": {
  5176. "type": "number",
  5177. "description": "Auth method index"
  5178. },
  5179. "inputs": {
  5180. "type": "object",
  5181. "additionalProperties": {
  5182. "type": "string"
  5183. }
  5184. }
  5185. },
  5186. "required": ["method"],
  5187. "additionalProperties": false
  5188. }
  5189. }
  5190. }
  5191. },
  5192. "x-codeSamples": [
  5193. {
  5194. "lang": "js",
  5195. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5196. }
  5197. ]
  5198. }
  5199. },
  5200. "/provider/{providerID}/oauth/callback": {
  5201. "post": {
  5202. "tags": ["provider"],
  5203. "operationId": "provider.oauth.callback",
  5204. "parameters": [
  5205. {
  5206. "name": "providerID",
  5207. "in": "path",
  5208. "schema": {
  5209. "type": "string"
  5210. },
  5211. "required": true
  5212. },
  5213. {
  5214. "name": "directory",
  5215. "in": "query",
  5216. "schema": {
  5217. "type": "string"
  5218. },
  5219. "required": false
  5220. },
  5221. {
  5222. "name": "workspace",
  5223. "in": "query",
  5224. "schema": {
  5225. "type": "string"
  5226. },
  5227. "required": false
  5228. }
  5229. ],
  5230. "responses": {
  5231. "200": {
  5232. "description": "OAuth callback processed successfully",
  5233. "content": {
  5234. "application/json": {
  5235. "schema": {
  5236. "type": "boolean",
  5237. "description": "OAuth callback processed successfully"
  5238. }
  5239. }
  5240. }
  5241. },
  5242. "400": {
  5243. "description": "ProviderAuthError | InvalidRequestError",
  5244. "content": {
  5245. "application/json": {
  5246. "schema": {
  5247. "anyOf": [
  5248. {
  5249. "$ref": "#/components/schemas/ProviderAuthError1"
  5250. },
  5251. {
  5252. "$ref": "#/components/schemas/InvalidRequestError"
  5253. }
  5254. ]
  5255. }
  5256. }
  5257. }
  5258. }
  5259. },
  5260. "description": "Handle the OAuth callback from a provider after user authorization.",
  5261. "summary": "Handle OAuth callback",
  5262. "requestBody": {
  5263. "content": {
  5264. "application/json": {
  5265. "schema": {
  5266. "type": "object",
  5267. "properties": {
  5268. "method": {
  5269. "type": "number",
  5270. "description": "Auth method index"
  5271. },
  5272. "code": {
  5273. "type": "string"
  5274. }
  5275. },
  5276. "required": ["method"],
  5277. "additionalProperties": false
  5278. }
  5279. }
  5280. }
  5281. },
  5282. "x-codeSamples": [
  5283. {
  5284. "lang": "js",
  5285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5286. }
  5287. ]
  5288. }
  5289. },
  5290. "/session": {
  5291. "get": {
  5292. "tags": ["session"],
  5293. "operationId": "session.list",
  5294. "parameters": [
  5295. {
  5296. "name": "directory",
  5297. "in": "query",
  5298. "schema": {
  5299. "type": "string"
  5300. },
  5301. "required": false
  5302. },
  5303. {
  5304. "name": "workspace",
  5305. "in": "query",
  5306. "schema": {
  5307. "type": "string"
  5308. },
  5309. "required": false
  5310. },
  5311. {
  5312. "name": "scope",
  5313. "in": "query",
  5314. "schema": {
  5315. "type": "string",
  5316. "enum": ["project"]
  5317. },
  5318. "required": false
  5319. },
  5320. {
  5321. "name": "path",
  5322. "in": "query",
  5323. "schema": {
  5324. "type": "string"
  5325. },
  5326. "required": false
  5327. },
  5328. {
  5329. "name": "roots",
  5330. "in": "query",
  5331. "schema": {
  5332. "anyOf": [
  5333. {
  5334. "type": "boolean"
  5335. },
  5336. {
  5337. "type": "string",
  5338. "enum": ["true", "false"]
  5339. }
  5340. ]
  5341. },
  5342. "required": false
  5343. },
  5344. {
  5345. "name": "start",
  5346. "in": "query",
  5347. "schema": {
  5348. "type": "number"
  5349. },
  5350. "required": false
  5351. },
  5352. {
  5353. "name": "search",
  5354. "in": "query",
  5355. "schema": {
  5356. "type": "string"
  5357. },
  5358. "required": false
  5359. },
  5360. {
  5361. "name": "limit",
  5362. "in": "query",
  5363. "schema": {
  5364. "type": "number"
  5365. },
  5366. "required": false
  5367. }
  5368. ],
  5369. "responses": {
  5370. "200": {
  5371. "description": "List of sessions",
  5372. "content": {
  5373. "application/json": {
  5374. "schema": {
  5375. "type": "array",
  5376. "items": {
  5377. "$ref": "#/components/schemas/Session"
  5378. },
  5379. "description": "List of sessions"
  5380. }
  5381. }
  5382. }
  5383. },
  5384. "400": {
  5385. "description": "Bad request",
  5386. "content": {
  5387. "application/json": {
  5388. "schema": {
  5389. "$ref": "#/components/schemas/BadRequestError"
  5390. }
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5396. "summary": "List sessions",
  5397. "x-codeSamples": [
  5398. {
  5399. "lang": "js",
  5400. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5401. }
  5402. ]
  5403. },
  5404. "post": {
  5405. "tags": ["session"],
  5406. "operationId": "session.create",
  5407. "parameters": [
  5408. {
  5409. "name": "directory",
  5410. "in": "query",
  5411. "schema": {
  5412. "type": "string"
  5413. },
  5414. "required": false
  5415. },
  5416. {
  5417. "name": "workspace",
  5418. "in": "query",
  5419. "schema": {
  5420. "type": "string"
  5421. },
  5422. "required": false
  5423. }
  5424. ],
  5425. "responses": {
  5426. "200": {
  5427. "description": "Successfully created session",
  5428. "content": {
  5429. "application/json": {
  5430. "schema": {
  5431. "$ref": "#/components/schemas/Session"
  5432. }
  5433. }
  5434. }
  5435. },
  5436. "400": {
  5437. "description": "BadRequest | InvalidRequestError",
  5438. "content": {
  5439. "application/json": {
  5440. "schema": {
  5441. "anyOf": [
  5442. {
  5443. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5444. },
  5445. {
  5446. "$ref": "#/components/schemas/InvalidRequestError"
  5447. }
  5448. ]
  5449. }
  5450. }
  5451. }
  5452. }
  5453. },
  5454. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5455. "summary": "Create session",
  5456. "requestBody": {
  5457. "content": {
  5458. "application/json": {
  5459. "schema": {
  5460. "type": "object",
  5461. "properties": {
  5462. "parentID": {
  5463. "type": "string",
  5464. "pattern": "^ses"
  5465. },
  5466. "title": {
  5467. "type": "string"
  5468. },
  5469. "agent": {
  5470. "type": "string"
  5471. },
  5472. "model": {
  5473. "type": "object",
  5474. "properties": {
  5475. "id": {
  5476. "type": "string"
  5477. },
  5478. "providerID": {
  5479. "type": "string"
  5480. },
  5481. "variant": {
  5482. "type": "string"
  5483. }
  5484. },
  5485. "required": ["id", "providerID"],
  5486. "additionalProperties": false
  5487. },
  5488. "metadata": {
  5489. "type": "object"
  5490. },
  5491. "permission": {
  5492. "$ref": "#/components/schemas/PermissionRuleset"
  5493. },
  5494. "workspaceID": {
  5495. "type": "string",
  5496. "pattern": "^wrk"
  5497. }
  5498. },
  5499. "additionalProperties": false
  5500. }
  5501. }
  5502. }
  5503. },
  5504. "x-codeSamples": [
  5505. {
  5506. "lang": "js",
  5507. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5508. }
  5509. ]
  5510. }
  5511. },
  5512. "/session/status": {
  5513. "get": {
  5514. "tags": ["session"],
  5515. "operationId": "session.status",
  5516. "parameters": [
  5517. {
  5518. "name": "directory",
  5519. "in": "query",
  5520. "schema": {
  5521. "type": "string"
  5522. },
  5523. "required": false
  5524. },
  5525. {
  5526. "name": "workspace",
  5527. "in": "query",
  5528. "schema": {
  5529. "type": "string"
  5530. },
  5531. "required": false
  5532. }
  5533. ],
  5534. "responses": {
  5535. "200": {
  5536. "description": "Get session status",
  5537. "content": {
  5538. "application/json": {
  5539. "schema": {
  5540. "type": "object",
  5541. "additionalProperties": {
  5542. "$ref": "#/components/schemas/SessionStatus"
  5543. },
  5544. "description": "Get session status"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "BadRequest | InvalidRequestError",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "anyOf": [
  5555. {
  5556. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5557. },
  5558. {
  5559. "$ref": "#/components/schemas/InvalidRequestError"
  5560. }
  5561. ]
  5562. }
  5563. }
  5564. }
  5565. }
  5566. },
  5567. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5568. "summary": "Get session status",
  5569. "x-codeSamples": [
  5570. {
  5571. "lang": "js",
  5572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5573. }
  5574. ]
  5575. }
  5576. },
  5577. "/session/{sessionID}": {
  5578. "get": {
  5579. "tags": ["session"],
  5580. "operationId": "session.get",
  5581. "parameters": [
  5582. {
  5583. "name": "sessionID",
  5584. "in": "path",
  5585. "schema": {
  5586. "type": "string",
  5587. "pattern": "^ses"
  5588. },
  5589. "required": true
  5590. },
  5591. {
  5592. "name": "directory",
  5593. "in": "query",
  5594. "schema": {
  5595. "type": "string"
  5596. },
  5597. "required": false
  5598. },
  5599. {
  5600. "name": "workspace",
  5601. "in": "query",
  5602. "schema": {
  5603. "type": "string"
  5604. },
  5605. "required": false
  5606. }
  5607. ],
  5608. "responses": {
  5609. "200": {
  5610. "description": "Get session",
  5611. "content": {
  5612. "application/json": {
  5613. "schema": {
  5614. "$ref": "#/components/schemas/Session"
  5615. }
  5616. }
  5617. }
  5618. },
  5619. "400": {
  5620. "description": "BadRequest | InvalidRequestError",
  5621. "content": {
  5622. "application/json": {
  5623. "schema": {
  5624. "anyOf": [
  5625. {
  5626. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5627. },
  5628. {
  5629. "$ref": "#/components/schemas/InvalidRequestError"
  5630. }
  5631. ]
  5632. }
  5633. }
  5634. }
  5635. },
  5636. "404": {
  5637. "description": "NotFoundError",
  5638. "content": {
  5639. "application/json": {
  5640. "schema": {
  5641. "$ref": "#/components/schemas/NotFoundError"
  5642. }
  5643. }
  5644. }
  5645. }
  5646. },
  5647. "description": "Retrieve detailed information about a specific OpenCode session.",
  5648. "summary": "Get session",
  5649. "x-codeSamples": [
  5650. {
  5651. "lang": "js",
  5652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5653. }
  5654. ]
  5655. },
  5656. "delete": {
  5657. "tags": ["session"],
  5658. "operationId": "session.delete",
  5659. "parameters": [
  5660. {
  5661. "name": "sessionID",
  5662. "in": "path",
  5663. "schema": {
  5664. "type": "string",
  5665. "pattern": "^ses"
  5666. },
  5667. "required": true
  5668. },
  5669. {
  5670. "name": "directory",
  5671. "in": "query",
  5672. "schema": {
  5673. "type": "string"
  5674. },
  5675. "required": false
  5676. },
  5677. {
  5678. "name": "workspace",
  5679. "in": "query",
  5680. "schema": {
  5681. "type": "string"
  5682. },
  5683. "required": false
  5684. }
  5685. ],
  5686. "responses": {
  5687. "200": {
  5688. "description": "Successfully deleted session",
  5689. "content": {
  5690. "application/json": {
  5691. "schema": {
  5692. "type": "boolean",
  5693. "description": "Successfully deleted session"
  5694. }
  5695. }
  5696. }
  5697. },
  5698. "400": {
  5699. "description": "BadRequest | InvalidRequestError",
  5700. "content": {
  5701. "application/json": {
  5702. "schema": {
  5703. "anyOf": [
  5704. {
  5705. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5706. },
  5707. {
  5708. "$ref": "#/components/schemas/InvalidRequestError"
  5709. }
  5710. ]
  5711. }
  5712. }
  5713. }
  5714. },
  5715. "404": {
  5716. "description": "NotFoundError",
  5717. "content": {
  5718. "application/json": {
  5719. "schema": {
  5720. "$ref": "#/components/schemas/NotFoundError"
  5721. }
  5722. }
  5723. }
  5724. }
  5725. },
  5726. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5727. "summary": "Delete session",
  5728. "x-codeSamples": [
  5729. {
  5730. "lang": "js",
  5731. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5732. }
  5733. ]
  5734. },
  5735. "patch": {
  5736. "tags": ["session"],
  5737. "operationId": "session.update",
  5738. "parameters": [
  5739. {
  5740. "name": "sessionID",
  5741. "in": "path",
  5742. "schema": {
  5743. "type": "string",
  5744. "pattern": "^ses"
  5745. },
  5746. "required": true
  5747. },
  5748. {
  5749. "name": "directory",
  5750. "in": "query",
  5751. "schema": {
  5752. "type": "string"
  5753. },
  5754. "required": false
  5755. },
  5756. {
  5757. "name": "workspace",
  5758. "in": "query",
  5759. "schema": {
  5760. "type": "string"
  5761. },
  5762. "required": false
  5763. }
  5764. ],
  5765. "responses": {
  5766. "200": {
  5767. "description": "Successfully updated session",
  5768. "content": {
  5769. "application/json": {
  5770. "schema": {
  5771. "$ref": "#/components/schemas/Session"
  5772. }
  5773. }
  5774. }
  5775. },
  5776. "400": {
  5777. "description": "BadRequest | InvalidRequestError",
  5778. "content": {
  5779. "application/json": {
  5780. "schema": {
  5781. "anyOf": [
  5782. {
  5783. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5784. },
  5785. {
  5786. "$ref": "#/components/schemas/InvalidRequestError"
  5787. }
  5788. ]
  5789. }
  5790. }
  5791. }
  5792. },
  5793. "404": {
  5794. "description": "NotFoundError",
  5795. "content": {
  5796. "application/json": {
  5797. "schema": {
  5798. "$ref": "#/components/schemas/NotFoundError"
  5799. }
  5800. }
  5801. }
  5802. }
  5803. },
  5804. "description": "Update properties of an existing session, such as title or other metadata.",
  5805. "summary": "Update session",
  5806. "requestBody": {
  5807. "content": {
  5808. "application/json": {
  5809. "schema": {
  5810. "type": "object",
  5811. "properties": {
  5812. "title": {
  5813. "type": "string"
  5814. },
  5815. "metadata": {
  5816. "type": "object"
  5817. },
  5818. "permission": {
  5819. "$ref": "#/components/schemas/PermissionRuleset"
  5820. },
  5821. "time": {
  5822. "type": "object",
  5823. "properties": {
  5824. "archived": {
  5825. "type": "number"
  5826. }
  5827. },
  5828. "additionalProperties": false
  5829. }
  5830. },
  5831. "additionalProperties": false
  5832. }
  5833. }
  5834. }
  5835. },
  5836. "x-codeSamples": [
  5837. {
  5838. "lang": "js",
  5839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5840. }
  5841. ]
  5842. }
  5843. },
  5844. "/session/{sessionID}/children": {
  5845. "get": {
  5846. "tags": ["session"],
  5847. "operationId": "session.children",
  5848. "parameters": [
  5849. {
  5850. "name": "sessionID",
  5851. "in": "path",
  5852. "schema": {
  5853. "type": "string",
  5854. "pattern": "^ses"
  5855. },
  5856. "required": true
  5857. },
  5858. {
  5859. "name": "directory",
  5860. "in": "query",
  5861. "schema": {
  5862. "type": "string"
  5863. },
  5864. "required": false
  5865. },
  5866. {
  5867. "name": "workspace",
  5868. "in": "query",
  5869. "schema": {
  5870. "type": "string"
  5871. },
  5872. "required": false
  5873. }
  5874. ],
  5875. "responses": {
  5876. "200": {
  5877. "description": "List of children",
  5878. "content": {
  5879. "application/json": {
  5880. "schema": {
  5881. "type": "array",
  5882. "items": {
  5883. "$ref": "#/components/schemas/Session"
  5884. },
  5885. "description": "List of children"
  5886. }
  5887. }
  5888. }
  5889. },
  5890. "400": {
  5891. "description": "BadRequest | InvalidRequestError",
  5892. "content": {
  5893. "application/json": {
  5894. "schema": {
  5895. "anyOf": [
  5896. {
  5897. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5898. },
  5899. {
  5900. "$ref": "#/components/schemas/InvalidRequestError"
  5901. }
  5902. ]
  5903. }
  5904. }
  5905. }
  5906. },
  5907. "404": {
  5908. "description": "NotFoundError",
  5909. "content": {
  5910. "application/json": {
  5911. "schema": {
  5912. "$ref": "#/components/schemas/NotFoundError"
  5913. }
  5914. }
  5915. }
  5916. }
  5917. },
  5918. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5919. "summary": "Get session children",
  5920. "x-codeSamples": [
  5921. {
  5922. "lang": "js",
  5923. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5924. }
  5925. ]
  5926. }
  5927. },
  5928. "/session/{sessionID}/todo": {
  5929. "get": {
  5930. "tags": ["session"],
  5931. "operationId": "session.todo",
  5932. "parameters": [
  5933. {
  5934. "name": "sessionID",
  5935. "in": "path",
  5936. "schema": {
  5937. "type": "string",
  5938. "pattern": "^ses"
  5939. },
  5940. "required": true
  5941. },
  5942. {
  5943. "name": "directory",
  5944. "in": "query",
  5945. "schema": {
  5946. "type": "string"
  5947. },
  5948. "required": false
  5949. },
  5950. {
  5951. "name": "workspace",
  5952. "in": "query",
  5953. "schema": {
  5954. "type": "string"
  5955. },
  5956. "required": false
  5957. }
  5958. ],
  5959. "responses": {
  5960. "200": {
  5961. "description": "Todo list",
  5962. "content": {
  5963. "application/json": {
  5964. "schema": {
  5965. "type": "array",
  5966. "items": {
  5967. "$ref": "#/components/schemas/Todo"
  5968. },
  5969. "description": "Todo list"
  5970. }
  5971. }
  5972. }
  5973. },
  5974. "400": {
  5975. "description": "BadRequest | InvalidRequestError",
  5976. "content": {
  5977. "application/json": {
  5978. "schema": {
  5979. "anyOf": [
  5980. {
  5981. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5982. },
  5983. {
  5984. "$ref": "#/components/schemas/InvalidRequestError"
  5985. }
  5986. ]
  5987. }
  5988. }
  5989. }
  5990. },
  5991. "404": {
  5992. "description": "NotFoundError",
  5993. "content": {
  5994. "application/json": {
  5995. "schema": {
  5996. "$ref": "#/components/schemas/NotFoundError"
  5997. }
  5998. }
  5999. }
  6000. }
  6001. },
  6002. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6003. "summary": "Get session todos",
  6004. "x-codeSamples": [
  6005. {
  6006. "lang": "js",
  6007. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6008. }
  6009. ]
  6010. }
  6011. },
  6012. "/session/{sessionID}/diff": {
  6013. "get": {
  6014. "tags": ["session"],
  6015. "operationId": "session.diff",
  6016. "parameters": [
  6017. {
  6018. "name": "sessionID",
  6019. "in": "path",
  6020. "schema": {
  6021. "type": "string",
  6022. "pattern": "^ses"
  6023. },
  6024. "required": true
  6025. },
  6026. {
  6027. "name": "directory",
  6028. "in": "query",
  6029. "schema": {
  6030. "type": "string"
  6031. },
  6032. "required": false
  6033. },
  6034. {
  6035. "name": "workspace",
  6036. "in": "query",
  6037. "schema": {
  6038. "type": "string"
  6039. },
  6040. "required": false
  6041. },
  6042. {
  6043. "name": "messageID",
  6044. "in": "query",
  6045. "schema": {
  6046. "type": "string",
  6047. "pattern": "^msg"
  6048. },
  6049. "required": false
  6050. }
  6051. ],
  6052. "responses": {
  6053. "200": {
  6054. "description": "Successfully retrieved diff",
  6055. "content": {
  6056. "application/json": {
  6057. "schema": {
  6058. "type": "array",
  6059. "items": {
  6060. "$ref": "#/components/schemas/SnapshotFileDiff"
  6061. },
  6062. "description": "Successfully retrieved diff"
  6063. }
  6064. }
  6065. }
  6066. },
  6067. "400": {
  6068. "description": "Bad request",
  6069. "content": {
  6070. "application/json": {
  6071. "schema": {
  6072. "$ref": "#/components/schemas/BadRequestError"
  6073. }
  6074. }
  6075. }
  6076. }
  6077. },
  6078. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6079. "summary": "Get message diff",
  6080. "x-codeSamples": [
  6081. {
  6082. "lang": "js",
  6083. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6084. }
  6085. ]
  6086. }
  6087. },
  6088. "/session/{sessionID}/message": {
  6089. "get": {
  6090. "tags": ["session"],
  6091. "operationId": "session.messages",
  6092. "parameters": [
  6093. {
  6094. "name": "sessionID",
  6095. "in": "path",
  6096. "schema": {
  6097. "type": "string",
  6098. "pattern": "^ses"
  6099. },
  6100. "required": true
  6101. },
  6102. {
  6103. "name": "directory",
  6104. "in": "query",
  6105. "schema": {
  6106. "type": "string"
  6107. },
  6108. "required": false
  6109. },
  6110. {
  6111. "name": "workspace",
  6112. "in": "query",
  6113. "schema": {
  6114. "type": "string"
  6115. },
  6116. "required": false
  6117. },
  6118. {
  6119. "name": "limit",
  6120. "in": "query",
  6121. "schema": {
  6122. "type": "integer",
  6123. "minimum": 0,
  6124. "maximum": 9007199254740991
  6125. },
  6126. "required": false
  6127. },
  6128. {
  6129. "name": "before",
  6130. "in": "query",
  6131. "schema": {
  6132. "type": "string"
  6133. },
  6134. "required": false
  6135. }
  6136. ],
  6137. "responses": {
  6138. "200": {
  6139. "description": "List of messages",
  6140. "content": {
  6141. "application/json": {
  6142. "schema": {
  6143. "type": "array",
  6144. "items": {
  6145. "type": "object",
  6146. "properties": {
  6147. "info": {
  6148. "$ref": "#/components/schemas/Message"
  6149. },
  6150. "parts": {
  6151. "type": "array",
  6152. "items": {
  6153. "$ref": "#/components/schemas/Part"
  6154. }
  6155. }
  6156. },
  6157. "required": ["info", "parts"],
  6158. "additionalProperties": false
  6159. },
  6160. "description": "List of messages"
  6161. }
  6162. }
  6163. }
  6164. },
  6165. "400": {
  6166. "description": "BadRequest | InvalidRequestError",
  6167. "content": {
  6168. "application/json": {
  6169. "schema": {
  6170. "anyOf": [
  6171. {
  6172. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6173. },
  6174. {
  6175. "$ref": "#/components/schemas/InvalidRequestError"
  6176. }
  6177. ]
  6178. }
  6179. }
  6180. }
  6181. },
  6182. "404": {
  6183. "description": "NotFoundError",
  6184. "content": {
  6185. "application/json": {
  6186. "schema": {
  6187. "$ref": "#/components/schemas/NotFoundError"
  6188. }
  6189. }
  6190. }
  6191. }
  6192. },
  6193. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6194. "summary": "Get session messages",
  6195. "x-codeSamples": [
  6196. {
  6197. "lang": "js",
  6198. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6199. }
  6200. ]
  6201. },
  6202. "post": {
  6203. "tags": ["session"],
  6204. "operationId": "session.prompt",
  6205. "parameters": [
  6206. {
  6207. "name": "sessionID",
  6208. "in": "path",
  6209. "schema": {
  6210. "type": "string",
  6211. "pattern": "^ses"
  6212. },
  6213. "required": true
  6214. },
  6215. {
  6216. "name": "directory",
  6217. "in": "query",
  6218. "schema": {
  6219. "type": "string"
  6220. },
  6221. "required": false
  6222. },
  6223. {
  6224. "name": "workspace",
  6225. "in": "query",
  6226. "schema": {
  6227. "type": "string"
  6228. },
  6229. "required": false
  6230. }
  6231. ],
  6232. "responses": {
  6233. "200": {
  6234. "description": "Created message",
  6235. "content": {
  6236. "application/json": {
  6237. "schema": {
  6238. "type": "object",
  6239. "required": ["info", "parts"],
  6240. "properties": {
  6241. "info": {
  6242. "$ref": "#/components/schemas/AssistantMessage"
  6243. },
  6244. "parts": {
  6245. "type": "array",
  6246. "items": {
  6247. "$ref": "#/components/schemas/Part"
  6248. }
  6249. }
  6250. }
  6251. }
  6252. }
  6253. }
  6254. },
  6255. "400": {
  6256. "description": "BadRequest | InvalidRequestError",
  6257. "content": {
  6258. "application/json": {
  6259. "schema": {
  6260. "anyOf": [
  6261. {
  6262. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6263. },
  6264. {
  6265. "$ref": "#/components/schemas/InvalidRequestError"
  6266. }
  6267. ]
  6268. }
  6269. }
  6270. }
  6271. },
  6272. "404": {
  6273. "description": "NotFoundError",
  6274. "content": {
  6275. "application/json": {
  6276. "schema": {
  6277. "$ref": "#/components/schemas/NotFoundError"
  6278. }
  6279. }
  6280. }
  6281. }
  6282. },
  6283. "description": "Create and send a new message to a session, streaming the AI response.",
  6284. "summary": "Send message",
  6285. "requestBody": {
  6286. "content": {
  6287. "application/json": {
  6288. "schema": {
  6289. "type": "object",
  6290. "properties": {
  6291. "messageID": {
  6292. "type": "string",
  6293. "pattern": "^msg"
  6294. },
  6295. "model": {
  6296. "type": "object",
  6297. "properties": {
  6298. "providerID": {
  6299. "type": "string"
  6300. },
  6301. "modelID": {
  6302. "type": "string"
  6303. }
  6304. },
  6305. "required": ["providerID", "modelID"],
  6306. "additionalProperties": false
  6307. },
  6308. "agent": {
  6309. "type": "string"
  6310. },
  6311. "noReply": {
  6312. "type": "boolean"
  6313. },
  6314. "tools": {
  6315. "type": "object",
  6316. "additionalProperties": {
  6317. "type": "boolean"
  6318. }
  6319. },
  6320. "format": {
  6321. "$ref": "#/components/schemas/OutputFormat"
  6322. },
  6323. "system": {
  6324. "type": "string"
  6325. },
  6326. "variant": {
  6327. "type": "string"
  6328. },
  6329. "parts": {
  6330. "type": "array",
  6331. "items": {
  6332. "anyOf": [
  6333. {
  6334. "$ref": "#/components/schemas/TextPartInput"
  6335. },
  6336. {
  6337. "$ref": "#/components/schemas/FilePartInput"
  6338. },
  6339. {
  6340. "$ref": "#/components/schemas/AgentPartInput"
  6341. },
  6342. {
  6343. "$ref": "#/components/schemas/SubtaskPartInput"
  6344. }
  6345. ]
  6346. }
  6347. }
  6348. },
  6349. "required": ["parts"],
  6350. "additionalProperties": false
  6351. }
  6352. }
  6353. }
  6354. },
  6355. "x-codeSamples": [
  6356. {
  6357. "lang": "js",
  6358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6359. }
  6360. ]
  6361. }
  6362. },
  6363. "/session/{sessionID}/message/{messageID}": {
  6364. "get": {
  6365. "tags": ["session"],
  6366. "operationId": "session.message",
  6367. "parameters": [
  6368. {
  6369. "name": "sessionID",
  6370. "in": "path",
  6371. "schema": {
  6372. "type": "string",
  6373. "pattern": "^ses"
  6374. },
  6375. "required": true
  6376. },
  6377. {
  6378. "name": "messageID",
  6379. "in": "path",
  6380. "schema": {
  6381. "type": "string",
  6382. "pattern": "^msg"
  6383. },
  6384. "required": true
  6385. },
  6386. {
  6387. "name": "directory",
  6388. "in": "query",
  6389. "schema": {
  6390. "type": "string"
  6391. },
  6392. "required": false
  6393. },
  6394. {
  6395. "name": "workspace",
  6396. "in": "query",
  6397. "schema": {
  6398. "type": "string"
  6399. },
  6400. "required": false
  6401. }
  6402. ],
  6403. "responses": {
  6404. "200": {
  6405. "description": "Message",
  6406. "content": {
  6407. "application/json": {
  6408. "schema": {
  6409. "type": "object",
  6410. "properties": {
  6411. "info": {
  6412. "$ref": "#/components/schemas/Message"
  6413. },
  6414. "parts": {
  6415. "type": "array",
  6416. "items": {
  6417. "$ref": "#/components/schemas/Part"
  6418. }
  6419. }
  6420. },
  6421. "required": ["info", "parts"],
  6422. "additionalProperties": false,
  6423. "description": "Message"
  6424. }
  6425. }
  6426. }
  6427. },
  6428. "400": {
  6429. "description": "BadRequest | InvalidRequestError",
  6430. "content": {
  6431. "application/json": {
  6432. "schema": {
  6433. "anyOf": [
  6434. {
  6435. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6436. },
  6437. {
  6438. "$ref": "#/components/schemas/InvalidRequestError"
  6439. }
  6440. ]
  6441. }
  6442. }
  6443. }
  6444. },
  6445. "404": {
  6446. "description": "NotFoundError",
  6447. "content": {
  6448. "application/json": {
  6449. "schema": {
  6450. "$ref": "#/components/schemas/NotFoundError"
  6451. }
  6452. }
  6453. }
  6454. }
  6455. },
  6456. "description": "Retrieve a specific message from a session by its message ID.",
  6457. "summary": "Get message",
  6458. "x-codeSamples": [
  6459. {
  6460. "lang": "js",
  6461. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6462. }
  6463. ]
  6464. },
  6465. "delete": {
  6466. "tags": ["session"],
  6467. "operationId": "session.deleteMessage",
  6468. "parameters": [
  6469. {
  6470. "name": "sessionID",
  6471. "in": "path",
  6472. "schema": {
  6473. "type": "string",
  6474. "pattern": "^ses"
  6475. },
  6476. "required": true
  6477. },
  6478. {
  6479. "name": "messageID",
  6480. "in": "path",
  6481. "schema": {
  6482. "type": "string",
  6483. "pattern": "^msg"
  6484. },
  6485. "required": true
  6486. },
  6487. {
  6488. "name": "directory",
  6489. "in": "query",
  6490. "schema": {
  6491. "type": "string"
  6492. },
  6493. "required": false
  6494. },
  6495. {
  6496. "name": "workspace",
  6497. "in": "query",
  6498. "schema": {
  6499. "type": "string"
  6500. },
  6501. "required": false
  6502. }
  6503. ],
  6504. "responses": {
  6505. "200": {
  6506. "description": "Successfully deleted message",
  6507. "content": {
  6508. "application/json": {
  6509. "schema": {
  6510. "type": "boolean",
  6511. "description": "Successfully deleted message"
  6512. }
  6513. }
  6514. }
  6515. },
  6516. "400": {
  6517. "description": "BadRequest | InvalidRequestError",
  6518. "content": {
  6519. "application/json": {
  6520. "schema": {
  6521. "anyOf": [
  6522. {
  6523. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6524. },
  6525. {
  6526. "$ref": "#/components/schemas/InvalidRequestError"
  6527. }
  6528. ]
  6529. }
  6530. }
  6531. }
  6532. },
  6533. "404": {
  6534. "description": "NotFoundError",
  6535. "content": {
  6536. "application/json": {
  6537. "schema": {
  6538. "$ref": "#/components/schemas/NotFoundError"
  6539. }
  6540. }
  6541. }
  6542. },
  6543. "409": {
  6544. "description": "SessionBusyError",
  6545. "content": {
  6546. "application/json": {
  6547. "schema": {
  6548. "$ref": "#/components/schemas/SessionBusyError"
  6549. }
  6550. }
  6551. }
  6552. }
  6553. },
  6554. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6555. "summary": "Delete message",
  6556. "x-codeSamples": [
  6557. {
  6558. "lang": "js",
  6559. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6560. }
  6561. ]
  6562. }
  6563. },
  6564. "/session/{sessionID}/fork": {
  6565. "post": {
  6566. "tags": ["session"],
  6567. "operationId": "session.fork",
  6568. "parameters": [
  6569. {
  6570. "name": "sessionID",
  6571. "in": "path",
  6572. "schema": {
  6573. "type": "string",
  6574. "pattern": "^ses"
  6575. },
  6576. "required": true
  6577. },
  6578. {
  6579. "name": "directory",
  6580. "in": "query",
  6581. "schema": {
  6582. "type": "string"
  6583. },
  6584. "required": false
  6585. },
  6586. {
  6587. "name": "workspace",
  6588. "in": "query",
  6589. "schema": {
  6590. "type": "string"
  6591. },
  6592. "required": false
  6593. }
  6594. ],
  6595. "responses": {
  6596. "200": {
  6597. "description": "200",
  6598. "content": {
  6599. "application/json": {
  6600. "schema": {
  6601. "$ref": "#/components/schemas/Session"
  6602. }
  6603. }
  6604. }
  6605. },
  6606. "400": {
  6607. "description": "BadRequest | InvalidRequestError",
  6608. "content": {
  6609. "application/json": {
  6610. "schema": {
  6611. "anyOf": [
  6612. {
  6613. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6614. },
  6615. {
  6616. "$ref": "#/components/schemas/InvalidRequestError"
  6617. }
  6618. ]
  6619. }
  6620. }
  6621. }
  6622. },
  6623. "404": {
  6624. "description": "NotFoundError",
  6625. "content": {
  6626. "application/json": {
  6627. "schema": {
  6628. "$ref": "#/components/schemas/NotFoundError"
  6629. }
  6630. }
  6631. }
  6632. }
  6633. },
  6634. "description": "Create a new session by forking an existing session at a specific message point.",
  6635. "summary": "Fork session",
  6636. "requestBody": {
  6637. "content": {
  6638. "application/json": {
  6639. "schema": {
  6640. "type": "object",
  6641. "properties": {
  6642. "messageID": {
  6643. "type": "string",
  6644. "pattern": "^msg"
  6645. }
  6646. },
  6647. "additionalProperties": false
  6648. }
  6649. }
  6650. }
  6651. },
  6652. "x-codeSamples": [
  6653. {
  6654. "lang": "js",
  6655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6656. }
  6657. ]
  6658. }
  6659. },
  6660. "/session/{sessionID}/abort": {
  6661. "post": {
  6662. "tags": ["session"],
  6663. "operationId": "session.abort",
  6664. "parameters": [
  6665. {
  6666. "name": "sessionID",
  6667. "in": "path",
  6668. "schema": {
  6669. "type": "string",
  6670. "pattern": "^ses"
  6671. },
  6672. "required": true
  6673. },
  6674. {
  6675. "name": "directory",
  6676. "in": "query",
  6677. "schema": {
  6678. "type": "string"
  6679. },
  6680. "required": false
  6681. },
  6682. {
  6683. "name": "workspace",
  6684. "in": "query",
  6685. "schema": {
  6686. "type": "string"
  6687. },
  6688. "required": false
  6689. }
  6690. ],
  6691. "responses": {
  6692. "200": {
  6693. "description": "Aborted session",
  6694. "content": {
  6695. "application/json": {
  6696. "schema": {
  6697. "type": "boolean",
  6698. "description": "Aborted session"
  6699. }
  6700. }
  6701. }
  6702. },
  6703. "400": {
  6704. "description": "BadRequest | InvalidRequestError",
  6705. "content": {
  6706. "application/json": {
  6707. "schema": {
  6708. "anyOf": [
  6709. {
  6710. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6711. },
  6712. {
  6713. "$ref": "#/components/schemas/InvalidRequestError"
  6714. }
  6715. ]
  6716. }
  6717. }
  6718. }
  6719. }
  6720. },
  6721. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6722. "summary": "Abort session",
  6723. "x-codeSamples": [
  6724. {
  6725. "lang": "js",
  6726. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6727. }
  6728. ]
  6729. }
  6730. },
  6731. "/session/{sessionID}/init": {
  6732. "post": {
  6733. "tags": ["session"],
  6734. "operationId": "session.init",
  6735. "parameters": [
  6736. {
  6737. "name": "sessionID",
  6738. "in": "path",
  6739. "schema": {
  6740. "type": "string",
  6741. "pattern": "^ses"
  6742. },
  6743. "required": true
  6744. },
  6745. {
  6746. "name": "directory",
  6747. "in": "query",
  6748. "schema": {
  6749. "type": "string"
  6750. },
  6751. "required": false
  6752. },
  6753. {
  6754. "name": "workspace",
  6755. "in": "query",
  6756. "schema": {
  6757. "type": "string"
  6758. },
  6759. "required": false
  6760. }
  6761. ],
  6762. "responses": {
  6763. "200": {
  6764. "description": "200",
  6765. "content": {
  6766. "application/json": {
  6767. "schema": {
  6768. "type": "boolean",
  6769. "description": "200"
  6770. }
  6771. }
  6772. }
  6773. },
  6774. "400": {
  6775. "description": "BadRequest | InvalidRequestError",
  6776. "content": {
  6777. "application/json": {
  6778. "schema": {
  6779. "anyOf": [
  6780. {
  6781. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6782. },
  6783. {
  6784. "$ref": "#/components/schemas/InvalidRequestError"
  6785. }
  6786. ]
  6787. }
  6788. }
  6789. }
  6790. },
  6791. "404": {
  6792. "description": "NotFoundError",
  6793. "content": {
  6794. "application/json": {
  6795. "schema": {
  6796. "$ref": "#/components/schemas/NotFoundError"
  6797. }
  6798. }
  6799. }
  6800. }
  6801. },
  6802. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6803. "summary": "Initialize session",
  6804. "requestBody": {
  6805. "content": {
  6806. "application/json": {
  6807. "schema": {
  6808. "type": "object",
  6809. "properties": {
  6810. "modelID": {
  6811. "type": "string"
  6812. },
  6813. "providerID": {
  6814. "type": "string"
  6815. },
  6816. "messageID": {
  6817. "type": "string",
  6818. "pattern": "^msg"
  6819. }
  6820. },
  6821. "required": ["modelID", "providerID", "messageID"],
  6822. "additionalProperties": false
  6823. }
  6824. }
  6825. }
  6826. },
  6827. "x-codeSamples": [
  6828. {
  6829. "lang": "js",
  6830. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6831. }
  6832. ]
  6833. }
  6834. },
  6835. "/session/{sessionID}/share": {
  6836. "post": {
  6837. "tags": ["session"],
  6838. "operationId": "session.share",
  6839. "parameters": [
  6840. {
  6841. "name": "sessionID",
  6842. "in": "path",
  6843. "schema": {
  6844. "type": "string",
  6845. "pattern": "^ses"
  6846. },
  6847. "required": true
  6848. },
  6849. {
  6850. "name": "directory",
  6851. "in": "query",
  6852. "schema": {
  6853. "type": "string"
  6854. },
  6855. "required": false
  6856. },
  6857. {
  6858. "name": "workspace",
  6859. "in": "query",
  6860. "schema": {
  6861. "type": "string"
  6862. },
  6863. "required": false
  6864. }
  6865. ],
  6866. "responses": {
  6867. "200": {
  6868. "description": "Successfully shared session",
  6869. "content": {
  6870. "application/json": {
  6871. "schema": {
  6872. "$ref": "#/components/schemas/Session"
  6873. }
  6874. }
  6875. }
  6876. },
  6877. "400": {
  6878. "description": "Bad request",
  6879. "content": {
  6880. "application/json": {
  6881. "schema": {
  6882. "$ref": "#/components/schemas/BadRequestError"
  6883. }
  6884. }
  6885. }
  6886. },
  6887. "404": {
  6888. "description": "NotFoundError",
  6889. "content": {
  6890. "application/json": {
  6891. "schema": {
  6892. "$ref": "#/components/schemas/NotFoundError"
  6893. }
  6894. }
  6895. }
  6896. },
  6897. "500": {
  6898. "description": "InternalServerError",
  6899. "content": {
  6900. "application/json": {
  6901. "schema": {
  6902. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6903. }
  6904. }
  6905. }
  6906. }
  6907. },
  6908. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6909. "summary": "Share session",
  6910. "x-codeSamples": [
  6911. {
  6912. "lang": "js",
  6913. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6914. }
  6915. ]
  6916. },
  6917. "delete": {
  6918. "tags": ["session"],
  6919. "operationId": "session.unshare",
  6920. "parameters": [
  6921. {
  6922. "name": "sessionID",
  6923. "in": "path",
  6924. "schema": {
  6925. "type": "string",
  6926. "pattern": "^ses"
  6927. },
  6928. "required": true
  6929. },
  6930. {
  6931. "name": "directory",
  6932. "in": "query",
  6933. "schema": {
  6934. "type": "string"
  6935. },
  6936. "required": false
  6937. },
  6938. {
  6939. "name": "workspace",
  6940. "in": "query",
  6941. "schema": {
  6942. "type": "string"
  6943. },
  6944. "required": false
  6945. }
  6946. ],
  6947. "responses": {
  6948. "200": {
  6949. "description": "Successfully unshared session",
  6950. "content": {
  6951. "application/json": {
  6952. "schema": {
  6953. "$ref": "#/components/schemas/Session"
  6954. }
  6955. }
  6956. }
  6957. },
  6958. "400": {
  6959. "description": "Bad request",
  6960. "content": {
  6961. "application/json": {
  6962. "schema": {
  6963. "$ref": "#/components/schemas/BadRequestError"
  6964. }
  6965. }
  6966. }
  6967. },
  6968. "404": {
  6969. "description": "NotFoundError",
  6970. "content": {
  6971. "application/json": {
  6972. "schema": {
  6973. "$ref": "#/components/schemas/NotFoundError"
  6974. }
  6975. }
  6976. }
  6977. },
  6978. "500": {
  6979. "description": "InternalServerError",
  6980. "content": {
  6981. "application/json": {
  6982. "schema": {
  6983. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6984. }
  6985. }
  6986. }
  6987. }
  6988. },
  6989. "description": "Remove the shareable link for a session, making it private again.",
  6990. "summary": "Unshare session",
  6991. "x-codeSamples": [
  6992. {
  6993. "lang": "js",
  6994. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6995. }
  6996. ]
  6997. }
  6998. },
  6999. "/session/{sessionID}/summarize": {
  7000. "post": {
  7001. "tags": ["session"],
  7002. "operationId": "session.summarize",
  7003. "parameters": [
  7004. {
  7005. "name": "sessionID",
  7006. "in": "path",
  7007. "schema": {
  7008. "type": "string",
  7009. "pattern": "^ses"
  7010. },
  7011. "required": true
  7012. },
  7013. {
  7014. "name": "directory",
  7015. "in": "query",
  7016. "schema": {
  7017. "type": "string"
  7018. },
  7019. "required": false
  7020. },
  7021. {
  7022. "name": "workspace",
  7023. "in": "query",
  7024. "schema": {
  7025. "type": "string"
  7026. },
  7027. "required": false
  7028. }
  7029. ],
  7030. "responses": {
  7031. "200": {
  7032. "description": "Summarized session",
  7033. "content": {
  7034. "application/json": {
  7035. "schema": {
  7036. "type": "boolean",
  7037. "description": "Summarized session"
  7038. }
  7039. }
  7040. }
  7041. },
  7042. "400": {
  7043. "description": "BadRequest | InvalidRequestError",
  7044. "content": {
  7045. "application/json": {
  7046. "schema": {
  7047. "anyOf": [
  7048. {
  7049. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7050. },
  7051. {
  7052. "$ref": "#/components/schemas/InvalidRequestError"
  7053. }
  7054. ]
  7055. }
  7056. }
  7057. }
  7058. },
  7059. "404": {
  7060. "description": "NotFoundError",
  7061. "content": {
  7062. "application/json": {
  7063. "schema": {
  7064. "$ref": "#/components/schemas/NotFoundError"
  7065. }
  7066. }
  7067. }
  7068. }
  7069. },
  7070. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7071. "summary": "Summarize session",
  7072. "requestBody": {
  7073. "content": {
  7074. "application/json": {
  7075. "schema": {
  7076. "type": "object",
  7077. "properties": {
  7078. "providerID": {
  7079. "type": "string"
  7080. },
  7081. "modelID": {
  7082. "type": "string"
  7083. },
  7084. "auto": {
  7085. "type": "boolean"
  7086. }
  7087. },
  7088. "required": ["providerID", "modelID"],
  7089. "additionalProperties": false
  7090. }
  7091. }
  7092. }
  7093. },
  7094. "x-codeSamples": [
  7095. {
  7096. "lang": "js",
  7097. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7098. }
  7099. ]
  7100. }
  7101. },
  7102. "/session/{sessionID}/prompt_async": {
  7103. "post": {
  7104. "tags": ["session"],
  7105. "operationId": "session.prompt_async",
  7106. "parameters": [
  7107. {
  7108. "name": "sessionID",
  7109. "in": "path",
  7110. "schema": {
  7111. "type": "string",
  7112. "pattern": "^ses"
  7113. },
  7114. "required": true
  7115. },
  7116. {
  7117. "name": "directory",
  7118. "in": "query",
  7119. "schema": {
  7120. "type": "string"
  7121. },
  7122. "required": false
  7123. },
  7124. {
  7125. "name": "workspace",
  7126. "in": "query",
  7127. "schema": {
  7128. "type": "string"
  7129. },
  7130. "required": false
  7131. }
  7132. ],
  7133. "responses": {
  7134. "204": {
  7135. "description": "Prompt accepted"
  7136. },
  7137. "400": {
  7138. "description": "BadRequest | InvalidRequestError",
  7139. "content": {
  7140. "application/json": {
  7141. "schema": {
  7142. "anyOf": [
  7143. {
  7144. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7145. },
  7146. {
  7147. "$ref": "#/components/schemas/InvalidRequestError"
  7148. }
  7149. ]
  7150. }
  7151. }
  7152. }
  7153. },
  7154. "404": {
  7155. "description": "NotFoundError",
  7156. "content": {
  7157. "application/json": {
  7158. "schema": {
  7159. "$ref": "#/components/schemas/NotFoundError"
  7160. }
  7161. }
  7162. }
  7163. }
  7164. },
  7165. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7166. "summary": "Send async message",
  7167. "requestBody": {
  7168. "content": {
  7169. "application/json": {
  7170. "schema": {
  7171. "type": "object",
  7172. "properties": {
  7173. "messageID": {
  7174. "type": "string",
  7175. "pattern": "^msg"
  7176. },
  7177. "model": {
  7178. "type": "object",
  7179. "properties": {
  7180. "providerID": {
  7181. "type": "string"
  7182. },
  7183. "modelID": {
  7184. "type": "string"
  7185. }
  7186. },
  7187. "required": ["providerID", "modelID"],
  7188. "additionalProperties": false
  7189. },
  7190. "agent": {
  7191. "type": "string"
  7192. },
  7193. "noReply": {
  7194. "type": "boolean"
  7195. },
  7196. "tools": {
  7197. "type": "object",
  7198. "additionalProperties": {
  7199. "type": "boolean"
  7200. }
  7201. },
  7202. "format": {
  7203. "$ref": "#/components/schemas/OutputFormat"
  7204. },
  7205. "system": {
  7206. "type": "string"
  7207. },
  7208. "variant": {
  7209. "type": "string"
  7210. },
  7211. "parts": {
  7212. "type": "array",
  7213. "items": {
  7214. "anyOf": [
  7215. {
  7216. "$ref": "#/components/schemas/TextPartInput"
  7217. },
  7218. {
  7219. "$ref": "#/components/schemas/FilePartInput"
  7220. },
  7221. {
  7222. "$ref": "#/components/schemas/AgentPartInput"
  7223. },
  7224. {
  7225. "$ref": "#/components/schemas/SubtaskPartInput"
  7226. }
  7227. ]
  7228. }
  7229. }
  7230. },
  7231. "required": ["parts"],
  7232. "additionalProperties": false
  7233. }
  7234. }
  7235. }
  7236. },
  7237. "x-codeSamples": [
  7238. {
  7239. "lang": "js",
  7240. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7241. }
  7242. ]
  7243. }
  7244. },
  7245. "/session/{sessionID}/command": {
  7246. "post": {
  7247. "tags": ["session"],
  7248. "operationId": "session.command",
  7249. "parameters": [
  7250. {
  7251. "name": "sessionID",
  7252. "in": "path",
  7253. "schema": {
  7254. "type": "string",
  7255. "pattern": "^ses"
  7256. },
  7257. "required": true
  7258. },
  7259. {
  7260. "name": "directory",
  7261. "in": "query",
  7262. "schema": {
  7263. "type": "string"
  7264. },
  7265. "required": false
  7266. },
  7267. {
  7268. "name": "workspace",
  7269. "in": "query",
  7270. "schema": {
  7271. "type": "string"
  7272. },
  7273. "required": false
  7274. }
  7275. ],
  7276. "responses": {
  7277. "200": {
  7278. "description": "Created message",
  7279. "content": {
  7280. "application/json": {
  7281. "schema": {
  7282. "type": "object",
  7283. "required": ["info", "parts"],
  7284. "properties": {
  7285. "info": {
  7286. "$ref": "#/components/schemas/AssistantMessage"
  7287. },
  7288. "parts": {
  7289. "type": "array",
  7290. "items": {
  7291. "$ref": "#/components/schemas/Part"
  7292. }
  7293. }
  7294. }
  7295. }
  7296. }
  7297. }
  7298. },
  7299. "400": {
  7300. "description": "BadRequest | InvalidRequestError",
  7301. "content": {
  7302. "application/json": {
  7303. "schema": {
  7304. "anyOf": [
  7305. {
  7306. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7307. },
  7308. {
  7309. "$ref": "#/components/schemas/InvalidRequestError"
  7310. }
  7311. ]
  7312. }
  7313. }
  7314. }
  7315. },
  7316. "404": {
  7317. "description": "NotFoundError",
  7318. "content": {
  7319. "application/json": {
  7320. "schema": {
  7321. "$ref": "#/components/schemas/NotFoundError"
  7322. }
  7323. }
  7324. }
  7325. }
  7326. },
  7327. "description": "Send a new command to a session for execution by the AI assistant.",
  7328. "summary": "Send command",
  7329. "requestBody": {
  7330. "content": {
  7331. "application/json": {
  7332. "schema": {
  7333. "type": "object",
  7334. "properties": {
  7335. "messageID": {
  7336. "type": "string",
  7337. "pattern": "^msg"
  7338. },
  7339. "agent": {
  7340. "type": "string"
  7341. },
  7342. "model": {
  7343. "type": "string"
  7344. },
  7345. "arguments": {
  7346. "type": "string"
  7347. },
  7348. "command": {
  7349. "type": "string"
  7350. },
  7351. "variant": {
  7352. "type": "string"
  7353. },
  7354. "parts": {
  7355. "type": "array",
  7356. "items": {
  7357. "type": "object",
  7358. "properties": {
  7359. "id": {
  7360. "type": "string",
  7361. "pattern": "^prt"
  7362. },
  7363. "type": {
  7364. "type": "string",
  7365. "enum": ["file"]
  7366. },
  7367. "mime": {
  7368. "type": "string"
  7369. },
  7370. "filename": {
  7371. "type": "string"
  7372. },
  7373. "url": {
  7374. "type": "string"
  7375. },
  7376. "source": {
  7377. "$ref": "#/components/schemas/FilePartSource"
  7378. }
  7379. },
  7380. "required": ["type", "mime", "url"],
  7381. "additionalProperties": false
  7382. }
  7383. }
  7384. },
  7385. "required": ["arguments", "command"],
  7386. "additionalProperties": false
  7387. }
  7388. }
  7389. }
  7390. },
  7391. "x-codeSamples": [
  7392. {
  7393. "lang": "js",
  7394. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7395. }
  7396. ]
  7397. }
  7398. },
  7399. "/session/{sessionID}/shell": {
  7400. "post": {
  7401. "tags": ["session"],
  7402. "operationId": "session.shell",
  7403. "parameters": [
  7404. {
  7405. "name": "sessionID",
  7406. "in": "path",
  7407. "schema": {
  7408. "type": "string",
  7409. "pattern": "^ses"
  7410. },
  7411. "required": true
  7412. },
  7413. {
  7414. "name": "directory",
  7415. "in": "query",
  7416. "schema": {
  7417. "type": "string"
  7418. },
  7419. "required": false
  7420. },
  7421. {
  7422. "name": "workspace",
  7423. "in": "query",
  7424. "schema": {
  7425. "type": "string"
  7426. },
  7427. "required": false
  7428. }
  7429. ],
  7430. "responses": {
  7431. "200": {
  7432. "description": "Created message",
  7433. "content": {
  7434. "application/json": {
  7435. "schema": {
  7436. "type": "object",
  7437. "properties": {
  7438. "info": {
  7439. "$ref": "#/components/schemas/Message"
  7440. },
  7441. "parts": {
  7442. "type": "array",
  7443. "items": {
  7444. "$ref": "#/components/schemas/Part"
  7445. }
  7446. }
  7447. },
  7448. "required": ["info", "parts"],
  7449. "additionalProperties": false,
  7450. "description": "Created message"
  7451. }
  7452. }
  7453. }
  7454. },
  7455. "400": {
  7456. "description": "BadRequest | InvalidRequestError",
  7457. "content": {
  7458. "application/json": {
  7459. "schema": {
  7460. "anyOf": [
  7461. {
  7462. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7463. },
  7464. {
  7465. "$ref": "#/components/schemas/InvalidRequestError"
  7466. }
  7467. ]
  7468. }
  7469. }
  7470. }
  7471. },
  7472. "404": {
  7473. "description": "NotFoundError",
  7474. "content": {
  7475. "application/json": {
  7476. "schema": {
  7477. "$ref": "#/components/schemas/NotFoundError"
  7478. }
  7479. }
  7480. }
  7481. },
  7482. "409": {
  7483. "description": "SessionBusyError",
  7484. "content": {
  7485. "application/json": {
  7486. "schema": {
  7487. "$ref": "#/components/schemas/SessionBusyError"
  7488. }
  7489. }
  7490. }
  7491. }
  7492. },
  7493. "description": "Execute a shell command within the session context and return the AI's response.",
  7494. "summary": "Run shell command",
  7495. "requestBody": {
  7496. "content": {
  7497. "application/json": {
  7498. "schema": {
  7499. "type": "object",
  7500. "properties": {
  7501. "messageID": {
  7502. "type": "string",
  7503. "pattern": "^msg"
  7504. },
  7505. "agent": {
  7506. "type": "string"
  7507. },
  7508. "model": {
  7509. "type": "object",
  7510. "properties": {
  7511. "providerID": {
  7512. "type": "string"
  7513. },
  7514. "modelID": {
  7515. "type": "string"
  7516. }
  7517. },
  7518. "required": ["providerID", "modelID"],
  7519. "additionalProperties": false
  7520. },
  7521. "command": {
  7522. "type": "string"
  7523. }
  7524. },
  7525. "required": ["agent", "command"],
  7526. "additionalProperties": false
  7527. }
  7528. }
  7529. }
  7530. },
  7531. "x-codeSamples": [
  7532. {
  7533. "lang": "js",
  7534. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7535. }
  7536. ]
  7537. }
  7538. },
  7539. "/session/{sessionID}/revert": {
  7540. "post": {
  7541. "tags": ["session"],
  7542. "operationId": "session.revert",
  7543. "parameters": [
  7544. {
  7545. "name": "sessionID",
  7546. "in": "path",
  7547. "schema": {
  7548. "type": "string",
  7549. "pattern": "^ses"
  7550. },
  7551. "required": true
  7552. },
  7553. {
  7554. "name": "directory",
  7555. "in": "query",
  7556. "schema": {
  7557. "type": "string"
  7558. },
  7559. "required": false
  7560. },
  7561. {
  7562. "name": "workspace",
  7563. "in": "query",
  7564. "schema": {
  7565. "type": "string"
  7566. },
  7567. "required": false
  7568. }
  7569. ],
  7570. "responses": {
  7571. "200": {
  7572. "description": "Updated session",
  7573. "content": {
  7574. "application/json": {
  7575. "schema": {
  7576. "$ref": "#/components/schemas/Session"
  7577. }
  7578. }
  7579. }
  7580. },
  7581. "400": {
  7582. "description": "BadRequest | InvalidRequestError",
  7583. "content": {
  7584. "application/json": {
  7585. "schema": {
  7586. "anyOf": [
  7587. {
  7588. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7589. },
  7590. {
  7591. "$ref": "#/components/schemas/InvalidRequestError"
  7592. }
  7593. ]
  7594. }
  7595. }
  7596. }
  7597. },
  7598. "404": {
  7599. "description": "NotFoundError",
  7600. "content": {
  7601. "application/json": {
  7602. "schema": {
  7603. "$ref": "#/components/schemas/NotFoundError"
  7604. }
  7605. }
  7606. }
  7607. },
  7608. "409": {
  7609. "description": "SessionBusyError",
  7610. "content": {
  7611. "application/json": {
  7612. "schema": {
  7613. "$ref": "#/components/schemas/SessionBusyError"
  7614. }
  7615. }
  7616. }
  7617. }
  7618. },
  7619. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7620. "summary": "Revert message",
  7621. "requestBody": {
  7622. "content": {
  7623. "application/json": {
  7624. "schema": {
  7625. "type": "object",
  7626. "properties": {
  7627. "messageID": {
  7628. "type": "string",
  7629. "pattern": "^msg"
  7630. },
  7631. "partID": {
  7632. "type": "string",
  7633. "pattern": "^prt"
  7634. }
  7635. },
  7636. "required": ["messageID"],
  7637. "additionalProperties": false
  7638. }
  7639. }
  7640. }
  7641. },
  7642. "x-codeSamples": [
  7643. {
  7644. "lang": "js",
  7645. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7646. }
  7647. ]
  7648. }
  7649. },
  7650. "/session/{sessionID}/unrevert": {
  7651. "post": {
  7652. "tags": ["session"],
  7653. "operationId": "session.unrevert",
  7654. "parameters": [
  7655. {
  7656. "name": "sessionID",
  7657. "in": "path",
  7658. "schema": {
  7659. "type": "string",
  7660. "pattern": "^ses"
  7661. },
  7662. "required": true
  7663. },
  7664. {
  7665. "name": "directory",
  7666. "in": "query",
  7667. "schema": {
  7668. "type": "string"
  7669. },
  7670. "required": false
  7671. },
  7672. {
  7673. "name": "workspace",
  7674. "in": "query",
  7675. "schema": {
  7676. "type": "string"
  7677. },
  7678. "required": false
  7679. }
  7680. ],
  7681. "responses": {
  7682. "200": {
  7683. "description": "Updated session",
  7684. "content": {
  7685. "application/json": {
  7686. "schema": {
  7687. "$ref": "#/components/schemas/Session"
  7688. }
  7689. }
  7690. }
  7691. },
  7692. "400": {
  7693. "description": "BadRequest | InvalidRequestError",
  7694. "content": {
  7695. "application/json": {
  7696. "schema": {
  7697. "anyOf": [
  7698. {
  7699. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7700. },
  7701. {
  7702. "$ref": "#/components/schemas/InvalidRequestError"
  7703. }
  7704. ]
  7705. }
  7706. }
  7707. }
  7708. },
  7709. "404": {
  7710. "description": "NotFoundError",
  7711. "content": {
  7712. "application/json": {
  7713. "schema": {
  7714. "$ref": "#/components/schemas/NotFoundError"
  7715. }
  7716. }
  7717. }
  7718. },
  7719. "409": {
  7720. "description": "SessionBusyError",
  7721. "content": {
  7722. "application/json": {
  7723. "schema": {
  7724. "$ref": "#/components/schemas/SessionBusyError"
  7725. }
  7726. }
  7727. }
  7728. }
  7729. },
  7730. "description": "Restore all previously reverted messages in a session.",
  7731. "summary": "Restore reverted messages",
  7732. "x-codeSamples": [
  7733. {
  7734. "lang": "js",
  7735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7736. }
  7737. ]
  7738. }
  7739. },
  7740. "/session/{sessionID}/permissions/{permissionID}": {
  7741. "post": {
  7742. "tags": ["session"],
  7743. "operationId": "permission.respond",
  7744. "parameters": [
  7745. {
  7746. "name": "sessionID",
  7747. "in": "path",
  7748. "schema": {
  7749. "type": "string",
  7750. "pattern": "^ses"
  7751. },
  7752. "required": true
  7753. },
  7754. {
  7755. "name": "permissionID",
  7756. "in": "path",
  7757. "schema": {
  7758. "type": "string",
  7759. "pattern": "^per"
  7760. },
  7761. "required": true
  7762. },
  7763. {
  7764. "name": "directory",
  7765. "in": "query",
  7766. "schema": {
  7767. "type": "string"
  7768. },
  7769. "required": false
  7770. },
  7771. {
  7772. "name": "workspace",
  7773. "in": "query",
  7774. "schema": {
  7775. "type": "string"
  7776. },
  7777. "required": false
  7778. }
  7779. ],
  7780. "responses": {
  7781. "200": {
  7782. "description": "Permission processed successfully",
  7783. "content": {
  7784. "application/json": {
  7785. "schema": {
  7786. "type": "boolean",
  7787. "description": "Permission processed successfully"
  7788. }
  7789. }
  7790. }
  7791. },
  7792. "400": {
  7793. "description": "BadRequest | InvalidRequestError",
  7794. "content": {
  7795. "application/json": {
  7796. "schema": {
  7797. "anyOf": [
  7798. {
  7799. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7800. },
  7801. {
  7802. "$ref": "#/components/schemas/InvalidRequestError"
  7803. }
  7804. ]
  7805. }
  7806. }
  7807. }
  7808. },
  7809. "404": {
  7810. "description": "NotFoundError | PermissionNotFoundError",
  7811. "content": {
  7812. "application/json": {
  7813. "schema": {
  7814. "anyOf": [
  7815. {
  7816. "$ref": "#/components/schemas/NotFoundError"
  7817. },
  7818. {
  7819. "$ref": "#/components/schemas/PermissionNotFoundError"
  7820. }
  7821. ]
  7822. }
  7823. }
  7824. }
  7825. }
  7826. },
  7827. "description": "Approve or deny a permission request from the AI assistant.",
  7828. "summary": "Respond to permission",
  7829. "deprecated": true,
  7830. "requestBody": {
  7831. "content": {
  7832. "application/json": {
  7833. "schema": {
  7834. "type": "object",
  7835. "properties": {
  7836. "response": {
  7837. "type": "string",
  7838. "enum": ["once", "always", "reject"]
  7839. }
  7840. },
  7841. "required": ["response"],
  7842. "additionalProperties": false
  7843. }
  7844. }
  7845. }
  7846. },
  7847. "x-codeSamples": [
  7848. {
  7849. "lang": "js",
  7850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7851. }
  7852. ]
  7853. }
  7854. },
  7855. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7856. "delete": {
  7857. "tags": ["session"],
  7858. "operationId": "part.delete",
  7859. "parameters": [
  7860. {
  7861. "name": "sessionID",
  7862. "in": "path",
  7863. "schema": {
  7864. "type": "string",
  7865. "pattern": "^ses"
  7866. },
  7867. "required": true
  7868. },
  7869. {
  7870. "name": "messageID",
  7871. "in": "path",
  7872. "schema": {
  7873. "type": "string",
  7874. "pattern": "^msg"
  7875. },
  7876. "required": true
  7877. },
  7878. {
  7879. "name": "partID",
  7880. "in": "path",
  7881. "schema": {
  7882. "type": "string",
  7883. "pattern": "^prt"
  7884. },
  7885. "required": true
  7886. },
  7887. {
  7888. "name": "directory",
  7889. "in": "query",
  7890. "schema": {
  7891. "type": "string"
  7892. },
  7893. "required": false
  7894. },
  7895. {
  7896. "name": "workspace",
  7897. "in": "query",
  7898. "schema": {
  7899. "type": "string"
  7900. },
  7901. "required": false
  7902. }
  7903. ],
  7904. "responses": {
  7905. "200": {
  7906. "description": "Successfully deleted part",
  7907. "content": {
  7908. "application/json": {
  7909. "schema": {
  7910. "type": "boolean",
  7911. "description": "Successfully deleted part"
  7912. }
  7913. }
  7914. }
  7915. },
  7916. "400": {
  7917. "description": "BadRequest | InvalidRequestError",
  7918. "content": {
  7919. "application/json": {
  7920. "schema": {
  7921. "anyOf": [
  7922. {
  7923. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7924. },
  7925. {
  7926. "$ref": "#/components/schemas/InvalidRequestError"
  7927. }
  7928. ]
  7929. }
  7930. }
  7931. }
  7932. },
  7933. "404": {
  7934. "description": "NotFoundError",
  7935. "content": {
  7936. "application/json": {
  7937. "schema": {
  7938. "$ref": "#/components/schemas/NotFoundError"
  7939. }
  7940. }
  7941. }
  7942. }
  7943. },
  7944. "description": "Delete a part from a message.",
  7945. "x-codeSamples": [
  7946. {
  7947. "lang": "js",
  7948. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7949. }
  7950. ]
  7951. },
  7952. "patch": {
  7953. "tags": ["session"],
  7954. "operationId": "part.update",
  7955. "parameters": [
  7956. {
  7957. "name": "sessionID",
  7958. "in": "path",
  7959. "schema": {
  7960. "type": "string",
  7961. "pattern": "^ses"
  7962. },
  7963. "required": true
  7964. },
  7965. {
  7966. "name": "messageID",
  7967. "in": "path",
  7968. "schema": {
  7969. "type": "string",
  7970. "pattern": "^msg"
  7971. },
  7972. "required": true
  7973. },
  7974. {
  7975. "name": "partID",
  7976. "in": "path",
  7977. "schema": {
  7978. "type": "string",
  7979. "pattern": "^prt"
  7980. },
  7981. "required": true
  7982. },
  7983. {
  7984. "name": "directory",
  7985. "in": "query",
  7986. "schema": {
  7987. "type": "string"
  7988. },
  7989. "required": false
  7990. },
  7991. {
  7992. "name": "workspace",
  7993. "in": "query",
  7994. "schema": {
  7995. "type": "string"
  7996. },
  7997. "required": false
  7998. }
  7999. ],
  8000. "responses": {
  8001. "200": {
  8002. "description": "Successfully updated part",
  8003. "content": {
  8004. "application/json": {
  8005. "schema": {
  8006. "$ref": "#/components/schemas/Part"
  8007. }
  8008. }
  8009. }
  8010. },
  8011. "400": {
  8012. "description": "BadRequest | InvalidRequestError",
  8013. "content": {
  8014. "application/json": {
  8015. "schema": {
  8016. "anyOf": [
  8017. {
  8018. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8019. },
  8020. {
  8021. "$ref": "#/components/schemas/InvalidRequestError"
  8022. }
  8023. ]
  8024. }
  8025. }
  8026. }
  8027. },
  8028. "404": {
  8029. "description": "NotFoundError",
  8030. "content": {
  8031. "application/json": {
  8032. "schema": {
  8033. "$ref": "#/components/schemas/NotFoundError"
  8034. }
  8035. }
  8036. }
  8037. }
  8038. },
  8039. "description": "Update a part in a message.",
  8040. "requestBody": {
  8041. "content": {
  8042. "application/json": {
  8043. "schema": {
  8044. "$ref": "#/components/schemas/Part"
  8045. }
  8046. }
  8047. }
  8048. },
  8049. "x-codeSamples": [
  8050. {
  8051. "lang": "js",
  8052. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8053. }
  8054. ]
  8055. }
  8056. },
  8057. "/sync/start": {
  8058. "post": {
  8059. "tags": ["sync"],
  8060. "operationId": "sync.start",
  8061. "parameters": [
  8062. {
  8063. "name": "directory",
  8064. "in": "query",
  8065. "schema": {
  8066. "type": "string"
  8067. },
  8068. "required": false
  8069. },
  8070. {
  8071. "name": "workspace",
  8072. "in": "query",
  8073. "schema": {
  8074. "type": "string"
  8075. },
  8076. "required": false
  8077. }
  8078. ],
  8079. "responses": {
  8080. "200": {
  8081. "description": "Workspace sync started",
  8082. "content": {
  8083. "application/json": {
  8084. "schema": {
  8085. "type": "boolean",
  8086. "description": "Workspace sync started"
  8087. }
  8088. }
  8089. }
  8090. },
  8091. "400": {
  8092. "description": "Bad request",
  8093. "content": {
  8094. "application/json": {
  8095. "schema": {
  8096. "$ref": "#/components/schemas/BadRequestError"
  8097. }
  8098. }
  8099. }
  8100. }
  8101. },
  8102. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8103. "summary": "Start workspace sync",
  8104. "x-codeSamples": [
  8105. {
  8106. "lang": "js",
  8107. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8108. }
  8109. ]
  8110. }
  8111. },
  8112. "/sync/replay": {
  8113. "post": {
  8114. "tags": ["sync"],
  8115. "operationId": "sync.replay",
  8116. "parameters": [
  8117. {
  8118. "name": "directory",
  8119. "in": "query",
  8120. "schema": {
  8121. "type": "string"
  8122. },
  8123. "required": false
  8124. },
  8125. {
  8126. "name": "workspace",
  8127. "in": "query",
  8128. "schema": {
  8129. "type": "string"
  8130. },
  8131. "required": false
  8132. }
  8133. ],
  8134. "responses": {
  8135. "200": {
  8136. "description": "Replayed sync events",
  8137. "content": {
  8138. "application/json": {
  8139. "schema": {
  8140. "type": "object",
  8141. "properties": {
  8142. "sessionID": {
  8143. "type": "string"
  8144. }
  8145. },
  8146. "required": ["sessionID"],
  8147. "additionalProperties": false,
  8148. "description": "Replayed sync events"
  8149. }
  8150. }
  8151. }
  8152. },
  8153. "400": {
  8154. "description": "BadRequest | InvalidRequestError",
  8155. "content": {
  8156. "application/json": {
  8157. "schema": {
  8158. "anyOf": [
  8159. {
  8160. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8161. },
  8162. {
  8163. "$ref": "#/components/schemas/InvalidRequestError"
  8164. }
  8165. ]
  8166. }
  8167. }
  8168. }
  8169. }
  8170. },
  8171. "description": "Validate and replay a complete sync event history.",
  8172. "summary": "Replay sync events",
  8173. "requestBody": {
  8174. "content": {
  8175. "application/json": {
  8176. "schema": {
  8177. "type": "object",
  8178. "properties": {
  8179. "directory": {
  8180. "type": "string"
  8181. },
  8182. "events": {
  8183. "type": "array",
  8184. "minItems": 1,
  8185. "items": {
  8186. "type": "object",
  8187. "properties": {
  8188. "id": {
  8189. "type": "string",
  8190. "pattern": "^evt_"
  8191. },
  8192. "aggregateID": {
  8193. "type": "string"
  8194. },
  8195. "seq": {
  8196. "type": "integer",
  8197. "minimum": 0
  8198. },
  8199. "type": {
  8200. "type": "string"
  8201. },
  8202. "data": {
  8203. "type": "object"
  8204. }
  8205. },
  8206. "required": ["id", "aggregateID", "seq", "type", "data"],
  8207. "additionalProperties": false
  8208. }
  8209. }
  8210. },
  8211. "required": ["directory", "events"],
  8212. "additionalProperties": false
  8213. }
  8214. }
  8215. }
  8216. },
  8217. "x-codeSamples": [
  8218. {
  8219. "lang": "js",
  8220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8221. }
  8222. ]
  8223. }
  8224. },
  8225. "/sync/steal": {
  8226. "post": {
  8227. "tags": ["sync"],
  8228. "operationId": "sync.steal",
  8229. "parameters": [
  8230. {
  8231. "name": "directory",
  8232. "in": "query",
  8233. "schema": {
  8234. "type": "string"
  8235. },
  8236. "required": false
  8237. },
  8238. {
  8239. "name": "workspace",
  8240. "in": "query",
  8241. "schema": {
  8242. "type": "string"
  8243. },
  8244. "required": false
  8245. }
  8246. ],
  8247. "responses": {
  8248. "200": {
  8249. "description": "Session stolen into workspace",
  8250. "content": {
  8251. "application/json": {
  8252. "schema": {
  8253. "type": "object",
  8254. "properties": {
  8255. "sessionID": {
  8256. "type": "string",
  8257. "pattern": "^ses"
  8258. }
  8259. },
  8260. "required": ["sessionID"],
  8261. "additionalProperties": false,
  8262. "description": "Session stolen into workspace"
  8263. }
  8264. }
  8265. }
  8266. },
  8267. "400": {
  8268. "description": "BadRequest | InvalidRequestError",
  8269. "content": {
  8270. "application/json": {
  8271. "schema": {
  8272. "anyOf": [
  8273. {
  8274. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8275. },
  8276. {
  8277. "$ref": "#/components/schemas/InvalidRequestError"
  8278. }
  8279. ]
  8280. }
  8281. }
  8282. }
  8283. }
  8284. },
  8285. "description": "Update a session to belong to the current workspace through the sync event system.",
  8286. "summary": "Steal session into workspace",
  8287. "requestBody": {
  8288. "content": {
  8289. "application/json": {
  8290. "schema": {
  8291. "type": "object",
  8292. "properties": {
  8293. "sessionID": {
  8294. "type": "string",
  8295. "pattern": "^ses"
  8296. }
  8297. },
  8298. "required": ["sessionID"],
  8299. "additionalProperties": false
  8300. }
  8301. }
  8302. }
  8303. },
  8304. "x-codeSamples": [
  8305. {
  8306. "lang": "js",
  8307. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8308. }
  8309. ]
  8310. }
  8311. },
  8312. "/sync/history": {
  8313. "post": {
  8314. "tags": ["sync"],
  8315. "operationId": "sync.history.list",
  8316. "parameters": [
  8317. {
  8318. "name": "directory",
  8319. "in": "query",
  8320. "schema": {
  8321. "type": "string"
  8322. },
  8323. "required": false
  8324. },
  8325. {
  8326. "name": "workspace",
  8327. "in": "query",
  8328. "schema": {
  8329. "type": "string"
  8330. },
  8331. "required": false
  8332. }
  8333. ],
  8334. "responses": {
  8335. "200": {
  8336. "description": "Sync events",
  8337. "content": {
  8338. "application/json": {
  8339. "schema": {
  8340. "type": "array",
  8341. "items": {
  8342. "type": "object",
  8343. "properties": {
  8344. "id": {
  8345. "type": "string",
  8346. "pattern": "^evt_"
  8347. },
  8348. "aggregate_id": {
  8349. "type": "string"
  8350. },
  8351. "seq": {
  8352. "type": "integer",
  8353. "minimum": 0
  8354. },
  8355. "type": {
  8356. "type": "string"
  8357. },
  8358. "data": {
  8359. "type": "object"
  8360. }
  8361. },
  8362. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8363. "additionalProperties": false
  8364. },
  8365. "description": "Sync events"
  8366. }
  8367. }
  8368. }
  8369. },
  8370. "400": {
  8371. "description": "BadRequest | InvalidRequestError",
  8372. "content": {
  8373. "application/json": {
  8374. "schema": {
  8375. "anyOf": [
  8376. {
  8377. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8378. },
  8379. {
  8380. "$ref": "#/components/schemas/InvalidRequestError"
  8381. }
  8382. ]
  8383. }
  8384. }
  8385. }
  8386. }
  8387. },
  8388. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  8389. "summary": "List sync events",
  8390. "requestBody": {
  8391. "content": {
  8392. "application/json": {
  8393. "schema": {
  8394. "type": "object",
  8395. "additionalProperties": {
  8396. "type": "integer",
  8397. "minimum": 0
  8398. }
  8399. }
  8400. }
  8401. }
  8402. },
  8403. "x-codeSamples": [
  8404. {
  8405. "lang": "js",
  8406. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8407. }
  8408. ]
  8409. }
  8410. },
  8411. "/tui/append-prompt": {
  8412. "post": {
  8413. "tags": ["tui"],
  8414. "operationId": "tui.appendPrompt",
  8415. "parameters": [
  8416. {
  8417. "name": "directory",
  8418. "in": "query",
  8419. "schema": {
  8420. "type": "string"
  8421. },
  8422. "required": false
  8423. },
  8424. {
  8425. "name": "workspace",
  8426. "in": "query",
  8427. "schema": {
  8428. "type": "string"
  8429. },
  8430. "required": false
  8431. }
  8432. ],
  8433. "responses": {
  8434. "200": {
  8435. "description": "Prompt processed successfully",
  8436. "content": {
  8437. "application/json": {
  8438. "schema": {
  8439. "type": "boolean",
  8440. "description": "Prompt processed successfully"
  8441. }
  8442. }
  8443. }
  8444. },
  8445. "400": {
  8446. "description": "BadRequest | InvalidRequestError",
  8447. "content": {
  8448. "application/json": {
  8449. "schema": {
  8450. "anyOf": [
  8451. {
  8452. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8453. },
  8454. {
  8455. "$ref": "#/components/schemas/InvalidRequestError"
  8456. }
  8457. ]
  8458. }
  8459. }
  8460. }
  8461. }
  8462. },
  8463. "description": "Append prompt to the TUI.",
  8464. "summary": "Append TUI prompt",
  8465. "requestBody": {
  8466. "content": {
  8467. "application/json": {
  8468. "schema": {
  8469. "type": "object",
  8470. "properties": {
  8471. "text": {
  8472. "type": "string"
  8473. }
  8474. },
  8475. "required": ["text"],
  8476. "additionalProperties": false
  8477. }
  8478. }
  8479. }
  8480. },
  8481. "x-codeSamples": [
  8482. {
  8483. "lang": "js",
  8484. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8485. }
  8486. ]
  8487. }
  8488. },
  8489. "/tui/open-help": {
  8490. "post": {
  8491. "tags": ["tui"],
  8492. "operationId": "tui.openHelp",
  8493. "parameters": [
  8494. {
  8495. "name": "directory",
  8496. "in": "query",
  8497. "schema": {
  8498. "type": "string"
  8499. },
  8500. "required": false
  8501. },
  8502. {
  8503. "name": "workspace",
  8504. "in": "query",
  8505. "schema": {
  8506. "type": "string"
  8507. },
  8508. "required": false
  8509. }
  8510. ],
  8511. "responses": {
  8512. "200": {
  8513. "description": "Help dialog opened successfully",
  8514. "content": {
  8515. "application/json": {
  8516. "schema": {
  8517. "type": "boolean",
  8518. "description": "Help dialog opened successfully"
  8519. }
  8520. }
  8521. }
  8522. },
  8523. "400": {
  8524. "description": "Bad request",
  8525. "content": {
  8526. "application/json": {
  8527. "schema": {
  8528. "$ref": "#/components/schemas/BadRequestError"
  8529. }
  8530. }
  8531. }
  8532. }
  8533. },
  8534. "description": "Open the help dialog in the TUI to display user assistance information.",
  8535. "summary": "Open help dialog",
  8536. "x-codeSamples": [
  8537. {
  8538. "lang": "js",
  8539. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8540. }
  8541. ]
  8542. }
  8543. },
  8544. "/tui/open-sessions": {
  8545. "post": {
  8546. "tags": ["tui"],
  8547. "operationId": "tui.openSessions",
  8548. "parameters": [
  8549. {
  8550. "name": "directory",
  8551. "in": "query",
  8552. "schema": {
  8553. "type": "string"
  8554. },
  8555. "required": false
  8556. },
  8557. {
  8558. "name": "workspace",
  8559. "in": "query",
  8560. "schema": {
  8561. "type": "string"
  8562. },
  8563. "required": false
  8564. }
  8565. ],
  8566. "responses": {
  8567. "200": {
  8568. "description": "Session dialog opened successfully",
  8569. "content": {
  8570. "application/json": {
  8571. "schema": {
  8572. "type": "boolean",
  8573. "description": "Session dialog opened successfully"
  8574. }
  8575. }
  8576. }
  8577. },
  8578. "400": {
  8579. "description": "Bad request",
  8580. "content": {
  8581. "application/json": {
  8582. "schema": {
  8583. "$ref": "#/components/schemas/BadRequestError"
  8584. }
  8585. }
  8586. }
  8587. }
  8588. },
  8589. "description": "Open the session dialog.",
  8590. "summary": "Open sessions dialog",
  8591. "x-codeSamples": [
  8592. {
  8593. "lang": "js",
  8594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8595. }
  8596. ]
  8597. }
  8598. },
  8599. "/tui/open-themes": {
  8600. "post": {
  8601. "tags": ["tui"],
  8602. "operationId": "tui.openThemes",
  8603. "parameters": [
  8604. {
  8605. "name": "directory",
  8606. "in": "query",
  8607. "schema": {
  8608. "type": "string"
  8609. },
  8610. "required": false
  8611. },
  8612. {
  8613. "name": "workspace",
  8614. "in": "query",
  8615. "schema": {
  8616. "type": "string"
  8617. },
  8618. "required": false
  8619. }
  8620. ],
  8621. "responses": {
  8622. "200": {
  8623. "description": "Theme dialog opened successfully",
  8624. "content": {
  8625. "application/json": {
  8626. "schema": {
  8627. "type": "boolean",
  8628. "description": "Theme dialog opened successfully"
  8629. }
  8630. }
  8631. }
  8632. },
  8633. "400": {
  8634. "description": "Bad request",
  8635. "content": {
  8636. "application/json": {
  8637. "schema": {
  8638. "$ref": "#/components/schemas/BadRequestError"
  8639. }
  8640. }
  8641. }
  8642. }
  8643. },
  8644. "description": "Open the theme dialog.",
  8645. "summary": "Open themes dialog",
  8646. "x-codeSamples": [
  8647. {
  8648. "lang": "js",
  8649. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8650. }
  8651. ]
  8652. }
  8653. },
  8654. "/tui/open-models": {
  8655. "post": {
  8656. "tags": ["tui"],
  8657. "operationId": "tui.openModels",
  8658. "parameters": [
  8659. {
  8660. "name": "directory",
  8661. "in": "query",
  8662. "schema": {
  8663. "type": "string"
  8664. },
  8665. "required": false
  8666. },
  8667. {
  8668. "name": "workspace",
  8669. "in": "query",
  8670. "schema": {
  8671. "type": "string"
  8672. },
  8673. "required": false
  8674. }
  8675. ],
  8676. "responses": {
  8677. "200": {
  8678. "description": "Model dialog opened successfully",
  8679. "content": {
  8680. "application/json": {
  8681. "schema": {
  8682. "type": "boolean",
  8683. "description": "Model dialog opened successfully"
  8684. }
  8685. }
  8686. }
  8687. },
  8688. "400": {
  8689. "description": "Bad request",
  8690. "content": {
  8691. "application/json": {
  8692. "schema": {
  8693. "$ref": "#/components/schemas/BadRequestError"
  8694. }
  8695. }
  8696. }
  8697. }
  8698. },
  8699. "description": "Open the model dialog.",
  8700. "summary": "Open models dialog",
  8701. "x-codeSamples": [
  8702. {
  8703. "lang": "js",
  8704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8705. }
  8706. ]
  8707. }
  8708. },
  8709. "/tui/submit-prompt": {
  8710. "post": {
  8711. "tags": ["tui"],
  8712. "operationId": "tui.submitPrompt",
  8713. "parameters": [
  8714. {
  8715. "name": "directory",
  8716. "in": "query",
  8717. "schema": {
  8718. "type": "string"
  8719. },
  8720. "required": false
  8721. },
  8722. {
  8723. "name": "workspace",
  8724. "in": "query",
  8725. "schema": {
  8726. "type": "string"
  8727. },
  8728. "required": false
  8729. }
  8730. ],
  8731. "responses": {
  8732. "200": {
  8733. "description": "Prompt submitted successfully",
  8734. "content": {
  8735. "application/json": {
  8736. "schema": {
  8737. "type": "boolean",
  8738. "description": "Prompt submitted successfully"
  8739. }
  8740. }
  8741. }
  8742. },
  8743. "400": {
  8744. "description": "Bad request",
  8745. "content": {
  8746. "application/json": {
  8747. "schema": {
  8748. "$ref": "#/components/schemas/BadRequestError"
  8749. }
  8750. }
  8751. }
  8752. }
  8753. },
  8754. "description": "Submit the prompt.",
  8755. "summary": "Submit TUI prompt",
  8756. "x-codeSamples": [
  8757. {
  8758. "lang": "js",
  8759. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8760. }
  8761. ]
  8762. }
  8763. },
  8764. "/tui/clear-prompt": {
  8765. "post": {
  8766. "tags": ["tui"],
  8767. "operationId": "tui.clearPrompt",
  8768. "parameters": [
  8769. {
  8770. "name": "directory",
  8771. "in": "query",
  8772. "schema": {
  8773. "type": "string"
  8774. },
  8775. "required": false
  8776. },
  8777. {
  8778. "name": "workspace",
  8779. "in": "query",
  8780. "schema": {
  8781. "type": "string"
  8782. },
  8783. "required": false
  8784. }
  8785. ],
  8786. "responses": {
  8787. "200": {
  8788. "description": "Prompt cleared successfully",
  8789. "content": {
  8790. "application/json": {
  8791. "schema": {
  8792. "type": "boolean",
  8793. "description": "Prompt cleared successfully"
  8794. }
  8795. }
  8796. }
  8797. },
  8798. "400": {
  8799. "description": "Bad request",
  8800. "content": {
  8801. "application/json": {
  8802. "schema": {
  8803. "$ref": "#/components/schemas/BadRequestError"
  8804. }
  8805. }
  8806. }
  8807. }
  8808. },
  8809. "description": "Clear the prompt.",
  8810. "summary": "Clear TUI prompt",
  8811. "x-codeSamples": [
  8812. {
  8813. "lang": "js",
  8814. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8815. }
  8816. ]
  8817. }
  8818. },
  8819. "/tui/execute-command": {
  8820. "post": {
  8821. "tags": ["tui"],
  8822. "operationId": "tui.executeCommand",
  8823. "parameters": [
  8824. {
  8825. "name": "directory",
  8826. "in": "query",
  8827. "schema": {
  8828. "type": "string"
  8829. },
  8830. "required": false
  8831. },
  8832. {
  8833. "name": "workspace",
  8834. "in": "query",
  8835. "schema": {
  8836. "type": "string"
  8837. },
  8838. "required": false
  8839. }
  8840. ],
  8841. "responses": {
  8842. "200": {
  8843. "description": "Command executed successfully",
  8844. "content": {
  8845. "application/json": {
  8846. "schema": {
  8847. "type": "boolean",
  8848. "description": "Command executed successfully"
  8849. }
  8850. }
  8851. }
  8852. },
  8853. "400": {
  8854. "description": "BadRequest | InvalidRequestError",
  8855. "content": {
  8856. "application/json": {
  8857. "schema": {
  8858. "anyOf": [
  8859. {
  8860. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8861. },
  8862. {
  8863. "$ref": "#/components/schemas/InvalidRequestError"
  8864. }
  8865. ]
  8866. }
  8867. }
  8868. }
  8869. }
  8870. },
  8871. "description": "Execute a TUI command.",
  8872. "summary": "Execute TUI command",
  8873. "requestBody": {
  8874. "content": {
  8875. "application/json": {
  8876. "schema": {
  8877. "type": "object",
  8878. "properties": {
  8879. "command": {
  8880. "type": "string"
  8881. }
  8882. },
  8883. "required": ["command"],
  8884. "additionalProperties": false
  8885. }
  8886. }
  8887. }
  8888. },
  8889. "x-codeSamples": [
  8890. {
  8891. "lang": "js",
  8892. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8893. }
  8894. ]
  8895. }
  8896. },
  8897. "/tui/show-toast": {
  8898. "post": {
  8899. "tags": ["tui"],
  8900. "operationId": "tui.showToast",
  8901. "parameters": [
  8902. {
  8903. "name": "directory",
  8904. "in": "query",
  8905. "schema": {
  8906. "type": "string"
  8907. },
  8908. "required": false
  8909. },
  8910. {
  8911. "name": "workspace",
  8912. "in": "query",
  8913. "schema": {
  8914. "type": "string"
  8915. },
  8916. "required": false
  8917. }
  8918. ],
  8919. "responses": {
  8920. "200": {
  8921. "description": "Toast notification shown successfully",
  8922. "content": {
  8923. "application/json": {
  8924. "schema": {
  8925. "type": "boolean",
  8926. "description": "Toast notification shown successfully"
  8927. }
  8928. }
  8929. }
  8930. },
  8931. "400": {
  8932. "description": "Bad request",
  8933. "content": {
  8934. "application/json": {
  8935. "schema": {
  8936. "$ref": "#/components/schemas/BadRequestError"
  8937. }
  8938. }
  8939. }
  8940. }
  8941. },
  8942. "description": "Show a toast notification in the TUI.",
  8943. "summary": "Show TUI toast",
  8944. "requestBody": {
  8945. "content": {
  8946. "application/json": {
  8947. "schema": {
  8948. "type": "object",
  8949. "properties": {
  8950. "title": {
  8951. "type": "string"
  8952. },
  8953. "message": {
  8954. "type": "string"
  8955. },
  8956. "variant": {
  8957. "type": "string",
  8958. "enum": ["info", "success", "warning", "error"]
  8959. },
  8960. "duration": {
  8961. "type": "integer",
  8962. "exclusiveMinimum": 0
  8963. }
  8964. },
  8965. "required": ["message", "variant"],
  8966. "additionalProperties": false
  8967. }
  8968. }
  8969. }
  8970. },
  8971. "x-codeSamples": [
  8972. {
  8973. "lang": "js",
  8974. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8975. }
  8976. ]
  8977. }
  8978. },
  8979. "/tui/publish": {
  8980. "post": {
  8981. "tags": ["tui"],
  8982. "operationId": "tui.publish",
  8983. "parameters": [
  8984. {
  8985. "name": "directory",
  8986. "in": "query",
  8987. "schema": {
  8988. "type": "string"
  8989. },
  8990. "required": false
  8991. },
  8992. {
  8993. "name": "workspace",
  8994. "in": "query",
  8995. "schema": {
  8996. "type": "string"
  8997. },
  8998. "required": false
  8999. }
  9000. ],
  9001. "responses": {
  9002. "200": {
  9003. "description": "Event published successfully",
  9004. "content": {
  9005. "application/json": {
  9006. "schema": {
  9007. "type": "boolean",
  9008. "description": "Event published successfully"
  9009. }
  9010. }
  9011. }
  9012. },
  9013. "400": {
  9014. "description": "BadRequest | InvalidRequestError",
  9015. "content": {
  9016. "application/json": {
  9017. "schema": {
  9018. "anyOf": [
  9019. {
  9020. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9021. },
  9022. {
  9023. "$ref": "#/components/schemas/InvalidRequestError"
  9024. }
  9025. ]
  9026. }
  9027. }
  9028. }
  9029. }
  9030. },
  9031. "description": "Publish a TUI event.",
  9032. "summary": "Publish TUI event",
  9033. "requestBody": {
  9034. "content": {
  9035. "application/json": {
  9036. "schema": {
  9037. "anyOf": [
  9038. {
  9039. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9040. },
  9041. {
  9042. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9043. },
  9044. {
  9045. "$ref": "#/components/schemas/EventTuiToastShow"
  9046. },
  9047. {
  9048. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9049. }
  9050. ]
  9051. }
  9052. }
  9053. }
  9054. },
  9055. "x-codeSamples": [
  9056. {
  9057. "lang": "js",
  9058. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9059. }
  9060. ]
  9061. }
  9062. },
  9063. "/tui/select-session": {
  9064. "post": {
  9065. "tags": ["tui"],
  9066. "operationId": "tui.selectSession",
  9067. "parameters": [
  9068. {
  9069. "name": "directory",
  9070. "in": "query",
  9071. "schema": {
  9072. "type": "string"
  9073. },
  9074. "required": false
  9075. },
  9076. {
  9077. "name": "workspace",
  9078. "in": "query",
  9079. "schema": {
  9080. "type": "string"
  9081. },
  9082. "required": false
  9083. }
  9084. ],
  9085. "responses": {
  9086. "200": {
  9087. "description": "Session selected successfully",
  9088. "content": {
  9089. "application/json": {
  9090. "schema": {
  9091. "type": "boolean",
  9092. "description": "Session selected successfully"
  9093. }
  9094. }
  9095. }
  9096. },
  9097. "400": {
  9098. "description": "BadRequest | InvalidRequestError",
  9099. "content": {
  9100. "application/json": {
  9101. "schema": {
  9102. "anyOf": [
  9103. {
  9104. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9105. },
  9106. {
  9107. "$ref": "#/components/schemas/InvalidRequestError"
  9108. }
  9109. ]
  9110. }
  9111. }
  9112. }
  9113. },
  9114. "404": {
  9115. "description": "NotFoundError",
  9116. "content": {
  9117. "application/json": {
  9118. "schema": {
  9119. "$ref": "#/components/schemas/NotFoundError"
  9120. }
  9121. }
  9122. }
  9123. }
  9124. },
  9125. "description": "Navigate the TUI to display the specified session.",
  9126. "summary": "Select session",
  9127. "requestBody": {
  9128. "content": {
  9129. "application/json": {
  9130. "schema": {
  9131. "type": "object",
  9132. "properties": {
  9133. "sessionID": {
  9134. "type": "string",
  9135. "pattern": "^ses",
  9136. "description": "Session ID to navigate to"
  9137. }
  9138. },
  9139. "required": ["sessionID"],
  9140. "additionalProperties": false
  9141. }
  9142. }
  9143. }
  9144. },
  9145. "x-codeSamples": [
  9146. {
  9147. "lang": "js",
  9148. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9149. }
  9150. ]
  9151. }
  9152. },
  9153. "/tui/control/next": {
  9154. "get": {
  9155. "tags": ["tui"],
  9156. "operationId": "tui.control.next",
  9157. "parameters": [
  9158. {
  9159. "name": "directory",
  9160. "in": "query",
  9161. "schema": {
  9162. "type": "string"
  9163. },
  9164. "required": false
  9165. },
  9166. {
  9167. "name": "workspace",
  9168. "in": "query",
  9169. "schema": {
  9170. "type": "string"
  9171. },
  9172. "required": false
  9173. }
  9174. ],
  9175. "responses": {
  9176. "200": {
  9177. "description": "Next TUI request",
  9178. "content": {
  9179. "application/json": {
  9180. "schema": {
  9181. "type": "object",
  9182. "properties": {
  9183. "path": {
  9184. "type": "string"
  9185. },
  9186. "body": {}
  9187. },
  9188. "required": ["path", "body"],
  9189. "additionalProperties": false,
  9190. "description": "Next TUI request"
  9191. }
  9192. }
  9193. }
  9194. },
  9195. "400": {
  9196. "description": "Bad request",
  9197. "content": {
  9198. "application/json": {
  9199. "schema": {
  9200. "$ref": "#/components/schemas/BadRequestError"
  9201. }
  9202. }
  9203. }
  9204. }
  9205. },
  9206. "description": "Retrieve the next TUI request from the queue for processing.",
  9207. "summary": "Get next TUI request",
  9208. "x-codeSamples": [
  9209. {
  9210. "lang": "js",
  9211. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9212. }
  9213. ]
  9214. }
  9215. },
  9216. "/tui/control/response": {
  9217. "post": {
  9218. "tags": ["tui"],
  9219. "operationId": "tui.control.response",
  9220. "parameters": [
  9221. {
  9222. "name": "directory",
  9223. "in": "query",
  9224. "schema": {
  9225. "type": "string"
  9226. },
  9227. "required": false
  9228. },
  9229. {
  9230. "name": "workspace",
  9231. "in": "query",
  9232. "schema": {
  9233. "type": "string"
  9234. },
  9235. "required": false
  9236. }
  9237. ],
  9238. "responses": {
  9239. "200": {
  9240. "description": "Response submitted successfully",
  9241. "content": {
  9242. "application/json": {
  9243. "schema": {
  9244. "type": "boolean",
  9245. "description": "Response submitted successfully"
  9246. }
  9247. }
  9248. }
  9249. },
  9250. "400": {
  9251. "description": "Bad request",
  9252. "content": {
  9253. "application/json": {
  9254. "schema": {
  9255. "$ref": "#/components/schemas/BadRequestError"
  9256. }
  9257. }
  9258. }
  9259. }
  9260. },
  9261. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9262. "summary": "Submit TUI response",
  9263. "requestBody": {
  9264. "content": {
  9265. "application/json": {
  9266. "schema": {}
  9267. }
  9268. }
  9269. },
  9270. "x-codeSamples": [
  9271. {
  9272. "lang": "js",
  9273. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9274. }
  9275. ]
  9276. }
  9277. },
  9278. "/experimental/workspace/adapter": {
  9279. "get": {
  9280. "tags": ["workspace"],
  9281. "operationId": "experimental.workspace.adapter.list",
  9282. "parameters": [
  9283. {
  9284. "name": "directory",
  9285. "in": "query",
  9286. "schema": {
  9287. "type": "string"
  9288. },
  9289. "required": false
  9290. },
  9291. {
  9292. "name": "workspace",
  9293. "in": "query",
  9294. "schema": {
  9295. "type": "string"
  9296. },
  9297. "required": false
  9298. }
  9299. ],
  9300. "responses": {
  9301. "200": {
  9302. "description": "Workspace adapters",
  9303. "content": {
  9304. "application/json": {
  9305. "schema": {
  9306. "type": "array",
  9307. "items": {
  9308. "type": "object",
  9309. "properties": {
  9310. "type": {
  9311. "type": "string"
  9312. },
  9313. "name": {
  9314. "type": "string"
  9315. },
  9316. "description": {
  9317. "type": "string"
  9318. }
  9319. },
  9320. "required": ["type", "name", "description"],
  9321. "additionalProperties": false
  9322. },
  9323. "description": "Workspace adapters"
  9324. }
  9325. }
  9326. }
  9327. },
  9328. "400": {
  9329. "description": "Bad request",
  9330. "content": {
  9331. "application/json": {
  9332. "schema": {
  9333. "$ref": "#/components/schemas/BadRequestError"
  9334. }
  9335. }
  9336. }
  9337. }
  9338. },
  9339. "description": "List all available workspace adapters for the current project.",
  9340. "summary": "List workspace adapters",
  9341. "x-codeSamples": [
  9342. {
  9343. "lang": "js",
  9344. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9345. }
  9346. ]
  9347. }
  9348. },
  9349. "/experimental/workspace": {
  9350. "get": {
  9351. "tags": ["workspace"],
  9352. "operationId": "experimental.workspace.list",
  9353. "parameters": [
  9354. {
  9355. "name": "directory",
  9356. "in": "query",
  9357. "schema": {
  9358. "type": "string"
  9359. },
  9360. "required": false
  9361. },
  9362. {
  9363. "name": "workspace",
  9364. "in": "query",
  9365. "schema": {
  9366. "type": "string"
  9367. },
  9368. "required": false
  9369. }
  9370. ],
  9371. "responses": {
  9372. "200": {
  9373. "description": "Workspaces",
  9374. "content": {
  9375. "application/json": {
  9376. "schema": {
  9377. "type": "array",
  9378. "items": {
  9379. "$ref": "#/components/schemas/Workspace"
  9380. },
  9381. "description": "Workspaces"
  9382. }
  9383. }
  9384. }
  9385. },
  9386. "400": {
  9387. "description": "Bad request",
  9388. "content": {
  9389. "application/json": {
  9390. "schema": {
  9391. "$ref": "#/components/schemas/BadRequestError"
  9392. }
  9393. }
  9394. }
  9395. }
  9396. },
  9397. "description": "List all workspaces.",
  9398. "summary": "List workspaces",
  9399. "x-codeSamples": [
  9400. {
  9401. "lang": "js",
  9402. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9403. }
  9404. ]
  9405. },
  9406. "post": {
  9407. "tags": ["workspace"],
  9408. "operationId": "experimental.workspace.create",
  9409. "parameters": [
  9410. {
  9411. "name": "directory",
  9412. "in": "query",
  9413. "schema": {
  9414. "type": "string"
  9415. },
  9416. "required": false
  9417. },
  9418. {
  9419. "name": "workspace",
  9420. "in": "query",
  9421. "schema": {
  9422. "type": "string"
  9423. },
  9424. "required": false
  9425. }
  9426. ],
  9427. "responses": {
  9428. "200": {
  9429. "description": "Workspace created",
  9430. "content": {
  9431. "application/json": {
  9432. "schema": {
  9433. "$ref": "#/components/schemas/Workspace"
  9434. }
  9435. }
  9436. }
  9437. },
  9438. "400": {
  9439. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9440. "content": {
  9441. "application/json": {
  9442. "schema": {
  9443. "anyOf": [
  9444. {
  9445. "$ref": "#/components/schemas/WorkspaceCreateError"
  9446. },
  9447. {
  9448. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9449. },
  9450. {
  9451. "$ref": "#/components/schemas/InvalidRequestError"
  9452. }
  9453. ]
  9454. }
  9455. }
  9456. }
  9457. }
  9458. },
  9459. "description": "Create a workspace for the current project.",
  9460. "summary": "Create workspace",
  9461. "requestBody": {
  9462. "content": {
  9463. "application/json": {
  9464. "schema": {
  9465. "type": "object",
  9466. "properties": {
  9467. "id": {
  9468. "type": "string",
  9469. "pattern": "^wrk"
  9470. },
  9471. "type": {
  9472. "type": "string"
  9473. },
  9474. "branch": {
  9475. "anyOf": [
  9476. {
  9477. "type": "string"
  9478. },
  9479. {
  9480. "type": "null"
  9481. }
  9482. ]
  9483. },
  9484. "extra": {
  9485. "anyOf": [
  9486. {},
  9487. {
  9488. "type": "null"
  9489. }
  9490. ]
  9491. }
  9492. },
  9493. "required": ["type"],
  9494. "additionalProperties": false
  9495. }
  9496. }
  9497. }
  9498. },
  9499. "x-codeSamples": [
  9500. {
  9501. "lang": "js",
  9502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9503. }
  9504. ]
  9505. }
  9506. },
  9507. "/experimental/workspace/sync-list": {
  9508. "post": {
  9509. "tags": ["workspace"],
  9510. "operationId": "experimental.workspace.syncList",
  9511. "parameters": [
  9512. {
  9513. "name": "directory",
  9514. "in": "query",
  9515. "schema": {
  9516. "type": "string"
  9517. },
  9518. "required": false
  9519. },
  9520. {
  9521. "name": "workspace",
  9522. "in": "query",
  9523. "schema": {
  9524. "type": "string"
  9525. },
  9526. "required": false
  9527. }
  9528. ],
  9529. "responses": {
  9530. "204": {
  9531. "description": "Workspace list synced"
  9532. },
  9533. "400": {
  9534. "description": "Bad request",
  9535. "content": {
  9536. "application/json": {
  9537. "schema": {
  9538. "$ref": "#/components/schemas/BadRequestError"
  9539. }
  9540. }
  9541. }
  9542. }
  9543. },
  9544. "description": "Register missing workspaces returned by workspace adapters.",
  9545. "summary": "Sync workspace list",
  9546. "x-codeSamples": [
  9547. {
  9548. "lang": "js",
  9549. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9550. }
  9551. ]
  9552. }
  9553. },
  9554. "/experimental/workspace/status": {
  9555. "get": {
  9556. "tags": ["workspace"],
  9557. "operationId": "experimental.workspace.status",
  9558. "parameters": [
  9559. {
  9560. "name": "directory",
  9561. "in": "query",
  9562. "schema": {
  9563. "type": "string"
  9564. },
  9565. "required": false
  9566. },
  9567. {
  9568. "name": "workspace",
  9569. "in": "query",
  9570. "schema": {
  9571. "type": "string"
  9572. },
  9573. "required": false
  9574. }
  9575. ],
  9576. "responses": {
  9577. "200": {
  9578. "description": "Workspace status",
  9579. "content": {
  9580. "application/json": {
  9581. "schema": {
  9582. "type": "array",
  9583. "items": {
  9584. "$ref": "#/components/schemas/WorkspaceEventConnectionStatus"
  9585. },
  9586. "description": "Workspace status"
  9587. }
  9588. }
  9589. }
  9590. },
  9591. "400": {
  9592. "description": "Bad request",
  9593. "content": {
  9594. "application/json": {
  9595. "schema": {
  9596. "$ref": "#/components/schemas/BadRequestError"
  9597. }
  9598. }
  9599. }
  9600. }
  9601. },
  9602. "description": "Get connection status for workspaces in the current project.",
  9603. "summary": "Workspace status",
  9604. "x-codeSamples": [
  9605. {
  9606. "lang": "js",
  9607. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9608. }
  9609. ]
  9610. }
  9611. },
  9612. "/experimental/workspace/{id}": {
  9613. "delete": {
  9614. "tags": ["workspace"],
  9615. "operationId": "experimental.workspace.remove",
  9616. "parameters": [
  9617. {
  9618. "name": "id",
  9619. "in": "path",
  9620. "schema": {
  9621. "type": "string",
  9622. "pattern": "^wrk"
  9623. },
  9624. "required": true
  9625. },
  9626. {
  9627. "name": "directory",
  9628. "in": "query",
  9629. "schema": {
  9630. "type": "string"
  9631. },
  9632. "required": false
  9633. },
  9634. {
  9635. "name": "workspace",
  9636. "in": "query",
  9637. "schema": {
  9638. "type": "string"
  9639. },
  9640. "required": false
  9641. }
  9642. ],
  9643. "responses": {
  9644. "200": {
  9645. "description": "Workspace removed",
  9646. "content": {
  9647. "application/json": {
  9648. "schema": {
  9649. "$ref": "#/components/schemas/Workspace"
  9650. }
  9651. }
  9652. }
  9653. },
  9654. "400": {
  9655. "description": "BadRequest | InvalidRequestError",
  9656. "content": {
  9657. "application/json": {
  9658. "schema": {
  9659. "anyOf": [
  9660. {
  9661. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9662. },
  9663. {
  9664. "$ref": "#/components/schemas/InvalidRequestError"
  9665. }
  9666. ]
  9667. }
  9668. }
  9669. }
  9670. }
  9671. },
  9672. "description": "Remove an existing workspace.",
  9673. "summary": "Remove workspace",
  9674. "x-codeSamples": [
  9675. {
  9676. "lang": "js",
  9677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9678. }
  9679. ]
  9680. }
  9681. },
  9682. "/experimental/workspace/warp": {
  9683. "post": {
  9684. "tags": ["workspace"],
  9685. "operationId": "experimental.workspace.warp",
  9686. "parameters": [
  9687. {
  9688. "name": "directory",
  9689. "in": "query",
  9690. "schema": {
  9691. "type": "string"
  9692. },
  9693. "required": false
  9694. },
  9695. {
  9696. "name": "workspace",
  9697. "in": "query",
  9698. "schema": {
  9699. "type": "string"
  9700. },
  9701. "required": false
  9702. }
  9703. ],
  9704. "responses": {
  9705. "204": {
  9706. "description": "Session warped"
  9707. },
  9708. "400": {
  9709. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9710. "content": {
  9711. "application/json": {
  9712. "schema": {
  9713. "anyOf": [
  9714. {
  9715. "$ref": "#/components/schemas/WorkspaceWarpError"
  9716. },
  9717. {
  9718. "$ref": "#/components/schemas/VcsApplyError"
  9719. },
  9720. {
  9721. "$ref": "#/components/schemas/InvalidRequestError"
  9722. }
  9723. ]
  9724. }
  9725. }
  9726. }
  9727. },
  9728. "404": {
  9729. "description": "NotFoundError",
  9730. "content": {
  9731. "application/json": {
  9732. "schema": {
  9733. "$ref": "#/components/schemas/NotFoundError"
  9734. }
  9735. }
  9736. }
  9737. }
  9738. },
  9739. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9740. "summary": "Warp session into workspace",
  9741. "requestBody": {
  9742. "content": {
  9743. "application/json": {
  9744. "schema": {
  9745. "type": "object",
  9746. "properties": {
  9747. "id": {
  9748. "anyOf": [
  9749. {
  9750. "type": "string",
  9751. "pattern": "^wrk"
  9752. },
  9753. {
  9754. "type": "null"
  9755. }
  9756. ]
  9757. },
  9758. "sessionID": {
  9759. "type": "string",
  9760. "pattern": "^ses"
  9761. },
  9762. "copyChanges": {
  9763. "type": "boolean"
  9764. }
  9765. },
  9766. "required": ["id", "sessionID"],
  9767. "additionalProperties": false
  9768. }
  9769. }
  9770. }
  9771. },
  9772. "x-codeSamples": [
  9773. {
  9774. "lang": "js",
  9775. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9776. }
  9777. ]
  9778. }
  9779. },
  9780. "/api/health": {
  9781. "get": {
  9782. "tags": ["opencode HttpApi"],
  9783. "operationId": "v2.health.get",
  9784. "parameters": [],
  9785. "security": [],
  9786. "responses": {
  9787. "200": {
  9788. "description": "Success",
  9789. "content": {
  9790. "application/json": {
  9791. "schema": {
  9792. "type": "object",
  9793. "properties": {
  9794. "healthy": {
  9795. "type": "boolean",
  9796. "enum": [true]
  9797. }
  9798. },
  9799. "required": ["healthy"],
  9800. "additionalProperties": false
  9801. }
  9802. }
  9803. }
  9804. },
  9805. "400": {
  9806. "description": "InvalidRequestError",
  9807. "content": {
  9808. "application/json": {
  9809. "schema": {
  9810. "$ref": "#/components/schemas/InvalidRequestError"
  9811. }
  9812. }
  9813. }
  9814. },
  9815. "401": {
  9816. "description": "UnauthorizedError",
  9817. "content": {
  9818. "application/json": {
  9819. "schema": {
  9820. "$ref": "#/components/schemas/UnauthorizedError"
  9821. }
  9822. }
  9823. }
  9824. }
  9825. },
  9826. "description": "Check whether the API server is ready to accept requests.",
  9827. "summary": "Check server health",
  9828. "x-codeSamples": [
  9829. {
  9830. "lang": "js",
  9831. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9832. }
  9833. ]
  9834. }
  9835. },
  9836. "/api/location": {
  9837. "get": {
  9838. "tags": ["opencode HttpApi"],
  9839. "operationId": "v2.location.get",
  9840. "parameters": [
  9841. {
  9842. "name": "location",
  9843. "in": "query",
  9844. "schema": {
  9845. "type": "object",
  9846. "properties": {
  9847. "directory": {
  9848. "type": "string"
  9849. },
  9850. "workspace": {
  9851. "type": "string"
  9852. }
  9853. },
  9854. "additionalProperties": false
  9855. },
  9856. "required": false,
  9857. "style": "deepObject",
  9858. "explode": true
  9859. }
  9860. ],
  9861. "security": [],
  9862. "responses": {
  9863. "200": {
  9864. "description": "Location.Info",
  9865. "content": {
  9866. "application/json": {
  9867. "schema": {
  9868. "$ref": "#/components/schemas/LocationInfo"
  9869. }
  9870. }
  9871. }
  9872. },
  9873. "400": {
  9874. "description": "InvalidRequestError",
  9875. "content": {
  9876. "application/json": {
  9877. "schema": {
  9878. "$ref": "#/components/schemas/InvalidRequestError"
  9879. }
  9880. }
  9881. }
  9882. },
  9883. "401": {
  9884. "description": "UnauthorizedError",
  9885. "content": {
  9886. "application/json": {
  9887. "schema": {
  9888. "$ref": "#/components/schemas/UnauthorizedError"
  9889. }
  9890. }
  9891. }
  9892. }
  9893. },
  9894. "description": "Resolve the requested location or the server default location.",
  9895. "summary": "Get location",
  9896. "x-codeSamples": [
  9897. {
  9898. "lang": "js",
  9899. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  9900. }
  9901. ]
  9902. }
  9903. },
  9904. "/api/agent": {
  9905. "get": {
  9906. "tags": ["opencode HttpApi"],
  9907. "operationId": "v2.agent.list",
  9908. "parameters": [
  9909. {
  9910. "name": "location",
  9911. "in": "query",
  9912. "schema": {
  9913. "type": "object",
  9914. "properties": {
  9915. "directory": {
  9916. "type": "string"
  9917. },
  9918. "workspace": {
  9919. "type": "string"
  9920. }
  9921. },
  9922. "additionalProperties": false
  9923. },
  9924. "required": false,
  9925. "style": "deepObject",
  9926. "explode": true
  9927. }
  9928. ],
  9929. "security": [],
  9930. "responses": {
  9931. "200": {
  9932. "description": "Success",
  9933. "content": {
  9934. "application/json": {
  9935. "schema": {
  9936. "type": "object",
  9937. "properties": {
  9938. "location": {
  9939. "$ref": "#/components/schemas/LocationInfo"
  9940. },
  9941. "data": {
  9942. "type": "array",
  9943. "items": {
  9944. "$ref": "#/components/schemas/AgentV2Info"
  9945. }
  9946. }
  9947. },
  9948. "required": ["location", "data"],
  9949. "additionalProperties": false
  9950. }
  9951. }
  9952. }
  9953. },
  9954. "400": {
  9955. "description": "InvalidRequestError",
  9956. "content": {
  9957. "application/json": {
  9958. "schema": {
  9959. "$ref": "#/components/schemas/InvalidRequestError"
  9960. }
  9961. }
  9962. }
  9963. },
  9964. "401": {
  9965. "description": "UnauthorizedError",
  9966. "content": {
  9967. "application/json": {
  9968. "schema": {
  9969. "$ref": "#/components/schemas/UnauthorizedError"
  9970. }
  9971. }
  9972. }
  9973. }
  9974. },
  9975. "description": "Retrieve currently registered agents.",
  9976. "summary": "List agents",
  9977. "x-codeSamples": [
  9978. {
  9979. "lang": "js",
  9980. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  9981. }
  9982. ]
  9983. }
  9984. },
  9985. "/api/session": {
  9986. "get": {
  9987. "tags": ["sessions"],
  9988. "operationId": "v2.session.list",
  9989. "parameters": [
  9990. {
  9991. "name": "workspace",
  9992. "in": "query",
  9993. "schema": {
  9994. "type": "string",
  9995. "pattern": "^wrk"
  9996. },
  9997. "required": false
  9998. },
  9999. {
  10000. "name": "limit",
  10001. "in": "query",
  10002. "schema": {
  10003. "type": "number"
  10004. },
  10005. "required": false
  10006. },
  10007. {
  10008. "name": "order",
  10009. "in": "query",
  10010. "schema": {
  10011. "type": "string",
  10012. "enum": ["asc", "desc"]
  10013. },
  10014. "required": false
  10015. },
  10016. {
  10017. "name": "search",
  10018. "in": "query",
  10019. "schema": {
  10020. "type": "string"
  10021. },
  10022. "required": false
  10023. },
  10024. {
  10025. "name": "directory",
  10026. "in": "query",
  10027. "schema": {
  10028. "type": "string"
  10029. },
  10030. "required": false
  10031. },
  10032. {
  10033. "name": "project",
  10034. "in": "query",
  10035. "schema": {
  10036. "type": "string"
  10037. },
  10038. "required": false
  10039. },
  10040. {
  10041. "name": "subpath",
  10042. "in": "query",
  10043. "schema": {
  10044. "type": "string"
  10045. },
  10046. "required": false
  10047. },
  10048. {
  10049. "name": "cursor",
  10050. "in": "query",
  10051. "schema": {
  10052. "type": "string",
  10053. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10054. },
  10055. "required": false
  10056. }
  10057. ],
  10058. "security": [],
  10059. "responses": {
  10060. "200": {
  10061. "description": "SessionsResponse",
  10062. "content": {
  10063. "application/json": {
  10064. "schema": {
  10065. "$ref": "#/components/schemas/SessionsResponse"
  10066. }
  10067. }
  10068. }
  10069. },
  10070. "400": {
  10071. "description": "InvalidCursorError | InvalidRequestError",
  10072. "content": {
  10073. "application/json": {
  10074. "schema": {
  10075. "anyOf": [
  10076. {
  10077. "$ref": "#/components/schemas/InvalidCursorError"
  10078. },
  10079. {
  10080. "$ref": "#/components/schemas/InvalidRequestError"
  10081. },
  10082. {
  10083. "$ref": "#/components/schemas/InvalidRequestError"
  10084. }
  10085. ]
  10086. }
  10087. }
  10088. }
  10089. },
  10090. "401": {
  10091. "description": "UnauthorizedError",
  10092. "content": {
  10093. "application/json": {
  10094. "schema": {
  10095. "$ref": "#/components/schemas/UnauthorizedError"
  10096. }
  10097. }
  10098. }
  10099. }
  10100. },
  10101. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  10102. "summary": "List sessions",
  10103. "x-codeSamples": [
  10104. {
  10105. "lang": "js",
  10106. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10107. }
  10108. ]
  10109. },
  10110. "post": {
  10111. "tags": ["sessions"],
  10112. "operationId": "v2.session.create",
  10113. "parameters": [],
  10114. "security": [],
  10115. "responses": {
  10116. "200": {
  10117. "description": "Success",
  10118. "content": {
  10119. "application/json": {
  10120. "schema": {
  10121. "type": "object",
  10122. "properties": {
  10123. "data": {
  10124. "$ref": "#/components/schemas/SessionV2Info"
  10125. }
  10126. },
  10127. "required": ["data"],
  10128. "additionalProperties": false
  10129. }
  10130. }
  10131. }
  10132. },
  10133. "400": {
  10134. "description": "InvalidRequestError",
  10135. "content": {
  10136. "application/json": {
  10137. "schema": {
  10138. "$ref": "#/components/schemas/InvalidRequestError"
  10139. }
  10140. }
  10141. }
  10142. },
  10143. "401": {
  10144. "description": "UnauthorizedError",
  10145. "content": {
  10146. "application/json": {
  10147. "schema": {
  10148. "$ref": "#/components/schemas/UnauthorizedError"
  10149. }
  10150. }
  10151. }
  10152. }
  10153. },
  10154. "description": "Create a session at the requested location.",
  10155. "summary": "Create session",
  10156. "requestBody": {
  10157. "content": {
  10158. "application/json": {
  10159. "schema": {
  10160. "type": "object",
  10161. "properties": {
  10162. "id": {
  10163. "type": "string",
  10164. "pattern": "^ses"
  10165. },
  10166. "agent": {
  10167. "type": "string"
  10168. },
  10169. "model": {
  10170. "$ref": "#/components/schemas/ModelRef"
  10171. },
  10172. "location": {
  10173. "$ref": "#/components/schemas/LocationRef"
  10174. }
  10175. },
  10176. "additionalProperties": false
  10177. }
  10178. }
  10179. },
  10180. "required": true
  10181. },
  10182. "x-codeSamples": [
  10183. {
  10184. "lang": "js",
  10185. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10186. }
  10187. ]
  10188. }
  10189. },
  10190. "/api/session/active": {
  10191. "get": {
  10192. "tags": ["sessions"],
  10193. "operationId": "v2.session.active",
  10194. "parameters": [],
  10195. "security": [],
  10196. "responses": {
  10197. "200": {
  10198. "description": "Success",
  10199. "content": {
  10200. "application/json": {
  10201. "schema": {
  10202. "type": "object",
  10203. "properties": {
  10204. "data": {
  10205. "type": "object",
  10206. "patternProperties": {
  10207. "^ses": {
  10208. "$ref": "#/components/schemas/SessionActive"
  10209. }
  10210. }
  10211. }
  10212. },
  10213. "required": ["data"],
  10214. "additionalProperties": false
  10215. }
  10216. }
  10217. }
  10218. },
  10219. "400": {
  10220. "description": "InvalidRequestError",
  10221. "content": {
  10222. "application/json": {
  10223. "schema": {
  10224. "$ref": "#/components/schemas/InvalidRequestError"
  10225. }
  10226. }
  10227. }
  10228. },
  10229. "401": {
  10230. "description": "UnauthorizedError",
  10231. "content": {
  10232. "application/json": {
  10233. "schema": {
  10234. "$ref": "#/components/schemas/UnauthorizedError"
  10235. }
  10236. }
  10237. }
  10238. }
  10239. },
  10240. "description": "Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.",
  10241. "summary": "List active sessions",
  10242. "x-codeSamples": [
  10243. {
  10244. "lang": "js",
  10245. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.active({\n ...\n})"
  10246. }
  10247. ]
  10248. }
  10249. },
  10250. "/api/session/{sessionID}": {
  10251. "get": {
  10252. "tags": ["sessions"],
  10253. "operationId": "v2.session.get",
  10254. "parameters": [
  10255. {
  10256. "name": "sessionID",
  10257. "in": "path",
  10258. "schema": {
  10259. "type": "string",
  10260. "pattern": "^ses"
  10261. },
  10262. "required": true
  10263. }
  10264. ],
  10265. "security": [],
  10266. "responses": {
  10267. "200": {
  10268. "description": "Success",
  10269. "content": {
  10270. "application/json": {
  10271. "schema": {
  10272. "type": "object",
  10273. "properties": {
  10274. "data": {
  10275. "$ref": "#/components/schemas/SessionV2Info"
  10276. }
  10277. },
  10278. "required": ["data"],
  10279. "additionalProperties": false
  10280. }
  10281. }
  10282. }
  10283. },
  10284. "400": {
  10285. "description": "InvalidRequestError",
  10286. "content": {
  10287. "application/json": {
  10288. "schema": {
  10289. "$ref": "#/components/schemas/InvalidRequestError"
  10290. }
  10291. }
  10292. }
  10293. },
  10294. "401": {
  10295. "description": "UnauthorizedError",
  10296. "content": {
  10297. "application/json": {
  10298. "schema": {
  10299. "$ref": "#/components/schemas/UnauthorizedError"
  10300. }
  10301. }
  10302. }
  10303. },
  10304. "404": {
  10305. "description": "SessionNotFoundError",
  10306. "content": {
  10307. "application/json": {
  10308. "schema": {
  10309. "anyOf": [
  10310. {
  10311. "$ref": "#/components/schemas/SessionNotFoundError"
  10312. },
  10313. {
  10314. "$ref": "#/components/schemas/SessionNotFoundError"
  10315. }
  10316. ]
  10317. }
  10318. }
  10319. }
  10320. }
  10321. },
  10322. "description": "Retrieve a session by ID.",
  10323. "summary": "Get session",
  10324. "x-codeSamples": [
  10325. {
  10326. "lang": "js",
  10327. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10328. }
  10329. ]
  10330. }
  10331. },
  10332. "/api/session/{sessionID}/agent": {
  10333. "post": {
  10334. "tags": ["sessions"],
  10335. "operationId": "v2.session.switchAgent",
  10336. "parameters": [
  10337. {
  10338. "name": "sessionID",
  10339. "in": "path",
  10340. "schema": {
  10341. "type": "string",
  10342. "pattern": "^ses"
  10343. },
  10344. "required": true
  10345. }
  10346. ],
  10347. "security": [],
  10348. "responses": {
  10349. "204": {
  10350. "description": "<No Content>"
  10351. },
  10352. "400": {
  10353. "description": "InvalidRequestError",
  10354. "content": {
  10355. "application/json": {
  10356. "schema": {
  10357. "$ref": "#/components/schemas/InvalidRequestError"
  10358. }
  10359. }
  10360. }
  10361. },
  10362. "401": {
  10363. "description": "UnauthorizedError",
  10364. "content": {
  10365. "application/json": {
  10366. "schema": {
  10367. "$ref": "#/components/schemas/UnauthorizedError"
  10368. }
  10369. }
  10370. }
  10371. },
  10372. "404": {
  10373. "description": "SessionNotFoundError",
  10374. "content": {
  10375. "application/json": {
  10376. "schema": {
  10377. "anyOf": [
  10378. {
  10379. "$ref": "#/components/schemas/SessionNotFoundError"
  10380. },
  10381. {
  10382. "$ref": "#/components/schemas/SessionNotFoundError"
  10383. }
  10384. ]
  10385. }
  10386. }
  10387. }
  10388. }
  10389. },
  10390. "description": "Switch the agent used by subsequent provider turns.",
  10391. "summary": "Switch session agent",
  10392. "requestBody": {
  10393. "content": {
  10394. "application/json": {
  10395. "schema": {
  10396. "type": "object",
  10397. "properties": {
  10398. "agent": {
  10399. "type": "string"
  10400. }
  10401. },
  10402. "required": ["agent"],
  10403. "additionalProperties": false
  10404. }
  10405. }
  10406. },
  10407. "required": true
  10408. },
  10409. "x-codeSamples": [
  10410. {
  10411. "lang": "js",
  10412. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchAgent({\n ...\n})"
  10413. }
  10414. ]
  10415. }
  10416. },
  10417. "/api/session/{sessionID}/model": {
  10418. "post": {
  10419. "tags": ["sessions"],
  10420. "operationId": "v2.session.switchModel",
  10421. "parameters": [
  10422. {
  10423. "name": "sessionID",
  10424. "in": "path",
  10425. "schema": {
  10426. "type": "string",
  10427. "pattern": "^ses"
  10428. },
  10429. "required": true
  10430. }
  10431. ],
  10432. "security": [],
  10433. "responses": {
  10434. "204": {
  10435. "description": "<No Content>"
  10436. },
  10437. "400": {
  10438. "description": "InvalidRequestError",
  10439. "content": {
  10440. "application/json": {
  10441. "schema": {
  10442. "$ref": "#/components/schemas/InvalidRequestError"
  10443. }
  10444. }
  10445. }
  10446. },
  10447. "401": {
  10448. "description": "UnauthorizedError",
  10449. "content": {
  10450. "application/json": {
  10451. "schema": {
  10452. "$ref": "#/components/schemas/UnauthorizedError"
  10453. }
  10454. }
  10455. }
  10456. },
  10457. "404": {
  10458. "description": "SessionNotFoundError",
  10459. "content": {
  10460. "application/json": {
  10461. "schema": {
  10462. "anyOf": [
  10463. {
  10464. "$ref": "#/components/schemas/SessionNotFoundError"
  10465. },
  10466. {
  10467. "$ref": "#/components/schemas/SessionNotFoundError"
  10468. }
  10469. ]
  10470. }
  10471. }
  10472. }
  10473. }
  10474. },
  10475. "description": "Switch the model used by subsequent provider turns.",
  10476. "summary": "Switch session model",
  10477. "requestBody": {
  10478. "content": {
  10479. "application/json": {
  10480. "schema": {
  10481. "type": "object",
  10482. "properties": {
  10483. "model": {
  10484. "$ref": "#/components/schemas/ModelRef"
  10485. }
  10486. },
  10487. "required": ["model"],
  10488. "additionalProperties": false
  10489. }
  10490. }
  10491. },
  10492. "required": true
  10493. },
  10494. "x-codeSamples": [
  10495. {
  10496. "lang": "js",
  10497. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchModel({\n ...\n})"
  10498. }
  10499. ]
  10500. }
  10501. },
  10502. "/api/session/{sessionID}/prompt": {
  10503. "post": {
  10504. "tags": ["sessions"],
  10505. "operationId": "v2.session.prompt",
  10506. "parameters": [
  10507. {
  10508. "name": "sessionID",
  10509. "in": "path",
  10510. "schema": {
  10511. "type": "string",
  10512. "pattern": "^ses"
  10513. },
  10514. "required": true
  10515. }
  10516. ],
  10517. "security": [],
  10518. "responses": {
  10519. "200": {
  10520. "description": "Success",
  10521. "content": {
  10522. "application/json": {
  10523. "schema": {
  10524. "type": "object",
  10525. "properties": {
  10526. "data": {
  10527. "$ref": "#/components/schemas/SessionInputAdmitted"
  10528. }
  10529. },
  10530. "required": ["data"],
  10531. "additionalProperties": false
  10532. }
  10533. }
  10534. }
  10535. },
  10536. "400": {
  10537. "description": "InvalidRequestError",
  10538. "content": {
  10539. "application/json": {
  10540. "schema": {
  10541. "$ref": "#/components/schemas/InvalidRequestError"
  10542. }
  10543. }
  10544. }
  10545. },
  10546. "401": {
  10547. "description": "UnauthorizedError",
  10548. "content": {
  10549. "application/json": {
  10550. "schema": {
  10551. "$ref": "#/components/schemas/UnauthorizedError"
  10552. }
  10553. }
  10554. }
  10555. },
  10556. "404": {
  10557. "description": "SessionNotFoundError",
  10558. "content": {
  10559. "application/json": {
  10560. "schema": {
  10561. "anyOf": [
  10562. {
  10563. "$ref": "#/components/schemas/SessionNotFoundError"
  10564. },
  10565. {
  10566. "$ref": "#/components/schemas/SessionNotFoundError"
  10567. }
  10568. ]
  10569. }
  10570. }
  10571. }
  10572. },
  10573. "409": {
  10574. "description": "ConflictError",
  10575. "content": {
  10576. "application/json": {
  10577. "schema": {
  10578. "$ref": "#/components/schemas/ConflictError"
  10579. }
  10580. }
  10581. }
  10582. }
  10583. },
  10584. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10585. "summary": "Send message",
  10586. "requestBody": {
  10587. "content": {
  10588. "application/json": {
  10589. "schema": {
  10590. "type": "object",
  10591. "properties": {
  10592. "id": {
  10593. "type": "string",
  10594. "pattern": "^msg_"
  10595. },
  10596. "prompt": {
  10597. "$ref": "#/components/schemas/PromptInput"
  10598. },
  10599. "delivery": {
  10600. "type": "string",
  10601. "enum": ["steer", "queue"]
  10602. },
  10603. "resume": {
  10604. "type": "boolean"
  10605. }
  10606. },
  10607. "required": ["prompt"],
  10608. "additionalProperties": false
  10609. }
  10610. }
  10611. },
  10612. "required": true
  10613. },
  10614. "x-codeSamples": [
  10615. {
  10616. "lang": "js",
  10617. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10618. }
  10619. ]
  10620. }
  10621. },
  10622. "/api/session/{sessionID}/compact": {
  10623. "post": {
  10624. "tags": ["sessions"],
  10625. "operationId": "v2.session.compact",
  10626. "parameters": [
  10627. {
  10628. "name": "sessionID",
  10629. "in": "path",
  10630. "schema": {
  10631. "type": "string",
  10632. "pattern": "^ses"
  10633. },
  10634. "required": true
  10635. }
  10636. ],
  10637. "security": [],
  10638. "responses": {
  10639. "204": {
  10640. "description": "<No Content>"
  10641. },
  10642. "400": {
  10643. "description": "InvalidRequestError",
  10644. "content": {
  10645. "application/json": {
  10646. "schema": {
  10647. "$ref": "#/components/schemas/InvalidRequestError"
  10648. }
  10649. }
  10650. }
  10651. },
  10652. "401": {
  10653. "description": "UnauthorizedError",
  10654. "content": {
  10655. "application/json": {
  10656. "schema": {
  10657. "$ref": "#/components/schemas/UnauthorizedError"
  10658. }
  10659. }
  10660. }
  10661. },
  10662. "404": {
  10663. "description": "SessionNotFoundError",
  10664. "content": {
  10665. "application/json": {
  10666. "schema": {
  10667. "anyOf": [
  10668. {
  10669. "$ref": "#/components/schemas/SessionNotFoundError"
  10670. },
  10671. {
  10672. "$ref": "#/components/schemas/SessionNotFoundError"
  10673. }
  10674. ]
  10675. }
  10676. }
  10677. }
  10678. },
  10679. "503": {
  10680. "description": "ServiceUnavailableError",
  10681. "content": {
  10682. "application/json": {
  10683. "schema": {
  10684. "$ref": "#/components/schemas/ServiceUnavailableError"
  10685. }
  10686. }
  10687. }
  10688. }
  10689. },
  10690. "description": "Compact a session conversation.",
  10691. "summary": "Compact session",
  10692. "x-codeSamples": [
  10693. {
  10694. "lang": "js",
  10695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10696. }
  10697. ]
  10698. }
  10699. },
  10700. "/api/session/{sessionID}/wait": {
  10701. "post": {
  10702. "tags": ["sessions"],
  10703. "operationId": "v2.session.wait",
  10704. "parameters": [
  10705. {
  10706. "name": "sessionID",
  10707. "in": "path",
  10708. "schema": {
  10709. "type": "string",
  10710. "pattern": "^ses"
  10711. },
  10712. "required": true
  10713. }
  10714. ],
  10715. "security": [],
  10716. "responses": {
  10717. "204": {
  10718. "description": "<No Content>"
  10719. },
  10720. "400": {
  10721. "description": "InvalidRequestError",
  10722. "content": {
  10723. "application/json": {
  10724. "schema": {
  10725. "$ref": "#/components/schemas/InvalidRequestError"
  10726. }
  10727. }
  10728. }
  10729. },
  10730. "401": {
  10731. "description": "UnauthorizedError",
  10732. "content": {
  10733. "application/json": {
  10734. "schema": {
  10735. "$ref": "#/components/schemas/UnauthorizedError"
  10736. }
  10737. }
  10738. }
  10739. },
  10740. "404": {
  10741. "description": "SessionNotFoundError",
  10742. "content": {
  10743. "application/json": {
  10744. "schema": {
  10745. "anyOf": [
  10746. {
  10747. "$ref": "#/components/schemas/SessionNotFoundError"
  10748. },
  10749. {
  10750. "$ref": "#/components/schemas/SessionNotFoundError"
  10751. }
  10752. ]
  10753. }
  10754. }
  10755. }
  10756. },
  10757. "503": {
  10758. "description": "ServiceUnavailableError",
  10759. "content": {
  10760. "application/json": {
  10761. "schema": {
  10762. "$ref": "#/components/schemas/ServiceUnavailableError"
  10763. }
  10764. }
  10765. }
  10766. }
  10767. },
  10768. "description": "Wait for a session agent loop to become idle.",
  10769. "summary": "Wait for session",
  10770. "x-codeSamples": [
  10771. {
  10772. "lang": "js",
  10773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10774. }
  10775. ]
  10776. }
  10777. },
  10778. "/api/session/{sessionID}/revert/stage": {
  10779. "post": {
  10780. "tags": ["sessions"],
  10781. "operationId": "v2.session.revert.stage",
  10782. "parameters": [
  10783. {
  10784. "name": "sessionID",
  10785. "in": "path",
  10786. "schema": {
  10787. "type": "string",
  10788. "pattern": "^ses"
  10789. },
  10790. "required": true
  10791. }
  10792. ],
  10793. "security": [],
  10794. "responses": {
  10795. "200": {
  10796. "description": "Success",
  10797. "content": {
  10798. "application/json": {
  10799. "schema": {
  10800. "type": "object",
  10801. "properties": {
  10802. "data": {
  10803. "$ref": "#/components/schemas/RevertState"
  10804. }
  10805. },
  10806. "required": ["data"],
  10807. "additionalProperties": false
  10808. }
  10809. }
  10810. }
  10811. },
  10812. "400": {
  10813. "description": "InvalidRequestError",
  10814. "content": {
  10815. "application/json": {
  10816. "schema": {
  10817. "$ref": "#/components/schemas/InvalidRequestError"
  10818. }
  10819. }
  10820. }
  10821. },
  10822. "401": {
  10823. "description": "UnauthorizedError",
  10824. "content": {
  10825. "application/json": {
  10826. "schema": {
  10827. "$ref": "#/components/schemas/UnauthorizedError"
  10828. }
  10829. }
  10830. }
  10831. },
  10832. "404": {
  10833. "description": "MessageNotFoundError | SessionNotFoundError",
  10834. "content": {
  10835. "application/json": {
  10836. "schema": {
  10837. "anyOf": [
  10838. {
  10839. "$ref": "#/components/schemas/MessageNotFoundError"
  10840. },
  10841. {
  10842. "$ref": "#/components/schemas/SessionNotFoundError"
  10843. },
  10844. {
  10845. "$ref": "#/components/schemas/SessionNotFoundError"
  10846. }
  10847. ]
  10848. }
  10849. }
  10850. }
  10851. },
  10852. "500": {
  10853. "description": "UnknownError",
  10854. "content": {
  10855. "application/json": {
  10856. "schema": {
  10857. "$ref": "#/components/schemas/UnknownError1"
  10858. }
  10859. }
  10860. }
  10861. }
  10862. },
  10863. "description": "Stage or move a reversible session boundary and optionally apply its file changes.",
  10864. "summary": "Stage session revert",
  10865. "requestBody": {
  10866. "content": {
  10867. "application/json": {
  10868. "schema": {
  10869. "type": "object",
  10870. "properties": {
  10871. "messageID": {
  10872. "type": "string",
  10873. "pattern": "^msg_"
  10874. },
  10875. "files": {
  10876. "type": "boolean"
  10877. }
  10878. },
  10879. "required": ["messageID"],
  10880. "additionalProperties": false
  10881. }
  10882. }
  10883. },
  10884. "required": true
  10885. },
  10886. "x-codeSamples": [
  10887. {
  10888. "lang": "js",
  10889. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.stage({\n ...\n})"
  10890. }
  10891. ]
  10892. }
  10893. },
  10894. "/api/session/{sessionID}/revert/clear": {
  10895. "post": {
  10896. "tags": ["sessions"],
  10897. "operationId": "v2.session.revert.clear",
  10898. "parameters": [
  10899. {
  10900. "name": "sessionID",
  10901. "in": "path",
  10902. "schema": {
  10903. "type": "string",
  10904. "pattern": "^ses"
  10905. },
  10906. "required": true
  10907. }
  10908. ],
  10909. "security": [],
  10910. "responses": {
  10911. "204": {
  10912. "description": "<No Content>"
  10913. },
  10914. "400": {
  10915. "description": "InvalidRequestError",
  10916. "content": {
  10917. "application/json": {
  10918. "schema": {
  10919. "$ref": "#/components/schemas/InvalidRequestError"
  10920. }
  10921. }
  10922. }
  10923. },
  10924. "401": {
  10925. "description": "UnauthorizedError",
  10926. "content": {
  10927. "application/json": {
  10928. "schema": {
  10929. "$ref": "#/components/schemas/UnauthorizedError"
  10930. }
  10931. }
  10932. }
  10933. },
  10934. "404": {
  10935. "description": "SessionNotFoundError",
  10936. "content": {
  10937. "application/json": {
  10938. "schema": {
  10939. "anyOf": [
  10940. {
  10941. "$ref": "#/components/schemas/SessionNotFoundError"
  10942. },
  10943. {
  10944. "$ref": "#/components/schemas/SessionNotFoundError"
  10945. }
  10946. ]
  10947. }
  10948. }
  10949. }
  10950. },
  10951. "500": {
  10952. "description": "UnknownError",
  10953. "content": {
  10954. "application/json": {
  10955. "schema": {
  10956. "$ref": "#/components/schemas/UnknownError1"
  10957. }
  10958. }
  10959. }
  10960. }
  10961. },
  10962. "summary": "Clear staged revert",
  10963. "x-codeSamples": [
  10964. {
  10965. "lang": "js",
  10966. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.clear({\n ...\n})"
  10967. }
  10968. ]
  10969. }
  10970. },
  10971. "/api/session/{sessionID}/revert/commit": {
  10972. "post": {
  10973. "tags": ["sessions"],
  10974. "operationId": "v2.session.revert.commit",
  10975. "parameters": [
  10976. {
  10977. "name": "sessionID",
  10978. "in": "path",
  10979. "schema": {
  10980. "type": "string",
  10981. "pattern": "^ses"
  10982. },
  10983. "required": true
  10984. }
  10985. ],
  10986. "security": [],
  10987. "responses": {
  10988. "204": {
  10989. "description": "<No Content>"
  10990. },
  10991. "400": {
  10992. "description": "InvalidRequestError",
  10993. "content": {
  10994. "application/json": {
  10995. "schema": {
  10996. "$ref": "#/components/schemas/InvalidRequestError"
  10997. }
  10998. }
  10999. }
  11000. },
  11001. "401": {
  11002. "description": "UnauthorizedError",
  11003. "content": {
  11004. "application/json": {
  11005. "schema": {
  11006. "$ref": "#/components/schemas/UnauthorizedError"
  11007. }
  11008. }
  11009. }
  11010. },
  11011. "404": {
  11012. "description": "SessionNotFoundError",
  11013. "content": {
  11014. "application/json": {
  11015. "schema": {
  11016. "anyOf": [
  11017. {
  11018. "$ref": "#/components/schemas/SessionNotFoundError"
  11019. },
  11020. {
  11021. "$ref": "#/components/schemas/SessionNotFoundError"
  11022. }
  11023. ]
  11024. }
  11025. }
  11026. }
  11027. }
  11028. },
  11029. "summary": "Commit staged revert",
  11030. "x-codeSamples": [
  11031. {
  11032. "lang": "js",
  11033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.commit({\n ...\n})"
  11034. }
  11035. ]
  11036. }
  11037. },
  11038. "/api/session/{sessionID}/context": {
  11039. "get": {
  11040. "tags": ["sessions"],
  11041. "operationId": "v2.session.context",
  11042. "parameters": [
  11043. {
  11044. "name": "sessionID",
  11045. "in": "path",
  11046. "schema": {
  11047. "type": "string",
  11048. "pattern": "^ses"
  11049. },
  11050. "required": true
  11051. }
  11052. ],
  11053. "security": [],
  11054. "responses": {
  11055. "200": {
  11056. "description": "Success",
  11057. "content": {
  11058. "application/json": {
  11059. "schema": {
  11060. "type": "object",
  11061. "properties": {
  11062. "data": {
  11063. "type": "array",
  11064. "items": {
  11065. "$ref": "#/components/schemas/SessionMessage"
  11066. }
  11067. }
  11068. },
  11069. "required": ["data"],
  11070. "additionalProperties": false
  11071. }
  11072. }
  11073. }
  11074. },
  11075. "400": {
  11076. "description": "InvalidRequestError",
  11077. "content": {
  11078. "application/json": {
  11079. "schema": {
  11080. "$ref": "#/components/schemas/InvalidRequestError"
  11081. }
  11082. }
  11083. }
  11084. },
  11085. "401": {
  11086. "description": "UnauthorizedError",
  11087. "content": {
  11088. "application/json": {
  11089. "schema": {
  11090. "$ref": "#/components/schemas/UnauthorizedError"
  11091. }
  11092. }
  11093. }
  11094. },
  11095. "404": {
  11096. "description": "SessionNotFoundError",
  11097. "content": {
  11098. "application/json": {
  11099. "schema": {
  11100. "anyOf": [
  11101. {
  11102. "$ref": "#/components/schemas/SessionNotFoundError"
  11103. },
  11104. {
  11105. "$ref": "#/components/schemas/SessionNotFoundError"
  11106. }
  11107. ]
  11108. }
  11109. }
  11110. }
  11111. },
  11112. "500": {
  11113. "description": "UnknownError",
  11114. "content": {
  11115. "application/json": {
  11116. "schema": {
  11117. "$ref": "#/components/schemas/UnknownError1"
  11118. }
  11119. }
  11120. }
  11121. }
  11122. },
  11123. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  11124. "summary": "Get session context",
  11125. "x-codeSamples": [
  11126. {
  11127. "lang": "js",
  11128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  11129. }
  11130. ]
  11131. }
  11132. },
  11133. "/api/session/{sessionID}/history": {
  11134. "get": {
  11135. "tags": ["sessions"],
  11136. "operationId": "v2.session.history",
  11137. "parameters": [
  11138. {
  11139. "name": "sessionID",
  11140. "in": "path",
  11141. "schema": {
  11142. "type": "string",
  11143. "pattern": "^ses"
  11144. },
  11145. "required": true
  11146. },
  11147. {
  11148. "name": "limit",
  11149. "in": "query",
  11150. "schema": {
  11151. "type": "string"
  11152. },
  11153. "required": false
  11154. },
  11155. {
  11156. "name": "after",
  11157. "in": "query",
  11158. "schema": {
  11159. "type": "string"
  11160. },
  11161. "required": false
  11162. }
  11163. ],
  11164. "security": [],
  11165. "responses": {
  11166. "200": {
  11167. "description": "SessionHistory",
  11168. "content": {
  11169. "application/json": {
  11170. "schema": {
  11171. "$ref": "#/components/schemas/SessionHistory"
  11172. }
  11173. }
  11174. }
  11175. },
  11176. "400": {
  11177. "description": "InvalidRequestError",
  11178. "content": {
  11179. "application/json": {
  11180. "schema": {
  11181. "$ref": "#/components/schemas/InvalidRequestError"
  11182. }
  11183. }
  11184. }
  11185. },
  11186. "401": {
  11187. "description": "UnauthorizedError",
  11188. "content": {
  11189. "application/json": {
  11190. "schema": {
  11191. "$ref": "#/components/schemas/UnauthorizedError"
  11192. }
  11193. }
  11194. }
  11195. },
  11196. "404": {
  11197. "description": "SessionNotFoundError",
  11198. "content": {
  11199. "application/json": {
  11200. "schema": {
  11201. "anyOf": [
  11202. {
  11203. "$ref": "#/components/schemas/SessionNotFoundError"
  11204. },
  11205. {
  11206. "$ref": "#/components/schemas/SessionNotFoundError"
  11207. }
  11208. ]
  11209. }
  11210. }
  11211. }
  11212. }
  11213. },
  11214. "description": "Read one finite page of public durable Session events after an exclusive aggregate sequence. Newly committed events may appear on later pages.",
  11215. "summary": "Get session history",
  11216. "x-codeSamples": [
  11217. {
  11218. "lang": "js",
  11219. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.history({\n ...\n})"
  11220. }
  11221. ]
  11222. }
  11223. },
  11224. "/api/session/{sessionID}/event": {
  11225. "get": {
  11226. "tags": ["sessions"],
  11227. "operationId": "v2.session.events",
  11228. "parameters": [
  11229. {
  11230. "name": "sessionID",
  11231. "in": "path",
  11232. "schema": {
  11233. "type": "string",
  11234. "pattern": "^ses"
  11235. },
  11236. "required": true
  11237. },
  11238. {
  11239. "name": "after",
  11240. "in": "query",
  11241. "schema": {
  11242. "type": "string"
  11243. },
  11244. "required": false
  11245. }
  11246. ],
  11247. "security": [],
  11248. "responses": {
  11249. "200": {
  11250. "description": "Success",
  11251. "content": {
  11252. "text/event-stream": {
  11253. "schema": {
  11254. "type": "object",
  11255. "properties": {
  11256. "id": {
  11257. "type": "string"
  11258. },
  11259. "event": {
  11260. "type": "string"
  11261. },
  11262. "data": {
  11263. "$ref": "#/components/schemas/SessionDurableEventStream"
  11264. }
  11265. },
  11266. "required": ["id", "event", "data"],
  11267. "additionalProperties": false
  11268. },
  11269. "x-effect-stream": {
  11270. "encoding": "sse",
  11271. "causeSchema": {
  11272. "type": "array",
  11273. "items": {
  11274. "anyOf": [
  11275. {
  11276. "type": "object",
  11277. "properties": {
  11278. "_tag": {
  11279. "type": "string",
  11280. "enum": ["Fail"]
  11281. },
  11282. "error": {
  11283. "not": {}
  11284. }
  11285. },
  11286. "required": ["_tag", "error"],
  11287. "additionalProperties": false
  11288. },
  11289. {
  11290. "type": "object",
  11291. "properties": {
  11292. "_tag": {
  11293. "type": "string",
  11294. "enum": ["Die"]
  11295. },
  11296. "defect": {}
  11297. },
  11298. "required": ["_tag", "defect"],
  11299. "additionalProperties": false
  11300. },
  11301. {
  11302. "type": "object",
  11303. "properties": {
  11304. "_tag": {
  11305. "type": "string",
  11306. "enum": ["Interrupt"]
  11307. },
  11308. "fiberId": {
  11309. "anyOf": [
  11310. {
  11311. "type": "number"
  11312. },
  11313. {
  11314. "type": "null"
  11315. }
  11316. ]
  11317. }
  11318. },
  11319. "required": ["_tag", "fiberId"],
  11320. "additionalProperties": false
  11321. }
  11322. ]
  11323. }
  11324. },
  11325. "errorSchema": {
  11326. "not": {}
  11327. },
  11328. "failureEvent": "effect/httpapi/stream/failure"
  11329. }
  11330. }
  11331. }
  11332. },
  11333. "400": {
  11334. "description": "InvalidRequestError",
  11335. "content": {
  11336. "application/json": {
  11337. "schema": {
  11338. "$ref": "#/components/schemas/InvalidRequestError"
  11339. }
  11340. }
  11341. }
  11342. },
  11343. "401": {
  11344. "description": "UnauthorizedError",
  11345. "content": {
  11346. "application/json": {
  11347. "schema": {
  11348. "$ref": "#/components/schemas/UnauthorizedError"
  11349. }
  11350. }
  11351. }
  11352. },
  11353. "404": {
  11354. "description": "SessionNotFoundError",
  11355. "content": {
  11356. "application/json": {
  11357. "schema": {
  11358. "anyOf": [
  11359. {
  11360. "$ref": "#/components/schemas/SessionNotFoundError"
  11361. },
  11362. {
  11363. "$ref": "#/components/schemas/SessionNotFoundError"
  11364. }
  11365. ]
  11366. }
  11367. }
  11368. }
  11369. }
  11370. },
  11371. "description": "Replay durable events after an aggregate sequence, then continue with new durable events.",
  11372. "summary": "Subscribe to session events",
  11373. "x-codeSamples": [
  11374. {
  11375. "lang": "js",
  11376. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.events({\n ...\n})"
  11377. }
  11378. ]
  11379. }
  11380. },
  11381. "/api/session/{sessionID}/interrupt": {
  11382. "post": {
  11383. "tags": ["sessions"],
  11384. "operationId": "v2.session.interrupt",
  11385. "parameters": [
  11386. {
  11387. "name": "sessionID",
  11388. "in": "path",
  11389. "schema": {
  11390. "type": "string",
  11391. "pattern": "^ses"
  11392. },
  11393. "required": true
  11394. }
  11395. ],
  11396. "security": [],
  11397. "responses": {
  11398. "204": {
  11399. "description": "<No Content>"
  11400. },
  11401. "400": {
  11402. "description": "InvalidRequestError",
  11403. "content": {
  11404. "application/json": {
  11405. "schema": {
  11406. "$ref": "#/components/schemas/InvalidRequestError"
  11407. }
  11408. }
  11409. }
  11410. },
  11411. "401": {
  11412. "description": "UnauthorizedError",
  11413. "content": {
  11414. "application/json": {
  11415. "schema": {
  11416. "$ref": "#/components/schemas/UnauthorizedError"
  11417. }
  11418. }
  11419. }
  11420. },
  11421. "404": {
  11422. "description": "SessionNotFoundError",
  11423. "content": {
  11424. "application/json": {
  11425. "schema": {
  11426. "anyOf": [
  11427. {
  11428. "$ref": "#/components/schemas/SessionNotFoundError"
  11429. },
  11430. {
  11431. "$ref": "#/components/schemas/SessionNotFoundError"
  11432. }
  11433. ]
  11434. }
  11435. }
  11436. }
  11437. }
  11438. },
  11439. "description": "Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op.",
  11440. "summary": "Interrupt session execution",
  11441. "x-codeSamples": [
  11442. {
  11443. "lang": "js",
  11444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.interrupt({\n ...\n})"
  11445. }
  11446. ]
  11447. }
  11448. },
  11449. "/api/session/{sessionID}/message/{messageID}": {
  11450. "get": {
  11451. "tags": ["sessions"],
  11452. "operationId": "v2.session.message",
  11453. "parameters": [
  11454. {
  11455. "name": "sessionID",
  11456. "in": "path",
  11457. "schema": {
  11458. "type": "string",
  11459. "pattern": "^ses"
  11460. },
  11461. "required": true
  11462. },
  11463. {
  11464. "name": "messageID",
  11465. "in": "path",
  11466. "schema": {
  11467. "type": "string",
  11468. "pattern": "^msg_"
  11469. },
  11470. "required": true
  11471. }
  11472. ],
  11473. "security": [],
  11474. "responses": {
  11475. "200": {
  11476. "description": "Success",
  11477. "content": {
  11478. "application/json": {
  11479. "schema": {
  11480. "type": "object",
  11481. "properties": {
  11482. "data": {
  11483. "$ref": "#/components/schemas/SessionMessage"
  11484. }
  11485. },
  11486. "required": ["data"],
  11487. "additionalProperties": false
  11488. }
  11489. }
  11490. }
  11491. },
  11492. "400": {
  11493. "description": "InvalidRequestError",
  11494. "content": {
  11495. "application/json": {
  11496. "schema": {
  11497. "$ref": "#/components/schemas/InvalidRequestError"
  11498. }
  11499. }
  11500. }
  11501. },
  11502. "401": {
  11503. "description": "UnauthorizedError",
  11504. "content": {
  11505. "application/json": {
  11506. "schema": {
  11507. "$ref": "#/components/schemas/UnauthorizedError"
  11508. }
  11509. }
  11510. }
  11511. },
  11512. "404": {
  11513. "description": "SessionNotFoundError | MessageNotFoundError",
  11514. "content": {
  11515. "application/json": {
  11516. "schema": {
  11517. "anyOf": [
  11518. {
  11519. "$ref": "#/components/schemas/MessageNotFoundError"
  11520. },
  11521. {
  11522. "$ref": "#/components/schemas/SessionNotFoundError"
  11523. },
  11524. {
  11525. "$ref": "#/components/schemas/SessionNotFoundError"
  11526. }
  11527. ]
  11528. }
  11529. }
  11530. }
  11531. }
  11532. },
  11533. "description": "Retrieve one projected message owned by the Session.",
  11534. "summary": "Get session message",
  11535. "x-codeSamples": [
  11536. {
  11537. "lang": "js",
  11538. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.message({\n ...\n})"
  11539. }
  11540. ]
  11541. }
  11542. },
  11543. "/api/session/{sessionID}/message": {
  11544. "get": {
  11545. "tags": ["messages"],
  11546. "operationId": "v2.session.messages",
  11547. "parameters": [
  11548. {
  11549. "name": "sessionID",
  11550. "in": "path",
  11551. "schema": {
  11552. "type": "string",
  11553. "pattern": "^ses"
  11554. },
  11555. "required": true
  11556. },
  11557. {
  11558. "name": "limit",
  11559. "in": "query",
  11560. "schema": {
  11561. "type": "number"
  11562. },
  11563. "required": false
  11564. },
  11565. {
  11566. "name": "order",
  11567. "in": "query",
  11568. "schema": {
  11569. "type": "string",
  11570. "enum": ["asc", "desc"]
  11571. },
  11572. "required": false
  11573. },
  11574. {
  11575. "name": "cursor",
  11576. "in": "query",
  11577. "schema": {
  11578. "type": "string",
  11579. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  11580. },
  11581. "required": false
  11582. }
  11583. ],
  11584. "security": [],
  11585. "responses": {
  11586. "200": {
  11587. "description": "SessionMessagesResponse",
  11588. "content": {
  11589. "application/json": {
  11590. "schema": {
  11591. "$ref": "#/components/schemas/SessionMessagesResponse"
  11592. }
  11593. }
  11594. }
  11595. },
  11596. "400": {
  11597. "description": "InvalidCursorError | InvalidRequestError",
  11598. "content": {
  11599. "application/json": {
  11600. "schema": {
  11601. "anyOf": [
  11602. {
  11603. "$ref": "#/components/schemas/InvalidCursorError"
  11604. },
  11605. {
  11606. "$ref": "#/components/schemas/InvalidRequestError"
  11607. }
  11608. ]
  11609. }
  11610. }
  11611. }
  11612. },
  11613. "401": {
  11614. "description": "UnauthorizedError",
  11615. "content": {
  11616. "application/json": {
  11617. "schema": {
  11618. "$ref": "#/components/schemas/UnauthorizedError"
  11619. }
  11620. }
  11621. }
  11622. },
  11623. "404": {
  11624. "description": "SessionNotFoundError",
  11625. "content": {
  11626. "application/json": {
  11627. "schema": {
  11628. "anyOf": [
  11629. {
  11630. "$ref": "#/components/schemas/SessionNotFoundError"
  11631. },
  11632. {
  11633. "$ref": "#/components/schemas/SessionNotFoundError"
  11634. }
  11635. ]
  11636. }
  11637. }
  11638. }
  11639. },
  11640. "500": {
  11641. "description": "UnknownError",
  11642. "content": {
  11643. "application/json": {
  11644. "schema": {
  11645. "$ref": "#/components/schemas/UnknownError1"
  11646. }
  11647. }
  11648. }
  11649. }
  11650. },
  11651. "description": "Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  11652. "summary": "Get session messages",
  11653. "x-codeSamples": [
  11654. {
  11655. "lang": "js",
  11656. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  11657. }
  11658. ]
  11659. }
  11660. },
  11661. "/api/model": {
  11662. "get": {
  11663. "tags": ["models"],
  11664. "operationId": "v2.model.list",
  11665. "parameters": [
  11666. {
  11667. "name": "location",
  11668. "in": "query",
  11669. "schema": {
  11670. "type": "object",
  11671. "properties": {
  11672. "directory": {
  11673. "type": "string"
  11674. },
  11675. "workspace": {
  11676. "type": "string"
  11677. }
  11678. },
  11679. "additionalProperties": false
  11680. },
  11681. "required": false,
  11682. "style": "deepObject",
  11683. "explode": true
  11684. }
  11685. ],
  11686. "security": [],
  11687. "responses": {
  11688. "200": {
  11689. "description": "Success",
  11690. "content": {
  11691. "application/json": {
  11692. "schema": {
  11693. "type": "object",
  11694. "properties": {
  11695. "location": {
  11696. "$ref": "#/components/schemas/LocationInfo"
  11697. },
  11698. "data": {
  11699. "type": "array",
  11700. "items": {
  11701. "$ref": "#/components/schemas/ModelV2Info"
  11702. }
  11703. }
  11704. },
  11705. "required": ["location", "data"],
  11706. "additionalProperties": false
  11707. }
  11708. }
  11709. }
  11710. },
  11711. "400": {
  11712. "description": "InvalidRequestError",
  11713. "content": {
  11714. "application/json": {
  11715. "schema": {
  11716. "$ref": "#/components/schemas/InvalidRequestError"
  11717. }
  11718. }
  11719. }
  11720. },
  11721. "401": {
  11722. "description": "UnauthorizedError",
  11723. "content": {
  11724. "application/json": {
  11725. "schema": {
  11726. "$ref": "#/components/schemas/UnauthorizedError"
  11727. }
  11728. }
  11729. }
  11730. },
  11731. "503": {
  11732. "description": "ServiceUnavailableError",
  11733. "content": {
  11734. "application/json": {
  11735. "schema": {
  11736. "$ref": "#/components/schemas/ServiceUnavailableError"
  11737. }
  11738. }
  11739. }
  11740. }
  11741. },
  11742. "description": "Retrieve available models ordered by release date.",
  11743. "summary": "List models",
  11744. "x-codeSamples": [
  11745. {
  11746. "lang": "js",
  11747. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  11748. }
  11749. ]
  11750. }
  11751. },
  11752. "/api/provider": {
  11753. "get": {
  11754. "tags": ["providers"],
  11755. "operationId": "v2.provider.list",
  11756. "parameters": [
  11757. {
  11758. "name": "location",
  11759. "in": "query",
  11760. "schema": {
  11761. "type": "object",
  11762. "properties": {
  11763. "directory": {
  11764. "type": "string"
  11765. },
  11766. "workspace": {
  11767. "type": "string"
  11768. }
  11769. },
  11770. "additionalProperties": false
  11771. },
  11772. "required": false,
  11773. "style": "deepObject",
  11774. "explode": true
  11775. }
  11776. ],
  11777. "security": [],
  11778. "responses": {
  11779. "200": {
  11780. "description": "Success",
  11781. "content": {
  11782. "application/json": {
  11783. "schema": {
  11784. "type": "object",
  11785. "properties": {
  11786. "location": {
  11787. "$ref": "#/components/schemas/LocationInfo"
  11788. },
  11789. "data": {
  11790. "type": "array",
  11791. "items": {
  11792. "$ref": "#/components/schemas/ProviderV2Info"
  11793. }
  11794. }
  11795. },
  11796. "required": ["location", "data"],
  11797. "additionalProperties": false
  11798. }
  11799. }
  11800. }
  11801. },
  11802. "400": {
  11803. "description": "InvalidRequestError",
  11804. "content": {
  11805. "application/json": {
  11806. "schema": {
  11807. "$ref": "#/components/schemas/InvalidRequestError"
  11808. }
  11809. }
  11810. }
  11811. },
  11812. "401": {
  11813. "description": "UnauthorizedError",
  11814. "content": {
  11815. "application/json": {
  11816. "schema": {
  11817. "$ref": "#/components/schemas/UnauthorizedError"
  11818. }
  11819. }
  11820. }
  11821. },
  11822. "503": {
  11823. "description": "ServiceUnavailableError",
  11824. "content": {
  11825. "application/json": {
  11826. "schema": {
  11827. "$ref": "#/components/schemas/ServiceUnavailableError"
  11828. }
  11829. }
  11830. }
  11831. }
  11832. },
  11833. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11834. "summary": "List providers",
  11835. "x-codeSamples": [
  11836. {
  11837. "lang": "js",
  11838. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11839. }
  11840. ]
  11841. }
  11842. },
  11843. "/api/provider/{providerID}": {
  11844. "get": {
  11845. "tags": ["providers"],
  11846. "operationId": "v2.provider.get",
  11847. "parameters": [
  11848. {
  11849. "name": "providerID",
  11850. "in": "path",
  11851. "schema": {
  11852. "type": "string"
  11853. },
  11854. "required": true
  11855. },
  11856. {
  11857. "name": "location",
  11858. "in": "query",
  11859. "schema": {
  11860. "type": "object",
  11861. "properties": {
  11862. "directory": {
  11863. "type": "string"
  11864. },
  11865. "workspace": {
  11866. "type": "string"
  11867. }
  11868. },
  11869. "additionalProperties": false
  11870. },
  11871. "required": false,
  11872. "style": "deepObject",
  11873. "explode": true
  11874. }
  11875. ],
  11876. "security": [],
  11877. "responses": {
  11878. "200": {
  11879. "description": "Success",
  11880. "content": {
  11881. "application/json": {
  11882. "schema": {
  11883. "type": "object",
  11884. "properties": {
  11885. "location": {
  11886. "$ref": "#/components/schemas/LocationInfo"
  11887. },
  11888. "data": {
  11889. "$ref": "#/components/schemas/ProviderV2Info"
  11890. }
  11891. },
  11892. "required": ["location", "data"],
  11893. "additionalProperties": false
  11894. }
  11895. }
  11896. }
  11897. },
  11898. "400": {
  11899. "description": "InvalidRequestError",
  11900. "content": {
  11901. "application/json": {
  11902. "schema": {
  11903. "$ref": "#/components/schemas/InvalidRequestError"
  11904. }
  11905. }
  11906. }
  11907. },
  11908. "401": {
  11909. "description": "UnauthorizedError",
  11910. "content": {
  11911. "application/json": {
  11912. "schema": {
  11913. "$ref": "#/components/schemas/UnauthorizedError"
  11914. }
  11915. }
  11916. }
  11917. },
  11918. "404": {
  11919. "description": "ProviderNotFoundError",
  11920. "content": {
  11921. "application/json": {
  11922. "schema": {
  11923. "$ref": "#/components/schemas/ProviderNotFoundError"
  11924. }
  11925. }
  11926. }
  11927. },
  11928. "503": {
  11929. "description": "ServiceUnavailableError",
  11930. "content": {
  11931. "application/json": {
  11932. "schema": {
  11933. "$ref": "#/components/schemas/ServiceUnavailableError"
  11934. }
  11935. }
  11936. }
  11937. }
  11938. },
  11939. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11940. "summary": "Get provider",
  11941. "x-codeSamples": [
  11942. {
  11943. "lang": "js",
  11944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11945. }
  11946. ]
  11947. }
  11948. },
  11949. "/api/integration": {
  11950. "get": {
  11951. "tags": ["integrations"],
  11952. "operationId": "v2.integration.list",
  11953. "parameters": [
  11954. {
  11955. "name": "location",
  11956. "in": "query",
  11957. "schema": {
  11958. "type": "object",
  11959. "properties": {
  11960. "directory": {
  11961. "type": "string"
  11962. },
  11963. "workspace": {
  11964. "type": "string"
  11965. }
  11966. },
  11967. "additionalProperties": false
  11968. },
  11969. "required": false,
  11970. "style": "deepObject",
  11971. "explode": true
  11972. }
  11973. ],
  11974. "security": [],
  11975. "responses": {
  11976. "200": {
  11977. "description": "Success",
  11978. "content": {
  11979. "application/json": {
  11980. "schema": {
  11981. "type": "object",
  11982. "properties": {
  11983. "location": {
  11984. "$ref": "#/components/schemas/LocationInfo"
  11985. },
  11986. "data": {
  11987. "type": "array",
  11988. "items": {
  11989. "$ref": "#/components/schemas/IntegrationInfo"
  11990. }
  11991. }
  11992. },
  11993. "required": ["location", "data"],
  11994. "additionalProperties": false
  11995. }
  11996. }
  11997. }
  11998. },
  11999. "400": {
  12000. "description": "InvalidRequestError",
  12001. "content": {
  12002. "application/json": {
  12003. "schema": {
  12004. "$ref": "#/components/schemas/InvalidRequestError"
  12005. }
  12006. }
  12007. }
  12008. },
  12009. "401": {
  12010. "description": "UnauthorizedError",
  12011. "content": {
  12012. "application/json": {
  12013. "schema": {
  12014. "$ref": "#/components/schemas/UnauthorizedError"
  12015. }
  12016. }
  12017. }
  12018. }
  12019. },
  12020. "description": "Retrieve available integrations and their authentication methods.",
  12021. "summary": "List integrations",
  12022. "x-codeSamples": [
  12023. {
  12024. "lang": "js",
  12025. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  12026. }
  12027. ]
  12028. }
  12029. },
  12030. "/api/integration/{integrationID}": {
  12031. "get": {
  12032. "tags": ["integrations"],
  12033. "operationId": "v2.integration.get",
  12034. "parameters": [
  12035. {
  12036. "name": "integrationID",
  12037. "in": "path",
  12038. "schema": {
  12039. "type": "string"
  12040. },
  12041. "required": true
  12042. },
  12043. {
  12044. "name": "location",
  12045. "in": "query",
  12046. "schema": {
  12047. "type": "object",
  12048. "properties": {
  12049. "directory": {
  12050. "type": "string"
  12051. },
  12052. "workspace": {
  12053. "type": "string"
  12054. }
  12055. },
  12056. "additionalProperties": false
  12057. },
  12058. "required": false,
  12059. "style": "deepObject",
  12060. "explode": true
  12061. }
  12062. ],
  12063. "security": [],
  12064. "responses": {
  12065. "200": {
  12066. "description": "Success",
  12067. "content": {
  12068. "application/json": {
  12069. "schema": {
  12070. "type": "object",
  12071. "properties": {
  12072. "location": {
  12073. "$ref": "#/components/schemas/LocationInfo"
  12074. },
  12075. "data": {
  12076. "$ref": "#/components/schemas/IntegrationInfo"
  12077. }
  12078. },
  12079. "required": ["location", "data"],
  12080. "additionalProperties": false
  12081. }
  12082. }
  12083. }
  12084. },
  12085. "400": {
  12086. "description": "InvalidRequestError",
  12087. "content": {
  12088. "application/json": {
  12089. "schema": {
  12090. "$ref": "#/components/schemas/InvalidRequestError"
  12091. }
  12092. }
  12093. }
  12094. },
  12095. "401": {
  12096. "description": "UnauthorizedError",
  12097. "content": {
  12098. "application/json": {
  12099. "schema": {
  12100. "$ref": "#/components/schemas/UnauthorizedError"
  12101. }
  12102. }
  12103. }
  12104. }
  12105. },
  12106. "description": "Retrieve one integration and its authentication methods.",
  12107. "summary": "Get integration",
  12108. "x-codeSamples": [
  12109. {
  12110. "lang": "js",
  12111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  12112. }
  12113. ]
  12114. }
  12115. },
  12116. "/api/integration/{integrationID}/connect/key": {
  12117. "post": {
  12118. "tags": ["integrations"],
  12119. "operationId": "v2.integration.connect.key",
  12120. "parameters": [
  12121. {
  12122. "name": "integrationID",
  12123. "in": "path",
  12124. "schema": {
  12125. "type": "string"
  12126. },
  12127. "required": true
  12128. },
  12129. {
  12130. "name": "location",
  12131. "in": "query",
  12132. "schema": {
  12133. "type": "object",
  12134. "properties": {
  12135. "directory": {
  12136. "type": "string"
  12137. },
  12138. "workspace": {
  12139. "type": "string"
  12140. }
  12141. },
  12142. "additionalProperties": false
  12143. },
  12144. "required": false,
  12145. "style": "deepObject",
  12146. "explode": true
  12147. }
  12148. ],
  12149. "security": [],
  12150. "responses": {
  12151. "204": {
  12152. "description": "<No Content>"
  12153. },
  12154. "400": {
  12155. "description": "InvalidRequestError",
  12156. "content": {
  12157. "application/json": {
  12158. "schema": {
  12159. "anyOf": [
  12160. {
  12161. "$ref": "#/components/schemas/InvalidRequestError"
  12162. },
  12163. {
  12164. "$ref": "#/components/schemas/InvalidRequestError"
  12165. }
  12166. ]
  12167. }
  12168. }
  12169. }
  12170. },
  12171. "401": {
  12172. "description": "UnauthorizedError",
  12173. "content": {
  12174. "application/json": {
  12175. "schema": {
  12176. "$ref": "#/components/schemas/UnauthorizedError"
  12177. }
  12178. }
  12179. }
  12180. }
  12181. },
  12182. "description": "Run a key authentication method and store the resulting credential.",
  12183. "summary": "Connect with key",
  12184. "requestBody": {
  12185. "content": {
  12186. "application/json": {
  12187. "schema": {
  12188. "type": "object",
  12189. "properties": {
  12190. "key": {
  12191. "type": "string"
  12192. },
  12193. "label": {
  12194. "type": "string"
  12195. }
  12196. },
  12197. "required": ["key"],
  12198. "additionalProperties": false
  12199. }
  12200. }
  12201. },
  12202. "required": true
  12203. },
  12204. "x-codeSamples": [
  12205. {
  12206. "lang": "js",
  12207. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  12208. }
  12209. ]
  12210. }
  12211. },
  12212. "/api/integration/{integrationID}/connect/oauth": {
  12213. "post": {
  12214. "tags": ["integrations"],
  12215. "operationId": "v2.integration.connect.oauth",
  12216. "parameters": [
  12217. {
  12218. "name": "integrationID",
  12219. "in": "path",
  12220. "schema": {
  12221. "type": "string"
  12222. },
  12223. "required": true
  12224. },
  12225. {
  12226. "name": "location",
  12227. "in": "query",
  12228. "schema": {
  12229. "type": "object",
  12230. "properties": {
  12231. "directory": {
  12232. "type": "string"
  12233. },
  12234. "workspace": {
  12235. "type": "string"
  12236. }
  12237. },
  12238. "additionalProperties": false
  12239. },
  12240. "required": false,
  12241. "style": "deepObject",
  12242. "explode": true
  12243. }
  12244. ],
  12245. "security": [],
  12246. "responses": {
  12247. "200": {
  12248. "description": "Success",
  12249. "content": {
  12250. "application/json": {
  12251. "schema": {
  12252. "type": "object",
  12253. "properties": {
  12254. "location": {
  12255. "$ref": "#/components/schemas/LocationInfo"
  12256. },
  12257. "data": {
  12258. "$ref": "#/components/schemas/IntegrationAttempt"
  12259. }
  12260. },
  12261. "required": ["location", "data"],
  12262. "additionalProperties": false
  12263. }
  12264. }
  12265. }
  12266. },
  12267. "400": {
  12268. "description": "InvalidRequestError",
  12269. "content": {
  12270. "application/json": {
  12271. "schema": {
  12272. "anyOf": [
  12273. {
  12274. "$ref": "#/components/schemas/InvalidRequestError"
  12275. },
  12276. {
  12277. "$ref": "#/components/schemas/InvalidRequestError"
  12278. }
  12279. ]
  12280. }
  12281. }
  12282. }
  12283. },
  12284. "401": {
  12285. "description": "UnauthorizedError",
  12286. "content": {
  12287. "application/json": {
  12288. "schema": {
  12289. "$ref": "#/components/schemas/UnauthorizedError"
  12290. }
  12291. }
  12292. }
  12293. }
  12294. },
  12295. "description": "Start an OAuth attempt and return the authorization details.",
  12296. "summary": "Begin OAuth connection",
  12297. "requestBody": {
  12298. "content": {
  12299. "application/json": {
  12300. "schema": {
  12301. "type": "object",
  12302. "properties": {
  12303. "methodID": {
  12304. "type": "string"
  12305. },
  12306. "inputs": {
  12307. "type": "object",
  12308. "additionalProperties": {
  12309. "type": "string"
  12310. }
  12311. },
  12312. "label": {
  12313. "type": "string"
  12314. }
  12315. },
  12316. "required": ["methodID", "inputs"],
  12317. "additionalProperties": false
  12318. }
  12319. }
  12320. },
  12321. "required": true
  12322. },
  12323. "x-codeSamples": [
  12324. {
  12325. "lang": "js",
  12326. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  12327. }
  12328. ]
  12329. }
  12330. },
  12331. "/api/integration/attempt/{attemptID}": {
  12332. "get": {
  12333. "tags": ["integrations"],
  12334. "operationId": "v2.integration.attempt.status",
  12335. "parameters": [
  12336. {
  12337. "name": "attemptID",
  12338. "in": "path",
  12339. "schema": {
  12340. "type": "string"
  12341. },
  12342. "required": true
  12343. },
  12344. {
  12345. "name": "location",
  12346. "in": "query",
  12347. "schema": {
  12348. "type": "object",
  12349. "properties": {
  12350. "directory": {
  12351. "type": "string"
  12352. },
  12353. "workspace": {
  12354. "type": "string"
  12355. }
  12356. },
  12357. "additionalProperties": false
  12358. },
  12359. "required": false,
  12360. "style": "deepObject",
  12361. "explode": true
  12362. }
  12363. ],
  12364. "security": [],
  12365. "responses": {
  12366. "200": {
  12367. "description": "Success",
  12368. "content": {
  12369. "application/json": {
  12370. "schema": {
  12371. "type": "object",
  12372. "properties": {
  12373. "location": {
  12374. "$ref": "#/components/schemas/LocationInfo"
  12375. },
  12376. "data": {
  12377. "$ref": "#/components/schemas/IntegrationAttemptStatus"
  12378. }
  12379. },
  12380. "required": ["location", "data"],
  12381. "additionalProperties": false
  12382. }
  12383. }
  12384. }
  12385. },
  12386. "400": {
  12387. "description": "InvalidRequestError",
  12388. "content": {
  12389. "application/json": {
  12390. "schema": {
  12391. "$ref": "#/components/schemas/InvalidRequestError"
  12392. }
  12393. }
  12394. }
  12395. },
  12396. "401": {
  12397. "description": "UnauthorizedError",
  12398. "content": {
  12399. "application/json": {
  12400. "schema": {
  12401. "$ref": "#/components/schemas/UnauthorizedError"
  12402. }
  12403. }
  12404. }
  12405. }
  12406. },
  12407. "description": "Poll the current status of an OAuth attempt.",
  12408. "summary": "Get OAuth attempt status",
  12409. "x-codeSamples": [
  12410. {
  12411. "lang": "js",
  12412. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  12413. }
  12414. ]
  12415. },
  12416. "delete": {
  12417. "tags": ["integrations"],
  12418. "operationId": "v2.integration.attempt.cancel",
  12419. "parameters": [
  12420. {
  12421. "name": "attemptID",
  12422. "in": "path",
  12423. "schema": {
  12424. "type": "string"
  12425. },
  12426. "required": true
  12427. },
  12428. {
  12429. "name": "location",
  12430. "in": "query",
  12431. "schema": {
  12432. "type": "object",
  12433. "properties": {
  12434. "directory": {
  12435. "type": "string"
  12436. },
  12437. "workspace": {
  12438. "type": "string"
  12439. }
  12440. },
  12441. "additionalProperties": false
  12442. },
  12443. "required": false,
  12444. "style": "deepObject",
  12445. "explode": true
  12446. }
  12447. ],
  12448. "security": [],
  12449. "responses": {
  12450. "204": {
  12451. "description": "<No Content>"
  12452. },
  12453. "400": {
  12454. "description": "InvalidRequestError",
  12455. "content": {
  12456. "application/json": {
  12457. "schema": {
  12458. "$ref": "#/components/schemas/InvalidRequestError"
  12459. }
  12460. }
  12461. }
  12462. },
  12463. "401": {
  12464. "description": "UnauthorizedError",
  12465. "content": {
  12466. "application/json": {
  12467. "schema": {
  12468. "$ref": "#/components/schemas/UnauthorizedError"
  12469. }
  12470. }
  12471. }
  12472. }
  12473. },
  12474. "description": "Cancel an OAuth attempt and release its resources.",
  12475. "summary": "Cancel OAuth connection",
  12476. "x-codeSamples": [
  12477. {
  12478. "lang": "js",
  12479. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  12480. }
  12481. ]
  12482. }
  12483. },
  12484. "/api/integration/attempt/{attemptID}/complete": {
  12485. "post": {
  12486. "tags": ["integrations"],
  12487. "operationId": "v2.integration.attempt.complete",
  12488. "parameters": [
  12489. {
  12490. "name": "attemptID",
  12491. "in": "path",
  12492. "schema": {
  12493. "type": "string"
  12494. },
  12495. "required": true
  12496. },
  12497. {
  12498. "name": "location",
  12499. "in": "query",
  12500. "schema": {
  12501. "type": "object",
  12502. "properties": {
  12503. "directory": {
  12504. "type": "string"
  12505. },
  12506. "workspace": {
  12507. "type": "string"
  12508. }
  12509. },
  12510. "additionalProperties": false
  12511. },
  12512. "required": false,
  12513. "style": "deepObject",
  12514. "explode": true
  12515. }
  12516. ],
  12517. "security": [],
  12518. "responses": {
  12519. "204": {
  12520. "description": "<No Content>"
  12521. },
  12522. "400": {
  12523. "description": "InvalidRequestError",
  12524. "content": {
  12525. "application/json": {
  12526. "schema": {
  12527. "anyOf": [
  12528. {
  12529. "$ref": "#/components/schemas/InvalidRequestError"
  12530. },
  12531. {
  12532. "$ref": "#/components/schemas/InvalidRequestError"
  12533. }
  12534. ]
  12535. }
  12536. }
  12537. }
  12538. },
  12539. "401": {
  12540. "description": "UnauthorizedError",
  12541. "content": {
  12542. "application/json": {
  12543. "schema": {
  12544. "$ref": "#/components/schemas/UnauthorizedError"
  12545. }
  12546. }
  12547. }
  12548. }
  12549. },
  12550. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12551. "summary": "Complete OAuth connection",
  12552. "requestBody": {
  12553. "content": {
  12554. "application/json": {
  12555. "schema": {
  12556. "type": "object",
  12557. "properties": {
  12558. "code": {
  12559. "type": "string"
  12560. }
  12561. },
  12562. "additionalProperties": false
  12563. }
  12564. }
  12565. },
  12566. "required": true
  12567. },
  12568. "x-codeSamples": [
  12569. {
  12570. "lang": "js",
  12571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  12572. }
  12573. ]
  12574. }
  12575. },
  12576. "/api/credential/{credentialID}": {
  12577. "patch": {
  12578. "tags": ["opencode HttpApi"],
  12579. "operationId": "v2.credential.update",
  12580. "parameters": [
  12581. {
  12582. "name": "credentialID",
  12583. "in": "path",
  12584. "schema": {
  12585. "type": "string"
  12586. },
  12587. "required": true
  12588. },
  12589. {
  12590. "name": "location",
  12591. "in": "query",
  12592. "schema": {
  12593. "type": "object",
  12594. "properties": {
  12595. "directory": {
  12596. "type": "string"
  12597. },
  12598. "workspace": {
  12599. "type": "string"
  12600. }
  12601. },
  12602. "additionalProperties": false
  12603. },
  12604. "required": false,
  12605. "style": "deepObject",
  12606. "explode": true
  12607. }
  12608. ],
  12609. "security": [],
  12610. "responses": {
  12611. "204": {
  12612. "description": "<No Content>"
  12613. },
  12614. "400": {
  12615. "description": "InvalidRequestError",
  12616. "content": {
  12617. "application/json": {
  12618. "schema": {
  12619. "$ref": "#/components/schemas/InvalidRequestError"
  12620. }
  12621. }
  12622. }
  12623. },
  12624. "401": {
  12625. "description": "UnauthorizedError",
  12626. "content": {
  12627. "application/json": {
  12628. "schema": {
  12629. "$ref": "#/components/schemas/UnauthorizedError"
  12630. }
  12631. }
  12632. }
  12633. }
  12634. },
  12635. "description": "Update a stored credential label.",
  12636. "summary": "Update credential",
  12637. "requestBody": {
  12638. "content": {
  12639. "application/json": {
  12640. "schema": {
  12641. "type": "object",
  12642. "properties": {
  12643. "label": {
  12644. "type": "string"
  12645. }
  12646. },
  12647. "required": ["label"],
  12648. "additionalProperties": false
  12649. }
  12650. }
  12651. },
  12652. "required": true
  12653. },
  12654. "x-codeSamples": [
  12655. {
  12656. "lang": "js",
  12657. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12658. }
  12659. ]
  12660. },
  12661. "delete": {
  12662. "tags": ["opencode HttpApi"],
  12663. "operationId": "v2.credential.remove",
  12664. "parameters": [
  12665. {
  12666. "name": "credentialID",
  12667. "in": "path",
  12668. "schema": {
  12669. "type": "string"
  12670. },
  12671. "required": true
  12672. },
  12673. {
  12674. "name": "location",
  12675. "in": "query",
  12676. "schema": {
  12677. "type": "object",
  12678. "properties": {
  12679. "directory": {
  12680. "type": "string"
  12681. },
  12682. "workspace": {
  12683. "type": "string"
  12684. }
  12685. },
  12686. "additionalProperties": false
  12687. },
  12688. "required": false,
  12689. "style": "deepObject",
  12690. "explode": true
  12691. }
  12692. ],
  12693. "security": [],
  12694. "responses": {
  12695. "204": {
  12696. "description": "<No Content>"
  12697. },
  12698. "400": {
  12699. "description": "InvalidRequestError",
  12700. "content": {
  12701. "application/json": {
  12702. "schema": {
  12703. "$ref": "#/components/schemas/InvalidRequestError"
  12704. }
  12705. }
  12706. }
  12707. },
  12708. "401": {
  12709. "description": "UnauthorizedError",
  12710. "content": {
  12711. "application/json": {
  12712. "schema": {
  12713. "$ref": "#/components/schemas/UnauthorizedError"
  12714. }
  12715. }
  12716. }
  12717. }
  12718. },
  12719. "description": "Remove a stored integration credential.",
  12720. "summary": "Remove credential",
  12721. "x-codeSamples": [
  12722. {
  12723. "lang": "js",
  12724. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12725. }
  12726. ]
  12727. }
  12728. },
  12729. "/api/permission/request": {
  12730. "get": {
  12731. "tags": ["permissions"],
  12732. "operationId": "v2.permission.request.list",
  12733. "parameters": [
  12734. {
  12735. "name": "location",
  12736. "in": "query",
  12737. "schema": {
  12738. "type": "object",
  12739. "properties": {
  12740. "directory": {
  12741. "type": "string"
  12742. },
  12743. "workspace": {
  12744. "type": "string"
  12745. }
  12746. },
  12747. "additionalProperties": false
  12748. },
  12749. "required": false,
  12750. "style": "deepObject",
  12751. "explode": true
  12752. }
  12753. ],
  12754. "security": [],
  12755. "responses": {
  12756. "200": {
  12757. "description": "Success",
  12758. "content": {
  12759. "application/json": {
  12760. "schema": {
  12761. "type": "object",
  12762. "properties": {
  12763. "location": {
  12764. "$ref": "#/components/schemas/LocationInfo"
  12765. },
  12766. "data": {
  12767. "type": "array",
  12768. "items": {
  12769. "$ref": "#/components/schemas/PermissionV2Request"
  12770. }
  12771. }
  12772. },
  12773. "required": ["location", "data"],
  12774. "additionalProperties": false
  12775. }
  12776. }
  12777. }
  12778. },
  12779. "400": {
  12780. "description": "InvalidRequestError",
  12781. "content": {
  12782. "application/json": {
  12783. "schema": {
  12784. "$ref": "#/components/schemas/InvalidRequestError"
  12785. }
  12786. }
  12787. }
  12788. },
  12789. "401": {
  12790. "description": "UnauthorizedError",
  12791. "content": {
  12792. "application/json": {
  12793. "schema": {
  12794. "$ref": "#/components/schemas/UnauthorizedError"
  12795. }
  12796. }
  12797. }
  12798. }
  12799. },
  12800. "description": "Retrieve pending permission requests for a location.",
  12801. "summary": "List pending permission requests",
  12802. "x-codeSamples": [
  12803. {
  12804. "lang": "js",
  12805. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12806. }
  12807. ]
  12808. }
  12809. },
  12810. "/api/permission/saved": {
  12811. "get": {
  12812. "tags": ["permissions"],
  12813. "operationId": "v2.permission.saved.list",
  12814. "parameters": [
  12815. {
  12816. "name": "projectID",
  12817. "in": "query",
  12818. "schema": {
  12819. "type": "string"
  12820. },
  12821. "required": false
  12822. }
  12823. ],
  12824. "security": [],
  12825. "responses": {
  12826. "200": {
  12827. "description": "Success",
  12828. "content": {
  12829. "application/json": {
  12830. "schema": {
  12831. "type": "object",
  12832. "properties": {
  12833. "data": {
  12834. "type": "array",
  12835. "items": {
  12836. "$ref": "#/components/schemas/PermissionSavedInfo"
  12837. }
  12838. }
  12839. },
  12840. "required": ["data"],
  12841. "additionalProperties": false
  12842. }
  12843. }
  12844. }
  12845. },
  12846. "400": {
  12847. "description": "InvalidRequestError",
  12848. "content": {
  12849. "application/json": {
  12850. "schema": {
  12851. "$ref": "#/components/schemas/InvalidRequestError"
  12852. }
  12853. }
  12854. }
  12855. },
  12856. "401": {
  12857. "description": "UnauthorizedError",
  12858. "content": {
  12859. "application/json": {
  12860. "schema": {
  12861. "$ref": "#/components/schemas/UnauthorizedError"
  12862. }
  12863. }
  12864. }
  12865. }
  12866. },
  12867. "description": "Retrieve saved permissions, optionally filtered by project.",
  12868. "summary": "List saved permissions",
  12869. "x-codeSamples": [
  12870. {
  12871. "lang": "js",
  12872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12873. }
  12874. ]
  12875. }
  12876. },
  12877. "/api/permission/saved/{id}": {
  12878. "delete": {
  12879. "tags": ["permissions"],
  12880. "operationId": "v2.permission.saved.remove",
  12881. "parameters": [
  12882. {
  12883. "name": "id",
  12884. "in": "path",
  12885. "schema": {
  12886. "type": "string"
  12887. },
  12888. "required": true
  12889. }
  12890. ],
  12891. "security": [],
  12892. "responses": {
  12893. "204": {
  12894. "description": "<No Content>"
  12895. },
  12896. "400": {
  12897. "description": "InvalidRequestError",
  12898. "content": {
  12899. "application/json": {
  12900. "schema": {
  12901. "$ref": "#/components/schemas/InvalidRequestError"
  12902. }
  12903. }
  12904. }
  12905. },
  12906. "401": {
  12907. "description": "UnauthorizedError",
  12908. "content": {
  12909. "application/json": {
  12910. "schema": {
  12911. "$ref": "#/components/schemas/UnauthorizedError"
  12912. }
  12913. }
  12914. }
  12915. }
  12916. },
  12917. "description": "Remove a saved permission by ID.",
  12918. "summary": "Remove saved permission",
  12919. "x-codeSamples": [
  12920. {
  12921. "lang": "js",
  12922. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12923. }
  12924. ]
  12925. }
  12926. },
  12927. "/api/session/{sessionID}/permission": {
  12928. "post": {
  12929. "tags": ["permissions"],
  12930. "operationId": "v2.session.permission.create",
  12931. "parameters": [
  12932. {
  12933. "name": "sessionID",
  12934. "in": "path",
  12935. "schema": {
  12936. "type": "string",
  12937. "pattern": "^ses"
  12938. },
  12939. "required": true
  12940. }
  12941. ],
  12942. "security": [],
  12943. "responses": {
  12944. "200": {
  12945. "description": "Success",
  12946. "content": {
  12947. "application/json": {
  12948. "schema": {
  12949. "type": "object",
  12950. "properties": {
  12951. "data": {
  12952. "type": "object",
  12953. "properties": {
  12954. "id": {
  12955. "type": "string",
  12956. "pattern": "^per"
  12957. },
  12958. "effect": {
  12959. "$ref": "#/components/schemas/PermissionV2Effect"
  12960. }
  12961. },
  12962. "required": ["id", "effect"],
  12963. "additionalProperties": false
  12964. }
  12965. },
  12966. "required": ["data"],
  12967. "additionalProperties": false
  12968. }
  12969. }
  12970. }
  12971. },
  12972. "400": {
  12973. "description": "InvalidRequestError",
  12974. "content": {
  12975. "application/json": {
  12976. "schema": {
  12977. "$ref": "#/components/schemas/InvalidRequestError"
  12978. }
  12979. }
  12980. }
  12981. },
  12982. "401": {
  12983. "description": "UnauthorizedError",
  12984. "content": {
  12985. "application/json": {
  12986. "schema": {
  12987. "$ref": "#/components/schemas/UnauthorizedError"
  12988. }
  12989. }
  12990. }
  12991. },
  12992. "404": {
  12993. "description": "SessionNotFoundError",
  12994. "content": {
  12995. "application/json": {
  12996. "schema": {
  12997. "anyOf": [
  12998. {
  12999. "$ref": "#/components/schemas/SessionNotFoundError"
  13000. },
  13001. {
  13002. "$ref": "#/components/schemas/SessionNotFoundError"
  13003. }
  13004. ]
  13005. }
  13006. }
  13007. }
  13008. }
  13009. },
  13010. "description": "Evaluate and, when approval is required, create a permission request for a session.",
  13011. "summary": "Create permission request",
  13012. "requestBody": {
  13013. "content": {
  13014. "application/json": {
  13015. "schema": {
  13016. "type": "object",
  13017. "properties": {
  13018. "id": {
  13019. "type": "string",
  13020. "pattern": "^per"
  13021. },
  13022. "action": {
  13023. "type": "string"
  13024. },
  13025. "resources": {
  13026. "type": "array",
  13027. "items": {
  13028. "type": "string"
  13029. }
  13030. },
  13031. "save": {
  13032. "type": "array",
  13033. "items": {
  13034. "type": "string"
  13035. }
  13036. },
  13037. "metadata": {
  13038. "type": "object"
  13039. },
  13040. "source": {
  13041. "$ref": "#/components/schemas/PermissionV2Source"
  13042. },
  13043. "agent": {
  13044. "type": "string"
  13045. }
  13046. },
  13047. "required": ["action", "resources"],
  13048. "additionalProperties": false
  13049. }
  13050. }
  13051. },
  13052. "required": true
  13053. },
  13054. "x-codeSamples": [
  13055. {
  13056. "lang": "js",
  13057. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.create({\n ...\n})"
  13058. }
  13059. ]
  13060. },
  13061. "get": {
  13062. "tags": ["permissions"],
  13063. "operationId": "v2.session.permission.list",
  13064. "parameters": [
  13065. {
  13066. "name": "sessionID",
  13067. "in": "path",
  13068. "schema": {
  13069. "type": "string",
  13070. "pattern": "^ses"
  13071. },
  13072. "required": true
  13073. }
  13074. ],
  13075. "security": [],
  13076. "responses": {
  13077. "200": {
  13078. "description": "Success",
  13079. "content": {
  13080. "application/json": {
  13081. "schema": {
  13082. "type": "object",
  13083. "properties": {
  13084. "data": {
  13085. "type": "array",
  13086. "items": {
  13087. "$ref": "#/components/schemas/PermissionV2Request"
  13088. }
  13089. }
  13090. },
  13091. "required": ["data"],
  13092. "additionalProperties": false
  13093. }
  13094. }
  13095. }
  13096. },
  13097. "400": {
  13098. "description": "InvalidRequestError",
  13099. "content": {
  13100. "application/json": {
  13101. "schema": {
  13102. "$ref": "#/components/schemas/InvalidRequestError"
  13103. }
  13104. }
  13105. }
  13106. },
  13107. "401": {
  13108. "description": "UnauthorizedError",
  13109. "content": {
  13110. "application/json": {
  13111. "schema": {
  13112. "$ref": "#/components/schemas/UnauthorizedError"
  13113. }
  13114. }
  13115. }
  13116. },
  13117. "404": {
  13118. "description": "SessionNotFoundError",
  13119. "content": {
  13120. "application/json": {
  13121. "schema": {
  13122. "anyOf": [
  13123. {
  13124. "$ref": "#/components/schemas/SessionNotFoundError"
  13125. },
  13126. {
  13127. "$ref": "#/components/schemas/SessionNotFoundError"
  13128. }
  13129. ]
  13130. }
  13131. }
  13132. }
  13133. }
  13134. },
  13135. "description": "Retrieve pending permission requests owned by a session.",
  13136. "summary": "List session permission requests",
  13137. "x-codeSamples": [
  13138. {
  13139. "lang": "js",
  13140. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  13141. }
  13142. ]
  13143. }
  13144. },
  13145. "/api/session/{sessionID}/permission/{requestID}": {
  13146. "get": {
  13147. "tags": ["permissions"],
  13148. "operationId": "v2.session.permission.get",
  13149. "parameters": [
  13150. {
  13151. "name": "sessionID",
  13152. "in": "path",
  13153. "schema": {
  13154. "type": "string",
  13155. "pattern": "^ses"
  13156. },
  13157. "required": true
  13158. },
  13159. {
  13160. "name": "requestID",
  13161. "in": "path",
  13162. "schema": {
  13163. "type": "string",
  13164. "pattern": "^per"
  13165. },
  13166. "required": true
  13167. }
  13168. ],
  13169. "security": [],
  13170. "responses": {
  13171. "200": {
  13172. "description": "Success",
  13173. "content": {
  13174. "application/json": {
  13175. "schema": {
  13176. "type": "object",
  13177. "properties": {
  13178. "data": {
  13179. "$ref": "#/components/schemas/PermissionV2Request"
  13180. }
  13181. },
  13182. "required": ["data"],
  13183. "additionalProperties": false
  13184. }
  13185. }
  13186. }
  13187. },
  13188. "400": {
  13189. "description": "InvalidRequestError",
  13190. "content": {
  13191. "application/json": {
  13192. "schema": {
  13193. "$ref": "#/components/schemas/InvalidRequestError"
  13194. }
  13195. }
  13196. }
  13197. },
  13198. "401": {
  13199. "description": "UnauthorizedError",
  13200. "content": {
  13201. "application/json": {
  13202. "schema": {
  13203. "$ref": "#/components/schemas/UnauthorizedError"
  13204. }
  13205. }
  13206. }
  13207. },
  13208. "404": {
  13209. "description": "SessionNotFoundError | PermissionNotFoundError",
  13210. "content": {
  13211. "application/json": {
  13212. "schema": {
  13213. "anyOf": [
  13214. {
  13215. "$ref": "#/components/schemas/PermissionNotFoundError"
  13216. },
  13217. {
  13218. "$ref": "#/components/schemas/SessionNotFoundError"
  13219. },
  13220. {
  13221. "$ref": "#/components/schemas/SessionNotFoundError"
  13222. }
  13223. ]
  13224. }
  13225. }
  13226. }
  13227. }
  13228. },
  13229. "description": "Retrieve a pending permission request owned by a session.",
  13230. "summary": "Get permission request",
  13231. "x-codeSamples": [
  13232. {
  13233. "lang": "js",
  13234. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.get({\n ...\n})"
  13235. }
  13236. ]
  13237. }
  13238. },
  13239. "/api/session/{sessionID}/permission/{requestID}/reply": {
  13240. "post": {
  13241. "tags": ["permissions"],
  13242. "operationId": "v2.session.permission.reply",
  13243. "parameters": [
  13244. {
  13245. "name": "sessionID",
  13246. "in": "path",
  13247. "schema": {
  13248. "type": "string",
  13249. "pattern": "^ses"
  13250. },
  13251. "required": true
  13252. },
  13253. {
  13254. "name": "requestID",
  13255. "in": "path",
  13256. "schema": {
  13257. "type": "string",
  13258. "pattern": "^per"
  13259. },
  13260. "required": true
  13261. }
  13262. ],
  13263. "security": [],
  13264. "responses": {
  13265. "204": {
  13266. "description": "<No Content>"
  13267. },
  13268. "400": {
  13269. "description": "InvalidRequestError",
  13270. "content": {
  13271. "application/json": {
  13272. "schema": {
  13273. "$ref": "#/components/schemas/InvalidRequestError"
  13274. }
  13275. }
  13276. }
  13277. },
  13278. "401": {
  13279. "description": "UnauthorizedError",
  13280. "content": {
  13281. "application/json": {
  13282. "schema": {
  13283. "$ref": "#/components/schemas/UnauthorizedError"
  13284. }
  13285. }
  13286. }
  13287. },
  13288. "404": {
  13289. "description": "SessionNotFoundError | PermissionNotFoundError",
  13290. "content": {
  13291. "application/json": {
  13292. "schema": {
  13293. "anyOf": [
  13294. {
  13295. "$ref": "#/components/schemas/PermissionNotFoundError"
  13296. },
  13297. {
  13298. "$ref": "#/components/schemas/SessionNotFoundError"
  13299. },
  13300. {
  13301. "$ref": "#/components/schemas/SessionNotFoundError"
  13302. }
  13303. ]
  13304. }
  13305. }
  13306. }
  13307. }
  13308. },
  13309. "description": "Respond to a pending permission request owned by a session.",
  13310. "summary": "Reply to pending permission request",
  13311. "requestBody": {
  13312. "content": {
  13313. "application/json": {
  13314. "schema": {
  13315. "type": "object",
  13316. "properties": {
  13317. "reply": {
  13318. "$ref": "#/components/schemas/PermissionV2Reply"
  13319. },
  13320. "message": {
  13321. "type": "string"
  13322. }
  13323. },
  13324. "required": ["reply"],
  13325. "additionalProperties": false
  13326. }
  13327. }
  13328. },
  13329. "required": true
  13330. },
  13331. "x-codeSamples": [
  13332. {
  13333. "lang": "js",
  13334. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  13335. }
  13336. ]
  13337. }
  13338. },
  13339. "/api/fs/read/*": {
  13340. "get": {
  13341. "tags": ["filesystem"],
  13342. "operationId": "v2.fs.read",
  13343. "parameters": [
  13344. {
  13345. "name": "location",
  13346. "in": "query",
  13347. "schema": {
  13348. "type": "object",
  13349. "properties": {
  13350. "directory": {
  13351. "type": "string"
  13352. },
  13353. "workspace": {
  13354. "type": "string"
  13355. }
  13356. },
  13357. "additionalProperties": false
  13358. },
  13359. "required": false,
  13360. "style": "deepObject",
  13361. "explode": true
  13362. }
  13363. ],
  13364. "security": [],
  13365. "responses": {
  13366. "200": {
  13367. "description": "Success",
  13368. "content": {
  13369. "application/octet-stream": {
  13370. "schema": {
  13371. "type": "string",
  13372. "format": "binary"
  13373. }
  13374. }
  13375. }
  13376. },
  13377. "400": {
  13378. "description": "InvalidRequestError",
  13379. "content": {
  13380. "application/json": {
  13381. "schema": {
  13382. "$ref": "#/components/schemas/InvalidRequestError"
  13383. }
  13384. }
  13385. }
  13386. },
  13387. "401": {
  13388. "description": "UnauthorizedError",
  13389. "content": {
  13390. "application/json": {
  13391. "schema": {
  13392. "$ref": "#/components/schemas/UnauthorizedError"
  13393. }
  13394. }
  13395. }
  13396. }
  13397. },
  13398. "description": "Serve one file relative to the requested location.",
  13399. "summary": "Read file",
  13400. "x-codeSamples": [
  13401. {
  13402. "lang": "js",
  13403. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  13404. }
  13405. ]
  13406. }
  13407. },
  13408. "/api/fs/list": {
  13409. "get": {
  13410. "tags": ["filesystem"],
  13411. "operationId": "v2.fs.list",
  13412. "parameters": [
  13413. {
  13414. "name": "location",
  13415. "in": "query",
  13416. "schema": {
  13417. "type": "object",
  13418. "properties": {
  13419. "directory": {
  13420. "type": "string"
  13421. },
  13422. "workspace": {
  13423. "type": "string"
  13424. }
  13425. },
  13426. "additionalProperties": false
  13427. },
  13428. "required": false,
  13429. "style": "deepObject",
  13430. "explode": true
  13431. },
  13432. {
  13433. "name": "path",
  13434. "in": "query",
  13435. "schema": {
  13436. "type": "string"
  13437. },
  13438. "required": false
  13439. }
  13440. ],
  13441. "security": [],
  13442. "responses": {
  13443. "200": {
  13444. "description": "Success",
  13445. "content": {
  13446. "application/json": {
  13447. "schema": {
  13448. "type": "object",
  13449. "properties": {
  13450. "location": {
  13451. "$ref": "#/components/schemas/LocationInfo"
  13452. },
  13453. "data": {
  13454. "type": "array",
  13455. "items": {
  13456. "$ref": "#/components/schemas/FileSystemEntry"
  13457. }
  13458. }
  13459. },
  13460. "required": ["location", "data"],
  13461. "additionalProperties": false
  13462. }
  13463. }
  13464. }
  13465. },
  13466. "400": {
  13467. "description": "InvalidRequestError",
  13468. "content": {
  13469. "application/json": {
  13470. "schema": {
  13471. "$ref": "#/components/schemas/InvalidRequestError"
  13472. }
  13473. }
  13474. }
  13475. },
  13476. "401": {
  13477. "description": "UnauthorizedError",
  13478. "content": {
  13479. "application/json": {
  13480. "schema": {
  13481. "$ref": "#/components/schemas/UnauthorizedError"
  13482. }
  13483. }
  13484. }
  13485. }
  13486. },
  13487. "description": "List direct children of one directory relative to the requested location.",
  13488. "summary": "List directory",
  13489. "x-codeSamples": [
  13490. {
  13491. "lang": "js",
  13492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  13493. }
  13494. ]
  13495. }
  13496. },
  13497. "/api/fs/find": {
  13498. "get": {
  13499. "tags": ["filesystem"],
  13500. "operationId": "v2.fs.find",
  13501. "parameters": [
  13502. {
  13503. "name": "location",
  13504. "in": "query",
  13505. "schema": {
  13506. "type": "object",
  13507. "properties": {
  13508. "directory": {
  13509. "type": "string"
  13510. },
  13511. "workspace": {
  13512. "type": "string"
  13513. }
  13514. },
  13515. "additionalProperties": false
  13516. },
  13517. "required": false,
  13518. "style": "deepObject",
  13519. "explode": true
  13520. },
  13521. {
  13522. "name": "query",
  13523. "in": "query",
  13524. "schema": {
  13525. "type": "string"
  13526. },
  13527. "required": true
  13528. },
  13529. {
  13530. "name": "type",
  13531. "in": "query",
  13532. "schema": {
  13533. "type": "string",
  13534. "enum": ["file", "directory"]
  13535. },
  13536. "required": false
  13537. },
  13538. {
  13539. "name": "limit",
  13540. "in": "query",
  13541. "schema": {
  13542. "type": "string"
  13543. },
  13544. "required": false
  13545. }
  13546. ],
  13547. "security": [],
  13548. "responses": {
  13549. "200": {
  13550. "description": "Success",
  13551. "content": {
  13552. "application/json": {
  13553. "schema": {
  13554. "type": "object",
  13555. "properties": {
  13556. "location": {
  13557. "$ref": "#/components/schemas/LocationInfo"
  13558. },
  13559. "data": {
  13560. "type": "array",
  13561. "items": {
  13562. "$ref": "#/components/schemas/FileSystemEntry"
  13563. }
  13564. }
  13565. },
  13566. "required": ["location", "data"],
  13567. "additionalProperties": false
  13568. }
  13569. }
  13570. }
  13571. },
  13572. "400": {
  13573. "description": "InvalidRequestError",
  13574. "content": {
  13575. "application/json": {
  13576. "schema": {
  13577. "$ref": "#/components/schemas/InvalidRequestError"
  13578. }
  13579. }
  13580. }
  13581. },
  13582. "401": {
  13583. "description": "UnauthorizedError",
  13584. "content": {
  13585. "application/json": {
  13586. "schema": {
  13587. "$ref": "#/components/schemas/UnauthorizedError"
  13588. }
  13589. }
  13590. }
  13591. }
  13592. },
  13593. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  13594. "summary": "Find files",
  13595. "x-codeSamples": [
  13596. {
  13597. "lang": "js",
  13598. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  13599. }
  13600. ]
  13601. }
  13602. },
  13603. "/api/command": {
  13604. "get": {
  13605. "tags": ["commands"],
  13606. "operationId": "v2.command.list",
  13607. "parameters": [
  13608. {
  13609. "name": "location",
  13610. "in": "query",
  13611. "schema": {
  13612. "type": "object",
  13613. "properties": {
  13614. "directory": {
  13615. "type": "string"
  13616. },
  13617. "workspace": {
  13618. "type": "string"
  13619. }
  13620. },
  13621. "additionalProperties": false
  13622. },
  13623. "required": false,
  13624. "style": "deepObject",
  13625. "explode": true
  13626. }
  13627. ],
  13628. "security": [],
  13629. "responses": {
  13630. "200": {
  13631. "description": "Success",
  13632. "content": {
  13633. "application/json": {
  13634. "schema": {
  13635. "type": "object",
  13636. "properties": {
  13637. "location": {
  13638. "$ref": "#/components/schemas/LocationInfo"
  13639. },
  13640. "data": {
  13641. "type": "array",
  13642. "items": {
  13643. "$ref": "#/components/schemas/CommandV2Info"
  13644. }
  13645. }
  13646. },
  13647. "required": ["location", "data"],
  13648. "additionalProperties": false
  13649. }
  13650. }
  13651. }
  13652. },
  13653. "400": {
  13654. "description": "InvalidRequestError",
  13655. "content": {
  13656. "application/json": {
  13657. "schema": {
  13658. "$ref": "#/components/schemas/InvalidRequestError"
  13659. }
  13660. }
  13661. }
  13662. },
  13663. "401": {
  13664. "description": "UnauthorizedError",
  13665. "content": {
  13666. "application/json": {
  13667. "schema": {
  13668. "$ref": "#/components/schemas/UnauthorizedError"
  13669. }
  13670. }
  13671. }
  13672. }
  13673. },
  13674. "description": "Retrieve currently registered commands.",
  13675. "summary": "List commands",
  13676. "x-codeSamples": [
  13677. {
  13678. "lang": "js",
  13679. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  13680. }
  13681. ]
  13682. }
  13683. },
  13684. "/api/skill": {
  13685. "get": {
  13686. "tags": ["skills"],
  13687. "operationId": "v2.skill.list",
  13688. "parameters": [
  13689. {
  13690. "name": "location",
  13691. "in": "query",
  13692. "schema": {
  13693. "type": "object",
  13694. "properties": {
  13695. "directory": {
  13696. "type": "string"
  13697. },
  13698. "workspace": {
  13699. "type": "string"
  13700. }
  13701. },
  13702. "additionalProperties": false
  13703. },
  13704. "required": false,
  13705. "style": "deepObject",
  13706. "explode": true
  13707. }
  13708. ],
  13709. "security": [],
  13710. "responses": {
  13711. "200": {
  13712. "description": "Success",
  13713. "content": {
  13714. "application/json": {
  13715. "schema": {
  13716. "type": "object",
  13717. "properties": {
  13718. "location": {
  13719. "$ref": "#/components/schemas/LocationInfo"
  13720. },
  13721. "data": {
  13722. "type": "array",
  13723. "items": {
  13724. "$ref": "#/components/schemas/SkillV2Info"
  13725. }
  13726. }
  13727. },
  13728. "required": ["location", "data"],
  13729. "additionalProperties": false
  13730. }
  13731. }
  13732. }
  13733. },
  13734. "400": {
  13735. "description": "InvalidRequestError",
  13736. "content": {
  13737. "application/json": {
  13738. "schema": {
  13739. "$ref": "#/components/schemas/InvalidRequestError"
  13740. }
  13741. }
  13742. }
  13743. },
  13744. "401": {
  13745. "description": "UnauthorizedError",
  13746. "content": {
  13747. "application/json": {
  13748. "schema": {
  13749. "$ref": "#/components/schemas/UnauthorizedError"
  13750. }
  13751. }
  13752. }
  13753. }
  13754. },
  13755. "description": "Retrieve currently registered skills.",
  13756. "summary": "List skills",
  13757. "x-codeSamples": [
  13758. {
  13759. "lang": "js",
  13760. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  13761. }
  13762. ]
  13763. }
  13764. },
  13765. "/api/event": {
  13766. "get": {
  13767. "tags": ["events"],
  13768. "operationId": "v2.event.subscribe",
  13769. "parameters": [],
  13770. "security": [],
  13771. "responses": {
  13772. "200": {
  13773. "description": "Event stream",
  13774. "content": {
  13775. "text/event-stream": {
  13776. "schema": {
  13777. "$ref": "#/components/schemas/V2Event"
  13778. }
  13779. }
  13780. }
  13781. },
  13782. "400": {
  13783. "description": "InvalidRequestError",
  13784. "content": {
  13785. "application/json": {
  13786. "schema": {
  13787. "$ref": "#/components/schemas/InvalidRequestError"
  13788. }
  13789. }
  13790. }
  13791. },
  13792. "401": {
  13793. "description": "UnauthorizedError",
  13794. "content": {
  13795. "application/json": {
  13796. "schema": {
  13797. "$ref": "#/components/schemas/UnauthorizedError"
  13798. }
  13799. }
  13800. }
  13801. }
  13802. },
  13803. "description": "Subscribe to native event payloads for the server.",
  13804. "summary": "Subscribe to events",
  13805. "x-codeSamples": [
  13806. {
  13807. "lang": "js",
  13808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13809. }
  13810. ]
  13811. }
  13812. },
  13813. "/api/pty": {
  13814. "get": {
  13815. "tags": ["pty"],
  13816. "operationId": "v2.pty.list",
  13817. "parameters": [
  13818. {
  13819. "name": "location",
  13820. "in": "query",
  13821. "schema": {
  13822. "type": "object",
  13823. "properties": {
  13824. "directory": {
  13825. "type": "string"
  13826. },
  13827. "workspace": {
  13828. "type": "string"
  13829. }
  13830. },
  13831. "additionalProperties": false
  13832. },
  13833. "required": false,
  13834. "style": "deepObject",
  13835. "explode": true
  13836. }
  13837. ],
  13838. "security": [],
  13839. "responses": {
  13840. "200": {
  13841. "description": "Success",
  13842. "content": {
  13843. "application/json": {
  13844. "schema": {
  13845. "type": "object",
  13846. "properties": {
  13847. "location": {
  13848. "$ref": "#/components/schemas/LocationInfo"
  13849. },
  13850. "data": {
  13851. "type": "array",
  13852. "items": {
  13853. "$ref": "#/components/schemas/Pty"
  13854. }
  13855. }
  13856. },
  13857. "required": ["location", "data"],
  13858. "additionalProperties": false
  13859. }
  13860. }
  13861. }
  13862. },
  13863. "400": {
  13864. "description": "InvalidRequestError",
  13865. "content": {
  13866. "application/json": {
  13867. "schema": {
  13868. "$ref": "#/components/schemas/InvalidRequestError"
  13869. }
  13870. }
  13871. }
  13872. },
  13873. "401": {
  13874. "description": "UnauthorizedError",
  13875. "content": {
  13876. "application/json": {
  13877. "schema": {
  13878. "$ref": "#/components/schemas/UnauthorizedError"
  13879. }
  13880. }
  13881. }
  13882. }
  13883. },
  13884. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13885. "summary": "List PTY sessions",
  13886. "x-codeSamples": [
  13887. {
  13888. "lang": "js",
  13889. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13890. }
  13891. ]
  13892. },
  13893. "post": {
  13894. "tags": ["pty"],
  13895. "operationId": "v2.pty.create",
  13896. "parameters": [
  13897. {
  13898. "name": "location",
  13899. "in": "query",
  13900. "schema": {
  13901. "type": "object",
  13902. "properties": {
  13903. "directory": {
  13904. "type": "string"
  13905. },
  13906. "workspace": {
  13907. "type": "string"
  13908. }
  13909. },
  13910. "additionalProperties": false
  13911. },
  13912. "required": false,
  13913. "style": "deepObject",
  13914. "explode": true
  13915. }
  13916. ],
  13917. "security": [],
  13918. "responses": {
  13919. "200": {
  13920. "description": "Success",
  13921. "content": {
  13922. "application/json": {
  13923. "schema": {
  13924. "type": "object",
  13925. "properties": {
  13926. "location": {
  13927. "$ref": "#/components/schemas/LocationInfo"
  13928. },
  13929. "data": {
  13930. "$ref": "#/components/schemas/Pty"
  13931. }
  13932. },
  13933. "required": ["location", "data"],
  13934. "additionalProperties": false
  13935. }
  13936. }
  13937. }
  13938. },
  13939. "400": {
  13940. "description": "InvalidRequestError",
  13941. "content": {
  13942. "application/json": {
  13943. "schema": {
  13944. "$ref": "#/components/schemas/InvalidRequestError"
  13945. }
  13946. }
  13947. }
  13948. },
  13949. "401": {
  13950. "description": "UnauthorizedError",
  13951. "content": {
  13952. "application/json": {
  13953. "schema": {
  13954. "$ref": "#/components/schemas/UnauthorizedError"
  13955. }
  13956. }
  13957. }
  13958. }
  13959. },
  13960. "description": "Create a pseudo-terminal session for a location.",
  13961. "summary": "Create PTY session",
  13962. "requestBody": {
  13963. "content": {
  13964. "application/json": {
  13965. "schema": {
  13966. "type": "object",
  13967. "properties": {
  13968. "command": {
  13969. "type": "string"
  13970. },
  13971. "args": {
  13972. "type": "array",
  13973. "items": {
  13974. "type": "string"
  13975. }
  13976. },
  13977. "cwd": {
  13978. "type": "string"
  13979. },
  13980. "title": {
  13981. "type": "string"
  13982. },
  13983. "env": {
  13984. "type": "object",
  13985. "additionalProperties": {
  13986. "type": "string"
  13987. }
  13988. }
  13989. },
  13990. "additionalProperties": false
  13991. }
  13992. }
  13993. },
  13994. "required": true
  13995. },
  13996. "x-codeSamples": [
  13997. {
  13998. "lang": "js",
  13999. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  14000. }
  14001. ]
  14002. }
  14003. },
  14004. "/api/pty/{ptyID}": {
  14005. "get": {
  14006. "tags": ["pty"],
  14007. "operationId": "v2.pty.get",
  14008. "parameters": [
  14009. {
  14010. "name": "ptyID",
  14011. "in": "path",
  14012. "schema": {
  14013. "type": "string",
  14014. "pattern": "^pty"
  14015. },
  14016. "required": true
  14017. },
  14018. {
  14019. "name": "location",
  14020. "in": "query",
  14021. "schema": {
  14022. "type": "object",
  14023. "properties": {
  14024. "directory": {
  14025. "type": "string"
  14026. },
  14027. "workspace": {
  14028. "type": "string"
  14029. }
  14030. },
  14031. "additionalProperties": false
  14032. },
  14033. "required": false,
  14034. "style": "deepObject",
  14035. "explode": true
  14036. }
  14037. ],
  14038. "security": [],
  14039. "responses": {
  14040. "200": {
  14041. "description": "Success",
  14042. "content": {
  14043. "application/json": {
  14044. "schema": {
  14045. "type": "object",
  14046. "properties": {
  14047. "location": {
  14048. "$ref": "#/components/schemas/LocationInfo"
  14049. },
  14050. "data": {
  14051. "$ref": "#/components/schemas/Pty"
  14052. }
  14053. },
  14054. "required": ["location", "data"],
  14055. "additionalProperties": false
  14056. }
  14057. }
  14058. }
  14059. },
  14060. "400": {
  14061. "description": "InvalidRequestError",
  14062. "content": {
  14063. "application/json": {
  14064. "schema": {
  14065. "$ref": "#/components/schemas/InvalidRequestError"
  14066. }
  14067. }
  14068. }
  14069. },
  14070. "401": {
  14071. "description": "UnauthorizedError",
  14072. "content": {
  14073. "application/json": {
  14074. "schema": {
  14075. "$ref": "#/components/schemas/UnauthorizedError"
  14076. }
  14077. }
  14078. }
  14079. },
  14080. "404": {
  14081. "description": "PtyNotFoundError",
  14082. "content": {
  14083. "application/json": {
  14084. "schema": {
  14085. "$ref": "#/components/schemas/PtyNotFoundError"
  14086. }
  14087. }
  14088. }
  14089. }
  14090. },
  14091. "description": "Get one PTY session, including its exit code once exited.",
  14092. "summary": "Get PTY session",
  14093. "x-codeSamples": [
  14094. {
  14095. "lang": "js",
  14096. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  14097. }
  14098. ]
  14099. },
  14100. "put": {
  14101. "tags": ["pty"],
  14102. "operationId": "v2.pty.update",
  14103. "parameters": [
  14104. {
  14105. "name": "ptyID",
  14106. "in": "path",
  14107. "schema": {
  14108. "type": "string",
  14109. "pattern": "^pty"
  14110. },
  14111. "required": true
  14112. },
  14113. {
  14114. "name": "location",
  14115. "in": "query",
  14116. "schema": {
  14117. "type": "object",
  14118. "properties": {
  14119. "directory": {
  14120. "type": "string"
  14121. },
  14122. "workspace": {
  14123. "type": "string"
  14124. }
  14125. },
  14126. "additionalProperties": false
  14127. },
  14128. "required": false,
  14129. "style": "deepObject",
  14130. "explode": true
  14131. }
  14132. ],
  14133. "security": [],
  14134. "responses": {
  14135. "200": {
  14136. "description": "Success",
  14137. "content": {
  14138. "application/json": {
  14139. "schema": {
  14140. "type": "object",
  14141. "properties": {
  14142. "location": {
  14143. "$ref": "#/components/schemas/LocationInfo"
  14144. },
  14145. "data": {
  14146. "$ref": "#/components/schemas/Pty"
  14147. }
  14148. },
  14149. "required": ["location", "data"],
  14150. "additionalProperties": false
  14151. }
  14152. }
  14153. }
  14154. },
  14155. "400": {
  14156. "description": "InvalidRequestError",
  14157. "content": {
  14158. "application/json": {
  14159. "schema": {
  14160. "$ref": "#/components/schemas/InvalidRequestError"
  14161. }
  14162. }
  14163. }
  14164. },
  14165. "401": {
  14166. "description": "UnauthorizedError",
  14167. "content": {
  14168. "application/json": {
  14169. "schema": {
  14170. "$ref": "#/components/schemas/UnauthorizedError"
  14171. }
  14172. }
  14173. }
  14174. },
  14175. "404": {
  14176. "description": "PtyNotFoundError",
  14177. "content": {
  14178. "application/json": {
  14179. "schema": {
  14180. "$ref": "#/components/schemas/PtyNotFoundError"
  14181. }
  14182. }
  14183. }
  14184. }
  14185. },
  14186. "description": "Update the title or viewport size of one PTY session.",
  14187. "summary": "Update PTY session",
  14188. "requestBody": {
  14189. "content": {
  14190. "application/json": {
  14191. "schema": {
  14192. "type": "object",
  14193. "properties": {
  14194. "title": {
  14195. "type": "string"
  14196. },
  14197. "size": {
  14198. "type": "object",
  14199. "properties": {
  14200. "rows": {
  14201. "type": "integer",
  14202. "exclusiveMinimum": 0
  14203. },
  14204. "cols": {
  14205. "type": "integer",
  14206. "exclusiveMinimum": 0
  14207. }
  14208. },
  14209. "required": ["rows", "cols"],
  14210. "additionalProperties": false
  14211. }
  14212. },
  14213. "additionalProperties": false
  14214. }
  14215. }
  14216. },
  14217. "required": true
  14218. },
  14219. "x-codeSamples": [
  14220. {
  14221. "lang": "js",
  14222. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  14223. }
  14224. ]
  14225. },
  14226. "delete": {
  14227. "tags": ["pty"],
  14228. "operationId": "v2.pty.remove",
  14229. "parameters": [
  14230. {
  14231. "name": "ptyID",
  14232. "in": "path",
  14233. "schema": {
  14234. "type": "string",
  14235. "pattern": "^pty"
  14236. },
  14237. "required": true
  14238. },
  14239. {
  14240. "name": "location",
  14241. "in": "query",
  14242. "schema": {
  14243. "type": "object",
  14244. "properties": {
  14245. "directory": {
  14246. "type": "string"
  14247. },
  14248. "workspace": {
  14249. "type": "string"
  14250. }
  14251. },
  14252. "additionalProperties": false
  14253. },
  14254. "required": false,
  14255. "style": "deepObject",
  14256. "explode": true
  14257. }
  14258. ],
  14259. "security": [],
  14260. "responses": {
  14261. "204": {
  14262. "description": "<No Content>"
  14263. },
  14264. "400": {
  14265. "description": "InvalidRequestError",
  14266. "content": {
  14267. "application/json": {
  14268. "schema": {
  14269. "$ref": "#/components/schemas/InvalidRequestError"
  14270. }
  14271. }
  14272. }
  14273. },
  14274. "401": {
  14275. "description": "UnauthorizedError",
  14276. "content": {
  14277. "application/json": {
  14278. "schema": {
  14279. "$ref": "#/components/schemas/UnauthorizedError"
  14280. }
  14281. }
  14282. }
  14283. },
  14284. "404": {
  14285. "description": "PtyNotFoundError",
  14286. "content": {
  14287. "application/json": {
  14288. "schema": {
  14289. "$ref": "#/components/schemas/PtyNotFoundError"
  14290. }
  14291. }
  14292. }
  14293. }
  14294. },
  14295. "description": "Terminate and remove one PTY session.",
  14296. "summary": "Remove PTY session",
  14297. "x-codeSamples": [
  14298. {
  14299. "lang": "js",
  14300. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  14301. }
  14302. ]
  14303. }
  14304. },
  14305. "/api/pty/{ptyID}/connect-token": {
  14306. "post": {
  14307. "tags": ["pty"],
  14308. "operationId": "v2.pty.connectToken",
  14309. "parameters": [
  14310. {
  14311. "name": "ptyID",
  14312. "in": "path",
  14313. "schema": {
  14314. "type": "string",
  14315. "pattern": "^pty"
  14316. },
  14317. "required": true
  14318. },
  14319. {
  14320. "name": "location",
  14321. "in": "query",
  14322. "schema": {
  14323. "type": "object",
  14324. "properties": {
  14325. "directory": {
  14326. "type": "string"
  14327. },
  14328. "workspace": {
  14329. "type": "string"
  14330. }
  14331. },
  14332. "additionalProperties": false
  14333. },
  14334. "required": false,
  14335. "style": "deepObject",
  14336. "explode": true
  14337. }
  14338. ],
  14339. "security": [],
  14340. "responses": {
  14341. "200": {
  14342. "description": "Success",
  14343. "content": {
  14344. "application/json": {
  14345. "schema": {
  14346. "type": "object",
  14347. "properties": {
  14348. "location": {
  14349. "$ref": "#/components/schemas/LocationInfo"
  14350. },
  14351. "data": {
  14352. "$ref": "#/components/schemas/PtyTicketConnectToken"
  14353. }
  14354. },
  14355. "required": ["location", "data"],
  14356. "additionalProperties": false
  14357. }
  14358. }
  14359. }
  14360. },
  14361. "400": {
  14362. "description": "InvalidRequestError",
  14363. "content": {
  14364. "application/json": {
  14365. "schema": {
  14366. "$ref": "#/components/schemas/InvalidRequestError"
  14367. }
  14368. }
  14369. }
  14370. },
  14371. "401": {
  14372. "description": "UnauthorizedError",
  14373. "content": {
  14374. "application/json": {
  14375. "schema": {
  14376. "$ref": "#/components/schemas/UnauthorizedError"
  14377. }
  14378. }
  14379. }
  14380. },
  14381. "403": {
  14382. "description": "ForbiddenError",
  14383. "content": {
  14384. "application/json": {
  14385. "schema": {
  14386. "$ref": "#/components/schemas/ForbiddenError"
  14387. }
  14388. }
  14389. }
  14390. },
  14391. "404": {
  14392. "description": "PtyNotFoundError",
  14393. "content": {
  14394. "application/json": {
  14395. "schema": {
  14396. "$ref": "#/components/schemas/PtyNotFoundError"
  14397. }
  14398. }
  14399. }
  14400. }
  14401. },
  14402. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  14403. "summary": "Create PTY WebSocket token",
  14404. "x-codeSamples": [
  14405. {
  14406. "lang": "js",
  14407. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  14408. }
  14409. ]
  14410. }
  14411. },
  14412. "/api/pty/{ptyID}/connect": {
  14413. "get": {
  14414. "tags": ["pty"],
  14415. "operationId": "v2.pty.connect",
  14416. "parameters": [
  14417. {
  14418. "name": "ptyID",
  14419. "in": "path",
  14420. "schema": {
  14421. "type": "string",
  14422. "pattern": "^pty"
  14423. },
  14424. "required": true
  14425. },
  14426. {
  14427. "in": "query",
  14428. "name": "location[directory]",
  14429. "schema": {
  14430. "type": "string"
  14431. }
  14432. },
  14433. {
  14434. "in": "query",
  14435. "name": "location[workspace]",
  14436. "schema": {
  14437. "type": "string"
  14438. }
  14439. },
  14440. {
  14441. "in": "query",
  14442. "name": "cursor",
  14443. "schema": {
  14444. "type": "string"
  14445. }
  14446. },
  14447. {
  14448. "in": "query",
  14449. "name": "ticket",
  14450. "schema": {
  14451. "type": "string"
  14452. }
  14453. }
  14454. ],
  14455. "security": [],
  14456. "responses": {
  14457. "200": {
  14458. "description": "Success",
  14459. "content": {
  14460. "application/json": {
  14461. "schema": {
  14462. "type": "boolean"
  14463. }
  14464. }
  14465. }
  14466. },
  14467. "400": {
  14468. "description": "InvalidRequestError",
  14469. "content": {
  14470. "application/json": {
  14471. "schema": {
  14472. "$ref": "#/components/schemas/InvalidRequestError"
  14473. }
  14474. }
  14475. }
  14476. },
  14477. "401": {
  14478. "description": "UnauthorizedError",
  14479. "content": {
  14480. "application/json": {
  14481. "schema": {
  14482. "$ref": "#/components/schemas/UnauthorizedError"
  14483. }
  14484. }
  14485. }
  14486. },
  14487. "403": {
  14488. "description": "ForbiddenError",
  14489. "content": {
  14490. "application/json": {
  14491. "schema": {
  14492. "$ref": "#/components/schemas/ForbiddenError"
  14493. }
  14494. }
  14495. }
  14496. },
  14497. "404": {
  14498. "description": "PtyNotFoundError",
  14499. "content": {
  14500. "application/json": {
  14501. "schema": {
  14502. "$ref": "#/components/schemas/PtyNotFoundError"
  14503. }
  14504. }
  14505. }
  14506. }
  14507. },
  14508. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  14509. "summary": "Connect to PTY session",
  14510. "x-websocket": true,
  14511. "x-codeSamples": [
  14512. {
  14513. "lang": "js",
  14514. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  14515. }
  14516. ]
  14517. }
  14518. },
  14519. "/api/question/request": {
  14520. "get": {
  14521. "tags": ["session questions"],
  14522. "operationId": "v2.question.request.list",
  14523. "parameters": [
  14524. {
  14525. "name": "location",
  14526. "in": "query",
  14527. "schema": {
  14528. "type": "object",
  14529. "properties": {
  14530. "directory": {
  14531. "type": "string"
  14532. },
  14533. "workspace": {
  14534. "type": "string"
  14535. }
  14536. },
  14537. "additionalProperties": false
  14538. },
  14539. "required": false,
  14540. "style": "deepObject",
  14541. "explode": true
  14542. }
  14543. ],
  14544. "security": [],
  14545. "responses": {
  14546. "200": {
  14547. "description": "Success",
  14548. "content": {
  14549. "application/json": {
  14550. "schema": {
  14551. "type": "object",
  14552. "properties": {
  14553. "location": {
  14554. "$ref": "#/components/schemas/LocationInfo"
  14555. },
  14556. "data": {
  14557. "type": "array",
  14558. "items": {
  14559. "$ref": "#/components/schemas/QuestionV2Request"
  14560. }
  14561. }
  14562. },
  14563. "required": ["location", "data"],
  14564. "additionalProperties": false
  14565. }
  14566. }
  14567. }
  14568. },
  14569. "400": {
  14570. "description": "InvalidRequestError",
  14571. "content": {
  14572. "application/json": {
  14573. "schema": {
  14574. "$ref": "#/components/schemas/InvalidRequestError"
  14575. }
  14576. }
  14577. }
  14578. },
  14579. "401": {
  14580. "description": "UnauthorizedError",
  14581. "content": {
  14582. "application/json": {
  14583. "schema": {
  14584. "$ref": "#/components/schemas/UnauthorizedError"
  14585. }
  14586. }
  14587. }
  14588. }
  14589. },
  14590. "description": "Retrieve pending question requests for a location.",
  14591. "summary": "List pending question requests",
  14592. "x-codeSamples": [
  14593. {
  14594. "lang": "js",
  14595. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  14596. }
  14597. ]
  14598. }
  14599. },
  14600. "/api/session/{sessionID}/question": {
  14601. "get": {
  14602. "tags": ["session questions"],
  14603. "operationId": "v2.session.question.list",
  14604. "parameters": [
  14605. {
  14606. "name": "sessionID",
  14607. "in": "path",
  14608. "schema": {
  14609. "type": "string",
  14610. "pattern": "^ses"
  14611. },
  14612. "required": true
  14613. }
  14614. ],
  14615. "security": [],
  14616. "responses": {
  14617. "200": {
  14618. "description": "Success",
  14619. "content": {
  14620. "application/json": {
  14621. "schema": {
  14622. "type": "object",
  14623. "properties": {
  14624. "data": {
  14625. "type": "array",
  14626. "items": {
  14627. "$ref": "#/components/schemas/QuestionV2Request"
  14628. }
  14629. }
  14630. },
  14631. "required": ["data"],
  14632. "additionalProperties": false
  14633. }
  14634. }
  14635. }
  14636. },
  14637. "400": {
  14638. "description": "InvalidRequestError",
  14639. "content": {
  14640. "application/json": {
  14641. "schema": {
  14642. "$ref": "#/components/schemas/InvalidRequestError"
  14643. }
  14644. }
  14645. }
  14646. },
  14647. "401": {
  14648. "description": "UnauthorizedError",
  14649. "content": {
  14650. "application/json": {
  14651. "schema": {
  14652. "$ref": "#/components/schemas/UnauthorizedError"
  14653. }
  14654. }
  14655. }
  14656. },
  14657. "404": {
  14658. "description": "SessionNotFoundError",
  14659. "content": {
  14660. "application/json": {
  14661. "schema": {
  14662. "anyOf": [
  14663. {
  14664. "$ref": "#/components/schemas/SessionNotFoundError"
  14665. },
  14666. {
  14667. "$ref": "#/components/schemas/SessionNotFoundError"
  14668. }
  14669. ]
  14670. }
  14671. }
  14672. }
  14673. }
  14674. },
  14675. "description": "Retrieve pending question requests owned by a session.",
  14676. "summary": "List session question requests",
  14677. "x-codeSamples": [
  14678. {
  14679. "lang": "js",
  14680. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14681. }
  14682. ]
  14683. }
  14684. },
  14685. "/api/session/{sessionID}/question/{requestID}/reply": {
  14686. "post": {
  14687. "tags": ["session questions"],
  14688. "operationId": "v2.session.question.reply",
  14689. "parameters": [
  14690. {
  14691. "name": "sessionID",
  14692. "in": "path",
  14693. "schema": {
  14694. "type": "string",
  14695. "pattern": "^ses"
  14696. },
  14697. "required": true
  14698. },
  14699. {
  14700. "name": "requestID",
  14701. "in": "path",
  14702. "schema": {
  14703. "type": "string",
  14704. "pattern": "^que"
  14705. },
  14706. "required": true
  14707. }
  14708. ],
  14709. "security": [],
  14710. "responses": {
  14711. "204": {
  14712. "description": "<No Content>"
  14713. },
  14714. "400": {
  14715. "description": "InvalidRequestError",
  14716. "content": {
  14717. "application/json": {
  14718. "schema": {
  14719. "$ref": "#/components/schemas/InvalidRequestError"
  14720. }
  14721. }
  14722. }
  14723. },
  14724. "401": {
  14725. "description": "UnauthorizedError",
  14726. "content": {
  14727. "application/json": {
  14728. "schema": {
  14729. "$ref": "#/components/schemas/UnauthorizedError"
  14730. }
  14731. }
  14732. }
  14733. },
  14734. "404": {
  14735. "description": "SessionNotFoundError | QuestionNotFoundError",
  14736. "content": {
  14737. "application/json": {
  14738. "schema": {
  14739. "anyOf": [
  14740. {
  14741. "$ref": "#/components/schemas/QuestionNotFoundError"
  14742. },
  14743. {
  14744. "$ref": "#/components/schemas/SessionNotFoundError"
  14745. },
  14746. {
  14747. "$ref": "#/components/schemas/SessionNotFoundError"
  14748. }
  14749. ]
  14750. }
  14751. }
  14752. }
  14753. }
  14754. },
  14755. "description": "Answer a pending question request owned by a session.",
  14756. "summary": "Reply to pending question request",
  14757. "requestBody": {
  14758. "content": {
  14759. "application/json": {
  14760. "schema": {
  14761. "$ref": "#/components/schemas/QuestionV2Reply"
  14762. }
  14763. }
  14764. },
  14765. "required": true
  14766. },
  14767. "x-codeSamples": [
  14768. {
  14769. "lang": "js",
  14770. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14771. }
  14772. ]
  14773. }
  14774. },
  14775. "/api/session/{sessionID}/question/{requestID}/reject": {
  14776. "post": {
  14777. "tags": ["session questions"],
  14778. "operationId": "v2.session.question.reject",
  14779. "parameters": [
  14780. {
  14781. "name": "sessionID",
  14782. "in": "path",
  14783. "schema": {
  14784. "type": "string",
  14785. "pattern": "^ses"
  14786. },
  14787. "required": true
  14788. },
  14789. {
  14790. "name": "requestID",
  14791. "in": "path",
  14792. "schema": {
  14793. "type": "string",
  14794. "pattern": "^que"
  14795. },
  14796. "required": true
  14797. }
  14798. ],
  14799. "security": [],
  14800. "responses": {
  14801. "204": {
  14802. "description": "<No Content>"
  14803. },
  14804. "400": {
  14805. "description": "InvalidRequestError",
  14806. "content": {
  14807. "application/json": {
  14808. "schema": {
  14809. "$ref": "#/components/schemas/InvalidRequestError"
  14810. }
  14811. }
  14812. }
  14813. },
  14814. "401": {
  14815. "description": "UnauthorizedError",
  14816. "content": {
  14817. "application/json": {
  14818. "schema": {
  14819. "$ref": "#/components/schemas/UnauthorizedError"
  14820. }
  14821. }
  14822. }
  14823. },
  14824. "404": {
  14825. "description": "SessionNotFoundError | QuestionNotFoundError",
  14826. "content": {
  14827. "application/json": {
  14828. "schema": {
  14829. "anyOf": [
  14830. {
  14831. "$ref": "#/components/schemas/QuestionNotFoundError"
  14832. },
  14833. {
  14834. "$ref": "#/components/schemas/SessionNotFoundError"
  14835. },
  14836. {
  14837. "$ref": "#/components/schemas/SessionNotFoundError"
  14838. }
  14839. ]
  14840. }
  14841. }
  14842. }
  14843. }
  14844. },
  14845. "description": "Reject a pending question request owned by a session.",
  14846. "summary": "Reject pending question request",
  14847. "x-codeSamples": [
  14848. {
  14849. "lang": "js",
  14850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14851. }
  14852. ]
  14853. }
  14854. },
  14855. "/api/reference": {
  14856. "get": {
  14857. "tags": ["reference"],
  14858. "operationId": "v2.reference.list",
  14859. "parameters": [
  14860. {
  14861. "name": "location",
  14862. "in": "query",
  14863. "schema": {
  14864. "type": "object",
  14865. "properties": {
  14866. "directory": {
  14867. "type": "string"
  14868. },
  14869. "workspace": {
  14870. "type": "string"
  14871. }
  14872. },
  14873. "additionalProperties": false
  14874. },
  14875. "required": false,
  14876. "style": "deepObject",
  14877. "explode": true
  14878. }
  14879. ],
  14880. "security": [],
  14881. "responses": {
  14882. "200": {
  14883. "description": "Success",
  14884. "content": {
  14885. "application/json": {
  14886. "schema": {
  14887. "type": "object",
  14888. "properties": {
  14889. "location": {
  14890. "$ref": "#/components/schemas/LocationInfo"
  14891. },
  14892. "data": {
  14893. "type": "array",
  14894. "items": {
  14895. "$ref": "#/components/schemas/ReferenceInfo"
  14896. }
  14897. }
  14898. },
  14899. "required": ["location", "data"],
  14900. "additionalProperties": false
  14901. }
  14902. }
  14903. }
  14904. },
  14905. "400": {
  14906. "description": "InvalidRequestError",
  14907. "content": {
  14908. "application/json": {
  14909. "schema": {
  14910. "$ref": "#/components/schemas/InvalidRequestError"
  14911. }
  14912. }
  14913. }
  14914. },
  14915. "401": {
  14916. "description": "UnauthorizedError",
  14917. "content": {
  14918. "application/json": {
  14919. "schema": {
  14920. "$ref": "#/components/schemas/UnauthorizedError"
  14921. }
  14922. }
  14923. }
  14924. }
  14925. },
  14926. "description": "List references available in the requested location.",
  14927. "summary": "List references",
  14928. "x-codeSamples": [
  14929. {
  14930. "lang": "js",
  14931. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14932. }
  14933. ]
  14934. }
  14935. },
  14936. "/experimental/project/{projectID}/copy": {
  14937. "post": {
  14938. "tags": ["projectCopy"],
  14939. "operationId": "v2.projectCopy.create",
  14940. "parameters": [
  14941. {
  14942. "name": "projectID",
  14943. "in": "path",
  14944. "schema": {
  14945. "type": "string"
  14946. },
  14947. "required": true
  14948. },
  14949. {
  14950. "name": "location",
  14951. "in": "query",
  14952. "schema": {
  14953. "type": "object",
  14954. "properties": {
  14955. "directory": {
  14956. "type": "string"
  14957. },
  14958. "workspace": {
  14959. "type": "string"
  14960. }
  14961. },
  14962. "additionalProperties": false
  14963. },
  14964. "required": false,
  14965. "style": "deepObject",
  14966. "explode": true
  14967. }
  14968. ],
  14969. "responses": {
  14970. "200": {
  14971. "description": "ProjectCopy.Copy",
  14972. "content": {
  14973. "application/json": {
  14974. "schema": {
  14975. "$ref": "#/components/schemas/ProjectCopyCopy"
  14976. }
  14977. }
  14978. }
  14979. },
  14980. "400": {
  14981. "description": "ProjectCopyError | InvalidRequestError",
  14982. "content": {
  14983. "application/json": {
  14984. "schema": {
  14985. "anyOf": [
  14986. {
  14987. "$ref": "#/components/schemas/ProjectCopyError"
  14988. },
  14989. {
  14990. "$ref": "#/components/schemas/InvalidRequestError"
  14991. }
  14992. ]
  14993. }
  14994. }
  14995. }
  14996. }
  14997. },
  14998. "requestBody": {
  14999. "content": {
  15000. "application/json": {
  15001. "schema": {
  15002. "type": "object",
  15003. "properties": {
  15004. "strategy": {
  15005. "type": "string"
  15006. },
  15007. "directory": {
  15008. "type": "string"
  15009. },
  15010. "name": {
  15011. "type": "string"
  15012. }
  15013. },
  15014. "required": ["strategy", "directory"],
  15015. "additionalProperties": false
  15016. }
  15017. }
  15018. }
  15019. },
  15020. "x-codeSamples": [
  15021. {
  15022. "lang": "js",
  15023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  15024. }
  15025. ]
  15026. },
  15027. "delete": {
  15028. "tags": ["projectCopy"],
  15029. "operationId": "v2.projectCopy.remove",
  15030. "parameters": [
  15031. {
  15032. "name": "projectID",
  15033. "in": "path",
  15034. "schema": {
  15035. "type": "string"
  15036. },
  15037. "required": true
  15038. },
  15039. {
  15040. "name": "location",
  15041. "in": "query",
  15042. "schema": {
  15043. "type": "object",
  15044. "properties": {
  15045. "directory": {
  15046. "type": "string"
  15047. },
  15048. "workspace": {
  15049. "type": "string"
  15050. }
  15051. },
  15052. "additionalProperties": false
  15053. },
  15054. "required": false,
  15055. "style": "deepObject",
  15056. "explode": true
  15057. }
  15058. ],
  15059. "responses": {
  15060. "204": {
  15061. "description": "<No Content>"
  15062. },
  15063. "400": {
  15064. "description": "ProjectCopyError | InvalidRequestError",
  15065. "content": {
  15066. "application/json": {
  15067. "schema": {
  15068. "anyOf": [
  15069. {
  15070. "$ref": "#/components/schemas/ProjectCopyError"
  15071. },
  15072. {
  15073. "$ref": "#/components/schemas/InvalidRequestError"
  15074. }
  15075. ]
  15076. }
  15077. }
  15078. }
  15079. }
  15080. },
  15081. "requestBody": {
  15082. "content": {
  15083. "application/json": {
  15084. "schema": {
  15085. "type": "object",
  15086. "properties": {
  15087. "directory": {
  15088. "type": "string"
  15089. },
  15090. "force": {
  15091. "type": "boolean"
  15092. }
  15093. },
  15094. "required": ["directory", "force"],
  15095. "additionalProperties": false
  15096. }
  15097. }
  15098. }
  15099. },
  15100. "x-codeSamples": [
  15101. {
  15102. "lang": "js",
  15103. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  15104. }
  15105. ]
  15106. }
  15107. },
  15108. "/experimental/project/{projectID}/copy/refresh": {
  15109. "post": {
  15110. "tags": ["projectCopy"],
  15111. "operationId": "v2.projectCopy.refresh",
  15112. "parameters": [
  15113. {
  15114. "name": "projectID",
  15115. "in": "path",
  15116. "schema": {
  15117. "type": "string"
  15118. },
  15119. "required": true
  15120. },
  15121. {
  15122. "name": "location",
  15123. "in": "query",
  15124. "schema": {
  15125. "type": "object",
  15126. "properties": {
  15127. "directory": {
  15128. "type": "string"
  15129. },
  15130. "workspace": {
  15131. "type": "string"
  15132. }
  15133. },
  15134. "additionalProperties": false
  15135. },
  15136. "required": false,
  15137. "style": "deepObject",
  15138. "explode": true
  15139. }
  15140. ],
  15141. "responses": {
  15142. "204": {
  15143. "description": "<No Content>"
  15144. },
  15145. "400": {
  15146. "description": "ProjectCopyError | InvalidRequestError",
  15147. "content": {
  15148. "application/json": {
  15149. "schema": {
  15150. "anyOf": [
  15151. {
  15152. "$ref": "#/components/schemas/ProjectCopyError"
  15153. },
  15154. {
  15155. "$ref": "#/components/schemas/InvalidRequestError"
  15156. }
  15157. ]
  15158. }
  15159. }
  15160. }
  15161. }
  15162. },
  15163. "x-codeSamples": [
  15164. {
  15165. "lang": "js",
  15166. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  15167. }
  15168. ]
  15169. }
  15170. },
  15171. "/pty/{ptyID}/connect": {
  15172. "get": {
  15173. "tags": ["pty"],
  15174. "operationId": "pty.connect",
  15175. "parameters": [
  15176. {
  15177. "name": "ptyID",
  15178. "in": "path",
  15179. "schema": {
  15180. "type": "string",
  15181. "pattern": "^pty"
  15182. },
  15183. "required": true
  15184. },
  15185. {
  15186. "in": "query",
  15187. "name": "directory",
  15188. "schema": {
  15189. "type": "string"
  15190. }
  15191. },
  15192. {
  15193. "in": "query",
  15194. "name": "workspace",
  15195. "schema": {
  15196. "type": "string"
  15197. }
  15198. },
  15199. {
  15200. "in": "query",
  15201. "name": "cursor",
  15202. "schema": {
  15203. "type": "string"
  15204. }
  15205. },
  15206. {
  15207. "in": "query",
  15208. "name": "ticket",
  15209. "schema": {
  15210. "type": "string"
  15211. }
  15212. }
  15213. ],
  15214. "responses": {
  15215. "200": {
  15216. "description": "Connected session",
  15217. "content": {
  15218. "application/json": {
  15219. "schema": {
  15220. "type": "boolean",
  15221. "description": "Connected session"
  15222. }
  15223. }
  15224. }
  15225. },
  15226. "403": {
  15227. "description": "Forbidden",
  15228. "content": {
  15229. "application/json": {
  15230. "schema": {
  15231. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  15232. }
  15233. }
  15234. }
  15235. },
  15236. "404": {
  15237. "description": "Not found",
  15238. "content": {
  15239. "application/json": {
  15240. "schema": {
  15241. "$ref": "#/components/schemas/NotFoundError"
  15242. }
  15243. }
  15244. }
  15245. }
  15246. },
  15247. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  15248. "summary": "Connect to PTY session",
  15249. "x-codeSamples": [
  15250. {
  15251. "lang": "js",
  15252. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  15253. }
  15254. ]
  15255. }
  15256. }
  15257. },
  15258. "components": {
  15259. "schemas": {
  15260. "Event": {
  15261. "anyOf": [
  15262. {
  15263. "$ref": "#/components/schemas/EventModels-devRefreshed"
  15264. },
  15265. {
  15266. "$ref": "#/components/schemas/EventIntegrationUpdated"
  15267. },
  15268. {
  15269. "$ref": "#/components/schemas/EventIntegrationConnectionUpdated"
  15270. },
  15271. {
  15272. "$ref": "#/components/schemas/EventCatalogUpdated"
  15273. },
  15274. {
  15275. "$ref": "#/components/schemas/EventSessionCreated"
  15276. },
  15277. {
  15278. "$ref": "#/components/schemas/EventSessionUpdated"
  15279. },
  15280. {
  15281. "$ref": "#/components/schemas/EventSessionDeleted"
  15282. },
  15283. {
  15284. "$ref": "#/components/schemas/EventMessageUpdated"
  15285. },
  15286. {
  15287. "$ref": "#/components/schemas/EventMessageRemoved"
  15288. },
  15289. {
  15290. "$ref": "#/components/schemas/EventMessagePartUpdated"
  15291. },
  15292. {
  15293. "$ref": "#/components/schemas/EventMessagePartRemoved"
  15294. },
  15295. {
  15296. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  15297. },
  15298. {
  15299. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  15300. },
  15301. {
  15302. "$ref": "#/components/schemas/EventSessionNextMoved"
  15303. },
  15304. {
  15305. "$ref": "#/components/schemas/EventSessionNextPrompted"
  15306. },
  15307. {
  15308. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  15309. },
  15310. {
  15311. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  15312. },
  15313. {
  15314. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  15315. },
  15316. {
  15317. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  15318. },
  15319. {
  15320. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  15321. },
  15322. {
  15323. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  15324. },
  15325. {
  15326. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  15327. },
  15328. {
  15329. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  15330. },
  15331. {
  15332. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  15333. },
  15334. {
  15335. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  15336. },
  15337. {
  15338. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  15339. },
  15340. {
  15341. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  15342. },
  15343. {
  15344. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  15345. },
  15346. {
  15347. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  15348. },
  15349. {
  15350. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  15351. },
  15352. {
  15353. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  15354. },
  15355. {
  15356. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  15357. },
  15358. {
  15359. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  15360. },
  15361. {
  15362. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  15363. },
  15364. {
  15365. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  15366. },
  15367. {
  15368. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  15369. },
  15370. {
  15371. "$ref": "#/components/schemas/EventSessionNextRetried"
  15372. },
  15373. {
  15374. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  15375. },
  15376. {
  15377. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  15378. },
  15379. {
  15380. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  15381. },
  15382. {
  15383. "$ref": "#/components/schemas/EventSessionNextRevertStaged"
  15384. },
  15385. {
  15386. "$ref": "#/components/schemas/EventSessionNextRevertCleared"
  15387. },
  15388. {
  15389. "$ref": "#/components/schemas/EventSessionNextRevertCommitted"
  15390. },
  15391. {
  15392. "$ref": "#/components/schemas/EventMessagePartDelta"
  15393. },
  15394. {
  15395. "$ref": "#/components/schemas/EventSessionDiff"
  15396. },
  15397. {
  15398. "$ref": "#/components/schemas/EventSessionError"
  15399. },
  15400. {
  15401. "$ref": "#/components/schemas/EventInstallationUpdated"
  15402. },
  15403. {
  15404. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  15405. },
  15406. {
  15407. "$ref": "#/components/schemas/EventFileEdited"
  15408. },
  15409. {
  15410. "$ref": "#/components/schemas/EventReferenceUpdated"
  15411. },
  15412. {
  15413. "$ref": "#/components/schemas/EventPermissionV2Asked"
  15414. },
  15415. {
  15416. "$ref": "#/components/schemas/EventPermissionV2Replied"
  15417. },
  15418. {
  15419. "$ref": "#/components/schemas/EventPluginAdded"
  15420. },
  15421. {
  15422. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  15423. },
  15424. {
  15425. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  15426. },
  15427. {
  15428. "$ref": "#/components/schemas/EventPtyCreated"
  15429. },
  15430. {
  15431. "$ref": "#/components/schemas/EventPtyUpdated"
  15432. },
  15433. {
  15434. "$ref": "#/components/schemas/EventPtyExited"
  15435. },
  15436. {
  15437. "$ref": "#/components/schemas/EventPtyDeleted"
  15438. },
  15439. {
  15440. "$ref": "#/components/schemas/EventQuestionV2Asked"
  15441. },
  15442. {
  15443. "$ref": "#/components/schemas/EventQuestionV2Replied"
  15444. },
  15445. {
  15446. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  15447. },
  15448. {
  15449. "$ref": "#/components/schemas/EventTodoUpdated"
  15450. },
  15451. {
  15452. "$ref": "#/components/schemas/EventLspUpdated"
  15453. },
  15454. {
  15455. "$ref": "#/components/schemas/EventPermissionAsked"
  15456. },
  15457. {
  15458. "$ref": "#/components/schemas/EventPermissionReplied"
  15459. },
  15460. {
  15461. "$ref": "#/components/schemas/Event.tui.prompt.append"
  15462. },
  15463. {
  15464. "$ref": "#/components/schemas/Event.tui.command.execute"
  15465. },
  15466. {
  15467. "$ref": "#/components/schemas/Event.tui.toast.show"
  15468. },
  15469. {
  15470. "$ref": "#/components/schemas/Event.tui.session.select"
  15471. },
  15472. {
  15473. "$ref": "#/components/schemas/EventMcpToolsChanged"
  15474. },
  15475. {
  15476. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  15477. },
  15478. {
  15479. "$ref": "#/components/schemas/EventCommandExecuted"
  15480. },
  15481. {
  15482. "$ref": "#/components/schemas/EventProjectUpdated"
  15483. },
  15484. {
  15485. "$ref": "#/components/schemas/EventSessionStatus"
  15486. },
  15487. {
  15488. "$ref": "#/components/schemas/EventSessionIdle"
  15489. },
  15490. {
  15491. "$ref": "#/components/schemas/EventQuestionAsked"
  15492. },
  15493. {
  15494. "$ref": "#/components/schemas/EventQuestionReplied"
  15495. },
  15496. {
  15497. "$ref": "#/components/schemas/EventQuestionRejected"
  15498. },
  15499. {
  15500. "$ref": "#/components/schemas/EventSessionCompacted"
  15501. },
  15502. {
  15503. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  15504. },
  15505. {
  15506. "$ref": "#/components/schemas/EventWorkspaceReady"
  15507. },
  15508. {
  15509. "$ref": "#/components/schemas/EventWorkspaceFailed"
  15510. },
  15511. {
  15512. "$ref": "#/components/schemas/EventWorkspaceStatus"
  15513. },
  15514. {
  15515. "$ref": "#/components/schemas/EventWorktreeReady"
  15516. },
  15517. {
  15518. "$ref": "#/components/schemas/EventWorktreeFailed"
  15519. },
  15520. {
  15521. "$ref": "#/components/schemas/EventServerConnected"
  15522. },
  15523. {
  15524. "$ref": "#/components/schemas/EventGlobalDisposed"
  15525. },
  15526. {
  15527. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15528. }
  15529. ]
  15530. },
  15531. "QuestionReplied": {
  15532. "type": "object",
  15533. "properties": {
  15534. "sessionID": {
  15535. "type": "string",
  15536. "pattern": "^ses"
  15537. },
  15538. "requestID": {
  15539. "type": "string",
  15540. "pattern": "^que"
  15541. },
  15542. "answers": {
  15543. "type": "array",
  15544. "items": {
  15545. "$ref": "#/components/schemas/QuestionAnswer"
  15546. }
  15547. }
  15548. },
  15549. "required": ["sessionID", "requestID", "answers"],
  15550. "additionalProperties": false
  15551. },
  15552. "QuestionRejected": {
  15553. "type": "object",
  15554. "properties": {
  15555. "sessionID": {
  15556. "type": "string",
  15557. "pattern": "^ses"
  15558. },
  15559. "requestID": {
  15560. "type": "string",
  15561. "pattern": "^que"
  15562. }
  15563. },
  15564. "required": ["sessionID", "requestID"],
  15565. "additionalProperties": false
  15566. },
  15567. "OAuth": {
  15568. "type": "object",
  15569. "properties": {
  15570. "type": {
  15571. "type": "string",
  15572. "enum": ["oauth"]
  15573. },
  15574. "refresh": {
  15575. "type": "string"
  15576. },
  15577. "access": {
  15578. "type": "string"
  15579. },
  15580. "expires": {
  15581. "type": "integer",
  15582. "minimum": 0
  15583. },
  15584. "accountId": {
  15585. "type": "string"
  15586. },
  15587. "enterpriseUrl": {
  15588. "type": "string"
  15589. }
  15590. },
  15591. "required": ["type", "refresh", "access", "expires"],
  15592. "additionalProperties": false
  15593. },
  15594. "ApiAuth": {
  15595. "type": "object",
  15596. "properties": {
  15597. "type": {
  15598. "type": "string",
  15599. "enum": ["api"]
  15600. },
  15601. "key": {
  15602. "type": "string"
  15603. },
  15604. "metadata": {
  15605. "type": "object",
  15606. "additionalProperties": {
  15607. "type": "string"
  15608. }
  15609. }
  15610. },
  15611. "required": ["type", "key"],
  15612. "additionalProperties": false
  15613. },
  15614. "WellKnownAuth": {
  15615. "type": "object",
  15616. "properties": {
  15617. "type": {
  15618. "type": "string",
  15619. "enum": ["wellknown"]
  15620. },
  15621. "key": {
  15622. "type": "string"
  15623. },
  15624. "token": {
  15625. "type": "string"
  15626. }
  15627. },
  15628. "required": ["type", "key", "token"],
  15629. "additionalProperties": false
  15630. },
  15631. "Auth": {
  15632. "anyOf": [
  15633. {
  15634. "$ref": "#/components/schemas/OAuth"
  15635. },
  15636. {
  15637. "$ref": "#/components/schemas/ApiAuth"
  15638. },
  15639. {
  15640. "$ref": "#/components/schemas/WellKnownAuth"
  15641. }
  15642. ]
  15643. },
  15644. "effect_HttpApiError_BadRequest": {
  15645. "type": "object",
  15646. "properties": {
  15647. "_tag": {
  15648. "type": "string",
  15649. "enum": ["BadRequest"]
  15650. }
  15651. },
  15652. "required": ["_tag"],
  15653. "additionalProperties": false
  15654. },
  15655. "InvalidRequestError": {
  15656. "type": "object",
  15657. "properties": {
  15658. "_tag": {
  15659. "type": "string",
  15660. "enum": ["InvalidRequestError"]
  15661. },
  15662. "message": {
  15663. "type": "string"
  15664. },
  15665. "kind": {
  15666. "type": "string"
  15667. },
  15668. "field": {
  15669. "type": "string"
  15670. }
  15671. },
  15672. "required": ["_tag", "message"],
  15673. "additionalProperties": false
  15674. },
  15675. "MoveSessionError": {
  15676. "type": "object",
  15677. "properties": {
  15678. "name": {
  15679. "type": "string",
  15680. "enum": ["MoveSessionError"]
  15681. },
  15682. "data": {
  15683. "type": "object",
  15684. "properties": {
  15685. "message": {
  15686. "type": "string"
  15687. }
  15688. },
  15689. "required": ["message"],
  15690. "additionalProperties": false
  15691. }
  15692. },
  15693. "required": ["name", "data"],
  15694. "additionalProperties": false
  15695. },
  15696. "SnapshotFileDiff": {
  15697. "type": "object",
  15698. "properties": {
  15699. "file": {
  15700. "type": "string"
  15701. },
  15702. "patch": {
  15703. "type": "string"
  15704. },
  15705. "additions": {
  15706. "type": "number"
  15707. },
  15708. "deletions": {
  15709. "type": "number"
  15710. },
  15711. "status": {
  15712. "type": "string",
  15713. "enum": ["added", "deleted", "modified"]
  15714. }
  15715. },
  15716. "required": ["additions", "deletions"],
  15717. "additionalProperties": false
  15718. },
  15719. "PermissionAction": {
  15720. "type": "string",
  15721. "enum": ["allow", "deny", "ask"]
  15722. },
  15723. "PermissionRule": {
  15724. "type": "object",
  15725. "properties": {
  15726. "permission": {
  15727. "type": "string"
  15728. },
  15729. "pattern": {
  15730. "type": "string"
  15731. },
  15732. "action": {
  15733. "$ref": "#/components/schemas/PermissionAction"
  15734. }
  15735. },
  15736. "required": ["permission", "pattern", "action"],
  15737. "additionalProperties": false
  15738. },
  15739. "PermissionRuleset": {
  15740. "type": "array",
  15741. "items": {
  15742. "$ref": "#/components/schemas/PermissionRule"
  15743. }
  15744. },
  15745. "Session": {
  15746. "type": "object",
  15747. "properties": {
  15748. "id": {
  15749. "type": "string",
  15750. "pattern": "^ses"
  15751. },
  15752. "slug": {
  15753. "type": "string"
  15754. },
  15755. "projectID": {
  15756. "type": "string"
  15757. },
  15758. "workspaceID": {
  15759. "type": "string",
  15760. "pattern": "^wrk"
  15761. },
  15762. "directory": {
  15763. "type": "string"
  15764. },
  15765. "path": {
  15766. "type": "string"
  15767. },
  15768. "parentID": {
  15769. "type": "string",
  15770. "pattern": "^ses"
  15771. },
  15772. "summary": {
  15773. "type": "object",
  15774. "properties": {
  15775. "additions": {
  15776. "type": "number"
  15777. },
  15778. "deletions": {
  15779. "type": "number"
  15780. },
  15781. "files": {
  15782. "type": "number"
  15783. },
  15784. "diffs": {
  15785. "type": "array",
  15786. "items": {
  15787. "$ref": "#/components/schemas/SnapshotFileDiff"
  15788. }
  15789. }
  15790. },
  15791. "required": ["additions", "deletions", "files"],
  15792. "additionalProperties": false
  15793. },
  15794. "cost": {
  15795. "type": "number"
  15796. },
  15797. "tokens": {
  15798. "type": "object",
  15799. "properties": {
  15800. "input": {
  15801. "type": "number"
  15802. },
  15803. "output": {
  15804. "type": "number"
  15805. },
  15806. "reasoning": {
  15807. "type": "number"
  15808. },
  15809. "cache": {
  15810. "type": "object",
  15811. "properties": {
  15812. "read": {
  15813. "type": "number"
  15814. },
  15815. "write": {
  15816. "type": "number"
  15817. }
  15818. },
  15819. "required": ["read", "write"],
  15820. "additionalProperties": false
  15821. }
  15822. },
  15823. "required": ["input", "output", "reasoning", "cache"],
  15824. "additionalProperties": false
  15825. },
  15826. "share": {
  15827. "type": "object",
  15828. "properties": {
  15829. "url": {
  15830. "type": "string"
  15831. }
  15832. },
  15833. "required": ["url"],
  15834. "additionalProperties": false
  15835. },
  15836. "title": {
  15837. "type": "string"
  15838. },
  15839. "agent": {
  15840. "type": "string"
  15841. },
  15842. "model": {
  15843. "type": "object",
  15844. "properties": {
  15845. "id": {
  15846. "type": "string"
  15847. },
  15848. "providerID": {
  15849. "type": "string"
  15850. },
  15851. "variant": {
  15852. "type": "string"
  15853. }
  15854. },
  15855. "required": ["id", "providerID"],
  15856. "additionalProperties": false
  15857. },
  15858. "version": {
  15859. "type": "string"
  15860. },
  15861. "metadata": {
  15862. "type": "object"
  15863. },
  15864. "time": {
  15865. "type": "object",
  15866. "properties": {
  15867. "created": {
  15868. "type": "integer",
  15869. "minimum": 0
  15870. },
  15871. "updated": {
  15872. "type": "integer",
  15873. "minimum": 0
  15874. },
  15875. "compacting": {
  15876. "type": "integer",
  15877. "minimum": 0
  15878. },
  15879. "archived": {
  15880. "type": "number"
  15881. }
  15882. },
  15883. "required": ["created", "updated"],
  15884. "additionalProperties": false
  15885. },
  15886. "permission": {
  15887. "$ref": "#/components/schemas/PermissionRuleset"
  15888. },
  15889. "revert": {
  15890. "type": "object",
  15891. "properties": {
  15892. "messageID": {
  15893. "type": "string",
  15894. "pattern": "^msg"
  15895. },
  15896. "partID": {
  15897. "type": "string",
  15898. "pattern": "^prt"
  15899. },
  15900. "snapshot": {
  15901. "type": "string"
  15902. },
  15903. "diff": {
  15904. "type": "string"
  15905. }
  15906. },
  15907. "required": ["messageID"],
  15908. "additionalProperties": false
  15909. }
  15910. },
  15911. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15912. "additionalProperties": false
  15913. },
  15914. "OutputFormatText": {
  15915. "type": "object",
  15916. "properties": {
  15917. "type": {
  15918. "type": "string",
  15919. "enum": ["text"]
  15920. }
  15921. },
  15922. "required": ["type"],
  15923. "additionalProperties": false
  15924. },
  15925. "JSONSchema": {
  15926. "type": "object"
  15927. },
  15928. "OutputFormatJsonSchema": {
  15929. "type": "object",
  15930. "properties": {
  15931. "type": {
  15932. "type": "string",
  15933. "enum": ["json_schema"]
  15934. },
  15935. "schema": {
  15936. "$ref": "#/components/schemas/JSONSchema"
  15937. },
  15938. "retryCount": {
  15939. "type": "integer",
  15940. "minimum": 0
  15941. }
  15942. },
  15943. "required": ["type", "schema"],
  15944. "additionalProperties": false
  15945. },
  15946. "OutputFormat": {
  15947. "anyOf": [
  15948. {
  15949. "$ref": "#/components/schemas/OutputFormatText"
  15950. },
  15951. {
  15952. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15953. }
  15954. ]
  15955. },
  15956. "UserMessage": {
  15957. "type": "object",
  15958. "properties": {
  15959. "id": {
  15960. "type": "string",
  15961. "pattern": "^msg"
  15962. },
  15963. "sessionID": {
  15964. "type": "string",
  15965. "pattern": "^ses"
  15966. },
  15967. "role": {
  15968. "type": "string",
  15969. "enum": ["user"]
  15970. },
  15971. "time": {
  15972. "type": "object",
  15973. "properties": {
  15974. "created": {
  15975. "type": "number",
  15976. "minimum": 0
  15977. }
  15978. },
  15979. "required": ["created"],
  15980. "additionalProperties": false
  15981. },
  15982. "format": {
  15983. "$ref": "#/components/schemas/OutputFormat"
  15984. },
  15985. "summary": {
  15986. "type": "object",
  15987. "properties": {
  15988. "title": {
  15989. "type": "string"
  15990. },
  15991. "body": {
  15992. "type": "string"
  15993. },
  15994. "diffs": {
  15995. "type": "array",
  15996. "items": {
  15997. "$ref": "#/components/schemas/SnapshotFileDiff"
  15998. }
  15999. }
  16000. },
  16001. "required": ["diffs"],
  16002. "additionalProperties": false
  16003. },
  16004. "agent": {
  16005. "type": "string"
  16006. },
  16007. "model": {
  16008. "type": "object",
  16009. "properties": {
  16010. "providerID": {
  16011. "type": "string"
  16012. },
  16013. "modelID": {
  16014. "type": "string"
  16015. },
  16016. "variant": {
  16017. "type": "string"
  16018. }
  16019. },
  16020. "required": ["providerID", "modelID"],
  16021. "additionalProperties": false
  16022. },
  16023. "system": {
  16024. "type": "string"
  16025. },
  16026. "tools": {
  16027. "type": "object",
  16028. "additionalProperties": {
  16029. "type": "boolean"
  16030. }
  16031. }
  16032. },
  16033. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  16034. "additionalProperties": false
  16035. },
  16036. "ProviderAuthError": {
  16037. "type": "object",
  16038. "properties": {
  16039. "name": {
  16040. "type": "string",
  16041. "enum": ["ProviderAuthError"]
  16042. },
  16043. "data": {
  16044. "type": "object",
  16045. "properties": {
  16046. "providerID": {
  16047. "type": "string"
  16048. },
  16049. "message": {
  16050. "type": "string"
  16051. }
  16052. },
  16053. "required": ["providerID", "message"],
  16054. "additionalProperties": false
  16055. }
  16056. },
  16057. "required": ["name", "data"],
  16058. "additionalProperties": false
  16059. },
  16060. "UnknownError": {
  16061. "type": "object",
  16062. "properties": {
  16063. "name": {
  16064. "type": "string",
  16065. "enum": ["UnknownError"]
  16066. },
  16067. "data": {
  16068. "type": "object",
  16069. "properties": {
  16070. "message": {
  16071. "type": "string"
  16072. },
  16073. "ref": {
  16074. "type": "string"
  16075. }
  16076. },
  16077. "required": ["message"],
  16078. "additionalProperties": false
  16079. }
  16080. },
  16081. "required": ["name", "data"],
  16082. "additionalProperties": false
  16083. },
  16084. "MessageOutputLengthError": {
  16085. "type": "object",
  16086. "properties": {
  16087. "name": {
  16088. "type": "string",
  16089. "enum": ["MessageOutputLengthError"]
  16090. },
  16091. "data": {
  16092. "type": "object",
  16093. "properties": {}
  16094. }
  16095. },
  16096. "required": ["name", "data"],
  16097. "additionalProperties": false
  16098. },
  16099. "MessageAbortedError": {
  16100. "type": "object",
  16101. "properties": {
  16102. "name": {
  16103. "type": "string",
  16104. "enum": ["MessageAbortedError"]
  16105. },
  16106. "data": {
  16107. "type": "object",
  16108. "properties": {
  16109. "message": {
  16110. "type": "string"
  16111. }
  16112. },
  16113. "required": ["message"],
  16114. "additionalProperties": false
  16115. }
  16116. },
  16117. "required": ["name", "data"],
  16118. "additionalProperties": false
  16119. },
  16120. "StructuredOutputError": {
  16121. "type": "object",
  16122. "properties": {
  16123. "name": {
  16124. "type": "string",
  16125. "enum": ["StructuredOutputError"]
  16126. },
  16127. "data": {
  16128. "type": "object",
  16129. "properties": {
  16130. "message": {
  16131. "type": "string"
  16132. },
  16133. "retries": {
  16134. "type": "integer",
  16135. "minimum": 0
  16136. }
  16137. },
  16138. "required": ["message", "retries"],
  16139. "additionalProperties": false
  16140. }
  16141. },
  16142. "required": ["name", "data"],
  16143. "additionalProperties": false
  16144. },
  16145. "ContextOverflowError": {
  16146. "type": "object",
  16147. "properties": {
  16148. "name": {
  16149. "type": "string",
  16150. "enum": ["ContextOverflowError"]
  16151. },
  16152. "data": {
  16153. "type": "object",
  16154. "properties": {
  16155. "message": {
  16156. "type": "string"
  16157. },
  16158. "responseBody": {
  16159. "type": "string"
  16160. }
  16161. },
  16162. "required": ["message"],
  16163. "additionalProperties": false
  16164. }
  16165. },
  16166. "required": ["name", "data"],
  16167. "additionalProperties": false
  16168. },
  16169. "ContentFilterError": {
  16170. "type": "object",
  16171. "properties": {
  16172. "name": {
  16173. "type": "string",
  16174. "enum": ["ContentFilterError"]
  16175. },
  16176. "data": {
  16177. "type": "object",
  16178. "properties": {
  16179. "message": {
  16180. "type": "string"
  16181. }
  16182. },
  16183. "required": ["message"],
  16184. "additionalProperties": false
  16185. }
  16186. },
  16187. "required": ["name", "data"],
  16188. "additionalProperties": false
  16189. },
  16190. "APIError": {
  16191. "type": "object",
  16192. "properties": {
  16193. "name": {
  16194. "type": "string",
  16195. "enum": ["APIError"]
  16196. },
  16197. "data": {
  16198. "type": "object",
  16199. "properties": {
  16200. "message": {
  16201. "type": "string"
  16202. },
  16203. "statusCode": {
  16204. "type": "integer",
  16205. "minimum": 0
  16206. },
  16207. "isRetryable": {
  16208. "type": "boolean"
  16209. },
  16210. "responseHeaders": {
  16211. "type": "object",
  16212. "additionalProperties": {
  16213. "type": "string"
  16214. }
  16215. },
  16216. "responseBody": {
  16217. "type": "string"
  16218. },
  16219. "metadata": {
  16220. "type": "object",
  16221. "additionalProperties": {
  16222. "type": "string"
  16223. }
  16224. }
  16225. },
  16226. "required": ["message", "isRetryable"],
  16227. "additionalProperties": false
  16228. }
  16229. },
  16230. "required": ["name", "data"],
  16231. "additionalProperties": false
  16232. },
  16233. "AssistantMessage": {
  16234. "type": "object",
  16235. "properties": {
  16236. "id": {
  16237. "type": "string",
  16238. "pattern": "^msg"
  16239. },
  16240. "sessionID": {
  16241. "type": "string",
  16242. "pattern": "^ses"
  16243. },
  16244. "role": {
  16245. "type": "string",
  16246. "enum": ["assistant"]
  16247. },
  16248. "time": {
  16249. "type": "object",
  16250. "properties": {
  16251. "created": {
  16252. "type": "integer",
  16253. "minimum": 0
  16254. },
  16255. "completed": {
  16256. "type": "integer",
  16257. "minimum": 0
  16258. }
  16259. },
  16260. "required": ["created"],
  16261. "additionalProperties": false
  16262. },
  16263. "error": {
  16264. "anyOf": [
  16265. {
  16266. "$ref": "#/components/schemas/ProviderAuthError"
  16267. },
  16268. {
  16269. "$ref": "#/components/schemas/UnknownError"
  16270. },
  16271. {
  16272. "$ref": "#/components/schemas/MessageOutputLengthError"
  16273. },
  16274. {
  16275. "$ref": "#/components/schemas/MessageAbortedError"
  16276. },
  16277. {
  16278. "$ref": "#/components/schemas/StructuredOutputError"
  16279. },
  16280. {
  16281. "$ref": "#/components/schemas/ContextOverflowError"
  16282. },
  16283. {
  16284. "$ref": "#/components/schemas/ContentFilterError"
  16285. },
  16286. {
  16287. "$ref": "#/components/schemas/APIError"
  16288. }
  16289. ]
  16290. },
  16291. "parentID": {
  16292. "type": "string",
  16293. "pattern": "^msg"
  16294. },
  16295. "modelID": {
  16296. "type": "string"
  16297. },
  16298. "providerID": {
  16299. "type": "string"
  16300. },
  16301. "mode": {
  16302. "type": "string"
  16303. },
  16304. "agent": {
  16305. "type": "string"
  16306. },
  16307. "path": {
  16308. "type": "object",
  16309. "properties": {
  16310. "cwd": {
  16311. "type": "string"
  16312. },
  16313. "root": {
  16314. "type": "string"
  16315. }
  16316. },
  16317. "required": ["cwd", "root"],
  16318. "additionalProperties": false
  16319. },
  16320. "summary": {
  16321. "type": "boolean"
  16322. },
  16323. "cost": {
  16324. "type": "number"
  16325. },
  16326. "tokens": {
  16327. "type": "object",
  16328. "properties": {
  16329. "total": {
  16330. "type": "number"
  16331. },
  16332. "input": {
  16333. "type": "number"
  16334. },
  16335. "output": {
  16336. "type": "number"
  16337. },
  16338. "reasoning": {
  16339. "type": "number"
  16340. },
  16341. "cache": {
  16342. "type": "object",
  16343. "properties": {
  16344. "read": {
  16345. "type": "number"
  16346. },
  16347. "write": {
  16348. "type": "number"
  16349. }
  16350. },
  16351. "required": ["read", "write"],
  16352. "additionalProperties": false
  16353. }
  16354. },
  16355. "required": ["input", "output", "reasoning", "cache"],
  16356. "additionalProperties": false
  16357. },
  16358. "structured": {},
  16359. "variant": {
  16360. "type": "string"
  16361. },
  16362. "finish": {
  16363. "type": "string"
  16364. }
  16365. },
  16366. "required": [
  16367. "id",
  16368. "sessionID",
  16369. "role",
  16370. "time",
  16371. "parentID",
  16372. "modelID",
  16373. "providerID",
  16374. "mode",
  16375. "agent",
  16376. "path",
  16377. "cost",
  16378. "tokens"
  16379. ],
  16380. "additionalProperties": false
  16381. },
  16382. "Message": {
  16383. "anyOf": [
  16384. {
  16385. "$ref": "#/components/schemas/UserMessage"
  16386. },
  16387. {
  16388. "$ref": "#/components/schemas/AssistantMessage"
  16389. }
  16390. ]
  16391. },
  16392. "TextPart": {
  16393. "type": "object",
  16394. "properties": {
  16395. "id": {
  16396. "type": "string",
  16397. "pattern": "^prt"
  16398. },
  16399. "sessionID": {
  16400. "type": "string",
  16401. "pattern": "^ses"
  16402. },
  16403. "messageID": {
  16404. "type": "string",
  16405. "pattern": "^msg"
  16406. },
  16407. "type": {
  16408. "type": "string",
  16409. "enum": ["text"]
  16410. },
  16411. "text": {
  16412. "type": "string"
  16413. },
  16414. "synthetic": {
  16415. "type": "boolean"
  16416. },
  16417. "ignored": {
  16418. "type": "boolean"
  16419. },
  16420. "time": {
  16421. "type": "object",
  16422. "properties": {
  16423. "start": {
  16424. "type": "integer",
  16425. "minimum": 0
  16426. },
  16427. "end": {
  16428. "type": "integer",
  16429. "minimum": 0
  16430. }
  16431. },
  16432. "required": ["start"],
  16433. "additionalProperties": false
  16434. },
  16435. "metadata": {
  16436. "type": "object"
  16437. }
  16438. },
  16439. "required": ["id", "sessionID", "messageID", "type", "text"],
  16440. "additionalProperties": false
  16441. },
  16442. "SubtaskPart": {
  16443. "type": "object",
  16444. "properties": {
  16445. "id": {
  16446. "type": "string",
  16447. "pattern": "^prt"
  16448. },
  16449. "sessionID": {
  16450. "type": "string",
  16451. "pattern": "^ses"
  16452. },
  16453. "messageID": {
  16454. "type": "string",
  16455. "pattern": "^msg"
  16456. },
  16457. "type": {
  16458. "type": "string",
  16459. "enum": ["subtask"]
  16460. },
  16461. "prompt": {
  16462. "type": "string"
  16463. },
  16464. "description": {
  16465. "type": "string"
  16466. },
  16467. "agent": {
  16468. "type": "string"
  16469. },
  16470. "model": {
  16471. "type": "object",
  16472. "properties": {
  16473. "providerID": {
  16474. "type": "string"
  16475. },
  16476. "modelID": {
  16477. "type": "string"
  16478. }
  16479. },
  16480. "required": ["providerID", "modelID"],
  16481. "additionalProperties": false
  16482. },
  16483. "command": {
  16484. "type": "string"
  16485. }
  16486. },
  16487. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  16488. "additionalProperties": false
  16489. },
  16490. "ReasoningPart": {
  16491. "type": "object",
  16492. "properties": {
  16493. "id": {
  16494. "type": "string",
  16495. "pattern": "^prt"
  16496. },
  16497. "sessionID": {
  16498. "type": "string",
  16499. "pattern": "^ses"
  16500. },
  16501. "messageID": {
  16502. "type": "string",
  16503. "pattern": "^msg"
  16504. },
  16505. "type": {
  16506. "type": "string",
  16507. "enum": ["reasoning"]
  16508. },
  16509. "text": {
  16510. "type": "string"
  16511. },
  16512. "metadata": {
  16513. "type": "object"
  16514. },
  16515. "time": {
  16516. "type": "object",
  16517. "properties": {
  16518. "start": {
  16519. "type": "integer",
  16520. "minimum": 0
  16521. },
  16522. "end": {
  16523. "type": "integer",
  16524. "minimum": 0
  16525. }
  16526. },
  16527. "required": ["start"],
  16528. "additionalProperties": false
  16529. }
  16530. },
  16531. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  16532. "additionalProperties": false
  16533. },
  16534. "FilePartSourceText": {
  16535. "type": "object",
  16536. "properties": {
  16537. "value": {
  16538. "type": "string"
  16539. },
  16540. "start": {
  16541. "type": "number"
  16542. },
  16543. "end": {
  16544. "type": "number"
  16545. }
  16546. },
  16547. "required": ["value", "start", "end"],
  16548. "additionalProperties": false
  16549. },
  16550. "FileSource": {
  16551. "type": "object",
  16552. "properties": {
  16553. "text": {
  16554. "$ref": "#/components/schemas/FilePartSourceText"
  16555. },
  16556. "type": {
  16557. "type": "string",
  16558. "enum": ["file"]
  16559. },
  16560. "path": {
  16561. "type": "string"
  16562. }
  16563. },
  16564. "required": ["text", "type", "path"],
  16565. "additionalProperties": false
  16566. },
  16567. "Range": {
  16568. "type": "object",
  16569. "properties": {
  16570. "start": {
  16571. "type": "object",
  16572. "properties": {
  16573. "line": {
  16574. "type": "integer",
  16575. "minimum": 0
  16576. },
  16577. "character": {
  16578. "type": "integer",
  16579. "minimum": 0
  16580. }
  16581. },
  16582. "required": ["line", "character"],
  16583. "additionalProperties": false
  16584. },
  16585. "end": {
  16586. "type": "object",
  16587. "properties": {
  16588. "line": {
  16589. "type": "integer",
  16590. "minimum": 0
  16591. },
  16592. "character": {
  16593. "type": "integer",
  16594. "minimum": 0
  16595. }
  16596. },
  16597. "required": ["line", "character"],
  16598. "additionalProperties": false
  16599. }
  16600. },
  16601. "required": ["start", "end"],
  16602. "additionalProperties": false
  16603. },
  16604. "SymbolSource": {
  16605. "type": "object",
  16606. "properties": {
  16607. "text": {
  16608. "$ref": "#/components/schemas/FilePartSourceText"
  16609. },
  16610. "type": {
  16611. "type": "string",
  16612. "enum": ["symbol"]
  16613. },
  16614. "path": {
  16615. "type": "string"
  16616. },
  16617. "range": {
  16618. "$ref": "#/components/schemas/Range"
  16619. },
  16620. "name": {
  16621. "type": "string"
  16622. },
  16623. "kind": {
  16624. "type": "integer",
  16625. "minimum": 0
  16626. }
  16627. },
  16628. "required": ["text", "type", "path", "range", "name", "kind"],
  16629. "additionalProperties": false
  16630. },
  16631. "ResourceSource": {
  16632. "type": "object",
  16633. "properties": {
  16634. "text": {
  16635. "$ref": "#/components/schemas/FilePartSourceText"
  16636. },
  16637. "type": {
  16638. "type": "string",
  16639. "enum": ["resource"]
  16640. },
  16641. "clientName": {
  16642. "type": "string"
  16643. },
  16644. "uri": {
  16645. "type": "string"
  16646. }
  16647. },
  16648. "required": ["text", "type", "clientName", "uri"],
  16649. "additionalProperties": false
  16650. },
  16651. "FilePartSource": {
  16652. "anyOf": [
  16653. {
  16654. "$ref": "#/components/schemas/FileSource"
  16655. },
  16656. {
  16657. "$ref": "#/components/schemas/SymbolSource"
  16658. },
  16659. {
  16660. "$ref": "#/components/schemas/ResourceSource"
  16661. }
  16662. ]
  16663. },
  16664. "FilePart": {
  16665. "type": "object",
  16666. "properties": {
  16667. "id": {
  16668. "type": "string",
  16669. "pattern": "^prt"
  16670. },
  16671. "sessionID": {
  16672. "type": "string",
  16673. "pattern": "^ses"
  16674. },
  16675. "messageID": {
  16676. "type": "string",
  16677. "pattern": "^msg"
  16678. },
  16679. "type": {
  16680. "type": "string",
  16681. "enum": ["file"]
  16682. },
  16683. "mime": {
  16684. "type": "string"
  16685. },
  16686. "filename": {
  16687. "type": "string"
  16688. },
  16689. "url": {
  16690. "type": "string"
  16691. },
  16692. "source": {
  16693. "$ref": "#/components/schemas/FilePartSource"
  16694. }
  16695. },
  16696. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16697. "additionalProperties": false
  16698. },
  16699. "ToolStatePending": {
  16700. "type": "object",
  16701. "properties": {
  16702. "status": {
  16703. "type": "string",
  16704. "enum": ["pending"]
  16705. },
  16706. "input": {
  16707. "type": "object"
  16708. },
  16709. "raw": {
  16710. "type": "string"
  16711. }
  16712. },
  16713. "required": ["status", "input", "raw"],
  16714. "additionalProperties": false
  16715. },
  16716. "ToolStateRunning": {
  16717. "type": "object",
  16718. "properties": {
  16719. "status": {
  16720. "type": "string",
  16721. "enum": ["running"]
  16722. },
  16723. "input": {
  16724. "type": "object"
  16725. },
  16726. "title": {
  16727. "type": "string"
  16728. },
  16729. "metadata": {
  16730. "type": "object"
  16731. },
  16732. "time": {
  16733. "type": "object",
  16734. "properties": {
  16735. "start": {
  16736. "type": "integer",
  16737. "minimum": 0
  16738. }
  16739. },
  16740. "required": ["start"],
  16741. "additionalProperties": false
  16742. }
  16743. },
  16744. "required": ["status", "input", "time"],
  16745. "additionalProperties": false
  16746. },
  16747. "ToolStateCompleted": {
  16748. "type": "object",
  16749. "properties": {
  16750. "status": {
  16751. "type": "string",
  16752. "enum": ["completed"]
  16753. },
  16754. "input": {
  16755. "type": "object"
  16756. },
  16757. "output": {
  16758. "type": "string"
  16759. },
  16760. "title": {
  16761. "type": "string"
  16762. },
  16763. "metadata": {
  16764. "type": "object"
  16765. },
  16766. "time": {
  16767. "type": "object",
  16768. "properties": {
  16769. "start": {
  16770. "type": "integer",
  16771. "minimum": 0
  16772. },
  16773. "end": {
  16774. "type": "integer",
  16775. "minimum": 0
  16776. },
  16777. "compacted": {
  16778. "type": "integer",
  16779. "minimum": 0
  16780. }
  16781. },
  16782. "required": ["start", "end"],
  16783. "additionalProperties": false
  16784. },
  16785. "attachments": {
  16786. "type": "array",
  16787. "items": {
  16788. "$ref": "#/components/schemas/FilePart"
  16789. }
  16790. }
  16791. },
  16792. "required": ["status", "input", "output", "title", "metadata", "time"],
  16793. "additionalProperties": false
  16794. },
  16795. "ToolStateError": {
  16796. "type": "object",
  16797. "properties": {
  16798. "status": {
  16799. "type": "string",
  16800. "enum": ["error"]
  16801. },
  16802. "input": {
  16803. "type": "object"
  16804. },
  16805. "error": {
  16806. "type": "string"
  16807. },
  16808. "metadata": {
  16809. "type": "object"
  16810. },
  16811. "time": {
  16812. "type": "object",
  16813. "properties": {
  16814. "start": {
  16815. "type": "integer",
  16816. "minimum": 0
  16817. },
  16818. "end": {
  16819. "type": "integer",
  16820. "minimum": 0
  16821. }
  16822. },
  16823. "required": ["start", "end"],
  16824. "additionalProperties": false
  16825. }
  16826. },
  16827. "required": ["status", "input", "error", "time"],
  16828. "additionalProperties": false
  16829. },
  16830. "ToolState": {
  16831. "anyOf": [
  16832. {
  16833. "$ref": "#/components/schemas/ToolStatePending"
  16834. },
  16835. {
  16836. "$ref": "#/components/schemas/ToolStateRunning"
  16837. },
  16838. {
  16839. "$ref": "#/components/schemas/ToolStateCompleted"
  16840. },
  16841. {
  16842. "$ref": "#/components/schemas/ToolStateError"
  16843. }
  16844. ]
  16845. },
  16846. "ToolPart": {
  16847. "type": "object",
  16848. "properties": {
  16849. "id": {
  16850. "type": "string",
  16851. "pattern": "^prt"
  16852. },
  16853. "sessionID": {
  16854. "type": "string",
  16855. "pattern": "^ses"
  16856. },
  16857. "messageID": {
  16858. "type": "string",
  16859. "pattern": "^msg"
  16860. },
  16861. "type": {
  16862. "type": "string",
  16863. "enum": ["tool"]
  16864. },
  16865. "callID": {
  16866. "type": "string"
  16867. },
  16868. "tool": {
  16869. "type": "string"
  16870. },
  16871. "state": {
  16872. "$ref": "#/components/schemas/ToolState"
  16873. },
  16874. "metadata": {
  16875. "type": "object"
  16876. }
  16877. },
  16878. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16879. "additionalProperties": false
  16880. },
  16881. "StepStartPart": {
  16882. "type": "object",
  16883. "properties": {
  16884. "id": {
  16885. "type": "string",
  16886. "pattern": "^prt"
  16887. },
  16888. "sessionID": {
  16889. "type": "string",
  16890. "pattern": "^ses"
  16891. },
  16892. "messageID": {
  16893. "type": "string",
  16894. "pattern": "^msg"
  16895. },
  16896. "type": {
  16897. "type": "string",
  16898. "enum": ["step-start"]
  16899. },
  16900. "snapshot": {
  16901. "type": "string"
  16902. }
  16903. },
  16904. "required": ["id", "sessionID", "messageID", "type"],
  16905. "additionalProperties": false
  16906. },
  16907. "StepFinishPart": {
  16908. "type": "object",
  16909. "properties": {
  16910. "id": {
  16911. "type": "string",
  16912. "pattern": "^prt"
  16913. },
  16914. "sessionID": {
  16915. "type": "string",
  16916. "pattern": "^ses"
  16917. },
  16918. "messageID": {
  16919. "type": "string",
  16920. "pattern": "^msg"
  16921. },
  16922. "type": {
  16923. "type": "string",
  16924. "enum": ["step-finish"]
  16925. },
  16926. "reason": {
  16927. "type": "string"
  16928. },
  16929. "snapshot": {
  16930. "type": "string"
  16931. },
  16932. "cost": {
  16933. "type": "number"
  16934. },
  16935. "tokens": {
  16936. "type": "object",
  16937. "properties": {
  16938. "total": {
  16939. "type": "number"
  16940. },
  16941. "input": {
  16942. "type": "number"
  16943. },
  16944. "output": {
  16945. "type": "number"
  16946. },
  16947. "reasoning": {
  16948. "type": "number"
  16949. },
  16950. "cache": {
  16951. "type": "object",
  16952. "properties": {
  16953. "read": {
  16954. "type": "number"
  16955. },
  16956. "write": {
  16957. "type": "number"
  16958. }
  16959. },
  16960. "required": ["read", "write"],
  16961. "additionalProperties": false
  16962. }
  16963. },
  16964. "required": ["input", "output", "reasoning", "cache"],
  16965. "additionalProperties": false
  16966. }
  16967. },
  16968. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16969. "additionalProperties": false
  16970. },
  16971. "SnapshotPart": {
  16972. "type": "object",
  16973. "properties": {
  16974. "id": {
  16975. "type": "string",
  16976. "pattern": "^prt"
  16977. },
  16978. "sessionID": {
  16979. "type": "string",
  16980. "pattern": "^ses"
  16981. },
  16982. "messageID": {
  16983. "type": "string",
  16984. "pattern": "^msg"
  16985. },
  16986. "type": {
  16987. "type": "string",
  16988. "enum": ["snapshot"]
  16989. },
  16990. "snapshot": {
  16991. "type": "string"
  16992. }
  16993. },
  16994. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16995. "additionalProperties": false
  16996. },
  16997. "PatchPart": {
  16998. "type": "object",
  16999. "properties": {
  17000. "id": {
  17001. "type": "string",
  17002. "pattern": "^prt"
  17003. },
  17004. "sessionID": {
  17005. "type": "string",
  17006. "pattern": "^ses"
  17007. },
  17008. "messageID": {
  17009. "type": "string",
  17010. "pattern": "^msg"
  17011. },
  17012. "type": {
  17013. "type": "string",
  17014. "enum": ["patch"]
  17015. },
  17016. "hash": {
  17017. "type": "string"
  17018. },
  17019. "files": {
  17020. "type": "array",
  17021. "items": {
  17022. "type": "string"
  17023. }
  17024. }
  17025. },
  17026. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  17027. "additionalProperties": false
  17028. },
  17029. "AgentPart": {
  17030. "type": "object",
  17031. "properties": {
  17032. "id": {
  17033. "type": "string",
  17034. "pattern": "^prt"
  17035. },
  17036. "sessionID": {
  17037. "type": "string",
  17038. "pattern": "^ses"
  17039. },
  17040. "messageID": {
  17041. "type": "string",
  17042. "pattern": "^msg"
  17043. },
  17044. "type": {
  17045. "type": "string",
  17046. "enum": ["agent"]
  17047. },
  17048. "name": {
  17049. "type": "string"
  17050. },
  17051. "source": {
  17052. "type": "object",
  17053. "properties": {
  17054. "value": {
  17055. "type": "string"
  17056. },
  17057. "start": {
  17058. "type": "integer",
  17059. "minimum": 0
  17060. },
  17061. "end": {
  17062. "type": "integer",
  17063. "minimum": 0
  17064. }
  17065. },
  17066. "required": ["value", "start", "end"],
  17067. "additionalProperties": false
  17068. }
  17069. },
  17070. "required": ["id", "sessionID", "messageID", "type", "name"],
  17071. "additionalProperties": false
  17072. },
  17073. "RetryPart": {
  17074. "type": "object",
  17075. "properties": {
  17076. "id": {
  17077. "type": "string",
  17078. "pattern": "^prt"
  17079. },
  17080. "sessionID": {
  17081. "type": "string",
  17082. "pattern": "^ses"
  17083. },
  17084. "messageID": {
  17085. "type": "string",
  17086. "pattern": "^msg"
  17087. },
  17088. "type": {
  17089. "type": "string",
  17090. "enum": ["retry"]
  17091. },
  17092. "attempt": {
  17093. "type": "integer",
  17094. "minimum": 0
  17095. },
  17096. "error": {
  17097. "$ref": "#/components/schemas/APIError"
  17098. },
  17099. "time": {
  17100. "type": "object",
  17101. "properties": {
  17102. "created": {
  17103. "type": "integer",
  17104. "minimum": 0
  17105. }
  17106. },
  17107. "required": ["created"],
  17108. "additionalProperties": false
  17109. }
  17110. },
  17111. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  17112. "additionalProperties": false
  17113. },
  17114. "CompactionPart": {
  17115. "type": "object",
  17116. "properties": {
  17117. "id": {
  17118. "type": "string",
  17119. "pattern": "^prt"
  17120. },
  17121. "sessionID": {
  17122. "type": "string",
  17123. "pattern": "^ses"
  17124. },
  17125. "messageID": {
  17126. "type": "string",
  17127. "pattern": "^msg"
  17128. },
  17129. "type": {
  17130. "type": "string",
  17131. "enum": ["compaction"]
  17132. },
  17133. "auto": {
  17134. "type": "boolean"
  17135. },
  17136. "overflow": {
  17137. "type": "boolean"
  17138. },
  17139. "tail_start_id": {
  17140. "type": "string",
  17141. "pattern": "^msg"
  17142. }
  17143. },
  17144. "required": ["id", "sessionID", "messageID", "type", "auto"],
  17145. "additionalProperties": false
  17146. },
  17147. "Part": {
  17148. "anyOf": [
  17149. {
  17150. "$ref": "#/components/schemas/TextPart"
  17151. },
  17152. {
  17153. "$ref": "#/components/schemas/SubtaskPart"
  17154. },
  17155. {
  17156. "$ref": "#/components/schemas/ReasoningPart"
  17157. },
  17158. {
  17159. "$ref": "#/components/schemas/FilePart"
  17160. },
  17161. {
  17162. "$ref": "#/components/schemas/ToolPart"
  17163. },
  17164. {
  17165. "$ref": "#/components/schemas/StepStartPart"
  17166. },
  17167. {
  17168. "$ref": "#/components/schemas/StepFinishPart"
  17169. },
  17170. {
  17171. "$ref": "#/components/schemas/SnapshotPart"
  17172. },
  17173. {
  17174. "$ref": "#/components/schemas/PatchPart"
  17175. },
  17176. {
  17177. "$ref": "#/components/schemas/AgentPart"
  17178. },
  17179. {
  17180. "$ref": "#/components/schemas/RetryPart"
  17181. },
  17182. {
  17183. "$ref": "#/components/schemas/CompactionPart"
  17184. }
  17185. ]
  17186. },
  17187. "Prompt": {
  17188. "type": "object",
  17189. "properties": {
  17190. "text": {
  17191. "type": "string"
  17192. },
  17193. "files": {
  17194. "type": "array",
  17195. "items": {
  17196. "$ref": "#/components/schemas/PromptFileAttachment"
  17197. }
  17198. },
  17199. "agents": {
  17200. "type": "array",
  17201. "items": {
  17202. "$ref": "#/components/schemas/PromptAgentAttachment"
  17203. }
  17204. }
  17205. },
  17206. "required": ["text"],
  17207. "additionalProperties": false
  17208. },
  17209. "Pty": {
  17210. "type": "object",
  17211. "properties": {
  17212. "id": {
  17213. "type": "string",
  17214. "pattern": "^pty"
  17215. },
  17216. "title": {
  17217. "type": "string"
  17218. },
  17219. "command": {
  17220. "type": "string"
  17221. },
  17222. "args": {
  17223. "type": "array",
  17224. "items": {
  17225. "type": "string"
  17226. }
  17227. },
  17228. "cwd": {
  17229. "type": "string"
  17230. },
  17231. "status": {
  17232. "type": "string",
  17233. "enum": ["running", "exited"]
  17234. },
  17235. "pid": {
  17236. "type": "integer",
  17237. "minimum": 0
  17238. },
  17239. "exitCode": {
  17240. "type": "integer",
  17241. "minimum": 0
  17242. }
  17243. },
  17244. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  17245. "additionalProperties": false
  17246. },
  17247. "Todo": {
  17248. "type": "object",
  17249. "properties": {
  17250. "content": {
  17251. "type": "string",
  17252. "description": "Brief description of the task"
  17253. },
  17254. "status": {
  17255. "type": "string",
  17256. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  17257. },
  17258. "priority": {
  17259. "type": "string",
  17260. "description": "Priority level of the task: high, medium, low"
  17261. }
  17262. },
  17263. "required": ["content", "status", "priority"],
  17264. "additionalProperties": false
  17265. },
  17266. "SessionStatus": {
  17267. "anyOf": [
  17268. {
  17269. "type": "object",
  17270. "properties": {
  17271. "type": {
  17272. "type": "string",
  17273. "enum": ["idle"]
  17274. }
  17275. },
  17276. "required": ["type"],
  17277. "additionalProperties": false
  17278. },
  17279. {
  17280. "type": "object",
  17281. "properties": {
  17282. "type": {
  17283. "type": "string",
  17284. "enum": ["retry"]
  17285. },
  17286. "attempt": {
  17287. "type": "integer",
  17288. "minimum": 0
  17289. },
  17290. "message": {
  17291. "type": "string"
  17292. },
  17293. "action": {
  17294. "type": "object",
  17295. "properties": {
  17296. "reason": {
  17297. "type": "string"
  17298. },
  17299. "provider": {
  17300. "type": "string"
  17301. },
  17302. "title": {
  17303. "type": "string"
  17304. },
  17305. "message": {
  17306. "type": "string"
  17307. },
  17308. "label": {
  17309. "type": "string"
  17310. },
  17311. "link": {
  17312. "type": "string"
  17313. }
  17314. },
  17315. "required": ["reason", "provider", "title", "message", "label"],
  17316. "additionalProperties": false
  17317. },
  17318. "next": {
  17319. "type": "integer",
  17320. "minimum": 0
  17321. }
  17322. },
  17323. "required": ["type", "attempt", "message", "next"],
  17324. "additionalProperties": false
  17325. },
  17326. {
  17327. "type": "object",
  17328. "properties": {
  17329. "type": {
  17330. "type": "string",
  17331. "enum": ["busy"]
  17332. }
  17333. },
  17334. "required": ["type"],
  17335. "additionalProperties": false
  17336. }
  17337. ]
  17338. },
  17339. "QuestionOption": {
  17340. "type": "object",
  17341. "properties": {
  17342. "label": {
  17343. "type": "string",
  17344. "description": "Display text (1-5 words, concise)"
  17345. },
  17346. "description": {
  17347. "type": "string",
  17348. "description": "Explanation of choice"
  17349. }
  17350. },
  17351. "required": ["label", "description"],
  17352. "additionalProperties": false
  17353. },
  17354. "QuestionInfo": {
  17355. "type": "object",
  17356. "properties": {
  17357. "question": {
  17358. "type": "string",
  17359. "description": "Complete question"
  17360. },
  17361. "header": {
  17362. "type": "string",
  17363. "description": "Very short label (max 30 chars)"
  17364. },
  17365. "options": {
  17366. "type": "array",
  17367. "items": {
  17368. "$ref": "#/components/schemas/QuestionOption"
  17369. },
  17370. "description": "Available choices"
  17371. },
  17372. "multiple": {
  17373. "type": "boolean"
  17374. },
  17375. "custom": {
  17376. "type": "boolean"
  17377. }
  17378. },
  17379. "required": ["question", "header", "options"],
  17380. "additionalProperties": false
  17381. },
  17382. "QuestionTool": {
  17383. "type": "object",
  17384. "properties": {
  17385. "messageID": {
  17386. "type": "string",
  17387. "pattern": "^msg"
  17388. },
  17389. "callID": {
  17390. "type": "string"
  17391. }
  17392. },
  17393. "required": ["messageID", "callID"],
  17394. "additionalProperties": false
  17395. },
  17396. "QuestionAnswer": {
  17397. "type": "array",
  17398. "items": {
  17399. "type": "string"
  17400. }
  17401. },
  17402. "GlobalEvent": {
  17403. "type": "object",
  17404. "properties": {
  17405. "directory": {
  17406. "type": "string"
  17407. },
  17408. "project": {
  17409. "type": "string"
  17410. },
  17411. "workspace": {
  17412. "type": "string"
  17413. },
  17414. "payload": {
  17415. "anyOf": [
  17416. {
  17417. "type": "object",
  17418. "properties": {
  17419. "id": {
  17420. "type": "string",
  17421. "pattern": "^evt_"
  17422. },
  17423. "type": {
  17424. "type": "string",
  17425. "enum": ["models-dev.refreshed"]
  17426. },
  17427. "properties": {
  17428. "type": "object",
  17429. "properties": {}
  17430. }
  17431. },
  17432. "required": ["id", "type", "properties"],
  17433. "additionalProperties": false
  17434. },
  17435. {
  17436. "type": "object",
  17437. "properties": {
  17438. "id": {
  17439. "type": "string",
  17440. "pattern": "^evt_"
  17441. },
  17442. "type": {
  17443. "type": "string",
  17444. "enum": ["integration.updated"]
  17445. },
  17446. "properties": {
  17447. "type": "object",
  17448. "properties": {}
  17449. }
  17450. },
  17451. "required": ["id", "type", "properties"],
  17452. "additionalProperties": false
  17453. },
  17454. {
  17455. "type": "object",
  17456. "properties": {
  17457. "id": {
  17458. "type": "string",
  17459. "pattern": "^evt_"
  17460. },
  17461. "type": {
  17462. "type": "string",
  17463. "enum": ["integration.connection.updated"]
  17464. },
  17465. "properties": {
  17466. "type": "object",
  17467. "properties": {
  17468. "integrationID": {
  17469. "type": "string"
  17470. }
  17471. },
  17472. "required": ["integrationID"],
  17473. "additionalProperties": false
  17474. }
  17475. },
  17476. "required": ["id", "type", "properties"],
  17477. "additionalProperties": false
  17478. },
  17479. {
  17480. "type": "object",
  17481. "properties": {
  17482. "id": {
  17483. "type": "string",
  17484. "pattern": "^evt_"
  17485. },
  17486. "type": {
  17487. "type": "string",
  17488. "enum": ["catalog.updated"]
  17489. },
  17490. "properties": {
  17491. "type": "object",
  17492. "properties": {}
  17493. }
  17494. },
  17495. "required": ["id", "type", "properties"],
  17496. "additionalProperties": false
  17497. },
  17498. {
  17499. "type": "object",
  17500. "properties": {
  17501. "id": {
  17502. "type": "string",
  17503. "pattern": "^evt_"
  17504. },
  17505. "type": {
  17506. "type": "string",
  17507. "enum": ["session.created"]
  17508. },
  17509. "properties": {
  17510. "type": "object",
  17511. "properties": {
  17512. "sessionID": {
  17513. "type": "string",
  17514. "pattern": "^ses"
  17515. },
  17516. "info": {
  17517. "$ref": "#/components/schemas/Session"
  17518. }
  17519. },
  17520. "required": ["sessionID", "info"],
  17521. "additionalProperties": false
  17522. }
  17523. },
  17524. "required": ["id", "type", "properties"],
  17525. "additionalProperties": false
  17526. },
  17527. {
  17528. "type": "object",
  17529. "properties": {
  17530. "id": {
  17531. "type": "string",
  17532. "pattern": "^evt_"
  17533. },
  17534. "type": {
  17535. "type": "string",
  17536. "enum": ["session.updated"]
  17537. },
  17538. "properties": {
  17539. "type": "object",
  17540. "properties": {
  17541. "sessionID": {
  17542. "type": "string",
  17543. "pattern": "^ses"
  17544. },
  17545. "info": {
  17546. "$ref": "#/components/schemas/Session"
  17547. }
  17548. },
  17549. "required": ["sessionID", "info"],
  17550. "additionalProperties": false
  17551. }
  17552. },
  17553. "required": ["id", "type", "properties"],
  17554. "additionalProperties": false
  17555. },
  17556. {
  17557. "type": "object",
  17558. "properties": {
  17559. "id": {
  17560. "type": "string",
  17561. "pattern": "^evt_"
  17562. },
  17563. "type": {
  17564. "type": "string",
  17565. "enum": ["session.deleted"]
  17566. },
  17567. "properties": {
  17568. "type": "object",
  17569. "properties": {
  17570. "sessionID": {
  17571. "type": "string",
  17572. "pattern": "^ses"
  17573. },
  17574. "info": {
  17575. "$ref": "#/components/schemas/Session"
  17576. }
  17577. },
  17578. "required": ["sessionID", "info"],
  17579. "additionalProperties": false
  17580. }
  17581. },
  17582. "required": ["id", "type", "properties"],
  17583. "additionalProperties": false
  17584. },
  17585. {
  17586. "type": "object",
  17587. "properties": {
  17588. "id": {
  17589. "type": "string",
  17590. "pattern": "^evt_"
  17591. },
  17592. "type": {
  17593. "type": "string",
  17594. "enum": ["message.updated"]
  17595. },
  17596. "properties": {
  17597. "type": "object",
  17598. "properties": {
  17599. "sessionID": {
  17600. "type": "string",
  17601. "pattern": "^ses"
  17602. },
  17603. "info": {
  17604. "$ref": "#/components/schemas/Message"
  17605. }
  17606. },
  17607. "required": ["sessionID", "info"],
  17608. "additionalProperties": false
  17609. }
  17610. },
  17611. "required": ["id", "type", "properties"],
  17612. "additionalProperties": false
  17613. },
  17614. {
  17615. "type": "object",
  17616. "properties": {
  17617. "id": {
  17618. "type": "string",
  17619. "pattern": "^evt_"
  17620. },
  17621. "type": {
  17622. "type": "string",
  17623. "enum": ["message.removed"]
  17624. },
  17625. "properties": {
  17626. "type": "object",
  17627. "properties": {
  17628. "sessionID": {
  17629. "type": "string",
  17630. "pattern": "^ses"
  17631. },
  17632. "messageID": {
  17633. "type": "string",
  17634. "pattern": "^msg"
  17635. }
  17636. },
  17637. "required": ["sessionID", "messageID"],
  17638. "additionalProperties": false
  17639. }
  17640. },
  17641. "required": ["id", "type", "properties"],
  17642. "additionalProperties": false
  17643. },
  17644. {
  17645. "type": "object",
  17646. "properties": {
  17647. "id": {
  17648. "type": "string",
  17649. "pattern": "^evt_"
  17650. },
  17651. "type": {
  17652. "type": "string",
  17653. "enum": ["message.part.updated"]
  17654. },
  17655. "properties": {
  17656. "type": "object",
  17657. "properties": {
  17658. "sessionID": {
  17659. "type": "string",
  17660. "pattern": "^ses"
  17661. },
  17662. "part": {
  17663. "$ref": "#/components/schemas/Part"
  17664. },
  17665. "time": {
  17666. "type": "number"
  17667. }
  17668. },
  17669. "required": ["sessionID", "part", "time"],
  17670. "additionalProperties": false
  17671. }
  17672. },
  17673. "required": ["id", "type", "properties"],
  17674. "additionalProperties": false
  17675. },
  17676. {
  17677. "type": "object",
  17678. "properties": {
  17679. "id": {
  17680. "type": "string",
  17681. "pattern": "^evt_"
  17682. },
  17683. "type": {
  17684. "type": "string",
  17685. "enum": ["message.part.removed"]
  17686. },
  17687. "properties": {
  17688. "type": "object",
  17689. "properties": {
  17690. "sessionID": {
  17691. "type": "string",
  17692. "pattern": "^ses"
  17693. },
  17694. "messageID": {
  17695. "type": "string",
  17696. "pattern": "^msg"
  17697. },
  17698. "partID": {
  17699. "type": "string",
  17700. "pattern": "^prt"
  17701. }
  17702. },
  17703. "required": ["sessionID", "messageID", "partID"],
  17704. "additionalProperties": false
  17705. }
  17706. },
  17707. "required": ["id", "type", "properties"],
  17708. "additionalProperties": false
  17709. },
  17710. {
  17711. "type": "object",
  17712. "properties": {
  17713. "id": {
  17714. "type": "string",
  17715. "pattern": "^evt_"
  17716. },
  17717. "type": {
  17718. "type": "string",
  17719. "enum": ["session.next.agent.switched"]
  17720. },
  17721. "properties": {
  17722. "type": "object",
  17723. "properties": {
  17724. "timestamp": {
  17725. "type": "number"
  17726. },
  17727. "sessionID": {
  17728. "type": "string",
  17729. "pattern": "^ses"
  17730. },
  17731. "messageID": {
  17732. "type": "string",
  17733. "pattern": "^msg_"
  17734. },
  17735. "agent": {
  17736. "type": "string"
  17737. }
  17738. },
  17739. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17740. "additionalProperties": false
  17741. }
  17742. },
  17743. "required": ["id", "type", "properties"],
  17744. "additionalProperties": false
  17745. },
  17746. {
  17747. "type": "object",
  17748. "properties": {
  17749. "id": {
  17750. "type": "string",
  17751. "pattern": "^evt_"
  17752. },
  17753. "type": {
  17754. "type": "string",
  17755. "enum": ["session.next.model.switched"]
  17756. },
  17757. "properties": {
  17758. "type": "object",
  17759. "properties": {
  17760. "timestamp": {
  17761. "type": "number"
  17762. },
  17763. "sessionID": {
  17764. "type": "string",
  17765. "pattern": "^ses"
  17766. },
  17767. "messageID": {
  17768. "type": "string",
  17769. "pattern": "^msg_"
  17770. },
  17771. "model": {
  17772. "$ref": "#/components/schemas/ModelRef"
  17773. }
  17774. },
  17775. "required": ["timestamp", "sessionID", "messageID", "model"],
  17776. "additionalProperties": false
  17777. }
  17778. },
  17779. "required": ["id", "type", "properties"],
  17780. "additionalProperties": false
  17781. },
  17782. {
  17783. "type": "object",
  17784. "properties": {
  17785. "id": {
  17786. "type": "string",
  17787. "pattern": "^evt_"
  17788. },
  17789. "type": {
  17790. "type": "string",
  17791. "enum": ["session.next.moved"]
  17792. },
  17793. "properties": {
  17794. "type": "object",
  17795. "properties": {
  17796. "timestamp": {
  17797. "type": "number"
  17798. },
  17799. "sessionID": {
  17800. "type": "string",
  17801. "pattern": "^ses"
  17802. },
  17803. "location": {
  17804. "$ref": "#/components/schemas/LocationRef"
  17805. },
  17806. "subdirectory": {
  17807. "type": "string"
  17808. }
  17809. },
  17810. "required": ["timestamp", "sessionID", "location"],
  17811. "additionalProperties": false
  17812. }
  17813. },
  17814. "required": ["id", "type", "properties"],
  17815. "additionalProperties": false
  17816. },
  17817. {
  17818. "type": "object",
  17819. "properties": {
  17820. "id": {
  17821. "type": "string",
  17822. "pattern": "^evt_"
  17823. },
  17824. "type": {
  17825. "type": "string",
  17826. "enum": ["session.next.prompted"]
  17827. },
  17828. "properties": {
  17829. "type": "object",
  17830. "properties": {
  17831. "timestamp": {
  17832. "type": "number"
  17833. },
  17834. "sessionID": {
  17835. "type": "string",
  17836. "pattern": "^ses"
  17837. },
  17838. "messageID": {
  17839. "type": "string",
  17840. "pattern": "^msg_"
  17841. },
  17842. "prompt": {
  17843. "$ref": "#/components/schemas/Prompt"
  17844. },
  17845. "delivery": {
  17846. "type": "string",
  17847. "enum": ["steer", "queue"]
  17848. }
  17849. },
  17850. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17851. "additionalProperties": false
  17852. }
  17853. },
  17854. "required": ["id", "type", "properties"],
  17855. "additionalProperties": false
  17856. },
  17857. {
  17858. "type": "object",
  17859. "properties": {
  17860. "id": {
  17861. "type": "string",
  17862. "pattern": "^evt_"
  17863. },
  17864. "type": {
  17865. "type": "string",
  17866. "enum": ["session.next.prompt.admitted"]
  17867. },
  17868. "properties": {
  17869. "type": "object",
  17870. "properties": {
  17871. "timestamp": {
  17872. "type": "number"
  17873. },
  17874. "sessionID": {
  17875. "type": "string",
  17876. "pattern": "^ses"
  17877. },
  17878. "messageID": {
  17879. "type": "string",
  17880. "pattern": "^msg_"
  17881. },
  17882. "prompt": {
  17883. "$ref": "#/components/schemas/Prompt"
  17884. },
  17885. "delivery": {
  17886. "type": "string",
  17887. "enum": ["steer", "queue"]
  17888. }
  17889. },
  17890. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17891. "additionalProperties": false
  17892. }
  17893. },
  17894. "required": ["id", "type", "properties"],
  17895. "additionalProperties": false
  17896. },
  17897. {
  17898. "type": "object",
  17899. "properties": {
  17900. "id": {
  17901. "type": "string",
  17902. "pattern": "^evt_"
  17903. },
  17904. "type": {
  17905. "type": "string",
  17906. "enum": ["session.next.context.updated"]
  17907. },
  17908. "properties": {
  17909. "type": "object",
  17910. "properties": {
  17911. "timestamp": {
  17912. "type": "number"
  17913. },
  17914. "sessionID": {
  17915. "type": "string",
  17916. "pattern": "^ses"
  17917. },
  17918. "messageID": {
  17919. "type": "string",
  17920. "pattern": "^msg_"
  17921. },
  17922. "text": {
  17923. "type": "string"
  17924. }
  17925. },
  17926. "required": ["timestamp", "sessionID", "messageID", "text"],
  17927. "additionalProperties": false
  17928. }
  17929. },
  17930. "required": ["id", "type", "properties"],
  17931. "additionalProperties": false
  17932. },
  17933. {
  17934. "type": "object",
  17935. "properties": {
  17936. "id": {
  17937. "type": "string",
  17938. "pattern": "^evt_"
  17939. },
  17940. "type": {
  17941. "type": "string",
  17942. "enum": ["session.next.synthetic"]
  17943. },
  17944. "properties": {
  17945. "type": "object",
  17946. "properties": {
  17947. "timestamp": {
  17948. "type": "number"
  17949. },
  17950. "sessionID": {
  17951. "type": "string",
  17952. "pattern": "^ses"
  17953. },
  17954. "messageID": {
  17955. "type": "string",
  17956. "pattern": "^msg_"
  17957. },
  17958. "text": {
  17959. "type": "string"
  17960. }
  17961. },
  17962. "required": ["timestamp", "sessionID", "messageID", "text"],
  17963. "additionalProperties": false
  17964. }
  17965. },
  17966. "required": ["id", "type", "properties"],
  17967. "additionalProperties": false
  17968. },
  17969. {
  17970. "type": "object",
  17971. "properties": {
  17972. "id": {
  17973. "type": "string",
  17974. "pattern": "^evt_"
  17975. },
  17976. "type": {
  17977. "type": "string",
  17978. "enum": ["session.next.shell.started"]
  17979. },
  17980. "properties": {
  17981. "type": "object",
  17982. "properties": {
  17983. "timestamp": {
  17984. "type": "number"
  17985. },
  17986. "sessionID": {
  17987. "type": "string",
  17988. "pattern": "^ses"
  17989. },
  17990. "messageID": {
  17991. "type": "string",
  17992. "pattern": "^msg_"
  17993. },
  17994. "callID": {
  17995. "type": "string"
  17996. },
  17997. "command": {
  17998. "type": "string"
  17999. }
  18000. },
  18001. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  18002. "additionalProperties": false
  18003. }
  18004. },
  18005. "required": ["id", "type", "properties"],
  18006. "additionalProperties": false
  18007. },
  18008. {
  18009. "type": "object",
  18010. "properties": {
  18011. "id": {
  18012. "type": "string",
  18013. "pattern": "^evt_"
  18014. },
  18015. "type": {
  18016. "type": "string",
  18017. "enum": ["session.next.shell.ended"]
  18018. },
  18019. "properties": {
  18020. "type": "object",
  18021. "properties": {
  18022. "timestamp": {
  18023. "type": "number"
  18024. },
  18025. "sessionID": {
  18026. "type": "string",
  18027. "pattern": "^ses"
  18028. },
  18029. "callID": {
  18030. "type": "string"
  18031. },
  18032. "output": {
  18033. "type": "string"
  18034. }
  18035. },
  18036. "required": ["timestamp", "sessionID", "callID", "output"],
  18037. "additionalProperties": false
  18038. }
  18039. },
  18040. "required": ["id", "type", "properties"],
  18041. "additionalProperties": false
  18042. },
  18043. {
  18044. "type": "object",
  18045. "properties": {
  18046. "id": {
  18047. "type": "string",
  18048. "pattern": "^evt_"
  18049. },
  18050. "type": {
  18051. "type": "string",
  18052. "enum": ["session.next.step.started"]
  18053. },
  18054. "properties": {
  18055. "type": "object",
  18056. "properties": {
  18057. "timestamp": {
  18058. "type": "number"
  18059. },
  18060. "sessionID": {
  18061. "type": "string",
  18062. "pattern": "^ses"
  18063. },
  18064. "assistantMessageID": {
  18065. "type": "string",
  18066. "pattern": "^msg_"
  18067. },
  18068. "agent": {
  18069. "type": "string"
  18070. },
  18071. "model": {
  18072. "$ref": "#/components/schemas/ModelRef"
  18073. },
  18074. "snapshot": {
  18075. "type": "string"
  18076. }
  18077. },
  18078. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  18079. "additionalProperties": false
  18080. }
  18081. },
  18082. "required": ["id", "type", "properties"],
  18083. "additionalProperties": false
  18084. },
  18085. {
  18086. "type": "object",
  18087. "properties": {
  18088. "id": {
  18089. "type": "string",
  18090. "pattern": "^evt_"
  18091. },
  18092. "type": {
  18093. "type": "string",
  18094. "enum": ["session.next.step.ended"]
  18095. },
  18096. "properties": {
  18097. "type": "object",
  18098. "properties": {
  18099. "timestamp": {
  18100. "type": "number"
  18101. },
  18102. "sessionID": {
  18103. "type": "string",
  18104. "pattern": "^ses"
  18105. },
  18106. "assistantMessageID": {
  18107. "type": "string",
  18108. "pattern": "^msg_"
  18109. },
  18110. "finish": {
  18111. "type": "string"
  18112. },
  18113. "cost": {
  18114. "type": "number"
  18115. },
  18116. "tokens": {
  18117. "type": "object",
  18118. "properties": {
  18119. "input": {
  18120. "type": "number"
  18121. },
  18122. "output": {
  18123. "type": "number"
  18124. },
  18125. "reasoning": {
  18126. "type": "number"
  18127. },
  18128. "cache": {
  18129. "type": "object",
  18130. "properties": {
  18131. "read": {
  18132. "type": "number"
  18133. },
  18134. "write": {
  18135. "type": "number"
  18136. }
  18137. },
  18138. "required": ["read", "write"],
  18139. "additionalProperties": false
  18140. }
  18141. },
  18142. "required": ["input", "output", "reasoning", "cache"],
  18143. "additionalProperties": false
  18144. },
  18145. "snapshot": {
  18146. "type": "string"
  18147. },
  18148. "files": {
  18149. "type": "array",
  18150. "items": {
  18151. "type": "string"
  18152. }
  18153. }
  18154. },
  18155. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  18156. "additionalProperties": false
  18157. }
  18158. },
  18159. "required": ["id", "type", "properties"],
  18160. "additionalProperties": false
  18161. },
  18162. {
  18163. "type": "object",
  18164. "properties": {
  18165. "id": {
  18166. "type": "string",
  18167. "pattern": "^evt_"
  18168. },
  18169. "type": {
  18170. "type": "string",
  18171. "enum": ["session.next.step.failed"]
  18172. },
  18173. "properties": {
  18174. "type": "object",
  18175. "properties": {
  18176. "timestamp": {
  18177. "type": "number"
  18178. },
  18179. "sessionID": {
  18180. "type": "string",
  18181. "pattern": "^ses"
  18182. },
  18183. "assistantMessageID": {
  18184. "type": "string",
  18185. "pattern": "^msg_"
  18186. },
  18187. "error": {
  18188. "$ref": "#/components/schemas/SessionErrorUnknown"
  18189. }
  18190. },
  18191. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  18192. "additionalProperties": false
  18193. }
  18194. },
  18195. "required": ["id", "type", "properties"],
  18196. "additionalProperties": false
  18197. },
  18198. {
  18199. "type": "object",
  18200. "properties": {
  18201. "id": {
  18202. "type": "string",
  18203. "pattern": "^evt_"
  18204. },
  18205. "type": {
  18206. "type": "string",
  18207. "enum": ["session.next.text.started"]
  18208. },
  18209. "properties": {
  18210. "type": "object",
  18211. "properties": {
  18212. "timestamp": {
  18213. "type": "number"
  18214. },
  18215. "sessionID": {
  18216. "type": "string",
  18217. "pattern": "^ses"
  18218. },
  18219. "assistantMessageID": {
  18220. "type": "string",
  18221. "pattern": "^msg_"
  18222. },
  18223. "textID": {
  18224. "type": "string"
  18225. }
  18226. },
  18227. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  18228. "additionalProperties": false
  18229. }
  18230. },
  18231. "required": ["id", "type", "properties"],
  18232. "additionalProperties": false
  18233. },
  18234. {
  18235. "type": "object",
  18236. "properties": {
  18237. "id": {
  18238. "type": "string",
  18239. "pattern": "^evt_"
  18240. },
  18241. "type": {
  18242. "type": "string",
  18243. "enum": ["session.next.text.delta"]
  18244. },
  18245. "properties": {
  18246. "type": "object",
  18247. "properties": {
  18248. "timestamp": {
  18249. "type": "number"
  18250. },
  18251. "sessionID": {
  18252. "type": "string",
  18253. "pattern": "^ses"
  18254. },
  18255. "assistantMessageID": {
  18256. "type": "string",
  18257. "pattern": "^msg_"
  18258. },
  18259. "textID": {
  18260. "type": "string"
  18261. },
  18262. "delta": {
  18263. "type": "string"
  18264. }
  18265. },
  18266. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  18267. "additionalProperties": false
  18268. }
  18269. },
  18270. "required": ["id", "type", "properties"],
  18271. "additionalProperties": false
  18272. },
  18273. {
  18274. "type": "object",
  18275. "properties": {
  18276. "id": {
  18277. "type": "string",
  18278. "pattern": "^evt_"
  18279. },
  18280. "type": {
  18281. "type": "string",
  18282. "enum": ["session.next.text.ended"]
  18283. },
  18284. "properties": {
  18285. "type": "object",
  18286. "properties": {
  18287. "timestamp": {
  18288. "type": "number"
  18289. },
  18290. "sessionID": {
  18291. "type": "string",
  18292. "pattern": "^ses"
  18293. },
  18294. "assistantMessageID": {
  18295. "type": "string",
  18296. "pattern": "^msg_"
  18297. },
  18298. "textID": {
  18299. "type": "string"
  18300. },
  18301. "text": {
  18302. "type": "string"
  18303. }
  18304. },
  18305. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  18306. "additionalProperties": false
  18307. }
  18308. },
  18309. "required": ["id", "type", "properties"],
  18310. "additionalProperties": false
  18311. },
  18312. {
  18313. "type": "object",
  18314. "properties": {
  18315. "id": {
  18316. "type": "string",
  18317. "pattern": "^evt_"
  18318. },
  18319. "type": {
  18320. "type": "string",
  18321. "enum": ["session.next.reasoning.started"]
  18322. },
  18323. "properties": {
  18324. "type": "object",
  18325. "properties": {
  18326. "timestamp": {
  18327. "type": "number"
  18328. },
  18329. "sessionID": {
  18330. "type": "string",
  18331. "pattern": "^ses"
  18332. },
  18333. "assistantMessageID": {
  18334. "type": "string",
  18335. "pattern": "^msg_"
  18336. },
  18337. "reasoningID": {
  18338. "type": "string"
  18339. },
  18340. "providerMetadata": {
  18341. "$ref": "#/components/schemas/LLMProviderMetadata"
  18342. }
  18343. },
  18344. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  18345. "additionalProperties": false
  18346. }
  18347. },
  18348. "required": ["id", "type", "properties"],
  18349. "additionalProperties": false
  18350. },
  18351. {
  18352. "type": "object",
  18353. "properties": {
  18354. "id": {
  18355. "type": "string",
  18356. "pattern": "^evt_"
  18357. },
  18358. "type": {
  18359. "type": "string",
  18360. "enum": ["session.next.reasoning.delta"]
  18361. },
  18362. "properties": {
  18363. "type": "object",
  18364. "properties": {
  18365. "timestamp": {
  18366. "type": "number"
  18367. },
  18368. "sessionID": {
  18369. "type": "string",
  18370. "pattern": "^ses"
  18371. },
  18372. "assistantMessageID": {
  18373. "type": "string",
  18374. "pattern": "^msg_"
  18375. },
  18376. "reasoningID": {
  18377. "type": "string"
  18378. },
  18379. "delta": {
  18380. "type": "string"
  18381. }
  18382. },
  18383. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  18384. "additionalProperties": false
  18385. }
  18386. },
  18387. "required": ["id", "type", "properties"],
  18388. "additionalProperties": false
  18389. },
  18390. {
  18391. "type": "object",
  18392. "properties": {
  18393. "id": {
  18394. "type": "string",
  18395. "pattern": "^evt_"
  18396. },
  18397. "type": {
  18398. "type": "string",
  18399. "enum": ["session.next.reasoning.ended"]
  18400. },
  18401. "properties": {
  18402. "type": "object",
  18403. "properties": {
  18404. "timestamp": {
  18405. "type": "number"
  18406. },
  18407. "sessionID": {
  18408. "type": "string",
  18409. "pattern": "^ses"
  18410. },
  18411. "assistantMessageID": {
  18412. "type": "string",
  18413. "pattern": "^msg_"
  18414. },
  18415. "reasoningID": {
  18416. "type": "string"
  18417. },
  18418. "text": {
  18419. "type": "string"
  18420. },
  18421. "providerMetadata": {
  18422. "$ref": "#/components/schemas/LLMProviderMetadata"
  18423. }
  18424. },
  18425. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  18426. "additionalProperties": false
  18427. }
  18428. },
  18429. "required": ["id", "type", "properties"],
  18430. "additionalProperties": false
  18431. },
  18432. {
  18433. "type": "object",
  18434. "properties": {
  18435. "id": {
  18436. "type": "string",
  18437. "pattern": "^evt_"
  18438. },
  18439. "type": {
  18440. "type": "string",
  18441. "enum": ["session.next.tool.input.started"]
  18442. },
  18443. "properties": {
  18444. "type": "object",
  18445. "properties": {
  18446. "timestamp": {
  18447. "type": "number"
  18448. },
  18449. "sessionID": {
  18450. "type": "string",
  18451. "pattern": "^ses"
  18452. },
  18453. "assistantMessageID": {
  18454. "type": "string",
  18455. "pattern": "^msg_"
  18456. },
  18457. "callID": {
  18458. "type": "string"
  18459. },
  18460. "name": {
  18461. "type": "string"
  18462. }
  18463. },
  18464. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  18465. "additionalProperties": false
  18466. }
  18467. },
  18468. "required": ["id", "type", "properties"],
  18469. "additionalProperties": false
  18470. },
  18471. {
  18472. "type": "object",
  18473. "properties": {
  18474. "id": {
  18475. "type": "string",
  18476. "pattern": "^evt_"
  18477. },
  18478. "type": {
  18479. "type": "string",
  18480. "enum": ["session.next.tool.input.delta"]
  18481. },
  18482. "properties": {
  18483. "type": "object",
  18484. "properties": {
  18485. "timestamp": {
  18486. "type": "number"
  18487. },
  18488. "sessionID": {
  18489. "type": "string",
  18490. "pattern": "^ses"
  18491. },
  18492. "assistantMessageID": {
  18493. "type": "string",
  18494. "pattern": "^msg_"
  18495. },
  18496. "callID": {
  18497. "type": "string"
  18498. },
  18499. "delta": {
  18500. "type": "string"
  18501. }
  18502. },
  18503. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  18504. "additionalProperties": false
  18505. }
  18506. },
  18507. "required": ["id", "type", "properties"],
  18508. "additionalProperties": false
  18509. },
  18510. {
  18511. "type": "object",
  18512. "properties": {
  18513. "id": {
  18514. "type": "string",
  18515. "pattern": "^evt_"
  18516. },
  18517. "type": {
  18518. "type": "string",
  18519. "enum": ["session.next.tool.input.ended"]
  18520. },
  18521. "properties": {
  18522. "type": "object",
  18523. "properties": {
  18524. "timestamp": {
  18525. "type": "number"
  18526. },
  18527. "sessionID": {
  18528. "type": "string",
  18529. "pattern": "^ses"
  18530. },
  18531. "assistantMessageID": {
  18532. "type": "string",
  18533. "pattern": "^msg_"
  18534. },
  18535. "callID": {
  18536. "type": "string"
  18537. },
  18538. "text": {
  18539. "type": "string"
  18540. }
  18541. },
  18542. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  18543. "additionalProperties": false
  18544. }
  18545. },
  18546. "required": ["id", "type", "properties"],
  18547. "additionalProperties": false
  18548. },
  18549. {
  18550. "type": "object",
  18551. "properties": {
  18552. "id": {
  18553. "type": "string",
  18554. "pattern": "^evt_"
  18555. },
  18556. "type": {
  18557. "type": "string",
  18558. "enum": ["session.next.tool.called"]
  18559. },
  18560. "properties": {
  18561. "type": "object",
  18562. "properties": {
  18563. "timestamp": {
  18564. "type": "number"
  18565. },
  18566. "sessionID": {
  18567. "type": "string",
  18568. "pattern": "^ses"
  18569. },
  18570. "assistantMessageID": {
  18571. "type": "string",
  18572. "pattern": "^msg_"
  18573. },
  18574. "callID": {
  18575. "type": "string"
  18576. },
  18577. "tool": {
  18578. "type": "string"
  18579. },
  18580. "input": {
  18581. "type": "object"
  18582. },
  18583. "provider": {
  18584. "type": "object",
  18585. "properties": {
  18586. "executed": {
  18587. "type": "boolean"
  18588. },
  18589. "metadata": {
  18590. "$ref": "#/components/schemas/LLMProviderMetadata"
  18591. }
  18592. },
  18593. "required": ["executed"],
  18594. "additionalProperties": false
  18595. }
  18596. },
  18597. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18598. "additionalProperties": false
  18599. }
  18600. },
  18601. "required": ["id", "type", "properties"],
  18602. "additionalProperties": false
  18603. },
  18604. {
  18605. "type": "object",
  18606. "properties": {
  18607. "id": {
  18608. "type": "string",
  18609. "pattern": "^evt_"
  18610. },
  18611. "type": {
  18612. "type": "string",
  18613. "enum": ["session.next.tool.progress"]
  18614. },
  18615. "properties": {
  18616. "type": "object",
  18617. "properties": {
  18618. "timestamp": {
  18619. "type": "number"
  18620. },
  18621. "sessionID": {
  18622. "type": "string",
  18623. "pattern": "^ses"
  18624. },
  18625. "assistantMessageID": {
  18626. "type": "string",
  18627. "pattern": "^msg_"
  18628. },
  18629. "callID": {
  18630. "type": "string"
  18631. },
  18632. "structured": {
  18633. "type": "object"
  18634. },
  18635. "content": {
  18636. "type": "array",
  18637. "items": {
  18638. "$ref": "#/components/schemas/LLMToolContent"
  18639. }
  18640. }
  18641. },
  18642. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18643. "additionalProperties": false
  18644. }
  18645. },
  18646. "required": ["id", "type", "properties"],
  18647. "additionalProperties": false
  18648. },
  18649. {
  18650. "type": "object",
  18651. "properties": {
  18652. "id": {
  18653. "type": "string",
  18654. "pattern": "^evt_"
  18655. },
  18656. "type": {
  18657. "type": "string",
  18658. "enum": ["session.next.tool.success"]
  18659. },
  18660. "properties": {
  18661. "type": "object",
  18662. "properties": {
  18663. "timestamp": {
  18664. "type": "number"
  18665. },
  18666. "sessionID": {
  18667. "type": "string",
  18668. "pattern": "^ses"
  18669. },
  18670. "assistantMessageID": {
  18671. "type": "string",
  18672. "pattern": "^msg_"
  18673. },
  18674. "callID": {
  18675. "type": "string"
  18676. },
  18677. "structured": {
  18678. "type": "object"
  18679. },
  18680. "content": {
  18681. "type": "array",
  18682. "items": {
  18683. "$ref": "#/components/schemas/LLMToolContent"
  18684. }
  18685. },
  18686. "outputPaths": {
  18687. "type": "array",
  18688. "items": {
  18689. "type": "string"
  18690. }
  18691. },
  18692. "result": {},
  18693. "provider": {
  18694. "type": "object",
  18695. "properties": {
  18696. "executed": {
  18697. "type": "boolean"
  18698. },
  18699. "metadata": {
  18700. "$ref": "#/components/schemas/LLMProviderMetadata"
  18701. }
  18702. },
  18703. "required": ["executed"],
  18704. "additionalProperties": false
  18705. }
  18706. },
  18707. "required": [
  18708. "timestamp",
  18709. "sessionID",
  18710. "assistantMessageID",
  18711. "callID",
  18712. "structured",
  18713. "content",
  18714. "provider"
  18715. ],
  18716. "additionalProperties": false
  18717. }
  18718. },
  18719. "required": ["id", "type", "properties"],
  18720. "additionalProperties": false
  18721. },
  18722. {
  18723. "type": "object",
  18724. "properties": {
  18725. "id": {
  18726. "type": "string",
  18727. "pattern": "^evt_"
  18728. },
  18729. "type": {
  18730. "type": "string",
  18731. "enum": ["session.next.tool.failed"]
  18732. },
  18733. "properties": {
  18734. "type": "object",
  18735. "properties": {
  18736. "timestamp": {
  18737. "type": "number"
  18738. },
  18739. "sessionID": {
  18740. "type": "string",
  18741. "pattern": "^ses"
  18742. },
  18743. "assistantMessageID": {
  18744. "type": "string",
  18745. "pattern": "^msg_"
  18746. },
  18747. "callID": {
  18748. "type": "string"
  18749. },
  18750. "error": {
  18751. "$ref": "#/components/schemas/SessionErrorUnknown"
  18752. },
  18753. "result": {},
  18754. "provider": {
  18755. "type": "object",
  18756. "properties": {
  18757. "executed": {
  18758. "type": "boolean"
  18759. },
  18760. "metadata": {
  18761. "$ref": "#/components/schemas/LLMProviderMetadata"
  18762. }
  18763. },
  18764. "required": ["executed"],
  18765. "additionalProperties": false
  18766. }
  18767. },
  18768. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18769. "additionalProperties": false
  18770. }
  18771. },
  18772. "required": ["id", "type", "properties"],
  18773. "additionalProperties": false
  18774. },
  18775. {
  18776. "type": "object",
  18777. "properties": {
  18778. "id": {
  18779. "type": "string",
  18780. "pattern": "^evt_"
  18781. },
  18782. "type": {
  18783. "type": "string",
  18784. "enum": ["session.next.retried"]
  18785. },
  18786. "properties": {
  18787. "type": "object",
  18788. "properties": {
  18789. "timestamp": {
  18790. "type": "number"
  18791. },
  18792. "sessionID": {
  18793. "type": "string",
  18794. "pattern": "^ses"
  18795. },
  18796. "attempt": {
  18797. "type": "number"
  18798. },
  18799. "error": {
  18800. "$ref": "#/components/schemas/SessionNextRetry_error"
  18801. }
  18802. },
  18803. "required": ["timestamp", "sessionID", "attempt", "error"],
  18804. "additionalProperties": false
  18805. }
  18806. },
  18807. "required": ["id", "type", "properties"],
  18808. "additionalProperties": false
  18809. },
  18810. {
  18811. "type": "object",
  18812. "properties": {
  18813. "id": {
  18814. "type": "string",
  18815. "pattern": "^evt_"
  18816. },
  18817. "type": {
  18818. "type": "string",
  18819. "enum": ["session.next.compaction.started"]
  18820. },
  18821. "properties": {
  18822. "type": "object",
  18823. "properties": {
  18824. "timestamp": {
  18825. "type": "number"
  18826. },
  18827. "sessionID": {
  18828. "type": "string",
  18829. "pattern": "^ses"
  18830. },
  18831. "messageID": {
  18832. "type": "string",
  18833. "pattern": "^msg_"
  18834. },
  18835. "reason": {
  18836. "type": "string",
  18837. "enum": ["auto", "manual"]
  18838. }
  18839. },
  18840. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18841. "additionalProperties": false
  18842. }
  18843. },
  18844. "required": ["id", "type", "properties"],
  18845. "additionalProperties": false
  18846. },
  18847. {
  18848. "type": "object",
  18849. "properties": {
  18850. "id": {
  18851. "type": "string",
  18852. "pattern": "^evt_"
  18853. },
  18854. "type": {
  18855. "type": "string",
  18856. "enum": ["session.next.compaction.delta"]
  18857. },
  18858. "properties": {
  18859. "type": "object",
  18860. "properties": {
  18861. "timestamp": {
  18862. "type": "number"
  18863. },
  18864. "sessionID": {
  18865. "type": "string",
  18866. "pattern": "^ses"
  18867. },
  18868. "messageID": {
  18869. "type": "string",
  18870. "pattern": "^msg_"
  18871. },
  18872. "text": {
  18873. "type": "string"
  18874. }
  18875. },
  18876. "required": ["timestamp", "sessionID", "messageID", "text"],
  18877. "additionalProperties": false
  18878. }
  18879. },
  18880. "required": ["id", "type", "properties"],
  18881. "additionalProperties": false
  18882. },
  18883. {
  18884. "type": "object",
  18885. "properties": {
  18886. "id": {
  18887. "type": "string",
  18888. "pattern": "^evt_"
  18889. },
  18890. "type": {
  18891. "type": "string",
  18892. "enum": ["session.next.compaction.ended"]
  18893. },
  18894. "properties": {
  18895. "type": "object",
  18896. "properties": {
  18897. "timestamp": {
  18898. "type": "number"
  18899. },
  18900. "sessionID": {
  18901. "type": "string",
  18902. "pattern": "^ses"
  18903. },
  18904. "messageID": {
  18905. "type": "string",
  18906. "pattern": "^msg_"
  18907. },
  18908. "reason": {
  18909. "type": "string",
  18910. "enum": ["auto", "manual"]
  18911. },
  18912. "text": {
  18913. "type": "string"
  18914. },
  18915. "recent": {
  18916. "type": "string"
  18917. }
  18918. },
  18919. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18920. "additionalProperties": false
  18921. }
  18922. },
  18923. "required": ["id", "type", "properties"],
  18924. "additionalProperties": false
  18925. },
  18926. {
  18927. "type": "object",
  18928. "properties": {
  18929. "id": {
  18930. "type": "string",
  18931. "pattern": "^evt_"
  18932. },
  18933. "type": {
  18934. "type": "string",
  18935. "enum": ["session.next.revert.staged"]
  18936. },
  18937. "properties": {
  18938. "type": "object",
  18939. "properties": {
  18940. "timestamp": {
  18941. "type": "number"
  18942. },
  18943. "sessionID": {
  18944. "type": "string",
  18945. "pattern": "^ses"
  18946. },
  18947. "revert": {
  18948. "$ref": "#/components/schemas/RevertState"
  18949. }
  18950. },
  18951. "required": ["timestamp", "sessionID", "revert"],
  18952. "additionalProperties": false
  18953. }
  18954. },
  18955. "required": ["id", "type", "properties"],
  18956. "additionalProperties": false
  18957. },
  18958. {
  18959. "type": "object",
  18960. "properties": {
  18961. "id": {
  18962. "type": "string",
  18963. "pattern": "^evt_"
  18964. },
  18965. "type": {
  18966. "type": "string",
  18967. "enum": ["session.next.revert.cleared"]
  18968. },
  18969. "properties": {
  18970. "type": "object",
  18971. "properties": {
  18972. "timestamp": {
  18973. "type": "number"
  18974. },
  18975. "sessionID": {
  18976. "type": "string",
  18977. "pattern": "^ses"
  18978. }
  18979. },
  18980. "required": ["timestamp", "sessionID"],
  18981. "additionalProperties": false
  18982. }
  18983. },
  18984. "required": ["id", "type", "properties"],
  18985. "additionalProperties": false
  18986. },
  18987. {
  18988. "type": "object",
  18989. "properties": {
  18990. "id": {
  18991. "type": "string",
  18992. "pattern": "^evt_"
  18993. },
  18994. "type": {
  18995. "type": "string",
  18996. "enum": ["session.next.revert.committed"]
  18997. },
  18998. "properties": {
  18999. "type": "object",
  19000. "properties": {
  19001. "timestamp": {
  19002. "type": "number"
  19003. },
  19004. "sessionID": {
  19005. "type": "string",
  19006. "pattern": "^ses"
  19007. },
  19008. "messageID": {
  19009. "type": "string",
  19010. "pattern": "^msg_"
  19011. }
  19012. },
  19013. "required": ["timestamp", "sessionID", "messageID"],
  19014. "additionalProperties": false
  19015. }
  19016. },
  19017. "required": ["id", "type", "properties"],
  19018. "additionalProperties": false
  19019. },
  19020. {
  19021. "type": "object",
  19022. "properties": {
  19023. "id": {
  19024. "type": "string",
  19025. "pattern": "^evt_"
  19026. },
  19027. "type": {
  19028. "type": "string",
  19029. "enum": ["message.part.delta"]
  19030. },
  19031. "properties": {
  19032. "type": "object",
  19033. "properties": {
  19034. "sessionID": {
  19035. "type": "string",
  19036. "pattern": "^ses"
  19037. },
  19038. "messageID": {
  19039. "type": "string",
  19040. "pattern": "^msg"
  19041. },
  19042. "partID": {
  19043. "type": "string",
  19044. "pattern": "^prt"
  19045. },
  19046. "field": {
  19047. "type": "string"
  19048. },
  19049. "delta": {
  19050. "type": "string"
  19051. }
  19052. },
  19053. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  19054. "additionalProperties": false
  19055. }
  19056. },
  19057. "required": ["id", "type", "properties"],
  19058. "additionalProperties": false
  19059. },
  19060. {
  19061. "type": "object",
  19062. "properties": {
  19063. "id": {
  19064. "type": "string",
  19065. "pattern": "^evt_"
  19066. },
  19067. "type": {
  19068. "type": "string",
  19069. "enum": ["session.diff"]
  19070. },
  19071. "properties": {
  19072. "type": "object",
  19073. "properties": {
  19074. "sessionID": {
  19075. "type": "string",
  19076. "pattern": "^ses"
  19077. },
  19078. "diff": {
  19079. "type": "array",
  19080. "items": {
  19081. "$ref": "#/components/schemas/SnapshotFileDiff"
  19082. }
  19083. }
  19084. },
  19085. "required": ["sessionID", "diff"],
  19086. "additionalProperties": false
  19087. }
  19088. },
  19089. "required": ["id", "type", "properties"],
  19090. "additionalProperties": false
  19091. },
  19092. {
  19093. "type": "object",
  19094. "properties": {
  19095. "id": {
  19096. "type": "string",
  19097. "pattern": "^evt_"
  19098. },
  19099. "type": {
  19100. "type": "string",
  19101. "enum": ["session.error"]
  19102. },
  19103. "properties": {
  19104. "type": "object",
  19105. "properties": {
  19106. "sessionID": {
  19107. "type": "string",
  19108. "pattern": "^ses"
  19109. },
  19110. "error": {
  19111. "anyOf": [
  19112. {
  19113. "$ref": "#/components/schemas/ProviderAuthError"
  19114. },
  19115. {
  19116. "$ref": "#/components/schemas/UnknownError"
  19117. },
  19118. {
  19119. "$ref": "#/components/schemas/MessageOutputLengthError"
  19120. },
  19121. {
  19122. "$ref": "#/components/schemas/MessageAbortedError"
  19123. },
  19124. {
  19125. "$ref": "#/components/schemas/StructuredOutputError"
  19126. },
  19127. {
  19128. "$ref": "#/components/schemas/ContextOverflowError"
  19129. },
  19130. {
  19131. "$ref": "#/components/schemas/ContentFilterError"
  19132. },
  19133. {
  19134. "$ref": "#/components/schemas/APIError"
  19135. }
  19136. ]
  19137. }
  19138. },
  19139. "additionalProperties": false
  19140. }
  19141. },
  19142. "required": ["id", "type", "properties"],
  19143. "additionalProperties": false
  19144. },
  19145. {
  19146. "type": "object",
  19147. "properties": {
  19148. "id": {
  19149. "type": "string",
  19150. "pattern": "^evt_"
  19151. },
  19152. "type": {
  19153. "type": "string",
  19154. "enum": ["installation.updated"]
  19155. },
  19156. "properties": {
  19157. "type": "object",
  19158. "properties": {
  19159. "version": {
  19160. "type": "string"
  19161. }
  19162. },
  19163. "required": ["version"],
  19164. "additionalProperties": false
  19165. }
  19166. },
  19167. "required": ["id", "type", "properties"],
  19168. "additionalProperties": false
  19169. },
  19170. {
  19171. "type": "object",
  19172. "properties": {
  19173. "id": {
  19174. "type": "string",
  19175. "pattern": "^evt_"
  19176. },
  19177. "type": {
  19178. "type": "string",
  19179. "enum": ["installation.update-available"]
  19180. },
  19181. "properties": {
  19182. "type": "object",
  19183. "properties": {
  19184. "version": {
  19185. "type": "string"
  19186. }
  19187. },
  19188. "required": ["version"],
  19189. "additionalProperties": false
  19190. }
  19191. },
  19192. "required": ["id", "type", "properties"],
  19193. "additionalProperties": false
  19194. },
  19195. {
  19196. "type": "object",
  19197. "properties": {
  19198. "id": {
  19199. "type": "string",
  19200. "pattern": "^evt_"
  19201. },
  19202. "type": {
  19203. "type": "string",
  19204. "enum": ["file.edited"]
  19205. },
  19206. "properties": {
  19207. "type": "object",
  19208. "properties": {
  19209. "file": {
  19210. "type": "string"
  19211. }
  19212. },
  19213. "required": ["file"],
  19214. "additionalProperties": false
  19215. }
  19216. },
  19217. "required": ["id", "type", "properties"],
  19218. "additionalProperties": false
  19219. },
  19220. {
  19221. "type": "object",
  19222. "properties": {
  19223. "id": {
  19224. "type": "string",
  19225. "pattern": "^evt_"
  19226. },
  19227. "type": {
  19228. "type": "string",
  19229. "enum": ["reference.updated"]
  19230. },
  19231. "properties": {
  19232. "type": "object",
  19233. "properties": {}
  19234. }
  19235. },
  19236. "required": ["id", "type", "properties"],
  19237. "additionalProperties": false
  19238. },
  19239. {
  19240. "type": "object",
  19241. "properties": {
  19242. "id": {
  19243. "type": "string",
  19244. "pattern": "^evt_"
  19245. },
  19246. "type": {
  19247. "type": "string",
  19248. "enum": ["permission.v2.asked"]
  19249. },
  19250. "properties": {
  19251. "type": "object",
  19252. "properties": {
  19253. "id": {
  19254. "type": "string",
  19255. "pattern": "^per"
  19256. },
  19257. "sessionID": {
  19258. "type": "string",
  19259. "pattern": "^ses"
  19260. },
  19261. "action": {
  19262. "type": "string"
  19263. },
  19264. "resources": {
  19265. "type": "array",
  19266. "items": {
  19267. "type": "string"
  19268. }
  19269. },
  19270. "save": {
  19271. "type": "array",
  19272. "items": {
  19273. "type": "string"
  19274. }
  19275. },
  19276. "metadata": {
  19277. "type": "object"
  19278. },
  19279. "source": {
  19280. "$ref": "#/components/schemas/PermissionV2Source"
  19281. }
  19282. },
  19283. "required": ["id", "sessionID", "action", "resources"],
  19284. "additionalProperties": false
  19285. }
  19286. },
  19287. "required": ["id", "type", "properties"],
  19288. "additionalProperties": false
  19289. },
  19290. {
  19291. "type": "object",
  19292. "properties": {
  19293. "id": {
  19294. "type": "string",
  19295. "pattern": "^evt_"
  19296. },
  19297. "type": {
  19298. "type": "string",
  19299. "enum": ["permission.v2.replied"]
  19300. },
  19301. "properties": {
  19302. "type": "object",
  19303. "properties": {
  19304. "sessionID": {
  19305. "type": "string",
  19306. "pattern": "^ses"
  19307. },
  19308. "requestID": {
  19309. "type": "string",
  19310. "pattern": "^per"
  19311. },
  19312. "reply": {
  19313. "$ref": "#/components/schemas/PermissionV2Reply"
  19314. }
  19315. },
  19316. "required": ["sessionID", "requestID", "reply"],
  19317. "additionalProperties": false
  19318. }
  19319. },
  19320. "required": ["id", "type", "properties"],
  19321. "additionalProperties": false
  19322. },
  19323. {
  19324. "type": "object",
  19325. "properties": {
  19326. "id": {
  19327. "type": "string",
  19328. "pattern": "^evt_"
  19329. },
  19330. "type": {
  19331. "type": "string",
  19332. "enum": ["plugin.added"]
  19333. },
  19334. "properties": {
  19335. "type": "object",
  19336. "properties": {
  19337. "id": {
  19338. "type": "string"
  19339. }
  19340. },
  19341. "required": ["id"],
  19342. "additionalProperties": false
  19343. }
  19344. },
  19345. "required": ["id", "type", "properties"],
  19346. "additionalProperties": false
  19347. },
  19348. {
  19349. "type": "object",
  19350. "properties": {
  19351. "id": {
  19352. "type": "string",
  19353. "pattern": "^evt_"
  19354. },
  19355. "type": {
  19356. "type": "string",
  19357. "enum": ["project.directories.updated"]
  19358. },
  19359. "properties": {
  19360. "type": "object",
  19361. "properties": {
  19362. "projectID": {
  19363. "type": "string"
  19364. }
  19365. },
  19366. "required": ["projectID"],
  19367. "additionalProperties": false
  19368. }
  19369. },
  19370. "required": ["id", "type", "properties"],
  19371. "additionalProperties": false
  19372. },
  19373. {
  19374. "type": "object",
  19375. "properties": {
  19376. "id": {
  19377. "type": "string",
  19378. "pattern": "^evt_"
  19379. },
  19380. "type": {
  19381. "type": "string",
  19382. "enum": ["file.watcher.updated"]
  19383. },
  19384. "properties": {
  19385. "type": "object",
  19386. "properties": {
  19387. "file": {
  19388. "type": "string"
  19389. },
  19390. "event": {
  19391. "type": "string",
  19392. "enum": ["add", "change", "unlink"]
  19393. }
  19394. },
  19395. "required": ["file", "event"],
  19396. "additionalProperties": false
  19397. }
  19398. },
  19399. "required": ["id", "type", "properties"],
  19400. "additionalProperties": false
  19401. },
  19402. {
  19403. "type": "object",
  19404. "properties": {
  19405. "id": {
  19406. "type": "string",
  19407. "pattern": "^evt_"
  19408. },
  19409. "type": {
  19410. "type": "string",
  19411. "enum": ["pty.created"]
  19412. },
  19413. "properties": {
  19414. "type": "object",
  19415. "properties": {
  19416. "info": {
  19417. "$ref": "#/components/schemas/Pty"
  19418. }
  19419. },
  19420. "required": ["info"],
  19421. "additionalProperties": false
  19422. }
  19423. },
  19424. "required": ["id", "type", "properties"],
  19425. "additionalProperties": false
  19426. },
  19427. {
  19428. "type": "object",
  19429. "properties": {
  19430. "id": {
  19431. "type": "string",
  19432. "pattern": "^evt_"
  19433. },
  19434. "type": {
  19435. "type": "string",
  19436. "enum": ["pty.updated"]
  19437. },
  19438. "properties": {
  19439. "type": "object",
  19440. "properties": {
  19441. "info": {
  19442. "$ref": "#/components/schemas/Pty"
  19443. }
  19444. },
  19445. "required": ["info"],
  19446. "additionalProperties": false
  19447. }
  19448. },
  19449. "required": ["id", "type", "properties"],
  19450. "additionalProperties": false
  19451. },
  19452. {
  19453. "type": "object",
  19454. "properties": {
  19455. "id": {
  19456. "type": "string",
  19457. "pattern": "^evt_"
  19458. },
  19459. "type": {
  19460. "type": "string",
  19461. "enum": ["pty.exited"]
  19462. },
  19463. "properties": {
  19464. "type": "object",
  19465. "properties": {
  19466. "id": {
  19467. "type": "string",
  19468. "pattern": "^pty"
  19469. },
  19470. "exitCode": {
  19471. "type": "integer",
  19472. "minimum": 0
  19473. }
  19474. },
  19475. "required": ["id", "exitCode"],
  19476. "additionalProperties": false
  19477. }
  19478. },
  19479. "required": ["id", "type", "properties"],
  19480. "additionalProperties": false
  19481. },
  19482. {
  19483. "type": "object",
  19484. "properties": {
  19485. "id": {
  19486. "type": "string",
  19487. "pattern": "^evt_"
  19488. },
  19489. "type": {
  19490. "type": "string",
  19491. "enum": ["pty.deleted"]
  19492. },
  19493. "properties": {
  19494. "type": "object",
  19495. "properties": {
  19496. "id": {
  19497. "type": "string",
  19498. "pattern": "^pty"
  19499. }
  19500. },
  19501. "required": ["id"],
  19502. "additionalProperties": false
  19503. }
  19504. },
  19505. "required": ["id", "type", "properties"],
  19506. "additionalProperties": false
  19507. },
  19508. {
  19509. "type": "object",
  19510. "properties": {
  19511. "id": {
  19512. "type": "string",
  19513. "pattern": "^evt_"
  19514. },
  19515. "type": {
  19516. "type": "string",
  19517. "enum": ["question.v2.asked"]
  19518. },
  19519. "properties": {
  19520. "type": "object",
  19521. "properties": {
  19522. "id": {
  19523. "type": "string",
  19524. "pattern": "^que"
  19525. },
  19526. "sessionID": {
  19527. "type": "string",
  19528. "pattern": "^ses"
  19529. },
  19530. "questions": {
  19531. "type": "array",
  19532. "items": {
  19533. "$ref": "#/components/schemas/QuestionV2Info"
  19534. },
  19535. "description": "Questions to ask"
  19536. },
  19537. "tool": {
  19538. "$ref": "#/components/schemas/QuestionV2Tool"
  19539. }
  19540. },
  19541. "required": ["id", "sessionID", "questions"],
  19542. "additionalProperties": false
  19543. }
  19544. },
  19545. "required": ["id", "type", "properties"],
  19546. "additionalProperties": false
  19547. },
  19548. {
  19549. "type": "object",
  19550. "properties": {
  19551. "id": {
  19552. "type": "string",
  19553. "pattern": "^evt_"
  19554. },
  19555. "type": {
  19556. "type": "string",
  19557. "enum": ["question.v2.replied"]
  19558. },
  19559. "properties": {
  19560. "type": "object",
  19561. "properties": {
  19562. "sessionID": {
  19563. "type": "string",
  19564. "pattern": "^ses"
  19565. },
  19566. "requestID": {
  19567. "type": "string",
  19568. "pattern": "^que"
  19569. },
  19570. "answers": {
  19571. "type": "array",
  19572. "items": {
  19573. "$ref": "#/components/schemas/QuestionV2Answer"
  19574. }
  19575. }
  19576. },
  19577. "required": ["sessionID", "requestID", "answers"],
  19578. "additionalProperties": false
  19579. }
  19580. },
  19581. "required": ["id", "type", "properties"],
  19582. "additionalProperties": false
  19583. },
  19584. {
  19585. "type": "object",
  19586. "properties": {
  19587. "id": {
  19588. "type": "string",
  19589. "pattern": "^evt_"
  19590. },
  19591. "type": {
  19592. "type": "string",
  19593. "enum": ["question.v2.rejected"]
  19594. },
  19595. "properties": {
  19596. "type": "object",
  19597. "properties": {
  19598. "sessionID": {
  19599. "type": "string",
  19600. "pattern": "^ses"
  19601. },
  19602. "requestID": {
  19603. "type": "string",
  19604. "pattern": "^que"
  19605. }
  19606. },
  19607. "required": ["sessionID", "requestID"],
  19608. "additionalProperties": false
  19609. }
  19610. },
  19611. "required": ["id", "type", "properties"],
  19612. "additionalProperties": false
  19613. },
  19614. {
  19615. "type": "object",
  19616. "properties": {
  19617. "id": {
  19618. "type": "string",
  19619. "pattern": "^evt_"
  19620. },
  19621. "type": {
  19622. "type": "string",
  19623. "enum": ["todo.updated"]
  19624. },
  19625. "properties": {
  19626. "type": "object",
  19627. "properties": {
  19628. "sessionID": {
  19629. "type": "string",
  19630. "pattern": "^ses"
  19631. },
  19632. "todos": {
  19633. "type": "array",
  19634. "items": {
  19635. "$ref": "#/components/schemas/Todo"
  19636. }
  19637. }
  19638. },
  19639. "required": ["sessionID", "todos"],
  19640. "additionalProperties": false
  19641. }
  19642. },
  19643. "required": ["id", "type", "properties"],
  19644. "additionalProperties": false
  19645. },
  19646. {
  19647. "type": "object",
  19648. "properties": {
  19649. "id": {
  19650. "type": "string",
  19651. "pattern": "^evt_"
  19652. },
  19653. "type": {
  19654. "type": "string",
  19655. "enum": ["lsp.updated"]
  19656. },
  19657. "properties": {
  19658. "type": "object",
  19659. "properties": {}
  19660. }
  19661. },
  19662. "required": ["id", "type", "properties"],
  19663. "additionalProperties": false
  19664. },
  19665. {
  19666. "type": "object",
  19667. "properties": {
  19668. "id": {
  19669. "type": "string",
  19670. "pattern": "^evt_"
  19671. },
  19672. "type": {
  19673. "type": "string",
  19674. "enum": ["permission.asked"]
  19675. },
  19676. "properties": {
  19677. "type": "object",
  19678. "properties": {
  19679. "id": {
  19680. "type": "string",
  19681. "pattern": "^per"
  19682. },
  19683. "sessionID": {
  19684. "type": "string",
  19685. "pattern": "^ses"
  19686. },
  19687. "permission": {
  19688. "type": "string"
  19689. },
  19690. "patterns": {
  19691. "type": "array",
  19692. "items": {
  19693. "type": "string"
  19694. }
  19695. },
  19696. "metadata": {
  19697. "type": "object"
  19698. },
  19699. "always": {
  19700. "type": "array",
  19701. "items": {
  19702. "type": "string"
  19703. }
  19704. },
  19705. "tool": {
  19706. "type": "object",
  19707. "properties": {
  19708. "messageID": {
  19709. "type": "string"
  19710. },
  19711. "callID": {
  19712. "type": "string"
  19713. }
  19714. },
  19715. "required": ["messageID", "callID"],
  19716. "additionalProperties": false
  19717. }
  19718. },
  19719. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19720. "additionalProperties": false
  19721. }
  19722. },
  19723. "required": ["id", "type", "properties"],
  19724. "additionalProperties": false
  19725. },
  19726. {
  19727. "type": "object",
  19728. "properties": {
  19729. "id": {
  19730. "type": "string",
  19731. "pattern": "^evt_"
  19732. },
  19733. "type": {
  19734. "type": "string",
  19735. "enum": ["permission.replied"]
  19736. },
  19737. "properties": {
  19738. "type": "object",
  19739. "properties": {
  19740. "sessionID": {
  19741. "type": "string",
  19742. "pattern": "^ses"
  19743. },
  19744. "requestID": {
  19745. "type": "string",
  19746. "pattern": "^per"
  19747. },
  19748. "reply": {
  19749. "type": "string",
  19750. "enum": ["once", "always", "reject"]
  19751. }
  19752. },
  19753. "required": ["sessionID", "requestID", "reply"],
  19754. "additionalProperties": false
  19755. }
  19756. },
  19757. "required": ["id", "type", "properties"],
  19758. "additionalProperties": false
  19759. },
  19760. {
  19761. "type": "object",
  19762. "properties": {
  19763. "id": {
  19764. "type": "string",
  19765. "pattern": "^evt_"
  19766. },
  19767. "type": {
  19768. "type": "string",
  19769. "enum": ["tui.prompt.append"]
  19770. },
  19771. "properties": {
  19772. "type": "object",
  19773. "properties": {
  19774. "text": {
  19775. "type": "string"
  19776. }
  19777. },
  19778. "required": ["text"],
  19779. "additionalProperties": false
  19780. }
  19781. },
  19782. "required": ["id", "type", "properties"],
  19783. "additionalProperties": false
  19784. },
  19785. {
  19786. "type": "object",
  19787. "properties": {
  19788. "id": {
  19789. "type": "string",
  19790. "pattern": "^evt_"
  19791. },
  19792. "type": {
  19793. "type": "string",
  19794. "enum": ["tui.command.execute"]
  19795. },
  19796. "properties": {
  19797. "type": "object",
  19798. "properties": {
  19799. "command": {
  19800. "anyOf": [
  19801. {
  19802. "type": "string",
  19803. "enum": [
  19804. "session.list",
  19805. "session.new",
  19806. "session.share",
  19807. "session.interrupt",
  19808. "session.compact",
  19809. "session.page.up",
  19810. "session.page.down",
  19811. "session.line.up",
  19812. "session.line.down",
  19813. "session.half.page.up",
  19814. "session.half.page.down",
  19815. "session.first",
  19816. "session.last",
  19817. "prompt.clear",
  19818. "prompt.submit",
  19819. "agent.cycle"
  19820. ]
  19821. },
  19822. {
  19823. "type": "string"
  19824. }
  19825. ]
  19826. }
  19827. },
  19828. "required": ["command"],
  19829. "additionalProperties": false
  19830. }
  19831. },
  19832. "required": ["id", "type", "properties"],
  19833. "additionalProperties": false
  19834. },
  19835. {
  19836. "type": "object",
  19837. "properties": {
  19838. "id": {
  19839. "type": "string",
  19840. "pattern": "^evt_"
  19841. },
  19842. "type": {
  19843. "type": "string",
  19844. "enum": ["tui.toast.show"]
  19845. },
  19846. "properties": {
  19847. "type": "object",
  19848. "properties": {
  19849. "title": {
  19850. "type": "string"
  19851. },
  19852. "message": {
  19853. "type": "string"
  19854. },
  19855. "variant": {
  19856. "type": "string",
  19857. "enum": ["info", "success", "warning", "error"]
  19858. },
  19859. "duration": {
  19860. "type": "integer",
  19861. "exclusiveMinimum": 0
  19862. }
  19863. },
  19864. "required": ["message", "variant"],
  19865. "additionalProperties": false
  19866. }
  19867. },
  19868. "required": ["id", "type", "properties"],
  19869. "additionalProperties": false
  19870. },
  19871. {
  19872. "type": "object",
  19873. "properties": {
  19874. "id": {
  19875. "type": "string",
  19876. "pattern": "^evt_"
  19877. },
  19878. "type": {
  19879. "type": "string",
  19880. "enum": ["tui.session.select"]
  19881. },
  19882. "properties": {
  19883. "type": "object",
  19884. "properties": {
  19885. "sessionID": {
  19886. "type": "string",
  19887. "pattern": "^ses",
  19888. "description": "Session ID to navigate to"
  19889. }
  19890. },
  19891. "required": ["sessionID"],
  19892. "additionalProperties": false
  19893. }
  19894. },
  19895. "required": ["id", "type", "properties"],
  19896. "additionalProperties": false
  19897. },
  19898. {
  19899. "type": "object",
  19900. "properties": {
  19901. "id": {
  19902. "type": "string",
  19903. "pattern": "^evt_"
  19904. },
  19905. "type": {
  19906. "type": "string",
  19907. "enum": ["mcp.tools.changed"]
  19908. },
  19909. "properties": {
  19910. "type": "object",
  19911. "properties": {
  19912. "server": {
  19913. "type": "string"
  19914. }
  19915. },
  19916. "required": ["server"],
  19917. "additionalProperties": false
  19918. }
  19919. },
  19920. "required": ["id", "type", "properties"],
  19921. "additionalProperties": false
  19922. },
  19923. {
  19924. "type": "object",
  19925. "properties": {
  19926. "id": {
  19927. "type": "string",
  19928. "pattern": "^evt_"
  19929. },
  19930. "type": {
  19931. "type": "string",
  19932. "enum": ["mcp.browser.open.failed"]
  19933. },
  19934. "properties": {
  19935. "type": "object",
  19936. "properties": {
  19937. "mcpName": {
  19938. "type": "string"
  19939. },
  19940. "url": {
  19941. "type": "string"
  19942. }
  19943. },
  19944. "required": ["mcpName", "url"],
  19945. "additionalProperties": false
  19946. }
  19947. },
  19948. "required": ["id", "type", "properties"],
  19949. "additionalProperties": false
  19950. },
  19951. {
  19952. "type": "object",
  19953. "properties": {
  19954. "id": {
  19955. "type": "string",
  19956. "pattern": "^evt_"
  19957. },
  19958. "type": {
  19959. "type": "string",
  19960. "enum": ["command.executed"]
  19961. },
  19962. "properties": {
  19963. "type": "object",
  19964. "properties": {
  19965. "name": {
  19966. "type": "string"
  19967. },
  19968. "sessionID": {
  19969. "type": "string",
  19970. "pattern": "^ses"
  19971. },
  19972. "arguments": {
  19973. "type": "string"
  19974. },
  19975. "messageID": {
  19976. "type": "string",
  19977. "pattern": "^msg"
  19978. }
  19979. },
  19980. "required": ["name", "sessionID", "arguments", "messageID"],
  19981. "additionalProperties": false
  19982. }
  19983. },
  19984. "required": ["id", "type", "properties"],
  19985. "additionalProperties": false
  19986. },
  19987. {
  19988. "type": "object",
  19989. "properties": {
  19990. "id": {
  19991. "type": "string",
  19992. "pattern": "^evt_"
  19993. },
  19994. "type": {
  19995. "type": "string",
  19996. "enum": ["project.updated"]
  19997. },
  19998. "properties": {
  19999. "type": "object",
  20000. "properties": {
  20001. "id": {
  20002. "type": "string"
  20003. },
  20004. "worktree": {
  20005. "type": "string"
  20006. },
  20007. "vcs": {
  20008. "$ref": "#/components/schemas/ProjectVcs"
  20009. },
  20010. "name": {
  20011. "type": "string"
  20012. },
  20013. "icon": {
  20014. "$ref": "#/components/schemas/ProjectIcon"
  20015. },
  20016. "commands": {
  20017. "$ref": "#/components/schemas/ProjectCommands"
  20018. },
  20019. "time": {
  20020. "$ref": "#/components/schemas/ProjectTime"
  20021. },
  20022. "sandboxes": {
  20023. "type": "array",
  20024. "items": {
  20025. "type": "string"
  20026. }
  20027. }
  20028. },
  20029. "required": ["id", "worktree", "time", "sandboxes"],
  20030. "additionalProperties": false
  20031. }
  20032. },
  20033. "required": ["id", "type", "properties"],
  20034. "additionalProperties": false
  20035. },
  20036. {
  20037. "type": "object",
  20038. "properties": {
  20039. "id": {
  20040. "type": "string",
  20041. "pattern": "^evt_"
  20042. },
  20043. "type": {
  20044. "type": "string",
  20045. "enum": ["session.status"]
  20046. },
  20047. "properties": {
  20048. "type": "object",
  20049. "properties": {
  20050. "sessionID": {
  20051. "type": "string",
  20052. "pattern": "^ses"
  20053. },
  20054. "status": {
  20055. "$ref": "#/components/schemas/SessionStatus"
  20056. }
  20057. },
  20058. "required": ["sessionID", "status"],
  20059. "additionalProperties": false
  20060. }
  20061. },
  20062. "required": ["id", "type", "properties"],
  20063. "additionalProperties": false
  20064. },
  20065. {
  20066. "type": "object",
  20067. "properties": {
  20068. "id": {
  20069. "type": "string",
  20070. "pattern": "^evt_"
  20071. },
  20072. "type": {
  20073. "type": "string",
  20074. "enum": ["session.idle"]
  20075. },
  20076. "properties": {
  20077. "type": "object",
  20078. "properties": {
  20079. "sessionID": {
  20080. "type": "string",
  20081. "pattern": "^ses"
  20082. }
  20083. },
  20084. "required": ["sessionID"],
  20085. "additionalProperties": false
  20086. }
  20087. },
  20088. "required": ["id", "type", "properties"],
  20089. "additionalProperties": false
  20090. },
  20091. {
  20092. "type": "object",
  20093. "properties": {
  20094. "id": {
  20095. "type": "string",
  20096. "pattern": "^evt_"
  20097. },
  20098. "type": {
  20099. "type": "string",
  20100. "enum": ["question.asked"]
  20101. },
  20102. "properties": {
  20103. "type": "object",
  20104. "properties": {
  20105. "id": {
  20106. "type": "string",
  20107. "pattern": "^que"
  20108. },
  20109. "sessionID": {
  20110. "type": "string",
  20111. "pattern": "^ses"
  20112. },
  20113. "questions": {
  20114. "type": "array",
  20115. "items": {
  20116. "$ref": "#/components/schemas/QuestionInfo"
  20117. },
  20118. "description": "Questions to ask"
  20119. },
  20120. "tool": {
  20121. "$ref": "#/components/schemas/QuestionTool"
  20122. }
  20123. },
  20124. "required": ["id", "sessionID", "questions"],
  20125. "additionalProperties": false
  20126. }
  20127. },
  20128. "required": ["id", "type", "properties"],
  20129. "additionalProperties": false
  20130. },
  20131. {
  20132. "type": "object",
  20133. "properties": {
  20134. "id": {
  20135. "type": "string",
  20136. "pattern": "^evt_"
  20137. },
  20138. "type": {
  20139. "type": "string",
  20140. "enum": ["question.replied"]
  20141. },
  20142. "properties": {
  20143. "type": "object",
  20144. "properties": {
  20145. "sessionID": {
  20146. "type": "string",
  20147. "pattern": "^ses"
  20148. },
  20149. "requestID": {
  20150. "type": "string",
  20151. "pattern": "^que"
  20152. },
  20153. "answers": {
  20154. "type": "array",
  20155. "items": {
  20156. "$ref": "#/components/schemas/QuestionAnswer"
  20157. }
  20158. }
  20159. },
  20160. "required": ["sessionID", "requestID", "answers"],
  20161. "additionalProperties": false
  20162. }
  20163. },
  20164. "required": ["id", "type", "properties"],
  20165. "additionalProperties": false
  20166. },
  20167. {
  20168. "type": "object",
  20169. "properties": {
  20170. "id": {
  20171. "type": "string",
  20172. "pattern": "^evt_"
  20173. },
  20174. "type": {
  20175. "type": "string",
  20176. "enum": ["question.rejected"]
  20177. },
  20178. "properties": {
  20179. "type": "object",
  20180. "properties": {
  20181. "sessionID": {
  20182. "type": "string",
  20183. "pattern": "^ses"
  20184. },
  20185. "requestID": {
  20186. "type": "string",
  20187. "pattern": "^que"
  20188. }
  20189. },
  20190. "required": ["sessionID", "requestID"],
  20191. "additionalProperties": false
  20192. }
  20193. },
  20194. "required": ["id", "type", "properties"],
  20195. "additionalProperties": false
  20196. },
  20197. {
  20198. "type": "object",
  20199. "properties": {
  20200. "id": {
  20201. "type": "string",
  20202. "pattern": "^evt_"
  20203. },
  20204. "type": {
  20205. "type": "string",
  20206. "enum": ["session.compacted"]
  20207. },
  20208. "properties": {
  20209. "type": "object",
  20210. "properties": {
  20211. "sessionID": {
  20212. "type": "string",
  20213. "pattern": "^ses"
  20214. }
  20215. },
  20216. "required": ["sessionID"],
  20217. "additionalProperties": false
  20218. }
  20219. },
  20220. "required": ["id", "type", "properties"],
  20221. "additionalProperties": false
  20222. },
  20223. {
  20224. "type": "object",
  20225. "properties": {
  20226. "id": {
  20227. "type": "string",
  20228. "pattern": "^evt_"
  20229. },
  20230. "type": {
  20231. "type": "string",
  20232. "enum": ["vcs.branch.updated"]
  20233. },
  20234. "properties": {
  20235. "type": "object",
  20236. "properties": {
  20237. "branch": {
  20238. "type": "string"
  20239. }
  20240. },
  20241. "additionalProperties": false
  20242. }
  20243. },
  20244. "required": ["id", "type", "properties"],
  20245. "additionalProperties": false
  20246. },
  20247. {
  20248. "type": "object",
  20249. "properties": {
  20250. "id": {
  20251. "type": "string",
  20252. "pattern": "^evt_"
  20253. },
  20254. "type": {
  20255. "type": "string",
  20256. "enum": ["workspace.ready"]
  20257. },
  20258. "properties": {
  20259. "type": "object",
  20260. "properties": {
  20261. "name": {
  20262. "type": "string"
  20263. }
  20264. },
  20265. "required": ["name"],
  20266. "additionalProperties": false
  20267. }
  20268. },
  20269. "required": ["id", "type", "properties"],
  20270. "additionalProperties": false
  20271. },
  20272. {
  20273. "type": "object",
  20274. "properties": {
  20275. "id": {
  20276. "type": "string",
  20277. "pattern": "^evt_"
  20278. },
  20279. "type": {
  20280. "type": "string",
  20281. "enum": ["workspace.failed"]
  20282. },
  20283. "properties": {
  20284. "type": "object",
  20285. "properties": {
  20286. "message": {
  20287. "type": "string"
  20288. }
  20289. },
  20290. "required": ["message"],
  20291. "additionalProperties": false
  20292. }
  20293. },
  20294. "required": ["id", "type", "properties"],
  20295. "additionalProperties": false
  20296. },
  20297. {
  20298. "type": "object",
  20299. "properties": {
  20300. "id": {
  20301. "type": "string",
  20302. "pattern": "^evt_"
  20303. },
  20304. "type": {
  20305. "type": "string",
  20306. "enum": ["workspace.status"]
  20307. },
  20308. "properties": {
  20309. "type": "object",
  20310. "properties": {
  20311. "workspaceID": {
  20312. "type": "string",
  20313. "pattern": "^wrk"
  20314. },
  20315. "status": {
  20316. "type": "string",
  20317. "enum": ["connected", "connecting", "disconnected", "error"]
  20318. }
  20319. },
  20320. "required": ["workspaceID", "status"],
  20321. "additionalProperties": false
  20322. }
  20323. },
  20324. "required": ["id", "type", "properties"],
  20325. "additionalProperties": false
  20326. },
  20327. {
  20328. "type": "object",
  20329. "properties": {
  20330. "id": {
  20331. "type": "string",
  20332. "pattern": "^evt_"
  20333. },
  20334. "type": {
  20335. "type": "string",
  20336. "enum": ["worktree.ready"]
  20337. },
  20338. "properties": {
  20339. "type": "object",
  20340. "properties": {
  20341. "name": {
  20342. "type": "string"
  20343. },
  20344. "branch": {
  20345. "type": "string"
  20346. }
  20347. },
  20348. "required": ["name"],
  20349. "additionalProperties": false
  20350. }
  20351. },
  20352. "required": ["id", "type", "properties"],
  20353. "additionalProperties": false
  20354. },
  20355. {
  20356. "type": "object",
  20357. "properties": {
  20358. "id": {
  20359. "type": "string",
  20360. "pattern": "^evt_"
  20361. },
  20362. "type": {
  20363. "type": "string",
  20364. "enum": ["worktree.failed"]
  20365. },
  20366. "properties": {
  20367. "type": "object",
  20368. "properties": {
  20369. "message": {
  20370. "type": "string"
  20371. }
  20372. },
  20373. "required": ["message"],
  20374. "additionalProperties": false
  20375. }
  20376. },
  20377. "required": ["id", "type", "properties"],
  20378. "additionalProperties": false
  20379. },
  20380. {
  20381. "type": "object",
  20382. "properties": {
  20383. "id": {
  20384. "type": "string",
  20385. "pattern": "^evt_"
  20386. },
  20387. "type": {
  20388. "type": "string",
  20389. "enum": ["server.connected"]
  20390. },
  20391. "properties": {
  20392. "type": "object",
  20393. "properties": {}
  20394. }
  20395. },
  20396. "required": ["id", "type", "properties"],
  20397. "additionalProperties": false
  20398. },
  20399. {
  20400. "type": "object",
  20401. "properties": {
  20402. "id": {
  20403. "type": "string",
  20404. "pattern": "^evt_"
  20405. },
  20406. "type": {
  20407. "type": "string",
  20408. "enum": ["global.disposed"]
  20409. },
  20410. "properties": {
  20411. "type": "object",
  20412. "properties": {}
  20413. }
  20414. },
  20415. "required": ["id", "type", "properties"],
  20416. "additionalProperties": false
  20417. },
  20418. {
  20419. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  20420. },
  20421. {
  20422. "$ref": "#/components/schemas/SyncEventSessionCreated"
  20423. },
  20424. {
  20425. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  20426. },
  20427. {
  20428. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  20429. },
  20430. {
  20431. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  20432. },
  20433. {
  20434. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  20435. },
  20436. {
  20437. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  20438. },
  20439. {
  20440. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  20441. },
  20442. {
  20443. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  20444. },
  20445. {
  20446. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  20447. },
  20448. {
  20449. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  20450. },
  20451. {
  20452. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  20453. },
  20454. {
  20455. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  20456. },
  20457. {
  20458. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  20459. },
  20460. {
  20461. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  20462. },
  20463. {
  20464. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  20465. },
  20466. {
  20467. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  20468. },
  20469. {
  20470. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  20471. },
  20472. {
  20473. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  20474. },
  20475. {
  20476. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  20477. },
  20478. {
  20479. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  20480. },
  20481. {
  20482. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  20483. },
  20484. {
  20485. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  20486. },
  20487. {
  20488. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  20489. },
  20490. {
  20491. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  20492. },
  20493. {
  20494. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  20495. },
  20496. {
  20497. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  20498. },
  20499. {
  20500. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  20501. },
  20502. {
  20503. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  20504. },
  20505. {
  20506. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  20507. },
  20508. {
  20509. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  20510. },
  20511. {
  20512. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  20513. },
  20514. {
  20515. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  20516. },
  20517. {
  20518. "$ref": "#/components/schemas/SyncEventSessionNextRevertStaged"
  20519. },
  20520. {
  20521. "$ref": "#/components/schemas/SyncEventSessionNextRevertCleared"
  20522. },
  20523. {
  20524. "$ref": "#/components/schemas/SyncEventSessionNextRevertCommitted"
  20525. }
  20526. ]
  20527. }
  20528. },
  20529. "required": ["directory", "payload"],
  20530. "additionalProperties": false
  20531. },
  20532. "LogLevel": {
  20533. "type": "string",
  20534. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  20535. "description": "Log level"
  20536. },
  20537. "ServerConfig": {
  20538. "type": "object",
  20539. "properties": {
  20540. "port": {
  20541. "type": "integer",
  20542. "exclusiveMinimum": 0
  20543. },
  20544. "hostname": {
  20545. "type": "string"
  20546. },
  20547. "mdns": {
  20548. "type": "boolean"
  20549. },
  20550. "mdnsDomain": {
  20551. "type": "string"
  20552. },
  20553. "cors": {
  20554. "type": "array",
  20555. "items": {
  20556. "type": "string"
  20557. }
  20558. }
  20559. },
  20560. "additionalProperties": false,
  20561. "description": "Server configuration for opencode serve and web commands"
  20562. },
  20563. "PermissionActionConfig": {
  20564. "type": "string",
  20565. "enum": ["ask", "allow", "deny"]
  20566. },
  20567. "PermissionObjectConfig": {
  20568. "type": "object",
  20569. "additionalProperties": {
  20570. "$ref": "#/components/schemas/PermissionActionConfig"
  20571. }
  20572. },
  20573. "PermissionRuleConfig": {
  20574. "anyOf": [
  20575. {
  20576. "$ref": "#/components/schemas/PermissionActionConfig"
  20577. },
  20578. {
  20579. "$ref": "#/components/schemas/PermissionObjectConfig"
  20580. }
  20581. ]
  20582. },
  20583. "PermissionConfig": {
  20584. "anyOf": [
  20585. {
  20586. "$ref": "#/components/schemas/PermissionActionConfig"
  20587. },
  20588. {
  20589. "type": "object",
  20590. "properties": {
  20591. "read": {
  20592. "$ref": "#/components/schemas/PermissionRuleConfig"
  20593. },
  20594. "edit": {
  20595. "$ref": "#/components/schemas/PermissionRuleConfig"
  20596. },
  20597. "glob": {
  20598. "$ref": "#/components/schemas/PermissionRuleConfig"
  20599. },
  20600. "grep": {
  20601. "$ref": "#/components/schemas/PermissionRuleConfig"
  20602. },
  20603. "list": {
  20604. "$ref": "#/components/schemas/PermissionRuleConfig"
  20605. },
  20606. "bash": {
  20607. "$ref": "#/components/schemas/PermissionRuleConfig"
  20608. },
  20609. "task": {
  20610. "$ref": "#/components/schemas/PermissionRuleConfig"
  20611. },
  20612. "external_directory": {
  20613. "$ref": "#/components/schemas/PermissionRuleConfig"
  20614. },
  20615. "todowrite": {
  20616. "$ref": "#/components/schemas/PermissionActionConfig"
  20617. },
  20618. "question": {
  20619. "$ref": "#/components/schemas/PermissionActionConfig"
  20620. },
  20621. "webfetch": {
  20622. "$ref": "#/components/schemas/PermissionActionConfig"
  20623. },
  20624. "websearch": {
  20625. "$ref": "#/components/schemas/PermissionActionConfig"
  20626. },
  20627. "lsp": {
  20628. "$ref": "#/components/schemas/PermissionRuleConfig"
  20629. },
  20630. "doom_loop": {
  20631. "$ref": "#/components/schemas/PermissionActionConfig"
  20632. },
  20633. "skill": {
  20634. "$ref": "#/components/schemas/PermissionRuleConfig"
  20635. }
  20636. },
  20637. "additionalProperties": {
  20638. "$ref": "#/components/schemas/PermissionRuleConfig"
  20639. }
  20640. }
  20641. ]
  20642. },
  20643. "AgentConfig": {
  20644. "type": "object",
  20645. "properties": {
  20646. "model": {
  20647. "type": "string"
  20648. },
  20649. "variant": {
  20650. "type": "string"
  20651. },
  20652. "temperature": {
  20653. "type": "number"
  20654. },
  20655. "top_p": {
  20656. "type": "number"
  20657. },
  20658. "prompt": {
  20659. "type": "string"
  20660. },
  20661. "tools": {
  20662. "type": "object",
  20663. "additionalProperties": {
  20664. "type": "boolean"
  20665. }
  20666. },
  20667. "disable": {
  20668. "type": "boolean"
  20669. },
  20670. "description": {
  20671. "type": "string"
  20672. },
  20673. "mode": {
  20674. "type": "string",
  20675. "enum": ["subagent", "primary", "all"]
  20676. },
  20677. "hidden": {
  20678. "type": "boolean"
  20679. },
  20680. "options": {
  20681. "type": "object"
  20682. },
  20683. "color": {
  20684. "anyOf": [
  20685. {
  20686. "type": "string",
  20687. "pattern": "^#[0-9a-fA-F]{6}$"
  20688. },
  20689. {
  20690. "type": "string",
  20691. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20692. }
  20693. ],
  20694. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20695. },
  20696. "steps": {
  20697. "type": "integer",
  20698. "exclusiveMinimum": 0
  20699. },
  20700. "maxSteps": {
  20701. "type": "integer",
  20702. "exclusiveMinimum": 0
  20703. },
  20704. "permission": {
  20705. "$ref": "#/components/schemas/PermissionConfig"
  20706. }
  20707. },
  20708. "additionalProperties": {}
  20709. },
  20710. "ProviderConfig": {
  20711. "type": "object",
  20712. "properties": {
  20713. "api": {
  20714. "type": "string"
  20715. },
  20716. "name": {
  20717. "type": "string"
  20718. },
  20719. "env": {
  20720. "type": "array",
  20721. "items": {
  20722. "type": "string"
  20723. }
  20724. },
  20725. "id": {
  20726. "type": "string"
  20727. },
  20728. "npm": {
  20729. "type": "string"
  20730. },
  20731. "whitelist": {
  20732. "type": "array",
  20733. "items": {
  20734. "type": "string"
  20735. }
  20736. },
  20737. "blacklist": {
  20738. "type": "array",
  20739. "items": {
  20740. "type": "string"
  20741. }
  20742. },
  20743. "options": {
  20744. "type": "object",
  20745. "properties": {
  20746. "apiKey": {
  20747. "type": "string"
  20748. },
  20749. "baseURL": {
  20750. "type": "string"
  20751. },
  20752. "enterpriseUrl": {
  20753. "type": "string"
  20754. },
  20755. "setCacheKey": {
  20756. "type": "boolean"
  20757. },
  20758. "timeout": {
  20759. "anyOf": [
  20760. {
  20761. "type": "integer",
  20762. "exclusiveMinimum": 0
  20763. },
  20764. {
  20765. "type": "boolean",
  20766. "enum": [false]
  20767. }
  20768. ],
  20769. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20770. },
  20771. "headerTimeout": {
  20772. "anyOf": [
  20773. {
  20774. "type": "integer",
  20775. "exclusiveMinimum": 0
  20776. },
  20777. {
  20778. "type": "boolean",
  20779. "enum": [false]
  20780. }
  20781. ],
  20782. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20783. },
  20784. "chunkTimeout": {
  20785. "type": "integer",
  20786. "exclusiveMinimum": 0
  20787. }
  20788. },
  20789. "additionalProperties": {}
  20790. },
  20791. "models": {
  20792. "type": "object",
  20793. "additionalProperties": {
  20794. "type": "object",
  20795. "properties": {
  20796. "id": {
  20797. "type": "string"
  20798. },
  20799. "name": {
  20800. "type": "string"
  20801. },
  20802. "family": {
  20803. "type": "string"
  20804. },
  20805. "release_date": {
  20806. "type": "string"
  20807. },
  20808. "attachment": {
  20809. "type": "boolean"
  20810. },
  20811. "reasoning": {
  20812. "type": "boolean"
  20813. },
  20814. "temperature": {
  20815. "type": "boolean"
  20816. },
  20817. "tool_call": {
  20818. "type": "boolean"
  20819. },
  20820. "interleaved": {
  20821. "anyOf": [
  20822. {
  20823. "type": "boolean",
  20824. "enum": [true]
  20825. },
  20826. {
  20827. "type": "object",
  20828. "properties": {
  20829. "field": {
  20830. "type": "string",
  20831. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20832. }
  20833. },
  20834. "required": ["field"],
  20835. "additionalProperties": false
  20836. }
  20837. ]
  20838. },
  20839. "cost": {
  20840. "type": "object",
  20841. "properties": {
  20842. "input": {
  20843. "type": "number"
  20844. },
  20845. "output": {
  20846. "type": "number"
  20847. },
  20848. "cache_read": {
  20849. "type": "number"
  20850. },
  20851. "cache_write": {
  20852. "type": "number"
  20853. },
  20854. "context_over_200k": {
  20855. "type": "object",
  20856. "properties": {
  20857. "input": {
  20858. "type": "number"
  20859. },
  20860. "output": {
  20861. "type": "number"
  20862. },
  20863. "cache_read": {
  20864. "type": "number"
  20865. },
  20866. "cache_write": {
  20867. "type": "number"
  20868. }
  20869. },
  20870. "required": ["input", "output"],
  20871. "additionalProperties": false
  20872. }
  20873. },
  20874. "required": ["input", "output"],
  20875. "additionalProperties": false
  20876. },
  20877. "limit": {
  20878. "type": "object",
  20879. "properties": {
  20880. "context": {
  20881. "type": "number"
  20882. },
  20883. "input": {
  20884. "type": "number"
  20885. },
  20886. "output": {
  20887. "type": "number"
  20888. }
  20889. },
  20890. "required": ["context", "output"],
  20891. "additionalProperties": false
  20892. },
  20893. "modalities": {
  20894. "type": "object",
  20895. "properties": {
  20896. "input": {
  20897. "type": "array",
  20898. "items": {
  20899. "type": "string",
  20900. "enum": ["text", "audio", "image", "video", "pdf"]
  20901. }
  20902. },
  20903. "output": {
  20904. "type": "array",
  20905. "items": {
  20906. "type": "string",
  20907. "enum": ["text", "audio", "image", "video", "pdf"]
  20908. }
  20909. }
  20910. },
  20911. "additionalProperties": false
  20912. },
  20913. "experimental": {
  20914. "type": "boolean"
  20915. },
  20916. "status": {
  20917. "type": "string",
  20918. "enum": ["alpha", "beta", "deprecated", "active"]
  20919. },
  20920. "provider": {
  20921. "type": "object",
  20922. "properties": {
  20923. "npm": {
  20924. "type": "string"
  20925. },
  20926. "api": {
  20927. "type": "string"
  20928. }
  20929. },
  20930. "additionalProperties": false
  20931. },
  20932. "options": {
  20933. "type": "object"
  20934. },
  20935. "headers": {
  20936. "type": "object",
  20937. "additionalProperties": {
  20938. "type": "string"
  20939. }
  20940. },
  20941. "variants": {
  20942. "type": "object",
  20943. "additionalProperties": {
  20944. "type": "object",
  20945. "properties": {
  20946. "disabled": {
  20947. "type": "boolean"
  20948. }
  20949. },
  20950. "additionalProperties": {}
  20951. },
  20952. "description": "Variant-specific configuration"
  20953. }
  20954. },
  20955. "additionalProperties": false
  20956. }
  20957. }
  20958. },
  20959. "additionalProperties": false
  20960. },
  20961. "McpLocalConfig": {
  20962. "type": "object",
  20963. "properties": {
  20964. "type": {
  20965. "type": "string",
  20966. "enum": ["local"],
  20967. "description": "Type of MCP server connection"
  20968. },
  20969. "command": {
  20970. "type": "array",
  20971. "items": {
  20972. "type": "string"
  20973. },
  20974. "description": "Command and arguments to run the MCP server"
  20975. },
  20976. "cwd": {
  20977. "type": "string"
  20978. },
  20979. "environment": {
  20980. "type": "object",
  20981. "additionalProperties": {
  20982. "type": "string"
  20983. }
  20984. },
  20985. "enabled": {
  20986. "type": "boolean"
  20987. },
  20988. "timeout": {
  20989. "type": "integer",
  20990. "exclusiveMinimum": 0
  20991. }
  20992. },
  20993. "required": ["type", "command"],
  20994. "additionalProperties": false
  20995. },
  20996. "McpOAuthConfig": {
  20997. "type": "object",
  20998. "properties": {
  20999. "clientId": {
  21000. "type": "string"
  21001. },
  21002. "clientSecret": {
  21003. "type": "string"
  21004. },
  21005. "scope": {
  21006. "type": "string"
  21007. },
  21008. "callbackPort": {
  21009. "type": "integer",
  21010. "minimum": 1,
  21011. "maximum": 65535
  21012. },
  21013. "redirectUri": {
  21014. "type": "string"
  21015. }
  21016. },
  21017. "additionalProperties": false
  21018. },
  21019. "McpRemoteConfig": {
  21020. "type": "object",
  21021. "properties": {
  21022. "type": {
  21023. "type": "string",
  21024. "enum": ["remote"],
  21025. "description": "Type of MCP server connection"
  21026. },
  21027. "url": {
  21028. "type": "string",
  21029. "description": "URL of the remote MCP server"
  21030. },
  21031. "enabled": {
  21032. "type": "boolean"
  21033. },
  21034. "headers": {
  21035. "type": "object",
  21036. "additionalProperties": {
  21037. "type": "string"
  21038. }
  21039. },
  21040. "oauth": {
  21041. "anyOf": [
  21042. {
  21043. "$ref": "#/components/schemas/McpOAuthConfig"
  21044. },
  21045. {
  21046. "type": "boolean",
  21047. "enum": [false]
  21048. }
  21049. ],
  21050. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  21051. },
  21052. "timeout": {
  21053. "type": "integer",
  21054. "exclusiveMinimum": 0
  21055. }
  21056. },
  21057. "required": ["type", "url"],
  21058. "additionalProperties": false
  21059. },
  21060. "LayoutConfig": {
  21061. "type": "string",
  21062. "enum": ["auto", "stretch"],
  21063. "description": "@deprecated Always uses stretch layout."
  21064. },
  21065. "ImageAttachmentConfig": {
  21066. "type": "object",
  21067. "properties": {
  21068. "auto_resize": {
  21069. "type": "boolean"
  21070. },
  21071. "max_width": {
  21072. "type": "integer",
  21073. "exclusiveMinimum": 0
  21074. },
  21075. "max_height": {
  21076. "type": "integer",
  21077. "exclusiveMinimum": 0
  21078. },
  21079. "max_base64_bytes": {
  21080. "type": "integer",
  21081. "exclusiveMinimum": 0
  21082. }
  21083. },
  21084. "additionalProperties": false
  21085. },
  21086. "AttachmentConfig": {
  21087. "type": "object",
  21088. "properties": {
  21089. "image": {
  21090. "$ref": "#/components/schemas/ImageAttachmentConfig"
  21091. }
  21092. },
  21093. "additionalProperties": false
  21094. },
  21095. "Config": {
  21096. "type": "object",
  21097. "properties": {
  21098. "$schema": {
  21099. "type": "string"
  21100. },
  21101. "shell": {
  21102. "type": "string"
  21103. },
  21104. "logLevel": {
  21105. "$ref": "#/components/schemas/LogLevel"
  21106. },
  21107. "server": {
  21108. "$ref": "#/components/schemas/ServerConfig"
  21109. },
  21110. "command": {
  21111. "type": "object",
  21112. "additionalProperties": {
  21113. "type": "object",
  21114. "properties": {
  21115. "template": {
  21116. "type": "string"
  21117. },
  21118. "description": {
  21119. "type": "string"
  21120. },
  21121. "agent": {
  21122. "type": "string"
  21123. },
  21124. "model": {
  21125. "type": "string"
  21126. },
  21127. "variant": {
  21128. "type": "string"
  21129. },
  21130. "subtask": {
  21131. "type": "boolean"
  21132. }
  21133. },
  21134. "required": ["template"],
  21135. "additionalProperties": false
  21136. }
  21137. },
  21138. "skills": {
  21139. "type": "object",
  21140. "properties": {
  21141. "paths": {
  21142. "type": "array",
  21143. "items": {
  21144. "type": "string"
  21145. }
  21146. },
  21147. "urls": {
  21148. "type": "array",
  21149. "items": {
  21150. "type": "string"
  21151. }
  21152. }
  21153. },
  21154. "additionalProperties": false
  21155. },
  21156. "references": {
  21157. "type": "object",
  21158. "additionalProperties": {
  21159. "anyOf": [
  21160. {
  21161. "type": "string"
  21162. },
  21163. {
  21164. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21165. },
  21166. {
  21167. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21168. }
  21169. ]
  21170. }
  21171. },
  21172. "reference": {
  21173. "type": "object",
  21174. "additionalProperties": {
  21175. "anyOf": [
  21176. {
  21177. "type": "string"
  21178. },
  21179. {
  21180. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21181. },
  21182. {
  21183. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21184. }
  21185. ]
  21186. }
  21187. },
  21188. "watcher": {
  21189. "type": "object",
  21190. "properties": {
  21191. "ignore": {
  21192. "type": "array",
  21193. "items": {
  21194. "type": "string"
  21195. }
  21196. }
  21197. },
  21198. "additionalProperties": false
  21199. },
  21200. "snapshot": {
  21201. "type": "boolean"
  21202. },
  21203. "plugin": {
  21204. "type": "array",
  21205. "items": {
  21206. "anyOf": [
  21207. {
  21208. "type": "string"
  21209. },
  21210. {
  21211. "type": "array",
  21212. "prefixItems": [
  21213. {
  21214. "type": "string"
  21215. },
  21216. {
  21217. "type": "object"
  21218. }
  21219. ],
  21220. "maxItems": 2,
  21221. "minItems": 2
  21222. }
  21223. ]
  21224. }
  21225. },
  21226. "share": {
  21227. "type": "string",
  21228. "enum": ["manual", "auto", "disabled"]
  21229. },
  21230. "autoshare": {
  21231. "type": "boolean"
  21232. },
  21233. "autoupdate": {
  21234. "anyOf": [
  21235. {
  21236. "type": "boolean"
  21237. },
  21238. {
  21239. "type": "string",
  21240. "enum": ["notify"]
  21241. }
  21242. ],
  21243. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  21244. },
  21245. "disabled_providers": {
  21246. "type": "array",
  21247. "items": {
  21248. "type": "string"
  21249. }
  21250. },
  21251. "enabled_providers": {
  21252. "type": "array",
  21253. "items": {
  21254. "type": "string"
  21255. }
  21256. },
  21257. "model": {
  21258. "type": "string"
  21259. },
  21260. "small_model": {
  21261. "type": "string"
  21262. },
  21263. "default_agent": {
  21264. "type": "string"
  21265. },
  21266. "username": {
  21267. "type": "string"
  21268. },
  21269. "mode": {
  21270. "type": "object",
  21271. "properties": {
  21272. "build": {
  21273. "$ref": "#/components/schemas/AgentConfig"
  21274. },
  21275. "plan": {
  21276. "$ref": "#/components/schemas/AgentConfig"
  21277. }
  21278. },
  21279. "additionalProperties": {
  21280. "$ref": "#/components/schemas/AgentConfig"
  21281. }
  21282. },
  21283. "agent": {
  21284. "type": "object",
  21285. "properties": {
  21286. "plan": {
  21287. "$ref": "#/components/schemas/AgentConfig"
  21288. },
  21289. "build": {
  21290. "$ref": "#/components/schemas/AgentConfig"
  21291. },
  21292. "general": {
  21293. "$ref": "#/components/schemas/AgentConfig"
  21294. },
  21295. "explore": {
  21296. "$ref": "#/components/schemas/AgentConfig"
  21297. },
  21298. "title": {
  21299. "$ref": "#/components/schemas/AgentConfig"
  21300. },
  21301. "summary": {
  21302. "$ref": "#/components/schemas/AgentConfig"
  21303. },
  21304. "compaction": {
  21305. "$ref": "#/components/schemas/AgentConfig"
  21306. }
  21307. },
  21308. "additionalProperties": {
  21309. "$ref": "#/components/schemas/AgentConfig"
  21310. }
  21311. },
  21312. "provider": {
  21313. "type": "object",
  21314. "additionalProperties": {
  21315. "$ref": "#/components/schemas/ProviderConfig"
  21316. }
  21317. },
  21318. "mcp": {
  21319. "type": "object",
  21320. "additionalProperties": {
  21321. "anyOf": [
  21322. {
  21323. "$ref": "#/components/schemas/McpLocalConfig"
  21324. },
  21325. {
  21326. "$ref": "#/components/schemas/McpRemoteConfig"
  21327. },
  21328. {
  21329. "type": "object",
  21330. "properties": {
  21331. "enabled": {
  21332. "type": "boolean"
  21333. }
  21334. },
  21335. "required": ["enabled"],
  21336. "additionalProperties": false
  21337. }
  21338. ]
  21339. }
  21340. },
  21341. "formatter": {
  21342. "anyOf": [
  21343. {
  21344. "type": "boolean"
  21345. },
  21346. {
  21347. "type": "object",
  21348. "additionalProperties": {
  21349. "type": "object",
  21350. "properties": {
  21351. "disabled": {
  21352. "type": "boolean"
  21353. },
  21354. "command": {
  21355. "type": "array",
  21356. "items": {
  21357. "type": "string"
  21358. }
  21359. },
  21360. "environment": {
  21361. "type": "object",
  21362. "additionalProperties": {
  21363. "type": "string"
  21364. }
  21365. },
  21366. "extensions": {
  21367. "type": "array",
  21368. "items": {
  21369. "type": "string"
  21370. }
  21371. }
  21372. },
  21373. "additionalProperties": false
  21374. }
  21375. }
  21376. ],
  21377. "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."
  21378. },
  21379. "lsp": {
  21380. "anyOf": [
  21381. {
  21382. "type": "boolean"
  21383. },
  21384. {
  21385. "type": "object",
  21386. "additionalProperties": {
  21387. "anyOf": [
  21388. {
  21389. "type": "object",
  21390. "properties": {
  21391. "disabled": {
  21392. "type": "boolean",
  21393. "enum": [true]
  21394. }
  21395. },
  21396. "required": ["disabled"],
  21397. "additionalProperties": false
  21398. },
  21399. {
  21400. "type": "object",
  21401. "properties": {
  21402. "command": {
  21403. "type": "array",
  21404. "items": {
  21405. "type": "string"
  21406. }
  21407. },
  21408. "extensions": {
  21409. "type": "array",
  21410. "items": {
  21411. "type": "string"
  21412. }
  21413. },
  21414. "disabled": {
  21415. "type": "boolean"
  21416. },
  21417. "env": {
  21418. "type": "object",
  21419. "additionalProperties": {
  21420. "type": "string"
  21421. }
  21422. },
  21423. "initialization": {
  21424. "type": "object"
  21425. }
  21426. },
  21427. "required": ["command"],
  21428. "additionalProperties": false
  21429. }
  21430. ]
  21431. }
  21432. }
  21433. ],
  21434. "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."
  21435. },
  21436. "instructions": {
  21437. "type": "array",
  21438. "items": {
  21439. "type": "string"
  21440. }
  21441. },
  21442. "layout": {
  21443. "$ref": "#/components/schemas/LayoutConfig"
  21444. },
  21445. "permission": {
  21446. "$ref": "#/components/schemas/PermissionConfig"
  21447. },
  21448. "tools": {
  21449. "type": "object",
  21450. "additionalProperties": {
  21451. "type": "boolean"
  21452. }
  21453. },
  21454. "attachment": {
  21455. "$ref": "#/components/schemas/AttachmentConfig"
  21456. },
  21457. "enterprise": {
  21458. "type": "object",
  21459. "properties": {
  21460. "url": {
  21461. "type": "string"
  21462. }
  21463. },
  21464. "additionalProperties": false
  21465. },
  21466. "tool_output": {
  21467. "type": "object",
  21468. "properties": {
  21469. "max_lines": {
  21470. "type": "integer",
  21471. "exclusiveMinimum": 0
  21472. },
  21473. "max_bytes": {
  21474. "type": "integer",
  21475. "exclusiveMinimum": 0
  21476. }
  21477. },
  21478. "additionalProperties": false
  21479. },
  21480. "compaction": {
  21481. "type": "object",
  21482. "properties": {
  21483. "auto": {
  21484. "type": "boolean"
  21485. },
  21486. "prune": {
  21487. "type": "boolean"
  21488. },
  21489. "tail_turns": {
  21490. "type": "integer",
  21491. "minimum": 0
  21492. },
  21493. "preserve_recent_tokens": {
  21494. "type": "integer",
  21495. "minimum": 0
  21496. },
  21497. "reserved": {
  21498. "type": "integer",
  21499. "minimum": 0
  21500. }
  21501. },
  21502. "additionalProperties": false
  21503. },
  21504. "experimental": {
  21505. "type": "object",
  21506. "properties": {
  21507. "disable_paste_summary": {
  21508. "type": "boolean"
  21509. },
  21510. "batch_tool": {
  21511. "type": "boolean"
  21512. },
  21513. "openTelemetry": {
  21514. "type": "boolean"
  21515. },
  21516. "primary_tools": {
  21517. "type": "array",
  21518. "items": {
  21519. "type": "string"
  21520. }
  21521. },
  21522. "continue_loop_on_deny": {
  21523. "type": "boolean"
  21524. },
  21525. "mcp_timeout": {
  21526. "type": "integer",
  21527. "exclusiveMinimum": 0
  21528. },
  21529. "policies": {
  21530. "type": "array",
  21531. "items": {
  21532. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  21533. }
  21534. }
  21535. },
  21536. "additionalProperties": false
  21537. }
  21538. },
  21539. "additionalProperties": false
  21540. },
  21541. "Model": {
  21542. "type": "object",
  21543. "properties": {
  21544. "id": {
  21545. "type": "string"
  21546. },
  21547. "providerID": {
  21548. "type": "string"
  21549. },
  21550. "api": {
  21551. "type": "object",
  21552. "properties": {
  21553. "id": {
  21554. "type": "string"
  21555. },
  21556. "url": {
  21557. "type": "string"
  21558. },
  21559. "npm": {
  21560. "type": "string"
  21561. }
  21562. },
  21563. "required": ["id", "url", "npm"],
  21564. "additionalProperties": false
  21565. },
  21566. "name": {
  21567. "type": "string"
  21568. },
  21569. "family": {
  21570. "type": "string"
  21571. },
  21572. "capabilities": {
  21573. "type": "object",
  21574. "properties": {
  21575. "temperature": {
  21576. "type": "boolean"
  21577. },
  21578. "reasoning": {
  21579. "type": "boolean"
  21580. },
  21581. "attachment": {
  21582. "type": "boolean"
  21583. },
  21584. "toolcall": {
  21585. "type": "boolean"
  21586. },
  21587. "input": {
  21588. "type": "object",
  21589. "properties": {
  21590. "text": {
  21591. "type": "boolean"
  21592. },
  21593. "audio": {
  21594. "type": "boolean"
  21595. },
  21596. "image": {
  21597. "type": "boolean"
  21598. },
  21599. "video": {
  21600. "type": "boolean"
  21601. },
  21602. "pdf": {
  21603. "type": "boolean"
  21604. }
  21605. },
  21606. "required": ["text", "audio", "image", "video", "pdf"],
  21607. "additionalProperties": false
  21608. },
  21609. "output": {
  21610. "type": "object",
  21611. "properties": {
  21612. "text": {
  21613. "type": "boolean"
  21614. },
  21615. "audio": {
  21616. "type": "boolean"
  21617. },
  21618. "image": {
  21619. "type": "boolean"
  21620. },
  21621. "video": {
  21622. "type": "boolean"
  21623. },
  21624. "pdf": {
  21625. "type": "boolean"
  21626. }
  21627. },
  21628. "required": ["text", "audio", "image", "video", "pdf"],
  21629. "additionalProperties": false
  21630. },
  21631. "interleaved": {
  21632. "anyOf": [
  21633. {
  21634. "type": "boolean"
  21635. },
  21636. {
  21637. "type": "object",
  21638. "properties": {
  21639. "field": {
  21640. "type": "string",
  21641. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  21642. }
  21643. },
  21644. "required": ["field"],
  21645. "additionalProperties": false
  21646. }
  21647. ]
  21648. }
  21649. },
  21650. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21651. "additionalProperties": false
  21652. },
  21653. "cost": {
  21654. "type": "object",
  21655. "properties": {
  21656. "input": {
  21657. "type": "number"
  21658. },
  21659. "output": {
  21660. "type": "number"
  21661. },
  21662. "cache": {
  21663. "type": "object",
  21664. "properties": {
  21665. "read": {
  21666. "type": "number"
  21667. },
  21668. "write": {
  21669. "type": "number"
  21670. }
  21671. },
  21672. "required": ["read", "write"],
  21673. "additionalProperties": false
  21674. },
  21675. "tiers": {
  21676. "type": "array",
  21677. "items": {
  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. "tier": {
  21700. "type": "object",
  21701. "properties": {
  21702. "type": {
  21703. "type": "string",
  21704. "enum": ["context"]
  21705. },
  21706. "size": {
  21707. "type": "number"
  21708. }
  21709. },
  21710. "required": ["type", "size"],
  21711. "additionalProperties": false
  21712. }
  21713. },
  21714. "required": ["input", "output", "cache", "tier"],
  21715. "additionalProperties": false
  21716. }
  21717. },
  21718. "experimentalOver200K": {
  21719. "type": "object",
  21720. "properties": {
  21721. "input": {
  21722. "type": "number"
  21723. },
  21724. "output": {
  21725. "type": "number"
  21726. },
  21727. "cache": {
  21728. "type": "object",
  21729. "properties": {
  21730. "read": {
  21731. "type": "number"
  21732. },
  21733. "write": {
  21734. "type": "number"
  21735. }
  21736. },
  21737. "required": ["read", "write"],
  21738. "additionalProperties": false
  21739. }
  21740. },
  21741. "required": ["input", "output", "cache"],
  21742. "additionalProperties": false
  21743. }
  21744. },
  21745. "required": ["input", "output", "cache"],
  21746. "additionalProperties": false
  21747. },
  21748. "limit": {
  21749. "type": "object",
  21750. "properties": {
  21751. "context": {
  21752. "type": "number"
  21753. },
  21754. "input": {
  21755. "type": "number"
  21756. },
  21757. "output": {
  21758. "type": "number"
  21759. }
  21760. },
  21761. "required": ["context", "output"],
  21762. "additionalProperties": false
  21763. },
  21764. "status": {
  21765. "type": "string",
  21766. "enum": ["alpha", "beta", "deprecated", "active"]
  21767. },
  21768. "options": {
  21769. "type": "object"
  21770. },
  21771. "headers": {
  21772. "type": "object",
  21773. "additionalProperties": {
  21774. "type": "string"
  21775. }
  21776. },
  21777. "release_date": {
  21778. "type": "string"
  21779. },
  21780. "variants": {
  21781. "type": "object",
  21782. "additionalProperties": {
  21783. "type": "object"
  21784. }
  21785. }
  21786. },
  21787. "required": [
  21788. "id",
  21789. "providerID",
  21790. "api",
  21791. "name",
  21792. "capabilities",
  21793. "cost",
  21794. "limit",
  21795. "status",
  21796. "options",
  21797. "headers",
  21798. "release_date"
  21799. ],
  21800. "additionalProperties": false
  21801. },
  21802. "Provider": {
  21803. "type": "object",
  21804. "properties": {
  21805. "id": {
  21806. "type": "string"
  21807. },
  21808. "name": {
  21809. "type": "string"
  21810. },
  21811. "source": {
  21812. "type": "string",
  21813. "enum": ["env", "config", "custom", "api"]
  21814. },
  21815. "env": {
  21816. "type": "array",
  21817. "items": {
  21818. "type": "string"
  21819. }
  21820. },
  21821. "key": {
  21822. "type": "string"
  21823. },
  21824. "options": {
  21825. "type": "object"
  21826. },
  21827. "models": {
  21828. "type": "object",
  21829. "additionalProperties": {
  21830. "$ref": "#/components/schemas/Model"
  21831. }
  21832. }
  21833. },
  21834. "required": ["id", "name", "source", "env", "options", "models"],
  21835. "additionalProperties": false
  21836. },
  21837. "ExperimentalCapabilities": {
  21838. "type": "object",
  21839. "properties": {
  21840. "backgroundSubagents": {
  21841. "type": "boolean"
  21842. }
  21843. },
  21844. "required": ["backgroundSubagents"],
  21845. "additionalProperties": false
  21846. },
  21847. "ConsoleState": {
  21848. "type": "object",
  21849. "properties": {
  21850. "consoleManagedProviders": {
  21851. "type": "array",
  21852. "items": {
  21853. "type": "string"
  21854. }
  21855. },
  21856. "activeOrgName": {
  21857. "type": "string"
  21858. },
  21859. "switchableOrgCount": {
  21860. "type": "integer",
  21861. "minimum": 0
  21862. }
  21863. },
  21864. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21865. "additionalProperties": false
  21866. },
  21867. "effect_HttpApiError_InternalServerError": {
  21868. "type": "object",
  21869. "properties": {
  21870. "_tag": {
  21871. "type": "string",
  21872. "enum": ["InternalServerError"]
  21873. }
  21874. },
  21875. "required": ["_tag"],
  21876. "additionalProperties": false
  21877. },
  21878. "ToolListItem": {
  21879. "type": "object",
  21880. "properties": {
  21881. "id": {
  21882. "type": "string"
  21883. },
  21884. "description": {
  21885. "type": "string"
  21886. },
  21887. "parameters": {}
  21888. },
  21889. "required": ["id", "description", "parameters"],
  21890. "additionalProperties": false
  21891. },
  21892. "ToolList": {
  21893. "type": "array",
  21894. "items": {
  21895. "$ref": "#/components/schemas/ToolListItem"
  21896. }
  21897. },
  21898. "ToolIDs": {
  21899. "type": "array",
  21900. "items": {
  21901. "type": "string"
  21902. }
  21903. },
  21904. "WorktreeError": {
  21905. "type": "object",
  21906. "properties": {
  21907. "name": {
  21908. "type": "string",
  21909. "enum": [
  21910. "WorktreeNotGitError",
  21911. "WorktreeNameGenerationFailedError",
  21912. "WorktreeCreateFailedError",
  21913. "WorktreeStartCommandFailedError",
  21914. "WorktreeRemoveFailedError",
  21915. "WorktreeResetFailedError",
  21916. "WorktreeListFailedError"
  21917. ]
  21918. },
  21919. "data": {
  21920. "type": "object",
  21921. "properties": {
  21922. "message": {
  21923. "type": "string"
  21924. }
  21925. },
  21926. "required": ["message"],
  21927. "additionalProperties": false
  21928. }
  21929. },
  21930. "required": ["name", "data"],
  21931. "additionalProperties": false
  21932. },
  21933. "WorktreeCreateInput": {
  21934. "type": "object",
  21935. "properties": {
  21936. "name": {
  21937. "type": "string"
  21938. },
  21939. "startCommand": {
  21940. "type": "string",
  21941. "description": "Additional startup script to run after the project's start command"
  21942. }
  21943. },
  21944. "additionalProperties": false
  21945. },
  21946. "Worktree": {
  21947. "type": "object",
  21948. "properties": {
  21949. "name": {
  21950. "type": "string"
  21951. },
  21952. "branch": {
  21953. "type": "string"
  21954. },
  21955. "directory": {
  21956. "type": "string"
  21957. }
  21958. },
  21959. "required": ["name", "directory"],
  21960. "additionalProperties": false
  21961. },
  21962. "WorktreeRemoveInput": {
  21963. "type": "object",
  21964. "properties": {
  21965. "directory": {
  21966. "type": "string"
  21967. }
  21968. },
  21969. "required": ["directory"],
  21970. "additionalProperties": false
  21971. },
  21972. "WorktreeResetInput": {
  21973. "type": "object",
  21974. "properties": {
  21975. "directory": {
  21976. "type": "string"
  21977. }
  21978. },
  21979. "required": ["directory"],
  21980. "additionalProperties": false
  21981. },
  21982. "ProjectSummary": {
  21983. "type": "object",
  21984. "properties": {
  21985. "id": {
  21986. "type": "string"
  21987. },
  21988. "name": {
  21989. "type": "string"
  21990. },
  21991. "worktree": {
  21992. "type": "string"
  21993. }
  21994. },
  21995. "required": ["id", "worktree"],
  21996. "additionalProperties": false
  21997. },
  21998. "GlobalSession": {
  21999. "type": "object",
  22000. "properties": {
  22001. "id": {
  22002. "type": "string",
  22003. "pattern": "^ses"
  22004. },
  22005. "slug": {
  22006. "type": "string"
  22007. },
  22008. "projectID": {
  22009. "type": "string"
  22010. },
  22011. "workspaceID": {
  22012. "type": "string",
  22013. "pattern": "^wrk"
  22014. },
  22015. "directory": {
  22016. "type": "string"
  22017. },
  22018. "path": {
  22019. "type": "string"
  22020. },
  22021. "parentID": {
  22022. "type": "string",
  22023. "pattern": "^ses"
  22024. },
  22025. "summary": {
  22026. "type": "object",
  22027. "properties": {
  22028. "additions": {
  22029. "type": "number"
  22030. },
  22031. "deletions": {
  22032. "type": "number"
  22033. },
  22034. "files": {
  22035. "type": "number"
  22036. },
  22037. "diffs": {
  22038. "type": "array",
  22039. "items": {
  22040. "$ref": "#/components/schemas/SnapshotFileDiff"
  22041. }
  22042. }
  22043. },
  22044. "required": ["additions", "deletions", "files"],
  22045. "additionalProperties": false
  22046. },
  22047. "cost": {
  22048. "type": "number"
  22049. },
  22050. "tokens": {
  22051. "type": "object",
  22052. "properties": {
  22053. "input": {
  22054. "type": "number"
  22055. },
  22056. "output": {
  22057. "type": "number"
  22058. },
  22059. "reasoning": {
  22060. "type": "number"
  22061. },
  22062. "cache": {
  22063. "type": "object",
  22064. "properties": {
  22065. "read": {
  22066. "type": "number"
  22067. },
  22068. "write": {
  22069. "type": "number"
  22070. }
  22071. },
  22072. "required": ["read", "write"],
  22073. "additionalProperties": false
  22074. }
  22075. },
  22076. "required": ["input", "output", "reasoning", "cache"],
  22077. "additionalProperties": false
  22078. },
  22079. "share": {
  22080. "type": "object",
  22081. "properties": {
  22082. "url": {
  22083. "type": "string"
  22084. }
  22085. },
  22086. "required": ["url"],
  22087. "additionalProperties": false
  22088. },
  22089. "title": {
  22090. "type": "string"
  22091. },
  22092. "agent": {
  22093. "type": "string"
  22094. },
  22095. "model": {
  22096. "type": "object",
  22097. "properties": {
  22098. "id": {
  22099. "type": "string"
  22100. },
  22101. "providerID": {
  22102. "type": "string"
  22103. },
  22104. "variant": {
  22105. "type": "string"
  22106. }
  22107. },
  22108. "required": ["id", "providerID"],
  22109. "additionalProperties": false
  22110. },
  22111. "version": {
  22112. "type": "string"
  22113. },
  22114. "metadata": {
  22115. "type": "object"
  22116. },
  22117. "time": {
  22118. "type": "object",
  22119. "properties": {
  22120. "created": {
  22121. "type": "integer",
  22122. "minimum": 0
  22123. },
  22124. "updated": {
  22125. "type": "integer",
  22126. "minimum": 0
  22127. },
  22128. "compacting": {
  22129. "type": "integer",
  22130. "minimum": 0
  22131. },
  22132. "archived": {
  22133. "type": "number"
  22134. }
  22135. },
  22136. "required": ["created", "updated"],
  22137. "additionalProperties": false
  22138. },
  22139. "permission": {
  22140. "$ref": "#/components/schemas/PermissionRuleset"
  22141. },
  22142. "revert": {
  22143. "type": "object",
  22144. "properties": {
  22145. "messageID": {
  22146. "type": "string",
  22147. "pattern": "^msg"
  22148. },
  22149. "partID": {
  22150. "type": "string",
  22151. "pattern": "^prt"
  22152. },
  22153. "snapshot": {
  22154. "type": "string"
  22155. },
  22156. "diff": {
  22157. "type": "string"
  22158. }
  22159. },
  22160. "required": ["messageID"],
  22161. "additionalProperties": false
  22162. },
  22163. "project": {
  22164. "anyOf": [
  22165. {
  22166. "$ref": "#/components/schemas/ProjectSummary"
  22167. },
  22168. {
  22169. "type": "null"
  22170. }
  22171. ]
  22172. }
  22173. },
  22174. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  22175. "additionalProperties": false
  22176. },
  22177. "McpResource": {
  22178. "type": "object",
  22179. "properties": {
  22180. "name": {
  22181. "type": "string"
  22182. },
  22183. "uri": {
  22184. "type": "string"
  22185. },
  22186. "description": {
  22187. "type": "string"
  22188. },
  22189. "mimeType": {
  22190. "type": "string"
  22191. },
  22192. "client": {
  22193. "type": "string"
  22194. }
  22195. },
  22196. "required": ["name", "uri", "client"],
  22197. "additionalProperties": false
  22198. },
  22199. "Symbol": {
  22200. "type": "object",
  22201. "properties": {
  22202. "name": {
  22203. "type": "string"
  22204. },
  22205. "kind": {
  22206. "type": "integer",
  22207. "minimum": 0
  22208. },
  22209. "location": {
  22210. "type": "object",
  22211. "properties": {
  22212. "uri": {
  22213. "type": "string"
  22214. },
  22215. "range": {
  22216. "$ref": "#/components/schemas/Range"
  22217. }
  22218. },
  22219. "required": ["uri", "range"],
  22220. "additionalProperties": false
  22221. }
  22222. },
  22223. "required": ["name", "kind", "location"],
  22224. "additionalProperties": false
  22225. },
  22226. "FileNode": {
  22227. "type": "object",
  22228. "properties": {
  22229. "name": {
  22230. "type": "string"
  22231. },
  22232. "path": {
  22233. "type": "string"
  22234. },
  22235. "absolute": {
  22236. "type": "string"
  22237. },
  22238. "type": {
  22239. "type": "string",
  22240. "enum": ["file", "directory"]
  22241. },
  22242. "ignored": {
  22243. "type": "boolean"
  22244. }
  22245. },
  22246. "required": ["name", "path", "absolute", "type", "ignored"],
  22247. "additionalProperties": false
  22248. },
  22249. "FileContent": {
  22250. "type": "object",
  22251. "properties": {
  22252. "type": {
  22253. "type": "string",
  22254. "enum": ["text", "binary"]
  22255. },
  22256. "content": {
  22257. "type": "string"
  22258. },
  22259. "diff": {
  22260. "type": "string"
  22261. },
  22262. "patch": {
  22263. "type": "object",
  22264. "properties": {
  22265. "oldFileName": {
  22266. "type": "string"
  22267. },
  22268. "newFileName": {
  22269. "type": "string"
  22270. },
  22271. "oldHeader": {
  22272. "type": "string"
  22273. },
  22274. "newHeader": {
  22275. "type": "string"
  22276. },
  22277. "hunks": {
  22278. "type": "array",
  22279. "items": {
  22280. "type": "object",
  22281. "properties": {
  22282. "oldStart": {
  22283. "type": "integer",
  22284. "minimum": 0
  22285. },
  22286. "oldLines": {
  22287. "type": "integer",
  22288. "minimum": 0
  22289. },
  22290. "newStart": {
  22291. "type": "integer",
  22292. "minimum": 0
  22293. },
  22294. "newLines": {
  22295. "type": "integer",
  22296. "minimum": 0
  22297. },
  22298. "lines": {
  22299. "type": "array",
  22300. "items": {
  22301. "type": "string"
  22302. }
  22303. }
  22304. },
  22305. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  22306. "additionalProperties": false
  22307. }
  22308. },
  22309. "index": {
  22310. "type": "string"
  22311. }
  22312. },
  22313. "required": ["oldFileName", "newFileName", "hunks"],
  22314. "additionalProperties": false
  22315. },
  22316. "encoding": {
  22317. "type": "string",
  22318. "enum": ["base64"]
  22319. },
  22320. "mimeType": {
  22321. "type": "string"
  22322. }
  22323. },
  22324. "required": ["type", "content"],
  22325. "additionalProperties": false
  22326. },
  22327. "File": {
  22328. "type": "object",
  22329. "properties": {
  22330. "path": {
  22331. "type": "string"
  22332. },
  22333. "added": {
  22334. "type": "integer",
  22335. "minimum": 0
  22336. },
  22337. "removed": {
  22338. "type": "integer",
  22339. "minimum": 0
  22340. },
  22341. "status": {
  22342. "type": "string",
  22343. "enum": ["added", "deleted", "modified"]
  22344. }
  22345. },
  22346. "required": ["path", "added", "removed", "status"],
  22347. "additionalProperties": false
  22348. },
  22349. "Path": {
  22350. "type": "object",
  22351. "properties": {
  22352. "home": {
  22353. "type": "string"
  22354. },
  22355. "state": {
  22356. "type": "string"
  22357. },
  22358. "config": {
  22359. "type": "string"
  22360. },
  22361. "worktree": {
  22362. "type": "string"
  22363. },
  22364. "directory": {
  22365. "type": "string"
  22366. }
  22367. },
  22368. "required": ["home", "state", "config", "worktree", "directory"],
  22369. "additionalProperties": false
  22370. },
  22371. "VcsInfo": {
  22372. "type": "object",
  22373. "properties": {
  22374. "branch": {
  22375. "type": "string"
  22376. },
  22377. "default_branch": {
  22378. "type": "string"
  22379. }
  22380. },
  22381. "additionalProperties": false
  22382. },
  22383. "VcsFileStatus": {
  22384. "type": "object",
  22385. "properties": {
  22386. "file": {
  22387. "type": "string"
  22388. },
  22389. "additions": {
  22390. "type": "number"
  22391. },
  22392. "deletions": {
  22393. "type": "number"
  22394. },
  22395. "status": {
  22396. "type": "string",
  22397. "enum": ["added", "deleted", "modified"]
  22398. }
  22399. },
  22400. "required": ["file", "additions", "deletions", "status"],
  22401. "additionalProperties": false
  22402. },
  22403. "VcsFileDiff": {
  22404. "type": "object",
  22405. "properties": {
  22406. "file": {
  22407. "type": "string"
  22408. },
  22409. "patch": {
  22410. "type": "string"
  22411. },
  22412. "additions": {
  22413. "type": "number"
  22414. },
  22415. "deletions": {
  22416. "type": "number"
  22417. },
  22418. "status": {
  22419. "type": "string",
  22420. "enum": ["added", "deleted", "modified"]
  22421. }
  22422. },
  22423. "required": ["file", "additions", "deletions"],
  22424. "additionalProperties": false
  22425. },
  22426. "VcsApplyError": {
  22427. "type": "object",
  22428. "properties": {
  22429. "name": {
  22430. "type": "string",
  22431. "enum": ["VcsApplyError"]
  22432. },
  22433. "data": {
  22434. "type": "object",
  22435. "properties": {
  22436. "message": {
  22437. "type": "string"
  22438. },
  22439. "reason": {
  22440. "type": "string",
  22441. "enum": ["non-git", "not-clean"]
  22442. }
  22443. },
  22444. "required": ["message", "reason"],
  22445. "additionalProperties": false
  22446. }
  22447. },
  22448. "required": ["name", "data"],
  22449. "additionalProperties": false
  22450. },
  22451. "Command": {
  22452. "type": "object",
  22453. "properties": {
  22454. "name": {
  22455. "type": "string"
  22456. },
  22457. "description": {
  22458. "type": "string"
  22459. },
  22460. "agent": {
  22461. "type": "string"
  22462. },
  22463. "model": {
  22464. "type": "string"
  22465. },
  22466. "source": {
  22467. "type": "string",
  22468. "enum": ["command", "mcp", "skill"]
  22469. },
  22470. "template": {
  22471. "type": "string"
  22472. },
  22473. "subtask": {
  22474. "type": "boolean"
  22475. },
  22476. "hints": {
  22477. "type": "array",
  22478. "items": {
  22479. "type": "string"
  22480. }
  22481. }
  22482. },
  22483. "required": ["name", "template", "hints"],
  22484. "additionalProperties": false
  22485. },
  22486. "Agent": {
  22487. "type": "object",
  22488. "properties": {
  22489. "name": {
  22490. "type": "string"
  22491. },
  22492. "description": {
  22493. "type": "string"
  22494. },
  22495. "mode": {
  22496. "type": "string",
  22497. "enum": ["subagent", "primary", "all"]
  22498. },
  22499. "native": {
  22500. "type": "boolean"
  22501. },
  22502. "hidden": {
  22503. "type": "boolean"
  22504. },
  22505. "topP": {
  22506. "type": "number"
  22507. },
  22508. "temperature": {
  22509. "type": "number"
  22510. },
  22511. "color": {
  22512. "type": "string"
  22513. },
  22514. "permission": {
  22515. "$ref": "#/components/schemas/PermissionRuleset"
  22516. },
  22517. "model": {
  22518. "type": "object",
  22519. "properties": {
  22520. "modelID": {
  22521. "type": "string"
  22522. },
  22523. "providerID": {
  22524. "type": "string"
  22525. }
  22526. },
  22527. "required": ["modelID", "providerID"],
  22528. "additionalProperties": false
  22529. },
  22530. "variant": {
  22531. "type": "string"
  22532. },
  22533. "prompt": {
  22534. "type": "string"
  22535. },
  22536. "options": {
  22537. "type": "object"
  22538. },
  22539. "steps": {
  22540. "type": "number"
  22541. }
  22542. },
  22543. "required": ["name", "mode", "permission", "options"],
  22544. "additionalProperties": false
  22545. },
  22546. "LSPStatus": {
  22547. "type": "object",
  22548. "properties": {
  22549. "id": {
  22550. "type": "string"
  22551. },
  22552. "name": {
  22553. "type": "string"
  22554. },
  22555. "root": {
  22556. "type": "string"
  22557. },
  22558. "status": {
  22559. "type": "string",
  22560. "enum": ["connected", "error"]
  22561. }
  22562. },
  22563. "required": ["id", "name", "root", "status"],
  22564. "additionalProperties": false
  22565. },
  22566. "FormatterStatus": {
  22567. "type": "object",
  22568. "properties": {
  22569. "name": {
  22570. "type": "string"
  22571. },
  22572. "extensions": {
  22573. "type": "array",
  22574. "items": {
  22575. "type": "string"
  22576. }
  22577. },
  22578. "enabled": {
  22579. "type": "boolean"
  22580. }
  22581. },
  22582. "required": ["name", "extensions", "enabled"],
  22583. "additionalProperties": false
  22584. },
  22585. "MCPStatusConnected": {
  22586. "type": "object",
  22587. "properties": {
  22588. "status": {
  22589. "type": "string",
  22590. "enum": ["connected"]
  22591. }
  22592. },
  22593. "required": ["status"],
  22594. "additionalProperties": false
  22595. },
  22596. "MCPStatusDisabled": {
  22597. "type": "object",
  22598. "properties": {
  22599. "status": {
  22600. "type": "string",
  22601. "enum": ["disabled"]
  22602. }
  22603. },
  22604. "required": ["status"],
  22605. "additionalProperties": false
  22606. },
  22607. "MCPStatusFailed": {
  22608. "type": "object",
  22609. "properties": {
  22610. "status": {
  22611. "type": "string",
  22612. "enum": ["failed"]
  22613. },
  22614. "error": {
  22615. "type": "string"
  22616. }
  22617. },
  22618. "required": ["status", "error"],
  22619. "additionalProperties": false
  22620. },
  22621. "MCPStatusNeedsAuth": {
  22622. "type": "object",
  22623. "properties": {
  22624. "status": {
  22625. "type": "string",
  22626. "enum": ["needs_auth"]
  22627. }
  22628. },
  22629. "required": ["status"],
  22630. "additionalProperties": false
  22631. },
  22632. "MCPStatusNeedsClientRegistration": {
  22633. "type": "object",
  22634. "properties": {
  22635. "status": {
  22636. "type": "string",
  22637. "enum": ["needs_client_registration"]
  22638. },
  22639. "error": {
  22640. "type": "string"
  22641. }
  22642. },
  22643. "required": ["status", "error"],
  22644. "additionalProperties": false
  22645. },
  22646. "MCPStatus": {
  22647. "anyOf": [
  22648. {
  22649. "$ref": "#/components/schemas/MCPStatusConnected"
  22650. },
  22651. {
  22652. "$ref": "#/components/schemas/MCPStatusDisabled"
  22653. },
  22654. {
  22655. "$ref": "#/components/schemas/MCPStatusFailed"
  22656. },
  22657. {
  22658. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22659. },
  22660. {
  22661. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22662. }
  22663. ]
  22664. },
  22665. "McpUnsupportedOAuthError": {
  22666. "type": "object",
  22667. "properties": {
  22668. "error": {
  22669. "type": "string"
  22670. }
  22671. },
  22672. "required": ["error"],
  22673. "additionalProperties": false
  22674. },
  22675. "McpServerNotFoundError": {
  22676. "type": "object",
  22677. "properties": {
  22678. "_tag": {
  22679. "type": "string",
  22680. "enum": ["McpServerNotFoundError"]
  22681. },
  22682. "name": {
  22683. "type": "string"
  22684. },
  22685. "message": {
  22686. "type": "string"
  22687. }
  22688. },
  22689. "required": ["_tag", "name", "message"],
  22690. "additionalProperties": false
  22691. },
  22692. "Project": {
  22693. "type": "object",
  22694. "properties": {
  22695. "id": {
  22696. "type": "string"
  22697. },
  22698. "worktree": {
  22699. "type": "string"
  22700. },
  22701. "vcs": {
  22702. "$ref": "#/components/schemas/ProjectVcs"
  22703. },
  22704. "name": {
  22705. "type": "string"
  22706. },
  22707. "icon": {
  22708. "$ref": "#/components/schemas/ProjectIcon"
  22709. },
  22710. "commands": {
  22711. "$ref": "#/components/schemas/ProjectCommands"
  22712. },
  22713. "time": {
  22714. "$ref": "#/components/schemas/ProjectTime"
  22715. },
  22716. "sandboxes": {
  22717. "type": "array",
  22718. "items": {
  22719. "type": "string"
  22720. }
  22721. }
  22722. },
  22723. "required": ["id", "worktree", "time", "sandboxes"],
  22724. "additionalProperties": false
  22725. },
  22726. "ProjectNotFoundError": {
  22727. "type": "object",
  22728. "properties": {
  22729. "_tag": {
  22730. "type": "string",
  22731. "enum": ["ProjectNotFoundError"]
  22732. },
  22733. "projectID": {
  22734. "type": "string"
  22735. },
  22736. "message": {
  22737. "type": "string"
  22738. }
  22739. },
  22740. "required": ["_tag", "projectID", "message"],
  22741. "additionalProperties": false
  22742. },
  22743. "PtyNotFoundError": {
  22744. "type": "object",
  22745. "properties": {
  22746. "_tag": {
  22747. "type": "string",
  22748. "enum": ["PtyNotFoundError"]
  22749. },
  22750. "ptyID": {
  22751. "type": "string"
  22752. },
  22753. "message": {
  22754. "type": "string"
  22755. }
  22756. },
  22757. "required": ["_tag", "ptyID", "message"],
  22758. "additionalProperties": false
  22759. },
  22760. "PtyForbiddenError": {
  22761. "type": "object",
  22762. "properties": {
  22763. "_tag": {
  22764. "type": "string",
  22765. "enum": ["PtyForbiddenError"]
  22766. },
  22767. "message": {
  22768. "type": "string"
  22769. }
  22770. },
  22771. "required": ["_tag", "message"],
  22772. "additionalProperties": false
  22773. },
  22774. "QuestionRequest": {
  22775. "type": "object",
  22776. "properties": {
  22777. "id": {
  22778. "type": "string",
  22779. "pattern": "^que"
  22780. },
  22781. "sessionID": {
  22782. "type": "string",
  22783. "pattern": "^ses"
  22784. },
  22785. "questions": {
  22786. "type": "array",
  22787. "items": {
  22788. "$ref": "#/components/schemas/QuestionInfo"
  22789. },
  22790. "description": "Questions to ask"
  22791. },
  22792. "tool": {
  22793. "$ref": "#/components/schemas/QuestionTool"
  22794. }
  22795. },
  22796. "required": ["id", "sessionID", "questions"],
  22797. "additionalProperties": false
  22798. },
  22799. "QuestionNotFoundError": {
  22800. "type": "object",
  22801. "properties": {
  22802. "_tag": {
  22803. "type": "string",
  22804. "enum": ["QuestionNotFoundError"]
  22805. },
  22806. "requestID": {
  22807. "type": "string"
  22808. },
  22809. "message": {
  22810. "type": "string"
  22811. }
  22812. },
  22813. "required": ["_tag", "requestID", "message"],
  22814. "additionalProperties": false
  22815. },
  22816. "PermissionRequest": {
  22817. "type": "object",
  22818. "properties": {
  22819. "id": {
  22820. "type": "string",
  22821. "pattern": "^per"
  22822. },
  22823. "sessionID": {
  22824. "type": "string",
  22825. "pattern": "^ses"
  22826. },
  22827. "permission": {
  22828. "type": "string"
  22829. },
  22830. "patterns": {
  22831. "type": "array",
  22832. "items": {
  22833. "type": "string"
  22834. }
  22835. },
  22836. "metadata": {
  22837. "type": "object"
  22838. },
  22839. "always": {
  22840. "type": "array",
  22841. "items": {
  22842. "type": "string"
  22843. }
  22844. },
  22845. "tool": {
  22846. "type": "object",
  22847. "properties": {
  22848. "messageID": {
  22849. "type": "string"
  22850. },
  22851. "callID": {
  22852. "type": "string"
  22853. }
  22854. },
  22855. "required": ["messageID", "callID"],
  22856. "additionalProperties": false
  22857. }
  22858. },
  22859. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22860. "additionalProperties": false
  22861. },
  22862. "PermissionNotFoundError": {
  22863. "type": "object",
  22864. "properties": {
  22865. "_tag": {
  22866. "type": "string",
  22867. "enum": ["PermissionNotFoundError"]
  22868. },
  22869. "requestID": {
  22870. "type": "string"
  22871. },
  22872. "message": {
  22873. "type": "string"
  22874. }
  22875. },
  22876. "required": ["_tag", "requestID", "message"],
  22877. "additionalProperties": false
  22878. },
  22879. "ProviderAuthMethod": {
  22880. "type": "object",
  22881. "properties": {
  22882. "type": {
  22883. "type": "string",
  22884. "enum": ["oauth", "api"]
  22885. },
  22886. "label": {
  22887. "type": "string"
  22888. },
  22889. "prompts": {
  22890. "type": "array",
  22891. "items": {
  22892. "anyOf": [
  22893. {
  22894. "type": "object",
  22895. "properties": {
  22896. "type": {
  22897. "type": "string",
  22898. "enum": ["text"]
  22899. },
  22900. "key": {
  22901. "type": "string"
  22902. },
  22903. "message": {
  22904. "type": "string"
  22905. },
  22906. "placeholder": {
  22907. "type": "string"
  22908. },
  22909. "when": {
  22910. "type": "object",
  22911. "properties": {
  22912. "key": {
  22913. "type": "string"
  22914. },
  22915. "op": {
  22916. "type": "string",
  22917. "enum": ["eq", "neq"]
  22918. },
  22919. "value": {
  22920. "type": "string"
  22921. }
  22922. },
  22923. "required": ["key", "op", "value"],
  22924. "additionalProperties": false
  22925. }
  22926. },
  22927. "required": ["type", "key", "message"],
  22928. "additionalProperties": false
  22929. },
  22930. {
  22931. "type": "object",
  22932. "properties": {
  22933. "type": {
  22934. "type": "string",
  22935. "enum": ["select"]
  22936. },
  22937. "key": {
  22938. "type": "string"
  22939. },
  22940. "message": {
  22941. "type": "string"
  22942. },
  22943. "options": {
  22944. "type": "array",
  22945. "items": {
  22946. "type": "object",
  22947. "properties": {
  22948. "label": {
  22949. "type": "string"
  22950. },
  22951. "value": {
  22952. "type": "string"
  22953. },
  22954. "hint": {
  22955. "type": "string"
  22956. }
  22957. },
  22958. "required": ["label", "value"],
  22959. "additionalProperties": false
  22960. }
  22961. },
  22962. "when": {
  22963. "type": "object",
  22964. "properties": {
  22965. "key": {
  22966. "type": "string"
  22967. },
  22968. "op": {
  22969. "type": "string",
  22970. "enum": ["eq", "neq"]
  22971. },
  22972. "value": {
  22973. "type": "string"
  22974. }
  22975. },
  22976. "required": ["key", "op", "value"],
  22977. "additionalProperties": false
  22978. }
  22979. },
  22980. "required": ["type", "key", "message", "options"],
  22981. "additionalProperties": false
  22982. }
  22983. ]
  22984. }
  22985. }
  22986. },
  22987. "required": ["type", "label"],
  22988. "additionalProperties": false
  22989. },
  22990. "ProviderAuthAuthorization": {
  22991. "type": "object",
  22992. "properties": {
  22993. "url": {
  22994. "type": "string"
  22995. },
  22996. "method": {
  22997. "type": "string",
  22998. "enum": ["auto", "code"]
  22999. },
  23000. "instructions": {
  23001. "type": "string"
  23002. }
  23003. },
  23004. "required": ["url", "method", "instructions"],
  23005. "additionalProperties": false
  23006. },
  23007. "ProviderAuthError1": {
  23008. "type": "object",
  23009. "properties": {
  23010. "name": {
  23011. "type": "string",
  23012. "enum": [
  23013. "BadRequest",
  23014. "ProviderAuthOauthMissing",
  23015. "ProviderAuthOauthCodeMissing",
  23016. "ProviderAuthOauthCallbackFailed",
  23017. "ProviderAuthValidationFailed"
  23018. ]
  23019. },
  23020. "data": {
  23021. "type": "object",
  23022. "properties": {
  23023. "providerID": {
  23024. "type": "string"
  23025. },
  23026. "field": {
  23027. "type": "string"
  23028. },
  23029. "message": {
  23030. "type": "string"
  23031. },
  23032. "kind": {
  23033. "type": "string"
  23034. }
  23035. },
  23036. "additionalProperties": false
  23037. }
  23038. },
  23039. "required": ["name", "data"],
  23040. "additionalProperties": false
  23041. },
  23042. "NotFoundError": {
  23043. "type": "object",
  23044. "required": ["name", "data"],
  23045. "properties": {
  23046. "name": {
  23047. "type": "string",
  23048. "enum": ["NotFoundError"]
  23049. },
  23050. "data": {
  23051. "type": "object",
  23052. "required": ["message"],
  23053. "properties": {
  23054. "message": {
  23055. "type": "string"
  23056. }
  23057. }
  23058. }
  23059. }
  23060. },
  23061. "TextPartInput": {
  23062. "type": "object",
  23063. "properties": {
  23064. "id": {
  23065. "type": "string",
  23066. "pattern": "^prt"
  23067. },
  23068. "type": {
  23069. "type": "string",
  23070. "enum": ["text"]
  23071. },
  23072. "text": {
  23073. "type": "string"
  23074. },
  23075. "synthetic": {
  23076. "type": "boolean"
  23077. },
  23078. "ignored": {
  23079. "type": "boolean"
  23080. },
  23081. "time": {
  23082. "type": "object",
  23083. "properties": {
  23084. "start": {
  23085. "type": "integer",
  23086. "minimum": 0
  23087. },
  23088. "end": {
  23089. "type": "integer",
  23090. "minimum": 0
  23091. }
  23092. },
  23093. "required": ["start"],
  23094. "additionalProperties": false
  23095. },
  23096. "metadata": {
  23097. "type": "object"
  23098. }
  23099. },
  23100. "required": ["type", "text"],
  23101. "additionalProperties": false
  23102. },
  23103. "FilePartInput": {
  23104. "type": "object",
  23105. "properties": {
  23106. "id": {
  23107. "type": "string",
  23108. "pattern": "^prt"
  23109. },
  23110. "type": {
  23111. "type": "string",
  23112. "enum": ["file"]
  23113. },
  23114. "mime": {
  23115. "type": "string"
  23116. },
  23117. "filename": {
  23118. "type": "string"
  23119. },
  23120. "url": {
  23121. "type": "string"
  23122. },
  23123. "source": {
  23124. "$ref": "#/components/schemas/FilePartSource"
  23125. }
  23126. },
  23127. "required": ["type", "mime", "url"],
  23128. "additionalProperties": false
  23129. },
  23130. "AgentPartInput": {
  23131. "type": "object",
  23132. "properties": {
  23133. "id": {
  23134. "type": "string",
  23135. "pattern": "^prt"
  23136. },
  23137. "type": {
  23138. "type": "string",
  23139. "enum": ["agent"]
  23140. },
  23141. "name": {
  23142. "type": "string"
  23143. },
  23144. "source": {
  23145. "type": "object",
  23146. "properties": {
  23147. "value": {
  23148. "type": "string"
  23149. },
  23150. "start": {
  23151. "type": "integer",
  23152. "minimum": 0
  23153. },
  23154. "end": {
  23155. "type": "integer",
  23156. "minimum": 0
  23157. }
  23158. },
  23159. "required": ["value", "start", "end"],
  23160. "additionalProperties": false
  23161. }
  23162. },
  23163. "required": ["type", "name"],
  23164. "additionalProperties": false
  23165. },
  23166. "SubtaskPartInput": {
  23167. "type": "object",
  23168. "properties": {
  23169. "id": {
  23170. "type": "string",
  23171. "pattern": "^prt"
  23172. },
  23173. "type": {
  23174. "type": "string",
  23175. "enum": ["subtask"]
  23176. },
  23177. "prompt": {
  23178. "type": "string"
  23179. },
  23180. "description": {
  23181. "type": "string"
  23182. },
  23183. "agent": {
  23184. "type": "string"
  23185. },
  23186. "model": {
  23187. "type": "object",
  23188. "properties": {
  23189. "providerID": {
  23190. "type": "string"
  23191. },
  23192. "modelID": {
  23193. "type": "string"
  23194. }
  23195. },
  23196. "required": ["providerID", "modelID"],
  23197. "additionalProperties": false
  23198. },
  23199. "command": {
  23200. "type": "string"
  23201. }
  23202. },
  23203. "required": ["type", "prompt", "description", "agent"],
  23204. "additionalProperties": false
  23205. },
  23206. "SessionBusyError": {
  23207. "type": "object",
  23208. "properties": {
  23209. "_tag": {
  23210. "type": "string",
  23211. "enum": ["SessionBusyError"]
  23212. },
  23213. "sessionID": {
  23214. "type": "string"
  23215. },
  23216. "message": {
  23217. "type": "string"
  23218. }
  23219. },
  23220. "required": ["_tag", "sessionID", "message"],
  23221. "additionalProperties": false
  23222. },
  23223. "EventTuiPromptAppend": {
  23224. "type": "object",
  23225. "properties": {
  23226. "type": {
  23227. "type": "string",
  23228. "enum": ["tui.prompt.append"]
  23229. },
  23230. "properties": {
  23231. "type": "object",
  23232. "properties": {
  23233. "text": {
  23234. "type": "string"
  23235. }
  23236. },
  23237. "required": ["text"],
  23238. "additionalProperties": false
  23239. }
  23240. },
  23241. "required": ["type", "properties"],
  23242. "additionalProperties": false
  23243. },
  23244. "EventTuiCommandExecute": {
  23245. "type": "object",
  23246. "properties": {
  23247. "type": {
  23248. "type": "string",
  23249. "enum": ["tui.command.execute"]
  23250. },
  23251. "properties": {
  23252. "type": "object",
  23253. "properties": {
  23254. "command": {
  23255. "anyOf": [
  23256. {
  23257. "type": "string",
  23258. "enum": [
  23259. "session.list",
  23260. "session.new",
  23261. "session.share",
  23262. "session.interrupt",
  23263. "session.compact",
  23264. "session.page.up",
  23265. "session.page.down",
  23266. "session.line.up",
  23267. "session.line.down",
  23268. "session.half.page.up",
  23269. "session.half.page.down",
  23270. "session.first",
  23271. "session.last",
  23272. "prompt.clear",
  23273. "prompt.submit",
  23274. "agent.cycle"
  23275. ]
  23276. },
  23277. {
  23278. "type": "string"
  23279. }
  23280. ]
  23281. }
  23282. },
  23283. "required": ["command"],
  23284. "additionalProperties": false
  23285. }
  23286. },
  23287. "required": ["type", "properties"],
  23288. "additionalProperties": false
  23289. },
  23290. "EventTuiToastShow": {
  23291. "type": "object",
  23292. "properties": {
  23293. "type": {
  23294. "type": "string",
  23295. "enum": ["tui.toast.show"]
  23296. },
  23297. "properties": {
  23298. "type": "object",
  23299. "properties": {
  23300. "title": {
  23301. "type": "string"
  23302. },
  23303. "message": {
  23304. "type": "string"
  23305. },
  23306. "variant": {
  23307. "type": "string",
  23308. "enum": ["info", "success", "warning", "error"]
  23309. },
  23310. "duration": {
  23311. "type": "integer",
  23312. "exclusiveMinimum": 0
  23313. }
  23314. },
  23315. "required": ["message", "variant"],
  23316. "additionalProperties": false
  23317. }
  23318. },
  23319. "required": ["type", "properties"],
  23320. "additionalProperties": false
  23321. },
  23322. "EventTuiSessionSelect": {
  23323. "type": "object",
  23324. "properties": {
  23325. "type": {
  23326. "type": "string",
  23327. "enum": ["tui.session.select"]
  23328. },
  23329. "properties": {
  23330. "type": "object",
  23331. "properties": {
  23332. "sessionID": {
  23333. "type": "string",
  23334. "pattern": "^ses",
  23335. "description": "Session ID to navigate to"
  23336. }
  23337. },
  23338. "required": ["sessionID"],
  23339. "additionalProperties": false
  23340. }
  23341. },
  23342. "required": ["type", "properties"],
  23343. "additionalProperties": false
  23344. },
  23345. "Workspace": {
  23346. "type": "object",
  23347. "properties": {
  23348. "id": {
  23349. "type": "string",
  23350. "pattern": "^wrk"
  23351. },
  23352. "type": {
  23353. "type": "string"
  23354. },
  23355. "name": {
  23356. "type": "string"
  23357. },
  23358. "branch": {
  23359. "anyOf": [
  23360. {
  23361. "type": "string"
  23362. },
  23363. {
  23364. "type": "null"
  23365. }
  23366. ]
  23367. },
  23368. "directory": {
  23369. "anyOf": [
  23370. {
  23371. "type": "string"
  23372. },
  23373. {
  23374. "type": "null"
  23375. }
  23376. ]
  23377. },
  23378. "extra": {
  23379. "anyOf": [
  23380. {},
  23381. {
  23382. "type": "null"
  23383. }
  23384. ]
  23385. },
  23386. "projectID": {
  23387. "type": "string"
  23388. },
  23389. "timeUsed": {
  23390. "anyOf": [
  23391. {
  23392. "type": "number"
  23393. },
  23394. {
  23395. "type": "string",
  23396. "enum": ["NaN"]
  23397. },
  23398. {
  23399. "type": "string",
  23400. "enum": ["Infinity"]
  23401. },
  23402. {
  23403. "type": "string",
  23404. "enum": ["-Infinity"]
  23405. },
  23406. {
  23407. "type": "string",
  23408. "enum": ["Infinity", "-Infinity", "NaN"]
  23409. }
  23410. ]
  23411. }
  23412. },
  23413. "required": ["id", "type", "name", "projectID", "timeUsed"],
  23414. "additionalProperties": false
  23415. },
  23416. "WorkspaceCreateError": {
  23417. "type": "object",
  23418. "properties": {
  23419. "name": {
  23420. "type": "string",
  23421. "enum": ["WorkspaceCreateError"]
  23422. },
  23423. "data": {
  23424. "type": "object",
  23425. "properties": {
  23426. "message": {
  23427. "type": "string"
  23428. }
  23429. },
  23430. "required": ["message"],
  23431. "additionalProperties": false
  23432. }
  23433. },
  23434. "required": ["name", "data"],
  23435. "additionalProperties": false
  23436. },
  23437. "WorkspaceWarpError": {
  23438. "type": "object",
  23439. "properties": {
  23440. "name": {
  23441. "type": "string",
  23442. "enum": ["WorkspaceWarpError"]
  23443. },
  23444. "data": {
  23445. "type": "object",
  23446. "properties": {
  23447. "message": {
  23448. "type": "string"
  23449. }
  23450. },
  23451. "required": ["message"],
  23452. "additionalProperties": false
  23453. }
  23454. },
  23455. "required": ["name", "data"],
  23456. "additionalProperties": false
  23457. },
  23458. "UnauthorizedError": {
  23459. "type": "object",
  23460. "properties": {
  23461. "_tag": {
  23462. "type": "string",
  23463. "enum": ["UnauthorizedError"]
  23464. },
  23465. "message": {
  23466. "type": "string"
  23467. }
  23468. },
  23469. "required": ["_tag", "message"],
  23470. "additionalProperties": false
  23471. },
  23472. "SessionsResponse": {
  23473. "type": "object",
  23474. "properties": {
  23475. "data": {
  23476. "type": "array",
  23477. "items": {
  23478. "$ref": "#/components/schemas/SessionV2Info"
  23479. }
  23480. },
  23481. "cursor": {
  23482. "type": "object",
  23483. "properties": {
  23484. "previous": {
  23485. "type": "string"
  23486. },
  23487. "next": {
  23488. "type": "string"
  23489. }
  23490. },
  23491. "additionalProperties": false
  23492. }
  23493. },
  23494. "required": ["data", "cursor"],
  23495. "additionalProperties": false
  23496. },
  23497. "InvalidCursorError": {
  23498. "type": "object",
  23499. "properties": {
  23500. "_tag": {
  23501. "type": "string",
  23502. "enum": ["InvalidCursorError"]
  23503. },
  23504. "message": {
  23505. "type": "string"
  23506. }
  23507. },
  23508. "required": ["_tag", "message"],
  23509. "additionalProperties": false
  23510. },
  23511. "SessionActive": {
  23512. "type": "object",
  23513. "properties": {
  23514. "type": {
  23515. "type": "string",
  23516. "enum": ["running"]
  23517. }
  23518. },
  23519. "required": ["type"],
  23520. "additionalProperties": false
  23521. },
  23522. "SessionNotFoundError": {
  23523. "type": "object",
  23524. "properties": {
  23525. "_tag": {
  23526. "type": "string",
  23527. "enum": ["SessionNotFoundError"]
  23528. },
  23529. "sessionID": {
  23530. "type": "string"
  23531. },
  23532. "message": {
  23533. "type": "string"
  23534. }
  23535. },
  23536. "required": ["_tag", "sessionID", "message"],
  23537. "additionalProperties": false
  23538. },
  23539. "PromptInput": {
  23540. "type": "object",
  23541. "properties": {
  23542. "text": {
  23543. "type": "string"
  23544. },
  23545. "files": {
  23546. "type": "array",
  23547. "items": {
  23548. "$ref": "#/components/schemas/PromptInputFileAttachment"
  23549. }
  23550. },
  23551. "agents": {
  23552. "type": "array",
  23553. "items": {
  23554. "$ref": "#/components/schemas/PromptAgentAttachment"
  23555. }
  23556. }
  23557. },
  23558. "required": ["text"],
  23559. "additionalProperties": false
  23560. },
  23561. "ConflictError": {
  23562. "type": "object",
  23563. "properties": {
  23564. "_tag": {
  23565. "type": "string",
  23566. "enum": ["ConflictError"]
  23567. },
  23568. "message": {
  23569. "type": "string"
  23570. },
  23571. "resource": {
  23572. "type": "string"
  23573. }
  23574. },
  23575. "required": ["_tag", "message"],
  23576. "additionalProperties": false
  23577. },
  23578. "ServiceUnavailableError": {
  23579. "type": "object",
  23580. "properties": {
  23581. "_tag": {
  23582. "type": "string",
  23583. "enum": ["ServiceUnavailableError"]
  23584. },
  23585. "message": {
  23586. "type": "string"
  23587. },
  23588. "service": {
  23589. "type": "string"
  23590. }
  23591. },
  23592. "required": ["_tag", "message"],
  23593. "additionalProperties": false
  23594. },
  23595. "MessageNotFoundError": {
  23596. "type": "object",
  23597. "properties": {
  23598. "_tag": {
  23599. "type": "string",
  23600. "enum": ["MessageNotFoundError"]
  23601. },
  23602. "sessionID": {
  23603. "type": "string"
  23604. },
  23605. "messageID": {
  23606. "type": "string"
  23607. },
  23608. "message": {
  23609. "type": "string"
  23610. }
  23611. },
  23612. "required": ["_tag", "sessionID", "messageID", "message"],
  23613. "additionalProperties": false
  23614. },
  23615. "UnknownError1": {
  23616. "type": "object",
  23617. "properties": {
  23618. "_tag": {
  23619. "type": "string",
  23620. "enum": ["UnknownError"]
  23621. },
  23622. "message": {
  23623. "type": "string"
  23624. },
  23625. "ref": {
  23626. "type": "string"
  23627. }
  23628. },
  23629. "required": ["_tag", "message"],
  23630. "additionalProperties": false
  23631. },
  23632. "SessionDurableEvent": {
  23633. "oneOf": [
  23634. {
  23635. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  23636. },
  23637. {
  23638. "$ref": "#/components/schemas/SessionNextModelSwitched"
  23639. },
  23640. {
  23641. "$ref": "#/components/schemas/SessionNextMoved"
  23642. },
  23643. {
  23644. "$ref": "#/components/schemas/SessionNextPrompted"
  23645. },
  23646. {
  23647. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  23648. },
  23649. {
  23650. "$ref": "#/components/schemas/SessionNextContextUpdated"
  23651. },
  23652. {
  23653. "$ref": "#/components/schemas/SessionNextSynthetic"
  23654. },
  23655. {
  23656. "$ref": "#/components/schemas/SessionNextShellStarted"
  23657. },
  23658. {
  23659. "$ref": "#/components/schemas/SessionNextShellEnded"
  23660. },
  23661. {
  23662. "$ref": "#/components/schemas/SessionNextStepStarted"
  23663. },
  23664. {
  23665. "$ref": "#/components/schemas/SessionNextStepEnded"
  23666. },
  23667. {
  23668. "$ref": "#/components/schemas/SessionNextStepFailed"
  23669. },
  23670. {
  23671. "$ref": "#/components/schemas/SessionNextTextStarted"
  23672. },
  23673. {
  23674. "$ref": "#/components/schemas/SessionNextTextEnded"
  23675. },
  23676. {
  23677. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  23678. },
  23679. {
  23680. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  23681. },
  23682. {
  23683. "$ref": "#/components/schemas/SessionNextToolCalled"
  23684. },
  23685. {
  23686. "$ref": "#/components/schemas/SessionNextToolProgress"
  23687. },
  23688. {
  23689. "$ref": "#/components/schemas/SessionNextToolSuccess"
  23690. },
  23691. {
  23692. "$ref": "#/components/schemas/SessionNextToolFailed"
  23693. },
  23694. {
  23695. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  23696. },
  23697. {
  23698. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  23699. },
  23700. {
  23701. "$ref": "#/components/schemas/SessionNextRetried"
  23702. },
  23703. {
  23704. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  23705. },
  23706. {
  23707. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  23708. },
  23709. {
  23710. "$ref": "#/components/schemas/SessionNextRevertStaged"
  23711. },
  23712. {
  23713. "$ref": "#/components/schemas/SessionNextRevertCleared"
  23714. },
  23715. {
  23716. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  23717. }
  23718. ]
  23719. },
  23720. "SessionHistory": {
  23721. "type": "object",
  23722. "properties": {
  23723. "data": {
  23724. "type": "array",
  23725. "items": {
  23726. "$ref": "#/components/schemas/SessionDurableEvent"
  23727. }
  23728. },
  23729. "hasMore": {
  23730. "type": "boolean"
  23731. }
  23732. },
  23733. "required": ["data", "hasMore"],
  23734. "additionalProperties": false
  23735. },
  23736. "SessionDurableEventStream": {
  23737. "type": "string",
  23738. "contentSchema": {
  23739. "$ref": "#/components/schemas/SessionDurableEvent"
  23740. },
  23741. "contentMediaType": "application/json"
  23742. },
  23743. "SessionMessagesResponse": {
  23744. "type": "object",
  23745. "properties": {
  23746. "data": {
  23747. "type": "array",
  23748. "items": {
  23749. "$ref": "#/components/schemas/SessionMessage"
  23750. }
  23751. },
  23752. "cursor": {
  23753. "type": "object",
  23754. "properties": {
  23755. "previous": {
  23756. "type": "string"
  23757. },
  23758. "next": {
  23759. "type": "string"
  23760. }
  23761. },
  23762. "additionalProperties": false
  23763. }
  23764. },
  23765. "required": ["data", "cursor"],
  23766. "additionalProperties": false
  23767. },
  23768. "ProviderNotFoundError": {
  23769. "type": "object",
  23770. "properties": {
  23771. "_tag": {
  23772. "type": "string",
  23773. "enum": ["ProviderNotFoundError"]
  23774. },
  23775. "providerID": {
  23776. "type": "string"
  23777. },
  23778. "message": {
  23779. "type": "string"
  23780. }
  23781. },
  23782. "required": ["_tag", "providerID", "message"],
  23783. "additionalProperties": false
  23784. },
  23785. "OutputFormat1": {
  23786. "anyOf": [
  23787. {
  23788. "type": "object",
  23789. "properties": {
  23790. "type": {
  23791. "type": "string",
  23792. "enum": ["text"]
  23793. }
  23794. },
  23795. "required": ["type"],
  23796. "additionalProperties": false
  23797. },
  23798. {
  23799. "type": "object",
  23800. "properties": {
  23801. "type": {
  23802. "type": "string",
  23803. "enum": ["json_schema"]
  23804. },
  23805. "schema": {
  23806. "$ref": "#/components/schemas/JSONSchema"
  23807. },
  23808. "retryCount": {
  23809. "type": "integer",
  23810. "minimum": 0
  23811. }
  23812. },
  23813. "required": ["type", "schema"],
  23814. "additionalProperties": false
  23815. }
  23816. ]
  23817. },
  23818. "session.status": {
  23819. "type": "object",
  23820. "properties": {
  23821. "id": {
  23822. "type": "string",
  23823. "pattern": "^evt_"
  23824. },
  23825. "metadata": {
  23826. "type": "object"
  23827. },
  23828. "type": {
  23829. "type": "string",
  23830. "enum": ["session.status"]
  23831. },
  23832. "durable": {
  23833. "type": "object",
  23834. "properties": {
  23835. "aggregateID": {
  23836. "type": "string"
  23837. },
  23838. "seq": {
  23839. "type": "integer"
  23840. },
  23841. "version": {
  23842. "type": "integer"
  23843. }
  23844. },
  23845. "required": ["aggregateID", "seq", "version"],
  23846. "additionalProperties": false
  23847. },
  23848. "location": {
  23849. "$ref": "#/components/schemas/LocationRef"
  23850. },
  23851. "data": {
  23852. "type": "object",
  23853. "properties": {
  23854. "sessionID": {
  23855. "type": "string",
  23856. "pattern": "^ses"
  23857. },
  23858. "status": {
  23859. "$ref": "#/components/schemas/SessionStatus"
  23860. }
  23861. },
  23862. "required": ["sessionID", "status"],
  23863. "additionalProperties": false
  23864. }
  23865. },
  23866. "required": ["id", "type", "data"],
  23867. "additionalProperties": false
  23868. },
  23869. "question.replied": {
  23870. "type": "object",
  23871. "properties": {
  23872. "id": {
  23873. "type": "string",
  23874. "pattern": "^evt_"
  23875. },
  23876. "metadata": {
  23877. "type": "object"
  23878. },
  23879. "type": {
  23880. "type": "string",
  23881. "enum": ["question.replied"]
  23882. },
  23883. "durable": {
  23884. "type": "object",
  23885. "properties": {
  23886. "aggregateID": {
  23887. "type": "string"
  23888. },
  23889. "seq": {
  23890. "type": "integer"
  23891. },
  23892. "version": {
  23893. "type": "integer"
  23894. }
  23895. },
  23896. "required": ["aggregateID", "seq", "version"],
  23897. "additionalProperties": false
  23898. },
  23899. "location": {
  23900. "$ref": "#/components/schemas/LocationRef"
  23901. },
  23902. "data": {
  23903. "type": "object",
  23904. "properties": {
  23905. "sessionID": {
  23906. "type": "string",
  23907. "pattern": "^ses"
  23908. },
  23909. "requestID": {
  23910. "type": "string",
  23911. "pattern": "^que"
  23912. },
  23913. "answers": {
  23914. "type": "array",
  23915. "items": {
  23916. "$ref": "#/components/schemas/QuestionAnswer"
  23917. }
  23918. }
  23919. },
  23920. "required": ["sessionID", "requestID", "answers"],
  23921. "additionalProperties": false
  23922. }
  23923. },
  23924. "required": ["id", "type", "data"],
  23925. "additionalProperties": false
  23926. },
  23927. "question.rejected": {
  23928. "type": "object",
  23929. "properties": {
  23930. "id": {
  23931. "type": "string",
  23932. "pattern": "^evt_"
  23933. },
  23934. "metadata": {
  23935. "type": "object"
  23936. },
  23937. "type": {
  23938. "type": "string",
  23939. "enum": ["question.rejected"]
  23940. },
  23941. "durable": {
  23942. "type": "object",
  23943. "properties": {
  23944. "aggregateID": {
  23945. "type": "string"
  23946. },
  23947. "seq": {
  23948. "type": "integer"
  23949. },
  23950. "version": {
  23951. "type": "integer"
  23952. }
  23953. },
  23954. "required": ["aggregateID", "seq", "version"],
  23955. "additionalProperties": false
  23956. },
  23957. "location": {
  23958. "$ref": "#/components/schemas/LocationRef"
  23959. },
  23960. "data": {
  23961. "type": "object",
  23962. "properties": {
  23963. "sessionID": {
  23964. "type": "string",
  23965. "pattern": "^ses"
  23966. },
  23967. "requestID": {
  23968. "type": "string",
  23969. "pattern": "^que"
  23970. }
  23971. },
  23972. "required": ["sessionID", "requestID"],
  23973. "additionalProperties": false
  23974. }
  23975. },
  23976. "required": ["id", "type", "data"],
  23977. "additionalProperties": false
  23978. },
  23979. "V2Event": {
  23980. "anyOf": [
  23981. {
  23982. "$ref": "#/components/schemas/Models-devRefreshed"
  23983. },
  23984. {
  23985. "$ref": "#/components/schemas/IntegrationUpdated"
  23986. },
  23987. {
  23988. "$ref": "#/components/schemas/IntegrationConnectionUpdated"
  23989. },
  23990. {
  23991. "$ref": "#/components/schemas/CatalogUpdated"
  23992. },
  23993. {
  23994. "$ref": "#/components/schemas/SessionCreated"
  23995. },
  23996. {
  23997. "$ref": "#/components/schemas/SessionUpdated"
  23998. },
  23999. {
  24000. "$ref": "#/components/schemas/SessionDeleted"
  24001. },
  24002. {
  24003. "$ref": "#/components/schemas/MessageUpdated"
  24004. },
  24005. {
  24006. "$ref": "#/components/schemas/MessageRemoved"
  24007. },
  24008. {
  24009. "$ref": "#/components/schemas/MessagePartUpdated"
  24010. },
  24011. {
  24012. "$ref": "#/components/schemas/MessagePartRemoved"
  24013. },
  24014. {
  24015. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  24016. },
  24017. {
  24018. "$ref": "#/components/schemas/SessionNextModelSwitched"
  24019. },
  24020. {
  24021. "$ref": "#/components/schemas/SessionNextMoved"
  24022. },
  24023. {
  24024. "$ref": "#/components/schemas/SessionNextPrompted"
  24025. },
  24026. {
  24027. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  24028. },
  24029. {
  24030. "$ref": "#/components/schemas/SessionNextContextUpdated"
  24031. },
  24032. {
  24033. "$ref": "#/components/schemas/SessionNextSynthetic"
  24034. },
  24035. {
  24036. "$ref": "#/components/schemas/SessionNextShellStarted"
  24037. },
  24038. {
  24039. "$ref": "#/components/schemas/SessionNextShellEnded"
  24040. },
  24041. {
  24042. "$ref": "#/components/schemas/SessionNextStepStarted"
  24043. },
  24044. {
  24045. "$ref": "#/components/schemas/SessionNextStepEnded"
  24046. },
  24047. {
  24048. "$ref": "#/components/schemas/SessionNextStepFailed"
  24049. },
  24050. {
  24051. "$ref": "#/components/schemas/SessionNextTextStarted"
  24052. },
  24053. {
  24054. "$ref": "#/components/schemas/SessionNextTextDelta"
  24055. },
  24056. {
  24057. "$ref": "#/components/schemas/SessionNextTextEnded"
  24058. },
  24059. {
  24060. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  24061. },
  24062. {
  24063. "$ref": "#/components/schemas/SessionNextReasoningDelta"
  24064. },
  24065. {
  24066. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  24067. },
  24068. {
  24069. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  24070. },
  24071. {
  24072. "$ref": "#/components/schemas/SessionNextToolInputDelta"
  24073. },
  24074. {
  24075. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  24076. },
  24077. {
  24078. "$ref": "#/components/schemas/SessionNextToolCalled"
  24079. },
  24080. {
  24081. "$ref": "#/components/schemas/SessionNextToolProgress"
  24082. },
  24083. {
  24084. "$ref": "#/components/schemas/SessionNextToolSuccess"
  24085. },
  24086. {
  24087. "$ref": "#/components/schemas/SessionNextToolFailed"
  24088. },
  24089. {
  24090. "$ref": "#/components/schemas/SessionNextRetried"
  24091. },
  24092. {
  24093. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  24094. },
  24095. {
  24096. "$ref": "#/components/schemas/SessionNextCompactionDelta"
  24097. },
  24098. {
  24099. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  24100. },
  24101. {
  24102. "$ref": "#/components/schemas/SessionNextRevertStaged"
  24103. },
  24104. {
  24105. "$ref": "#/components/schemas/SessionNextRevertCleared"
  24106. },
  24107. {
  24108. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  24109. },
  24110. {
  24111. "$ref": "#/components/schemas/MessagePartDelta"
  24112. },
  24113. {
  24114. "$ref": "#/components/schemas/SessionDiff"
  24115. },
  24116. {
  24117. "$ref": "#/components/schemas/SessionError"
  24118. },
  24119. {
  24120. "$ref": "#/components/schemas/InstallationUpdated"
  24121. },
  24122. {
  24123. "$ref": "#/components/schemas/InstallationUpdate-available"
  24124. },
  24125. {
  24126. "$ref": "#/components/schemas/FileEdited"
  24127. },
  24128. {
  24129. "$ref": "#/components/schemas/ReferenceUpdated"
  24130. },
  24131. {
  24132. "$ref": "#/components/schemas/PermissionV2Asked"
  24133. },
  24134. {
  24135. "$ref": "#/components/schemas/PermissionV2Replied"
  24136. },
  24137. {
  24138. "$ref": "#/components/schemas/PluginAdded"
  24139. },
  24140. {
  24141. "$ref": "#/components/schemas/ProjectDirectoriesUpdated"
  24142. },
  24143. {
  24144. "$ref": "#/components/schemas/FileWatcherUpdated"
  24145. },
  24146. {
  24147. "$ref": "#/components/schemas/PtyCreated"
  24148. },
  24149. {
  24150. "$ref": "#/components/schemas/PtyUpdated"
  24151. },
  24152. {
  24153. "$ref": "#/components/schemas/PtyExited"
  24154. },
  24155. {
  24156. "$ref": "#/components/schemas/PtyDeleted"
  24157. },
  24158. {
  24159. "$ref": "#/components/schemas/QuestionV2Asked"
  24160. },
  24161. {
  24162. "$ref": "#/components/schemas/QuestionV2Replied"
  24163. },
  24164. {
  24165. "$ref": "#/components/schemas/QuestionV2Rejected"
  24166. },
  24167. {
  24168. "$ref": "#/components/schemas/TodoUpdated"
  24169. },
  24170. {
  24171. "$ref": "#/components/schemas/LspUpdated"
  24172. },
  24173. {
  24174. "$ref": "#/components/schemas/PermissionAsked"
  24175. },
  24176. {
  24177. "$ref": "#/components/schemas/PermissionReplied"
  24178. },
  24179. {
  24180. "$ref": "#/components/schemas/TuiPromptAppend"
  24181. },
  24182. {
  24183. "$ref": "#/components/schemas/TuiCommandExecute"
  24184. },
  24185. {
  24186. "$ref": "#/components/schemas/TuiToastShow"
  24187. },
  24188. {
  24189. "$ref": "#/components/schemas/TuiSessionSelect"
  24190. },
  24191. {
  24192. "$ref": "#/components/schemas/McpToolsChanged"
  24193. },
  24194. {
  24195. "$ref": "#/components/schemas/McpBrowserOpenFailed"
  24196. },
  24197. {
  24198. "$ref": "#/components/schemas/CommandExecuted"
  24199. },
  24200. {
  24201. "$ref": "#/components/schemas/ProjectUpdated"
  24202. },
  24203. {
  24204. "$ref": "#/components/schemas/session.status"
  24205. },
  24206. {
  24207. "$ref": "#/components/schemas/SessionIdle"
  24208. },
  24209. {
  24210. "$ref": "#/components/schemas/QuestionAsked"
  24211. },
  24212. {
  24213. "$ref": "#/components/schemas/question.replied"
  24214. },
  24215. {
  24216. "$ref": "#/components/schemas/question.rejected"
  24217. },
  24218. {
  24219. "$ref": "#/components/schemas/SessionCompacted"
  24220. },
  24221. {
  24222. "$ref": "#/components/schemas/VcsBranchUpdated"
  24223. },
  24224. {
  24225. "$ref": "#/components/schemas/WorkspaceReady"
  24226. },
  24227. {
  24228. "$ref": "#/components/schemas/WorkspaceFailed"
  24229. },
  24230. {
  24231. "$ref": "#/components/schemas/WorkspaceStatus"
  24232. },
  24233. {
  24234. "$ref": "#/components/schemas/WorktreeReady"
  24235. },
  24236. {
  24237. "$ref": "#/components/schemas/WorktreeFailed"
  24238. },
  24239. {
  24240. "$ref": "#/components/schemas/ServerConnected"
  24241. },
  24242. {
  24243. "$ref": "#/components/schemas/GlobalDisposed"
  24244. }
  24245. ]
  24246. },
  24247. "V2EventStream": {
  24248. "type": "string",
  24249. "contentSchema": {
  24250. "$ref": "#/components/schemas/V2Event"
  24251. },
  24252. "contentMediaType": "application/json"
  24253. },
  24254. "ForbiddenError": {
  24255. "type": "object",
  24256. "properties": {
  24257. "_tag": {
  24258. "type": "string",
  24259. "enum": ["ForbiddenError"]
  24260. },
  24261. "message": {
  24262. "type": "string"
  24263. }
  24264. },
  24265. "required": ["_tag", "message"],
  24266. "additionalProperties": false
  24267. },
  24268. "ProjectCopyError": {
  24269. "type": "object",
  24270. "properties": {
  24271. "name": {
  24272. "type": "string",
  24273. "enum": ["ProjectCopyError"]
  24274. },
  24275. "data": {
  24276. "type": "object",
  24277. "properties": {
  24278. "message": {
  24279. "type": "string"
  24280. },
  24281. "forceRequired": {
  24282. "type": "boolean"
  24283. }
  24284. },
  24285. "required": ["message"],
  24286. "additionalProperties": false
  24287. }
  24288. },
  24289. "required": ["name", "data"],
  24290. "additionalProperties": false
  24291. },
  24292. "effect_HttpApiError_Forbidden": {
  24293. "type": "object",
  24294. "properties": {
  24295. "_tag": {
  24296. "type": "string",
  24297. "enum": ["Forbidden"]
  24298. }
  24299. },
  24300. "required": ["_tag"],
  24301. "additionalProperties": false
  24302. },
  24303. "Event.tui.prompt.append": {
  24304. "type": "object",
  24305. "properties": {
  24306. "id": {
  24307. "type": "string",
  24308. "pattern": "^evt_"
  24309. },
  24310. "type": {
  24311. "type": "string",
  24312. "enum": ["tui.prompt.append"]
  24313. },
  24314. "properties": {
  24315. "type": "object",
  24316. "properties": {
  24317. "text": {
  24318. "type": "string"
  24319. }
  24320. },
  24321. "required": ["text"],
  24322. "additionalProperties": false
  24323. }
  24324. },
  24325. "required": ["id", "type", "properties"],
  24326. "additionalProperties": false
  24327. },
  24328. "Event.tui.command.execute": {
  24329. "type": "object",
  24330. "properties": {
  24331. "id": {
  24332. "type": "string",
  24333. "pattern": "^evt_"
  24334. },
  24335. "type": {
  24336. "type": "string",
  24337. "enum": ["tui.command.execute"]
  24338. },
  24339. "properties": {
  24340. "type": "object",
  24341. "properties": {
  24342. "command": {
  24343. "anyOf": [
  24344. {
  24345. "type": "string",
  24346. "enum": [
  24347. "session.list",
  24348. "session.new",
  24349. "session.share",
  24350. "session.interrupt",
  24351. "session.compact",
  24352. "session.page.up",
  24353. "session.page.down",
  24354. "session.line.up",
  24355. "session.line.down",
  24356. "session.half.page.up",
  24357. "session.half.page.down",
  24358. "session.first",
  24359. "session.last",
  24360. "prompt.clear",
  24361. "prompt.submit",
  24362. "agent.cycle"
  24363. ]
  24364. },
  24365. {
  24366. "type": "string"
  24367. }
  24368. ]
  24369. }
  24370. },
  24371. "required": ["command"],
  24372. "additionalProperties": false
  24373. }
  24374. },
  24375. "required": ["id", "type", "properties"],
  24376. "additionalProperties": false
  24377. },
  24378. "Event.tui.toast.show": {
  24379. "type": "object",
  24380. "properties": {
  24381. "id": {
  24382. "type": "string",
  24383. "pattern": "^evt_"
  24384. },
  24385. "type": {
  24386. "type": "string",
  24387. "enum": ["tui.toast.show"]
  24388. },
  24389. "properties": {
  24390. "type": "object",
  24391. "properties": {
  24392. "title": {
  24393. "type": "string"
  24394. },
  24395. "message": {
  24396. "type": "string"
  24397. },
  24398. "variant": {
  24399. "type": "string",
  24400. "enum": ["info", "success", "warning", "error"]
  24401. },
  24402. "duration": {
  24403. "type": "integer",
  24404. "exclusiveMinimum": 0
  24405. }
  24406. },
  24407. "required": ["message", "variant"],
  24408. "additionalProperties": false
  24409. }
  24410. },
  24411. "required": ["id", "type", "properties"],
  24412. "additionalProperties": false
  24413. },
  24414. "Event.tui.session.select": {
  24415. "type": "object",
  24416. "properties": {
  24417. "id": {
  24418. "type": "string",
  24419. "pattern": "^evt_"
  24420. },
  24421. "type": {
  24422. "type": "string",
  24423. "enum": ["tui.session.select"]
  24424. },
  24425. "properties": {
  24426. "type": "object",
  24427. "properties": {
  24428. "sessionID": {
  24429. "type": "string",
  24430. "pattern": "^ses",
  24431. "description": "Session ID to navigate to"
  24432. }
  24433. },
  24434. "required": ["sessionID"],
  24435. "additionalProperties": false
  24436. }
  24437. },
  24438. "required": ["id", "type", "properties"],
  24439. "additionalProperties": false
  24440. },
  24441. "CredentialValue": {
  24442. "anyOf": [
  24443. {
  24444. "$ref": "#/components/schemas/CredentialOAuth"
  24445. },
  24446. {
  24447. "$ref": "#/components/schemas/CredentialKey"
  24448. }
  24449. ]
  24450. },
  24451. "IntegrationInputs": {
  24452. "type": "object",
  24453. "additionalProperties": {
  24454. "type": "string"
  24455. }
  24456. },
  24457. "IntegrationMethod": {
  24458. "anyOf": [
  24459. {
  24460. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  24461. },
  24462. {
  24463. "$ref": "#/components/schemas/IntegrationKeyMethod"
  24464. },
  24465. {
  24466. "$ref": "#/components/schemas/IntegrationEnvMethod"
  24467. }
  24468. ]
  24469. },
  24470. "IntegrationRef": {
  24471. "type": "object",
  24472. "properties": {
  24473. "id": {
  24474. "type": "string"
  24475. },
  24476. "name": {
  24477. "type": "string"
  24478. }
  24479. },
  24480. "required": ["id", "name"],
  24481. "additionalProperties": false
  24482. },
  24483. "SkillV2Source": {
  24484. "anyOf": [
  24485. {
  24486. "$ref": "#/components/schemas/SkillV2DirectorySource"
  24487. },
  24488. {
  24489. "$ref": "#/components/schemas/SkillV2UrlSource"
  24490. },
  24491. {
  24492. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  24493. }
  24494. ]
  24495. },
  24496. "MoveSessionDestination": {
  24497. "type": "object",
  24498. "properties": {
  24499. "directory": {
  24500. "type": "string"
  24501. }
  24502. },
  24503. "required": ["directory"],
  24504. "additionalProperties": false
  24505. },
  24506. "ModelRef": {
  24507. "type": "object",
  24508. "properties": {
  24509. "id": {
  24510. "type": "string"
  24511. },
  24512. "providerID": {
  24513. "type": "string"
  24514. },
  24515. "variant": {
  24516. "type": "string"
  24517. }
  24518. },
  24519. "required": ["id", "providerID"],
  24520. "additionalProperties": false
  24521. },
  24522. "LocationRef": {
  24523. "type": "object",
  24524. "properties": {
  24525. "directory": {
  24526. "type": "string"
  24527. },
  24528. "workspaceID": {
  24529. "type": "string",
  24530. "pattern": "^wrk"
  24531. }
  24532. },
  24533. "required": ["directory"],
  24534. "additionalProperties": false
  24535. },
  24536. "PromptSource": {
  24537. "type": "object",
  24538. "properties": {
  24539. "start": {
  24540. "type": "number"
  24541. },
  24542. "end": {
  24543. "type": "number"
  24544. },
  24545. "text": {
  24546. "type": "string"
  24547. }
  24548. },
  24549. "required": ["start", "end", "text"],
  24550. "additionalProperties": false
  24551. },
  24552. "PromptFileAttachment": {
  24553. "type": "object",
  24554. "properties": {
  24555. "uri": {
  24556. "type": "string"
  24557. },
  24558. "mime": {
  24559. "type": "string"
  24560. },
  24561. "name": {
  24562. "type": "string"
  24563. },
  24564. "description": {
  24565. "type": "string"
  24566. },
  24567. "source": {
  24568. "$ref": "#/components/schemas/PromptSource"
  24569. }
  24570. },
  24571. "required": ["uri", "mime"],
  24572. "additionalProperties": false
  24573. },
  24574. "PromptAgentAttachment": {
  24575. "type": "object",
  24576. "properties": {
  24577. "name": {
  24578. "type": "string"
  24579. },
  24580. "source": {
  24581. "$ref": "#/components/schemas/PromptSource"
  24582. }
  24583. },
  24584. "required": ["name"],
  24585. "additionalProperties": false
  24586. },
  24587. "SessionErrorUnknown": {
  24588. "type": "object",
  24589. "properties": {
  24590. "type": {
  24591. "type": "string",
  24592. "enum": ["unknown"]
  24593. },
  24594. "message": {
  24595. "type": "string"
  24596. }
  24597. },
  24598. "required": ["type", "message"],
  24599. "additionalProperties": false
  24600. },
  24601. "LLMProviderMetadata": {
  24602. "type": "object",
  24603. "additionalProperties": {
  24604. "type": "object"
  24605. }
  24606. },
  24607. "ToolTextContent": {
  24608. "type": "object",
  24609. "properties": {
  24610. "type": {
  24611. "type": "string",
  24612. "enum": ["text"]
  24613. },
  24614. "text": {
  24615. "type": "string"
  24616. }
  24617. },
  24618. "required": ["type", "text"],
  24619. "additionalProperties": false
  24620. },
  24621. "ToolFileContent": {
  24622. "type": "object",
  24623. "properties": {
  24624. "type": {
  24625. "type": "string",
  24626. "enum": ["file"]
  24627. },
  24628. "uri": {
  24629. "type": "string"
  24630. },
  24631. "mime": {
  24632. "type": "string"
  24633. },
  24634. "name": {
  24635. "type": "string"
  24636. }
  24637. },
  24638. "required": ["type", "uri", "mime"],
  24639. "additionalProperties": false
  24640. },
  24641. "LLMToolContent": {
  24642. "anyOf": [
  24643. {
  24644. "$ref": "#/components/schemas/ToolTextContent"
  24645. },
  24646. {
  24647. "$ref": "#/components/schemas/ToolFileContent"
  24648. }
  24649. ]
  24650. },
  24651. "SessionNextRetry_error": {
  24652. "type": "object",
  24653. "properties": {
  24654. "message": {
  24655. "type": "string"
  24656. },
  24657. "statusCode": {
  24658. "type": "number"
  24659. },
  24660. "isRetryable": {
  24661. "type": "boolean"
  24662. },
  24663. "responseHeaders": {
  24664. "type": "object",
  24665. "additionalProperties": {
  24666. "type": "string"
  24667. }
  24668. },
  24669. "responseBody": {
  24670. "type": "string"
  24671. },
  24672. "metadata": {
  24673. "type": "object",
  24674. "additionalProperties": {
  24675. "type": "string"
  24676. }
  24677. }
  24678. },
  24679. "required": ["message", "isRetryable"],
  24680. "additionalProperties": false
  24681. },
  24682. "FileDiff": {
  24683. "type": "object",
  24684. "properties": {
  24685. "path": {
  24686. "type": "string"
  24687. },
  24688. "status": {
  24689. "type": "string",
  24690. "enum": ["added", "modified", "deleted"]
  24691. },
  24692. "additions": {
  24693. "type": "integer",
  24694. "minimum": 0
  24695. },
  24696. "deletions": {
  24697. "type": "integer",
  24698. "minimum": 0
  24699. },
  24700. "patch": {
  24701. "type": "string"
  24702. }
  24703. },
  24704. "required": ["path", "status", "additions", "deletions", "patch"],
  24705. "additionalProperties": false
  24706. },
  24707. "RevertState": {
  24708. "type": "object",
  24709. "properties": {
  24710. "messageID": {
  24711. "type": "string",
  24712. "pattern": "^msg_"
  24713. },
  24714. "partID": {
  24715. "type": "string"
  24716. },
  24717. "snapshot": {
  24718. "type": "string"
  24719. },
  24720. "diff": {
  24721. "type": "string"
  24722. },
  24723. "files": {
  24724. "type": "array",
  24725. "items": {
  24726. "$ref": "#/components/schemas/FileDiff"
  24727. }
  24728. }
  24729. },
  24730. "required": ["messageID"],
  24731. "additionalProperties": false
  24732. },
  24733. "PermissionV2Source": {
  24734. "type": "object",
  24735. "properties": {
  24736. "type": {
  24737. "type": "string",
  24738. "enum": ["tool"]
  24739. },
  24740. "messageID": {
  24741. "type": "string"
  24742. },
  24743. "callID": {
  24744. "type": "string"
  24745. }
  24746. },
  24747. "required": ["type", "messageID", "callID"],
  24748. "additionalProperties": false
  24749. },
  24750. "PermissionV2Reply": {
  24751. "type": "string",
  24752. "enum": ["once", "always", "reject"]
  24753. },
  24754. "QuestionV2Option": {
  24755. "type": "object",
  24756. "properties": {
  24757. "label": {
  24758. "type": "string",
  24759. "description": "Display text (1-5 words, concise)"
  24760. },
  24761. "description": {
  24762. "type": "string",
  24763. "description": "Explanation of choice"
  24764. }
  24765. },
  24766. "required": ["label", "description"],
  24767. "additionalProperties": false
  24768. },
  24769. "QuestionV2Info": {
  24770. "type": "object",
  24771. "properties": {
  24772. "question": {
  24773. "type": "string",
  24774. "description": "Complete question"
  24775. },
  24776. "header": {
  24777. "type": "string",
  24778. "description": "Very short label (max 30 chars)"
  24779. },
  24780. "options": {
  24781. "type": "array",
  24782. "items": {
  24783. "$ref": "#/components/schemas/QuestionV2Option"
  24784. },
  24785. "description": "Available choices"
  24786. },
  24787. "multiple": {
  24788. "type": "boolean"
  24789. },
  24790. "custom": {
  24791. "type": "boolean"
  24792. }
  24793. },
  24794. "required": ["question", "header", "options"],
  24795. "additionalProperties": false
  24796. },
  24797. "QuestionV2Tool": {
  24798. "type": "object",
  24799. "properties": {
  24800. "messageID": {
  24801. "type": "string"
  24802. },
  24803. "callID": {
  24804. "type": "string"
  24805. }
  24806. },
  24807. "required": ["messageID", "callID"],
  24808. "additionalProperties": false
  24809. },
  24810. "QuestionV2Answer": {
  24811. "type": "array",
  24812. "items": {
  24813. "type": "string"
  24814. }
  24815. },
  24816. "ProjectVcs": {
  24817. "type": "string",
  24818. "enum": ["git"]
  24819. },
  24820. "ProjectIcon": {
  24821. "type": "object",
  24822. "properties": {
  24823. "url": {
  24824. "type": "string"
  24825. },
  24826. "override": {
  24827. "type": "string"
  24828. },
  24829. "color": {
  24830. "type": "string"
  24831. }
  24832. },
  24833. "additionalProperties": false
  24834. },
  24835. "ProjectCommands": {
  24836. "type": "object",
  24837. "properties": {
  24838. "start": {
  24839. "type": "string",
  24840. "description": "Startup script to run when creating a new workspace (worktree)"
  24841. }
  24842. },
  24843. "additionalProperties": false
  24844. },
  24845. "ProjectTime": {
  24846. "type": "object",
  24847. "properties": {
  24848. "created": {
  24849. "type": "integer",
  24850. "minimum": 0
  24851. },
  24852. "updated": {
  24853. "type": "integer",
  24854. "minimum": 0
  24855. },
  24856. "initialized": {
  24857. "type": "integer",
  24858. "minimum": 0
  24859. }
  24860. },
  24861. "required": ["created", "updated"],
  24862. "additionalProperties": false
  24863. },
  24864. "EventServerInstanceDisposed": {
  24865. "type": "object",
  24866. "properties": {
  24867. "id": {
  24868. "type": "string"
  24869. },
  24870. "type": {
  24871. "type": "string",
  24872. "enum": ["server.instance.disposed"]
  24873. },
  24874. "properties": {
  24875. "type": "object",
  24876. "properties": {
  24877. "directory": {
  24878. "type": "string"
  24879. }
  24880. },
  24881. "required": ["directory"],
  24882. "additionalProperties": false
  24883. }
  24884. },
  24885. "required": ["id", "type", "properties"],
  24886. "additionalProperties": false
  24887. },
  24888. "SyncEventSessionCreated": {
  24889. "type": "object",
  24890. "properties": {
  24891. "type": {
  24892. "type": "string",
  24893. "enum": ["sync"]
  24894. },
  24895. "id": {
  24896. "type": "string",
  24897. "pattern": "^evt_"
  24898. },
  24899. "syncEvent": {
  24900. "type": "object",
  24901. "properties": {
  24902. "type": {
  24903. "type": "string",
  24904. "enum": ["session.created.1"]
  24905. },
  24906. "id": {
  24907. "type": "string",
  24908. "pattern": "^evt_"
  24909. },
  24910. "seq": {
  24911. "type": "number"
  24912. },
  24913. "aggregateID": {
  24914. "type": "string"
  24915. },
  24916. "data": {
  24917. "type": "object",
  24918. "properties": {
  24919. "sessionID": {
  24920. "type": "string",
  24921. "pattern": "^ses"
  24922. },
  24923. "info": {
  24924. "$ref": "#/components/schemas/Session"
  24925. }
  24926. },
  24927. "required": ["sessionID", "info"],
  24928. "additionalProperties": false
  24929. }
  24930. },
  24931. "required": ["type", "id", "seq", "aggregateID", "data"],
  24932. "additionalProperties": false
  24933. }
  24934. },
  24935. "required": ["type", "id", "syncEvent"],
  24936. "additionalProperties": false
  24937. },
  24938. "SyncEventSessionUpdated": {
  24939. "type": "object",
  24940. "properties": {
  24941. "type": {
  24942. "type": "string",
  24943. "enum": ["sync"]
  24944. },
  24945. "id": {
  24946. "type": "string",
  24947. "pattern": "^evt_"
  24948. },
  24949. "syncEvent": {
  24950. "type": "object",
  24951. "properties": {
  24952. "type": {
  24953. "type": "string",
  24954. "enum": ["session.updated.1"]
  24955. },
  24956. "id": {
  24957. "type": "string",
  24958. "pattern": "^evt_"
  24959. },
  24960. "seq": {
  24961. "type": "number"
  24962. },
  24963. "aggregateID": {
  24964. "type": "string"
  24965. },
  24966. "data": {
  24967. "type": "object",
  24968. "properties": {
  24969. "sessionID": {
  24970. "type": "string",
  24971. "pattern": "^ses"
  24972. },
  24973. "info": {
  24974. "$ref": "#/components/schemas/Session"
  24975. }
  24976. },
  24977. "required": ["sessionID", "info"],
  24978. "additionalProperties": false
  24979. }
  24980. },
  24981. "required": ["type", "id", "seq", "aggregateID", "data"],
  24982. "additionalProperties": false
  24983. }
  24984. },
  24985. "required": ["type", "id", "syncEvent"],
  24986. "additionalProperties": false
  24987. },
  24988. "SyncEventSessionDeleted": {
  24989. "type": "object",
  24990. "properties": {
  24991. "type": {
  24992. "type": "string",
  24993. "enum": ["sync"]
  24994. },
  24995. "id": {
  24996. "type": "string",
  24997. "pattern": "^evt_"
  24998. },
  24999. "syncEvent": {
  25000. "type": "object",
  25001. "properties": {
  25002. "type": {
  25003. "type": "string",
  25004. "enum": ["session.deleted.1"]
  25005. },
  25006. "id": {
  25007. "type": "string",
  25008. "pattern": "^evt_"
  25009. },
  25010. "seq": {
  25011. "type": "number"
  25012. },
  25013. "aggregateID": {
  25014. "type": "string"
  25015. },
  25016. "data": {
  25017. "type": "object",
  25018. "properties": {
  25019. "sessionID": {
  25020. "type": "string",
  25021. "pattern": "^ses"
  25022. },
  25023. "info": {
  25024. "$ref": "#/components/schemas/Session"
  25025. }
  25026. },
  25027. "required": ["sessionID", "info"],
  25028. "additionalProperties": false
  25029. }
  25030. },
  25031. "required": ["type", "id", "seq", "aggregateID", "data"],
  25032. "additionalProperties": false
  25033. }
  25034. },
  25035. "required": ["type", "id", "syncEvent"],
  25036. "additionalProperties": false
  25037. },
  25038. "SyncEventMessageUpdated": {
  25039. "type": "object",
  25040. "properties": {
  25041. "type": {
  25042. "type": "string",
  25043. "enum": ["sync"]
  25044. },
  25045. "id": {
  25046. "type": "string",
  25047. "pattern": "^evt_"
  25048. },
  25049. "syncEvent": {
  25050. "type": "object",
  25051. "properties": {
  25052. "type": {
  25053. "type": "string",
  25054. "enum": ["message.updated.1"]
  25055. },
  25056. "id": {
  25057. "type": "string",
  25058. "pattern": "^evt_"
  25059. },
  25060. "seq": {
  25061. "type": "number"
  25062. },
  25063. "aggregateID": {
  25064. "type": "string"
  25065. },
  25066. "data": {
  25067. "type": "object",
  25068. "properties": {
  25069. "sessionID": {
  25070. "type": "string",
  25071. "pattern": "^ses"
  25072. },
  25073. "info": {
  25074. "$ref": "#/components/schemas/Message"
  25075. }
  25076. },
  25077. "required": ["sessionID", "info"],
  25078. "additionalProperties": false
  25079. }
  25080. },
  25081. "required": ["type", "id", "seq", "aggregateID", "data"],
  25082. "additionalProperties": false
  25083. }
  25084. },
  25085. "required": ["type", "id", "syncEvent"],
  25086. "additionalProperties": false
  25087. },
  25088. "SyncEventMessageRemoved": {
  25089. "type": "object",
  25090. "properties": {
  25091. "type": {
  25092. "type": "string",
  25093. "enum": ["sync"]
  25094. },
  25095. "id": {
  25096. "type": "string",
  25097. "pattern": "^evt_"
  25098. },
  25099. "syncEvent": {
  25100. "type": "object",
  25101. "properties": {
  25102. "type": {
  25103. "type": "string",
  25104. "enum": ["message.removed.1"]
  25105. },
  25106. "id": {
  25107. "type": "string",
  25108. "pattern": "^evt_"
  25109. },
  25110. "seq": {
  25111. "type": "number"
  25112. },
  25113. "aggregateID": {
  25114. "type": "string"
  25115. },
  25116. "data": {
  25117. "type": "object",
  25118. "properties": {
  25119. "sessionID": {
  25120. "type": "string",
  25121. "pattern": "^ses"
  25122. },
  25123. "messageID": {
  25124. "type": "string",
  25125. "pattern": "^msg"
  25126. }
  25127. },
  25128. "required": ["sessionID", "messageID"],
  25129. "additionalProperties": false
  25130. }
  25131. },
  25132. "required": ["type", "id", "seq", "aggregateID", "data"],
  25133. "additionalProperties": false
  25134. }
  25135. },
  25136. "required": ["type", "id", "syncEvent"],
  25137. "additionalProperties": false
  25138. },
  25139. "SyncEventMessagePartUpdated": {
  25140. "type": "object",
  25141. "properties": {
  25142. "type": {
  25143. "type": "string",
  25144. "enum": ["sync"]
  25145. },
  25146. "id": {
  25147. "type": "string",
  25148. "pattern": "^evt_"
  25149. },
  25150. "syncEvent": {
  25151. "type": "object",
  25152. "properties": {
  25153. "type": {
  25154. "type": "string",
  25155. "enum": ["message.part.updated.1"]
  25156. },
  25157. "id": {
  25158. "type": "string",
  25159. "pattern": "^evt_"
  25160. },
  25161. "seq": {
  25162. "type": "number"
  25163. },
  25164. "aggregateID": {
  25165. "type": "string"
  25166. },
  25167. "data": {
  25168. "type": "object",
  25169. "properties": {
  25170. "sessionID": {
  25171. "type": "string",
  25172. "pattern": "^ses"
  25173. },
  25174. "part": {
  25175. "$ref": "#/components/schemas/Part"
  25176. },
  25177. "time": {
  25178. "type": "number"
  25179. }
  25180. },
  25181. "required": ["sessionID", "part", "time"],
  25182. "additionalProperties": false
  25183. }
  25184. },
  25185. "required": ["type", "id", "seq", "aggregateID", "data"],
  25186. "additionalProperties": false
  25187. }
  25188. },
  25189. "required": ["type", "id", "syncEvent"],
  25190. "additionalProperties": false
  25191. },
  25192. "SyncEventMessagePartRemoved": {
  25193. "type": "object",
  25194. "properties": {
  25195. "type": {
  25196. "type": "string",
  25197. "enum": ["sync"]
  25198. },
  25199. "id": {
  25200. "type": "string",
  25201. "pattern": "^evt_"
  25202. },
  25203. "syncEvent": {
  25204. "type": "object",
  25205. "properties": {
  25206. "type": {
  25207. "type": "string",
  25208. "enum": ["message.part.removed.1"]
  25209. },
  25210. "id": {
  25211. "type": "string",
  25212. "pattern": "^evt_"
  25213. },
  25214. "seq": {
  25215. "type": "number"
  25216. },
  25217. "aggregateID": {
  25218. "type": "string"
  25219. },
  25220. "data": {
  25221. "type": "object",
  25222. "properties": {
  25223. "sessionID": {
  25224. "type": "string",
  25225. "pattern": "^ses"
  25226. },
  25227. "messageID": {
  25228. "type": "string",
  25229. "pattern": "^msg"
  25230. },
  25231. "partID": {
  25232. "type": "string",
  25233. "pattern": "^prt"
  25234. }
  25235. },
  25236. "required": ["sessionID", "messageID", "partID"],
  25237. "additionalProperties": false
  25238. }
  25239. },
  25240. "required": ["type", "id", "seq", "aggregateID", "data"],
  25241. "additionalProperties": false
  25242. }
  25243. },
  25244. "required": ["type", "id", "syncEvent"],
  25245. "additionalProperties": false
  25246. },
  25247. "SyncEventSessionNextAgentSwitched": {
  25248. "type": "object",
  25249. "properties": {
  25250. "type": {
  25251. "type": "string",
  25252. "enum": ["sync"]
  25253. },
  25254. "id": {
  25255. "type": "string",
  25256. "pattern": "^evt_"
  25257. },
  25258. "syncEvent": {
  25259. "type": "object",
  25260. "properties": {
  25261. "type": {
  25262. "type": "string",
  25263. "enum": ["session.next.agent.switched.1"]
  25264. },
  25265. "id": {
  25266. "type": "string",
  25267. "pattern": "^evt_"
  25268. },
  25269. "seq": {
  25270. "type": "number"
  25271. },
  25272. "aggregateID": {
  25273. "type": "string"
  25274. },
  25275. "data": {
  25276. "type": "object",
  25277. "properties": {
  25278. "timestamp": {
  25279. "type": "number"
  25280. },
  25281. "sessionID": {
  25282. "type": "string",
  25283. "pattern": "^ses"
  25284. },
  25285. "messageID": {
  25286. "type": "string",
  25287. "pattern": "^msg_"
  25288. },
  25289. "agent": {
  25290. "type": "string"
  25291. }
  25292. },
  25293. "required": ["timestamp", "sessionID", "messageID", "agent"],
  25294. "additionalProperties": false
  25295. }
  25296. },
  25297. "required": ["type", "id", "seq", "aggregateID", "data"],
  25298. "additionalProperties": false
  25299. }
  25300. },
  25301. "required": ["type", "id", "syncEvent"],
  25302. "additionalProperties": false
  25303. },
  25304. "SyncEventSessionNextModelSwitched": {
  25305. "type": "object",
  25306. "properties": {
  25307. "type": {
  25308. "type": "string",
  25309. "enum": ["sync"]
  25310. },
  25311. "id": {
  25312. "type": "string",
  25313. "pattern": "^evt_"
  25314. },
  25315. "syncEvent": {
  25316. "type": "object",
  25317. "properties": {
  25318. "type": {
  25319. "type": "string",
  25320. "enum": ["session.next.model.switched.1"]
  25321. },
  25322. "id": {
  25323. "type": "string",
  25324. "pattern": "^evt_"
  25325. },
  25326. "seq": {
  25327. "type": "number"
  25328. },
  25329. "aggregateID": {
  25330. "type": "string"
  25331. },
  25332. "data": {
  25333. "type": "object",
  25334. "properties": {
  25335. "timestamp": {
  25336. "type": "number"
  25337. },
  25338. "sessionID": {
  25339. "type": "string",
  25340. "pattern": "^ses"
  25341. },
  25342. "messageID": {
  25343. "type": "string",
  25344. "pattern": "^msg_"
  25345. },
  25346. "model": {
  25347. "$ref": "#/components/schemas/ModelRef"
  25348. }
  25349. },
  25350. "required": ["timestamp", "sessionID", "messageID", "model"],
  25351. "additionalProperties": false
  25352. }
  25353. },
  25354. "required": ["type", "id", "seq", "aggregateID", "data"],
  25355. "additionalProperties": false
  25356. }
  25357. },
  25358. "required": ["type", "id", "syncEvent"],
  25359. "additionalProperties": false
  25360. },
  25361. "SyncEventSessionNextMoved": {
  25362. "type": "object",
  25363. "properties": {
  25364. "type": {
  25365. "type": "string",
  25366. "enum": ["sync"]
  25367. },
  25368. "id": {
  25369. "type": "string",
  25370. "pattern": "^evt_"
  25371. },
  25372. "syncEvent": {
  25373. "type": "object",
  25374. "properties": {
  25375. "type": {
  25376. "type": "string",
  25377. "enum": ["session.next.moved.1"]
  25378. },
  25379. "id": {
  25380. "type": "string",
  25381. "pattern": "^evt_"
  25382. },
  25383. "seq": {
  25384. "type": "number"
  25385. },
  25386. "aggregateID": {
  25387. "type": "string"
  25388. },
  25389. "data": {
  25390. "type": "object",
  25391. "properties": {
  25392. "timestamp": {
  25393. "type": "number"
  25394. },
  25395. "sessionID": {
  25396. "type": "string",
  25397. "pattern": "^ses"
  25398. },
  25399. "location": {
  25400. "$ref": "#/components/schemas/LocationRef"
  25401. },
  25402. "subdirectory": {
  25403. "type": "string"
  25404. }
  25405. },
  25406. "required": ["timestamp", "sessionID", "location"],
  25407. "additionalProperties": false
  25408. }
  25409. },
  25410. "required": ["type", "id", "seq", "aggregateID", "data"],
  25411. "additionalProperties": false
  25412. }
  25413. },
  25414. "required": ["type", "id", "syncEvent"],
  25415. "additionalProperties": false
  25416. },
  25417. "SyncEventSessionNextPrompted": {
  25418. "type": "object",
  25419. "properties": {
  25420. "type": {
  25421. "type": "string",
  25422. "enum": ["sync"]
  25423. },
  25424. "id": {
  25425. "type": "string",
  25426. "pattern": "^evt_"
  25427. },
  25428. "syncEvent": {
  25429. "type": "object",
  25430. "properties": {
  25431. "type": {
  25432. "type": "string",
  25433. "enum": ["session.next.prompted.1"]
  25434. },
  25435. "id": {
  25436. "type": "string",
  25437. "pattern": "^evt_"
  25438. },
  25439. "seq": {
  25440. "type": "number"
  25441. },
  25442. "aggregateID": {
  25443. "type": "string"
  25444. },
  25445. "data": {
  25446. "type": "object",
  25447. "properties": {
  25448. "timestamp": {
  25449. "type": "number"
  25450. },
  25451. "sessionID": {
  25452. "type": "string",
  25453. "pattern": "^ses"
  25454. },
  25455. "messageID": {
  25456. "type": "string",
  25457. "pattern": "^msg_"
  25458. },
  25459. "prompt": {
  25460. "$ref": "#/components/schemas/Prompt"
  25461. },
  25462. "delivery": {
  25463. "type": "string",
  25464. "enum": ["steer", "queue"]
  25465. }
  25466. },
  25467. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25468. "additionalProperties": false
  25469. }
  25470. },
  25471. "required": ["type", "id", "seq", "aggregateID", "data"],
  25472. "additionalProperties": false
  25473. }
  25474. },
  25475. "required": ["type", "id", "syncEvent"],
  25476. "additionalProperties": false
  25477. },
  25478. "SyncEventSessionNextPromptAdmitted": {
  25479. "type": "object",
  25480. "properties": {
  25481. "type": {
  25482. "type": "string",
  25483. "enum": ["sync"]
  25484. },
  25485. "id": {
  25486. "type": "string",
  25487. "pattern": "^evt_"
  25488. },
  25489. "syncEvent": {
  25490. "type": "object",
  25491. "properties": {
  25492. "type": {
  25493. "type": "string",
  25494. "enum": ["session.next.prompt.admitted.1"]
  25495. },
  25496. "id": {
  25497. "type": "string",
  25498. "pattern": "^evt_"
  25499. },
  25500. "seq": {
  25501. "type": "number"
  25502. },
  25503. "aggregateID": {
  25504. "type": "string"
  25505. },
  25506. "data": {
  25507. "type": "object",
  25508. "properties": {
  25509. "timestamp": {
  25510. "type": "number"
  25511. },
  25512. "sessionID": {
  25513. "type": "string",
  25514. "pattern": "^ses"
  25515. },
  25516. "messageID": {
  25517. "type": "string",
  25518. "pattern": "^msg_"
  25519. },
  25520. "prompt": {
  25521. "$ref": "#/components/schemas/Prompt"
  25522. },
  25523. "delivery": {
  25524. "type": "string",
  25525. "enum": ["steer", "queue"]
  25526. }
  25527. },
  25528. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25529. "additionalProperties": false
  25530. }
  25531. },
  25532. "required": ["type", "id", "seq", "aggregateID", "data"],
  25533. "additionalProperties": false
  25534. }
  25535. },
  25536. "required": ["type", "id", "syncEvent"],
  25537. "additionalProperties": false
  25538. },
  25539. "SyncEventSessionNextContextUpdated": {
  25540. "type": "object",
  25541. "properties": {
  25542. "type": {
  25543. "type": "string",
  25544. "enum": ["sync"]
  25545. },
  25546. "id": {
  25547. "type": "string",
  25548. "pattern": "^evt_"
  25549. },
  25550. "syncEvent": {
  25551. "type": "object",
  25552. "properties": {
  25553. "type": {
  25554. "type": "string",
  25555. "enum": ["session.next.context.updated.1"]
  25556. },
  25557. "id": {
  25558. "type": "string",
  25559. "pattern": "^evt_"
  25560. },
  25561. "seq": {
  25562. "type": "number"
  25563. },
  25564. "aggregateID": {
  25565. "type": "string"
  25566. },
  25567. "data": {
  25568. "type": "object",
  25569. "properties": {
  25570. "timestamp": {
  25571. "type": "number"
  25572. },
  25573. "sessionID": {
  25574. "type": "string",
  25575. "pattern": "^ses"
  25576. },
  25577. "messageID": {
  25578. "type": "string",
  25579. "pattern": "^msg_"
  25580. },
  25581. "text": {
  25582. "type": "string"
  25583. }
  25584. },
  25585. "required": ["timestamp", "sessionID", "messageID", "text"],
  25586. "additionalProperties": false
  25587. }
  25588. },
  25589. "required": ["type", "id", "seq", "aggregateID", "data"],
  25590. "additionalProperties": false
  25591. }
  25592. },
  25593. "required": ["type", "id", "syncEvent"],
  25594. "additionalProperties": false
  25595. },
  25596. "SyncEventSessionNextSynthetic": {
  25597. "type": "object",
  25598. "properties": {
  25599. "type": {
  25600. "type": "string",
  25601. "enum": ["sync"]
  25602. },
  25603. "id": {
  25604. "type": "string",
  25605. "pattern": "^evt_"
  25606. },
  25607. "syncEvent": {
  25608. "type": "object",
  25609. "properties": {
  25610. "type": {
  25611. "type": "string",
  25612. "enum": ["session.next.synthetic.1"]
  25613. },
  25614. "id": {
  25615. "type": "string",
  25616. "pattern": "^evt_"
  25617. },
  25618. "seq": {
  25619. "type": "number"
  25620. },
  25621. "aggregateID": {
  25622. "type": "string"
  25623. },
  25624. "data": {
  25625. "type": "object",
  25626. "properties": {
  25627. "timestamp": {
  25628. "type": "number"
  25629. },
  25630. "sessionID": {
  25631. "type": "string",
  25632. "pattern": "^ses"
  25633. },
  25634. "messageID": {
  25635. "type": "string",
  25636. "pattern": "^msg_"
  25637. },
  25638. "text": {
  25639. "type": "string"
  25640. }
  25641. },
  25642. "required": ["timestamp", "sessionID", "messageID", "text"],
  25643. "additionalProperties": false
  25644. }
  25645. },
  25646. "required": ["type", "id", "seq", "aggregateID", "data"],
  25647. "additionalProperties": false
  25648. }
  25649. },
  25650. "required": ["type", "id", "syncEvent"],
  25651. "additionalProperties": false
  25652. },
  25653. "SyncEventSessionNextShellStarted": {
  25654. "type": "object",
  25655. "properties": {
  25656. "type": {
  25657. "type": "string",
  25658. "enum": ["sync"]
  25659. },
  25660. "id": {
  25661. "type": "string",
  25662. "pattern": "^evt_"
  25663. },
  25664. "syncEvent": {
  25665. "type": "object",
  25666. "properties": {
  25667. "type": {
  25668. "type": "string",
  25669. "enum": ["session.next.shell.started.1"]
  25670. },
  25671. "id": {
  25672. "type": "string",
  25673. "pattern": "^evt_"
  25674. },
  25675. "seq": {
  25676. "type": "number"
  25677. },
  25678. "aggregateID": {
  25679. "type": "string"
  25680. },
  25681. "data": {
  25682. "type": "object",
  25683. "properties": {
  25684. "timestamp": {
  25685. "type": "number"
  25686. },
  25687. "sessionID": {
  25688. "type": "string",
  25689. "pattern": "^ses"
  25690. },
  25691. "messageID": {
  25692. "type": "string",
  25693. "pattern": "^msg_"
  25694. },
  25695. "callID": {
  25696. "type": "string"
  25697. },
  25698. "command": {
  25699. "type": "string"
  25700. }
  25701. },
  25702. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25703. "additionalProperties": false
  25704. }
  25705. },
  25706. "required": ["type", "id", "seq", "aggregateID", "data"],
  25707. "additionalProperties": false
  25708. }
  25709. },
  25710. "required": ["type", "id", "syncEvent"],
  25711. "additionalProperties": false
  25712. },
  25713. "SyncEventSessionNextShellEnded": {
  25714. "type": "object",
  25715. "properties": {
  25716. "type": {
  25717. "type": "string",
  25718. "enum": ["sync"]
  25719. },
  25720. "id": {
  25721. "type": "string",
  25722. "pattern": "^evt_"
  25723. },
  25724. "syncEvent": {
  25725. "type": "object",
  25726. "properties": {
  25727. "type": {
  25728. "type": "string",
  25729. "enum": ["session.next.shell.ended.1"]
  25730. },
  25731. "id": {
  25732. "type": "string",
  25733. "pattern": "^evt_"
  25734. },
  25735. "seq": {
  25736. "type": "number"
  25737. },
  25738. "aggregateID": {
  25739. "type": "string"
  25740. },
  25741. "data": {
  25742. "type": "object",
  25743. "properties": {
  25744. "timestamp": {
  25745. "type": "number"
  25746. },
  25747. "sessionID": {
  25748. "type": "string",
  25749. "pattern": "^ses"
  25750. },
  25751. "callID": {
  25752. "type": "string"
  25753. },
  25754. "output": {
  25755. "type": "string"
  25756. }
  25757. },
  25758. "required": ["timestamp", "sessionID", "callID", "output"],
  25759. "additionalProperties": false
  25760. }
  25761. },
  25762. "required": ["type", "id", "seq", "aggregateID", "data"],
  25763. "additionalProperties": false
  25764. }
  25765. },
  25766. "required": ["type", "id", "syncEvent"],
  25767. "additionalProperties": false
  25768. },
  25769. "SyncEventSessionNextStepStarted": {
  25770. "type": "object",
  25771. "properties": {
  25772. "type": {
  25773. "type": "string",
  25774. "enum": ["sync"]
  25775. },
  25776. "id": {
  25777. "type": "string",
  25778. "pattern": "^evt_"
  25779. },
  25780. "syncEvent": {
  25781. "type": "object",
  25782. "properties": {
  25783. "type": {
  25784. "type": "string",
  25785. "enum": ["session.next.step.started.1"]
  25786. },
  25787. "id": {
  25788. "type": "string",
  25789. "pattern": "^evt_"
  25790. },
  25791. "seq": {
  25792. "type": "number"
  25793. },
  25794. "aggregateID": {
  25795. "type": "string"
  25796. },
  25797. "data": {
  25798. "type": "object",
  25799. "properties": {
  25800. "timestamp": {
  25801. "type": "number"
  25802. },
  25803. "sessionID": {
  25804. "type": "string",
  25805. "pattern": "^ses"
  25806. },
  25807. "assistantMessageID": {
  25808. "type": "string",
  25809. "pattern": "^msg_"
  25810. },
  25811. "agent": {
  25812. "type": "string"
  25813. },
  25814. "model": {
  25815. "$ref": "#/components/schemas/ModelRef"
  25816. },
  25817. "snapshot": {
  25818. "type": "string"
  25819. }
  25820. },
  25821. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25822. "additionalProperties": false
  25823. }
  25824. },
  25825. "required": ["type", "id", "seq", "aggregateID", "data"],
  25826. "additionalProperties": false
  25827. }
  25828. },
  25829. "required": ["type", "id", "syncEvent"],
  25830. "additionalProperties": false
  25831. },
  25832. "SyncEventSessionNextStepEnded": {
  25833. "type": "object",
  25834. "properties": {
  25835. "type": {
  25836. "type": "string",
  25837. "enum": ["sync"]
  25838. },
  25839. "id": {
  25840. "type": "string",
  25841. "pattern": "^evt_"
  25842. },
  25843. "syncEvent": {
  25844. "type": "object",
  25845. "properties": {
  25846. "type": {
  25847. "type": "string",
  25848. "enum": ["session.next.step.ended.2"]
  25849. },
  25850. "id": {
  25851. "type": "string",
  25852. "pattern": "^evt_"
  25853. },
  25854. "seq": {
  25855. "type": "number"
  25856. },
  25857. "aggregateID": {
  25858. "type": "string"
  25859. },
  25860. "data": {
  25861. "type": "object",
  25862. "properties": {
  25863. "timestamp": {
  25864. "type": "number"
  25865. },
  25866. "sessionID": {
  25867. "type": "string",
  25868. "pattern": "^ses"
  25869. },
  25870. "assistantMessageID": {
  25871. "type": "string",
  25872. "pattern": "^msg_"
  25873. },
  25874. "finish": {
  25875. "type": "string"
  25876. },
  25877. "cost": {
  25878. "type": "number"
  25879. },
  25880. "tokens": {
  25881. "type": "object",
  25882. "properties": {
  25883. "input": {
  25884. "type": "number"
  25885. },
  25886. "output": {
  25887. "type": "number"
  25888. },
  25889. "reasoning": {
  25890. "type": "number"
  25891. },
  25892. "cache": {
  25893. "type": "object",
  25894. "properties": {
  25895. "read": {
  25896. "type": "number"
  25897. },
  25898. "write": {
  25899. "type": "number"
  25900. }
  25901. },
  25902. "required": ["read", "write"],
  25903. "additionalProperties": false
  25904. }
  25905. },
  25906. "required": ["input", "output", "reasoning", "cache"],
  25907. "additionalProperties": false
  25908. },
  25909. "snapshot": {
  25910. "type": "string"
  25911. },
  25912. "files": {
  25913. "type": "array",
  25914. "items": {
  25915. "type": "string"
  25916. }
  25917. }
  25918. },
  25919. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25920. "additionalProperties": false
  25921. }
  25922. },
  25923. "required": ["type", "id", "seq", "aggregateID", "data"],
  25924. "additionalProperties": false
  25925. }
  25926. },
  25927. "required": ["type", "id", "syncEvent"],
  25928. "additionalProperties": false
  25929. },
  25930. "SyncEventSessionNextStepFailed": {
  25931. "type": "object",
  25932. "properties": {
  25933. "type": {
  25934. "type": "string",
  25935. "enum": ["sync"]
  25936. },
  25937. "id": {
  25938. "type": "string",
  25939. "pattern": "^evt_"
  25940. },
  25941. "syncEvent": {
  25942. "type": "object",
  25943. "properties": {
  25944. "type": {
  25945. "type": "string",
  25946. "enum": ["session.next.step.failed.2"]
  25947. },
  25948. "id": {
  25949. "type": "string",
  25950. "pattern": "^evt_"
  25951. },
  25952. "seq": {
  25953. "type": "number"
  25954. },
  25955. "aggregateID": {
  25956. "type": "string"
  25957. },
  25958. "data": {
  25959. "type": "object",
  25960. "properties": {
  25961. "timestamp": {
  25962. "type": "number"
  25963. },
  25964. "sessionID": {
  25965. "type": "string",
  25966. "pattern": "^ses"
  25967. },
  25968. "assistantMessageID": {
  25969. "type": "string",
  25970. "pattern": "^msg_"
  25971. },
  25972. "error": {
  25973. "$ref": "#/components/schemas/SessionErrorUnknown"
  25974. }
  25975. },
  25976. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25977. "additionalProperties": false
  25978. }
  25979. },
  25980. "required": ["type", "id", "seq", "aggregateID", "data"],
  25981. "additionalProperties": false
  25982. }
  25983. },
  25984. "required": ["type", "id", "syncEvent"],
  25985. "additionalProperties": false
  25986. },
  25987. "SyncEventSessionNextTextStarted": {
  25988. "type": "object",
  25989. "properties": {
  25990. "type": {
  25991. "type": "string",
  25992. "enum": ["sync"]
  25993. },
  25994. "id": {
  25995. "type": "string",
  25996. "pattern": "^evt_"
  25997. },
  25998. "syncEvent": {
  25999. "type": "object",
  26000. "properties": {
  26001. "type": {
  26002. "type": "string",
  26003. "enum": ["session.next.text.started.1"]
  26004. },
  26005. "id": {
  26006. "type": "string",
  26007. "pattern": "^evt_"
  26008. },
  26009. "seq": {
  26010. "type": "number"
  26011. },
  26012. "aggregateID": {
  26013. "type": "string"
  26014. },
  26015. "data": {
  26016. "type": "object",
  26017. "properties": {
  26018. "timestamp": {
  26019. "type": "number"
  26020. },
  26021. "sessionID": {
  26022. "type": "string",
  26023. "pattern": "^ses"
  26024. },
  26025. "assistantMessageID": {
  26026. "type": "string",
  26027. "pattern": "^msg_"
  26028. },
  26029. "textID": {
  26030. "type": "string"
  26031. }
  26032. },
  26033. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  26034. "additionalProperties": false
  26035. }
  26036. },
  26037. "required": ["type", "id", "seq", "aggregateID", "data"],
  26038. "additionalProperties": false
  26039. }
  26040. },
  26041. "required": ["type", "id", "syncEvent"],
  26042. "additionalProperties": false
  26043. },
  26044. "SyncEventSessionNextTextEnded": {
  26045. "type": "object",
  26046. "properties": {
  26047. "type": {
  26048. "type": "string",
  26049. "enum": ["sync"]
  26050. },
  26051. "id": {
  26052. "type": "string",
  26053. "pattern": "^evt_"
  26054. },
  26055. "syncEvent": {
  26056. "type": "object",
  26057. "properties": {
  26058. "type": {
  26059. "type": "string",
  26060. "enum": ["session.next.text.ended.1"]
  26061. },
  26062. "id": {
  26063. "type": "string",
  26064. "pattern": "^evt_"
  26065. },
  26066. "seq": {
  26067. "type": "number"
  26068. },
  26069. "aggregateID": {
  26070. "type": "string"
  26071. },
  26072. "data": {
  26073. "type": "object",
  26074. "properties": {
  26075. "timestamp": {
  26076. "type": "number"
  26077. },
  26078. "sessionID": {
  26079. "type": "string",
  26080. "pattern": "^ses"
  26081. },
  26082. "assistantMessageID": {
  26083. "type": "string",
  26084. "pattern": "^msg_"
  26085. },
  26086. "textID": {
  26087. "type": "string"
  26088. },
  26089. "text": {
  26090. "type": "string"
  26091. }
  26092. },
  26093. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  26094. "additionalProperties": false
  26095. }
  26096. },
  26097. "required": ["type", "id", "seq", "aggregateID", "data"],
  26098. "additionalProperties": false
  26099. }
  26100. },
  26101. "required": ["type", "id", "syncEvent"],
  26102. "additionalProperties": false
  26103. },
  26104. "SyncEventSessionNextReasoningStarted": {
  26105. "type": "object",
  26106. "properties": {
  26107. "type": {
  26108. "type": "string",
  26109. "enum": ["sync"]
  26110. },
  26111. "id": {
  26112. "type": "string",
  26113. "pattern": "^evt_"
  26114. },
  26115. "syncEvent": {
  26116. "type": "object",
  26117. "properties": {
  26118. "type": {
  26119. "type": "string",
  26120. "enum": ["session.next.reasoning.started.1"]
  26121. },
  26122. "id": {
  26123. "type": "string",
  26124. "pattern": "^evt_"
  26125. },
  26126. "seq": {
  26127. "type": "number"
  26128. },
  26129. "aggregateID": {
  26130. "type": "string"
  26131. },
  26132. "data": {
  26133. "type": "object",
  26134. "properties": {
  26135. "timestamp": {
  26136. "type": "number"
  26137. },
  26138. "sessionID": {
  26139. "type": "string",
  26140. "pattern": "^ses"
  26141. },
  26142. "assistantMessageID": {
  26143. "type": "string",
  26144. "pattern": "^msg_"
  26145. },
  26146. "reasoningID": {
  26147. "type": "string"
  26148. },
  26149. "providerMetadata": {
  26150. "$ref": "#/components/schemas/LLMProviderMetadata"
  26151. }
  26152. },
  26153. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  26154. "additionalProperties": false
  26155. }
  26156. },
  26157. "required": ["type", "id", "seq", "aggregateID", "data"],
  26158. "additionalProperties": false
  26159. }
  26160. },
  26161. "required": ["type", "id", "syncEvent"],
  26162. "additionalProperties": false
  26163. },
  26164. "SyncEventSessionNextReasoningEnded": {
  26165. "type": "object",
  26166. "properties": {
  26167. "type": {
  26168. "type": "string",
  26169. "enum": ["sync"]
  26170. },
  26171. "id": {
  26172. "type": "string",
  26173. "pattern": "^evt_"
  26174. },
  26175. "syncEvent": {
  26176. "type": "object",
  26177. "properties": {
  26178. "type": {
  26179. "type": "string",
  26180. "enum": ["session.next.reasoning.ended.1"]
  26181. },
  26182. "id": {
  26183. "type": "string",
  26184. "pattern": "^evt_"
  26185. },
  26186. "seq": {
  26187. "type": "number"
  26188. },
  26189. "aggregateID": {
  26190. "type": "string"
  26191. },
  26192. "data": {
  26193. "type": "object",
  26194. "properties": {
  26195. "timestamp": {
  26196. "type": "number"
  26197. },
  26198. "sessionID": {
  26199. "type": "string",
  26200. "pattern": "^ses"
  26201. },
  26202. "assistantMessageID": {
  26203. "type": "string",
  26204. "pattern": "^msg_"
  26205. },
  26206. "reasoningID": {
  26207. "type": "string"
  26208. },
  26209. "text": {
  26210. "type": "string"
  26211. },
  26212. "providerMetadata": {
  26213. "$ref": "#/components/schemas/LLMProviderMetadata"
  26214. }
  26215. },
  26216. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  26217. "additionalProperties": false
  26218. }
  26219. },
  26220. "required": ["type", "id", "seq", "aggregateID", "data"],
  26221. "additionalProperties": false
  26222. }
  26223. },
  26224. "required": ["type", "id", "syncEvent"],
  26225. "additionalProperties": false
  26226. },
  26227. "SyncEventSessionNextToolInputStarted": {
  26228. "type": "object",
  26229. "properties": {
  26230. "type": {
  26231. "type": "string",
  26232. "enum": ["sync"]
  26233. },
  26234. "id": {
  26235. "type": "string",
  26236. "pattern": "^evt_"
  26237. },
  26238. "syncEvent": {
  26239. "type": "object",
  26240. "properties": {
  26241. "type": {
  26242. "type": "string",
  26243. "enum": ["session.next.tool.input.started.1"]
  26244. },
  26245. "id": {
  26246. "type": "string",
  26247. "pattern": "^evt_"
  26248. },
  26249. "seq": {
  26250. "type": "number"
  26251. },
  26252. "aggregateID": {
  26253. "type": "string"
  26254. },
  26255. "data": {
  26256. "type": "object",
  26257. "properties": {
  26258. "timestamp": {
  26259. "type": "number"
  26260. },
  26261. "sessionID": {
  26262. "type": "string",
  26263. "pattern": "^ses"
  26264. },
  26265. "assistantMessageID": {
  26266. "type": "string",
  26267. "pattern": "^msg_"
  26268. },
  26269. "callID": {
  26270. "type": "string"
  26271. },
  26272. "name": {
  26273. "type": "string"
  26274. }
  26275. },
  26276. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  26277. "additionalProperties": false
  26278. }
  26279. },
  26280. "required": ["type", "id", "seq", "aggregateID", "data"],
  26281. "additionalProperties": false
  26282. }
  26283. },
  26284. "required": ["type", "id", "syncEvent"],
  26285. "additionalProperties": false
  26286. },
  26287. "SyncEventSessionNextToolInputEnded": {
  26288. "type": "object",
  26289. "properties": {
  26290. "type": {
  26291. "type": "string",
  26292. "enum": ["sync"]
  26293. },
  26294. "id": {
  26295. "type": "string",
  26296. "pattern": "^evt_"
  26297. },
  26298. "syncEvent": {
  26299. "type": "object",
  26300. "properties": {
  26301. "type": {
  26302. "type": "string",
  26303. "enum": ["session.next.tool.input.ended.1"]
  26304. },
  26305. "id": {
  26306. "type": "string",
  26307. "pattern": "^evt_"
  26308. },
  26309. "seq": {
  26310. "type": "number"
  26311. },
  26312. "aggregateID": {
  26313. "type": "string"
  26314. },
  26315. "data": {
  26316. "type": "object",
  26317. "properties": {
  26318. "timestamp": {
  26319. "type": "number"
  26320. },
  26321. "sessionID": {
  26322. "type": "string",
  26323. "pattern": "^ses"
  26324. },
  26325. "assistantMessageID": {
  26326. "type": "string",
  26327. "pattern": "^msg_"
  26328. },
  26329. "callID": {
  26330. "type": "string"
  26331. },
  26332. "text": {
  26333. "type": "string"
  26334. }
  26335. },
  26336. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  26337. "additionalProperties": false
  26338. }
  26339. },
  26340. "required": ["type", "id", "seq", "aggregateID", "data"],
  26341. "additionalProperties": false
  26342. }
  26343. },
  26344. "required": ["type", "id", "syncEvent"],
  26345. "additionalProperties": false
  26346. },
  26347. "SyncEventSessionNextToolCalled": {
  26348. "type": "object",
  26349. "properties": {
  26350. "type": {
  26351. "type": "string",
  26352. "enum": ["sync"]
  26353. },
  26354. "id": {
  26355. "type": "string",
  26356. "pattern": "^evt_"
  26357. },
  26358. "syncEvent": {
  26359. "type": "object",
  26360. "properties": {
  26361. "type": {
  26362. "type": "string",
  26363. "enum": ["session.next.tool.called.1"]
  26364. },
  26365. "id": {
  26366. "type": "string",
  26367. "pattern": "^evt_"
  26368. },
  26369. "seq": {
  26370. "type": "number"
  26371. },
  26372. "aggregateID": {
  26373. "type": "string"
  26374. },
  26375. "data": {
  26376. "type": "object",
  26377. "properties": {
  26378. "timestamp": {
  26379. "type": "number"
  26380. },
  26381. "sessionID": {
  26382. "type": "string",
  26383. "pattern": "^ses"
  26384. },
  26385. "assistantMessageID": {
  26386. "type": "string",
  26387. "pattern": "^msg_"
  26388. },
  26389. "callID": {
  26390. "type": "string"
  26391. },
  26392. "tool": {
  26393. "type": "string"
  26394. },
  26395. "input": {
  26396. "type": "object"
  26397. },
  26398. "provider": {
  26399. "type": "object",
  26400. "properties": {
  26401. "executed": {
  26402. "type": "boolean"
  26403. },
  26404. "metadata": {
  26405. "$ref": "#/components/schemas/LLMProviderMetadata"
  26406. }
  26407. },
  26408. "required": ["executed"],
  26409. "additionalProperties": false
  26410. }
  26411. },
  26412. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26413. "additionalProperties": false
  26414. }
  26415. },
  26416. "required": ["type", "id", "seq", "aggregateID", "data"],
  26417. "additionalProperties": false
  26418. }
  26419. },
  26420. "required": ["type", "id", "syncEvent"],
  26421. "additionalProperties": false
  26422. },
  26423. "SyncEventSessionNextToolProgress": {
  26424. "type": "object",
  26425. "properties": {
  26426. "type": {
  26427. "type": "string",
  26428. "enum": ["sync"]
  26429. },
  26430. "id": {
  26431. "type": "string",
  26432. "pattern": "^evt_"
  26433. },
  26434. "syncEvent": {
  26435. "type": "object",
  26436. "properties": {
  26437. "type": {
  26438. "type": "string",
  26439. "enum": ["session.next.tool.progress.1"]
  26440. },
  26441. "id": {
  26442. "type": "string",
  26443. "pattern": "^evt_"
  26444. },
  26445. "seq": {
  26446. "type": "number"
  26447. },
  26448. "aggregateID": {
  26449. "type": "string"
  26450. },
  26451. "data": {
  26452. "type": "object",
  26453. "properties": {
  26454. "timestamp": {
  26455. "type": "number"
  26456. },
  26457. "sessionID": {
  26458. "type": "string",
  26459. "pattern": "^ses"
  26460. },
  26461. "assistantMessageID": {
  26462. "type": "string",
  26463. "pattern": "^msg_"
  26464. },
  26465. "callID": {
  26466. "type": "string"
  26467. },
  26468. "structured": {
  26469. "type": "object"
  26470. },
  26471. "content": {
  26472. "type": "array",
  26473. "items": {
  26474. "$ref": "#/components/schemas/LLMToolContent"
  26475. }
  26476. }
  26477. },
  26478. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26479. "additionalProperties": false
  26480. }
  26481. },
  26482. "required": ["type", "id", "seq", "aggregateID", "data"],
  26483. "additionalProperties": false
  26484. }
  26485. },
  26486. "required": ["type", "id", "syncEvent"],
  26487. "additionalProperties": false
  26488. },
  26489. "SyncEventSessionNextToolSuccess": {
  26490. "type": "object",
  26491. "properties": {
  26492. "type": {
  26493. "type": "string",
  26494. "enum": ["sync"]
  26495. },
  26496. "id": {
  26497. "type": "string",
  26498. "pattern": "^evt_"
  26499. },
  26500. "syncEvent": {
  26501. "type": "object",
  26502. "properties": {
  26503. "type": {
  26504. "type": "string",
  26505. "enum": ["session.next.tool.success.1"]
  26506. },
  26507. "id": {
  26508. "type": "string",
  26509. "pattern": "^evt_"
  26510. },
  26511. "seq": {
  26512. "type": "number"
  26513. },
  26514. "aggregateID": {
  26515. "type": "string"
  26516. },
  26517. "data": {
  26518. "type": "object",
  26519. "properties": {
  26520. "timestamp": {
  26521. "type": "number"
  26522. },
  26523. "sessionID": {
  26524. "type": "string",
  26525. "pattern": "^ses"
  26526. },
  26527. "assistantMessageID": {
  26528. "type": "string",
  26529. "pattern": "^msg_"
  26530. },
  26531. "callID": {
  26532. "type": "string"
  26533. },
  26534. "structured": {
  26535. "type": "object"
  26536. },
  26537. "content": {
  26538. "type": "array",
  26539. "items": {
  26540. "$ref": "#/components/schemas/LLMToolContent"
  26541. }
  26542. },
  26543. "outputPaths": {
  26544. "type": "array",
  26545. "items": {
  26546. "type": "string"
  26547. }
  26548. },
  26549. "result": {},
  26550. "provider": {
  26551. "type": "object",
  26552. "properties": {
  26553. "executed": {
  26554. "type": "boolean"
  26555. },
  26556. "metadata": {
  26557. "$ref": "#/components/schemas/LLMProviderMetadata"
  26558. }
  26559. },
  26560. "required": ["executed"],
  26561. "additionalProperties": false
  26562. }
  26563. },
  26564. "required": [
  26565. "timestamp",
  26566. "sessionID",
  26567. "assistantMessageID",
  26568. "callID",
  26569. "structured",
  26570. "content",
  26571. "provider"
  26572. ],
  26573. "additionalProperties": false
  26574. }
  26575. },
  26576. "required": ["type", "id", "seq", "aggregateID", "data"],
  26577. "additionalProperties": false
  26578. }
  26579. },
  26580. "required": ["type", "id", "syncEvent"],
  26581. "additionalProperties": false
  26582. },
  26583. "SyncEventSessionNextToolFailed": {
  26584. "type": "object",
  26585. "properties": {
  26586. "type": {
  26587. "type": "string",
  26588. "enum": ["sync"]
  26589. },
  26590. "id": {
  26591. "type": "string",
  26592. "pattern": "^evt_"
  26593. },
  26594. "syncEvent": {
  26595. "type": "object",
  26596. "properties": {
  26597. "type": {
  26598. "type": "string",
  26599. "enum": ["session.next.tool.failed.1"]
  26600. },
  26601. "id": {
  26602. "type": "string",
  26603. "pattern": "^evt_"
  26604. },
  26605. "seq": {
  26606. "type": "number"
  26607. },
  26608. "aggregateID": {
  26609. "type": "string"
  26610. },
  26611. "data": {
  26612. "type": "object",
  26613. "properties": {
  26614. "timestamp": {
  26615. "type": "number"
  26616. },
  26617. "sessionID": {
  26618. "type": "string",
  26619. "pattern": "^ses"
  26620. },
  26621. "assistantMessageID": {
  26622. "type": "string",
  26623. "pattern": "^msg_"
  26624. },
  26625. "callID": {
  26626. "type": "string"
  26627. },
  26628. "error": {
  26629. "$ref": "#/components/schemas/SessionErrorUnknown"
  26630. },
  26631. "result": {},
  26632. "provider": {
  26633. "type": "object",
  26634. "properties": {
  26635. "executed": {
  26636. "type": "boolean"
  26637. },
  26638. "metadata": {
  26639. "$ref": "#/components/schemas/LLMProviderMetadata"
  26640. }
  26641. },
  26642. "required": ["executed"],
  26643. "additionalProperties": false
  26644. }
  26645. },
  26646. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26647. "additionalProperties": false
  26648. }
  26649. },
  26650. "required": ["type", "id", "seq", "aggregateID", "data"],
  26651. "additionalProperties": false
  26652. }
  26653. },
  26654. "required": ["type", "id", "syncEvent"],
  26655. "additionalProperties": false
  26656. },
  26657. "SyncEventSessionNextRetried": {
  26658. "type": "object",
  26659. "properties": {
  26660. "type": {
  26661. "type": "string",
  26662. "enum": ["sync"]
  26663. },
  26664. "id": {
  26665. "type": "string",
  26666. "pattern": "^evt_"
  26667. },
  26668. "syncEvent": {
  26669. "type": "object",
  26670. "properties": {
  26671. "type": {
  26672. "type": "string",
  26673. "enum": ["session.next.retried.1"]
  26674. },
  26675. "id": {
  26676. "type": "string",
  26677. "pattern": "^evt_"
  26678. },
  26679. "seq": {
  26680. "type": "number"
  26681. },
  26682. "aggregateID": {
  26683. "type": "string"
  26684. },
  26685. "data": {
  26686. "type": "object",
  26687. "properties": {
  26688. "timestamp": {
  26689. "type": "number"
  26690. },
  26691. "sessionID": {
  26692. "type": "string",
  26693. "pattern": "^ses"
  26694. },
  26695. "attempt": {
  26696. "type": "number"
  26697. },
  26698. "error": {
  26699. "$ref": "#/components/schemas/SessionNextRetry_error"
  26700. }
  26701. },
  26702. "required": ["timestamp", "sessionID", "attempt", "error"],
  26703. "additionalProperties": false
  26704. }
  26705. },
  26706. "required": ["type", "id", "seq", "aggregateID", "data"],
  26707. "additionalProperties": false
  26708. }
  26709. },
  26710. "required": ["type", "id", "syncEvent"],
  26711. "additionalProperties": false
  26712. },
  26713. "SyncEventSessionNextCompactionStarted": {
  26714. "type": "object",
  26715. "properties": {
  26716. "type": {
  26717. "type": "string",
  26718. "enum": ["sync"]
  26719. },
  26720. "id": {
  26721. "type": "string",
  26722. "pattern": "^evt_"
  26723. },
  26724. "syncEvent": {
  26725. "type": "object",
  26726. "properties": {
  26727. "type": {
  26728. "type": "string",
  26729. "enum": ["session.next.compaction.started.1"]
  26730. },
  26731. "id": {
  26732. "type": "string",
  26733. "pattern": "^evt_"
  26734. },
  26735. "seq": {
  26736. "type": "number"
  26737. },
  26738. "aggregateID": {
  26739. "type": "string"
  26740. },
  26741. "data": {
  26742. "type": "object",
  26743. "properties": {
  26744. "timestamp": {
  26745. "type": "number"
  26746. },
  26747. "sessionID": {
  26748. "type": "string",
  26749. "pattern": "^ses"
  26750. },
  26751. "messageID": {
  26752. "type": "string",
  26753. "pattern": "^msg_"
  26754. },
  26755. "reason": {
  26756. "type": "string",
  26757. "enum": ["auto", "manual"]
  26758. }
  26759. },
  26760. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26761. "additionalProperties": false
  26762. }
  26763. },
  26764. "required": ["type", "id", "seq", "aggregateID", "data"],
  26765. "additionalProperties": false
  26766. }
  26767. },
  26768. "required": ["type", "id", "syncEvent"],
  26769. "additionalProperties": false
  26770. },
  26771. "SyncEventSessionNextCompactionEnded": {
  26772. "type": "object",
  26773. "properties": {
  26774. "type": {
  26775. "type": "string",
  26776. "enum": ["sync"]
  26777. },
  26778. "id": {
  26779. "type": "string",
  26780. "pattern": "^evt_"
  26781. },
  26782. "syncEvent": {
  26783. "type": "object",
  26784. "properties": {
  26785. "type": {
  26786. "type": "string",
  26787. "enum": ["session.next.compaction.ended.1"]
  26788. },
  26789. "id": {
  26790. "type": "string",
  26791. "pattern": "^evt_"
  26792. },
  26793. "seq": {
  26794. "type": "number"
  26795. },
  26796. "aggregateID": {
  26797. "type": "string"
  26798. },
  26799. "data": {
  26800. "type": "object",
  26801. "properties": {
  26802. "timestamp": {
  26803. "type": "number"
  26804. },
  26805. "sessionID": {
  26806. "type": "string",
  26807. "pattern": "^ses"
  26808. },
  26809. "messageID": {
  26810. "type": "string",
  26811. "pattern": "^msg_"
  26812. },
  26813. "reason": {
  26814. "type": "string",
  26815. "enum": ["auto", "manual"]
  26816. },
  26817. "text": {
  26818. "type": "string"
  26819. },
  26820. "recent": {
  26821. "type": "string"
  26822. }
  26823. },
  26824. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  26825. "additionalProperties": false
  26826. }
  26827. },
  26828. "required": ["type", "id", "seq", "aggregateID", "data"],
  26829. "additionalProperties": false
  26830. }
  26831. },
  26832. "required": ["type", "id", "syncEvent"],
  26833. "additionalProperties": false
  26834. },
  26835. "SyncEventSessionNextRevertStaged": {
  26836. "type": "object",
  26837. "properties": {
  26838. "type": {
  26839. "type": "string",
  26840. "enum": ["sync"]
  26841. },
  26842. "id": {
  26843. "type": "string",
  26844. "pattern": "^evt_"
  26845. },
  26846. "syncEvent": {
  26847. "type": "object",
  26848. "properties": {
  26849. "type": {
  26850. "type": "string",
  26851. "enum": ["session.next.revert.staged.1"]
  26852. },
  26853. "id": {
  26854. "type": "string",
  26855. "pattern": "^evt_"
  26856. },
  26857. "seq": {
  26858. "type": "number"
  26859. },
  26860. "aggregateID": {
  26861. "type": "string"
  26862. },
  26863. "data": {
  26864. "type": "object",
  26865. "properties": {
  26866. "timestamp": {
  26867. "type": "number"
  26868. },
  26869. "sessionID": {
  26870. "type": "string",
  26871. "pattern": "^ses"
  26872. },
  26873. "revert": {
  26874. "$ref": "#/components/schemas/RevertState"
  26875. }
  26876. },
  26877. "required": ["timestamp", "sessionID", "revert"],
  26878. "additionalProperties": false
  26879. }
  26880. },
  26881. "required": ["type", "id", "seq", "aggregateID", "data"],
  26882. "additionalProperties": false
  26883. }
  26884. },
  26885. "required": ["type", "id", "syncEvent"],
  26886. "additionalProperties": false
  26887. },
  26888. "SyncEventSessionNextRevertCleared": {
  26889. "type": "object",
  26890. "properties": {
  26891. "type": {
  26892. "type": "string",
  26893. "enum": ["sync"]
  26894. },
  26895. "id": {
  26896. "type": "string",
  26897. "pattern": "^evt_"
  26898. },
  26899. "syncEvent": {
  26900. "type": "object",
  26901. "properties": {
  26902. "type": {
  26903. "type": "string",
  26904. "enum": ["session.next.revert.cleared.1"]
  26905. },
  26906. "id": {
  26907. "type": "string",
  26908. "pattern": "^evt_"
  26909. },
  26910. "seq": {
  26911. "type": "number"
  26912. },
  26913. "aggregateID": {
  26914. "type": "string"
  26915. },
  26916. "data": {
  26917. "type": "object",
  26918. "properties": {
  26919. "timestamp": {
  26920. "type": "number"
  26921. },
  26922. "sessionID": {
  26923. "type": "string",
  26924. "pattern": "^ses"
  26925. }
  26926. },
  26927. "required": ["timestamp", "sessionID"],
  26928. "additionalProperties": false
  26929. }
  26930. },
  26931. "required": ["type", "id", "seq", "aggregateID", "data"],
  26932. "additionalProperties": false
  26933. }
  26934. },
  26935. "required": ["type", "id", "syncEvent"],
  26936. "additionalProperties": false
  26937. },
  26938. "SyncEventSessionNextRevertCommitted": {
  26939. "type": "object",
  26940. "properties": {
  26941. "type": {
  26942. "type": "string",
  26943. "enum": ["sync"]
  26944. },
  26945. "id": {
  26946. "type": "string",
  26947. "pattern": "^evt_"
  26948. },
  26949. "syncEvent": {
  26950. "type": "object",
  26951. "properties": {
  26952. "type": {
  26953. "type": "string",
  26954. "enum": ["session.next.revert.committed.1"]
  26955. },
  26956. "id": {
  26957. "type": "string",
  26958. "pattern": "^evt_"
  26959. },
  26960. "seq": {
  26961. "type": "number"
  26962. },
  26963. "aggregateID": {
  26964. "type": "string"
  26965. },
  26966. "data": {
  26967. "type": "object",
  26968. "properties": {
  26969. "timestamp": {
  26970. "type": "number"
  26971. },
  26972. "sessionID": {
  26973. "type": "string",
  26974. "pattern": "^ses"
  26975. },
  26976. "messageID": {
  26977. "type": "string",
  26978. "pattern": "^msg_"
  26979. }
  26980. },
  26981. "required": ["timestamp", "sessionID", "messageID"],
  26982. "additionalProperties": false
  26983. }
  26984. },
  26985. "required": ["type", "id", "seq", "aggregateID", "data"],
  26986. "additionalProperties": false
  26987. }
  26988. },
  26989. "required": ["type", "id", "syncEvent"],
  26990. "additionalProperties": false
  26991. },
  26992. "ConfigV2ReferenceGit": {
  26993. "type": "object",
  26994. "properties": {
  26995. "repository": {
  26996. "type": "string"
  26997. },
  26998. "branch": {
  26999. "type": "string"
  27000. },
  27001. "description": {
  27002. "type": "string"
  27003. },
  27004. "hidden": {
  27005. "type": "boolean"
  27006. }
  27007. },
  27008. "required": ["repository"],
  27009. "additionalProperties": false
  27010. },
  27011. "ConfigV2ReferenceLocal": {
  27012. "type": "object",
  27013. "properties": {
  27014. "path": {
  27015. "type": "string"
  27016. },
  27017. "description": {
  27018. "type": "string"
  27019. },
  27020. "hidden": {
  27021. "type": "boolean"
  27022. }
  27023. },
  27024. "required": ["path"],
  27025. "additionalProperties": false
  27026. },
  27027. "PolicyEffect": {
  27028. "type": "string",
  27029. "enum": ["allow", "deny"]
  27030. },
  27031. "ConfigV2ExperimentalPolicy": {
  27032. "type": "object",
  27033. "properties": {
  27034. "action": {
  27035. "type": "string",
  27036. "enum": ["provider.use"]
  27037. },
  27038. "effect": {
  27039. "$ref": "#/components/schemas/PolicyEffect"
  27040. },
  27041. "resource": {
  27042. "type": "string"
  27043. }
  27044. },
  27045. "required": ["action", "effect", "resource"],
  27046. "additionalProperties": false
  27047. },
  27048. "ProjectDirectories": {
  27049. "type": "array",
  27050. "items": {
  27051. "type": "object",
  27052. "properties": {
  27053. "directory": {
  27054. "type": "string"
  27055. },
  27056. "strategy": {
  27057. "type": "string"
  27058. }
  27059. },
  27060. "required": ["directory"],
  27061. "additionalProperties": false
  27062. }
  27063. },
  27064. "PtyTicketConnectToken": {
  27065. "type": "object",
  27066. "properties": {
  27067. "ticket": {
  27068. "type": "string"
  27069. },
  27070. "expires_in": {
  27071. "type": "integer",
  27072. "exclusiveMinimum": 0
  27073. }
  27074. },
  27075. "required": ["ticket", "expires_in"],
  27076. "additionalProperties": false
  27077. },
  27078. "WorkspaceEventConnectionStatus": {
  27079. "type": "object",
  27080. "properties": {
  27081. "workspaceID": {
  27082. "type": "string",
  27083. "pattern": "^wrk"
  27084. },
  27085. "status": {
  27086. "type": "string",
  27087. "enum": ["connected", "connecting", "disconnected", "error"]
  27088. }
  27089. },
  27090. "required": ["workspaceID", "status"],
  27091. "additionalProperties": false
  27092. },
  27093. "LocationInfo": {
  27094. "type": "object",
  27095. "properties": {
  27096. "directory": {
  27097. "type": "string"
  27098. },
  27099. "workspaceID": {
  27100. "type": "string",
  27101. "pattern": "^wrk"
  27102. },
  27103. "project": {
  27104. "type": "object",
  27105. "properties": {
  27106. "id": {
  27107. "type": "string"
  27108. },
  27109. "directory": {
  27110. "type": "string"
  27111. }
  27112. },
  27113. "required": ["id", "directory"],
  27114. "additionalProperties": false
  27115. }
  27116. },
  27117. "required": ["directory", "project"],
  27118. "additionalProperties": false
  27119. },
  27120. "ProviderRequest": {
  27121. "type": "object",
  27122. "properties": {
  27123. "headers": {
  27124. "type": "object",
  27125. "additionalProperties": {
  27126. "type": "string"
  27127. }
  27128. },
  27129. "body": {
  27130. "type": "object"
  27131. }
  27132. },
  27133. "required": ["headers", "body"],
  27134. "additionalProperties": false
  27135. },
  27136. "AgentColor": {
  27137. "anyOf": [
  27138. {
  27139. "type": "string",
  27140. "pattern": "^#[0-9a-fA-F]{6}$"
  27141. },
  27142. {
  27143. "type": "string",
  27144. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  27145. }
  27146. ]
  27147. },
  27148. "PermissionV2Effect": {
  27149. "type": "string",
  27150. "enum": ["allow", "deny", "ask"]
  27151. },
  27152. "PermissionV2Rule": {
  27153. "type": "object",
  27154. "properties": {
  27155. "action": {
  27156. "type": "string"
  27157. },
  27158. "resource": {
  27159. "type": "string"
  27160. },
  27161. "effect": {
  27162. "$ref": "#/components/schemas/PermissionV2Effect"
  27163. }
  27164. },
  27165. "required": ["action", "resource", "effect"],
  27166. "additionalProperties": false
  27167. },
  27168. "PermissionV2Ruleset": {
  27169. "type": "array",
  27170. "items": {
  27171. "$ref": "#/components/schemas/PermissionV2Rule"
  27172. }
  27173. },
  27174. "AgentV2Info": {
  27175. "type": "object",
  27176. "properties": {
  27177. "id": {
  27178. "type": "string"
  27179. },
  27180. "model": {
  27181. "$ref": "#/components/schemas/ModelRef"
  27182. },
  27183. "request": {
  27184. "$ref": "#/components/schemas/ProviderRequest"
  27185. },
  27186. "system": {
  27187. "type": "string"
  27188. },
  27189. "description": {
  27190. "type": "string"
  27191. },
  27192. "mode": {
  27193. "type": "string",
  27194. "enum": ["subagent", "primary", "all"]
  27195. },
  27196. "hidden": {
  27197. "type": "boolean"
  27198. },
  27199. "color": {
  27200. "$ref": "#/components/schemas/AgentColor"
  27201. },
  27202. "steps": {
  27203. "type": "integer",
  27204. "exclusiveMinimum": 0
  27205. },
  27206. "permissions": {
  27207. "$ref": "#/components/schemas/PermissionV2Ruleset"
  27208. }
  27209. },
  27210. "required": ["id", "request", "mode", "hidden", "permissions"],
  27211. "additionalProperties": false
  27212. },
  27213. "SessionV2Info": {
  27214. "type": "object",
  27215. "properties": {
  27216. "id": {
  27217. "type": "string",
  27218. "pattern": "^ses"
  27219. },
  27220. "parentID": {
  27221. "type": "string",
  27222. "pattern": "^ses"
  27223. },
  27224. "projectID": {
  27225. "type": "string"
  27226. },
  27227. "agent": {
  27228. "type": "string"
  27229. },
  27230. "model": {
  27231. "$ref": "#/components/schemas/ModelRef"
  27232. },
  27233. "cost": {
  27234. "type": "number"
  27235. },
  27236. "tokens": {
  27237. "type": "object",
  27238. "properties": {
  27239. "input": {
  27240. "type": "number"
  27241. },
  27242. "output": {
  27243. "type": "number"
  27244. },
  27245. "reasoning": {
  27246. "type": "number"
  27247. },
  27248. "cache": {
  27249. "type": "object",
  27250. "properties": {
  27251. "read": {
  27252. "type": "number"
  27253. },
  27254. "write": {
  27255. "type": "number"
  27256. }
  27257. },
  27258. "required": ["read", "write"],
  27259. "additionalProperties": false
  27260. }
  27261. },
  27262. "required": ["input", "output", "reasoning", "cache"],
  27263. "additionalProperties": false
  27264. },
  27265. "time": {
  27266. "type": "object",
  27267. "properties": {
  27268. "created": {
  27269. "type": "number"
  27270. },
  27271. "updated": {
  27272. "type": "number"
  27273. },
  27274. "archived": {
  27275. "type": "number"
  27276. }
  27277. },
  27278. "required": ["created", "updated"],
  27279. "additionalProperties": false
  27280. },
  27281. "title": {
  27282. "type": "string"
  27283. },
  27284. "location": {
  27285. "$ref": "#/components/schemas/LocationRef"
  27286. },
  27287. "subpath": {
  27288. "type": "string"
  27289. },
  27290. "revert": {
  27291. "$ref": "#/components/schemas/RevertState"
  27292. }
  27293. },
  27294. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  27295. "additionalProperties": false
  27296. },
  27297. "PromptInputFileAttachment": {
  27298. "type": "object",
  27299. "properties": {
  27300. "uri": {
  27301. "type": "string"
  27302. },
  27303. "name": {
  27304. "type": "string"
  27305. },
  27306. "description": {
  27307. "type": "string"
  27308. },
  27309. "source": {
  27310. "$ref": "#/components/schemas/PromptSource"
  27311. }
  27312. },
  27313. "required": ["uri"],
  27314. "additionalProperties": false
  27315. },
  27316. "SessionInputAdmitted": {
  27317. "type": "object",
  27318. "properties": {
  27319. "admittedSeq": {
  27320. "type": "integer",
  27321. "minimum": 0
  27322. },
  27323. "id": {
  27324. "type": "string",
  27325. "pattern": "^msg_"
  27326. },
  27327. "sessionID": {
  27328. "type": "string",
  27329. "pattern": "^ses"
  27330. },
  27331. "prompt": {
  27332. "$ref": "#/components/schemas/Prompt"
  27333. },
  27334. "delivery": {
  27335. "type": "string",
  27336. "enum": ["steer", "queue"]
  27337. },
  27338. "timeCreated": {
  27339. "type": "number"
  27340. },
  27341. "promotedSeq": {
  27342. "type": "integer",
  27343. "minimum": 0
  27344. }
  27345. },
  27346. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  27347. "additionalProperties": false
  27348. },
  27349. "SessionMessageAgentSwitched": {
  27350. "type": "object",
  27351. "properties": {
  27352. "id": {
  27353. "type": "string",
  27354. "pattern": "^msg_"
  27355. },
  27356. "metadata": {
  27357. "type": "object"
  27358. },
  27359. "time": {
  27360. "type": "object",
  27361. "properties": {
  27362. "created": {
  27363. "type": "number"
  27364. }
  27365. },
  27366. "required": ["created"],
  27367. "additionalProperties": false
  27368. },
  27369. "type": {
  27370. "type": "string",
  27371. "enum": ["agent-switched"]
  27372. },
  27373. "agent": {
  27374. "type": "string"
  27375. }
  27376. },
  27377. "required": ["id", "time", "type", "agent"],
  27378. "additionalProperties": false
  27379. },
  27380. "SessionMessageModelSwitched": {
  27381. "type": "object",
  27382. "properties": {
  27383. "id": {
  27384. "type": "string",
  27385. "pattern": "^msg_"
  27386. },
  27387. "metadata": {
  27388. "type": "object"
  27389. },
  27390. "time": {
  27391. "type": "object",
  27392. "properties": {
  27393. "created": {
  27394. "type": "number"
  27395. }
  27396. },
  27397. "required": ["created"],
  27398. "additionalProperties": false
  27399. },
  27400. "type": {
  27401. "type": "string",
  27402. "enum": ["model-switched"]
  27403. },
  27404. "model": {
  27405. "$ref": "#/components/schemas/ModelRef"
  27406. }
  27407. },
  27408. "required": ["id", "time", "type", "model"],
  27409. "additionalProperties": false
  27410. },
  27411. "SessionMessageUser": {
  27412. "type": "object",
  27413. "properties": {
  27414. "id": {
  27415. "type": "string",
  27416. "pattern": "^msg_"
  27417. },
  27418. "metadata": {
  27419. "type": "object"
  27420. },
  27421. "time": {
  27422. "type": "object",
  27423. "properties": {
  27424. "created": {
  27425. "type": "number"
  27426. }
  27427. },
  27428. "required": ["created"],
  27429. "additionalProperties": false
  27430. },
  27431. "text": {
  27432. "type": "string"
  27433. },
  27434. "files": {
  27435. "type": "array",
  27436. "items": {
  27437. "$ref": "#/components/schemas/PromptFileAttachment"
  27438. }
  27439. },
  27440. "agents": {
  27441. "type": "array",
  27442. "items": {
  27443. "$ref": "#/components/schemas/PromptAgentAttachment"
  27444. }
  27445. },
  27446. "type": {
  27447. "type": "string",
  27448. "enum": ["user"]
  27449. }
  27450. },
  27451. "required": ["id", "time", "text", "type"],
  27452. "additionalProperties": false
  27453. },
  27454. "SessionMessageSynthetic": {
  27455. "type": "object",
  27456. "properties": {
  27457. "id": {
  27458. "type": "string",
  27459. "pattern": "^msg_"
  27460. },
  27461. "metadata": {
  27462. "type": "object"
  27463. },
  27464. "time": {
  27465. "type": "object",
  27466. "properties": {
  27467. "created": {
  27468. "type": "number"
  27469. }
  27470. },
  27471. "required": ["created"],
  27472. "additionalProperties": false
  27473. },
  27474. "sessionID": {
  27475. "type": "string",
  27476. "pattern": "^ses"
  27477. },
  27478. "text": {
  27479. "type": "string"
  27480. },
  27481. "type": {
  27482. "type": "string",
  27483. "enum": ["synthetic"]
  27484. }
  27485. },
  27486. "required": ["id", "time", "sessionID", "text", "type"],
  27487. "additionalProperties": false
  27488. },
  27489. "SessionMessageSystem": {
  27490. "type": "object",
  27491. "properties": {
  27492. "id": {
  27493. "type": "string",
  27494. "pattern": "^msg_"
  27495. },
  27496. "metadata": {
  27497. "type": "object"
  27498. },
  27499. "time": {
  27500. "type": "object",
  27501. "properties": {
  27502. "created": {
  27503. "type": "number"
  27504. }
  27505. },
  27506. "required": ["created"],
  27507. "additionalProperties": false
  27508. },
  27509. "type": {
  27510. "type": "string",
  27511. "enum": ["system"]
  27512. },
  27513. "text": {
  27514. "type": "string"
  27515. }
  27516. },
  27517. "required": ["id", "time", "type", "text"],
  27518. "additionalProperties": false
  27519. },
  27520. "SessionMessageShell": {
  27521. "type": "object",
  27522. "properties": {
  27523. "id": {
  27524. "type": "string",
  27525. "pattern": "^msg_"
  27526. },
  27527. "metadata": {
  27528. "type": "object"
  27529. },
  27530. "time": {
  27531. "type": "object",
  27532. "properties": {
  27533. "created": {
  27534. "type": "number"
  27535. },
  27536. "completed": {
  27537. "type": "number"
  27538. }
  27539. },
  27540. "required": ["created"],
  27541. "additionalProperties": false
  27542. },
  27543. "type": {
  27544. "type": "string",
  27545. "enum": ["shell"]
  27546. },
  27547. "callID": {
  27548. "type": "string"
  27549. },
  27550. "command": {
  27551. "type": "string"
  27552. },
  27553. "output": {
  27554. "type": "string"
  27555. }
  27556. },
  27557. "required": ["id", "time", "type", "callID", "command", "output"],
  27558. "additionalProperties": false
  27559. },
  27560. "SessionMessageAssistantText": {
  27561. "type": "object",
  27562. "properties": {
  27563. "type": {
  27564. "type": "string",
  27565. "enum": ["text"]
  27566. },
  27567. "id": {
  27568. "type": "string"
  27569. },
  27570. "text": {
  27571. "type": "string"
  27572. }
  27573. },
  27574. "required": ["type", "id", "text"],
  27575. "additionalProperties": false
  27576. },
  27577. "SessionMessageAssistantReasoning": {
  27578. "type": "object",
  27579. "properties": {
  27580. "type": {
  27581. "type": "string",
  27582. "enum": ["reasoning"]
  27583. },
  27584. "id": {
  27585. "type": "string"
  27586. },
  27587. "text": {
  27588. "type": "string"
  27589. },
  27590. "providerMetadata": {
  27591. "$ref": "#/components/schemas/LLMProviderMetadata"
  27592. },
  27593. "time": {
  27594. "type": "object",
  27595. "properties": {
  27596. "created": {
  27597. "type": "number"
  27598. },
  27599. "completed": {
  27600. "type": "number"
  27601. }
  27602. },
  27603. "required": ["created"],
  27604. "additionalProperties": false
  27605. }
  27606. },
  27607. "required": ["type", "id", "text"],
  27608. "additionalProperties": false
  27609. },
  27610. "SessionMessageToolStatePending": {
  27611. "type": "object",
  27612. "properties": {
  27613. "status": {
  27614. "type": "string",
  27615. "enum": ["pending"]
  27616. },
  27617. "input": {
  27618. "type": "string"
  27619. }
  27620. },
  27621. "required": ["status", "input"],
  27622. "additionalProperties": false
  27623. },
  27624. "SessionMessageToolStateRunning": {
  27625. "type": "object",
  27626. "properties": {
  27627. "status": {
  27628. "type": "string",
  27629. "enum": ["running"]
  27630. },
  27631. "input": {
  27632. "type": "object"
  27633. },
  27634. "structured": {
  27635. "type": "object"
  27636. },
  27637. "content": {
  27638. "type": "array",
  27639. "items": {
  27640. "$ref": "#/components/schemas/LLMToolContent"
  27641. }
  27642. }
  27643. },
  27644. "required": ["status", "input", "structured", "content"],
  27645. "additionalProperties": false
  27646. },
  27647. "SessionMessageToolStateCompleted": {
  27648. "type": "object",
  27649. "properties": {
  27650. "status": {
  27651. "type": "string",
  27652. "enum": ["completed"]
  27653. },
  27654. "input": {
  27655. "type": "object"
  27656. },
  27657. "attachments": {
  27658. "type": "array",
  27659. "items": {
  27660. "$ref": "#/components/schemas/PromptFileAttachment"
  27661. }
  27662. },
  27663. "content": {
  27664. "type": "array",
  27665. "items": {
  27666. "$ref": "#/components/schemas/LLMToolContent"
  27667. }
  27668. },
  27669. "outputPaths": {
  27670. "type": "array",
  27671. "items": {
  27672. "type": "string"
  27673. }
  27674. },
  27675. "structured": {
  27676. "type": "object"
  27677. },
  27678. "result": {}
  27679. },
  27680. "required": ["status", "input", "content", "structured"],
  27681. "additionalProperties": false
  27682. },
  27683. "SessionMessageToolStateError": {
  27684. "type": "object",
  27685. "properties": {
  27686. "status": {
  27687. "type": "string",
  27688. "enum": ["error"]
  27689. },
  27690. "input": {
  27691. "type": "object"
  27692. },
  27693. "content": {
  27694. "type": "array",
  27695. "items": {
  27696. "$ref": "#/components/schemas/LLMToolContent"
  27697. }
  27698. },
  27699. "structured": {
  27700. "type": "object"
  27701. },
  27702. "error": {
  27703. "$ref": "#/components/schemas/SessionErrorUnknown"
  27704. },
  27705. "result": {}
  27706. },
  27707. "required": ["status", "input", "content", "structured", "error"],
  27708. "additionalProperties": false
  27709. },
  27710. "SessionMessageAssistantTool": {
  27711. "type": "object",
  27712. "properties": {
  27713. "type": {
  27714. "type": "string",
  27715. "enum": ["tool"]
  27716. },
  27717. "id": {
  27718. "type": "string"
  27719. },
  27720. "name": {
  27721. "type": "string"
  27722. },
  27723. "provider": {
  27724. "type": "object",
  27725. "properties": {
  27726. "executed": {
  27727. "type": "boolean"
  27728. },
  27729. "metadata": {
  27730. "$ref": "#/components/schemas/LLMProviderMetadata"
  27731. },
  27732. "resultMetadata": {
  27733. "$ref": "#/components/schemas/LLMProviderMetadata"
  27734. }
  27735. },
  27736. "required": ["executed"],
  27737. "additionalProperties": false
  27738. },
  27739. "state": {
  27740. "anyOf": [
  27741. {
  27742. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  27743. },
  27744. {
  27745. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  27746. },
  27747. {
  27748. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  27749. },
  27750. {
  27751. "$ref": "#/components/schemas/SessionMessageToolStateError"
  27752. }
  27753. ]
  27754. },
  27755. "time": {
  27756. "type": "object",
  27757. "properties": {
  27758. "created": {
  27759. "type": "number"
  27760. },
  27761. "ran": {
  27762. "type": "number"
  27763. },
  27764. "completed": {
  27765. "type": "number"
  27766. },
  27767. "pruned": {
  27768. "type": "number"
  27769. }
  27770. },
  27771. "required": ["created"],
  27772. "additionalProperties": false
  27773. }
  27774. },
  27775. "required": ["type", "id", "name", "state", "time"],
  27776. "additionalProperties": false
  27777. },
  27778. "SessionMessageAssistant": {
  27779. "type": "object",
  27780. "properties": {
  27781. "id": {
  27782. "type": "string",
  27783. "pattern": "^msg_"
  27784. },
  27785. "metadata": {
  27786. "type": "object"
  27787. },
  27788. "time": {
  27789. "type": "object",
  27790. "properties": {
  27791. "created": {
  27792. "type": "number"
  27793. },
  27794. "completed": {
  27795. "type": "number"
  27796. }
  27797. },
  27798. "required": ["created"],
  27799. "additionalProperties": false
  27800. },
  27801. "type": {
  27802. "type": "string",
  27803. "enum": ["assistant"]
  27804. },
  27805. "agent": {
  27806. "type": "string"
  27807. },
  27808. "model": {
  27809. "$ref": "#/components/schemas/ModelRef"
  27810. },
  27811. "content": {
  27812. "type": "array",
  27813. "items": {
  27814. "anyOf": [
  27815. {
  27816. "$ref": "#/components/schemas/SessionMessageAssistantText"
  27817. },
  27818. {
  27819. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  27820. },
  27821. {
  27822. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  27823. }
  27824. ]
  27825. }
  27826. },
  27827. "snapshot": {
  27828. "type": "object",
  27829. "properties": {
  27830. "start": {
  27831. "type": "string"
  27832. },
  27833. "end": {
  27834. "type": "string"
  27835. },
  27836. "files": {
  27837. "type": "array",
  27838. "items": {
  27839. "type": "string"
  27840. }
  27841. }
  27842. },
  27843. "additionalProperties": false
  27844. },
  27845. "finish": {
  27846. "type": "string"
  27847. },
  27848. "cost": {
  27849. "type": "number"
  27850. },
  27851. "tokens": {
  27852. "type": "object",
  27853. "properties": {
  27854. "input": {
  27855. "type": "number"
  27856. },
  27857. "output": {
  27858. "type": "number"
  27859. },
  27860. "reasoning": {
  27861. "type": "number"
  27862. },
  27863. "cache": {
  27864. "type": "object",
  27865. "properties": {
  27866. "read": {
  27867. "type": "number"
  27868. },
  27869. "write": {
  27870. "type": "number"
  27871. }
  27872. },
  27873. "required": ["read", "write"],
  27874. "additionalProperties": false
  27875. }
  27876. },
  27877. "required": ["input", "output", "reasoning", "cache"],
  27878. "additionalProperties": false
  27879. },
  27880. "error": {
  27881. "$ref": "#/components/schemas/SessionErrorUnknown"
  27882. }
  27883. },
  27884. "required": ["id", "time", "type", "agent", "model", "content"],
  27885. "additionalProperties": false
  27886. },
  27887. "SessionMessageCompaction": {
  27888. "type": "object",
  27889. "properties": {
  27890. "type": {
  27891. "type": "string",
  27892. "enum": ["compaction"]
  27893. },
  27894. "reason": {
  27895. "type": "string",
  27896. "enum": ["auto", "manual"]
  27897. },
  27898. "summary": {
  27899. "type": "string"
  27900. },
  27901. "recent": {
  27902. "type": "string"
  27903. },
  27904. "id": {
  27905. "type": "string",
  27906. "pattern": "^msg_"
  27907. },
  27908. "metadata": {
  27909. "type": "object"
  27910. },
  27911. "time": {
  27912. "type": "object",
  27913. "properties": {
  27914. "created": {
  27915. "type": "number"
  27916. }
  27917. },
  27918. "required": ["created"],
  27919. "additionalProperties": false
  27920. }
  27921. },
  27922. "required": ["type", "reason", "summary", "recent", "id", "time"],
  27923. "additionalProperties": false
  27924. },
  27925. "SessionMessage": {
  27926. "anyOf": [
  27927. {
  27928. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  27929. },
  27930. {
  27931. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  27932. },
  27933. {
  27934. "$ref": "#/components/schemas/SessionMessageUser"
  27935. },
  27936. {
  27937. "$ref": "#/components/schemas/SessionMessageSynthetic"
  27938. },
  27939. {
  27940. "$ref": "#/components/schemas/SessionMessageSystem"
  27941. },
  27942. {
  27943. "$ref": "#/components/schemas/SessionMessageShell"
  27944. },
  27945. {
  27946. "$ref": "#/components/schemas/SessionMessageAssistant"
  27947. },
  27948. {
  27949. "$ref": "#/components/schemas/SessionMessageCompaction"
  27950. }
  27951. ]
  27952. },
  27953. "SessionNextAgentSwitched": {
  27954. "type": "object",
  27955. "properties": {
  27956. "id": {
  27957. "type": "string",
  27958. "pattern": "^evt_"
  27959. },
  27960. "metadata": {
  27961. "type": "object"
  27962. },
  27963. "type": {
  27964. "type": "string",
  27965. "enum": ["session.next.agent.switched"]
  27966. },
  27967. "durable": {
  27968. "type": "object",
  27969. "properties": {
  27970. "aggregateID": {
  27971. "type": "string"
  27972. },
  27973. "seq": {
  27974. "type": "integer"
  27975. },
  27976. "version": {
  27977. "type": "integer"
  27978. }
  27979. },
  27980. "required": ["aggregateID", "seq", "version"],
  27981. "additionalProperties": false
  27982. },
  27983. "location": {
  27984. "$ref": "#/components/schemas/LocationRef"
  27985. },
  27986. "data": {
  27987. "type": "object",
  27988. "properties": {
  27989. "timestamp": {
  27990. "type": "number"
  27991. },
  27992. "sessionID": {
  27993. "type": "string",
  27994. "pattern": "^ses"
  27995. },
  27996. "messageID": {
  27997. "type": "string",
  27998. "pattern": "^msg_"
  27999. },
  28000. "agent": {
  28001. "type": "string"
  28002. }
  28003. },
  28004. "required": ["timestamp", "sessionID", "messageID", "agent"],
  28005. "additionalProperties": false
  28006. }
  28007. },
  28008. "required": ["id", "type", "data"],
  28009. "additionalProperties": false
  28010. },
  28011. "SessionNextModelSwitched": {
  28012. "type": "object",
  28013. "properties": {
  28014. "id": {
  28015. "type": "string",
  28016. "pattern": "^evt_"
  28017. },
  28018. "metadata": {
  28019. "type": "object"
  28020. },
  28021. "type": {
  28022. "type": "string",
  28023. "enum": ["session.next.model.switched"]
  28024. },
  28025. "durable": {
  28026. "type": "object",
  28027. "properties": {
  28028. "aggregateID": {
  28029. "type": "string"
  28030. },
  28031. "seq": {
  28032. "type": "integer"
  28033. },
  28034. "version": {
  28035. "type": "integer"
  28036. }
  28037. },
  28038. "required": ["aggregateID", "seq", "version"],
  28039. "additionalProperties": false
  28040. },
  28041. "location": {
  28042. "$ref": "#/components/schemas/LocationRef"
  28043. },
  28044. "data": {
  28045. "type": "object",
  28046. "properties": {
  28047. "timestamp": {
  28048. "type": "number"
  28049. },
  28050. "sessionID": {
  28051. "type": "string",
  28052. "pattern": "^ses"
  28053. },
  28054. "messageID": {
  28055. "type": "string",
  28056. "pattern": "^msg_"
  28057. },
  28058. "model": {
  28059. "$ref": "#/components/schemas/ModelRef"
  28060. }
  28061. },
  28062. "required": ["timestamp", "sessionID", "messageID", "model"],
  28063. "additionalProperties": false
  28064. }
  28065. },
  28066. "required": ["id", "type", "data"],
  28067. "additionalProperties": false
  28068. },
  28069. "SessionNextMoved": {
  28070. "type": "object",
  28071. "properties": {
  28072. "id": {
  28073. "type": "string",
  28074. "pattern": "^evt_"
  28075. },
  28076. "metadata": {
  28077. "type": "object"
  28078. },
  28079. "type": {
  28080. "type": "string",
  28081. "enum": ["session.next.moved"]
  28082. },
  28083. "durable": {
  28084. "type": "object",
  28085. "properties": {
  28086. "aggregateID": {
  28087. "type": "string"
  28088. },
  28089. "seq": {
  28090. "type": "integer"
  28091. },
  28092. "version": {
  28093. "type": "integer"
  28094. }
  28095. },
  28096. "required": ["aggregateID", "seq", "version"],
  28097. "additionalProperties": false
  28098. },
  28099. "location": {
  28100. "$ref": "#/components/schemas/LocationRef"
  28101. },
  28102. "data": {
  28103. "type": "object",
  28104. "properties": {
  28105. "timestamp": {
  28106. "type": "number"
  28107. },
  28108. "sessionID": {
  28109. "type": "string",
  28110. "pattern": "^ses"
  28111. },
  28112. "location": {
  28113. "$ref": "#/components/schemas/LocationRef"
  28114. },
  28115. "subdirectory": {
  28116. "type": "string"
  28117. }
  28118. },
  28119. "required": ["timestamp", "sessionID", "location"],
  28120. "additionalProperties": false
  28121. }
  28122. },
  28123. "required": ["id", "type", "data"],
  28124. "additionalProperties": false
  28125. },
  28126. "SessionNextPrompted": {
  28127. "type": "object",
  28128. "properties": {
  28129. "id": {
  28130. "type": "string",
  28131. "pattern": "^evt_"
  28132. },
  28133. "metadata": {
  28134. "type": "object"
  28135. },
  28136. "type": {
  28137. "type": "string",
  28138. "enum": ["session.next.prompted"]
  28139. },
  28140. "durable": {
  28141. "type": "object",
  28142. "properties": {
  28143. "aggregateID": {
  28144. "type": "string"
  28145. },
  28146. "seq": {
  28147. "type": "integer"
  28148. },
  28149. "version": {
  28150. "type": "integer"
  28151. }
  28152. },
  28153. "required": ["aggregateID", "seq", "version"],
  28154. "additionalProperties": false
  28155. },
  28156. "location": {
  28157. "$ref": "#/components/schemas/LocationRef"
  28158. },
  28159. "data": {
  28160. "type": "object",
  28161. "properties": {
  28162. "timestamp": {
  28163. "type": "number"
  28164. },
  28165. "sessionID": {
  28166. "type": "string",
  28167. "pattern": "^ses"
  28168. },
  28169. "messageID": {
  28170. "type": "string",
  28171. "pattern": "^msg_"
  28172. },
  28173. "prompt": {
  28174. "$ref": "#/components/schemas/Prompt"
  28175. },
  28176. "delivery": {
  28177. "type": "string",
  28178. "enum": ["steer", "queue"]
  28179. }
  28180. },
  28181. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28182. "additionalProperties": false
  28183. }
  28184. },
  28185. "required": ["id", "type", "data"],
  28186. "additionalProperties": false
  28187. },
  28188. "SessionNextPromptAdmitted": {
  28189. "type": "object",
  28190. "properties": {
  28191. "id": {
  28192. "type": "string",
  28193. "pattern": "^evt_"
  28194. },
  28195. "metadata": {
  28196. "type": "object"
  28197. },
  28198. "type": {
  28199. "type": "string",
  28200. "enum": ["session.next.prompt.admitted"]
  28201. },
  28202. "durable": {
  28203. "type": "object",
  28204. "properties": {
  28205. "aggregateID": {
  28206. "type": "string"
  28207. },
  28208. "seq": {
  28209. "type": "integer"
  28210. },
  28211. "version": {
  28212. "type": "integer"
  28213. }
  28214. },
  28215. "required": ["aggregateID", "seq", "version"],
  28216. "additionalProperties": false
  28217. },
  28218. "location": {
  28219. "$ref": "#/components/schemas/LocationRef"
  28220. },
  28221. "data": {
  28222. "type": "object",
  28223. "properties": {
  28224. "timestamp": {
  28225. "type": "number"
  28226. },
  28227. "sessionID": {
  28228. "type": "string",
  28229. "pattern": "^ses"
  28230. },
  28231. "messageID": {
  28232. "type": "string",
  28233. "pattern": "^msg_"
  28234. },
  28235. "prompt": {
  28236. "$ref": "#/components/schemas/Prompt"
  28237. },
  28238. "delivery": {
  28239. "type": "string",
  28240. "enum": ["steer", "queue"]
  28241. }
  28242. },
  28243. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28244. "additionalProperties": false
  28245. }
  28246. },
  28247. "required": ["id", "type", "data"],
  28248. "additionalProperties": false
  28249. },
  28250. "SessionNextContextUpdated": {
  28251. "type": "object",
  28252. "properties": {
  28253. "id": {
  28254. "type": "string",
  28255. "pattern": "^evt_"
  28256. },
  28257. "metadata": {
  28258. "type": "object"
  28259. },
  28260. "type": {
  28261. "type": "string",
  28262. "enum": ["session.next.context.updated"]
  28263. },
  28264. "durable": {
  28265. "type": "object",
  28266. "properties": {
  28267. "aggregateID": {
  28268. "type": "string"
  28269. },
  28270. "seq": {
  28271. "type": "integer"
  28272. },
  28273. "version": {
  28274. "type": "integer"
  28275. }
  28276. },
  28277. "required": ["aggregateID", "seq", "version"],
  28278. "additionalProperties": false
  28279. },
  28280. "location": {
  28281. "$ref": "#/components/schemas/LocationRef"
  28282. },
  28283. "data": {
  28284. "type": "object",
  28285. "properties": {
  28286. "timestamp": {
  28287. "type": "number"
  28288. },
  28289. "sessionID": {
  28290. "type": "string",
  28291. "pattern": "^ses"
  28292. },
  28293. "messageID": {
  28294. "type": "string",
  28295. "pattern": "^msg_"
  28296. },
  28297. "text": {
  28298. "type": "string"
  28299. }
  28300. },
  28301. "required": ["timestamp", "sessionID", "messageID", "text"],
  28302. "additionalProperties": false
  28303. }
  28304. },
  28305. "required": ["id", "type", "data"],
  28306. "additionalProperties": false
  28307. },
  28308. "SessionNextSynthetic": {
  28309. "type": "object",
  28310. "properties": {
  28311. "id": {
  28312. "type": "string",
  28313. "pattern": "^evt_"
  28314. },
  28315. "metadata": {
  28316. "type": "object"
  28317. },
  28318. "type": {
  28319. "type": "string",
  28320. "enum": ["session.next.synthetic"]
  28321. },
  28322. "durable": {
  28323. "type": "object",
  28324. "properties": {
  28325. "aggregateID": {
  28326. "type": "string"
  28327. },
  28328. "seq": {
  28329. "type": "integer"
  28330. },
  28331. "version": {
  28332. "type": "integer"
  28333. }
  28334. },
  28335. "required": ["aggregateID", "seq", "version"],
  28336. "additionalProperties": false
  28337. },
  28338. "location": {
  28339. "$ref": "#/components/schemas/LocationRef"
  28340. },
  28341. "data": {
  28342. "type": "object",
  28343. "properties": {
  28344. "timestamp": {
  28345. "type": "number"
  28346. },
  28347. "sessionID": {
  28348. "type": "string",
  28349. "pattern": "^ses"
  28350. },
  28351. "messageID": {
  28352. "type": "string",
  28353. "pattern": "^msg_"
  28354. },
  28355. "text": {
  28356. "type": "string"
  28357. }
  28358. },
  28359. "required": ["timestamp", "sessionID", "messageID", "text"],
  28360. "additionalProperties": false
  28361. }
  28362. },
  28363. "required": ["id", "type", "data"],
  28364. "additionalProperties": false
  28365. },
  28366. "SessionNextShellStarted": {
  28367. "type": "object",
  28368. "properties": {
  28369. "id": {
  28370. "type": "string",
  28371. "pattern": "^evt_"
  28372. },
  28373. "metadata": {
  28374. "type": "object"
  28375. },
  28376. "type": {
  28377. "type": "string",
  28378. "enum": ["session.next.shell.started"]
  28379. },
  28380. "durable": {
  28381. "type": "object",
  28382. "properties": {
  28383. "aggregateID": {
  28384. "type": "string"
  28385. },
  28386. "seq": {
  28387. "type": "integer"
  28388. },
  28389. "version": {
  28390. "type": "integer"
  28391. }
  28392. },
  28393. "required": ["aggregateID", "seq", "version"],
  28394. "additionalProperties": false
  28395. },
  28396. "location": {
  28397. "$ref": "#/components/schemas/LocationRef"
  28398. },
  28399. "data": {
  28400. "type": "object",
  28401. "properties": {
  28402. "timestamp": {
  28403. "type": "number"
  28404. },
  28405. "sessionID": {
  28406. "type": "string",
  28407. "pattern": "^ses"
  28408. },
  28409. "messageID": {
  28410. "type": "string",
  28411. "pattern": "^msg_"
  28412. },
  28413. "callID": {
  28414. "type": "string"
  28415. },
  28416. "command": {
  28417. "type": "string"
  28418. }
  28419. },
  28420. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28421. "additionalProperties": false
  28422. }
  28423. },
  28424. "required": ["id", "type", "data"],
  28425. "additionalProperties": false
  28426. },
  28427. "SessionNextShellEnded": {
  28428. "type": "object",
  28429. "properties": {
  28430. "id": {
  28431. "type": "string",
  28432. "pattern": "^evt_"
  28433. },
  28434. "metadata": {
  28435. "type": "object"
  28436. },
  28437. "type": {
  28438. "type": "string",
  28439. "enum": ["session.next.shell.ended"]
  28440. },
  28441. "durable": {
  28442. "type": "object",
  28443. "properties": {
  28444. "aggregateID": {
  28445. "type": "string"
  28446. },
  28447. "seq": {
  28448. "type": "integer"
  28449. },
  28450. "version": {
  28451. "type": "integer"
  28452. }
  28453. },
  28454. "required": ["aggregateID", "seq", "version"],
  28455. "additionalProperties": false
  28456. },
  28457. "location": {
  28458. "$ref": "#/components/schemas/LocationRef"
  28459. },
  28460. "data": {
  28461. "type": "object",
  28462. "properties": {
  28463. "timestamp": {
  28464. "type": "number"
  28465. },
  28466. "sessionID": {
  28467. "type": "string",
  28468. "pattern": "^ses"
  28469. },
  28470. "callID": {
  28471. "type": "string"
  28472. },
  28473. "output": {
  28474. "type": "string"
  28475. }
  28476. },
  28477. "required": ["timestamp", "sessionID", "callID", "output"],
  28478. "additionalProperties": false
  28479. }
  28480. },
  28481. "required": ["id", "type", "data"],
  28482. "additionalProperties": false
  28483. },
  28484. "SessionNextStepStarted": {
  28485. "type": "object",
  28486. "properties": {
  28487. "id": {
  28488. "type": "string",
  28489. "pattern": "^evt_"
  28490. },
  28491. "metadata": {
  28492. "type": "object"
  28493. },
  28494. "type": {
  28495. "type": "string",
  28496. "enum": ["session.next.step.started"]
  28497. },
  28498. "durable": {
  28499. "type": "object",
  28500. "properties": {
  28501. "aggregateID": {
  28502. "type": "string"
  28503. },
  28504. "seq": {
  28505. "type": "integer"
  28506. },
  28507. "version": {
  28508. "type": "integer"
  28509. }
  28510. },
  28511. "required": ["aggregateID", "seq", "version"],
  28512. "additionalProperties": false
  28513. },
  28514. "location": {
  28515. "$ref": "#/components/schemas/LocationRef"
  28516. },
  28517. "data": {
  28518. "type": "object",
  28519. "properties": {
  28520. "timestamp": {
  28521. "type": "number"
  28522. },
  28523. "sessionID": {
  28524. "type": "string",
  28525. "pattern": "^ses"
  28526. },
  28527. "assistantMessageID": {
  28528. "type": "string",
  28529. "pattern": "^msg_"
  28530. },
  28531. "agent": {
  28532. "type": "string"
  28533. },
  28534. "model": {
  28535. "$ref": "#/components/schemas/ModelRef"
  28536. },
  28537. "snapshot": {
  28538. "type": "string"
  28539. }
  28540. },
  28541. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28542. "additionalProperties": false
  28543. }
  28544. },
  28545. "required": ["id", "type", "data"],
  28546. "additionalProperties": false
  28547. },
  28548. "SessionNextStepEnded": {
  28549. "type": "object",
  28550. "properties": {
  28551. "id": {
  28552. "type": "string",
  28553. "pattern": "^evt_"
  28554. },
  28555. "metadata": {
  28556. "type": "object"
  28557. },
  28558. "type": {
  28559. "type": "string",
  28560. "enum": ["session.next.step.ended"]
  28561. },
  28562. "durable": {
  28563. "type": "object",
  28564. "properties": {
  28565. "aggregateID": {
  28566. "type": "string"
  28567. },
  28568. "seq": {
  28569. "type": "integer"
  28570. },
  28571. "version": {
  28572. "type": "integer"
  28573. }
  28574. },
  28575. "required": ["aggregateID", "seq", "version"],
  28576. "additionalProperties": false
  28577. },
  28578. "location": {
  28579. "$ref": "#/components/schemas/LocationRef"
  28580. },
  28581. "data": {
  28582. "type": "object",
  28583. "properties": {
  28584. "timestamp": {
  28585. "type": "number"
  28586. },
  28587. "sessionID": {
  28588. "type": "string",
  28589. "pattern": "^ses"
  28590. },
  28591. "assistantMessageID": {
  28592. "type": "string",
  28593. "pattern": "^msg_"
  28594. },
  28595. "finish": {
  28596. "type": "string"
  28597. },
  28598. "cost": {
  28599. "type": "number"
  28600. },
  28601. "tokens": {
  28602. "type": "object",
  28603. "properties": {
  28604. "input": {
  28605. "type": "number"
  28606. },
  28607. "output": {
  28608. "type": "number"
  28609. },
  28610. "reasoning": {
  28611. "type": "number"
  28612. },
  28613. "cache": {
  28614. "type": "object",
  28615. "properties": {
  28616. "read": {
  28617. "type": "number"
  28618. },
  28619. "write": {
  28620. "type": "number"
  28621. }
  28622. },
  28623. "required": ["read", "write"],
  28624. "additionalProperties": false
  28625. }
  28626. },
  28627. "required": ["input", "output", "reasoning", "cache"],
  28628. "additionalProperties": false
  28629. },
  28630. "snapshot": {
  28631. "type": "string"
  28632. },
  28633. "files": {
  28634. "type": "array",
  28635. "items": {
  28636. "type": "string"
  28637. }
  28638. }
  28639. },
  28640. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28641. "additionalProperties": false
  28642. }
  28643. },
  28644. "required": ["id", "type", "data"],
  28645. "additionalProperties": false
  28646. },
  28647. "SessionNextStepFailed": {
  28648. "type": "object",
  28649. "properties": {
  28650. "id": {
  28651. "type": "string",
  28652. "pattern": "^evt_"
  28653. },
  28654. "metadata": {
  28655. "type": "object"
  28656. },
  28657. "type": {
  28658. "type": "string",
  28659. "enum": ["session.next.step.failed"]
  28660. },
  28661. "durable": {
  28662. "type": "object",
  28663. "properties": {
  28664. "aggregateID": {
  28665. "type": "string"
  28666. },
  28667. "seq": {
  28668. "type": "integer"
  28669. },
  28670. "version": {
  28671. "type": "integer"
  28672. }
  28673. },
  28674. "required": ["aggregateID", "seq", "version"],
  28675. "additionalProperties": false
  28676. },
  28677. "location": {
  28678. "$ref": "#/components/schemas/LocationRef"
  28679. },
  28680. "data": {
  28681. "type": "object",
  28682. "properties": {
  28683. "timestamp": {
  28684. "type": "number"
  28685. },
  28686. "sessionID": {
  28687. "type": "string",
  28688. "pattern": "^ses"
  28689. },
  28690. "assistantMessageID": {
  28691. "type": "string",
  28692. "pattern": "^msg_"
  28693. },
  28694. "error": {
  28695. "$ref": "#/components/schemas/SessionErrorUnknown"
  28696. }
  28697. },
  28698. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28699. "additionalProperties": false
  28700. }
  28701. },
  28702. "required": ["id", "type", "data"],
  28703. "additionalProperties": false
  28704. },
  28705. "SessionNextTextStarted": {
  28706. "type": "object",
  28707. "properties": {
  28708. "id": {
  28709. "type": "string",
  28710. "pattern": "^evt_"
  28711. },
  28712. "metadata": {
  28713. "type": "object"
  28714. },
  28715. "type": {
  28716. "type": "string",
  28717. "enum": ["session.next.text.started"]
  28718. },
  28719. "durable": {
  28720. "type": "object",
  28721. "properties": {
  28722. "aggregateID": {
  28723. "type": "string"
  28724. },
  28725. "seq": {
  28726. "type": "integer"
  28727. },
  28728. "version": {
  28729. "type": "integer"
  28730. }
  28731. },
  28732. "required": ["aggregateID", "seq", "version"],
  28733. "additionalProperties": false
  28734. },
  28735. "location": {
  28736. "$ref": "#/components/schemas/LocationRef"
  28737. },
  28738. "data": {
  28739. "type": "object",
  28740. "properties": {
  28741. "timestamp": {
  28742. "type": "number"
  28743. },
  28744. "sessionID": {
  28745. "type": "string",
  28746. "pattern": "^ses"
  28747. },
  28748. "assistantMessageID": {
  28749. "type": "string",
  28750. "pattern": "^msg_"
  28751. },
  28752. "textID": {
  28753. "type": "string"
  28754. }
  28755. },
  28756. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28757. "additionalProperties": false
  28758. }
  28759. },
  28760. "required": ["id", "type", "data"],
  28761. "additionalProperties": false
  28762. },
  28763. "SessionNextTextEnded": {
  28764. "type": "object",
  28765. "properties": {
  28766. "id": {
  28767. "type": "string",
  28768. "pattern": "^evt_"
  28769. },
  28770. "metadata": {
  28771. "type": "object"
  28772. },
  28773. "type": {
  28774. "type": "string",
  28775. "enum": ["session.next.text.ended"]
  28776. },
  28777. "durable": {
  28778. "type": "object",
  28779. "properties": {
  28780. "aggregateID": {
  28781. "type": "string"
  28782. },
  28783. "seq": {
  28784. "type": "integer"
  28785. },
  28786. "version": {
  28787. "type": "integer"
  28788. }
  28789. },
  28790. "required": ["aggregateID", "seq", "version"],
  28791. "additionalProperties": false
  28792. },
  28793. "location": {
  28794. "$ref": "#/components/schemas/LocationRef"
  28795. },
  28796. "data": {
  28797. "type": "object",
  28798. "properties": {
  28799. "timestamp": {
  28800. "type": "number"
  28801. },
  28802. "sessionID": {
  28803. "type": "string",
  28804. "pattern": "^ses"
  28805. },
  28806. "assistantMessageID": {
  28807. "type": "string",
  28808. "pattern": "^msg_"
  28809. },
  28810. "textID": {
  28811. "type": "string"
  28812. },
  28813. "text": {
  28814. "type": "string"
  28815. }
  28816. },
  28817. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28818. "additionalProperties": false
  28819. }
  28820. },
  28821. "required": ["id", "type", "data"],
  28822. "additionalProperties": false
  28823. },
  28824. "SessionNextToolInputStarted": {
  28825. "type": "object",
  28826. "properties": {
  28827. "id": {
  28828. "type": "string",
  28829. "pattern": "^evt_"
  28830. },
  28831. "metadata": {
  28832. "type": "object"
  28833. },
  28834. "type": {
  28835. "type": "string",
  28836. "enum": ["session.next.tool.input.started"]
  28837. },
  28838. "durable": {
  28839. "type": "object",
  28840. "properties": {
  28841. "aggregateID": {
  28842. "type": "string"
  28843. },
  28844. "seq": {
  28845. "type": "integer"
  28846. },
  28847. "version": {
  28848. "type": "integer"
  28849. }
  28850. },
  28851. "required": ["aggregateID", "seq", "version"],
  28852. "additionalProperties": false
  28853. },
  28854. "location": {
  28855. "$ref": "#/components/schemas/LocationRef"
  28856. },
  28857. "data": {
  28858. "type": "object",
  28859. "properties": {
  28860. "timestamp": {
  28861. "type": "number"
  28862. },
  28863. "sessionID": {
  28864. "type": "string",
  28865. "pattern": "^ses"
  28866. },
  28867. "assistantMessageID": {
  28868. "type": "string",
  28869. "pattern": "^msg_"
  28870. },
  28871. "callID": {
  28872. "type": "string"
  28873. },
  28874. "name": {
  28875. "type": "string"
  28876. }
  28877. },
  28878. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28879. "additionalProperties": false
  28880. }
  28881. },
  28882. "required": ["id", "type", "data"],
  28883. "additionalProperties": false
  28884. },
  28885. "SessionNextToolInputEnded": {
  28886. "type": "object",
  28887. "properties": {
  28888. "id": {
  28889. "type": "string",
  28890. "pattern": "^evt_"
  28891. },
  28892. "metadata": {
  28893. "type": "object"
  28894. },
  28895. "type": {
  28896. "type": "string",
  28897. "enum": ["session.next.tool.input.ended"]
  28898. },
  28899. "durable": {
  28900. "type": "object",
  28901. "properties": {
  28902. "aggregateID": {
  28903. "type": "string"
  28904. },
  28905. "seq": {
  28906. "type": "integer"
  28907. },
  28908. "version": {
  28909. "type": "integer"
  28910. }
  28911. },
  28912. "required": ["aggregateID", "seq", "version"],
  28913. "additionalProperties": false
  28914. },
  28915. "location": {
  28916. "$ref": "#/components/schemas/LocationRef"
  28917. },
  28918. "data": {
  28919. "type": "object",
  28920. "properties": {
  28921. "timestamp": {
  28922. "type": "number"
  28923. },
  28924. "sessionID": {
  28925. "type": "string",
  28926. "pattern": "^ses"
  28927. },
  28928. "assistantMessageID": {
  28929. "type": "string",
  28930. "pattern": "^msg_"
  28931. },
  28932. "callID": {
  28933. "type": "string"
  28934. },
  28935. "text": {
  28936. "type": "string"
  28937. }
  28938. },
  28939. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  28940. "additionalProperties": false
  28941. }
  28942. },
  28943. "required": ["id", "type", "data"],
  28944. "additionalProperties": false
  28945. },
  28946. "SessionNextToolCalled": {
  28947. "type": "object",
  28948. "properties": {
  28949. "id": {
  28950. "type": "string",
  28951. "pattern": "^evt_"
  28952. },
  28953. "metadata": {
  28954. "type": "object"
  28955. },
  28956. "type": {
  28957. "type": "string",
  28958. "enum": ["session.next.tool.called"]
  28959. },
  28960. "durable": {
  28961. "type": "object",
  28962. "properties": {
  28963. "aggregateID": {
  28964. "type": "string"
  28965. },
  28966. "seq": {
  28967. "type": "integer"
  28968. },
  28969. "version": {
  28970. "type": "integer"
  28971. }
  28972. },
  28973. "required": ["aggregateID", "seq", "version"],
  28974. "additionalProperties": false
  28975. },
  28976. "location": {
  28977. "$ref": "#/components/schemas/LocationRef"
  28978. },
  28979. "data": {
  28980. "type": "object",
  28981. "properties": {
  28982. "timestamp": {
  28983. "type": "number"
  28984. },
  28985. "sessionID": {
  28986. "type": "string",
  28987. "pattern": "^ses"
  28988. },
  28989. "assistantMessageID": {
  28990. "type": "string",
  28991. "pattern": "^msg_"
  28992. },
  28993. "callID": {
  28994. "type": "string"
  28995. },
  28996. "tool": {
  28997. "type": "string"
  28998. },
  28999. "input": {
  29000. "type": "object"
  29001. },
  29002. "provider": {
  29003. "type": "object",
  29004. "properties": {
  29005. "executed": {
  29006. "type": "boolean"
  29007. },
  29008. "metadata": {
  29009. "$ref": "#/components/schemas/LLMProviderMetadata"
  29010. }
  29011. },
  29012. "required": ["executed"],
  29013. "additionalProperties": false
  29014. }
  29015. },
  29016. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29017. "additionalProperties": false
  29018. }
  29019. },
  29020. "required": ["id", "type", "data"],
  29021. "additionalProperties": false
  29022. },
  29023. "SessionNextToolProgress": {
  29024. "type": "object",
  29025. "properties": {
  29026. "id": {
  29027. "type": "string",
  29028. "pattern": "^evt_"
  29029. },
  29030. "metadata": {
  29031. "type": "object"
  29032. },
  29033. "type": {
  29034. "type": "string",
  29035. "enum": ["session.next.tool.progress"]
  29036. },
  29037. "durable": {
  29038. "type": "object",
  29039. "properties": {
  29040. "aggregateID": {
  29041. "type": "string"
  29042. },
  29043. "seq": {
  29044. "type": "integer"
  29045. },
  29046. "version": {
  29047. "type": "integer"
  29048. }
  29049. },
  29050. "required": ["aggregateID", "seq", "version"],
  29051. "additionalProperties": false
  29052. },
  29053. "location": {
  29054. "$ref": "#/components/schemas/LocationRef"
  29055. },
  29056. "data": {
  29057. "type": "object",
  29058. "properties": {
  29059. "timestamp": {
  29060. "type": "number"
  29061. },
  29062. "sessionID": {
  29063. "type": "string",
  29064. "pattern": "^ses"
  29065. },
  29066. "assistantMessageID": {
  29067. "type": "string",
  29068. "pattern": "^msg_"
  29069. },
  29070. "callID": {
  29071. "type": "string"
  29072. },
  29073. "structured": {
  29074. "type": "object"
  29075. },
  29076. "content": {
  29077. "type": "array",
  29078. "items": {
  29079. "$ref": "#/components/schemas/LLMToolContent"
  29080. }
  29081. }
  29082. },
  29083. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29084. "additionalProperties": false
  29085. }
  29086. },
  29087. "required": ["id", "type", "data"],
  29088. "additionalProperties": false
  29089. },
  29090. "SessionNextToolSuccess": {
  29091. "type": "object",
  29092. "properties": {
  29093. "id": {
  29094. "type": "string",
  29095. "pattern": "^evt_"
  29096. },
  29097. "metadata": {
  29098. "type": "object"
  29099. },
  29100. "type": {
  29101. "type": "string",
  29102. "enum": ["session.next.tool.success"]
  29103. },
  29104. "durable": {
  29105. "type": "object",
  29106. "properties": {
  29107. "aggregateID": {
  29108. "type": "string"
  29109. },
  29110. "seq": {
  29111. "type": "integer"
  29112. },
  29113. "version": {
  29114. "type": "integer"
  29115. }
  29116. },
  29117. "required": ["aggregateID", "seq", "version"],
  29118. "additionalProperties": false
  29119. },
  29120. "location": {
  29121. "$ref": "#/components/schemas/LocationRef"
  29122. },
  29123. "data": {
  29124. "type": "object",
  29125. "properties": {
  29126. "timestamp": {
  29127. "type": "number"
  29128. },
  29129. "sessionID": {
  29130. "type": "string",
  29131. "pattern": "^ses"
  29132. },
  29133. "assistantMessageID": {
  29134. "type": "string",
  29135. "pattern": "^msg_"
  29136. },
  29137. "callID": {
  29138. "type": "string"
  29139. },
  29140. "structured": {
  29141. "type": "object"
  29142. },
  29143. "content": {
  29144. "type": "array",
  29145. "items": {
  29146. "$ref": "#/components/schemas/LLMToolContent"
  29147. }
  29148. },
  29149. "outputPaths": {
  29150. "type": "array",
  29151. "items": {
  29152. "type": "string"
  29153. }
  29154. },
  29155. "result": {},
  29156. "provider": {
  29157. "type": "object",
  29158. "properties": {
  29159. "executed": {
  29160. "type": "boolean"
  29161. },
  29162. "metadata": {
  29163. "$ref": "#/components/schemas/LLMProviderMetadata"
  29164. }
  29165. },
  29166. "required": ["executed"],
  29167. "additionalProperties": false
  29168. }
  29169. },
  29170. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29171. "additionalProperties": false
  29172. }
  29173. },
  29174. "required": ["id", "type", "data"],
  29175. "additionalProperties": false
  29176. },
  29177. "SessionNextToolFailed": {
  29178. "type": "object",
  29179. "properties": {
  29180. "id": {
  29181. "type": "string",
  29182. "pattern": "^evt_"
  29183. },
  29184. "metadata": {
  29185. "type": "object"
  29186. },
  29187. "type": {
  29188. "type": "string",
  29189. "enum": ["session.next.tool.failed"]
  29190. },
  29191. "durable": {
  29192. "type": "object",
  29193. "properties": {
  29194. "aggregateID": {
  29195. "type": "string"
  29196. },
  29197. "seq": {
  29198. "type": "integer"
  29199. },
  29200. "version": {
  29201. "type": "integer"
  29202. }
  29203. },
  29204. "required": ["aggregateID", "seq", "version"],
  29205. "additionalProperties": false
  29206. },
  29207. "location": {
  29208. "$ref": "#/components/schemas/LocationRef"
  29209. },
  29210. "data": {
  29211. "type": "object",
  29212. "properties": {
  29213. "timestamp": {
  29214. "type": "number"
  29215. },
  29216. "sessionID": {
  29217. "type": "string",
  29218. "pattern": "^ses"
  29219. },
  29220. "assistantMessageID": {
  29221. "type": "string",
  29222. "pattern": "^msg_"
  29223. },
  29224. "callID": {
  29225. "type": "string"
  29226. },
  29227. "error": {
  29228. "$ref": "#/components/schemas/SessionErrorUnknown"
  29229. },
  29230. "result": {},
  29231. "provider": {
  29232. "type": "object",
  29233. "properties": {
  29234. "executed": {
  29235. "type": "boolean"
  29236. },
  29237. "metadata": {
  29238. "$ref": "#/components/schemas/LLMProviderMetadata"
  29239. }
  29240. },
  29241. "required": ["executed"],
  29242. "additionalProperties": false
  29243. }
  29244. },
  29245. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29246. "additionalProperties": false
  29247. }
  29248. },
  29249. "required": ["id", "type", "data"],
  29250. "additionalProperties": false
  29251. },
  29252. "SessionNextReasoningStarted": {
  29253. "type": "object",
  29254. "properties": {
  29255. "id": {
  29256. "type": "string",
  29257. "pattern": "^evt_"
  29258. },
  29259. "metadata": {
  29260. "type": "object"
  29261. },
  29262. "type": {
  29263. "type": "string",
  29264. "enum": ["session.next.reasoning.started"]
  29265. },
  29266. "durable": {
  29267. "type": "object",
  29268. "properties": {
  29269. "aggregateID": {
  29270. "type": "string"
  29271. },
  29272. "seq": {
  29273. "type": "integer"
  29274. },
  29275. "version": {
  29276. "type": "integer"
  29277. }
  29278. },
  29279. "required": ["aggregateID", "seq", "version"],
  29280. "additionalProperties": false
  29281. },
  29282. "location": {
  29283. "$ref": "#/components/schemas/LocationRef"
  29284. },
  29285. "data": {
  29286. "type": "object",
  29287. "properties": {
  29288. "timestamp": {
  29289. "type": "number"
  29290. },
  29291. "sessionID": {
  29292. "type": "string",
  29293. "pattern": "^ses"
  29294. },
  29295. "assistantMessageID": {
  29296. "type": "string",
  29297. "pattern": "^msg_"
  29298. },
  29299. "reasoningID": {
  29300. "type": "string"
  29301. },
  29302. "providerMetadata": {
  29303. "$ref": "#/components/schemas/LLMProviderMetadata"
  29304. }
  29305. },
  29306. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29307. "additionalProperties": false
  29308. }
  29309. },
  29310. "required": ["id", "type", "data"],
  29311. "additionalProperties": false
  29312. },
  29313. "SessionNextReasoningEnded": {
  29314. "type": "object",
  29315. "properties": {
  29316. "id": {
  29317. "type": "string",
  29318. "pattern": "^evt_"
  29319. },
  29320. "metadata": {
  29321. "type": "object"
  29322. },
  29323. "type": {
  29324. "type": "string",
  29325. "enum": ["session.next.reasoning.ended"]
  29326. },
  29327. "durable": {
  29328. "type": "object",
  29329. "properties": {
  29330. "aggregateID": {
  29331. "type": "string"
  29332. },
  29333. "seq": {
  29334. "type": "integer"
  29335. },
  29336. "version": {
  29337. "type": "integer"
  29338. }
  29339. },
  29340. "required": ["aggregateID", "seq", "version"],
  29341. "additionalProperties": false
  29342. },
  29343. "location": {
  29344. "$ref": "#/components/schemas/LocationRef"
  29345. },
  29346. "data": {
  29347. "type": "object",
  29348. "properties": {
  29349. "timestamp": {
  29350. "type": "number"
  29351. },
  29352. "sessionID": {
  29353. "type": "string",
  29354. "pattern": "^ses"
  29355. },
  29356. "assistantMessageID": {
  29357. "type": "string",
  29358. "pattern": "^msg_"
  29359. },
  29360. "reasoningID": {
  29361. "type": "string"
  29362. },
  29363. "text": {
  29364. "type": "string"
  29365. },
  29366. "providerMetadata": {
  29367. "$ref": "#/components/schemas/LLMProviderMetadata"
  29368. }
  29369. },
  29370. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29371. "additionalProperties": false
  29372. }
  29373. },
  29374. "required": ["id", "type", "data"],
  29375. "additionalProperties": false
  29376. },
  29377. "SessionNextRetried": {
  29378. "type": "object",
  29379. "properties": {
  29380. "id": {
  29381. "type": "string",
  29382. "pattern": "^evt_"
  29383. },
  29384. "metadata": {
  29385. "type": "object"
  29386. },
  29387. "type": {
  29388. "type": "string",
  29389. "enum": ["session.next.retried"]
  29390. },
  29391. "durable": {
  29392. "type": "object",
  29393. "properties": {
  29394. "aggregateID": {
  29395. "type": "string"
  29396. },
  29397. "seq": {
  29398. "type": "integer"
  29399. },
  29400. "version": {
  29401. "type": "integer"
  29402. }
  29403. },
  29404. "required": ["aggregateID", "seq", "version"],
  29405. "additionalProperties": false
  29406. },
  29407. "location": {
  29408. "$ref": "#/components/schemas/LocationRef"
  29409. },
  29410. "data": {
  29411. "type": "object",
  29412. "properties": {
  29413. "timestamp": {
  29414. "type": "number"
  29415. },
  29416. "sessionID": {
  29417. "type": "string",
  29418. "pattern": "^ses"
  29419. },
  29420. "attempt": {
  29421. "type": "number"
  29422. },
  29423. "error": {
  29424. "$ref": "#/components/schemas/SessionNextRetry_error"
  29425. }
  29426. },
  29427. "required": ["timestamp", "sessionID", "attempt", "error"],
  29428. "additionalProperties": false
  29429. }
  29430. },
  29431. "required": ["id", "type", "data"],
  29432. "additionalProperties": false
  29433. },
  29434. "SessionNextCompactionStarted": {
  29435. "type": "object",
  29436. "properties": {
  29437. "id": {
  29438. "type": "string",
  29439. "pattern": "^evt_"
  29440. },
  29441. "metadata": {
  29442. "type": "object"
  29443. },
  29444. "type": {
  29445. "type": "string",
  29446. "enum": ["session.next.compaction.started"]
  29447. },
  29448. "durable": {
  29449. "type": "object",
  29450. "properties": {
  29451. "aggregateID": {
  29452. "type": "string"
  29453. },
  29454. "seq": {
  29455. "type": "integer"
  29456. },
  29457. "version": {
  29458. "type": "integer"
  29459. }
  29460. },
  29461. "required": ["aggregateID", "seq", "version"],
  29462. "additionalProperties": false
  29463. },
  29464. "location": {
  29465. "$ref": "#/components/schemas/LocationRef"
  29466. },
  29467. "data": {
  29468. "type": "object",
  29469. "properties": {
  29470. "timestamp": {
  29471. "type": "number"
  29472. },
  29473. "sessionID": {
  29474. "type": "string",
  29475. "pattern": "^ses"
  29476. },
  29477. "messageID": {
  29478. "type": "string",
  29479. "pattern": "^msg_"
  29480. },
  29481. "reason": {
  29482. "type": "string",
  29483. "enum": ["auto", "manual"]
  29484. }
  29485. },
  29486. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29487. "additionalProperties": false
  29488. }
  29489. },
  29490. "required": ["id", "type", "data"],
  29491. "additionalProperties": false
  29492. },
  29493. "SessionNextCompactionEnded": {
  29494. "type": "object",
  29495. "properties": {
  29496. "id": {
  29497. "type": "string",
  29498. "pattern": "^evt_"
  29499. },
  29500. "metadata": {
  29501. "type": "object"
  29502. },
  29503. "type": {
  29504. "type": "string",
  29505. "enum": ["session.next.compaction.ended"]
  29506. },
  29507. "durable": {
  29508. "type": "object",
  29509. "properties": {
  29510. "aggregateID": {
  29511. "type": "string"
  29512. },
  29513. "seq": {
  29514. "type": "integer"
  29515. },
  29516. "version": {
  29517. "type": "integer"
  29518. }
  29519. },
  29520. "required": ["aggregateID", "seq", "version"],
  29521. "additionalProperties": false
  29522. },
  29523. "location": {
  29524. "$ref": "#/components/schemas/LocationRef"
  29525. },
  29526. "data": {
  29527. "type": "object",
  29528. "properties": {
  29529. "timestamp": {
  29530. "type": "number"
  29531. },
  29532. "sessionID": {
  29533. "type": "string",
  29534. "pattern": "^ses"
  29535. },
  29536. "messageID": {
  29537. "type": "string",
  29538. "pattern": "^msg_"
  29539. },
  29540. "reason": {
  29541. "type": "string",
  29542. "enum": ["auto", "manual"]
  29543. },
  29544. "text": {
  29545. "type": "string"
  29546. },
  29547. "recent": {
  29548. "type": "string"
  29549. }
  29550. },
  29551. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  29552. "additionalProperties": false
  29553. }
  29554. },
  29555. "required": ["id", "type", "data"],
  29556. "additionalProperties": false
  29557. },
  29558. "SessionNextRevertStaged": {
  29559. "type": "object",
  29560. "properties": {
  29561. "id": {
  29562. "type": "string",
  29563. "pattern": "^evt_"
  29564. },
  29565. "metadata": {
  29566. "type": "object"
  29567. },
  29568. "type": {
  29569. "type": "string",
  29570. "enum": ["session.next.revert.staged"]
  29571. },
  29572. "durable": {
  29573. "type": "object",
  29574. "properties": {
  29575. "aggregateID": {
  29576. "type": "string"
  29577. },
  29578. "seq": {
  29579. "type": "integer"
  29580. },
  29581. "version": {
  29582. "type": "integer"
  29583. }
  29584. },
  29585. "required": ["aggregateID", "seq", "version"],
  29586. "additionalProperties": false
  29587. },
  29588. "location": {
  29589. "$ref": "#/components/schemas/LocationRef"
  29590. },
  29591. "data": {
  29592. "type": "object",
  29593. "properties": {
  29594. "timestamp": {
  29595. "type": "number"
  29596. },
  29597. "sessionID": {
  29598. "type": "string",
  29599. "pattern": "^ses"
  29600. },
  29601. "revert": {
  29602. "$ref": "#/components/schemas/RevertState"
  29603. }
  29604. },
  29605. "required": ["timestamp", "sessionID", "revert"],
  29606. "additionalProperties": false
  29607. }
  29608. },
  29609. "required": ["id", "type", "data"],
  29610. "additionalProperties": false
  29611. },
  29612. "SessionNextRevertCleared": {
  29613. "type": "object",
  29614. "properties": {
  29615. "id": {
  29616. "type": "string",
  29617. "pattern": "^evt_"
  29618. },
  29619. "metadata": {
  29620. "type": "object"
  29621. },
  29622. "type": {
  29623. "type": "string",
  29624. "enum": ["session.next.revert.cleared"]
  29625. },
  29626. "durable": {
  29627. "type": "object",
  29628. "properties": {
  29629. "aggregateID": {
  29630. "type": "string"
  29631. },
  29632. "seq": {
  29633. "type": "integer"
  29634. },
  29635. "version": {
  29636. "type": "integer"
  29637. }
  29638. },
  29639. "required": ["aggregateID", "seq", "version"],
  29640. "additionalProperties": false
  29641. },
  29642. "location": {
  29643. "$ref": "#/components/schemas/LocationRef"
  29644. },
  29645. "data": {
  29646. "type": "object",
  29647. "properties": {
  29648. "timestamp": {
  29649. "type": "number"
  29650. },
  29651. "sessionID": {
  29652. "type": "string",
  29653. "pattern": "^ses"
  29654. }
  29655. },
  29656. "required": ["timestamp", "sessionID"],
  29657. "additionalProperties": false
  29658. }
  29659. },
  29660. "required": ["id", "type", "data"],
  29661. "additionalProperties": false
  29662. },
  29663. "SessionNextRevertCommitted": {
  29664. "type": "object",
  29665. "properties": {
  29666. "id": {
  29667. "type": "string",
  29668. "pattern": "^evt_"
  29669. },
  29670. "metadata": {
  29671. "type": "object"
  29672. },
  29673. "type": {
  29674. "type": "string",
  29675. "enum": ["session.next.revert.committed"]
  29676. },
  29677. "durable": {
  29678. "type": "object",
  29679. "properties": {
  29680. "aggregateID": {
  29681. "type": "string"
  29682. },
  29683. "seq": {
  29684. "type": "integer"
  29685. },
  29686. "version": {
  29687. "type": "integer"
  29688. }
  29689. },
  29690. "required": ["aggregateID", "seq", "version"],
  29691. "additionalProperties": false
  29692. },
  29693. "location": {
  29694. "$ref": "#/components/schemas/LocationRef"
  29695. },
  29696. "data": {
  29697. "type": "object",
  29698. "properties": {
  29699. "timestamp": {
  29700. "type": "number"
  29701. },
  29702. "sessionID": {
  29703. "type": "string",
  29704. "pattern": "^ses"
  29705. },
  29706. "messageID": {
  29707. "type": "string",
  29708. "pattern": "^msg_"
  29709. }
  29710. },
  29711. "required": ["timestamp", "sessionID", "messageID"],
  29712. "additionalProperties": false
  29713. }
  29714. },
  29715. "required": ["id", "type", "data"],
  29716. "additionalProperties": false
  29717. },
  29718. "ModelApi": {
  29719. "anyOf": [
  29720. {
  29721. "type": "object",
  29722. "properties": {
  29723. "id": {
  29724. "type": "string"
  29725. },
  29726. "type": {
  29727. "type": "string",
  29728. "enum": ["aisdk"]
  29729. },
  29730. "package": {
  29731. "type": "string"
  29732. },
  29733. "url": {
  29734. "type": "string"
  29735. },
  29736. "settings": {
  29737. "type": "object"
  29738. }
  29739. },
  29740. "required": ["id", "type", "package"],
  29741. "additionalProperties": false
  29742. },
  29743. {
  29744. "type": "object",
  29745. "properties": {
  29746. "id": {
  29747. "type": "string"
  29748. },
  29749. "type": {
  29750. "type": "string",
  29751. "enum": ["native"]
  29752. },
  29753. "url": {
  29754. "type": "string"
  29755. },
  29756. "settings": {
  29757. "type": "object"
  29758. }
  29759. },
  29760. "required": ["id", "type", "settings"],
  29761. "additionalProperties": false
  29762. }
  29763. ]
  29764. },
  29765. "ModelCapabilities": {
  29766. "type": "object",
  29767. "properties": {
  29768. "tools": {
  29769. "type": "boolean"
  29770. },
  29771. "input": {
  29772. "type": "array",
  29773. "items": {
  29774. "type": "string"
  29775. }
  29776. },
  29777. "output": {
  29778. "type": "array",
  29779. "items": {
  29780. "type": "string"
  29781. }
  29782. }
  29783. },
  29784. "required": ["tools", "input", "output"],
  29785. "additionalProperties": false
  29786. },
  29787. "ModelCost": {
  29788. "type": "object",
  29789. "properties": {
  29790. "tier": {
  29791. "type": "object",
  29792. "properties": {
  29793. "type": {
  29794. "type": "string",
  29795. "enum": ["context"]
  29796. },
  29797. "size": {
  29798. "type": "integer"
  29799. }
  29800. },
  29801. "required": ["type", "size"],
  29802. "additionalProperties": false
  29803. },
  29804. "input": {
  29805. "type": "number"
  29806. },
  29807. "output": {
  29808. "type": "number"
  29809. },
  29810. "cache": {
  29811. "type": "object",
  29812. "properties": {
  29813. "read": {
  29814. "type": "number"
  29815. },
  29816. "write": {
  29817. "type": "number"
  29818. }
  29819. },
  29820. "required": ["read", "write"],
  29821. "additionalProperties": false
  29822. }
  29823. },
  29824. "required": ["input", "output", "cache"],
  29825. "additionalProperties": false
  29826. },
  29827. "ModelV2Info": {
  29828. "type": "object",
  29829. "properties": {
  29830. "id": {
  29831. "type": "string"
  29832. },
  29833. "providerID": {
  29834. "type": "string"
  29835. },
  29836. "family": {
  29837. "type": "string"
  29838. },
  29839. "name": {
  29840. "type": "string"
  29841. },
  29842. "api": {
  29843. "$ref": "#/components/schemas/ModelApi"
  29844. },
  29845. "capabilities": {
  29846. "$ref": "#/components/schemas/ModelCapabilities"
  29847. },
  29848. "request": {
  29849. "type": "object",
  29850. "properties": {
  29851. "headers": {
  29852. "type": "object",
  29853. "additionalProperties": {
  29854. "type": "string"
  29855. }
  29856. },
  29857. "body": {
  29858. "type": "object"
  29859. },
  29860. "variant": {
  29861. "type": "string"
  29862. }
  29863. },
  29864. "required": ["headers", "body"],
  29865. "additionalProperties": false
  29866. },
  29867. "variants": {
  29868. "type": "array",
  29869. "items": {
  29870. "type": "object",
  29871. "properties": {
  29872. "id": {
  29873. "type": "string"
  29874. },
  29875. "headers": {
  29876. "type": "object",
  29877. "additionalProperties": {
  29878. "type": "string"
  29879. }
  29880. },
  29881. "body": {
  29882. "type": "object"
  29883. }
  29884. },
  29885. "required": ["id", "headers", "body"],
  29886. "additionalProperties": false
  29887. }
  29888. },
  29889. "time": {
  29890. "type": "object",
  29891. "properties": {
  29892. "released": {
  29893. "type": "number"
  29894. }
  29895. },
  29896. "required": ["released"],
  29897. "additionalProperties": false
  29898. },
  29899. "cost": {
  29900. "type": "array",
  29901. "items": {
  29902. "$ref": "#/components/schemas/ModelCost"
  29903. }
  29904. },
  29905. "status": {
  29906. "type": "string",
  29907. "enum": ["alpha", "beta", "deprecated", "active"]
  29908. },
  29909. "enabled": {
  29910. "type": "boolean"
  29911. },
  29912. "limit": {
  29913. "type": "object",
  29914. "properties": {
  29915. "context": {
  29916. "type": "integer"
  29917. },
  29918. "input": {
  29919. "type": "integer"
  29920. },
  29921. "output": {
  29922. "type": "integer"
  29923. }
  29924. },
  29925. "required": ["context", "output"],
  29926. "additionalProperties": false
  29927. }
  29928. },
  29929. "required": [
  29930. "id",
  29931. "providerID",
  29932. "name",
  29933. "api",
  29934. "capabilities",
  29935. "request",
  29936. "variants",
  29937. "time",
  29938. "cost",
  29939. "status",
  29940. "enabled",
  29941. "limit"
  29942. ],
  29943. "additionalProperties": false
  29944. },
  29945. "ProviderAISDK": {
  29946. "type": "object",
  29947. "properties": {
  29948. "type": {
  29949. "type": "string",
  29950. "enum": ["aisdk"]
  29951. },
  29952. "package": {
  29953. "type": "string"
  29954. },
  29955. "url": {
  29956. "type": "string"
  29957. },
  29958. "settings": {
  29959. "type": "object"
  29960. }
  29961. },
  29962. "required": ["type", "package"],
  29963. "additionalProperties": false
  29964. },
  29965. "ProviderNative": {
  29966. "type": "object",
  29967. "properties": {
  29968. "type": {
  29969. "type": "string",
  29970. "enum": ["native"]
  29971. },
  29972. "url": {
  29973. "type": "string"
  29974. },
  29975. "settings": {
  29976. "type": "object"
  29977. }
  29978. },
  29979. "required": ["type", "settings"],
  29980. "additionalProperties": false
  29981. },
  29982. "ProviderApi": {
  29983. "anyOf": [
  29984. {
  29985. "$ref": "#/components/schemas/ProviderAISDK"
  29986. },
  29987. {
  29988. "$ref": "#/components/schemas/ProviderNative"
  29989. }
  29990. ]
  29991. },
  29992. "ProviderV2Info": {
  29993. "type": "object",
  29994. "properties": {
  29995. "id": {
  29996. "type": "string"
  29997. },
  29998. "integrationID": {
  29999. "type": "string"
  30000. },
  30001. "name": {
  30002. "type": "string"
  30003. },
  30004. "disabled": {
  30005. "type": "boolean"
  30006. },
  30007. "api": {
  30008. "$ref": "#/components/schemas/ProviderApi"
  30009. },
  30010. "request": {
  30011. "$ref": "#/components/schemas/ProviderRequest"
  30012. }
  30013. },
  30014. "required": ["id", "name", "api", "request"],
  30015. "additionalProperties": false
  30016. },
  30017. "IntegrationWhen": {
  30018. "type": "object",
  30019. "properties": {
  30020. "key": {
  30021. "type": "string"
  30022. },
  30023. "op": {
  30024. "type": "string",
  30025. "enum": ["eq", "neq"]
  30026. },
  30027. "value": {
  30028. "type": "string"
  30029. }
  30030. },
  30031. "required": ["key", "op", "value"],
  30032. "additionalProperties": false
  30033. },
  30034. "IntegrationTextPrompt": {
  30035. "type": "object",
  30036. "properties": {
  30037. "type": {
  30038. "type": "string",
  30039. "enum": ["text"]
  30040. },
  30041. "key": {
  30042. "type": "string"
  30043. },
  30044. "message": {
  30045. "type": "string"
  30046. },
  30047. "placeholder": {
  30048. "type": "string"
  30049. },
  30050. "when": {
  30051. "$ref": "#/components/schemas/IntegrationWhen"
  30052. }
  30053. },
  30054. "required": ["type", "key", "message"],
  30055. "additionalProperties": false
  30056. },
  30057. "IntegrationSelectPrompt": {
  30058. "type": "object",
  30059. "properties": {
  30060. "type": {
  30061. "type": "string",
  30062. "enum": ["select"]
  30063. },
  30064. "key": {
  30065. "type": "string"
  30066. },
  30067. "message": {
  30068. "type": "string"
  30069. },
  30070. "options": {
  30071. "type": "array",
  30072. "items": {
  30073. "type": "object",
  30074. "properties": {
  30075. "label": {
  30076. "type": "string"
  30077. },
  30078. "value": {
  30079. "type": "string"
  30080. },
  30081. "hint": {
  30082. "type": "string"
  30083. }
  30084. },
  30085. "required": ["label", "value"],
  30086. "additionalProperties": false
  30087. }
  30088. },
  30089. "when": {
  30090. "$ref": "#/components/schemas/IntegrationWhen"
  30091. }
  30092. },
  30093. "required": ["type", "key", "message", "options"],
  30094. "additionalProperties": false
  30095. },
  30096. "IntegrationOAuthMethod": {
  30097. "type": "object",
  30098. "properties": {
  30099. "id": {
  30100. "type": "string"
  30101. },
  30102. "type": {
  30103. "type": "string",
  30104. "enum": ["oauth"]
  30105. },
  30106. "label": {
  30107. "type": "string"
  30108. },
  30109. "prompts": {
  30110. "type": "array",
  30111. "items": {
  30112. "anyOf": [
  30113. {
  30114. "$ref": "#/components/schemas/IntegrationTextPrompt"
  30115. },
  30116. {
  30117. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  30118. }
  30119. ]
  30120. }
  30121. }
  30122. },
  30123. "required": ["id", "type", "label"],
  30124. "additionalProperties": false
  30125. },
  30126. "IntegrationKeyMethod": {
  30127. "type": "object",
  30128. "properties": {
  30129. "type": {
  30130. "type": "string",
  30131. "enum": ["key"]
  30132. },
  30133. "label": {
  30134. "type": "string"
  30135. }
  30136. },
  30137. "required": ["type"],
  30138. "additionalProperties": false
  30139. },
  30140. "IntegrationEnvMethod": {
  30141. "type": "object",
  30142. "properties": {
  30143. "type": {
  30144. "type": "string",
  30145. "enum": ["env"]
  30146. },
  30147. "names": {
  30148. "type": "array",
  30149. "items": {
  30150. "type": "string"
  30151. }
  30152. }
  30153. },
  30154. "required": ["type", "names"],
  30155. "additionalProperties": false
  30156. },
  30157. "ConnectionCredentialInfo": {
  30158. "type": "object",
  30159. "properties": {
  30160. "type": {
  30161. "type": "string",
  30162. "enum": ["credential"]
  30163. },
  30164. "id": {
  30165. "type": "string"
  30166. },
  30167. "label": {
  30168. "type": "string"
  30169. }
  30170. },
  30171. "required": ["type", "id", "label"],
  30172. "additionalProperties": false
  30173. },
  30174. "ConnectionEnvInfo": {
  30175. "type": "object",
  30176. "properties": {
  30177. "type": {
  30178. "type": "string",
  30179. "enum": ["env"]
  30180. },
  30181. "name": {
  30182. "type": "string"
  30183. }
  30184. },
  30185. "required": ["type", "name"],
  30186. "additionalProperties": false
  30187. },
  30188. "ConnectionInfo": {
  30189. "anyOf": [
  30190. {
  30191. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  30192. },
  30193. {
  30194. "$ref": "#/components/schemas/ConnectionEnvInfo"
  30195. }
  30196. ]
  30197. },
  30198. "IntegrationInfo": {
  30199. "type": "object",
  30200. "properties": {
  30201. "id": {
  30202. "type": "string"
  30203. },
  30204. "name": {
  30205. "type": "string"
  30206. },
  30207. "methods": {
  30208. "type": "array",
  30209. "items": {
  30210. "$ref": "#/components/schemas/IntegrationMethod"
  30211. }
  30212. },
  30213. "connections": {
  30214. "type": "array",
  30215. "items": {
  30216. "$ref": "#/components/schemas/ConnectionInfo"
  30217. }
  30218. }
  30219. },
  30220. "required": ["id", "name", "methods", "connections"],
  30221. "additionalProperties": false
  30222. },
  30223. "IntegrationAttempt": {
  30224. "type": "object",
  30225. "properties": {
  30226. "attemptID": {
  30227. "type": "string"
  30228. },
  30229. "url": {
  30230. "type": "string"
  30231. },
  30232. "instructions": {
  30233. "type": "string"
  30234. },
  30235. "mode": {
  30236. "type": "string",
  30237. "enum": ["auto", "code"]
  30238. },
  30239. "time": {
  30240. "type": "object",
  30241. "properties": {
  30242. "created": {
  30243. "anyOf": [
  30244. {
  30245. "type": "number"
  30246. },
  30247. {
  30248. "type": "string",
  30249. "enum": ["NaN"]
  30250. },
  30251. {
  30252. "type": "string",
  30253. "enum": ["Infinity"]
  30254. },
  30255. {
  30256. "type": "string",
  30257. "enum": ["-Infinity"]
  30258. },
  30259. {
  30260. "type": "string",
  30261. "enum": ["Infinity", "-Infinity", "NaN"]
  30262. }
  30263. ]
  30264. },
  30265. "expires": {
  30266. "anyOf": [
  30267. {
  30268. "type": "number"
  30269. },
  30270. {
  30271. "type": "string",
  30272. "enum": ["NaN"]
  30273. },
  30274. {
  30275. "type": "string",
  30276. "enum": ["Infinity"]
  30277. },
  30278. {
  30279. "type": "string",
  30280. "enum": ["-Infinity"]
  30281. },
  30282. {
  30283. "type": "string",
  30284. "enum": ["Infinity", "-Infinity", "NaN"]
  30285. }
  30286. ]
  30287. }
  30288. },
  30289. "required": ["created", "expires"],
  30290. "additionalProperties": false
  30291. }
  30292. },
  30293. "required": ["attemptID", "url", "instructions", "mode", "time"],
  30294. "additionalProperties": false
  30295. },
  30296. "IntegrationAttemptStatus": {
  30297. "anyOf": [
  30298. {
  30299. "type": "object",
  30300. "properties": {
  30301. "status": {
  30302. "type": "string",
  30303. "enum": ["pending"]
  30304. },
  30305. "time": {
  30306. "type": "object",
  30307. "properties": {
  30308. "created": {
  30309. "anyOf": [
  30310. {
  30311. "type": "number"
  30312. },
  30313. {
  30314. "type": "string",
  30315. "enum": ["NaN"]
  30316. },
  30317. {
  30318. "type": "string",
  30319. "enum": ["Infinity"]
  30320. },
  30321. {
  30322. "type": "string",
  30323. "enum": ["-Infinity"]
  30324. },
  30325. {
  30326. "type": "string",
  30327. "enum": ["Infinity", "-Infinity", "NaN"]
  30328. }
  30329. ]
  30330. },
  30331. "expires": {
  30332. "anyOf": [
  30333. {
  30334. "type": "number"
  30335. },
  30336. {
  30337. "type": "string",
  30338. "enum": ["NaN"]
  30339. },
  30340. {
  30341. "type": "string",
  30342. "enum": ["Infinity"]
  30343. },
  30344. {
  30345. "type": "string",
  30346. "enum": ["-Infinity"]
  30347. },
  30348. {
  30349. "type": "string",
  30350. "enum": ["Infinity", "-Infinity", "NaN"]
  30351. }
  30352. ]
  30353. }
  30354. },
  30355. "required": ["created", "expires"],
  30356. "additionalProperties": false
  30357. }
  30358. },
  30359. "required": ["status", "time"],
  30360. "additionalProperties": false
  30361. },
  30362. {
  30363. "type": "object",
  30364. "properties": {
  30365. "status": {
  30366. "type": "string",
  30367. "enum": ["complete"]
  30368. },
  30369. "time": {
  30370. "type": "object",
  30371. "properties": {
  30372. "created": {
  30373. "anyOf": [
  30374. {
  30375. "type": "number"
  30376. },
  30377. {
  30378. "type": "string",
  30379. "enum": ["NaN"]
  30380. },
  30381. {
  30382. "type": "string",
  30383. "enum": ["Infinity"]
  30384. },
  30385. {
  30386. "type": "string",
  30387. "enum": ["-Infinity"]
  30388. },
  30389. {
  30390. "type": "string",
  30391. "enum": ["Infinity", "-Infinity", "NaN"]
  30392. }
  30393. ]
  30394. },
  30395. "expires": {
  30396. "anyOf": [
  30397. {
  30398. "type": "number"
  30399. },
  30400. {
  30401. "type": "string",
  30402. "enum": ["NaN"]
  30403. },
  30404. {
  30405. "type": "string",
  30406. "enum": ["Infinity"]
  30407. },
  30408. {
  30409. "type": "string",
  30410. "enum": ["-Infinity"]
  30411. },
  30412. {
  30413. "type": "string",
  30414. "enum": ["Infinity", "-Infinity", "NaN"]
  30415. }
  30416. ]
  30417. }
  30418. },
  30419. "required": ["created", "expires"],
  30420. "additionalProperties": false
  30421. }
  30422. },
  30423. "required": ["status", "time"],
  30424. "additionalProperties": false
  30425. },
  30426. {
  30427. "type": "object",
  30428. "properties": {
  30429. "status": {
  30430. "type": "string",
  30431. "enum": ["failed"]
  30432. },
  30433. "message": {
  30434. "type": "string"
  30435. },
  30436. "time": {
  30437. "type": "object",
  30438. "properties": {
  30439. "created": {
  30440. "anyOf": [
  30441. {
  30442. "type": "number"
  30443. },
  30444. {
  30445. "type": "string",
  30446. "enum": ["NaN"]
  30447. },
  30448. {
  30449. "type": "string",
  30450. "enum": ["Infinity"]
  30451. },
  30452. {
  30453. "type": "string",
  30454. "enum": ["-Infinity"]
  30455. },
  30456. {
  30457. "type": "string",
  30458. "enum": ["Infinity", "-Infinity", "NaN"]
  30459. }
  30460. ]
  30461. },
  30462. "expires": {
  30463. "anyOf": [
  30464. {
  30465. "type": "number"
  30466. },
  30467. {
  30468. "type": "string",
  30469. "enum": ["NaN"]
  30470. },
  30471. {
  30472. "type": "string",
  30473. "enum": ["Infinity"]
  30474. },
  30475. {
  30476. "type": "string",
  30477. "enum": ["-Infinity"]
  30478. },
  30479. {
  30480. "type": "string",
  30481. "enum": ["Infinity", "-Infinity", "NaN"]
  30482. }
  30483. ]
  30484. }
  30485. },
  30486. "required": ["created", "expires"],
  30487. "additionalProperties": false
  30488. }
  30489. },
  30490. "required": ["status", "message", "time"],
  30491. "additionalProperties": false
  30492. },
  30493. {
  30494. "type": "object",
  30495. "properties": {
  30496. "status": {
  30497. "type": "string",
  30498. "enum": ["expired"]
  30499. },
  30500. "time": {
  30501. "type": "object",
  30502. "properties": {
  30503. "created": {
  30504. "anyOf": [
  30505. {
  30506. "type": "number"
  30507. },
  30508. {
  30509. "type": "string",
  30510. "enum": ["NaN"]
  30511. },
  30512. {
  30513. "type": "string",
  30514. "enum": ["Infinity"]
  30515. },
  30516. {
  30517. "type": "string",
  30518. "enum": ["-Infinity"]
  30519. },
  30520. {
  30521. "type": "string",
  30522. "enum": ["Infinity", "-Infinity", "NaN"]
  30523. }
  30524. ]
  30525. },
  30526. "expires": {
  30527. "anyOf": [
  30528. {
  30529. "type": "number"
  30530. },
  30531. {
  30532. "type": "string",
  30533. "enum": ["NaN"]
  30534. },
  30535. {
  30536. "type": "string",
  30537. "enum": ["Infinity"]
  30538. },
  30539. {
  30540. "type": "string",
  30541. "enum": ["-Infinity"]
  30542. },
  30543. {
  30544. "type": "string",
  30545. "enum": ["Infinity", "-Infinity", "NaN"]
  30546. }
  30547. ]
  30548. }
  30549. },
  30550. "required": ["created", "expires"],
  30551. "additionalProperties": false
  30552. }
  30553. },
  30554. "required": ["status", "time"],
  30555. "additionalProperties": false
  30556. }
  30557. ]
  30558. },
  30559. "PermissionV2Request": {
  30560. "type": "object",
  30561. "properties": {
  30562. "id": {
  30563. "type": "string",
  30564. "pattern": "^per"
  30565. },
  30566. "sessionID": {
  30567. "type": "string",
  30568. "pattern": "^ses"
  30569. },
  30570. "action": {
  30571. "type": "string"
  30572. },
  30573. "resources": {
  30574. "type": "array",
  30575. "items": {
  30576. "type": "string"
  30577. }
  30578. },
  30579. "save": {
  30580. "type": "array",
  30581. "items": {
  30582. "type": "string"
  30583. }
  30584. },
  30585. "metadata": {
  30586. "type": "object"
  30587. },
  30588. "source": {
  30589. "$ref": "#/components/schemas/PermissionV2Source"
  30590. }
  30591. },
  30592. "required": ["id", "sessionID", "action", "resources"],
  30593. "additionalProperties": false
  30594. },
  30595. "PermissionSavedInfo": {
  30596. "type": "object",
  30597. "properties": {
  30598. "id": {
  30599. "type": "string"
  30600. },
  30601. "projectID": {
  30602. "type": "string"
  30603. },
  30604. "action": {
  30605. "type": "string"
  30606. },
  30607. "resource": {
  30608. "type": "string"
  30609. }
  30610. },
  30611. "required": ["id", "projectID", "action", "resource"],
  30612. "additionalProperties": false
  30613. },
  30614. "FileSystemEntry": {
  30615. "type": "object",
  30616. "properties": {
  30617. "path": {
  30618. "type": "string"
  30619. },
  30620. "type": {
  30621. "type": "string",
  30622. "enum": ["file", "directory"]
  30623. }
  30624. },
  30625. "required": ["path", "type"],
  30626. "additionalProperties": false
  30627. },
  30628. "CommandV2Info": {
  30629. "type": "object",
  30630. "properties": {
  30631. "name": {
  30632. "type": "string"
  30633. },
  30634. "template": {
  30635. "type": "string"
  30636. },
  30637. "description": {
  30638. "type": "string"
  30639. },
  30640. "agent": {
  30641. "type": "string"
  30642. },
  30643. "model": {
  30644. "$ref": "#/components/schemas/ModelRef"
  30645. },
  30646. "subtask": {
  30647. "type": "boolean"
  30648. }
  30649. },
  30650. "required": ["name", "template"],
  30651. "additionalProperties": false
  30652. },
  30653. "SkillV2Info": {
  30654. "type": "object",
  30655. "properties": {
  30656. "name": {
  30657. "type": "string"
  30658. },
  30659. "description": {
  30660. "type": "string"
  30661. },
  30662. "slash": {
  30663. "type": "boolean"
  30664. },
  30665. "location": {
  30666. "type": "string"
  30667. },
  30668. "content": {
  30669. "type": "string"
  30670. }
  30671. },
  30672. "required": ["name", "location", "content"],
  30673. "additionalProperties": false
  30674. },
  30675. "Models-devRefreshed": {
  30676. "type": "object",
  30677. "properties": {
  30678. "id": {
  30679. "type": "string",
  30680. "pattern": "^evt_"
  30681. },
  30682. "metadata": {
  30683. "type": "object"
  30684. },
  30685. "type": {
  30686. "type": "string",
  30687. "enum": ["models-dev.refreshed"]
  30688. },
  30689. "durable": {
  30690. "type": "object",
  30691. "properties": {
  30692. "aggregateID": {
  30693. "type": "string"
  30694. },
  30695. "seq": {
  30696. "type": "integer"
  30697. },
  30698. "version": {
  30699. "type": "integer"
  30700. }
  30701. },
  30702. "required": ["aggregateID", "seq", "version"],
  30703. "additionalProperties": false
  30704. },
  30705. "location": {
  30706. "$ref": "#/components/schemas/LocationRef"
  30707. },
  30708. "data": {
  30709. "type": "object",
  30710. "properties": {}
  30711. }
  30712. },
  30713. "required": ["id", "type", "data"],
  30714. "additionalProperties": false
  30715. },
  30716. "IntegrationUpdated": {
  30717. "type": "object",
  30718. "properties": {
  30719. "id": {
  30720. "type": "string",
  30721. "pattern": "^evt_"
  30722. },
  30723. "metadata": {
  30724. "type": "object"
  30725. },
  30726. "type": {
  30727. "type": "string",
  30728. "enum": ["integration.updated"]
  30729. },
  30730. "durable": {
  30731. "type": "object",
  30732. "properties": {
  30733. "aggregateID": {
  30734. "type": "string"
  30735. },
  30736. "seq": {
  30737. "type": "integer"
  30738. },
  30739. "version": {
  30740. "type": "integer"
  30741. }
  30742. },
  30743. "required": ["aggregateID", "seq", "version"],
  30744. "additionalProperties": false
  30745. },
  30746. "location": {
  30747. "$ref": "#/components/schemas/LocationRef"
  30748. },
  30749. "data": {
  30750. "type": "object",
  30751. "properties": {}
  30752. }
  30753. },
  30754. "required": ["id", "type", "data"],
  30755. "additionalProperties": false
  30756. },
  30757. "IntegrationConnectionUpdated": {
  30758. "type": "object",
  30759. "properties": {
  30760. "id": {
  30761. "type": "string",
  30762. "pattern": "^evt_"
  30763. },
  30764. "metadata": {
  30765. "type": "object"
  30766. },
  30767. "type": {
  30768. "type": "string",
  30769. "enum": ["integration.connection.updated"]
  30770. },
  30771. "durable": {
  30772. "type": "object",
  30773. "properties": {
  30774. "aggregateID": {
  30775. "type": "string"
  30776. },
  30777. "seq": {
  30778. "type": "integer"
  30779. },
  30780. "version": {
  30781. "type": "integer"
  30782. }
  30783. },
  30784. "required": ["aggregateID", "seq", "version"],
  30785. "additionalProperties": false
  30786. },
  30787. "location": {
  30788. "$ref": "#/components/schemas/LocationRef"
  30789. },
  30790. "data": {
  30791. "type": "object",
  30792. "properties": {
  30793. "integrationID": {
  30794. "type": "string"
  30795. }
  30796. },
  30797. "required": ["integrationID"],
  30798. "additionalProperties": false
  30799. }
  30800. },
  30801. "required": ["id", "type", "data"],
  30802. "additionalProperties": false
  30803. },
  30804. "CatalogUpdated": {
  30805. "type": "object",
  30806. "properties": {
  30807. "id": {
  30808. "type": "string",
  30809. "pattern": "^evt_"
  30810. },
  30811. "metadata": {
  30812. "type": "object"
  30813. },
  30814. "type": {
  30815. "type": "string",
  30816. "enum": ["catalog.updated"]
  30817. },
  30818. "durable": {
  30819. "type": "object",
  30820. "properties": {
  30821. "aggregateID": {
  30822. "type": "string"
  30823. },
  30824. "seq": {
  30825. "type": "integer"
  30826. },
  30827. "version": {
  30828. "type": "integer"
  30829. }
  30830. },
  30831. "required": ["aggregateID", "seq", "version"],
  30832. "additionalProperties": false
  30833. },
  30834. "location": {
  30835. "$ref": "#/components/schemas/LocationRef"
  30836. },
  30837. "data": {
  30838. "type": "object",
  30839. "properties": {}
  30840. }
  30841. },
  30842. "required": ["id", "type", "data"],
  30843. "additionalProperties": false
  30844. },
  30845. "SessionCreated": {
  30846. "type": "object",
  30847. "properties": {
  30848. "id": {
  30849. "type": "string",
  30850. "pattern": "^evt_"
  30851. },
  30852. "metadata": {
  30853. "type": "object"
  30854. },
  30855. "type": {
  30856. "type": "string",
  30857. "enum": ["session.created"]
  30858. },
  30859. "durable": {
  30860. "type": "object",
  30861. "properties": {
  30862. "aggregateID": {
  30863. "type": "string"
  30864. },
  30865. "seq": {
  30866. "type": "integer"
  30867. },
  30868. "version": {
  30869. "type": "integer"
  30870. }
  30871. },
  30872. "required": ["aggregateID", "seq", "version"],
  30873. "additionalProperties": false
  30874. },
  30875. "location": {
  30876. "$ref": "#/components/schemas/LocationRef"
  30877. },
  30878. "data": {
  30879. "type": "object",
  30880. "properties": {
  30881. "sessionID": {
  30882. "type": "string",
  30883. "pattern": "^ses"
  30884. },
  30885. "info": {
  30886. "$ref": "#/components/schemas/Session"
  30887. }
  30888. },
  30889. "required": ["sessionID", "info"],
  30890. "additionalProperties": false
  30891. }
  30892. },
  30893. "required": ["id", "type", "data"],
  30894. "additionalProperties": false
  30895. },
  30896. "SessionUpdated": {
  30897. "type": "object",
  30898. "properties": {
  30899. "id": {
  30900. "type": "string",
  30901. "pattern": "^evt_"
  30902. },
  30903. "metadata": {
  30904. "type": "object"
  30905. },
  30906. "type": {
  30907. "type": "string",
  30908. "enum": ["session.updated"]
  30909. },
  30910. "durable": {
  30911. "type": "object",
  30912. "properties": {
  30913. "aggregateID": {
  30914. "type": "string"
  30915. },
  30916. "seq": {
  30917. "type": "integer"
  30918. },
  30919. "version": {
  30920. "type": "integer"
  30921. }
  30922. },
  30923. "required": ["aggregateID", "seq", "version"],
  30924. "additionalProperties": false
  30925. },
  30926. "location": {
  30927. "$ref": "#/components/schemas/LocationRef"
  30928. },
  30929. "data": {
  30930. "type": "object",
  30931. "properties": {
  30932. "sessionID": {
  30933. "type": "string",
  30934. "pattern": "^ses"
  30935. },
  30936. "info": {
  30937. "$ref": "#/components/schemas/Session"
  30938. }
  30939. },
  30940. "required": ["sessionID", "info"],
  30941. "additionalProperties": false
  30942. }
  30943. },
  30944. "required": ["id", "type", "data"],
  30945. "additionalProperties": false
  30946. },
  30947. "SessionDeleted": {
  30948. "type": "object",
  30949. "properties": {
  30950. "id": {
  30951. "type": "string",
  30952. "pattern": "^evt_"
  30953. },
  30954. "metadata": {
  30955. "type": "object"
  30956. },
  30957. "type": {
  30958. "type": "string",
  30959. "enum": ["session.deleted"]
  30960. },
  30961. "durable": {
  30962. "type": "object",
  30963. "properties": {
  30964. "aggregateID": {
  30965. "type": "string"
  30966. },
  30967. "seq": {
  30968. "type": "integer"
  30969. },
  30970. "version": {
  30971. "type": "integer"
  30972. }
  30973. },
  30974. "required": ["aggregateID", "seq", "version"],
  30975. "additionalProperties": false
  30976. },
  30977. "location": {
  30978. "$ref": "#/components/schemas/LocationRef"
  30979. },
  30980. "data": {
  30981. "type": "object",
  30982. "properties": {
  30983. "sessionID": {
  30984. "type": "string",
  30985. "pattern": "^ses"
  30986. },
  30987. "info": {
  30988. "$ref": "#/components/schemas/Session"
  30989. }
  30990. },
  30991. "required": ["sessionID", "info"],
  30992. "additionalProperties": false
  30993. }
  30994. },
  30995. "required": ["id", "type", "data"],
  30996. "additionalProperties": false
  30997. },
  30998. "MessageUpdated": {
  30999. "type": "object",
  31000. "properties": {
  31001. "id": {
  31002. "type": "string",
  31003. "pattern": "^evt_"
  31004. },
  31005. "metadata": {
  31006. "type": "object"
  31007. },
  31008. "type": {
  31009. "type": "string",
  31010. "enum": ["message.updated"]
  31011. },
  31012. "durable": {
  31013. "type": "object",
  31014. "properties": {
  31015. "aggregateID": {
  31016. "type": "string"
  31017. },
  31018. "seq": {
  31019. "type": "integer"
  31020. },
  31021. "version": {
  31022. "type": "integer"
  31023. }
  31024. },
  31025. "required": ["aggregateID", "seq", "version"],
  31026. "additionalProperties": false
  31027. },
  31028. "location": {
  31029. "$ref": "#/components/schemas/LocationRef"
  31030. },
  31031. "data": {
  31032. "type": "object",
  31033. "properties": {
  31034. "sessionID": {
  31035. "type": "string",
  31036. "pattern": "^ses"
  31037. },
  31038. "info": {
  31039. "$ref": "#/components/schemas/Message"
  31040. }
  31041. },
  31042. "required": ["sessionID", "info"],
  31043. "additionalProperties": false
  31044. }
  31045. },
  31046. "required": ["id", "type", "data"],
  31047. "additionalProperties": false
  31048. },
  31049. "MessageRemoved": {
  31050. "type": "object",
  31051. "properties": {
  31052. "id": {
  31053. "type": "string",
  31054. "pattern": "^evt_"
  31055. },
  31056. "metadata": {
  31057. "type": "object"
  31058. },
  31059. "type": {
  31060. "type": "string",
  31061. "enum": ["message.removed"]
  31062. },
  31063. "durable": {
  31064. "type": "object",
  31065. "properties": {
  31066. "aggregateID": {
  31067. "type": "string"
  31068. },
  31069. "seq": {
  31070. "type": "integer"
  31071. },
  31072. "version": {
  31073. "type": "integer"
  31074. }
  31075. },
  31076. "required": ["aggregateID", "seq", "version"],
  31077. "additionalProperties": false
  31078. },
  31079. "location": {
  31080. "$ref": "#/components/schemas/LocationRef"
  31081. },
  31082. "data": {
  31083. "type": "object",
  31084. "properties": {
  31085. "sessionID": {
  31086. "type": "string",
  31087. "pattern": "^ses"
  31088. },
  31089. "messageID": {
  31090. "type": "string",
  31091. "pattern": "^msg"
  31092. }
  31093. },
  31094. "required": ["sessionID", "messageID"],
  31095. "additionalProperties": false
  31096. }
  31097. },
  31098. "required": ["id", "type", "data"],
  31099. "additionalProperties": false
  31100. },
  31101. "MessagePartUpdated": {
  31102. "type": "object",
  31103. "properties": {
  31104. "id": {
  31105. "type": "string",
  31106. "pattern": "^evt_"
  31107. },
  31108. "metadata": {
  31109. "type": "object"
  31110. },
  31111. "type": {
  31112. "type": "string",
  31113. "enum": ["message.part.updated"]
  31114. },
  31115. "durable": {
  31116. "type": "object",
  31117. "properties": {
  31118. "aggregateID": {
  31119. "type": "string"
  31120. },
  31121. "seq": {
  31122. "type": "integer"
  31123. },
  31124. "version": {
  31125. "type": "integer"
  31126. }
  31127. },
  31128. "required": ["aggregateID", "seq", "version"],
  31129. "additionalProperties": false
  31130. },
  31131. "location": {
  31132. "$ref": "#/components/schemas/LocationRef"
  31133. },
  31134. "data": {
  31135. "type": "object",
  31136. "properties": {
  31137. "sessionID": {
  31138. "type": "string",
  31139. "pattern": "^ses"
  31140. },
  31141. "part": {
  31142. "$ref": "#/components/schemas/Part"
  31143. },
  31144. "time": {
  31145. "type": "number"
  31146. }
  31147. },
  31148. "required": ["sessionID", "part", "time"],
  31149. "additionalProperties": false
  31150. }
  31151. },
  31152. "required": ["id", "type", "data"],
  31153. "additionalProperties": false
  31154. },
  31155. "MessagePartRemoved": {
  31156. "type": "object",
  31157. "properties": {
  31158. "id": {
  31159. "type": "string",
  31160. "pattern": "^evt_"
  31161. },
  31162. "metadata": {
  31163. "type": "object"
  31164. },
  31165. "type": {
  31166. "type": "string",
  31167. "enum": ["message.part.removed"]
  31168. },
  31169. "durable": {
  31170. "type": "object",
  31171. "properties": {
  31172. "aggregateID": {
  31173. "type": "string"
  31174. },
  31175. "seq": {
  31176. "type": "integer"
  31177. },
  31178. "version": {
  31179. "type": "integer"
  31180. }
  31181. },
  31182. "required": ["aggregateID", "seq", "version"],
  31183. "additionalProperties": false
  31184. },
  31185. "location": {
  31186. "$ref": "#/components/schemas/LocationRef"
  31187. },
  31188. "data": {
  31189. "type": "object",
  31190. "properties": {
  31191. "sessionID": {
  31192. "type": "string",
  31193. "pattern": "^ses"
  31194. },
  31195. "messageID": {
  31196. "type": "string",
  31197. "pattern": "^msg"
  31198. },
  31199. "partID": {
  31200. "type": "string",
  31201. "pattern": "^prt"
  31202. }
  31203. },
  31204. "required": ["sessionID", "messageID", "partID"],
  31205. "additionalProperties": false
  31206. }
  31207. },
  31208. "required": ["id", "type", "data"],
  31209. "additionalProperties": false
  31210. },
  31211. "SessionNextTextDelta": {
  31212. "type": "object",
  31213. "properties": {
  31214. "id": {
  31215. "type": "string",
  31216. "pattern": "^evt_"
  31217. },
  31218. "metadata": {
  31219. "type": "object"
  31220. },
  31221. "type": {
  31222. "type": "string",
  31223. "enum": ["session.next.text.delta"]
  31224. },
  31225. "durable": {
  31226. "type": "object",
  31227. "properties": {
  31228. "aggregateID": {
  31229. "type": "string"
  31230. },
  31231. "seq": {
  31232. "type": "integer"
  31233. },
  31234. "version": {
  31235. "type": "integer"
  31236. }
  31237. },
  31238. "required": ["aggregateID", "seq", "version"],
  31239. "additionalProperties": false
  31240. },
  31241. "location": {
  31242. "$ref": "#/components/schemas/LocationRef"
  31243. },
  31244. "data": {
  31245. "type": "object",
  31246. "properties": {
  31247. "timestamp": {
  31248. "type": "number"
  31249. },
  31250. "sessionID": {
  31251. "type": "string",
  31252. "pattern": "^ses"
  31253. },
  31254. "assistantMessageID": {
  31255. "type": "string",
  31256. "pattern": "^msg_"
  31257. },
  31258. "textID": {
  31259. "type": "string"
  31260. },
  31261. "delta": {
  31262. "type": "string"
  31263. }
  31264. },
  31265. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  31266. "additionalProperties": false
  31267. }
  31268. },
  31269. "required": ["id", "type", "data"],
  31270. "additionalProperties": false
  31271. },
  31272. "SessionNextReasoningDelta": {
  31273. "type": "object",
  31274. "properties": {
  31275. "id": {
  31276. "type": "string",
  31277. "pattern": "^evt_"
  31278. },
  31279. "metadata": {
  31280. "type": "object"
  31281. },
  31282. "type": {
  31283. "type": "string",
  31284. "enum": ["session.next.reasoning.delta"]
  31285. },
  31286. "durable": {
  31287. "type": "object",
  31288. "properties": {
  31289. "aggregateID": {
  31290. "type": "string"
  31291. },
  31292. "seq": {
  31293. "type": "integer"
  31294. },
  31295. "version": {
  31296. "type": "integer"
  31297. }
  31298. },
  31299. "required": ["aggregateID", "seq", "version"],
  31300. "additionalProperties": false
  31301. },
  31302. "location": {
  31303. "$ref": "#/components/schemas/LocationRef"
  31304. },
  31305. "data": {
  31306. "type": "object",
  31307. "properties": {
  31308. "timestamp": {
  31309. "type": "number"
  31310. },
  31311. "sessionID": {
  31312. "type": "string",
  31313. "pattern": "^ses"
  31314. },
  31315. "assistantMessageID": {
  31316. "type": "string",
  31317. "pattern": "^msg_"
  31318. },
  31319. "reasoningID": {
  31320. "type": "string"
  31321. },
  31322. "delta": {
  31323. "type": "string"
  31324. }
  31325. },
  31326. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  31327. "additionalProperties": false
  31328. }
  31329. },
  31330. "required": ["id", "type", "data"],
  31331. "additionalProperties": false
  31332. },
  31333. "SessionNextToolInputDelta": {
  31334. "type": "object",
  31335. "properties": {
  31336. "id": {
  31337. "type": "string",
  31338. "pattern": "^evt_"
  31339. },
  31340. "metadata": {
  31341. "type": "object"
  31342. },
  31343. "type": {
  31344. "type": "string",
  31345. "enum": ["session.next.tool.input.delta"]
  31346. },
  31347. "durable": {
  31348. "type": "object",
  31349. "properties": {
  31350. "aggregateID": {
  31351. "type": "string"
  31352. },
  31353. "seq": {
  31354. "type": "integer"
  31355. },
  31356. "version": {
  31357. "type": "integer"
  31358. }
  31359. },
  31360. "required": ["aggregateID", "seq", "version"],
  31361. "additionalProperties": false
  31362. },
  31363. "location": {
  31364. "$ref": "#/components/schemas/LocationRef"
  31365. },
  31366. "data": {
  31367. "type": "object",
  31368. "properties": {
  31369. "timestamp": {
  31370. "type": "number"
  31371. },
  31372. "sessionID": {
  31373. "type": "string",
  31374. "pattern": "^ses"
  31375. },
  31376. "assistantMessageID": {
  31377. "type": "string",
  31378. "pattern": "^msg_"
  31379. },
  31380. "callID": {
  31381. "type": "string"
  31382. },
  31383. "delta": {
  31384. "type": "string"
  31385. }
  31386. },
  31387. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  31388. "additionalProperties": false
  31389. }
  31390. },
  31391. "required": ["id", "type", "data"],
  31392. "additionalProperties": false
  31393. },
  31394. "SessionNextCompactionDelta": {
  31395. "type": "object",
  31396. "properties": {
  31397. "id": {
  31398. "type": "string",
  31399. "pattern": "^evt_"
  31400. },
  31401. "metadata": {
  31402. "type": "object"
  31403. },
  31404. "type": {
  31405. "type": "string",
  31406. "enum": ["session.next.compaction.delta"]
  31407. },
  31408. "durable": {
  31409. "type": "object",
  31410. "properties": {
  31411. "aggregateID": {
  31412. "type": "string"
  31413. },
  31414. "seq": {
  31415. "type": "integer"
  31416. },
  31417. "version": {
  31418. "type": "integer"
  31419. }
  31420. },
  31421. "required": ["aggregateID", "seq", "version"],
  31422. "additionalProperties": false
  31423. },
  31424. "location": {
  31425. "$ref": "#/components/schemas/LocationRef"
  31426. },
  31427. "data": {
  31428. "type": "object",
  31429. "properties": {
  31430. "timestamp": {
  31431. "type": "number"
  31432. },
  31433. "sessionID": {
  31434. "type": "string",
  31435. "pattern": "^ses"
  31436. },
  31437. "messageID": {
  31438. "type": "string",
  31439. "pattern": "^msg_"
  31440. },
  31441. "text": {
  31442. "type": "string"
  31443. }
  31444. },
  31445. "required": ["timestamp", "sessionID", "messageID", "text"],
  31446. "additionalProperties": false
  31447. }
  31448. },
  31449. "required": ["id", "type", "data"],
  31450. "additionalProperties": false
  31451. },
  31452. "MessagePartDelta": {
  31453. "type": "object",
  31454. "properties": {
  31455. "id": {
  31456. "type": "string",
  31457. "pattern": "^evt_"
  31458. },
  31459. "metadata": {
  31460. "type": "object"
  31461. },
  31462. "type": {
  31463. "type": "string",
  31464. "enum": ["message.part.delta"]
  31465. },
  31466. "durable": {
  31467. "type": "object",
  31468. "properties": {
  31469. "aggregateID": {
  31470. "type": "string"
  31471. },
  31472. "seq": {
  31473. "type": "integer"
  31474. },
  31475. "version": {
  31476. "type": "integer"
  31477. }
  31478. },
  31479. "required": ["aggregateID", "seq", "version"],
  31480. "additionalProperties": false
  31481. },
  31482. "location": {
  31483. "$ref": "#/components/schemas/LocationRef"
  31484. },
  31485. "data": {
  31486. "type": "object",
  31487. "properties": {
  31488. "sessionID": {
  31489. "type": "string",
  31490. "pattern": "^ses"
  31491. },
  31492. "messageID": {
  31493. "type": "string",
  31494. "pattern": "^msg"
  31495. },
  31496. "partID": {
  31497. "type": "string",
  31498. "pattern": "^prt"
  31499. },
  31500. "field": {
  31501. "type": "string"
  31502. },
  31503. "delta": {
  31504. "type": "string"
  31505. }
  31506. },
  31507. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  31508. "additionalProperties": false
  31509. }
  31510. },
  31511. "required": ["id", "type", "data"],
  31512. "additionalProperties": false
  31513. },
  31514. "SessionDiff": {
  31515. "type": "object",
  31516. "properties": {
  31517. "id": {
  31518. "type": "string",
  31519. "pattern": "^evt_"
  31520. },
  31521. "metadata": {
  31522. "type": "object"
  31523. },
  31524. "type": {
  31525. "type": "string",
  31526. "enum": ["session.diff"]
  31527. },
  31528. "durable": {
  31529. "type": "object",
  31530. "properties": {
  31531. "aggregateID": {
  31532. "type": "string"
  31533. },
  31534. "seq": {
  31535. "type": "integer"
  31536. },
  31537. "version": {
  31538. "type": "integer"
  31539. }
  31540. },
  31541. "required": ["aggregateID", "seq", "version"],
  31542. "additionalProperties": false
  31543. },
  31544. "location": {
  31545. "$ref": "#/components/schemas/LocationRef"
  31546. },
  31547. "data": {
  31548. "type": "object",
  31549. "properties": {
  31550. "sessionID": {
  31551. "type": "string",
  31552. "pattern": "^ses"
  31553. },
  31554. "diff": {
  31555. "type": "array",
  31556. "items": {
  31557. "$ref": "#/components/schemas/SnapshotFileDiff"
  31558. }
  31559. }
  31560. },
  31561. "required": ["sessionID", "diff"],
  31562. "additionalProperties": false
  31563. }
  31564. },
  31565. "required": ["id", "type", "data"],
  31566. "additionalProperties": false
  31567. },
  31568. "SessionError": {
  31569. "type": "object",
  31570. "properties": {
  31571. "id": {
  31572. "type": "string",
  31573. "pattern": "^evt_"
  31574. },
  31575. "metadata": {
  31576. "type": "object"
  31577. },
  31578. "type": {
  31579. "type": "string",
  31580. "enum": ["session.error"]
  31581. },
  31582. "durable": {
  31583. "type": "object",
  31584. "properties": {
  31585. "aggregateID": {
  31586. "type": "string"
  31587. },
  31588. "seq": {
  31589. "type": "integer"
  31590. },
  31591. "version": {
  31592. "type": "integer"
  31593. }
  31594. },
  31595. "required": ["aggregateID", "seq", "version"],
  31596. "additionalProperties": false
  31597. },
  31598. "location": {
  31599. "$ref": "#/components/schemas/LocationRef"
  31600. },
  31601. "data": {
  31602. "type": "object",
  31603. "properties": {
  31604. "sessionID": {
  31605. "type": "string",
  31606. "pattern": "^ses"
  31607. },
  31608. "error": {
  31609. "anyOf": [
  31610. {
  31611. "$ref": "#/components/schemas/ProviderAuthError"
  31612. },
  31613. {
  31614. "$ref": "#/components/schemas/UnknownError"
  31615. },
  31616. {
  31617. "$ref": "#/components/schemas/MessageOutputLengthError"
  31618. },
  31619. {
  31620. "$ref": "#/components/schemas/MessageAbortedError"
  31621. },
  31622. {
  31623. "$ref": "#/components/schemas/StructuredOutputError"
  31624. },
  31625. {
  31626. "$ref": "#/components/schemas/ContextOverflowError"
  31627. },
  31628. {
  31629. "$ref": "#/components/schemas/ContentFilterError"
  31630. },
  31631. {
  31632. "$ref": "#/components/schemas/APIError"
  31633. }
  31634. ]
  31635. }
  31636. },
  31637. "additionalProperties": false
  31638. }
  31639. },
  31640. "required": ["id", "type", "data"],
  31641. "additionalProperties": false
  31642. },
  31643. "InstallationUpdated": {
  31644. "type": "object",
  31645. "properties": {
  31646. "id": {
  31647. "type": "string",
  31648. "pattern": "^evt_"
  31649. },
  31650. "metadata": {
  31651. "type": "object"
  31652. },
  31653. "type": {
  31654. "type": "string",
  31655. "enum": ["installation.updated"]
  31656. },
  31657. "durable": {
  31658. "type": "object",
  31659. "properties": {
  31660. "aggregateID": {
  31661. "type": "string"
  31662. },
  31663. "seq": {
  31664. "type": "integer"
  31665. },
  31666. "version": {
  31667. "type": "integer"
  31668. }
  31669. },
  31670. "required": ["aggregateID", "seq", "version"],
  31671. "additionalProperties": false
  31672. },
  31673. "location": {
  31674. "$ref": "#/components/schemas/LocationRef"
  31675. },
  31676. "data": {
  31677. "type": "object",
  31678. "properties": {
  31679. "version": {
  31680. "type": "string"
  31681. }
  31682. },
  31683. "required": ["version"],
  31684. "additionalProperties": false
  31685. }
  31686. },
  31687. "required": ["id", "type", "data"],
  31688. "additionalProperties": false
  31689. },
  31690. "InstallationUpdate-available": {
  31691. "type": "object",
  31692. "properties": {
  31693. "id": {
  31694. "type": "string",
  31695. "pattern": "^evt_"
  31696. },
  31697. "metadata": {
  31698. "type": "object"
  31699. },
  31700. "type": {
  31701. "type": "string",
  31702. "enum": ["installation.update-available"]
  31703. },
  31704. "durable": {
  31705. "type": "object",
  31706. "properties": {
  31707. "aggregateID": {
  31708. "type": "string"
  31709. },
  31710. "seq": {
  31711. "type": "integer"
  31712. },
  31713. "version": {
  31714. "type": "integer"
  31715. }
  31716. },
  31717. "required": ["aggregateID", "seq", "version"],
  31718. "additionalProperties": false
  31719. },
  31720. "location": {
  31721. "$ref": "#/components/schemas/LocationRef"
  31722. },
  31723. "data": {
  31724. "type": "object",
  31725. "properties": {
  31726. "version": {
  31727. "type": "string"
  31728. }
  31729. },
  31730. "required": ["version"],
  31731. "additionalProperties": false
  31732. }
  31733. },
  31734. "required": ["id", "type", "data"],
  31735. "additionalProperties": false
  31736. },
  31737. "FileEdited": {
  31738. "type": "object",
  31739. "properties": {
  31740. "id": {
  31741. "type": "string",
  31742. "pattern": "^evt_"
  31743. },
  31744. "metadata": {
  31745. "type": "object"
  31746. },
  31747. "type": {
  31748. "type": "string",
  31749. "enum": ["file.edited"]
  31750. },
  31751. "durable": {
  31752. "type": "object",
  31753. "properties": {
  31754. "aggregateID": {
  31755. "type": "string"
  31756. },
  31757. "seq": {
  31758. "type": "integer"
  31759. },
  31760. "version": {
  31761. "type": "integer"
  31762. }
  31763. },
  31764. "required": ["aggregateID", "seq", "version"],
  31765. "additionalProperties": false
  31766. },
  31767. "location": {
  31768. "$ref": "#/components/schemas/LocationRef"
  31769. },
  31770. "data": {
  31771. "type": "object",
  31772. "properties": {
  31773. "file": {
  31774. "type": "string"
  31775. }
  31776. },
  31777. "required": ["file"],
  31778. "additionalProperties": false
  31779. }
  31780. },
  31781. "required": ["id", "type", "data"],
  31782. "additionalProperties": false
  31783. },
  31784. "ReferenceUpdated": {
  31785. "type": "object",
  31786. "properties": {
  31787. "id": {
  31788. "type": "string",
  31789. "pattern": "^evt_"
  31790. },
  31791. "metadata": {
  31792. "type": "object"
  31793. },
  31794. "type": {
  31795. "type": "string",
  31796. "enum": ["reference.updated"]
  31797. },
  31798. "durable": {
  31799. "type": "object",
  31800. "properties": {
  31801. "aggregateID": {
  31802. "type": "string"
  31803. },
  31804. "seq": {
  31805. "type": "integer"
  31806. },
  31807. "version": {
  31808. "type": "integer"
  31809. }
  31810. },
  31811. "required": ["aggregateID", "seq", "version"],
  31812. "additionalProperties": false
  31813. },
  31814. "location": {
  31815. "$ref": "#/components/schemas/LocationRef"
  31816. },
  31817. "data": {
  31818. "type": "object",
  31819. "properties": {}
  31820. }
  31821. },
  31822. "required": ["id", "type", "data"],
  31823. "additionalProperties": false
  31824. },
  31825. "PermissionV2Asked": {
  31826. "type": "object",
  31827. "properties": {
  31828. "id": {
  31829. "type": "string",
  31830. "pattern": "^evt_"
  31831. },
  31832. "metadata": {
  31833. "type": "object"
  31834. },
  31835. "type": {
  31836. "type": "string",
  31837. "enum": ["permission.v2.asked"]
  31838. },
  31839. "durable": {
  31840. "type": "object",
  31841. "properties": {
  31842. "aggregateID": {
  31843. "type": "string"
  31844. },
  31845. "seq": {
  31846. "type": "integer"
  31847. },
  31848. "version": {
  31849. "type": "integer"
  31850. }
  31851. },
  31852. "required": ["aggregateID", "seq", "version"],
  31853. "additionalProperties": false
  31854. },
  31855. "location": {
  31856. "$ref": "#/components/schemas/LocationRef"
  31857. },
  31858. "data": {
  31859. "type": "object",
  31860. "properties": {
  31861. "id": {
  31862. "type": "string",
  31863. "pattern": "^per"
  31864. },
  31865. "sessionID": {
  31866. "type": "string",
  31867. "pattern": "^ses"
  31868. },
  31869. "action": {
  31870. "type": "string"
  31871. },
  31872. "resources": {
  31873. "type": "array",
  31874. "items": {
  31875. "type": "string"
  31876. }
  31877. },
  31878. "save": {
  31879. "type": "array",
  31880. "items": {
  31881. "type": "string"
  31882. }
  31883. },
  31884. "metadata": {
  31885. "type": "object"
  31886. },
  31887. "source": {
  31888. "$ref": "#/components/schemas/PermissionV2Source"
  31889. }
  31890. },
  31891. "required": ["id", "sessionID", "action", "resources"],
  31892. "additionalProperties": false
  31893. }
  31894. },
  31895. "required": ["id", "type", "data"],
  31896. "additionalProperties": false
  31897. },
  31898. "PermissionV2Replied": {
  31899. "type": "object",
  31900. "properties": {
  31901. "id": {
  31902. "type": "string",
  31903. "pattern": "^evt_"
  31904. },
  31905. "metadata": {
  31906. "type": "object"
  31907. },
  31908. "type": {
  31909. "type": "string",
  31910. "enum": ["permission.v2.replied"]
  31911. },
  31912. "durable": {
  31913. "type": "object",
  31914. "properties": {
  31915. "aggregateID": {
  31916. "type": "string"
  31917. },
  31918. "seq": {
  31919. "type": "integer"
  31920. },
  31921. "version": {
  31922. "type": "integer"
  31923. }
  31924. },
  31925. "required": ["aggregateID", "seq", "version"],
  31926. "additionalProperties": false
  31927. },
  31928. "location": {
  31929. "$ref": "#/components/schemas/LocationRef"
  31930. },
  31931. "data": {
  31932. "type": "object",
  31933. "properties": {
  31934. "sessionID": {
  31935. "type": "string",
  31936. "pattern": "^ses"
  31937. },
  31938. "requestID": {
  31939. "type": "string",
  31940. "pattern": "^per"
  31941. },
  31942. "reply": {
  31943. "$ref": "#/components/schemas/PermissionV2Reply"
  31944. }
  31945. },
  31946. "required": ["sessionID", "requestID", "reply"],
  31947. "additionalProperties": false
  31948. }
  31949. },
  31950. "required": ["id", "type", "data"],
  31951. "additionalProperties": false
  31952. },
  31953. "PluginAdded": {
  31954. "type": "object",
  31955. "properties": {
  31956. "id": {
  31957. "type": "string",
  31958. "pattern": "^evt_"
  31959. },
  31960. "metadata": {
  31961. "type": "object"
  31962. },
  31963. "type": {
  31964. "type": "string",
  31965. "enum": ["plugin.added"]
  31966. },
  31967. "durable": {
  31968. "type": "object",
  31969. "properties": {
  31970. "aggregateID": {
  31971. "type": "string"
  31972. },
  31973. "seq": {
  31974. "type": "integer"
  31975. },
  31976. "version": {
  31977. "type": "integer"
  31978. }
  31979. },
  31980. "required": ["aggregateID", "seq", "version"],
  31981. "additionalProperties": false
  31982. },
  31983. "location": {
  31984. "$ref": "#/components/schemas/LocationRef"
  31985. },
  31986. "data": {
  31987. "type": "object",
  31988. "properties": {
  31989. "id": {
  31990. "type": "string"
  31991. }
  31992. },
  31993. "required": ["id"],
  31994. "additionalProperties": false
  31995. }
  31996. },
  31997. "required": ["id", "type", "data"],
  31998. "additionalProperties": false
  31999. },
  32000. "ProjectDirectoriesUpdated": {
  32001. "type": "object",
  32002. "properties": {
  32003. "id": {
  32004. "type": "string",
  32005. "pattern": "^evt_"
  32006. },
  32007. "metadata": {
  32008. "type": "object"
  32009. },
  32010. "type": {
  32011. "type": "string",
  32012. "enum": ["project.directories.updated"]
  32013. },
  32014. "durable": {
  32015. "type": "object",
  32016. "properties": {
  32017. "aggregateID": {
  32018. "type": "string"
  32019. },
  32020. "seq": {
  32021. "type": "integer"
  32022. },
  32023. "version": {
  32024. "type": "integer"
  32025. }
  32026. },
  32027. "required": ["aggregateID", "seq", "version"],
  32028. "additionalProperties": false
  32029. },
  32030. "location": {
  32031. "$ref": "#/components/schemas/LocationRef"
  32032. },
  32033. "data": {
  32034. "type": "object",
  32035. "properties": {
  32036. "projectID": {
  32037. "type": "string"
  32038. }
  32039. },
  32040. "required": ["projectID"],
  32041. "additionalProperties": false
  32042. }
  32043. },
  32044. "required": ["id", "type", "data"],
  32045. "additionalProperties": false
  32046. },
  32047. "FileWatcherUpdated": {
  32048. "type": "object",
  32049. "properties": {
  32050. "id": {
  32051. "type": "string",
  32052. "pattern": "^evt_"
  32053. },
  32054. "metadata": {
  32055. "type": "object"
  32056. },
  32057. "type": {
  32058. "type": "string",
  32059. "enum": ["file.watcher.updated"]
  32060. },
  32061. "durable": {
  32062. "type": "object",
  32063. "properties": {
  32064. "aggregateID": {
  32065. "type": "string"
  32066. },
  32067. "seq": {
  32068. "type": "integer"
  32069. },
  32070. "version": {
  32071. "type": "integer"
  32072. }
  32073. },
  32074. "required": ["aggregateID", "seq", "version"],
  32075. "additionalProperties": false
  32076. },
  32077. "location": {
  32078. "$ref": "#/components/schemas/LocationRef"
  32079. },
  32080. "data": {
  32081. "type": "object",
  32082. "properties": {
  32083. "file": {
  32084. "type": "string"
  32085. },
  32086. "event": {
  32087. "type": "string",
  32088. "enum": ["add", "change", "unlink"]
  32089. }
  32090. },
  32091. "required": ["file", "event"],
  32092. "additionalProperties": false
  32093. }
  32094. },
  32095. "required": ["id", "type", "data"],
  32096. "additionalProperties": false
  32097. },
  32098. "PtyCreated": {
  32099. "type": "object",
  32100. "properties": {
  32101. "id": {
  32102. "type": "string",
  32103. "pattern": "^evt_"
  32104. },
  32105. "metadata": {
  32106. "type": "object"
  32107. },
  32108. "type": {
  32109. "type": "string",
  32110. "enum": ["pty.created"]
  32111. },
  32112. "durable": {
  32113. "type": "object",
  32114. "properties": {
  32115. "aggregateID": {
  32116. "type": "string"
  32117. },
  32118. "seq": {
  32119. "type": "integer"
  32120. },
  32121. "version": {
  32122. "type": "integer"
  32123. }
  32124. },
  32125. "required": ["aggregateID", "seq", "version"],
  32126. "additionalProperties": false
  32127. },
  32128. "location": {
  32129. "$ref": "#/components/schemas/LocationRef"
  32130. },
  32131. "data": {
  32132. "type": "object",
  32133. "properties": {
  32134. "info": {
  32135. "$ref": "#/components/schemas/Pty"
  32136. }
  32137. },
  32138. "required": ["info"],
  32139. "additionalProperties": false
  32140. }
  32141. },
  32142. "required": ["id", "type", "data"],
  32143. "additionalProperties": false
  32144. },
  32145. "PtyUpdated": {
  32146. "type": "object",
  32147. "properties": {
  32148. "id": {
  32149. "type": "string",
  32150. "pattern": "^evt_"
  32151. },
  32152. "metadata": {
  32153. "type": "object"
  32154. },
  32155. "type": {
  32156. "type": "string",
  32157. "enum": ["pty.updated"]
  32158. },
  32159. "durable": {
  32160. "type": "object",
  32161. "properties": {
  32162. "aggregateID": {
  32163. "type": "string"
  32164. },
  32165. "seq": {
  32166. "type": "integer"
  32167. },
  32168. "version": {
  32169. "type": "integer"
  32170. }
  32171. },
  32172. "required": ["aggregateID", "seq", "version"],
  32173. "additionalProperties": false
  32174. },
  32175. "location": {
  32176. "$ref": "#/components/schemas/LocationRef"
  32177. },
  32178. "data": {
  32179. "type": "object",
  32180. "properties": {
  32181. "info": {
  32182. "$ref": "#/components/schemas/Pty"
  32183. }
  32184. },
  32185. "required": ["info"],
  32186. "additionalProperties": false
  32187. }
  32188. },
  32189. "required": ["id", "type", "data"],
  32190. "additionalProperties": false
  32191. },
  32192. "PtyExited": {
  32193. "type": "object",
  32194. "properties": {
  32195. "id": {
  32196. "type": "string",
  32197. "pattern": "^evt_"
  32198. },
  32199. "metadata": {
  32200. "type": "object"
  32201. },
  32202. "type": {
  32203. "type": "string",
  32204. "enum": ["pty.exited"]
  32205. },
  32206. "durable": {
  32207. "type": "object",
  32208. "properties": {
  32209. "aggregateID": {
  32210. "type": "string"
  32211. },
  32212. "seq": {
  32213. "type": "integer"
  32214. },
  32215. "version": {
  32216. "type": "integer"
  32217. }
  32218. },
  32219. "required": ["aggregateID", "seq", "version"],
  32220. "additionalProperties": false
  32221. },
  32222. "location": {
  32223. "$ref": "#/components/schemas/LocationRef"
  32224. },
  32225. "data": {
  32226. "type": "object",
  32227. "properties": {
  32228. "id": {
  32229. "type": "string",
  32230. "pattern": "^pty"
  32231. },
  32232. "exitCode": {
  32233. "type": "integer",
  32234. "minimum": 0
  32235. }
  32236. },
  32237. "required": ["id", "exitCode"],
  32238. "additionalProperties": false
  32239. }
  32240. },
  32241. "required": ["id", "type", "data"],
  32242. "additionalProperties": false
  32243. },
  32244. "PtyDeleted": {
  32245. "type": "object",
  32246. "properties": {
  32247. "id": {
  32248. "type": "string",
  32249. "pattern": "^evt_"
  32250. },
  32251. "metadata": {
  32252. "type": "object"
  32253. },
  32254. "type": {
  32255. "type": "string",
  32256. "enum": ["pty.deleted"]
  32257. },
  32258. "durable": {
  32259. "type": "object",
  32260. "properties": {
  32261. "aggregateID": {
  32262. "type": "string"
  32263. },
  32264. "seq": {
  32265. "type": "integer"
  32266. },
  32267. "version": {
  32268. "type": "integer"
  32269. }
  32270. },
  32271. "required": ["aggregateID", "seq", "version"],
  32272. "additionalProperties": false
  32273. },
  32274. "location": {
  32275. "$ref": "#/components/schemas/LocationRef"
  32276. },
  32277. "data": {
  32278. "type": "object",
  32279. "properties": {
  32280. "id": {
  32281. "type": "string",
  32282. "pattern": "^pty"
  32283. }
  32284. },
  32285. "required": ["id"],
  32286. "additionalProperties": false
  32287. }
  32288. },
  32289. "required": ["id", "type", "data"],
  32290. "additionalProperties": false
  32291. },
  32292. "QuestionV2Asked": {
  32293. "type": "object",
  32294. "properties": {
  32295. "id": {
  32296. "type": "string",
  32297. "pattern": "^evt_"
  32298. },
  32299. "metadata": {
  32300. "type": "object"
  32301. },
  32302. "type": {
  32303. "type": "string",
  32304. "enum": ["question.v2.asked"]
  32305. },
  32306. "durable": {
  32307. "type": "object",
  32308. "properties": {
  32309. "aggregateID": {
  32310. "type": "string"
  32311. },
  32312. "seq": {
  32313. "type": "integer"
  32314. },
  32315. "version": {
  32316. "type": "integer"
  32317. }
  32318. },
  32319. "required": ["aggregateID", "seq", "version"],
  32320. "additionalProperties": false
  32321. },
  32322. "location": {
  32323. "$ref": "#/components/schemas/LocationRef"
  32324. },
  32325. "data": {
  32326. "type": "object",
  32327. "properties": {
  32328. "id": {
  32329. "type": "string",
  32330. "pattern": "^que"
  32331. },
  32332. "sessionID": {
  32333. "type": "string",
  32334. "pattern": "^ses"
  32335. },
  32336. "questions": {
  32337. "type": "array",
  32338. "items": {
  32339. "$ref": "#/components/schemas/QuestionV2Info"
  32340. },
  32341. "description": "Questions to ask"
  32342. },
  32343. "tool": {
  32344. "$ref": "#/components/schemas/QuestionV2Tool"
  32345. }
  32346. },
  32347. "required": ["id", "sessionID", "questions"],
  32348. "additionalProperties": false
  32349. }
  32350. },
  32351. "required": ["id", "type", "data"],
  32352. "additionalProperties": false
  32353. },
  32354. "QuestionV2Replied": {
  32355. "type": "object",
  32356. "properties": {
  32357. "id": {
  32358. "type": "string",
  32359. "pattern": "^evt_"
  32360. },
  32361. "metadata": {
  32362. "type": "object"
  32363. },
  32364. "type": {
  32365. "type": "string",
  32366. "enum": ["question.v2.replied"]
  32367. },
  32368. "durable": {
  32369. "type": "object",
  32370. "properties": {
  32371. "aggregateID": {
  32372. "type": "string"
  32373. },
  32374. "seq": {
  32375. "type": "integer"
  32376. },
  32377. "version": {
  32378. "type": "integer"
  32379. }
  32380. },
  32381. "required": ["aggregateID", "seq", "version"],
  32382. "additionalProperties": false
  32383. },
  32384. "location": {
  32385. "$ref": "#/components/schemas/LocationRef"
  32386. },
  32387. "data": {
  32388. "type": "object",
  32389. "properties": {
  32390. "sessionID": {
  32391. "type": "string",
  32392. "pattern": "^ses"
  32393. },
  32394. "requestID": {
  32395. "type": "string",
  32396. "pattern": "^que"
  32397. },
  32398. "answers": {
  32399. "type": "array",
  32400. "items": {
  32401. "$ref": "#/components/schemas/QuestionV2Answer"
  32402. }
  32403. }
  32404. },
  32405. "required": ["sessionID", "requestID", "answers"],
  32406. "additionalProperties": false
  32407. }
  32408. },
  32409. "required": ["id", "type", "data"],
  32410. "additionalProperties": false
  32411. },
  32412. "QuestionV2Rejected": {
  32413. "type": "object",
  32414. "properties": {
  32415. "id": {
  32416. "type": "string",
  32417. "pattern": "^evt_"
  32418. },
  32419. "metadata": {
  32420. "type": "object"
  32421. },
  32422. "type": {
  32423. "type": "string",
  32424. "enum": ["question.v2.rejected"]
  32425. },
  32426. "durable": {
  32427. "type": "object",
  32428. "properties": {
  32429. "aggregateID": {
  32430. "type": "string"
  32431. },
  32432. "seq": {
  32433. "type": "integer"
  32434. },
  32435. "version": {
  32436. "type": "integer"
  32437. }
  32438. },
  32439. "required": ["aggregateID", "seq", "version"],
  32440. "additionalProperties": false
  32441. },
  32442. "location": {
  32443. "$ref": "#/components/schemas/LocationRef"
  32444. },
  32445. "data": {
  32446. "type": "object",
  32447. "properties": {
  32448. "sessionID": {
  32449. "type": "string",
  32450. "pattern": "^ses"
  32451. },
  32452. "requestID": {
  32453. "type": "string",
  32454. "pattern": "^que"
  32455. }
  32456. },
  32457. "required": ["sessionID", "requestID"],
  32458. "additionalProperties": false
  32459. }
  32460. },
  32461. "required": ["id", "type", "data"],
  32462. "additionalProperties": false
  32463. },
  32464. "TodoUpdated": {
  32465. "type": "object",
  32466. "properties": {
  32467. "id": {
  32468. "type": "string",
  32469. "pattern": "^evt_"
  32470. },
  32471. "metadata": {
  32472. "type": "object"
  32473. },
  32474. "type": {
  32475. "type": "string",
  32476. "enum": ["todo.updated"]
  32477. },
  32478. "durable": {
  32479. "type": "object",
  32480. "properties": {
  32481. "aggregateID": {
  32482. "type": "string"
  32483. },
  32484. "seq": {
  32485. "type": "integer"
  32486. },
  32487. "version": {
  32488. "type": "integer"
  32489. }
  32490. },
  32491. "required": ["aggregateID", "seq", "version"],
  32492. "additionalProperties": false
  32493. },
  32494. "location": {
  32495. "$ref": "#/components/schemas/LocationRef"
  32496. },
  32497. "data": {
  32498. "type": "object",
  32499. "properties": {
  32500. "sessionID": {
  32501. "type": "string",
  32502. "pattern": "^ses"
  32503. },
  32504. "todos": {
  32505. "type": "array",
  32506. "items": {
  32507. "$ref": "#/components/schemas/Todo"
  32508. }
  32509. }
  32510. },
  32511. "required": ["sessionID", "todos"],
  32512. "additionalProperties": false
  32513. }
  32514. },
  32515. "required": ["id", "type", "data"],
  32516. "additionalProperties": false
  32517. },
  32518. "LspUpdated": {
  32519. "type": "object",
  32520. "properties": {
  32521. "id": {
  32522. "type": "string",
  32523. "pattern": "^evt_"
  32524. },
  32525. "metadata": {
  32526. "type": "object"
  32527. },
  32528. "type": {
  32529. "type": "string",
  32530. "enum": ["lsp.updated"]
  32531. },
  32532. "durable": {
  32533. "type": "object",
  32534. "properties": {
  32535. "aggregateID": {
  32536. "type": "string"
  32537. },
  32538. "seq": {
  32539. "type": "integer"
  32540. },
  32541. "version": {
  32542. "type": "integer"
  32543. }
  32544. },
  32545. "required": ["aggregateID", "seq", "version"],
  32546. "additionalProperties": false
  32547. },
  32548. "location": {
  32549. "$ref": "#/components/schemas/LocationRef"
  32550. },
  32551. "data": {
  32552. "type": "object",
  32553. "properties": {}
  32554. }
  32555. },
  32556. "required": ["id", "type", "data"],
  32557. "additionalProperties": false
  32558. },
  32559. "PermissionAsked": {
  32560. "type": "object",
  32561. "properties": {
  32562. "id": {
  32563. "type": "string",
  32564. "pattern": "^evt_"
  32565. },
  32566. "metadata": {
  32567. "type": "object"
  32568. },
  32569. "type": {
  32570. "type": "string",
  32571. "enum": ["permission.asked"]
  32572. },
  32573. "durable": {
  32574. "type": "object",
  32575. "properties": {
  32576. "aggregateID": {
  32577. "type": "string"
  32578. },
  32579. "seq": {
  32580. "type": "integer"
  32581. },
  32582. "version": {
  32583. "type": "integer"
  32584. }
  32585. },
  32586. "required": ["aggregateID", "seq", "version"],
  32587. "additionalProperties": false
  32588. },
  32589. "location": {
  32590. "$ref": "#/components/schemas/LocationRef"
  32591. },
  32592. "data": {
  32593. "type": "object",
  32594. "properties": {
  32595. "id": {
  32596. "type": "string",
  32597. "pattern": "^per"
  32598. },
  32599. "sessionID": {
  32600. "type": "string",
  32601. "pattern": "^ses"
  32602. },
  32603. "permission": {
  32604. "type": "string"
  32605. },
  32606. "patterns": {
  32607. "type": "array",
  32608. "items": {
  32609. "type": "string"
  32610. }
  32611. },
  32612. "metadata": {
  32613. "type": "object"
  32614. },
  32615. "always": {
  32616. "type": "array",
  32617. "items": {
  32618. "type": "string"
  32619. }
  32620. },
  32621. "tool": {
  32622. "type": "object",
  32623. "properties": {
  32624. "messageID": {
  32625. "type": "string"
  32626. },
  32627. "callID": {
  32628. "type": "string"
  32629. }
  32630. },
  32631. "required": ["messageID", "callID"],
  32632. "additionalProperties": false
  32633. }
  32634. },
  32635. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  32636. "additionalProperties": false
  32637. }
  32638. },
  32639. "required": ["id", "type", "data"],
  32640. "additionalProperties": false
  32641. },
  32642. "PermissionReplied": {
  32643. "type": "object",
  32644. "properties": {
  32645. "id": {
  32646. "type": "string",
  32647. "pattern": "^evt_"
  32648. },
  32649. "metadata": {
  32650. "type": "object"
  32651. },
  32652. "type": {
  32653. "type": "string",
  32654. "enum": ["permission.replied"]
  32655. },
  32656. "durable": {
  32657. "type": "object",
  32658. "properties": {
  32659. "aggregateID": {
  32660. "type": "string"
  32661. },
  32662. "seq": {
  32663. "type": "integer"
  32664. },
  32665. "version": {
  32666. "type": "integer"
  32667. }
  32668. },
  32669. "required": ["aggregateID", "seq", "version"],
  32670. "additionalProperties": false
  32671. },
  32672. "location": {
  32673. "$ref": "#/components/schemas/LocationRef"
  32674. },
  32675. "data": {
  32676. "type": "object",
  32677. "properties": {
  32678. "sessionID": {
  32679. "type": "string",
  32680. "pattern": "^ses"
  32681. },
  32682. "requestID": {
  32683. "type": "string",
  32684. "pattern": "^per"
  32685. },
  32686. "reply": {
  32687. "type": "string",
  32688. "enum": ["once", "always", "reject"]
  32689. }
  32690. },
  32691. "required": ["sessionID", "requestID", "reply"],
  32692. "additionalProperties": false
  32693. }
  32694. },
  32695. "required": ["id", "type", "data"],
  32696. "additionalProperties": false
  32697. },
  32698. "TuiPromptAppend": {
  32699. "type": "object",
  32700. "properties": {
  32701. "id": {
  32702. "type": "string",
  32703. "pattern": "^evt_"
  32704. },
  32705. "metadata": {
  32706. "type": "object"
  32707. },
  32708. "type": {
  32709. "type": "string",
  32710. "enum": ["tui.prompt.append"]
  32711. },
  32712. "durable": {
  32713. "type": "object",
  32714. "properties": {
  32715. "aggregateID": {
  32716. "type": "string"
  32717. },
  32718. "seq": {
  32719. "type": "integer"
  32720. },
  32721. "version": {
  32722. "type": "integer"
  32723. }
  32724. },
  32725. "required": ["aggregateID", "seq", "version"],
  32726. "additionalProperties": false
  32727. },
  32728. "location": {
  32729. "$ref": "#/components/schemas/LocationRef"
  32730. },
  32731. "data": {
  32732. "type": "object",
  32733. "properties": {
  32734. "text": {
  32735. "type": "string"
  32736. }
  32737. },
  32738. "required": ["text"],
  32739. "additionalProperties": false
  32740. }
  32741. },
  32742. "required": ["id", "type", "data"],
  32743. "additionalProperties": false
  32744. },
  32745. "TuiCommandExecute": {
  32746. "type": "object",
  32747. "properties": {
  32748. "id": {
  32749. "type": "string",
  32750. "pattern": "^evt_"
  32751. },
  32752. "metadata": {
  32753. "type": "object"
  32754. },
  32755. "type": {
  32756. "type": "string",
  32757. "enum": ["tui.command.execute"]
  32758. },
  32759. "durable": {
  32760. "type": "object",
  32761. "properties": {
  32762. "aggregateID": {
  32763. "type": "string"
  32764. },
  32765. "seq": {
  32766. "type": "integer"
  32767. },
  32768. "version": {
  32769. "type": "integer"
  32770. }
  32771. },
  32772. "required": ["aggregateID", "seq", "version"],
  32773. "additionalProperties": false
  32774. },
  32775. "location": {
  32776. "$ref": "#/components/schemas/LocationRef"
  32777. },
  32778. "data": {
  32779. "type": "object",
  32780. "properties": {
  32781. "command": {
  32782. "anyOf": [
  32783. {
  32784. "type": "string",
  32785. "enum": [
  32786. "session.list",
  32787. "session.new",
  32788. "session.share",
  32789. "session.interrupt",
  32790. "session.compact",
  32791. "session.page.up",
  32792. "session.page.down",
  32793. "session.line.up",
  32794. "session.line.down",
  32795. "session.half.page.up",
  32796. "session.half.page.down",
  32797. "session.first",
  32798. "session.last",
  32799. "prompt.clear",
  32800. "prompt.submit",
  32801. "agent.cycle"
  32802. ]
  32803. },
  32804. {
  32805. "type": "string"
  32806. }
  32807. ]
  32808. }
  32809. },
  32810. "required": ["command"],
  32811. "additionalProperties": false
  32812. }
  32813. },
  32814. "required": ["id", "type", "data"],
  32815. "additionalProperties": false
  32816. },
  32817. "TuiToastShow": {
  32818. "type": "object",
  32819. "properties": {
  32820. "id": {
  32821. "type": "string",
  32822. "pattern": "^evt_"
  32823. },
  32824. "metadata": {
  32825. "type": "object"
  32826. },
  32827. "type": {
  32828. "type": "string",
  32829. "enum": ["tui.toast.show"]
  32830. },
  32831. "durable": {
  32832. "type": "object",
  32833. "properties": {
  32834. "aggregateID": {
  32835. "type": "string"
  32836. },
  32837. "seq": {
  32838. "type": "integer"
  32839. },
  32840. "version": {
  32841. "type": "integer"
  32842. }
  32843. },
  32844. "required": ["aggregateID", "seq", "version"],
  32845. "additionalProperties": false
  32846. },
  32847. "location": {
  32848. "$ref": "#/components/schemas/LocationRef"
  32849. },
  32850. "data": {
  32851. "type": "object",
  32852. "properties": {
  32853. "title": {
  32854. "type": "string"
  32855. },
  32856. "message": {
  32857. "type": "string"
  32858. },
  32859. "variant": {
  32860. "type": "string",
  32861. "enum": ["info", "success", "warning", "error"]
  32862. },
  32863. "duration": {
  32864. "type": "integer",
  32865. "exclusiveMinimum": 0
  32866. }
  32867. },
  32868. "required": ["message", "variant"],
  32869. "additionalProperties": false
  32870. }
  32871. },
  32872. "required": ["id", "type", "data"],
  32873. "additionalProperties": false
  32874. },
  32875. "TuiSessionSelect": {
  32876. "type": "object",
  32877. "properties": {
  32878. "id": {
  32879. "type": "string",
  32880. "pattern": "^evt_"
  32881. },
  32882. "metadata": {
  32883. "type": "object"
  32884. },
  32885. "type": {
  32886. "type": "string",
  32887. "enum": ["tui.session.select"]
  32888. },
  32889. "durable": {
  32890. "type": "object",
  32891. "properties": {
  32892. "aggregateID": {
  32893. "type": "string"
  32894. },
  32895. "seq": {
  32896. "type": "integer"
  32897. },
  32898. "version": {
  32899. "type": "integer"
  32900. }
  32901. },
  32902. "required": ["aggregateID", "seq", "version"],
  32903. "additionalProperties": false
  32904. },
  32905. "location": {
  32906. "$ref": "#/components/schemas/LocationRef"
  32907. },
  32908. "data": {
  32909. "type": "object",
  32910. "properties": {
  32911. "sessionID": {
  32912. "type": "string",
  32913. "pattern": "^ses",
  32914. "description": "Session ID to navigate to"
  32915. }
  32916. },
  32917. "required": ["sessionID"],
  32918. "additionalProperties": false
  32919. }
  32920. },
  32921. "required": ["id", "type", "data"],
  32922. "additionalProperties": false
  32923. },
  32924. "McpToolsChanged": {
  32925. "type": "object",
  32926. "properties": {
  32927. "id": {
  32928. "type": "string",
  32929. "pattern": "^evt_"
  32930. },
  32931. "metadata": {
  32932. "type": "object"
  32933. },
  32934. "type": {
  32935. "type": "string",
  32936. "enum": ["mcp.tools.changed"]
  32937. },
  32938. "durable": {
  32939. "type": "object",
  32940. "properties": {
  32941. "aggregateID": {
  32942. "type": "string"
  32943. },
  32944. "seq": {
  32945. "type": "integer"
  32946. },
  32947. "version": {
  32948. "type": "integer"
  32949. }
  32950. },
  32951. "required": ["aggregateID", "seq", "version"],
  32952. "additionalProperties": false
  32953. },
  32954. "location": {
  32955. "$ref": "#/components/schemas/LocationRef"
  32956. },
  32957. "data": {
  32958. "type": "object",
  32959. "properties": {
  32960. "server": {
  32961. "type": "string"
  32962. }
  32963. },
  32964. "required": ["server"],
  32965. "additionalProperties": false
  32966. }
  32967. },
  32968. "required": ["id", "type", "data"],
  32969. "additionalProperties": false
  32970. },
  32971. "McpBrowserOpenFailed": {
  32972. "type": "object",
  32973. "properties": {
  32974. "id": {
  32975. "type": "string",
  32976. "pattern": "^evt_"
  32977. },
  32978. "metadata": {
  32979. "type": "object"
  32980. },
  32981. "type": {
  32982. "type": "string",
  32983. "enum": ["mcp.browser.open.failed"]
  32984. },
  32985. "durable": {
  32986. "type": "object",
  32987. "properties": {
  32988. "aggregateID": {
  32989. "type": "string"
  32990. },
  32991. "seq": {
  32992. "type": "integer"
  32993. },
  32994. "version": {
  32995. "type": "integer"
  32996. }
  32997. },
  32998. "required": ["aggregateID", "seq", "version"],
  32999. "additionalProperties": false
  33000. },
  33001. "location": {
  33002. "$ref": "#/components/schemas/LocationRef"
  33003. },
  33004. "data": {
  33005. "type": "object",
  33006. "properties": {
  33007. "mcpName": {
  33008. "type": "string"
  33009. },
  33010. "url": {
  33011. "type": "string"
  33012. }
  33013. },
  33014. "required": ["mcpName", "url"],
  33015. "additionalProperties": false
  33016. }
  33017. },
  33018. "required": ["id", "type", "data"],
  33019. "additionalProperties": false
  33020. },
  33021. "CommandExecuted": {
  33022. "type": "object",
  33023. "properties": {
  33024. "id": {
  33025. "type": "string",
  33026. "pattern": "^evt_"
  33027. },
  33028. "metadata": {
  33029. "type": "object"
  33030. },
  33031. "type": {
  33032. "type": "string",
  33033. "enum": ["command.executed"]
  33034. },
  33035. "durable": {
  33036. "type": "object",
  33037. "properties": {
  33038. "aggregateID": {
  33039. "type": "string"
  33040. },
  33041. "seq": {
  33042. "type": "integer"
  33043. },
  33044. "version": {
  33045. "type": "integer"
  33046. }
  33047. },
  33048. "required": ["aggregateID", "seq", "version"],
  33049. "additionalProperties": false
  33050. },
  33051. "location": {
  33052. "$ref": "#/components/schemas/LocationRef"
  33053. },
  33054. "data": {
  33055. "type": "object",
  33056. "properties": {
  33057. "name": {
  33058. "type": "string"
  33059. },
  33060. "sessionID": {
  33061. "type": "string",
  33062. "pattern": "^ses"
  33063. },
  33064. "arguments": {
  33065. "type": "string"
  33066. },
  33067. "messageID": {
  33068. "type": "string",
  33069. "pattern": "^msg"
  33070. }
  33071. },
  33072. "required": ["name", "sessionID", "arguments", "messageID"],
  33073. "additionalProperties": false
  33074. }
  33075. },
  33076. "required": ["id", "type", "data"],
  33077. "additionalProperties": false
  33078. },
  33079. "ProjectUpdated": {
  33080. "type": "object",
  33081. "properties": {
  33082. "id": {
  33083. "type": "string",
  33084. "pattern": "^evt_"
  33085. },
  33086. "metadata": {
  33087. "type": "object"
  33088. },
  33089. "type": {
  33090. "type": "string",
  33091. "enum": ["project.updated"]
  33092. },
  33093. "durable": {
  33094. "type": "object",
  33095. "properties": {
  33096. "aggregateID": {
  33097. "type": "string"
  33098. },
  33099. "seq": {
  33100. "type": "integer"
  33101. },
  33102. "version": {
  33103. "type": "integer"
  33104. }
  33105. },
  33106. "required": ["aggregateID", "seq", "version"],
  33107. "additionalProperties": false
  33108. },
  33109. "location": {
  33110. "$ref": "#/components/schemas/LocationRef"
  33111. },
  33112. "data": {
  33113. "type": "object",
  33114. "properties": {
  33115. "id": {
  33116. "type": "string"
  33117. },
  33118. "worktree": {
  33119. "type": "string"
  33120. },
  33121. "vcs": {
  33122. "$ref": "#/components/schemas/ProjectVcs"
  33123. },
  33124. "name": {
  33125. "type": "string"
  33126. },
  33127. "icon": {
  33128. "$ref": "#/components/schemas/ProjectIcon"
  33129. },
  33130. "commands": {
  33131. "$ref": "#/components/schemas/ProjectCommands"
  33132. },
  33133. "time": {
  33134. "$ref": "#/components/schemas/ProjectTime"
  33135. },
  33136. "sandboxes": {
  33137. "type": "array",
  33138. "items": {
  33139. "type": "string"
  33140. }
  33141. }
  33142. },
  33143. "required": ["id", "worktree", "time", "sandboxes"],
  33144. "additionalProperties": false
  33145. }
  33146. },
  33147. "required": ["id", "type", "data"],
  33148. "additionalProperties": false
  33149. },
  33150. "SessionIdle": {
  33151. "type": "object",
  33152. "properties": {
  33153. "id": {
  33154. "type": "string",
  33155. "pattern": "^evt_"
  33156. },
  33157. "metadata": {
  33158. "type": "object"
  33159. },
  33160. "type": {
  33161. "type": "string",
  33162. "enum": ["session.idle"]
  33163. },
  33164. "durable": {
  33165. "type": "object",
  33166. "properties": {
  33167. "aggregateID": {
  33168. "type": "string"
  33169. },
  33170. "seq": {
  33171. "type": "integer"
  33172. },
  33173. "version": {
  33174. "type": "integer"
  33175. }
  33176. },
  33177. "required": ["aggregateID", "seq", "version"],
  33178. "additionalProperties": false
  33179. },
  33180. "location": {
  33181. "$ref": "#/components/schemas/LocationRef"
  33182. },
  33183. "data": {
  33184. "type": "object",
  33185. "properties": {
  33186. "sessionID": {
  33187. "type": "string",
  33188. "pattern": "^ses"
  33189. }
  33190. },
  33191. "required": ["sessionID"],
  33192. "additionalProperties": false
  33193. }
  33194. },
  33195. "required": ["id", "type", "data"],
  33196. "additionalProperties": false
  33197. },
  33198. "QuestionAsked": {
  33199. "type": "object",
  33200. "properties": {
  33201. "id": {
  33202. "type": "string",
  33203. "pattern": "^evt_"
  33204. },
  33205. "metadata": {
  33206. "type": "object"
  33207. },
  33208. "type": {
  33209. "type": "string",
  33210. "enum": ["question.asked"]
  33211. },
  33212. "durable": {
  33213. "type": "object",
  33214. "properties": {
  33215. "aggregateID": {
  33216. "type": "string"
  33217. },
  33218. "seq": {
  33219. "type": "integer"
  33220. },
  33221. "version": {
  33222. "type": "integer"
  33223. }
  33224. },
  33225. "required": ["aggregateID", "seq", "version"],
  33226. "additionalProperties": false
  33227. },
  33228. "location": {
  33229. "$ref": "#/components/schemas/LocationRef"
  33230. },
  33231. "data": {
  33232. "type": "object",
  33233. "properties": {
  33234. "id": {
  33235. "type": "string",
  33236. "pattern": "^que"
  33237. },
  33238. "sessionID": {
  33239. "type": "string",
  33240. "pattern": "^ses"
  33241. },
  33242. "questions": {
  33243. "type": "array",
  33244. "items": {
  33245. "$ref": "#/components/schemas/QuestionInfo"
  33246. },
  33247. "description": "Questions to ask"
  33248. },
  33249. "tool": {
  33250. "$ref": "#/components/schemas/QuestionTool"
  33251. }
  33252. },
  33253. "required": ["id", "sessionID", "questions"],
  33254. "additionalProperties": false
  33255. }
  33256. },
  33257. "required": ["id", "type", "data"],
  33258. "additionalProperties": false
  33259. },
  33260. "SessionCompacted": {
  33261. "type": "object",
  33262. "properties": {
  33263. "id": {
  33264. "type": "string",
  33265. "pattern": "^evt_"
  33266. },
  33267. "metadata": {
  33268. "type": "object"
  33269. },
  33270. "type": {
  33271. "type": "string",
  33272. "enum": ["session.compacted"]
  33273. },
  33274. "durable": {
  33275. "type": "object",
  33276. "properties": {
  33277. "aggregateID": {
  33278. "type": "string"
  33279. },
  33280. "seq": {
  33281. "type": "integer"
  33282. },
  33283. "version": {
  33284. "type": "integer"
  33285. }
  33286. },
  33287. "required": ["aggregateID", "seq", "version"],
  33288. "additionalProperties": false
  33289. },
  33290. "location": {
  33291. "$ref": "#/components/schemas/LocationRef"
  33292. },
  33293. "data": {
  33294. "type": "object",
  33295. "properties": {
  33296. "sessionID": {
  33297. "type": "string",
  33298. "pattern": "^ses"
  33299. }
  33300. },
  33301. "required": ["sessionID"],
  33302. "additionalProperties": false
  33303. }
  33304. },
  33305. "required": ["id", "type", "data"],
  33306. "additionalProperties": false
  33307. },
  33308. "VcsBranchUpdated": {
  33309. "type": "object",
  33310. "properties": {
  33311. "id": {
  33312. "type": "string",
  33313. "pattern": "^evt_"
  33314. },
  33315. "metadata": {
  33316. "type": "object"
  33317. },
  33318. "type": {
  33319. "type": "string",
  33320. "enum": ["vcs.branch.updated"]
  33321. },
  33322. "durable": {
  33323. "type": "object",
  33324. "properties": {
  33325. "aggregateID": {
  33326. "type": "string"
  33327. },
  33328. "seq": {
  33329. "type": "integer"
  33330. },
  33331. "version": {
  33332. "type": "integer"
  33333. }
  33334. },
  33335. "required": ["aggregateID", "seq", "version"],
  33336. "additionalProperties": false
  33337. },
  33338. "location": {
  33339. "$ref": "#/components/schemas/LocationRef"
  33340. },
  33341. "data": {
  33342. "type": "object",
  33343. "properties": {
  33344. "branch": {
  33345. "type": "string"
  33346. }
  33347. },
  33348. "additionalProperties": false
  33349. }
  33350. },
  33351. "required": ["id", "type", "data"],
  33352. "additionalProperties": false
  33353. },
  33354. "WorkspaceReady": {
  33355. "type": "object",
  33356. "properties": {
  33357. "id": {
  33358. "type": "string",
  33359. "pattern": "^evt_"
  33360. },
  33361. "metadata": {
  33362. "type": "object"
  33363. },
  33364. "type": {
  33365. "type": "string",
  33366. "enum": ["workspace.ready"]
  33367. },
  33368. "durable": {
  33369. "type": "object",
  33370. "properties": {
  33371. "aggregateID": {
  33372. "type": "string"
  33373. },
  33374. "seq": {
  33375. "type": "integer"
  33376. },
  33377. "version": {
  33378. "type": "integer"
  33379. }
  33380. },
  33381. "required": ["aggregateID", "seq", "version"],
  33382. "additionalProperties": false
  33383. },
  33384. "location": {
  33385. "$ref": "#/components/schemas/LocationRef"
  33386. },
  33387. "data": {
  33388. "type": "object",
  33389. "properties": {
  33390. "name": {
  33391. "type": "string"
  33392. }
  33393. },
  33394. "required": ["name"],
  33395. "additionalProperties": false
  33396. }
  33397. },
  33398. "required": ["id", "type", "data"],
  33399. "additionalProperties": false
  33400. },
  33401. "WorkspaceFailed": {
  33402. "type": "object",
  33403. "properties": {
  33404. "id": {
  33405. "type": "string",
  33406. "pattern": "^evt_"
  33407. },
  33408. "metadata": {
  33409. "type": "object"
  33410. },
  33411. "type": {
  33412. "type": "string",
  33413. "enum": ["workspace.failed"]
  33414. },
  33415. "durable": {
  33416. "type": "object",
  33417. "properties": {
  33418. "aggregateID": {
  33419. "type": "string"
  33420. },
  33421. "seq": {
  33422. "type": "integer"
  33423. },
  33424. "version": {
  33425. "type": "integer"
  33426. }
  33427. },
  33428. "required": ["aggregateID", "seq", "version"],
  33429. "additionalProperties": false
  33430. },
  33431. "location": {
  33432. "$ref": "#/components/schemas/LocationRef"
  33433. },
  33434. "data": {
  33435. "type": "object",
  33436. "properties": {
  33437. "message": {
  33438. "type": "string"
  33439. }
  33440. },
  33441. "required": ["message"],
  33442. "additionalProperties": false
  33443. }
  33444. },
  33445. "required": ["id", "type", "data"],
  33446. "additionalProperties": false
  33447. },
  33448. "WorkspaceStatus": {
  33449. "type": "object",
  33450. "properties": {
  33451. "id": {
  33452. "type": "string",
  33453. "pattern": "^evt_"
  33454. },
  33455. "metadata": {
  33456. "type": "object"
  33457. },
  33458. "type": {
  33459. "type": "string",
  33460. "enum": ["workspace.status"]
  33461. },
  33462. "durable": {
  33463. "type": "object",
  33464. "properties": {
  33465. "aggregateID": {
  33466. "type": "string"
  33467. },
  33468. "seq": {
  33469. "type": "integer"
  33470. },
  33471. "version": {
  33472. "type": "integer"
  33473. }
  33474. },
  33475. "required": ["aggregateID", "seq", "version"],
  33476. "additionalProperties": false
  33477. },
  33478. "location": {
  33479. "$ref": "#/components/schemas/LocationRef"
  33480. },
  33481. "data": {
  33482. "type": "object",
  33483. "properties": {
  33484. "workspaceID": {
  33485. "type": "string",
  33486. "pattern": "^wrk"
  33487. },
  33488. "status": {
  33489. "type": "string",
  33490. "enum": ["connected", "connecting", "disconnected", "error"]
  33491. }
  33492. },
  33493. "required": ["workspaceID", "status"],
  33494. "additionalProperties": false
  33495. }
  33496. },
  33497. "required": ["id", "type", "data"],
  33498. "additionalProperties": false
  33499. },
  33500. "WorktreeReady": {
  33501. "type": "object",
  33502. "properties": {
  33503. "id": {
  33504. "type": "string",
  33505. "pattern": "^evt_"
  33506. },
  33507. "metadata": {
  33508. "type": "object"
  33509. },
  33510. "type": {
  33511. "type": "string",
  33512. "enum": ["worktree.ready"]
  33513. },
  33514. "durable": {
  33515. "type": "object",
  33516. "properties": {
  33517. "aggregateID": {
  33518. "type": "string"
  33519. },
  33520. "seq": {
  33521. "type": "integer"
  33522. },
  33523. "version": {
  33524. "type": "integer"
  33525. }
  33526. },
  33527. "required": ["aggregateID", "seq", "version"],
  33528. "additionalProperties": false
  33529. },
  33530. "location": {
  33531. "$ref": "#/components/schemas/LocationRef"
  33532. },
  33533. "data": {
  33534. "type": "object",
  33535. "properties": {
  33536. "name": {
  33537. "type": "string"
  33538. },
  33539. "branch": {
  33540. "type": "string"
  33541. }
  33542. },
  33543. "required": ["name"],
  33544. "additionalProperties": false
  33545. }
  33546. },
  33547. "required": ["id", "type", "data"],
  33548. "additionalProperties": false
  33549. },
  33550. "WorktreeFailed": {
  33551. "type": "object",
  33552. "properties": {
  33553. "id": {
  33554. "type": "string",
  33555. "pattern": "^evt_"
  33556. },
  33557. "metadata": {
  33558. "type": "object"
  33559. },
  33560. "type": {
  33561. "type": "string",
  33562. "enum": ["worktree.failed"]
  33563. },
  33564. "durable": {
  33565. "type": "object",
  33566. "properties": {
  33567. "aggregateID": {
  33568. "type": "string"
  33569. },
  33570. "seq": {
  33571. "type": "integer"
  33572. },
  33573. "version": {
  33574. "type": "integer"
  33575. }
  33576. },
  33577. "required": ["aggregateID", "seq", "version"],
  33578. "additionalProperties": false
  33579. },
  33580. "location": {
  33581. "$ref": "#/components/schemas/LocationRef"
  33582. },
  33583. "data": {
  33584. "type": "object",
  33585. "properties": {
  33586. "message": {
  33587. "type": "string"
  33588. }
  33589. },
  33590. "required": ["message"],
  33591. "additionalProperties": false
  33592. }
  33593. },
  33594. "required": ["id", "type", "data"],
  33595. "additionalProperties": false
  33596. },
  33597. "ServerConnected": {
  33598. "type": "object",
  33599. "properties": {
  33600. "id": {
  33601. "type": "string",
  33602. "pattern": "^evt_"
  33603. },
  33604. "metadata": {
  33605. "type": "object"
  33606. },
  33607. "type": {
  33608. "type": "string",
  33609. "enum": ["server.connected"]
  33610. },
  33611. "durable": {
  33612. "type": "object",
  33613. "properties": {
  33614. "aggregateID": {
  33615. "type": "string"
  33616. },
  33617. "seq": {
  33618. "type": "integer"
  33619. },
  33620. "version": {
  33621. "type": "integer"
  33622. }
  33623. },
  33624. "required": ["aggregateID", "seq", "version"],
  33625. "additionalProperties": false
  33626. },
  33627. "location": {
  33628. "$ref": "#/components/schemas/LocationRef"
  33629. },
  33630. "data": {
  33631. "type": "object",
  33632. "properties": {}
  33633. }
  33634. },
  33635. "required": ["id", "type", "data"],
  33636. "additionalProperties": false
  33637. },
  33638. "GlobalDisposed": {
  33639. "type": "object",
  33640. "properties": {
  33641. "id": {
  33642. "type": "string",
  33643. "pattern": "^evt_"
  33644. },
  33645. "metadata": {
  33646. "type": "object"
  33647. },
  33648. "type": {
  33649. "type": "string",
  33650. "enum": ["global.disposed"]
  33651. },
  33652. "durable": {
  33653. "type": "object",
  33654. "properties": {
  33655. "aggregateID": {
  33656. "type": "string"
  33657. },
  33658. "seq": {
  33659. "type": "integer"
  33660. },
  33661. "version": {
  33662. "type": "integer"
  33663. }
  33664. },
  33665. "required": ["aggregateID", "seq", "version"],
  33666. "additionalProperties": false
  33667. },
  33668. "location": {
  33669. "$ref": "#/components/schemas/LocationRef"
  33670. },
  33671. "data": {
  33672. "type": "object",
  33673. "properties": {}
  33674. }
  33675. },
  33676. "required": ["id", "type", "data"],
  33677. "additionalProperties": false
  33678. },
  33679. "QuestionV2Request": {
  33680. "type": "object",
  33681. "properties": {
  33682. "id": {
  33683. "type": "string",
  33684. "pattern": "^que"
  33685. },
  33686. "sessionID": {
  33687. "type": "string",
  33688. "pattern": "^ses"
  33689. },
  33690. "questions": {
  33691. "type": "array",
  33692. "items": {
  33693. "$ref": "#/components/schemas/QuestionV2Info"
  33694. },
  33695. "description": "Questions to ask"
  33696. },
  33697. "tool": {
  33698. "$ref": "#/components/schemas/QuestionV2Tool"
  33699. }
  33700. },
  33701. "required": ["id", "sessionID", "questions"],
  33702. "additionalProperties": false
  33703. },
  33704. "QuestionV2Reply": {
  33705. "type": "object",
  33706. "properties": {
  33707. "answers": {
  33708. "type": "array",
  33709. "items": {
  33710. "$ref": "#/components/schemas/QuestionV2Answer"
  33711. },
  33712. "description": "User answers in order of questions (each answer is an array of selected labels)"
  33713. }
  33714. },
  33715. "required": ["answers"],
  33716. "additionalProperties": false
  33717. },
  33718. "ReferenceLocalSource": {
  33719. "type": "object",
  33720. "properties": {
  33721. "type": {
  33722. "type": "string",
  33723. "enum": ["local"]
  33724. },
  33725. "path": {
  33726. "type": "string"
  33727. },
  33728. "description": {
  33729. "type": "string"
  33730. },
  33731. "hidden": {
  33732. "type": "boolean"
  33733. }
  33734. },
  33735. "required": ["type", "path"],
  33736. "additionalProperties": false
  33737. },
  33738. "ReferenceGitSource": {
  33739. "type": "object",
  33740. "properties": {
  33741. "type": {
  33742. "type": "string",
  33743. "enum": ["git"]
  33744. },
  33745. "repository": {
  33746. "type": "string"
  33747. },
  33748. "branch": {
  33749. "type": "string"
  33750. },
  33751. "description": {
  33752. "type": "string"
  33753. },
  33754. "hidden": {
  33755. "type": "boolean"
  33756. }
  33757. },
  33758. "required": ["type", "repository"],
  33759. "additionalProperties": false
  33760. },
  33761. "ReferenceSource": {
  33762. "anyOf": [
  33763. {
  33764. "$ref": "#/components/schemas/ReferenceLocalSource"
  33765. },
  33766. {
  33767. "$ref": "#/components/schemas/ReferenceGitSource"
  33768. }
  33769. ]
  33770. },
  33771. "ReferenceInfo": {
  33772. "type": "object",
  33773. "properties": {
  33774. "name": {
  33775. "type": "string"
  33776. },
  33777. "path": {
  33778. "type": "string"
  33779. },
  33780. "description": {
  33781. "type": "string"
  33782. },
  33783. "hidden": {
  33784. "type": "boolean"
  33785. },
  33786. "source": {
  33787. "$ref": "#/components/schemas/ReferenceSource"
  33788. }
  33789. },
  33790. "required": ["name", "path", "source"],
  33791. "additionalProperties": false
  33792. },
  33793. "ProjectCopyCopy": {
  33794. "type": "object",
  33795. "properties": {
  33796. "directory": {
  33797. "type": "string"
  33798. }
  33799. },
  33800. "required": ["directory"],
  33801. "additionalProperties": false
  33802. },
  33803. "EventModels-devRefreshed": {
  33804. "type": "object",
  33805. "properties": {
  33806. "id": {
  33807. "type": "string",
  33808. "pattern": "^evt_"
  33809. },
  33810. "type": {
  33811. "type": "string",
  33812. "enum": ["models-dev.refreshed"]
  33813. },
  33814. "properties": {
  33815. "type": "object",
  33816. "properties": {}
  33817. }
  33818. },
  33819. "required": ["id", "type", "properties"],
  33820. "additionalProperties": false
  33821. },
  33822. "EventIntegrationUpdated": {
  33823. "type": "object",
  33824. "properties": {
  33825. "id": {
  33826. "type": "string",
  33827. "pattern": "^evt_"
  33828. },
  33829. "type": {
  33830. "type": "string",
  33831. "enum": ["integration.updated"]
  33832. },
  33833. "properties": {
  33834. "type": "object",
  33835. "properties": {}
  33836. }
  33837. },
  33838. "required": ["id", "type", "properties"],
  33839. "additionalProperties": false
  33840. },
  33841. "EventIntegrationConnectionUpdated": {
  33842. "type": "object",
  33843. "properties": {
  33844. "id": {
  33845. "type": "string",
  33846. "pattern": "^evt_"
  33847. },
  33848. "type": {
  33849. "type": "string",
  33850. "enum": ["integration.connection.updated"]
  33851. },
  33852. "properties": {
  33853. "type": "object",
  33854. "properties": {
  33855. "integrationID": {
  33856. "type": "string"
  33857. }
  33858. },
  33859. "required": ["integrationID"],
  33860. "additionalProperties": false
  33861. }
  33862. },
  33863. "required": ["id", "type", "properties"],
  33864. "additionalProperties": false
  33865. },
  33866. "EventCatalogUpdated": {
  33867. "type": "object",
  33868. "properties": {
  33869. "id": {
  33870. "type": "string",
  33871. "pattern": "^evt_"
  33872. },
  33873. "type": {
  33874. "type": "string",
  33875. "enum": ["catalog.updated"]
  33876. },
  33877. "properties": {
  33878. "type": "object",
  33879. "properties": {}
  33880. }
  33881. },
  33882. "required": ["id", "type", "properties"],
  33883. "additionalProperties": false
  33884. },
  33885. "EventSessionCreated": {
  33886. "type": "object",
  33887. "properties": {
  33888. "id": {
  33889. "type": "string",
  33890. "pattern": "^evt_"
  33891. },
  33892. "type": {
  33893. "type": "string",
  33894. "enum": ["session.created"]
  33895. },
  33896. "properties": {
  33897. "type": "object",
  33898. "properties": {
  33899. "sessionID": {
  33900. "type": "string",
  33901. "pattern": "^ses"
  33902. },
  33903. "info": {
  33904. "$ref": "#/components/schemas/Session"
  33905. }
  33906. },
  33907. "required": ["sessionID", "info"],
  33908. "additionalProperties": false
  33909. }
  33910. },
  33911. "required": ["id", "type", "properties"],
  33912. "additionalProperties": false
  33913. },
  33914. "EventSessionUpdated": {
  33915. "type": "object",
  33916. "properties": {
  33917. "id": {
  33918. "type": "string",
  33919. "pattern": "^evt_"
  33920. },
  33921. "type": {
  33922. "type": "string",
  33923. "enum": ["session.updated"]
  33924. },
  33925. "properties": {
  33926. "type": "object",
  33927. "properties": {
  33928. "sessionID": {
  33929. "type": "string",
  33930. "pattern": "^ses"
  33931. },
  33932. "info": {
  33933. "$ref": "#/components/schemas/Session"
  33934. }
  33935. },
  33936. "required": ["sessionID", "info"],
  33937. "additionalProperties": false
  33938. }
  33939. },
  33940. "required": ["id", "type", "properties"],
  33941. "additionalProperties": false
  33942. },
  33943. "EventSessionDeleted": {
  33944. "type": "object",
  33945. "properties": {
  33946. "id": {
  33947. "type": "string",
  33948. "pattern": "^evt_"
  33949. },
  33950. "type": {
  33951. "type": "string",
  33952. "enum": ["session.deleted"]
  33953. },
  33954. "properties": {
  33955. "type": "object",
  33956. "properties": {
  33957. "sessionID": {
  33958. "type": "string",
  33959. "pattern": "^ses"
  33960. },
  33961. "info": {
  33962. "$ref": "#/components/schemas/Session"
  33963. }
  33964. },
  33965. "required": ["sessionID", "info"],
  33966. "additionalProperties": false
  33967. }
  33968. },
  33969. "required": ["id", "type", "properties"],
  33970. "additionalProperties": false
  33971. },
  33972. "EventMessageUpdated": {
  33973. "type": "object",
  33974. "properties": {
  33975. "id": {
  33976. "type": "string",
  33977. "pattern": "^evt_"
  33978. },
  33979. "type": {
  33980. "type": "string",
  33981. "enum": ["message.updated"]
  33982. },
  33983. "properties": {
  33984. "type": "object",
  33985. "properties": {
  33986. "sessionID": {
  33987. "type": "string",
  33988. "pattern": "^ses"
  33989. },
  33990. "info": {
  33991. "$ref": "#/components/schemas/Message"
  33992. }
  33993. },
  33994. "required": ["sessionID", "info"],
  33995. "additionalProperties": false
  33996. }
  33997. },
  33998. "required": ["id", "type", "properties"],
  33999. "additionalProperties": false
  34000. },
  34001. "EventMessageRemoved": {
  34002. "type": "object",
  34003. "properties": {
  34004. "id": {
  34005. "type": "string",
  34006. "pattern": "^evt_"
  34007. },
  34008. "type": {
  34009. "type": "string",
  34010. "enum": ["message.removed"]
  34011. },
  34012. "properties": {
  34013. "type": "object",
  34014. "properties": {
  34015. "sessionID": {
  34016. "type": "string",
  34017. "pattern": "^ses"
  34018. },
  34019. "messageID": {
  34020. "type": "string",
  34021. "pattern": "^msg"
  34022. }
  34023. },
  34024. "required": ["sessionID", "messageID"],
  34025. "additionalProperties": false
  34026. }
  34027. },
  34028. "required": ["id", "type", "properties"],
  34029. "additionalProperties": false
  34030. },
  34031. "EventMessagePartUpdated": {
  34032. "type": "object",
  34033. "properties": {
  34034. "id": {
  34035. "type": "string",
  34036. "pattern": "^evt_"
  34037. },
  34038. "type": {
  34039. "type": "string",
  34040. "enum": ["message.part.updated"]
  34041. },
  34042. "properties": {
  34043. "type": "object",
  34044. "properties": {
  34045. "sessionID": {
  34046. "type": "string",
  34047. "pattern": "^ses"
  34048. },
  34049. "part": {
  34050. "$ref": "#/components/schemas/Part"
  34051. },
  34052. "time": {
  34053. "type": "number"
  34054. }
  34055. },
  34056. "required": ["sessionID", "part", "time"],
  34057. "additionalProperties": false
  34058. }
  34059. },
  34060. "required": ["id", "type", "properties"],
  34061. "additionalProperties": false
  34062. },
  34063. "EventMessagePartRemoved": {
  34064. "type": "object",
  34065. "properties": {
  34066. "id": {
  34067. "type": "string",
  34068. "pattern": "^evt_"
  34069. },
  34070. "type": {
  34071. "type": "string",
  34072. "enum": ["message.part.removed"]
  34073. },
  34074. "properties": {
  34075. "type": "object",
  34076. "properties": {
  34077. "sessionID": {
  34078. "type": "string",
  34079. "pattern": "^ses"
  34080. },
  34081. "messageID": {
  34082. "type": "string",
  34083. "pattern": "^msg"
  34084. },
  34085. "partID": {
  34086. "type": "string",
  34087. "pattern": "^prt"
  34088. }
  34089. },
  34090. "required": ["sessionID", "messageID", "partID"],
  34091. "additionalProperties": false
  34092. }
  34093. },
  34094. "required": ["id", "type", "properties"],
  34095. "additionalProperties": false
  34096. },
  34097. "EventSessionNextAgentSwitched": {
  34098. "type": "object",
  34099. "properties": {
  34100. "id": {
  34101. "type": "string",
  34102. "pattern": "^evt_"
  34103. },
  34104. "type": {
  34105. "type": "string",
  34106. "enum": ["session.next.agent.switched"]
  34107. },
  34108. "properties": {
  34109. "type": "object",
  34110. "properties": {
  34111. "timestamp": {
  34112. "type": "number"
  34113. },
  34114. "sessionID": {
  34115. "type": "string",
  34116. "pattern": "^ses"
  34117. },
  34118. "messageID": {
  34119. "type": "string",
  34120. "pattern": "^msg_"
  34121. },
  34122. "agent": {
  34123. "type": "string"
  34124. }
  34125. },
  34126. "required": ["timestamp", "sessionID", "messageID", "agent"],
  34127. "additionalProperties": false
  34128. }
  34129. },
  34130. "required": ["id", "type", "properties"],
  34131. "additionalProperties": false
  34132. },
  34133. "EventSessionNextModelSwitched": {
  34134. "type": "object",
  34135. "properties": {
  34136. "id": {
  34137. "type": "string",
  34138. "pattern": "^evt_"
  34139. },
  34140. "type": {
  34141. "type": "string",
  34142. "enum": ["session.next.model.switched"]
  34143. },
  34144. "properties": {
  34145. "type": "object",
  34146. "properties": {
  34147. "timestamp": {
  34148. "type": "number"
  34149. },
  34150. "sessionID": {
  34151. "type": "string",
  34152. "pattern": "^ses"
  34153. },
  34154. "messageID": {
  34155. "type": "string",
  34156. "pattern": "^msg_"
  34157. },
  34158. "model": {
  34159. "$ref": "#/components/schemas/ModelRef"
  34160. }
  34161. },
  34162. "required": ["timestamp", "sessionID", "messageID", "model"],
  34163. "additionalProperties": false
  34164. }
  34165. },
  34166. "required": ["id", "type", "properties"],
  34167. "additionalProperties": false
  34168. },
  34169. "EventSessionNextMoved": {
  34170. "type": "object",
  34171. "properties": {
  34172. "id": {
  34173. "type": "string",
  34174. "pattern": "^evt_"
  34175. },
  34176. "type": {
  34177. "type": "string",
  34178. "enum": ["session.next.moved"]
  34179. },
  34180. "properties": {
  34181. "type": "object",
  34182. "properties": {
  34183. "timestamp": {
  34184. "type": "number"
  34185. },
  34186. "sessionID": {
  34187. "type": "string",
  34188. "pattern": "^ses"
  34189. },
  34190. "location": {
  34191. "$ref": "#/components/schemas/LocationRef"
  34192. },
  34193. "subdirectory": {
  34194. "type": "string"
  34195. }
  34196. },
  34197. "required": ["timestamp", "sessionID", "location"],
  34198. "additionalProperties": false
  34199. }
  34200. },
  34201. "required": ["id", "type", "properties"],
  34202. "additionalProperties": false
  34203. },
  34204. "EventSessionNextPrompted": {
  34205. "type": "object",
  34206. "properties": {
  34207. "id": {
  34208. "type": "string",
  34209. "pattern": "^evt_"
  34210. },
  34211. "type": {
  34212. "type": "string",
  34213. "enum": ["session.next.prompted"]
  34214. },
  34215. "properties": {
  34216. "type": "object",
  34217. "properties": {
  34218. "timestamp": {
  34219. "type": "number"
  34220. },
  34221. "sessionID": {
  34222. "type": "string",
  34223. "pattern": "^ses"
  34224. },
  34225. "messageID": {
  34226. "type": "string",
  34227. "pattern": "^msg_"
  34228. },
  34229. "prompt": {
  34230. "$ref": "#/components/schemas/Prompt"
  34231. },
  34232. "delivery": {
  34233. "type": "string",
  34234. "enum": ["steer", "queue"]
  34235. }
  34236. },
  34237. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34238. "additionalProperties": false
  34239. }
  34240. },
  34241. "required": ["id", "type", "properties"],
  34242. "additionalProperties": false
  34243. },
  34244. "EventSessionNextPromptAdmitted": {
  34245. "type": "object",
  34246. "properties": {
  34247. "id": {
  34248. "type": "string",
  34249. "pattern": "^evt_"
  34250. },
  34251. "type": {
  34252. "type": "string",
  34253. "enum": ["session.next.prompt.admitted"]
  34254. },
  34255. "properties": {
  34256. "type": "object",
  34257. "properties": {
  34258. "timestamp": {
  34259. "type": "number"
  34260. },
  34261. "sessionID": {
  34262. "type": "string",
  34263. "pattern": "^ses"
  34264. },
  34265. "messageID": {
  34266. "type": "string",
  34267. "pattern": "^msg_"
  34268. },
  34269. "prompt": {
  34270. "$ref": "#/components/schemas/Prompt"
  34271. },
  34272. "delivery": {
  34273. "type": "string",
  34274. "enum": ["steer", "queue"]
  34275. }
  34276. },
  34277. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34278. "additionalProperties": false
  34279. }
  34280. },
  34281. "required": ["id", "type", "properties"],
  34282. "additionalProperties": false
  34283. },
  34284. "EventSessionNextContextUpdated": {
  34285. "type": "object",
  34286. "properties": {
  34287. "id": {
  34288. "type": "string",
  34289. "pattern": "^evt_"
  34290. },
  34291. "type": {
  34292. "type": "string",
  34293. "enum": ["session.next.context.updated"]
  34294. },
  34295. "properties": {
  34296. "type": "object",
  34297. "properties": {
  34298. "timestamp": {
  34299. "type": "number"
  34300. },
  34301. "sessionID": {
  34302. "type": "string",
  34303. "pattern": "^ses"
  34304. },
  34305. "messageID": {
  34306. "type": "string",
  34307. "pattern": "^msg_"
  34308. },
  34309. "text": {
  34310. "type": "string"
  34311. }
  34312. },
  34313. "required": ["timestamp", "sessionID", "messageID", "text"],
  34314. "additionalProperties": false
  34315. }
  34316. },
  34317. "required": ["id", "type", "properties"],
  34318. "additionalProperties": false
  34319. },
  34320. "EventSessionNextSynthetic": {
  34321. "type": "object",
  34322. "properties": {
  34323. "id": {
  34324. "type": "string",
  34325. "pattern": "^evt_"
  34326. },
  34327. "type": {
  34328. "type": "string",
  34329. "enum": ["session.next.synthetic"]
  34330. },
  34331. "properties": {
  34332. "type": "object",
  34333. "properties": {
  34334. "timestamp": {
  34335. "type": "number"
  34336. },
  34337. "sessionID": {
  34338. "type": "string",
  34339. "pattern": "^ses"
  34340. },
  34341. "messageID": {
  34342. "type": "string",
  34343. "pattern": "^msg_"
  34344. },
  34345. "text": {
  34346. "type": "string"
  34347. }
  34348. },
  34349. "required": ["timestamp", "sessionID", "messageID", "text"],
  34350. "additionalProperties": false
  34351. }
  34352. },
  34353. "required": ["id", "type", "properties"],
  34354. "additionalProperties": false
  34355. },
  34356. "EventSessionNextShellStarted": {
  34357. "type": "object",
  34358. "properties": {
  34359. "id": {
  34360. "type": "string",
  34361. "pattern": "^evt_"
  34362. },
  34363. "type": {
  34364. "type": "string",
  34365. "enum": ["session.next.shell.started"]
  34366. },
  34367. "properties": {
  34368. "type": "object",
  34369. "properties": {
  34370. "timestamp": {
  34371. "type": "number"
  34372. },
  34373. "sessionID": {
  34374. "type": "string",
  34375. "pattern": "^ses"
  34376. },
  34377. "messageID": {
  34378. "type": "string",
  34379. "pattern": "^msg_"
  34380. },
  34381. "callID": {
  34382. "type": "string"
  34383. },
  34384. "command": {
  34385. "type": "string"
  34386. }
  34387. },
  34388. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  34389. "additionalProperties": false
  34390. }
  34391. },
  34392. "required": ["id", "type", "properties"],
  34393. "additionalProperties": false
  34394. },
  34395. "EventSessionNextShellEnded": {
  34396. "type": "object",
  34397. "properties": {
  34398. "id": {
  34399. "type": "string",
  34400. "pattern": "^evt_"
  34401. },
  34402. "type": {
  34403. "type": "string",
  34404. "enum": ["session.next.shell.ended"]
  34405. },
  34406. "properties": {
  34407. "type": "object",
  34408. "properties": {
  34409. "timestamp": {
  34410. "type": "number"
  34411. },
  34412. "sessionID": {
  34413. "type": "string",
  34414. "pattern": "^ses"
  34415. },
  34416. "callID": {
  34417. "type": "string"
  34418. },
  34419. "output": {
  34420. "type": "string"
  34421. }
  34422. },
  34423. "required": ["timestamp", "sessionID", "callID", "output"],
  34424. "additionalProperties": false
  34425. }
  34426. },
  34427. "required": ["id", "type", "properties"],
  34428. "additionalProperties": false
  34429. },
  34430. "EventSessionNextStepStarted": {
  34431. "type": "object",
  34432. "properties": {
  34433. "id": {
  34434. "type": "string",
  34435. "pattern": "^evt_"
  34436. },
  34437. "type": {
  34438. "type": "string",
  34439. "enum": ["session.next.step.started"]
  34440. },
  34441. "properties": {
  34442. "type": "object",
  34443. "properties": {
  34444. "timestamp": {
  34445. "type": "number"
  34446. },
  34447. "sessionID": {
  34448. "type": "string",
  34449. "pattern": "^ses"
  34450. },
  34451. "assistantMessageID": {
  34452. "type": "string",
  34453. "pattern": "^msg_"
  34454. },
  34455. "agent": {
  34456. "type": "string"
  34457. },
  34458. "model": {
  34459. "$ref": "#/components/schemas/ModelRef"
  34460. },
  34461. "snapshot": {
  34462. "type": "string"
  34463. }
  34464. },
  34465. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  34466. "additionalProperties": false
  34467. }
  34468. },
  34469. "required": ["id", "type", "properties"],
  34470. "additionalProperties": false
  34471. },
  34472. "EventSessionNextStepEnded": {
  34473. "type": "object",
  34474. "properties": {
  34475. "id": {
  34476. "type": "string",
  34477. "pattern": "^evt_"
  34478. },
  34479. "type": {
  34480. "type": "string",
  34481. "enum": ["session.next.step.ended"]
  34482. },
  34483. "properties": {
  34484. "type": "object",
  34485. "properties": {
  34486. "timestamp": {
  34487. "type": "number"
  34488. },
  34489. "sessionID": {
  34490. "type": "string",
  34491. "pattern": "^ses"
  34492. },
  34493. "assistantMessageID": {
  34494. "type": "string",
  34495. "pattern": "^msg_"
  34496. },
  34497. "finish": {
  34498. "type": "string"
  34499. },
  34500. "cost": {
  34501. "type": "number"
  34502. },
  34503. "tokens": {
  34504. "type": "object",
  34505. "properties": {
  34506. "input": {
  34507. "type": "number"
  34508. },
  34509. "output": {
  34510. "type": "number"
  34511. },
  34512. "reasoning": {
  34513. "type": "number"
  34514. },
  34515. "cache": {
  34516. "type": "object",
  34517. "properties": {
  34518. "read": {
  34519. "type": "number"
  34520. },
  34521. "write": {
  34522. "type": "number"
  34523. }
  34524. },
  34525. "required": ["read", "write"],
  34526. "additionalProperties": false
  34527. }
  34528. },
  34529. "required": ["input", "output", "reasoning", "cache"],
  34530. "additionalProperties": false
  34531. },
  34532. "snapshot": {
  34533. "type": "string"
  34534. },
  34535. "files": {
  34536. "type": "array",
  34537. "items": {
  34538. "type": "string"
  34539. }
  34540. }
  34541. },
  34542. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  34543. "additionalProperties": false
  34544. }
  34545. },
  34546. "required": ["id", "type", "properties"],
  34547. "additionalProperties": false
  34548. },
  34549. "EventSessionNextStepFailed": {
  34550. "type": "object",
  34551. "properties": {
  34552. "id": {
  34553. "type": "string",
  34554. "pattern": "^evt_"
  34555. },
  34556. "type": {
  34557. "type": "string",
  34558. "enum": ["session.next.step.failed"]
  34559. },
  34560. "properties": {
  34561. "type": "object",
  34562. "properties": {
  34563. "timestamp": {
  34564. "type": "number"
  34565. },
  34566. "sessionID": {
  34567. "type": "string",
  34568. "pattern": "^ses"
  34569. },
  34570. "assistantMessageID": {
  34571. "type": "string",
  34572. "pattern": "^msg_"
  34573. },
  34574. "error": {
  34575. "$ref": "#/components/schemas/SessionErrorUnknown"
  34576. }
  34577. },
  34578. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  34579. "additionalProperties": false
  34580. }
  34581. },
  34582. "required": ["id", "type", "properties"],
  34583. "additionalProperties": false
  34584. },
  34585. "EventSessionNextTextStarted": {
  34586. "type": "object",
  34587. "properties": {
  34588. "id": {
  34589. "type": "string",
  34590. "pattern": "^evt_"
  34591. },
  34592. "type": {
  34593. "type": "string",
  34594. "enum": ["session.next.text.started"]
  34595. },
  34596. "properties": {
  34597. "type": "object",
  34598. "properties": {
  34599. "timestamp": {
  34600. "type": "number"
  34601. },
  34602. "sessionID": {
  34603. "type": "string",
  34604. "pattern": "^ses"
  34605. },
  34606. "assistantMessageID": {
  34607. "type": "string",
  34608. "pattern": "^msg_"
  34609. },
  34610. "textID": {
  34611. "type": "string"
  34612. }
  34613. },
  34614. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  34615. "additionalProperties": false
  34616. }
  34617. },
  34618. "required": ["id", "type", "properties"],
  34619. "additionalProperties": false
  34620. },
  34621. "EventSessionNextTextDelta": {
  34622. "type": "object",
  34623. "properties": {
  34624. "id": {
  34625. "type": "string",
  34626. "pattern": "^evt_"
  34627. },
  34628. "type": {
  34629. "type": "string",
  34630. "enum": ["session.next.text.delta"]
  34631. },
  34632. "properties": {
  34633. "type": "object",
  34634. "properties": {
  34635. "timestamp": {
  34636. "type": "number"
  34637. },
  34638. "sessionID": {
  34639. "type": "string",
  34640. "pattern": "^ses"
  34641. },
  34642. "assistantMessageID": {
  34643. "type": "string",
  34644. "pattern": "^msg_"
  34645. },
  34646. "textID": {
  34647. "type": "string"
  34648. },
  34649. "delta": {
  34650. "type": "string"
  34651. }
  34652. },
  34653. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  34654. "additionalProperties": false
  34655. }
  34656. },
  34657. "required": ["id", "type", "properties"],
  34658. "additionalProperties": false
  34659. },
  34660. "EventSessionNextTextEnded": {
  34661. "type": "object",
  34662. "properties": {
  34663. "id": {
  34664. "type": "string",
  34665. "pattern": "^evt_"
  34666. },
  34667. "type": {
  34668. "type": "string",
  34669. "enum": ["session.next.text.ended"]
  34670. },
  34671. "properties": {
  34672. "type": "object",
  34673. "properties": {
  34674. "timestamp": {
  34675. "type": "number"
  34676. },
  34677. "sessionID": {
  34678. "type": "string",
  34679. "pattern": "^ses"
  34680. },
  34681. "assistantMessageID": {
  34682. "type": "string",
  34683. "pattern": "^msg_"
  34684. },
  34685. "textID": {
  34686. "type": "string"
  34687. },
  34688. "text": {
  34689. "type": "string"
  34690. }
  34691. },
  34692. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  34693. "additionalProperties": false
  34694. }
  34695. },
  34696. "required": ["id", "type", "properties"],
  34697. "additionalProperties": false
  34698. },
  34699. "EventSessionNextReasoningStarted": {
  34700. "type": "object",
  34701. "properties": {
  34702. "id": {
  34703. "type": "string",
  34704. "pattern": "^evt_"
  34705. },
  34706. "type": {
  34707. "type": "string",
  34708. "enum": ["session.next.reasoning.started"]
  34709. },
  34710. "properties": {
  34711. "type": "object",
  34712. "properties": {
  34713. "timestamp": {
  34714. "type": "number"
  34715. },
  34716. "sessionID": {
  34717. "type": "string",
  34718. "pattern": "^ses"
  34719. },
  34720. "assistantMessageID": {
  34721. "type": "string",
  34722. "pattern": "^msg_"
  34723. },
  34724. "reasoningID": {
  34725. "type": "string"
  34726. },
  34727. "providerMetadata": {
  34728. "$ref": "#/components/schemas/LLMProviderMetadata"
  34729. }
  34730. },
  34731. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  34732. "additionalProperties": false
  34733. }
  34734. },
  34735. "required": ["id", "type", "properties"],
  34736. "additionalProperties": false
  34737. },
  34738. "EventSessionNextReasoningDelta": {
  34739. "type": "object",
  34740. "properties": {
  34741. "id": {
  34742. "type": "string",
  34743. "pattern": "^evt_"
  34744. },
  34745. "type": {
  34746. "type": "string",
  34747. "enum": ["session.next.reasoning.delta"]
  34748. },
  34749. "properties": {
  34750. "type": "object",
  34751. "properties": {
  34752. "timestamp": {
  34753. "type": "number"
  34754. },
  34755. "sessionID": {
  34756. "type": "string",
  34757. "pattern": "^ses"
  34758. },
  34759. "assistantMessageID": {
  34760. "type": "string",
  34761. "pattern": "^msg_"
  34762. },
  34763. "reasoningID": {
  34764. "type": "string"
  34765. },
  34766. "delta": {
  34767. "type": "string"
  34768. }
  34769. },
  34770. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  34771. "additionalProperties": false
  34772. }
  34773. },
  34774. "required": ["id", "type", "properties"],
  34775. "additionalProperties": false
  34776. },
  34777. "EventSessionNextReasoningEnded": {
  34778. "type": "object",
  34779. "properties": {
  34780. "id": {
  34781. "type": "string",
  34782. "pattern": "^evt_"
  34783. },
  34784. "type": {
  34785. "type": "string",
  34786. "enum": ["session.next.reasoning.ended"]
  34787. },
  34788. "properties": {
  34789. "type": "object",
  34790. "properties": {
  34791. "timestamp": {
  34792. "type": "number"
  34793. },
  34794. "sessionID": {
  34795. "type": "string",
  34796. "pattern": "^ses"
  34797. },
  34798. "assistantMessageID": {
  34799. "type": "string",
  34800. "pattern": "^msg_"
  34801. },
  34802. "reasoningID": {
  34803. "type": "string"
  34804. },
  34805. "text": {
  34806. "type": "string"
  34807. },
  34808. "providerMetadata": {
  34809. "$ref": "#/components/schemas/LLMProviderMetadata"
  34810. }
  34811. },
  34812. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  34813. "additionalProperties": false
  34814. }
  34815. },
  34816. "required": ["id", "type", "properties"],
  34817. "additionalProperties": false
  34818. },
  34819. "EventSessionNextToolInputStarted": {
  34820. "type": "object",
  34821. "properties": {
  34822. "id": {
  34823. "type": "string",
  34824. "pattern": "^evt_"
  34825. },
  34826. "type": {
  34827. "type": "string",
  34828. "enum": ["session.next.tool.input.started"]
  34829. },
  34830. "properties": {
  34831. "type": "object",
  34832. "properties": {
  34833. "timestamp": {
  34834. "type": "number"
  34835. },
  34836. "sessionID": {
  34837. "type": "string",
  34838. "pattern": "^ses"
  34839. },
  34840. "assistantMessageID": {
  34841. "type": "string",
  34842. "pattern": "^msg_"
  34843. },
  34844. "callID": {
  34845. "type": "string"
  34846. },
  34847. "name": {
  34848. "type": "string"
  34849. }
  34850. },
  34851. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  34852. "additionalProperties": false
  34853. }
  34854. },
  34855. "required": ["id", "type", "properties"],
  34856. "additionalProperties": false
  34857. },
  34858. "EventSessionNextToolInputDelta": {
  34859. "type": "object",
  34860. "properties": {
  34861. "id": {
  34862. "type": "string",
  34863. "pattern": "^evt_"
  34864. },
  34865. "type": {
  34866. "type": "string",
  34867. "enum": ["session.next.tool.input.delta"]
  34868. },
  34869. "properties": {
  34870. "type": "object",
  34871. "properties": {
  34872. "timestamp": {
  34873. "type": "number"
  34874. },
  34875. "sessionID": {
  34876. "type": "string",
  34877. "pattern": "^ses"
  34878. },
  34879. "assistantMessageID": {
  34880. "type": "string",
  34881. "pattern": "^msg_"
  34882. },
  34883. "callID": {
  34884. "type": "string"
  34885. },
  34886. "delta": {
  34887. "type": "string"
  34888. }
  34889. },
  34890. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  34891. "additionalProperties": false
  34892. }
  34893. },
  34894. "required": ["id", "type", "properties"],
  34895. "additionalProperties": false
  34896. },
  34897. "EventSessionNextToolInputEnded": {
  34898. "type": "object",
  34899. "properties": {
  34900. "id": {
  34901. "type": "string",
  34902. "pattern": "^evt_"
  34903. },
  34904. "type": {
  34905. "type": "string",
  34906. "enum": ["session.next.tool.input.ended"]
  34907. },
  34908. "properties": {
  34909. "type": "object",
  34910. "properties": {
  34911. "timestamp": {
  34912. "type": "number"
  34913. },
  34914. "sessionID": {
  34915. "type": "string",
  34916. "pattern": "^ses"
  34917. },
  34918. "assistantMessageID": {
  34919. "type": "string",
  34920. "pattern": "^msg_"
  34921. },
  34922. "callID": {
  34923. "type": "string"
  34924. },
  34925. "text": {
  34926. "type": "string"
  34927. }
  34928. },
  34929. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  34930. "additionalProperties": false
  34931. }
  34932. },
  34933. "required": ["id", "type", "properties"],
  34934. "additionalProperties": false
  34935. },
  34936. "EventSessionNextToolCalled": {
  34937. "type": "object",
  34938. "properties": {
  34939. "id": {
  34940. "type": "string",
  34941. "pattern": "^evt_"
  34942. },
  34943. "type": {
  34944. "type": "string",
  34945. "enum": ["session.next.tool.called"]
  34946. },
  34947. "properties": {
  34948. "type": "object",
  34949. "properties": {
  34950. "timestamp": {
  34951. "type": "number"
  34952. },
  34953. "sessionID": {
  34954. "type": "string",
  34955. "pattern": "^ses"
  34956. },
  34957. "assistantMessageID": {
  34958. "type": "string",
  34959. "pattern": "^msg_"
  34960. },
  34961. "callID": {
  34962. "type": "string"
  34963. },
  34964. "tool": {
  34965. "type": "string"
  34966. },
  34967. "input": {
  34968. "type": "object"
  34969. },
  34970. "provider": {
  34971. "type": "object",
  34972. "properties": {
  34973. "executed": {
  34974. "type": "boolean"
  34975. },
  34976. "metadata": {
  34977. "$ref": "#/components/schemas/LLMProviderMetadata"
  34978. }
  34979. },
  34980. "required": ["executed"],
  34981. "additionalProperties": false
  34982. }
  34983. },
  34984. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  34985. "additionalProperties": false
  34986. }
  34987. },
  34988. "required": ["id", "type", "properties"],
  34989. "additionalProperties": false
  34990. },
  34991. "EventSessionNextToolProgress": {
  34992. "type": "object",
  34993. "properties": {
  34994. "id": {
  34995. "type": "string",
  34996. "pattern": "^evt_"
  34997. },
  34998. "type": {
  34999. "type": "string",
  35000. "enum": ["session.next.tool.progress"]
  35001. },
  35002. "properties": {
  35003. "type": "object",
  35004. "properties": {
  35005. "timestamp": {
  35006. "type": "number"
  35007. },
  35008. "sessionID": {
  35009. "type": "string",
  35010. "pattern": "^ses"
  35011. },
  35012. "assistantMessageID": {
  35013. "type": "string",
  35014. "pattern": "^msg_"
  35015. },
  35016. "callID": {
  35017. "type": "string"
  35018. },
  35019. "structured": {
  35020. "type": "object"
  35021. },
  35022. "content": {
  35023. "type": "array",
  35024. "items": {
  35025. "$ref": "#/components/schemas/LLMToolContent"
  35026. }
  35027. }
  35028. },
  35029. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  35030. "additionalProperties": false
  35031. }
  35032. },
  35033. "required": ["id", "type", "properties"],
  35034. "additionalProperties": false
  35035. },
  35036. "EventSessionNextToolSuccess": {
  35037. "type": "object",
  35038. "properties": {
  35039. "id": {
  35040. "type": "string",
  35041. "pattern": "^evt_"
  35042. },
  35043. "type": {
  35044. "type": "string",
  35045. "enum": ["session.next.tool.success"]
  35046. },
  35047. "properties": {
  35048. "type": "object",
  35049. "properties": {
  35050. "timestamp": {
  35051. "type": "number"
  35052. },
  35053. "sessionID": {
  35054. "type": "string",
  35055. "pattern": "^ses"
  35056. },
  35057. "assistantMessageID": {
  35058. "type": "string",
  35059. "pattern": "^msg_"
  35060. },
  35061. "callID": {
  35062. "type": "string"
  35063. },
  35064. "structured": {
  35065. "type": "object"
  35066. },
  35067. "content": {
  35068. "type": "array",
  35069. "items": {
  35070. "$ref": "#/components/schemas/LLMToolContent"
  35071. }
  35072. },
  35073. "outputPaths": {
  35074. "type": "array",
  35075. "items": {
  35076. "type": "string"
  35077. }
  35078. },
  35079. "result": {},
  35080. "provider": {
  35081. "type": "object",
  35082. "properties": {
  35083. "executed": {
  35084. "type": "boolean"
  35085. },
  35086. "metadata": {
  35087. "$ref": "#/components/schemas/LLMProviderMetadata"
  35088. }
  35089. },
  35090. "required": ["executed"],
  35091. "additionalProperties": false
  35092. }
  35093. },
  35094. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  35095. "additionalProperties": false
  35096. }
  35097. },
  35098. "required": ["id", "type", "properties"],
  35099. "additionalProperties": false
  35100. },
  35101. "EventSessionNextToolFailed": {
  35102. "type": "object",
  35103. "properties": {
  35104. "id": {
  35105. "type": "string",
  35106. "pattern": "^evt_"
  35107. },
  35108. "type": {
  35109. "type": "string",
  35110. "enum": ["session.next.tool.failed"]
  35111. },
  35112. "properties": {
  35113. "type": "object",
  35114. "properties": {
  35115. "timestamp": {
  35116. "type": "number"
  35117. },
  35118. "sessionID": {
  35119. "type": "string",
  35120. "pattern": "^ses"
  35121. },
  35122. "assistantMessageID": {
  35123. "type": "string",
  35124. "pattern": "^msg_"
  35125. },
  35126. "callID": {
  35127. "type": "string"
  35128. },
  35129. "error": {
  35130. "$ref": "#/components/schemas/SessionErrorUnknown"
  35131. },
  35132. "result": {},
  35133. "provider": {
  35134. "type": "object",
  35135. "properties": {
  35136. "executed": {
  35137. "type": "boolean"
  35138. },
  35139. "metadata": {
  35140. "$ref": "#/components/schemas/LLMProviderMetadata"
  35141. }
  35142. },
  35143. "required": ["executed"],
  35144. "additionalProperties": false
  35145. }
  35146. },
  35147. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  35148. "additionalProperties": false
  35149. }
  35150. },
  35151. "required": ["id", "type", "properties"],
  35152. "additionalProperties": false
  35153. },
  35154. "EventSessionNextRetried": {
  35155. "type": "object",
  35156. "properties": {
  35157. "id": {
  35158. "type": "string",
  35159. "pattern": "^evt_"
  35160. },
  35161. "type": {
  35162. "type": "string",
  35163. "enum": ["session.next.retried"]
  35164. },
  35165. "properties": {
  35166. "type": "object",
  35167. "properties": {
  35168. "timestamp": {
  35169. "type": "number"
  35170. },
  35171. "sessionID": {
  35172. "type": "string",
  35173. "pattern": "^ses"
  35174. },
  35175. "attempt": {
  35176. "type": "number"
  35177. },
  35178. "error": {
  35179. "$ref": "#/components/schemas/SessionNextRetry_error"
  35180. }
  35181. },
  35182. "required": ["timestamp", "sessionID", "attempt", "error"],
  35183. "additionalProperties": false
  35184. }
  35185. },
  35186. "required": ["id", "type", "properties"],
  35187. "additionalProperties": false
  35188. },
  35189. "EventSessionNextCompactionStarted": {
  35190. "type": "object",
  35191. "properties": {
  35192. "id": {
  35193. "type": "string",
  35194. "pattern": "^evt_"
  35195. },
  35196. "type": {
  35197. "type": "string",
  35198. "enum": ["session.next.compaction.started"]
  35199. },
  35200. "properties": {
  35201. "type": "object",
  35202. "properties": {
  35203. "timestamp": {
  35204. "type": "number"
  35205. },
  35206. "sessionID": {
  35207. "type": "string",
  35208. "pattern": "^ses"
  35209. },
  35210. "messageID": {
  35211. "type": "string",
  35212. "pattern": "^msg_"
  35213. },
  35214. "reason": {
  35215. "type": "string",
  35216. "enum": ["auto", "manual"]
  35217. }
  35218. },
  35219. "required": ["timestamp", "sessionID", "messageID", "reason"],
  35220. "additionalProperties": false
  35221. }
  35222. },
  35223. "required": ["id", "type", "properties"],
  35224. "additionalProperties": false
  35225. },
  35226. "EventSessionNextCompactionDelta": {
  35227. "type": "object",
  35228. "properties": {
  35229. "id": {
  35230. "type": "string",
  35231. "pattern": "^evt_"
  35232. },
  35233. "type": {
  35234. "type": "string",
  35235. "enum": ["session.next.compaction.delta"]
  35236. },
  35237. "properties": {
  35238. "type": "object",
  35239. "properties": {
  35240. "timestamp": {
  35241. "type": "number"
  35242. },
  35243. "sessionID": {
  35244. "type": "string",
  35245. "pattern": "^ses"
  35246. },
  35247. "messageID": {
  35248. "type": "string",
  35249. "pattern": "^msg_"
  35250. },
  35251. "text": {
  35252. "type": "string"
  35253. }
  35254. },
  35255. "required": ["timestamp", "sessionID", "messageID", "text"],
  35256. "additionalProperties": false
  35257. }
  35258. },
  35259. "required": ["id", "type", "properties"],
  35260. "additionalProperties": false
  35261. },
  35262. "EventSessionNextCompactionEnded": {
  35263. "type": "object",
  35264. "properties": {
  35265. "id": {
  35266. "type": "string",
  35267. "pattern": "^evt_"
  35268. },
  35269. "type": {
  35270. "type": "string",
  35271. "enum": ["session.next.compaction.ended"]
  35272. },
  35273. "properties": {
  35274. "type": "object",
  35275. "properties": {
  35276. "timestamp": {
  35277. "type": "number"
  35278. },
  35279. "sessionID": {
  35280. "type": "string",
  35281. "pattern": "^ses"
  35282. },
  35283. "messageID": {
  35284. "type": "string",
  35285. "pattern": "^msg_"
  35286. },
  35287. "reason": {
  35288. "type": "string",
  35289. "enum": ["auto", "manual"]
  35290. },
  35291. "text": {
  35292. "type": "string"
  35293. },
  35294. "recent": {
  35295. "type": "string"
  35296. }
  35297. },
  35298. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  35299. "additionalProperties": false
  35300. }
  35301. },
  35302. "required": ["id", "type", "properties"],
  35303. "additionalProperties": false
  35304. },
  35305. "EventSessionNextRevertStaged": {
  35306. "type": "object",
  35307. "properties": {
  35308. "id": {
  35309. "type": "string",
  35310. "pattern": "^evt_"
  35311. },
  35312. "type": {
  35313. "type": "string",
  35314. "enum": ["session.next.revert.staged"]
  35315. },
  35316. "properties": {
  35317. "type": "object",
  35318. "properties": {
  35319. "timestamp": {
  35320. "type": "number"
  35321. },
  35322. "sessionID": {
  35323. "type": "string",
  35324. "pattern": "^ses"
  35325. },
  35326. "revert": {
  35327. "$ref": "#/components/schemas/RevertState"
  35328. }
  35329. },
  35330. "required": ["timestamp", "sessionID", "revert"],
  35331. "additionalProperties": false
  35332. }
  35333. },
  35334. "required": ["id", "type", "properties"],
  35335. "additionalProperties": false
  35336. },
  35337. "EventSessionNextRevertCleared": {
  35338. "type": "object",
  35339. "properties": {
  35340. "id": {
  35341. "type": "string",
  35342. "pattern": "^evt_"
  35343. },
  35344. "type": {
  35345. "type": "string",
  35346. "enum": ["session.next.revert.cleared"]
  35347. },
  35348. "properties": {
  35349. "type": "object",
  35350. "properties": {
  35351. "timestamp": {
  35352. "type": "number"
  35353. },
  35354. "sessionID": {
  35355. "type": "string",
  35356. "pattern": "^ses"
  35357. }
  35358. },
  35359. "required": ["timestamp", "sessionID"],
  35360. "additionalProperties": false
  35361. }
  35362. },
  35363. "required": ["id", "type", "properties"],
  35364. "additionalProperties": false
  35365. },
  35366. "EventSessionNextRevertCommitted": {
  35367. "type": "object",
  35368. "properties": {
  35369. "id": {
  35370. "type": "string",
  35371. "pattern": "^evt_"
  35372. },
  35373. "type": {
  35374. "type": "string",
  35375. "enum": ["session.next.revert.committed"]
  35376. },
  35377. "properties": {
  35378. "type": "object",
  35379. "properties": {
  35380. "timestamp": {
  35381. "type": "number"
  35382. },
  35383. "sessionID": {
  35384. "type": "string",
  35385. "pattern": "^ses"
  35386. },
  35387. "messageID": {
  35388. "type": "string",
  35389. "pattern": "^msg_"
  35390. }
  35391. },
  35392. "required": ["timestamp", "sessionID", "messageID"],
  35393. "additionalProperties": false
  35394. }
  35395. },
  35396. "required": ["id", "type", "properties"],
  35397. "additionalProperties": false
  35398. },
  35399. "EventMessagePartDelta": {
  35400. "type": "object",
  35401. "properties": {
  35402. "id": {
  35403. "type": "string",
  35404. "pattern": "^evt_"
  35405. },
  35406. "type": {
  35407. "type": "string",
  35408. "enum": ["message.part.delta"]
  35409. },
  35410. "properties": {
  35411. "type": "object",
  35412. "properties": {
  35413. "sessionID": {
  35414. "type": "string",
  35415. "pattern": "^ses"
  35416. },
  35417. "messageID": {
  35418. "type": "string",
  35419. "pattern": "^msg"
  35420. },
  35421. "partID": {
  35422. "type": "string",
  35423. "pattern": "^prt"
  35424. },
  35425. "field": {
  35426. "type": "string"
  35427. },
  35428. "delta": {
  35429. "type": "string"
  35430. }
  35431. },
  35432. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  35433. "additionalProperties": false
  35434. }
  35435. },
  35436. "required": ["id", "type", "properties"],
  35437. "additionalProperties": false
  35438. },
  35439. "EventSessionDiff": {
  35440. "type": "object",
  35441. "properties": {
  35442. "id": {
  35443. "type": "string",
  35444. "pattern": "^evt_"
  35445. },
  35446. "type": {
  35447. "type": "string",
  35448. "enum": ["session.diff"]
  35449. },
  35450. "properties": {
  35451. "type": "object",
  35452. "properties": {
  35453. "sessionID": {
  35454. "type": "string",
  35455. "pattern": "^ses"
  35456. },
  35457. "diff": {
  35458. "type": "array",
  35459. "items": {
  35460. "$ref": "#/components/schemas/SnapshotFileDiff"
  35461. }
  35462. }
  35463. },
  35464. "required": ["sessionID", "diff"],
  35465. "additionalProperties": false
  35466. }
  35467. },
  35468. "required": ["id", "type", "properties"],
  35469. "additionalProperties": false
  35470. },
  35471. "EventSessionError": {
  35472. "type": "object",
  35473. "properties": {
  35474. "id": {
  35475. "type": "string",
  35476. "pattern": "^evt_"
  35477. },
  35478. "type": {
  35479. "type": "string",
  35480. "enum": ["session.error"]
  35481. },
  35482. "properties": {
  35483. "type": "object",
  35484. "properties": {
  35485. "sessionID": {
  35486. "type": "string",
  35487. "pattern": "^ses"
  35488. },
  35489. "error": {
  35490. "anyOf": [
  35491. {
  35492. "$ref": "#/components/schemas/ProviderAuthError"
  35493. },
  35494. {
  35495. "$ref": "#/components/schemas/UnknownError"
  35496. },
  35497. {
  35498. "$ref": "#/components/schemas/MessageOutputLengthError"
  35499. },
  35500. {
  35501. "$ref": "#/components/schemas/MessageAbortedError"
  35502. },
  35503. {
  35504. "$ref": "#/components/schemas/StructuredOutputError"
  35505. },
  35506. {
  35507. "$ref": "#/components/schemas/ContextOverflowError"
  35508. },
  35509. {
  35510. "$ref": "#/components/schemas/ContentFilterError"
  35511. },
  35512. {
  35513. "$ref": "#/components/schemas/APIError"
  35514. }
  35515. ]
  35516. }
  35517. },
  35518. "additionalProperties": false
  35519. }
  35520. },
  35521. "required": ["id", "type", "properties"],
  35522. "additionalProperties": false
  35523. },
  35524. "EventInstallationUpdated": {
  35525. "type": "object",
  35526. "properties": {
  35527. "id": {
  35528. "type": "string",
  35529. "pattern": "^evt_"
  35530. },
  35531. "type": {
  35532. "type": "string",
  35533. "enum": ["installation.updated"]
  35534. },
  35535. "properties": {
  35536. "type": "object",
  35537. "properties": {
  35538. "version": {
  35539. "type": "string"
  35540. }
  35541. },
  35542. "required": ["version"],
  35543. "additionalProperties": false
  35544. }
  35545. },
  35546. "required": ["id", "type", "properties"],
  35547. "additionalProperties": false
  35548. },
  35549. "EventInstallationUpdate-available": {
  35550. "type": "object",
  35551. "properties": {
  35552. "id": {
  35553. "type": "string",
  35554. "pattern": "^evt_"
  35555. },
  35556. "type": {
  35557. "type": "string",
  35558. "enum": ["installation.update-available"]
  35559. },
  35560. "properties": {
  35561. "type": "object",
  35562. "properties": {
  35563. "version": {
  35564. "type": "string"
  35565. }
  35566. },
  35567. "required": ["version"],
  35568. "additionalProperties": false
  35569. }
  35570. },
  35571. "required": ["id", "type", "properties"],
  35572. "additionalProperties": false
  35573. },
  35574. "EventFileEdited": {
  35575. "type": "object",
  35576. "properties": {
  35577. "id": {
  35578. "type": "string",
  35579. "pattern": "^evt_"
  35580. },
  35581. "type": {
  35582. "type": "string",
  35583. "enum": ["file.edited"]
  35584. },
  35585. "properties": {
  35586. "type": "object",
  35587. "properties": {
  35588. "file": {
  35589. "type": "string"
  35590. }
  35591. },
  35592. "required": ["file"],
  35593. "additionalProperties": false
  35594. }
  35595. },
  35596. "required": ["id", "type", "properties"],
  35597. "additionalProperties": false
  35598. },
  35599. "EventReferenceUpdated": {
  35600. "type": "object",
  35601. "properties": {
  35602. "id": {
  35603. "type": "string",
  35604. "pattern": "^evt_"
  35605. },
  35606. "type": {
  35607. "type": "string",
  35608. "enum": ["reference.updated"]
  35609. },
  35610. "properties": {
  35611. "type": "object",
  35612. "properties": {}
  35613. }
  35614. },
  35615. "required": ["id", "type", "properties"],
  35616. "additionalProperties": false
  35617. },
  35618. "EventPermissionV2Asked": {
  35619. "type": "object",
  35620. "properties": {
  35621. "id": {
  35622. "type": "string",
  35623. "pattern": "^evt_"
  35624. },
  35625. "type": {
  35626. "type": "string",
  35627. "enum": ["permission.v2.asked"]
  35628. },
  35629. "properties": {
  35630. "type": "object",
  35631. "properties": {
  35632. "id": {
  35633. "type": "string",
  35634. "pattern": "^per"
  35635. },
  35636. "sessionID": {
  35637. "type": "string",
  35638. "pattern": "^ses"
  35639. },
  35640. "action": {
  35641. "type": "string"
  35642. },
  35643. "resources": {
  35644. "type": "array",
  35645. "items": {
  35646. "type": "string"
  35647. }
  35648. },
  35649. "save": {
  35650. "type": "array",
  35651. "items": {
  35652. "type": "string"
  35653. }
  35654. },
  35655. "metadata": {
  35656. "type": "object"
  35657. },
  35658. "source": {
  35659. "$ref": "#/components/schemas/PermissionV2Source"
  35660. }
  35661. },
  35662. "required": ["id", "sessionID", "action", "resources"],
  35663. "additionalProperties": false
  35664. }
  35665. },
  35666. "required": ["id", "type", "properties"],
  35667. "additionalProperties": false
  35668. },
  35669. "EventPermissionV2Replied": {
  35670. "type": "object",
  35671. "properties": {
  35672. "id": {
  35673. "type": "string",
  35674. "pattern": "^evt_"
  35675. },
  35676. "type": {
  35677. "type": "string",
  35678. "enum": ["permission.v2.replied"]
  35679. },
  35680. "properties": {
  35681. "type": "object",
  35682. "properties": {
  35683. "sessionID": {
  35684. "type": "string",
  35685. "pattern": "^ses"
  35686. },
  35687. "requestID": {
  35688. "type": "string",
  35689. "pattern": "^per"
  35690. },
  35691. "reply": {
  35692. "$ref": "#/components/schemas/PermissionV2Reply"
  35693. }
  35694. },
  35695. "required": ["sessionID", "requestID", "reply"],
  35696. "additionalProperties": false
  35697. }
  35698. },
  35699. "required": ["id", "type", "properties"],
  35700. "additionalProperties": false
  35701. },
  35702. "EventPluginAdded": {
  35703. "type": "object",
  35704. "properties": {
  35705. "id": {
  35706. "type": "string",
  35707. "pattern": "^evt_"
  35708. },
  35709. "type": {
  35710. "type": "string",
  35711. "enum": ["plugin.added"]
  35712. },
  35713. "properties": {
  35714. "type": "object",
  35715. "properties": {
  35716. "id": {
  35717. "type": "string"
  35718. }
  35719. },
  35720. "required": ["id"],
  35721. "additionalProperties": false
  35722. }
  35723. },
  35724. "required": ["id", "type", "properties"],
  35725. "additionalProperties": false
  35726. },
  35727. "EventProjectDirectoriesUpdated": {
  35728. "type": "object",
  35729. "properties": {
  35730. "id": {
  35731. "type": "string",
  35732. "pattern": "^evt_"
  35733. },
  35734. "type": {
  35735. "type": "string",
  35736. "enum": ["project.directories.updated"]
  35737. },
  35738. "properties": {
  35739. "type": "object",
  35740. "properties": {
  35741. "projectID": {
  35742. "type": "string"
  35743. }
  35744. },
  35745. "required": ["projectID"],
  35746. "additionalProperties": false
  35747. }
  35748. },
  35749. "required": ["id", "type", "properties"],
  35750. "additionalProperties": false
  35751. },
  35752. "EventFileWatcherUpdated": {
  35753. "type": "object",
  35754. "properties": {
  35755. "id": {
  35756. "type": "string",
  35757. "pattern": "^evt_"
  35758. },
  35759. "type": {
  35760. "type": "string",
  35761. "enum": ["file.watcher.updated"]
  35762. },
  35763. "properties": {
  35764. "type": "object",
  35765. "properties": {
  35766. "file": {
  35767. "type": "string"
  35768. },
  35769. "event": {
  35770. "type": "string",
  35771. "enum": ["add", "change", "unlink"]
  35772. }
  35773. },
  35774. "required": ["file", "event"],
  35775. "additionalProperties": false
  35776. }
  35777. },
  35778. "required": ["id", "type", "properties"],
  35779. "additionalProperties": false
  35780. },
  35781. "EventPtyCreated": {
  35782. "type": "object",
  35783. "properties": {
  35784. "id": {
  35785. "type": "string",
  35786. "pattern": "^evt_"
  35787. },
  35788. "type": {
  35789. "type": "string",
  35790. "enum": ["pty.created"]
  35791. },
  35792. "properties": {
  35793. "type": "object",
  35794. "properties": {
  35795. "info": {
  35796. "$ref": "#/components/schemas/Pty"
  35797. }
  35798. },
  35799. "required": ["info"],
  35800. "additionalProperties": false
  35801. }
  35802. },
  35803. "required": ["id", "type", "properties"],
  35804. "additionalProperties": false
  35805. },
  35806. "EventPtyUpdated": {
  35807. "type": "object",
  35808. "properties": {
  35809. "id": {
  35810. "type": "string",
  35811. "pattern": "^evt_"
  35812. },
  35813. "type": {
  35814. "type": "string",
  35815. "enum": ["pty.updated"]
  35816. },
  35817. "properties": {
  35818. "type": "object",
  35819. "properties": {
  35820. "info": {
  35821. "$ref": "#/components/schemas/Pty"
  35822. }
  35823. },
  35824. "required": ["info"],
  35825. "additionalProperties": false
  35826. }
  35827. },
  35828. "required": ["id", "type", "properties"],
  35829. "additionalProperties": false
  35830. },
  35831. "EventPtyExited": {
  35832. "type": "object",
  35833. "properties": {
  35834. "id": {
  35835. "type": "string",
  35836. "pattern": "^evt_"
  35837. },
  35838. "type": {
  35839. "type": "string",
  35840. "enum": ["pty.exited"]
  35841. },
  35842. "properties": {
  35843. "type": "object",
  35844. "properties": {
  35845. "id": {
  35846. "type": "string",
  35847. "pattern": "^pty"
  35848. },
  35849. "exitCode": {
  35850. "type": "integer",
  35851. "minimum": 0
  35852. }
  35853. },
  35854. "required": ["id", "exitCode"],
  35855. "additionalProperties": false
  35856. }
  35857. },
  35858. "required": ["id", "type", "properties"],
  35859. "additionalProperties": false
  35860. },
  35861. "EventPtyDeleted": {
  35862. "type": "object",
  35863. "properties": {
  35864. "id": {
  35865. "type": "string",
  35866. "pattern": "^evt_"
  35867. },
  35868. "type": {
  35869. "type": "string",
  35870. "enum": ["pty.deleted"]
  35871. },
  35872. "properties": {
  35873. "type": "object",
  35874. "properties": {
  35875. "id": {
  35876. "type": "string",
  35877. "pattern": "^pty"
  35878. }
  35879. },
  35880. "required": ["id"],
  35881. "additionalProperties": false
  35882. }
  35883. },
  35884. "required": ["id", "type", "properties"],
  35885. "additionalProperties": false
  35886. },
  35887. "EventQuestionV2Asked": {
  35888. "type": "object",
  35889. "properties": {
  35890. "id": {
  35891. "type": "string",
  35892. "pattern": "^evt_"
  35893. },
  35894. "type": {
  35895. "type": "string",
  35896. "enum": ["question.v2.asked"]
  35897. },
  35898. "properties": {
  35899. "type": "object",
  35900. "properties": {
  35901. "id": {
  35902. "type": "string",
  35903. "pattern": "^que"
  35904. },
  35905. "sessionID": {
  35906. "type": "string",
  35907. "pattern": "^ses"
  35908. },
  35909. "questions": {
  35910. "type": "array",
  35911. "items": {
  35912. "$ref": "#/components/schemas/QuestionV2Info"
  35913. },
  35914. "description": "Questions to ask"
  35915. },
  35916. "tool": {
  35917. "$ref": "#/components/schemas/QuestionV2Tool"
  35918. }
  35919. },
  35920. "required": ["id", "sessionID", "questions"],
  35921. "additionalProperties": false
  35922. }
  35923. },
  35924. "required": ["id", "type", "properties"],
  35925. "additionalProperties": false
  35926. },
  35927. "EventQuestionV2Replied": {
  35928. "type": "object",
  35929. "properties": {
  35930. "id": {
  35931. "type": "string",
  35932. "pattern": "^evt_"
  35933. },
  35934. "type": {
  35935. "type": "string",
  35936. "enum": ["question.v2.replied"]
  35937. },
  35938. "properties": {
  35939. "type": "object",
  35940. "properties": {
  35941. "sessionID": {
  35942. "type": "string",
  35943. "pattern": "^ses"
  35944. },
  35945. "requestID": {
  35946. "type": "string",
  35947. "pattern": "^que"
  35948. },
  35949. "answers": {
  35950. "type": "array",
  35951. "items": {
  35952. "$ref": "#/components/schemas/QuestionV2Answer"
  35953. }
  35954. }
  35955. },
  35956. "required": ["sessionID", "requestID", "answers"],
  35957. "additionalProperties": false
  35958. }
  35959. },
  35960. "required": ["id", "type", "properties"],
  35961. "additionalProperties": false
  35962. },
  35963. "EventQuestionV2Rejected": {
  35964. "type": "object",
  35965. "properties": {
  35966. "id": {
  35967. "type": "string",
  35968. "pattern": "^evt_"
  35969. },
  35970. "type": {
  35971. "type": "string",
  35972. "enum": ["question.v2.rejected"]
  35973. },
  35974. "properties": {
  35975. "type": "object",
  35976. "properties": {
  35977. "sessionID": {
  35978. "type": "string",
  35979. "pattern": "^ses"
  35980. },
  35981. "requestID": {
  35982. "type": "string",
  35983. "pattern": "^que"
  35984. }
  35985. },
  35986. "required": ["sessionID", "requestID"],
  35987. "additionalProperties": false
  35988. }
  35989. },
  35990. "required": ["id", "type", "properties"],
  35991. "additionalProperties": false
  35992. },
  35993. "EventTodoUpdated": {
  35994. "type": "object",
  35995. "properties": {
  35996. "id": {
  35997. "type": "string",
  35998. "pattern": "^evt_"
  35999. },
  36000. "type": {
  36001. "type": "string",
  36002. "enum": ["todo.updated"]
  36003. },
  36004. "properties": {
  36005. "type": "object",
  36006. "properties": {
  36007. "sessionID": {
  36008. "type": "string",
  36009. "pattern": "^ses"
  36010. },
  36011. "todos": {
  36012. "type": "array",
  36013. "items": {
  36014. "$ref": "#/components/schemas/Todo"
  36015. }
  36016. }
  36017. },
  36018. "required": ["sessionID", "todos"],
  36019. "additionalProperties": false
  36020. }
  36021. },
  36022. "required": ["id", "type", "properties"],
  36023. "additionalProperties": false
  36024. },
  36025. "EventLspUpdated": {
  36026. "type": "object",
  36027. "properties": {
  36028. "id": {
  36029. "type": "string",
  36030. "pattern": "^evt_"
  36031. },
  36032. "type": {
  36033. "type": "string",
  36034. "enum": ["lsp.updated"]
  36035. },
  36036. "properties": {
  36037. "type": "object",
  36038. "properties": {}
  36039. }
  36040. },
  36041. "required": ["id", "type", "properties"],
  36042. "additionalProperties": false
  36043. },
  36044. "EventPermissionAsked": {
  36045. "type": "object",
  36046. "properties": {
  36047. "id": {
  36048. "type": "string",
  36049. "pattern": "^evt_"
  36050. },
  36051. "type": {
  36052. "type": "string",
  36053. "enum": ["permission.asked"]
  36054. },
  36055. "properties": {
  36056. "type": "object",
  36057. "properties": {
  36058. "id": {
  36059. "type": "string",
  36060. "pattern": "^per"
  36061. },
  36062. "sessionID": {
  36063. "type": "string",
  36064. "pattern": "^ses"
  36065. },
  36066. "permission": {
  36067. "type": "string"
  36068. },
  36069. "patterns": {
  36070. "type": "array",
  36071. "items": {
  36072. "type": "string"
  36073. }
  36074. },
  36075. "metadata": {
  36076. "type": "object"
  36077. },
  36078. "always": {
  36079. "type": "array",
  36080. "items": {
  36081. "type": "string"
  36082. }
  36083. },
  36084. "tool": {
  36085. "type": "object",
  36086. "properties": {
  36087. "messageID": {
  36088. "type": "string"
  36089. },
  36090. "callID": {
  36091. "type": "string"
  36092. }
  36093. },
  36094. "required": ["messageID", "callID"],
  36095. "additionalProperties": false
  36096. }
  36097. },
  36098. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  36099. "additionalProperties": false
  36100. }
  36101. },
  36102. "required": ["id", "type", "properties"],
  36103. "additionalProperties": false
  36104. },
  36105. "EventPermissionReplied": {
  36106. "type": "object",
  36107. "properties": {
  36108. "id": {
  36109. "type": "string",
  36110. "pattern": "^evt_"
  36111. },
  36112. "type": {
  36113. "type": "string",
  36114. "enum": ["permission.replied"]
  36115. },
  36116. "properties": {
  36117. "type": "object",
  36118. "properties": {
  36119. "sessionID": {
  36120. "type": "string",
  36121. "pattern": "^ses"
  36122. },
  36123. "requestID": {
  36124. "type": "string",
  36125. "pattern": "^per"
  36126. },
  36127. "reply": {
  36128. "type": "string",
  36129. "enum": ["once", "always", "reject"]
  36130. }
  36131. },
  36132. "required": ["sessionID", "requestID", "reply"],
  36133. "additionalProperties": false
  36134. }
  36135. },
  36136. "required": ["id", "type", "properties"],
  36137. "additionalProperties": false
  36138. },
  36139. "EventMcpToolsChanged": {
  36140. "type": "object",
  36141. "properties": {
  36142. "id": {
  36143. "type": "string",
  36144. "pattern": "^evt_"
  36145. },
  36146. "type": {
  36147. "type": "string",
  36148. "enum": ["mcp.tools.changed"]
  36149. },
  36150. "properties": {
  36151. "type": "object",
  36152. "properties": {
  36153. "server": {
  36154. "type": "string"
  36155. }
  36156. },
  36157. "required": ["server"],
  36158. "additionalProperties": false
  36159. }
  36160. },
  36161. "required": ["id", "type", "properties"],
  36162. "additionalProperties": false
  36163. },
  36164. "EventMcpBrowserOpenFailed": {
  36165. "type": "object",
  36166. "properties": {
  36167. "id": {
  36168. "type": "string",
  36169. "pattern": "^evt_"
  36170. },
  36171. "type": {
  36172. "type": "string",
  36173. "enum": ["mcp.browser.open.failed"]
  36174. },
  36175. "properties": {
  36176. "type": "object",
  36177. "properties": {
  36178. "mcpName": {
  36179. "type": "string"
  36180. },
  36181. "url": {
  36182. "type": "string"
  36183. }
  36184. },
  36185. "required": ["mcpName", "url"],
  36186. "additionalProperties": false
  36187. }
  36188. },
  36189. "required": ["id", "type", "properties"],
  36190. "additionalProperties": false
  36191. },
  36192. "EventCommandExecuted": {
  36193. "type": "object",
  36194. "properties": {
  36195. "id": {
  36196. "type": "string",
  36197. "pattern": "^evt_"
  36198. },
  36199. "type": {
  36200. "type": "string",
  36201. "enum": ["command.executed"]
  36202. },
  36203. "properties": {
  36204. "type": "object",
  36205. "properties": {
  36206. "name": {
  36207. "type": "string"
  36208. },
  36209. "sessionID": {
  36210. "type": "string",
  36211. "pattern": "^ses"
  36212. },
  36213. "arguments": {
  36214. "type": "string"
  36215. },
  36216. "messageID": {
  36217. "type": "string",
  36218. "pattern": "^msg"
  36219. }
  36220. },
  36221. "required": ["name", "sessionID", "arguments", "messageID"],
  36222. "additionalProperties": false
  36223. }
  36224. },
  36225. "required": ["id", "type", "properties"],
  36226. "additionalProperties": false
  36227. },
  36228. "EventProjectUpdated": {
  36229. "type": "object",
  36230. "properties": {
  36231. "id": {
  36232. "type": "string",
  36233. "pattern": "^evt_"
  36234. },
  36235. "type": {
  36236. "type": "string",
  36237. "enum": ["project.updated"]
  36238. },
  36239. "properties": {
  36240. "type": "object",
  36241. "properties": {
  36242. "id": {
  36243. "type": "string"
  36244. },
  36245. "worktree": {
  36246. "type": "string"
  36247. },
  36248. "vcs": {
  36249. "$ref": "#/components/schemas/ProjectVcs"
  36250. },
  36251. "name": {
  36252. "type": "string"
  36253. },
  36254. "icon": {
  36255. "$ref": "#/components/schemas/ProjectIcon"
  36256. },
  36257. "commands": {
  36258. "$ref": "#/components/schemas/ProjectCommands"
  36259. },
  36260. "time": {
  36261. "$ref": "#/components/schemas/ProjectTime"
  36262. },
  36263. "sandboxes": {
  36264. "type": "array",
  36265. "items": {
  36266. "type": "string"
  36267. }
  36268. }
  36269. },
  36270. "required": ["id", "worktree", "time", "sandboxes"],
  36271. "additionalProperties": false
  36272. }
  36273. },
  36274. "required": ["id", "type", "properties"],
  36275. "additionalProperties": false
  36276. },
  36277. "EventSessionStatus": {
  36278. "type": "object",
  36279. "properties": {
  36280. "id": {
  36281. "type": "string",
  36282. "pattern": "^evt_"
  36283. },
  36284. "type": {
  36285. "type": "string",
  36286. "enum": ["session.status"]
  36287. },
  36288. "properties": {
  36289. "type": "object",
  36290. "properties": {
  36291. "sessionID": {
  36292. "type": "string",
  36293. "pattern": "^ses"
  36294. },
  36295. "status": {
  36296. "$ref": "#/components/schemas/SessionStatus"
  36297. }
  36298. },
  36299. "required": ["sessionID", "status"],
  36300. "additionalProperties": false
  36301. }
  36302. },
  36303. "required": ["id", "type", "properties"],
  36304. "additionalProperties": false
  36305. },
  36306. "EventSessionIdle": {
  36307. "type": "object",
  36308. "properties": {
  36309. "id": {
  36310. "type": "string",
  36311. "pattern": "^evt_"
  36312. },
  36313. "type": {
  36314. "type": "string",
  36315. "enum": ["session.idle"]
  36316. },
  36317. "properties": {
  36318. "type": "object",
  36319. "properties": {
  36320. "sessionID": {
  36321. "type": "string",
  36322. "pattern": "^ses"
  36323. }
  36324. },
  36325. "required": ["sessionID"],
  36326. "additionalProperties": false
  36327. }
  36328. },
  36329. "required": ["id", "type", "properties"],
  36330. "additionalProperties": false
  36331. },
  36332. "EventQuestionAsked": {
  36333. "type": "object",
  36334. "properties": {
  36335. "id": {
  36336. "type": "string",
  36337. "pattern": "^evt_"
  36338. },
  36339. "type": {
  36340. "type": "string",
  36341. "enum": ["question.asked"]
  36342. },
  36343. "properties": {
  36344. "type": "object",
  36345. "properties": {
  36346. "id": {
  36347. "type": "string",
  36348. "pattern": "^que"
  36349. },
  36350. "sessionID": {
  36351. "type": "string",
  36352. "pattern": "^ses"
  36353. },
  36354. "questions": {
  36355. "type": "array",
  36356. "items": {
  36357. "$ref": "#/components/schemas/QuestionInfo"
  36358. },
  36359. "description": "Questions to ask"
  36360. },
  36361. "tool": {
  36362. "$ref": "#/components/schemas/QuestionTool"
  36363. }
  36364. },
  36365. "required": ["id", "sessionID", "questions"],
  36366. "additionalProperties": false
  36367. }
  36368. },
  36369. "required": ["id", "type", "properties"],
  36370. "additionalProperties": false
  36371. },
  36372. "EventQuestionReplied": {
  36373. "type": "object",
  36374. "properties": {
  36375. "id": {
  36376. "type": "string",
  36377. "pattern": "^evt_"
  36378. },
  36379. "type": {
  36380. "type": "string",
  36381. "enum": ["question.replied"]
  36382. },
  36383. "properties": {
  36384. "type": "object",
  36385. "properties": {
  36386. "sessionID": {
  36387. "type": "string",
  36388. "pattern": "^ses"
  36389. },
  36390. "requestID": {
  36391. "type": "string",
  36392. "pattern": "^que"
  36393. },
  36394. "answers": {
  36395. "type": "array",
  36396. "items": {
  36397. "$ref": "#/components/schemas/QuestionAnswer"
  36398. }
  36399. }
  36400. },
  36401. "required": ["sessionID", "requestID", "answers"],
  36402. "additionalProperties": false
  36403. }
  36404. },
  36405. "required": ["id", "type", "properties"],
  36406. "additionalProperties": false
  36407. },
  36408. "EventQuestionRejected": {
  36409. "type": "object",
  36410. "properties": {
  36411. "id": {
  36412. "type": "string",
  36413. "pattern": "^evt_"
  36414. },
  36415. "type": {
  36416. "type": "string",
  36417. "enum": ["question.rejected"]
  36418. },
  36419. "properties": {
  36420. "type": "object",
  36421. "properties": {
  36422. "sessionID": {
  36423. "type": "string",
  36424. "pattern": "^ses"
  36425. },
  36426. "requestID": {
  36427. "type": "string",
  36428. "pattern": "^que"
  36429. }
  36430. },
  36431. "required": ["sessionID", "requestID"],
  36432. "additionalProperties": false
  36433. }
  36434. },
  36435. "required": ["id", "type", "properties"],
  36436. "additionalProperties": false
  36437. },
  36438. "EventSessionCompacted": {
  36439. "type": "object",
  36440. "properties": {
  36441. "id": {
  36442. "type": "string",
  36443. "pattern": "^evt_"
  36444. },
  36445. "type": {
  36446. "type": "string",
  36447. "enum": ["session.compacted"]
  36448. },
  36449. "properties": {
  36450. "type": "object",
  36451. "properties": {
  36452. "sessionID": {
  36453. "type": "string",
  36454. "pattern": "^ses"
  36455. }
  36456. },
  36457. "required": ["sessionID"],
  36458. "additionalProperties": false
  36459. }
  36460. },
  36461. "required": ["id", "type", "properties"],
  36462. "additionalProperties": false
  36463. },
  36464. "EventVcsBranchUpdated": {
  36465. "type": "object",
  36466. "properties": {
  36467. "id": {
  36468. "type": "string",
  36469. "pattern": "^evt_"
  36470. },
  36471. "type": {
  36472. "type": "string",
  36473. "enum": ["vcs.branch.updated"]
  36474. },
  36475. "properties": {
  36476. "type": "object",
  36477. "properties": {
  36478. "branch": {
  36479. "type": "string"
  36480. }
  36481. },
  36482. "additionalProperties": false
  36483. }
  36484. },
  36485. "required": ["id", "type", "properties"],
  36486. "additionalProperties": false
  36487. },
  36488. "EventWorkspaceReady": {
  36489. "type": "object",
  36490. "properties": {
  36491. "id": {
  36492. "type": "string",
  36493. "pattern": "^evt_"
  36494. },
  36495. "type": {
  36496. "type": "string",
  36497. "enum": ["workspace.ready"]
  36498. },
  36499. "properties": {
  36500. "type": "object",
  36501. "properties": {
  36502. "name": {
  36503. "type": "string"
  36504. }
  36505. },
  36506. "required": ["name"],
  36507. "additionalProperties": false
  36508. }
  36509. },
  36510. "required": ["id", "type", "properties"],
  36511. "additionalProperties": false
  36512. },
  36513. "EventWorkspaceFailed": {
  36514. "type": "object",
  36515. "properties": {
  36516. "id": {
  36517. "type": "string",
  36518. "pattern": "^evt_"
  36519. },
  36520. "type": {
  36521. "type": "string",
  36522. "enum": ["workspace.failed"]
  36523. },
  36524. "properties": {
  36525. "type": "object",
  36526. "properties": {
  36527. "message": {
  36528. "type": "string"
  36529. }
  36530. },
  36531. "required": ["message"],
  36532. "additionalProperties": false
  36533. }
  36534. },
  36535. "required": ["id", "type", "properties"],
  36536. "additionalProperties": false
  36537. },
  36538. "EventWorkspaceStatus": {
  36539. "type": "object",
  36540. "properties": {
  36541. "id": {
  36542. "type": "string",
  36543. "pattern": "^evt_"
  36544. },
  36545. "type": {
  36546. "type": "string",
  36547. "enum": ["workspace.status"]
  36548. },
  36549. "properties": {
  36550. "type": "object",
  36551. "properties": {
  36552. "workspaceID": {
  36553. "type": "string",
  36554. "pattern": "^wrk"
  36555. },
  36556. "status": {
  36557. "type": "string",
  36558. "enum": ["connected", "connecting", "disconnected", "error"]
  36559. }
  36560. },
  36561. "required": ["workspaceID", "status"],
  36562. "additionalProperties": false
  36563. }
  36564. },
  36565. "required": ["id", "type", "properties"],
  36566. "additionalProperties": false
  36567. },
  36568. "EventWorktreeReady": {
  36569. "type": "object",
  36570. "properties": {
  36571. "id": {
  36572. "type": "string",
  36573. "pattern": "^evt_"
  36574. },
  36575. "type": {
  36576. "type": "string",
  36577. "enum": ["worktree.ready"]
  36578. },
  36579. "properties": {
  36580. "type": "object",
  36581. "properties": {
  36582. "name": {
  36583. "type": "string"
  36584. },
  36585. "branch": {
  36586. "type": "string"
  36587. }
  36588. },
  36589. "required": ["name"],
  36590. "additionalProperties": false
  36591. }
  36592. },
  36593. "required": ["id", "type", "properties"],
  36594. "additionalProperties": false
  36595. },
  36596. "EventWorktreeFailed": {
  36597. "type": "object",
  36598. "properties": {
  36599. "id": {
  36600. "type": "string",
  36601. "pattern": "^evt_"
  36602. },
  36603. "type": {
  36604. "type": "string",
  36605. "enum": ["worktree.failed"]
  36606. },
  36607. "properties": {
  36608. "type": "object",
  36609. "properties": {
  36610. "message": {
  36611. "type": "string"
  36612. }
  36613. },
  36614. "required": ["message"],
  36615. "additionalProperties": false
  36616. }
  36617. },
  36618. "required": ["id", "type", "properties"],
  36619. "additionalProperties": false
  36620. },
  36621. "EventServerConnected": {
  36622. "type": "object",
  36623. "properties": {
  36624. "id": {
  36625. "type": "string",
  36626. "pattern": "^evt_"
  36627. },
  36628. "type": {
  36629. "type": "string",
  36630. "enum": ["server.connected"]
  36631. },
  36632. "properties": {
  36633. "type": "object",
  36634. "properties": {}
  36635. }
  36636. },
  36637. "required": ["id", "type", "properties"],
  36638. "additionalProperties": false
  36639. },
  36640. "EventGlobalDisposed": {
  36641. "type": "object",
  36642. "properties": {
  36643. "id": {
  36644. "type": "string",
  36645. "pattern": "^evt_"
  36646. },
  36647. "type": {
  36648. "type": "string",
  36649. "enum": ["global.disposed"]
  36650. },
  36651. "properties": {
  36652. "type": "object",
  36653. "properties": {}
  36654. }
  36655. },
  36656. "required": ["id", "type", "properties"],
  36657. "additionalProperties": false
  36658. },
  36659. "CredentialOAuth": {
  36660. "type": "object",
  36661. "properties": {
  36662. "type": {
  36663. "type": "string",
  36664. "enum": ["oauth"]
  36665. },
  36666. "methodID": {
  36667. "type": "string"
  36668. },
  36669. "refresh": {
  36670. "type": "string"
  36671. },
  36672. "access": {
  36673. "type": "string"
  36674. },
  36675. "expires": {
  36676. "type": "integer",
  36677. "minimum": 0
  36678. },
  36679. "metadata": {
  36680. "type": "object"
  36681. }
  36682. },
  36683. "required": ["type", "methodID", "refresh", "access", "expires"],
  36684. "additionalProperties": false
  36685. },
  36686. "CredentialKey": {
  36687. "type": "object",
  36688. "properties": {
  36689. "type": {
  36690. "type": "string",
  36691. "enum": ["key"]
  36692. },
  36693. "key": {
  36694. "type": "string"
  36695. },
  36696. "metadata": {
  36697. "type": "object"
  36698. }
  36699. },
  36700. "required": ["type", "key"],
  36701. "additionalProperties": false
  36702. },
  36703. "SkillV2DirectorySource": {
  36704. "type": "object",
  36705. "properties": {
  36706. "type": {
  36707. "type": "string",
  36708. "enum": ["directory"]
  36709. },
  36710. "path": {
  36711. "type": "string"
  36712. }
  36713. },
  36714. "required": ["type", "path"],
  36715. "additionalProperties": false
  36716. },
  36717. "SkillV2UrlSource": {
  36718. "type": "object",
  36719. "properties": {
  36720. "type": {
  36721. "type": "string",
  36722. "enum": ["url"]
  36723. },
  36724. "url": {
  36725. "type": "string"
  36726. }
  36727. },
  36728. "required": ["type", "url"],
  36729. "additionalProperties": false
  36730. },
  36731. "SkillV2EmbeddedSource": {
  36732. "type": "object",
  36733. "properties": {
  36734. "type": {
  36735. "type": "string",
  36736. "enum": ["embedded"]
  36737. },
  36738. "skill": {
  36739. "$ref": "#/components/schemas/SkillV2Info"
  36740. }
  36741. },
  36742. "required": ["type", "skill"],
  36743. "additionalProperties": false
  36744. },
  36745. "BadRequestError": {
  36746. "type": "object",
  36747. "required": ["name", "data"],
  36748. "properties": {
  36749. "name": {
  36750. "type": "string",
  36751. "enum": ["BadRequest"]
  36752. },
  36753. "data": {
  36754. "type": "object",
  36755. "required": ["message"],
  36756. "properties": {
  36757. "message": {
  36758. "type": "string"
  36759. },
  36760. "kind": {
  36761. "type": "string",
  36762. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  36763. }
  36764. }
  36765. }
  36766. }
  36767. }
  36768. }
  36769. },
  36770. "security": [],
  36771. "tags": [
  36772. {
  36773. "name": "control",
  36774. "description": "Control plane routes."
  36775. },
  36776. {
  36777. "name": "controlPlane",
  36778. "description": "Control-plane orchestration routes."
  36779. },
  36780. {
  36781. "name": "global",
  36782. "description": "Global server routes."
  36783. },
  36784. {
  36785. "name": "event",
  36786. "description": "Instance event stream route."
  36787. },
  36788. {
  36789. "name": "config",
  36790. "description": "Experimental HttpApi config routes."
  36791. },
  36792. {
  36793. "name": "experimental",
  36794. "description": "Experimental HttpApi read-only routes."
  36795. },
  36796. {
  36797. "name": "file",
  36798. "description": "Experimental HttpApi file routes."
  36799. },
  36800. {
  36801. "name": "instance",
  36802. "description": "Experimental HttpApi instance read routes."
  36803. },
  36804. {
  36805. "name": "mcp",
  36806. "description": "Experimental HttpApi MCP routes."
  36807. },
  36808. {
  36809. "name": "project",
  36810. "description": "Experimental HttpApi project routes."
  36811. },
  36812. {
  36813. "name": "projectCopy",
  36814. "description": "Project copy naming routes."
  36815. },
  36816. {
  36817. "name": "pty",
  36818. "description": "Experimental HttpApi PTY routes."
  36819. },
  36820. {
  36821. "name": "question",
  36822. "description": "Question routes."
  36823. },
  36824. {
  36825. "name": "permission",
  36826. "description": "Experimental HttpApi permission routes."
  36827. },
  36828. {
  36829. "name": "provider",
  36830. "description": "Experimental HttpApi provider routes."
  36831. },
  36832. {
  36833. "name": "session",
  36834. "description": "Experimental HttpApi session routes."
  36835. },
  36836. {
  36837. "name": "sync",
  36838. "description": "Experimental HttpApi sync routes."
  36839. },
  36840. {
  36841. "name": "tui",
  36842. "description": "Experimental HttpApi TUI routes."
  36843. },
  36844. {
  36845. "name": "workspace",
  36846. "description": "Experimental HttpApi workspace routes."
  36847. },
  36848. {
  36849. "name": "opencode HttpApi",
  36850. "description": "Experimental HttpApi surface for selected instance routes."
  36851. },
  36852. {
  36853. "name": "opencode HttpApi",
  36854. "description": "Experimental HttpApi surface for selected instance routes."
  36855. },
  36856. {
  36857. "name": "opencode HttpApi",
  36858. "description": "Experimental HttpApi surface for selected instance routes."
  36859. },
  36860. {
  36861. "name": "sessions",
  36862. "description": "Experimental session routes."
  36863. },
  36864. {
  36865. "name": "messages",
  36866. "description": "Experimental message routes."
  36867. },
  36868. {
  36869. "name": "models",
  36870. "description": "Experimental model routes."
  36871. },
  36872. {
  36873. "name": "providers",
  36874. "description": "Experimental provider routes."
  36875. },
  36876. {
  36877. "name": "integrations",
  36878. "description": "Integration discovery and authentication routes."
  36879. },
  36880. {
  36881. "name": "opencode HttpApi",
  36882. "description": "Experimental HttpApi surface for selected instance routes."
  36883. },
  36884. {
  36885. "name": "permissions",
  36886. "description": "Experimental permission routes."
  36887. },
  36888. {
  36889. "name": "filesystem",
  36890. "description": "Experimental location-scoped filesystem routes."
  36891. },
  36892. {
  36893. "name": "commands",
  36894. "description": "Experimental command routes."
  36895. },
  36896. {
  36897. "name": "skills",
  36898. "description": "Experimental skill routes."
  36899. },
  36900. {
  36901. "name": "events",
  36902. "description": "Experimental event stream route."
  36903. },
  36904. {
  36905. "name": "pty",
  36906. "description": "Experimental location-scoped PTY routes."
  36907. },
  36908. {
  36909. "name": "session questions",
  36910. "description": "Experimental session question routes."
  36911. },
  36912. {
  36913. "name": "reference",
  36914. "description": "Location-scoped project references."
  36915. },
  36916. {
  36917. "name": "projectCopy",
  36918. "description": "Project copy management routes."
  36919. },
  36920. {
  36921. "name": "pty",
  36922. "description": "PTY websocket route."
  36923. }
  36924. ]
  36925. }