openapi.json 1.0 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932
  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. "iss": {
  3365. "type": "string"
  3366. }
  3367. },
  3368. "required": ["code"],
  3369. "additionalProperties": false
  3370. }
  3371. }
  3372. }
  3373. },
  3374. "x-codeSamples": [
  3375. {
  3376. "lang": "js",
  3377. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3378. }
  3379. ]
  3380. }
  3381. },
  3382. "/mcp/{name}/auth/authenticate": {
  3383. "post": {
  3384. "tags": ["mcp"],
  3385. "operationId": "mcp.auth.authenticate",
  3386. "parameters": [
  3387. {
  3388. "name": "name",
  3389. "in": "path",
  3390. "schema": {
  3391. "type": "string"
  3392. },
  3393. "required": true
  3394. },
  3395. {
  3396. "name": "directory",
  3397. "in": "query",
  3398. "schema": {
  3399. "type": "string"
  3400. },
  3401. "required": false
  3402. },
  3403. {
  3404. "name": "workspace",
  3405. "in": "query",
  3406. "schema": {
  3407. "type": "string"
  3408. },
  3409. "required": false
  3410. }
  3411. ],
  3412. "responses": {
  3413. "200": {
  3414. "description": "OAuth authentication completed",
  3415. "content": {
  3416. "application/json": {
  3417. "schema": {
  3418. "$ref": "#/components/schemas/MCPStatus"
  3419. }
  3420. }
  3421. }
  3422. },
  3423. "400": {
  3424. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3425. "content": {
  3426. "application/json": {
  3427. "schema": {
  3428. "anyOf": [
  3429. {
  3430. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3431. },
  3432. {
  3433. "$ref": "#/components/schemas/InvalidRequestError"
  3434. }
  3435. ]
  3436. }
  3437. }
  3438. }
  3439. },
  3440. "404": {
  3441. "description": "McpServerNotFoundError",
  3442. "content": {
  3443. "application/json": {
  3444. "schema": {
  3445. "$ref": "#/components/schemas/McpServerNotFoundError"
  3446. }
  3447. }
  3448. }
  3449. }
  3450. },
  3451. "description": "Start OAuth flow and wait for callback (opens browser).",
  3452. "summary": "Authenticate MCP OAuth",
  3453. "x-codeSamples": [
  3454. {
  3455. "lang": "js",
  3456. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3457. }
  3458. ]
  3459. }
  3460. },
  3461. "/mcp/{name}/connect": {
  3462. "post": {
  3463. "tags": ["mcp"],
  3464. "operationId": "mcp.connect",
  3465. "parameters": [
  3466. {
  3467. "name": "name",
  3468. "in": "path",
  3469. "schema": {
  3470. "type": "string"
  3471. },
  3472. "required": true
  3473. },
  3474. {
  3475. "name": "directory",
  3476. "in": "query",
  3477. "schema": {
  3478. "type": "string"
  3479. },
  3480. "required": false
  3481. },
  3482. {
  3483. "name": "workspace",
  3484. "in": "query",
  3485. "schema": {
  3486. "type": "string"
  3487. },
  3488. "required": false
  3489. }
  3490. ],
  3491. "responses": {
  3492. "200": {
  3493. "description": "MCP server connected successfully",
  3494. "content": {
  3495. "application/json": {
  3496. "schema": {
  3497. "type": "boolean",
  3498. "description": "MCP server connected successfully"
  3499. }
  3500. }
  3501. }
  3502. },
  3503. "400": {
  3504. "description": "Bad request",
  3505. "content": {
  3506. "application/json": {
  3507. "schema": {
  3508. "$ref": "#/components/schemas/BadRequestError"
  3509. }
  3510. }
  3511. }
  3512. },
  3513. "404": {
  3514. "description": "McpServerNotFoundError",
  3515. "content": {
  3516. "application/json": {
  3517. "schema": {
  3518. "$ref": "#/components/schemas/McpServerNotFoundError"
  3519. }
  3520. }
  3521. }
  3522. }
  3523. },
  3524. "description": "Connect an MCP server.",
  3525. "x-codeSamples": [
  3526. {
  3527. "lang": "js",
  3528. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3529. }
  3530. ]
  3531. }
  3532. },
  3533. "/mcp/{name}/disconnect": {
  3534. "post": {
  3535. "tags": ["mcp"],
  3536. "operationId": "mcp.disconnect",
  3537. "parameters": [
  3538. {
  3539. "name": "name",
  3540. "in": "path",
  3541. "schema": {
  3542. "type": "string"
  3543. },
  3544. "required": true
  3545. },
  3546. {
  3547. "name": "directory",
  3548. "in": "query",
  3549. "schema": {
  3550. "type": "string"
  3551. },
  3552. "required": false
  3553. },
  3554. {
  3555. "name": "workspace",
  3556. "in": "query",
  3557. "schema": {
  3558. "type": "string"
  3559. },
  3560. "required": false
  3561. }
  3562. ],
  3563. "responses": {
  3564. "200": {
  3565. "description": "MCP server disconnected successfully",
  3566. "content": {
  3567. "application/json": {
  3568. "schema": {
  3569. "type": "boolean",
  3570. "description": "MCP server disconnected successfully"
  3571. }
  3572. }
  3573. }
  3574. },
  3575. "400": {
  3576. "description": "Bad request",
  3577. "content": {
  3578. "application/json": {
  3579. "schema": {
  3580. "$ref": "#/components/schemas/BadRequestError"
  3581. }
  3582. }
  3583. }
  3584. },
  3585. "404": {
  3586. "description": "McpServerNotFoundError",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "$ref": "#/components/schemas/McpServerNotFoundError"
  3591. }
  3592. }
  3593. }
  3594. }
  3595. },
  3596. "description": "Disconnect an MCP server.",
  3597. "x-codeSamples": [
  3598. {
  3599. "lang": "js",
  3600. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3601. }
  3602. ]
  3603. }
  3604. },
  3605. "/project": {
  3606. "get": {
  3607. "tags": ["project"],
  3608. "operationId": "project.list",
  3609. "parameters": [
  3610. {
  3611. "name": "directory",
  3612. "in": "query",
  3613. "schema": {
  3614. "type": "string"
  3615. },
  3616. "required": false
  3617. },
  3618. {
  3619. "name": "workspace",
  3620. "in": "query",
  3621. "schema": {
  3622. "type": "string"
  3623. },
  3624. "required": false
  3625. }
  3626. ],
  3627. "responses": {
  3628. "200": {
  3629. "description": "List of projects",
  3630. "content": {
  3631. "application/json": {
  3632. "schema": {
  3633. "type": "array",
  3634. "items": {
  3635. "$ref": "#/components/schemas/Project"
  3636. },
  3637. "description": "List of projects"
  3638. }
  3639. }
  3640. }
  3641. },
  3642. "400": {
  3643. "description": "Bad request",
  3644. "content": {
  3645. "application/json": {
  3646. "schema": {
  3647. "$ref": "#/components/schemas/BadRequestError"
  3648. }
  3649. }
  3650. }
  3651. }
  3652. },
  3653. "description": "Get a list of projects that have been opened with OpenCode.",
  3654. "summary": "List all projects",
  3655. "x-codeSamples": [
  3656. {
  3657. "lang": "js",
  3658. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3659. }
  3660. ]
  3661. }
  3662. },
  3663. "/project/current": {
  3664. "get": {
  3665. "tags": ["project"],
  3666. "operationId": "project.current",
  3667. "parameters": [
  3668. {
  3669. "name": "directory",
  3670. "in": "query",
  3671. "schema": {
  3672. "type": "string"
  3673. },
  3674. "required": false
  3675. },
  3676. {
  3677. "name": "workspace",
  3678. "in": "query",
  3679. "schema": {
  3680. "type": "string"
  3681. },
  3682. "required": false
  3683. }
  3684. ],
  3685. "responses": {
  3686. "200": {
  3687. "description": "Current project information",
  3688. "content": {
  3689. "application/json": {
  3690. "schema": {
  3691. "$ref": "#/components/schemas/Project"
  3692. }
  3693. }
  3694. }
  3695. },
  3696. "400": {
  3697. "description": "Bad request",
  3698. "content": {
  3699. "application/json": {
  3700. "schema": {
  3701. "$ref": "#/components/schemas/BadRequestError"
  3702. }
  3703. }
  3704. }
  3705. }
  3706. },
  3707. "description": "Retrieve the currently active project that OpenCode is working with.",
  3708. "summary": "Get current project",
  3709. "x-codeSamples": [
  3710. {
  3711. "lang": "js",
  3712. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3713. }
  3714. ]
  3715. }
  3716. },
  3717. "/project/git/init": {
  3718. "post": {
  3719. "tags": ["project"],
  3720. "operationId": "project.initGit",
  3721. "parameters": [
  3722. {
  3723. "name": "directory",
  3724. "in": "query",
  3725. "schema": {
  3726. "type": "string"
  3727. },
  3728. "required": false
  3729. },
  3730. {
  3731. "name": "workspace",
  3732. "in": "query",
  3733. "schema": {
  3734. "type": "string"
  3735. },
  3736. "required": false
  3737. }
  3738. ],
  3739. "responses": {
  3740. "200": {
  3741. "description": "Project information after git initialization",
  3742. "content": {
  3743. "application/json": {
  3744. "schema": {
  3745. "$ref": "#/components/schemas/Project"
  3746. }
  3747. }
  3748. }
  3749. },
  3750. "400": {
  3751. "description": "Bad request",
  3752. "content": {
  3753. "application/json": {
  3754. "schema": {
  3755. "$ref": "#/components/schemas/BadRequestError"
  3756. }
  3757. }
  3758. }
  3759. }
  3760. },
  3761. "description": "Create a git repository for the current project and return the refreshed project info.",
  3762. "summary": "Initialize git repository",
  3763. "x-codeSamples": [
  3764. {
  3765. "lang": "js",
  3766. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3767. }
  3768. ]
  3769. }
  3770. },
  3771. "/project/{projectID}": {
  3772. "patch": {
  3773. "tags": ["project"],
  3774. "operationId": "project.update",
  3775. "parameters": [
  3776. {
  3777. "name": "projectID",
  3778. "in": "path",
  3779. "schema": {
  3780. "type": "string"
  3781. },
  3782. "required": true
  3783. },
  3784. {
  3785. "name": "directory",
  3786. "in": "query",
  3787. "schema": {
  3788. "type": "string"
  3789. },
  3790. "required": false
  3791. },
  3792. {
  3793. "name": "workspace",
  3794. "in": "query",
  3795. "schema": {
  3796. "type": "string"
  3797. },
  3798. "required": false
  3799. }
  3800. ],
  3801. "responses": {
  3802. "200": {
  3803. "description": "Updated project information",
  3804. "content": {
  3805. "application/json": {
  3806. "schema": {
  3807. "$ref": "#/components/schemas/Project"
  3808. }
  3809. }
  3810. }
  3811. },
  3812. "400": {
  3813. "description": "BadRequest | InvalidRequestError",
  3814. "content": {
  3815. "application/json": {
  3816. "schema": {
  3817. "anyOf": [
  3818. {
  3819. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3820. },
  3821. {
  3822. "$ref": "#/components/schemas/InvalidRequestError"
  3823. }
  3824. ]
  3825. }
  3826. }
  3827. }
  3828. },
  3829. "404": {
  3830. "description": "ProjectNotFoundError",
  3831. "content": {
  3832. "application/json": {
  3833. "schema": {
  3834. "$ref": "#/components/schemas/ProjectNotFoundError"
  3835. }
  3836. }
  3837. }
  3838. }
  3839. },
  3840. "description": "Update project properties such as name, icon, and commands.",
  3841. "summary": "Update project",
  3842. "requestBody": {
  3843. "content": {
  3844. "application/json": {
  3845. "schema": {
  3846. "type": "object",
  3847. "properties": {
  3848. "name": {
  3849. "type": "string"
  3850. },
  3851. "icon": {
  3852. "$ref": "#/components/schemas/ProjectIcon"
  3853. },
  3854. "commands": {
  3855. "$ref": "#/components/schemas/ProjectCommands"
  3856. }
  3857. },
  3858. "additionalProperties": false
  3859. }
  3860. }
  3861. }
  3862. },
  3863. "x-codeSamples": [
  3864. {
  3865. "lang": "js",
  3866. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3867. }
  3868. ]
  3869. }
  3870. },
  3871. "/project/{projectID}/directories": {
  3872. "get": {
  3873. "tags": ["project"],
  3874. "operationId": "project.directories",
  3875. "parameters": [
  3876. {
  3877. "name": "projectID",
  3878. "in": "path",
  3879. "schema": {
  3880. "type": "string"
  3881. },
  3882. "required": true
  3883. },
  3884. {
  3885. "name": "directory",
  3886. "in": "query",
  3887. "schema": {
  3888. "type": "string"
  3889. },
  3890. "required": false
  3891. },
  3892. {
  3893. "name": "workspace",
  3894. "in": "query",
  3895. "schema": {
  3896. "type": "string"
  3897. },
  3898. "required": false
  3899. }
  3900. ],
  3901. "responses": {
  3902. "200": {
  3903. "description": "Project directories",
  3904. "content": {
  3905. "application/json": {
  3906. "schema": {
  3907. "$ref": "#/components/schemas/ProjectDirectories"
  3908. }
  3909. }
  3910. }
  3911. },
  3912. "400": {
  3913. "description": "Bad request",
  3914. "content": {
  3915. "application/json": {
  3916. "schema": {
  3917. "$ref": "#/components/schemas/BadRequestError"
  3918. }
  3919. }
  3920. }
  3921. }
  3922. },
  3923. "description": "List known local absolute directories for a project.",
  3924. "summary": "List project directories",
  3925. "x-codeSamples": [
  3926. {
  3927. "lang": "js",
  3928. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3929. }
  3930. ]
  3931. }
  3932. },
  3933. "/experimental/project/{projectID}/copy/generate-name": {
  3934. "post": {
  3935. "tags": ["projectCopy"],
  3936. "operationId": "experimental.projectCopy.generateName",
  3937. "parameters": [
  3938. {
  3939. "name": "projectID",
  3940. "in": "path",
  3941. "schema": {
  3942. "type": "string"
  3943. },
  3944. "required": true
  3945. },
  3946. {
  3947. "name": "directory",
  3948. "in": "query",
  3949. "schema": {
  3950. "type": "string"
  3951. },
  3952. "required": false
  3953. },
  3954. {
  3955. "name": "workspace",
  3956. "in": "query",
  3957. "schema": {
  3958. "type": "string"
  3959. },
  3960. "required": false
  3961. }
  3962. ],
  3963. "responses": {
  3964. "200": {
  3965. "description": "Success",
  3966. "content": {
  3967. "application/json": {
  3968. "schema": {
  3969. "type": "object",
  3970. "properties": {
  3971. "name": {
  3972. "type": "string"
  3973. }
  3974. },
  3975. "required": ["name"],
  3976. "additionalProperties": false
  3977. }
  3978. }
  3979. }
  3980. },
  3981. "400": {
  3982. "description": "Bad request",
  3983. "content": {
  3984. "application/json": {
  3985. "schema": {
  3986. "$ref": "#/components/schemas/BadRequestError"
  3987. }
  3988. }
  3989. }
  3990. }
  3991. },
  3992. "description": "Generate a short name for a project copy from task context.",
  3993. "summary": "Generate project copy name",
  3994. "requestBody": {
  3995. "content": {
  3996. "application/json": {
  3997. "schema": {
  3998. "type": "object",
  3999. "properties": {
  4000. "context": {
  4001. "type": "string"
  4002. }
  4003. },
  4004. "additionalProperties": false
  4005. }
  4006. }
  4007. }
  4008. },
  4009. "x-codeSamples": [
  4010. {
  4011. "lang": "js",
  4012. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"
  4013. }
  4014. ]
  4015. }
  4016. },
  4017. "/pty/shells": {
  4018. "get": {
  4019. "tags": ["pty"],
  4020. "operationId": "pty.shells",
  4021. "parameters": [
  4022. {
  4023. "name": "directory",
  4024. "in": "query",
  4025. "schema": {
  4026. "type": "string"
  4027. },
  4028. "required": false
  4029. },
  4030. {
  4031. "name": "workspace",
  4032. "in": "query",
  4033. "schema": {
  4034. "type": "string"
  4035. },
  4036. "required": false
  4037. }
  4038. ],
  4039. "responses": {
  4040. "200": {
  4041. "description": "List of shells",
  4042. "content": {
  4043. "application/json": {
  4044. "schema": {
  4045. "type": "array",
  4046. "items": {
  4047. "type": "object",
  4048. "properties": {
  4049. "path": {
  4050. "type": "string"
  4051. },
  4052. "name": {
  4053. "type": "string"
  4054. },
  4055. "acceptable": {
  4056. "type": "boolean"
  4057. }
  4058. },
  4059. "required": ["path", "name", "acceptable"],
  4060. "additionalProperties": false
  4061. },
  4062. "description": "List of shells"
  4063. }
  4064. }
  4065. }
  4066. },
  4067. "400": {
  4068. "description": "Bad request",
  4069. "content": {
  4070. "application/json": {
  4071. "schema": {
  4072. "$ref": "#/components/schemas/BadRequestError"
  4073. }
  4074. }
  4075. }
  4076. }
  4077. },
  4078. "description": "Get a list of available shells on the system.",
  4079. "summary": "List available shells",
  4080. "x-codeSamples": [
  4081. {
  4082. "lang": "js",
  4083. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4084. }
  4085. ]
  4086. }
  4087. },
  4088. "/pty": {
  4089. "get": {
  4090. "tags": ["pty"],
  4091. "operationId": "pty.list",
  4092. "parameters": [
  4093. {
  4094. "name": "directory",
  4095. "in": "query",
  4096. "schema": {
  4097. "type": "string"
  4098. },
  4099. "required": false
  4100. },
  4101. {
  4102. "name": "workspace",
  4103. "in": "query",
  4104. "schema": {
  4105. "type": "string"
  4106. },
  4107. "required": false
  4108. }
  4109. ],
  4110. "responses": {
  4111. "200": {
  4112. "description": "List of sessions",
  4113. "content": {
  4114. "application/json": {
  4115. "schema": {
  4116. "type": "array",
  4117. "items": {
  4118. "$ref": "#/components/schemas/Pty"
  4119. },
  4120. "description": "List of sessions"
  4121. }
  4122. }
  4123. }
  4124. },
  4125. "400": {
  4126. "description": "Bad request",
  4127. "content": {
  4128. "application/json": {
  4129. "schema": {
  4130. "$ref": "#/components/schemas/BadRequestError"
  4131. }
  4132. }
  4133. }
  4134. }
  4135. },
  4136. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4137. "summary": "List PTY sessions",
  4138. "x-codeSamples": [
  4139. {
  4140. "lang": "js",
  4141. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4142. }
  4143. ]
  4144. },
  4145. "post": {
  4146. "tags": ["pty"],
  4147. "operationId": "pty.create",
  4148. "parameters": [
  4149. {
  4150. "name": "directory",
  4151. "in": "query",
  4152. "schema": {
  4153. "type": "string"
  4154. },
  4155. "required": false
  4156. },
  4157. {
  4158. "name": "workspace",
  4159. "in": "query",
  4160. "schema": {
  4161. "type": "string"
  4162. },
  4163. "required": false
  4164. }
  4165. ],
  4166. "responses": {
  4167. "200": {
  4168. "description": "Created session",
  4169. "content": {
  4170. "application/json": {
  4171. "schema": {
  4172. "$ref": "#/components/schemas/Pty"
  4173. }
  4174. }
  4175. }
  4176. },
  4177. "400": {
  4178. "description": "BadRequest | InvalidRequestError",
  4179. "content": {
  4180. "application/json": {
  4181. "schema": {
  4182. "anyOf": [
  4183. {
  4184. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4185. },
  4186. {
  4187. "$ref": "#/components/schemas/InvalidRequestError"
  4188. }
  4189. ]
  4190. }
  4191. }
  4192. }
  4193. }
  4194. },
  4195. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4196. "summary": "Create PTY session",
  4197. "requestBody": {
  4198. "content": {
  4199. "application/json": {
  4200. "schema": {
  4201. "type": "object",
  4202. "properties": {
  4203. "command": {
  4204. "type": "string"
  4205. },
  4206. "args": {
  4207. "type": "array",
  4208. "items": {
  4209. "type": "string"
  4210. }
  4211. },
  4212. "cwd": {
  4213. "type": "string"
  4214. },
  4215. "title": {
  4216. "type": "string"
  4217. },
  4218. "env": {
  4219. "type": "object",
  4220. "additionalProperties": {
  4221. "type": "string"
  4222. }
  4223. }
  4224. },
  4225. "additionalProperties": false
  4226. }
  4227. }
  4228. }
  4229. },
  4230. "x-codeSamples": [
  4231. {
  4232. "lang": "js",
  4233. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4234. }
  4235. ]
  4236. }
  4237. },
  4238. "/pty/{ptyID}": {
  4239. "get": {
  4240. "tags": ["pty"],
  4241. "operationId": "pty.get",
  4242. "parameters": [
  4243. {
  4244. "name": "ptyID",
  4245. "in": "path",
  4246. "schema": {
  4247. "type": "string",
  4248. "pattern": "^pty"
  4249. },
  4250. "required": true
  4251. },
  4252. {
  4253. "name": "directory",
  4254. "in": "query",
  4255. "schema": {
  4256. "type": "string"
  4257. },
  4258. "required": false
  4259. },
  4260. {
  4261. "name": "workspace",
  4262. "in": "query",
  4263. "schema": {
  4264. "type": "string"
  4265. },
  4266. "required": false
  4267. }
  4268. ],
  4269. "responses": {
  4270. "200": {
  4271. "description": "Session info",
  4272. "content": {
  4273. "application/json": {
  4274. "schema": {
  4275. "$ref": "#/components/schemas/Pty"
  4276. }
  4277. }
  4278. }
  4279. },
  4280. "400": {
  4281. "description": "Bad request",
  4282. "content": {
  4283. "application/json": {
  4284. "schema": {
  4285. "$ref": "#/components/schemas/BadRequestError"
  4286. }
  4287. }
  4288. }
  4289. },
  4290. "404": {
  4291. "description": "PtyNotFoundError",
  4292. "content": {
  4293. "application/json": {
  4294. "schema": {
  4295. "$ref": "#/components/schemas/PtyNotFoundError"
  4296. }
  4297. }
  4298. }
  4299. }
  4300. },
  4301. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4302. "summary": "Get PTY session",
  4303. "x-codeSamples": [
  4304. {
  4305. "lang": "js",
  4306. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4307. }
  4308. ]
  4309. },
  4310. "put": {
  4311. "tags": ["pty"],
  4312. "operationId": "pty.update",
  4313. "parameters": [
  4314. {
  4315. "name": "ptyID",
  4316. "in": "path",
  4317. "schema": {
  4318. "type": "string",
  4319. "pattern": "^pty"
  4320. },
  4321. "required": true
  4322. },
  4323. {
  4324. "name": "directory",
  4325. "in": "query",
  4326. "schema": {
  4327. "type": "string"
  4328. },
  4329. "required": false
  4330. },
  4331. {
  4332. "name": "workspace",
  4333. "in": "query",
  4334. "schema": {
  4335. "type": "string"
  4336. },
  4337. "required": false
  4338. }
  4339. ],
  4340. "responses": {
  4341. "200": {
  4342. "description": "Updated session",
  4343. "content": {
  4344. "application/json": {
  4345. "schema": {
  4346. "$ref": "#/components/schemas/Pty"
  4347. }
  4348. }
  4349. }
  4350. },
  4351. "400": {
  4352. "description": "BadRequest | InvalidRequestError",
  4353. "content": {
  4354. "application/json": {
  4355. "schema": {
  4356. "anyOf": [
  4357. {
  4358. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4359. },
  4360. {
  4361. "$ref": "#/components/schemas/InvalidRequestError"
  4362. }
  4363. ]
  4364. }
  4365. }
  4366. }
  4367. },
  4368. "404": {
  4369. "description": "PtyNotFoundError",
  4370. "content": {
  4371. "application/json": {
  4372. "schema": {
  4373. "$ref": "#/components/schemas/PtyNotFoundError"
  4374. }
  4375. }
  4376. }
  4377. }
  4378. },
  4379. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4380. "summary": "Update PTY session",
  4381. "requestBody": {
  4382. "content": {
  4383. "application/json": {
  4384. "schema": {
  4385. "type": "object",
  4386. "properties": {
  4387. "title": {
  4388. "type": "string"
  4389. },
  4390. "size": {
  4391. "type": "object",
  4392. "properties": {
  4393. "rows": {
  4394. "type": "integer",
  4395. "exclusiveMinimum": 0
  4396. },
  4397. "cols": {
  4398. "type": "integer",
  4399. "exclusiveMinimum": 0
  4400. }
  4401. },
  4402. "required": ["rows", "cols"],
  4403. "additionalProperties": false
  4404. }
  4405. },
  4406. "additionalProperties": false
  4407. }
  4408. }
  4409. }
  4410. },
  4411. "x-codeSamples": [
  4412. {
  4413. "lang": "js",
  4414. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4415. }
  4416. ]
  4417. },
  4418. "delete": {
  4419. "tags": ["pty"],
  4420. "operationId": "pty.remove",
  4421. "parameters": [
  4422. {
  4423. "name": "ptyID",
  4424. "in": "path",
  4425. "schema": {
  4426. "type": "string",
  4427. "pattern": "^pty"
  4428. },
  4429. "required": true
  4430. },
  4431. {
  4432. "name": "directory",
  4433. "in": "query",
  4434. "schema": {
  4435. "type": "string"
  4436. },
  4437. "required": false
  4438. },
  4439. {
  4440. "name": "workspace",
  4441. "in": "query",
  4442. "schema": {
  4443. "type": "string"
  4444. },
  4445. "required": false
  4446. }
  4447. ],
  4448. "responses": {
  4449. "200": {
  4450. "description": "Session removed",
  4451. "content": {
  4452. "application/json": {
  4453. "schema": {
  4454. "type": "boolean",
  4455. "description": "Session removed"
  4456. }
  4457. }
  4458. }
  4459. },
  4460. "400": {
  4461. "description": "Bad request",
  4462. "content": {
  4463. "application/json": {
  4464. "schema": {
  4465. "$ref": "#/components/schemas/BadRequestError"
  4466. }
  4467. }
  4468. }
  4469. },
  4470. "404": {
  4471. "description": "PtyNotFoundError",
  4472. "content": {
  4473. "application/json": {
  4474. "schema": {
  4475. "$ref": "#/components/schemas/PtyNotFoundError"
  4476. }
  4477. }
  4478. }
  4479. }
  4480. },
  4481. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4482. "summary": "Remove PTY session",
  4483. "x-codeSamples": [
  4484. {
  4485. "lang": "js",
  4486. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4487. }
  4488. ]
  4489. }
  4490. },
  4491. "/pty/{ptyID}/connect-token": {
  4492. "post": {
  4493. "tags": ["pty"],
  4494. "operationId": "pty.connectToken",
  4495. "parameters": [
  4496. {
  4497. "name": "ptyID",
  4498. "in": "path",
  4499. "schema": {
  4500. "type": "string",
  4501. "pattern": "^pty"
  4502. },
  4503. "required": true
  4504. },
  4505. {
  4506. "name": "directory",
  4507. "in": "query",
  4508. "schema": {
  4509. "type": "string"
  4510. },
  4511. "required": false
  4512. },
  4513. {
  4514. "name": "workspace",
  4515. "in": "query",
  4516. "schema": {
  4517. "type": "string"
  4518. },
  4519. "required": false
  4520. }
  4521. ],
  4522. "responses": {
  4523. "200": {
  4524. "description": "WebSocket connect token",
  4525. "content": {
  4526. "application/json": {
  4527. "schema": {
  4528. "$ref": "#/components/schemas/PtyTicketConnectToken"
  4529. }
  4530. }
  4531. }
  4532. },
  4533. "400": {
  4534. "description": "Bad request",
  4535. "content": {
  4536. "application/json": {
  4537. "schema": {
  4538. "$ref": "#/components/schemas/BadRequestError"
  4539. }
  4540. }
  4541. }
  4542. },
  4543. "403": {
  4544. "description": "PtyForbiddenError",
  4545. "content": {
  4546. "application/json": {
  4547. "schema": {
  4548. "$ref": "#/components/schemas/PtyForbiddenError"
  4549. }
  4550. }
  4551. }
  4552. },
  4553. "404": {
  4554. "description": "PtyNotFoundError",
  4555. "content": {
  4556. "application/json": {
  4557. "schema": {
  4558. "$ref": "#/components/schemas/PtyNotFoundError"
  4559. }
  4560. }
  4561. }
  4562. }
  4563. },
  4564. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4565. "summary": "Create PTY WebSocket token",
  4566. "x-codeSamples": [
  4567. {
  4568. "lang": "js",
  4569. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4570. }
  4571. ]
  4572. }
  4573. },
  4574. "/question": {
  4575. "get": {
  4576. "tags": ["question"],
  4577. "operationId": "question.list",
  4578. "parameters": [
  4579. {
  4580. "name": "directory",
  4581. "in": "query",
  4582. "schema": {
  4583. "type": "string"
  4584. },
  4585. "required": false
  4586. },
  4587. {
  4588. "name": "workspace",
  4589. "in": "query",
  4590. "schema": {
  4591. "type": "string"
  4592. },
  4593. "required": false
  4594. }
  4595. ],
  4596. "responses": {
  4597. "200": {
  4598. "description": "List of pending questions",
  4599. "content": {
  4600. "application/json": {
  4601. "schema": {
  4602. "type": "array",
  4603. "items": {
  4604. "$ref": "#/components/schemas/QuestionRequest"
  4605. },
  4606. "description": "List of pending questions"
  4607. }
  4608. }
  4609. }
  4610. },
  4611. "400": {
  4612. "description": "Bad request",
  4613. "content": {
  4614. "application/json": {
  4615. "schema": {
  4616. "$ref": "#/components/schemas/BadRequestError"
  4617. }
  4618. }
  4619. }
  4620. }
  4621. },
  4622. "description": "Get all pending question requests across all sessions.",
  4623. "summary": "List pending questions",
  4624. "x-codeSamples": [
  4625. {
  4626. "lang": "js",
  4627. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4628. }
  4629. ]
  4630. }
  4631. },
  4632. "/question/{requestID}/reply": {
  4633. "post": {
  4634. "tags": ["question"],
  4635. "operationId": "question.reply",
  4636. "parameters": [
  4637. {
  4638. "name": "requestID",
  4639. "in": "path",
  4640. "schema": {
  4641. "type": "string",
  4642. "pattern": "^que"
  4643. },
  4644. "required": true
  4645. },
  4646. {
  4647. "name": "directory",
  4648. "in": "query",
  4649. "schema": {
  4650. "type": "string"
  4651. },
  4652. "required": false
  4653. },
  4654. {
  4655. "name": "workspace",
  4656. "in": "query",
  4657. "schema": {
  4658. "type": "string"
  4659. },
  4660. "required": false
  4661. }
  4662. ],
  4663. "responses": {
  4664. "200": {
  4665. "description": "Question answered successfully",
  4666. "content": {
  4667. "application/json": {
  4668. "schema": {
  4669. "type": "boolean",
  4670. "description": "Question answered successfully"
  4671. }
  4672. }
  4673. }
  4674. },
  4675. "400": {
  4676. "description": "BadRequest | InvalidRequestError",
  4677. "content": {
  4678. "application/json": {
  4679. "schema": {
  4680. "anyOf": [
  4681. {
  4682. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4683. },
  4684. {
  4685. "$ref": "#/components/schemas/InvalidRequestError"
  4686. }
  4687. ]
  4688. }
  4689. }
  4690. }
  4691. },
  4692. "404": {
  4693. "description": "QuestionNotFoundError",
  4694. "content": {
  4695. "application/json": {
  4696. "schema": {
  4697. "$ref": "#/components/schemas/QuestionNotFoundError"
  4698. }
  4699. }
  4700. }
  4701. }
  4702. },
  4703. "description": "Provide answers to a question request from the AI assistant.",
  4704. "summary": "Reply to question request",
  4705. "requestBody": {
  4706. "content": {
  4707. "application/json": {
  4708. "schema": {
  4709. "type": "object",
  4710. "properties": {
  4711. "answers": {
  4712. "type": "array",
  4713. "items": {
  4714. "$ref": "#/components/schemas/QuestionAnswer"
  4715. },
  4716. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4717. }
  4718. },
  4719. "required": ["answers"],
  4720. "additionalProperties": false
  4721. }
  4722. }
  4723. }
  4724. },
  4725. "x-codeSamples": [
  4726. {
  4727. "lang": "js",
  4728. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4729. }
  4730. ]
  4731. }
  4732. },
  4733. "/question/{requestID}/reject": {
  4734. "post": {
  4735. "tags": ["question"],
  4736. "operationId": "question.reject",
  4737. "parameters": [
  4738. {
  4739. "name": "requestID",
  4740. "in": "path",
  4741. "schema": {
  4742. "type": "string",
  4743. "pattern": "^que"
  4744. },
  4745. "required": true
  4746. },
  4747. {
  4748. "name": "directory",
  4749. "in": "query",
  4750. "schema": {
  4751. "type": "string"
  4752. },
  4753. "required": false
  4754. },
  4755. {
  4756. "name": "workspace",
  4757. "in": "query",
  4758. "schema": {
  4759. "type": "string"
  4760. },
  4761. "required": false
  4762. }
  4763. ],
  4764. "responses": {
  4765. "200": {
  4766. "description": "Question rejected successfully",
  4767. "content": {
  4768. "application/json": {
  4769. "schema": {
  4770. "type": "boolean",
  4771. "description": "Question rejected successfully"
  4772. }
  4773. }
  4774. }
  4775. },
  4776. "400": {
  4777. "description": "BadRequest | InvalidRequestError",
  4778. "content": {
  4779. "application/json": {
  4780. "schema": {
  4781. "anyOf": [
  4782. {
  4783. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4784. },
  4785. {
  4786. "$ref": "#/components/schemas/InvalidRequestError"
  4787. }
  4788. ]
  4789. }
  4790. }
  4791. }
  4792. },
  4793. "404": {
  4794. "description": "QuestionNotFoundError",
  4795. "content": {
  4796. "application/json": {
  4797. "schema": {
  4798. "$ref": "#/components/schemas/QuestionNotFoundError"
  4799. }
  4800. }
  4801. }
  4802. }
  4803. },
  4804. "description": "Reject a question request from the AI assistant.",
  4805. "summary": "Reject question request",
  4806. "x-codeSamples": [
  4807. {
  4808. "lang": "js",
  4809. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4810. }
  4811. ]
  4812. }
  4813. },
  4814. "/permission": {
  4815. "get": {
  4816. "tags": ["permission"],
  4817. "operationId": "permission.list",
  4818. "parameters": [
  4819. {
  4820. "name": "directory",
  4821. "in": "query",
  4822. "schema": {
  4823. "type": "string"
  4824. },
  4825. "required": false
  4826. },
  4827. {
  4828. "name": "workspace",
  4829. "in": "query",
  4830. "schema": {
  4831. "type": "string"
  4832. },
  4833. "required": false
  4834. }
  4835. ],
  4836. "responses": {
  4837. "200": {
  4838. "description": "List of pending permissions",
  4839. "content": {
  4840. "application/json": {
  4841. "schema": {
  4842. "type": "array",
  4843. "items": {
  4844. "$ref": "#/components/schemas/PermissionRequest"
  4845. },
  4846. "description": "List of pending permissions"
  4847. }
  4848. }
  4849. }
  4850. },
  4851. "400": {
  4852. "description": "Bad request",
  4853. "content": {
  4854. "application/json": {
  4855. "schema": {
  4856. "$ref": "#/components/schemas/BadRequestError"
  4857. }
  4858. }
  4859. }
  4860. }
  4861. },
  4862. "description": "Get all pending permission requests across all sessions.",
  4863. "summary": "List pending permissions",
  4864. "x-codeSamples": [
  4865. {
  4866. "lang": "js",
  4867. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4868. }
  4869. ]
  4870. }
  4871. },
  4872. "/permission/{requestID}/reply": {
  4873. "post": {
  4874. "tags": ["permission"],
  4875. "operationId": "permission.reply",
  4876. "parameters": [
  4877. {
  4878. "name": "requestID",
  4879. "in": "path",
  4880. "schema": {
  4881. "type": "string",
  4882. "pattern": "^per"
  4883. },
  4884. "required": true
  4885. },
  4886. {
  4887. "name": "directory",
  4888. "in": "query",
  4889. "schema": {
  4890. "type": "string"
  4891. },
  4892. "required": false
  4893. },
  4894. {
  4895. "name": "workspace",
  4896. "in": "query",
  4897. "schema": {
  4898. "type": "string"
  4899. },
  4900. "required": false
  4901. }
  4902. ],
  4903. "responses": {
  4904. "200": {
  4905. "description": "Permission processed successfully",
  4906. "content": {
  4907. "application/json": {
  4908. "schema": {
  4909. "type": "boolean",
  4910. "description": "Permission processed successfully"
  4911. }
  4912. }
  4913. }
  4914. },
  4915. "400": {
  4916. "description": "BadRequest | InvalidRequestError",
  4917. "content": {
  4918. "application/json": {
  4919. "schema": {
  4920. "anyOf": [
  4921. {
  4922. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4923. },
  4924. {
  4925. "$ref": "#/components/schemas/InvalidRequestError"
  4926. }
  4927. ]
  4928. }
  4929. }
  4930. }
  4931. },
  4932. "404": {
  4933. "description": "PermissionNotFoundError",
  4934. "content": {
  4935. "application/json": {
  4936. "schema": {
  4937. "$ref": "#/components/schemas/PermissionNotFoundError"
  4938. }
  4939. }
  4940. }
  4941. }
  4942. },
  4943. "description": "Approve or deny a permission request from the AI assistant.",
  4944. "summary": "Respond to permission request",
  4945. "requestBody": {
  4946. "content": {
  4947. "application/json": {
  4948. "schema": {
  4949. "type": "object",
  4950. "properties": {
  4951. "reply": {
  4952. "type": "string",
  4953. "enum": ["once", "always", "reject"]
  4954. },
  4955. "message": {
  4956. "type": "string"
  4957. }
  4958. },
  4959. "required": ["reply"],
  4960. "additionalProperties": false
  4961. }
  4962. }
  4963. }
  4964. },
  4965. "x-codeSamples": [
  4966. {
  4967. "lang": "js",
  4968. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4969. }
  4970. ]
  4971. }
  4972. },
  4973. "/provider": {
  4974. "get": {
  4975. "tags": ["provider"],
  4976. "operationId": "provider.list",
  4977. "parameters": [
  4978. {
  4979. "name": "directory",
  4980. "in": "query",
  4981. "schema": {
  4982. "type": "string"
  4983. },
  4984. "required": false
  4985. },
  4986. {
  4987. "name": "workspace",
  4988. "in": "query",
  4989. "schema": {
  4990. "type": "string"
  4991. },
  4992. "required": false
  4993. }
  4994. ],
  4995. "responses": {
  4996. "200": {
  4997. "description": "List of providers",
  4998. "content": {
  4999. "application/json": {
  5000. "schema": {
  5001. "type": "object",
  5002. "properties": {
  5003. "all": {
  5004. "type": "array",
  5005. "items": {
  5006. "$ref": "#/components/schemas/Provider"
  5007. }
  5008. },
  5009. "default": {
  5010. "type": "object",
  5011. "additionalProperties": {
  5012. "type": "string"
  5013. }
  5014. },
  5015. "connected": {
  5016. "type": "array",
  5017. "items": {
  5018. "type": "string"
  5019. }
  5020. }
  5021. },
  5022. "required": ["all", "default", "connected"],
  5023. "additionalProperties": false,
  5024. "description": "List of providers"
  5025. }
  5026. }
  5027. }
  5028. },
  5029. "400": {
  5030. "description": "Bad request",
  5031. "content": {
  5032. "application/json": {
  5033. "schema": {
  5034. "$ref": "#/components/schemas/BadRequestError"
  5035. }
  5036. }
  5037. }
  5038. }
  5039. },
  5040. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5041. "summary": "List providers",
  5042. "x-codeSamples": [
  5043. {
  5044. "lang": "js",
  5045. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5046. }
  5047. ]
  5048. }
  5049. },
  5050. "/provider/auth": {
  5051. "get": {
  5052. "tags": ["provider"],
  5053. "operationId": "provider.auth",
  5054. "parameters": [
  5055. {
  5056. "name": "directory",
  5057. "in": "query",
  5058. "schema": {
  5059. "type": "string"
  5060. },
  5061. "required": false
  5062. },
  5063. {
  5064. "name": "workspace",
  5065. "in": "query",
  5066. "schema": {
  5067. "type": "string"
  5068. },
  5069. "required": false
  5070. }
  5071. ],
  5072. "responses": {
  5073. "200": {
  5074. "description": "Provider auth methods",
  5075. "content": {
  5076. "application/json": {
  5077. "schema": {
  5078. "type": "object",
  5079. "additionalProperties": {
  5080. "type": "array",
  5081. "items": {
  5082. "$ref": "#/components/schemas/ProviderAuthMethod"
  5083. }
  5084. },
  5085. "description": "Provider auth methods"
  5086. }
  5087. }
  5088. }
  5089. },
  5090. "400": {
  5091. "description": "Bad request",
  5092. "content": {
  5093. "application/json": {
  5094. "schema": {
  5095. "$ref": "#/components/schemas/BadRequestError"
  5096. }
  5097. }
  5098. }
  5099. }
  5100. },
  5101. "description": "Retrieve available authentication methods for all AI providers.",
  5102. "summary": "Get provider auth methods",
  5103. "x-codeSamples": [
  5104. {
  5105. "lang": "js",
  5106. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5107. }
  5108. ]
  5109. }
  5110. },
  5111. "/provider/{providerID}/oauth/authorize": {
  5112. "post": {
  5113. "tags": ["provider"],
  5114. "operationId": "provider.oauth.authorize",
  5115. "parameters": [
  5116. {
  5117. "name": "providerID",
  5118. "in": "path",
  5119. "schema": {
  5120. "type": "string"
  5121. },
  5122. "required": true
  5123. },
  5124. {
  5125. "name": "directory",
  5126. "in": "query",
  5127. "schema": {
  5128. "type": "string"
  5129. },
  5130. "required": false
  5131. },
  5132. {
  5133. "name": "workspace",
  5134. "in": "query",
  5135. "schema": {
  5136. "type": "string"
  5137. },
  5138. "required": false
  5139. }
  5140. ],
  5141. "responses": {
  5142. "200": {
  5143. "description": "Authorization URL and method",
  5144. "content": {
  5145. "application/json": {
  5146. "schema": {
  5147. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5148. }
  5149. }
  5150. }
  5151. },
  5152. "400": {
  5153. "description": "ProviderAuthError | InvalidRequestError",
  5154. "content": {
  5155. "application/json": {
  5156. "schema": {
  5157. "anyOf": [
  5158. {
  5159. "$ref": "#/components/schemas/ProviderAuthError1"
  5160. },
  5161. {
  5162. "$ref": "#/components/schemas/InvalidRequestError"
  5163. }
  5164. ]
  5165. }
  5166. }
  5167. }
  5168. }
  5169. },
  5170. "description": "Start the OAuth authorization flow for a provider.",
  5171. "summary": "Start OAuth authorization",
  5172. "requestBody": {
  5173. "content": {
  5174. "application/json": {
  5175. "schema": {
  5176. "type": "object",
  5177. "properties": {
  5178. "method": {
  5179. "type": "number",
  5180. "description": "Auth method index"
  5181. },
  5182. "inputs": {
  5183. "type": "object",
  5184. "additionalProperties": {
  5185. "type": "string"
  5186. }
  5187. }
  5188. },
  5189. "required": ["method"],
  5190. "additionalProperties": false
  5191. }
  5192. }
  5193. }
  5194. },
  5195. "x-codeSamples": [
  5196. {
  5197. "lang": "js",
  5198. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5199. }
  5200. ]
  5201. }
  5202. },
  5203. "/provider/{providerID}/oauth/callback": {
  5204. "post": {
  5205. "tags": ["provider"],
  5206. "operationId": "provider.oauth.callback",
  5207. "parameters": [
  5208. {
  5209. "name": "providerID",
  5210. "in": "path",
  5211. "schema": {
  5212. "type": "string"
  5213. },
  5214. "required": true
  5215. },
  5216. {
  5217. "name": "directory",
  5218. "in": "query",
  5219. "schema": {
  5220. "type": "string"
  5221. },
  5222. "required": false
  5223. },
  5224. {
  5225. "name": "workspace",
  5226. "in": "query",
  5227. "schema": {
  5228. "type": "string"
  5229. },
  5230. "required": false
  5231. }
  5232. ],
  5233. "responses": {
  5234. "200": {
  5235. "description": "OAuth callback processed successfully",
  5236. "content": {
  5237. "application/json": {
  5238. "schema": {
  5239. "type": "boolean",
  5240. "description": "OAuth callback processed successfully"
  5241. }
  5242. }
  5243. }
  5244. },
  5245. "400": {
  5246. "description": "ProviderAuthError | InvalidRequestError",
  5247. "content": {
  5248. "application/json": {
  5249. "schema": {
  5250. "anyOf": [
  5251. {
  5252. "$ref": "#/components/schemas/ProviderAuthError1"
  5253. },
  5254. {
  5255. "$ref": "#/components/schemas/InvalidRequestError"
  5256. }
  5257. ]
  5258. }
  5259. }
  5260. }
  5261. }
  5262. },
  5263. "description": "Handle the OAuth callback from a provider after user authorization.",
  5264. "summary": "Handle OAuth callback",
  5265. "requestBody": {
  5266. "content": {
  5267. "application/json": {
  5268. "schema": {
  5269. "type": "object",
  5270. "properties": {
  5271. "method": {
  5272. "type": "number",
  5273. "description": "Auth method index"
  5274. },
  5275. "code": {
  5276. "type": "string"
  5277. }
  5278. },
  5279. "required": ["method"],
  5280. "additionalProperties": false
  5281. }
  5282. }
  5283. }
  5284. },
  5285. "x-codeSamples": [
  5286. {
  5287. "lang": "js",
  5288. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5289. }
  5290. ]
  5291. }
  5292. },
  5293. "/session": {
  5294. "get": {
  5295. "tags": ["session"],
  5296. "operationId": "session.list",
  5297. "parameters": [
  5298. {
  5299. "name": "directory",
  5300. "in": "query",
  5301. "schema": {
  5302. "type": "string"
  5303. },
  5304. "required": false
  5305. },
  5306. {
  5307. "name": "workspace",
  5308. "in": "query",
  5309. "schema": {
  5310. "type": "string"
  5311. },
  5312. "required": false
  5313. },
  5314. {
  5315. "name": "scope",
  5316. "in": "query",
  5317. "schema": {
  5318. "type": "string",
  5319. "enum": ["project"]
  5320. },
  5321. "required": false
  5322. },
  5323. {
  5324. "name": "path",
  5325. "in": "query",
  5326. "schema": {
  5327. "type": "string"
  5328. },
  5329. "required": false
  5330. },
  5331. {
  5332. "name": "roots",
  5333. "in": "query",
  5334. "schema": {
  5335. "anyOf": [
  5336. {
  5337. "type": "boolean"
  5338. },
  5339. {
  5340. "type": "string",
  5341. "enum": ["true", "false"]
  5342. }
  5343. ]
  5344. },
  5345. "required": false
  5346. },
  5347. {
  5348. "name": "start",
  5349. "in": "query",
  5350. "schema": {
  5351. "type": "number"
  5352. },
  5353. "required": false
  5354. },
  5355. {
  5356. "name": "search",
  5357. "in": "query",
  5358. "schema": {
  5359. "type": "string"
  5360. },
  5361. "required": false
  5362. },
  5363. {
  5364. "name": "limit",
  5365. "in": "query",
  5366. "schema": {
  5367. "type": "number"
  5368. },
  5369. "required": false
  5370. }
  5371. ],
  5372. "responses": {
  5373. "200": {
  5374. "description": "List of sessions",
  5375. "content": {
  5376. "application/json": {
  5377. "schema": {
  5378. "type": "array",
  5379. "items": {
  5380. "$ref": "#/components/schemas/Session"
  5381. },
  5382. "description": "List of sessions"
  5383. }
  5384. }
  5385. }
  5386. },
  5387. "400": {
  5388. "description": "Bad request",
  5389. "content": {
  5390. "application/json": {
  5391. "schema": {
  5392. "$ref": "#/components/schemas/BadRequestError"
  5393. }
  5394. }
  5395. }
  5396. }
  5397. },
  5398. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5399. "summary": "List sessions",
  5400. "x-codeSamples": [
  5401. {
  5402. "lang": "js",
  5403. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5404. }
  5405. ]
  5406. },
  5407. "post": {
  5408. "tags": ["session"],
  5409. "operationId": "session.create",
  5410. "parameters": [
  5411. {
  5412. "name": "directory",
  5413. "in": "query",
  5414. "schema": {
  5415. "type": "string"
  5416. },
  5417. "required": false
  5418. },
  5419. {
  5420. "name": "workspace",
  5421. "in": "query",
  5422. "schema": {
  5423. "type": "string"
  5424. },
  5425. "required": false
  5426. }
  5427. ],
  5428. "responses": {
  5429. "200": {
  5430. "description": "Successfully created session",
  5431. "content": {
  5432. "application/json": {
  5433. "schema": {
  5434. "$ref": "#/components/schemas/Session"
  5435. }
  5436. }
  5437. }
  5438. },
  5439. "400": {
  5440. "description": "BadRequest | InvalidRequestError",
  5441. "content": {
  5442. "application/json": {
  5443. "schema": {
  5444. "anyOf": [
  5445. {
  5446. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5447. },
  5448. {
  5449. "$ref": "#/components/schemas/InvalidRequestError"
  5450. }
  5451. ]
  5452. }
  5453. }
  5454. }
  5455. }
  5456. },
  5457. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5458. "summary": "Create session",
  5459. "requestBody": {
  5460. "content": {
  5461. "application/json": {
  5462. "schema": {
  5463. "type": "object",
  5464. "properties": {
  5465. "parentID": {
  5466. "type": "string",
  5467. "pattern": "^ses"
  5468. },
  5469. "title": {
  5470. "type": "string"
  5471. },
  5472. "agent": {
  5473. "type": "string"
  5474. },
  5475. "model": {
  5476. "type": "object",
  5477. "properties": {
  5478. "id": {
  5479. "type": "string"
  5480. },
  5481. "providerID": {
  5482. "type": "string"
  5483. },
  5484. "variant": {
  5485. "type": "string"
  5486. }
  5487. },
  5488. "required": ["id", "providerID"],
  5489. "additionalProperties": false
  5490. },
  5491. "metadata": {
  5492. "type": "object"
  5493. },
  5494. "permission": {
  5495. "$ref": "#/components/schemas/PermissionRuleset"
  5496. },
  5497. "workspaceID": {
  5498. "type": "string",
  5499. "pattern": "^wrk"
  5500. }
  5501. },
  5502. "additionalProperties": false
  5503. }
  5504. }
  5505. }
  5506. },
  5507. "x-codeSamples": [
  5508. {
  5509. "lang": "js",
  5510. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5511. }
  5512. ]
  5513. }
  5514. },
  5515. "/session/status": {
  5516. "get": {
  5517. "tags": ["session"],
  5518. "operationId": "session.status",
  5519. "parameters": [
  5520. {
  5521. "name": "directory",
  5522. "in": "query",
  5523. "schema": {
  5524. "type": "string"
  5525. },
  5526. "required": false
  5527. },
  5528. {
  5529. "name": "workspace",
  5530. "in": "query",
  5531. "schema": {
  5532. "type": "string"
  5533. },
  5534. "required": false
  5535. }
  5536. ],
  5537. "responses": {
  5538. "200": {
  5539. "description": "Get session status",
  5540. "content": {
  5541. "application/json": {
  5542. "schema": {
  5543. "type": "object",
  5544. "additionalProperties": {
  5545. "$ref": "#/components/schemas/SessionStatus"
  5546. },
  5547. "description": "Get session status"
  5548. }
  5549. }
  5550. }
  5551. },
  5552. "400": {
  5553. "description": "BadRequest | InvalidRequestError",
  5554. "content": {
  5555. "application/json": {
  5556. "schema": {
  5557. "anyOf": [
  5558. {
  5559. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5560. },
  5561. {
  5562. "$ref": "#/components/schemas/InvalidRequestError"
  5563. }
  5564. ]
  5565. }
  5566. }
  5567. }
  5568. }
  5569. },
  5570. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5571. "summary": "Get session status",
  5572. "x-codeSamples": [
  5573. {
  5574. "lang": "js",
  5575. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5576. }
  5577. ]
  5578. }
  5579. },
  5580. "/session/{sessionID}": {
  5581. "get": {
  5582. "tags": ["session"],
  5583. "operationId": "session.get",
  5584. "parameters": [
  5585. {
  5586. "name": "sessionID",
  5587. "in": "path",
  5588. "schema": {
  5589. "type": "string",
  5590. "pattern": "^ses"
  5591. },
  5592. "required": true
  5593. },
  5594. {
  5595. "name": "directory",
  5596. "in": "query",
  5597. "schema": {
  5598. "type": "string"
  5599. },
  5600. "required": false
  5601. },
  5602. {
  5603. "name": "workspace",
  5604. "in": "query",
  5605. "schema": {
  5606. "type": "string"
  5607. },
  5608. "required": false
  5609. }
  5610. ],
  5611. "responses": {
  5612. "200": {
  5613. "description": "Get session",
  5614. "content": {
  5615. "application/json": {
  5616. "schema": {
  5617. "$ref": "#/components/schemas/Session"
  5618. }
  5619. }
  5620. }
  5621. },
  5622. "400": {
  5623. "description": "BadRequest | InvalidRequestError",
  5624. "content": {
  5625. "application/json": {
  5626. "schema": {
  5627. "anyOf": [
  5628. {
  5629. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5630. },
  5631. {
  5632. "$ref": "#/components/schemas/InvalidRequestError"
  5633. }
  5634. ]
  5635. }
  5636. }
  5637. }
  5638. },
  5639. "404": {
  5640. "description": "NotFoundError",
  5641. "content": {
  5642. "application/json": {
  5643. "schema": {
  5644. "$ref": "#/components/schemas/NotFoundError"
  5645. }
  5646. }
  5647. }
  5648. }
  5649. },
  5650. "description": "Retrieve detailed information about a specific OpenCode session.",
  5651. "summary": "Get session",
  5652. "x-codeSamples": [
  5653. {
  5654. "lang": "js",
  5655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5656. }
  5657. ]
  5658. },
  5659. "delete": {
  5660. "tags": ["session"],
  5661. "operationId": "session.delete",
  5662. "parameters": [
  5663. {
  5664. "name": "sessionID",
  5665. "in": "path",
  5666. "schema": {
  5667. "type": "string",
  5668. "pattern": "^ses"
  5669. },
  5670. "required": true
  5671. },
  5672. {
  5673. "name": "directory",
  5674. "in": "query",
  5675. "schema": {
  5676. "type": "string"
  5677. },
  5678. "required": false
  5679. },
  5680. {
  5681. "name": "workspace",
  5682. "in": "query",
  5683. "schema": {
  5684. "type": "string"
  5685. },
  5686. "required": false
  5687. }
  5688. ],
  5689. "responses": {
  5690. "200": {
  5691. "description": "Successfully deleted session",
  5692. "content": {
  5693. "application/json": {
  5694. "schema": {
  5695. "type": "boolean",
  5696. "description": "Successfully deleted session"
  5697. }
  5698. }
  5699. }
  5700. },
  5701. "400": {
  5702. "description": "BadRequest | InvalidRequestError",
  5703. "content": {
  5704. "application/json": {
  5705. "schema": {
  5706. "anyOf": [
  5707. {
  5708. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5709. },
  5710. {
  5711. "$ref": "#/components/schemas/InvalidRequestError"
  5712. }
  5713. ]
  5714. }
  5715. }
  5716. }
  5717. },
  5718. "404": {
  5719. "description": "NotFoundError",
  5720. "content": {
  5721. "application/json": {
  5722. "schema": {
  5723. "$ref": "#/components/schemas/NotFoundError"
  5724. }
  5725. }
  5726. }
  5727. }
  5728. },
  5729. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5730. "summary": "Delete session",
  5731. "x-codeSamples": [
  5732. {
  5733. "lang": "js",
  5734. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5735. }
  5736. ]
  5737. },
  5738. "patch": {
  5739. "tags": ["session"],
  5740. "operationId": "session.update",
  5741. "parameters": [
  5742. {
  5743. "name": "sessionID",
  5744. "in": "path",
  5745. "schema": {
  5746. "type": "string",
  5747. "pattern": "^ses"
  5748. },
  5749. "required": true
  5750. },
  5751. {
  5752. "name": "directory",
  5753. "in": "query",
  5754. "schema": {
  5755. "type": "string"
  5756. },
  5757. "required": false
  5758. },
  5759. {
  5760. "name": "workspace",
  5761. "in": "query",
  5762. "schema": {
  5763. "type": "string"
  5764. },
  5765. "required": false
  5766. }
  5767. ],
  5768. "responses": {
  5769. "200": {
  5770. "description": "Successfully updated session",
  5771. "content": {
  5772. "application/json": {
  5773. "schema": {
  5774. "$ref": "#/components/schemas/Session"
  5775. }
  5776. }
  5777. }
  5778. },
  5779. "400": {
  5780. "description": "BadRequest | InvalidRequestError",
  5781. "content": {
  5782. "application/json": {
  5783. "schema": {
  5784. "anyOf": [
  5785. {
  5786. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5787. },
  5788. {
  5789. "$ref": "#/components/schemas/InvalidRequestError"
  5790. }
  5791. ]
  5792. }
  5793. }
  5794. }
  5795. },
  5796. "404": {
  5797. "description": "NotFoundError",
  5798. "content": {
  5799. "application/json": {
  5800. "schema": {
  5801. "$ref": "#/components/schemas/NotFoundError"
  5802. }
  5803. }
  5804. }
  5805. }
  5806. },
  5807. "description": "Update properties of an existing session, such as title or other metadata.",
  5808. "summary": "Update session",
  5809. "requestBody": {
  5810. "content": {
  5811. "application/json": {
  5812. "schema": {
  5813. "type": "object",
  5814. "properties": {
  5815. "title": {
  5816. "type": "string"
  5817. },
  5818. "metadata": {
  5819. "type": "object"
  5820. },
  5821. "permission": {
  5822. "$ref": "#/components/schemas/PermissionRuleset"
  5823. },
  5824. "time": {
  5825. "type": "object",
  5826. "properties": {
  5827. "archived": {
  5828. "type": "number"
  5829. }
  5830. },
  5831. "additionalProperties": false
  5832. }
  5833. },
  5834. "additionalProperties": false
  5835. }
  5836. }
  5837. }
  5838. },
  5839. "x-codeSamples": [
  5840. {
  5841. "lang": "js",
  5842. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5843. }
  5844. ]
  5845. }
  5846. },
  5847. "/session/{sessionID}/children": {
  5848. "get": {
  5849. "tags": ["session"],
  5850. "operationId": "session.children",
  5851. "parameters": [
  5852. {
  5853. "name": "sessionID",
  5854. "in": "path",
  5855. "schema": {
  5856. "type": "string",
  5857. "pattern": "^ses"
  5858. },
  5859. "required": true
  5860. },
  5861. {
  5862. "name": "directory",
  5863. "in": "query",
  5864. "schema": {
  5865. "type": "string"
  5866. },
  5867. "required": false
  5868. },
  5869. {
  5870. "name": "workspace",
  5871. "in": "query",
  5872. "schema": {
  5873. "type": "string"
  5874. },
  5875. "required": false
  5876. }
  5877. ],
  5878. "responses": {
  5879. "200": {
  5880. "description": "List of children",
  5881. "content": {
  5882. "application/json": {
  5883. "schema": {
  5884. "type": "array",
  5885. "items": {
  5886. "$ref": "#/components/schemas/Session"
  5887. },
  5888. "description": "List of children"
  5889. }
  5890. }
  5891. }
  5892. },
  5893. "400": {
  5894. "description": "BadRequest | InvalidRequestError",
  5895. "content": {
  5896. "application/json": {
  5897. "schema": {
  5898. "anyOf": [
  5899. {
  5900. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5901. },
  5902. {
  5903. "$ref": "#/components/schemas/InvalidRequestError"
  5904. }
  5905. ]
  5906. }
  5907. }
  5908. }
  5909. },
  5910. "404": {
  5911. "description": "NotFoundError",
  5912. "content": {
  5913. "application/json": {
  5914. "schema": {
  5915. "$ref": "#/components/schemas/NotFoundError"
  5916. }
  5917. }
  5918. }
  5919. }
  5920. },
  5921. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5922. "summary": "Get session children",
  5923. "x-codeSamples": [
  5924. {
  5925. "lang": "js",
  5926. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5927. }
  5928. ]
  5929. }
  5930. },
  5931. "/session/{sessionID}/todo": {
  5932. "get": {
  5933. "tags": ["session"],
  5934. "operationId": "session.todo",
  5935. "parameters": [
  5936. {
  5937. "name": "sessionID",
  5938. "in": "path",
  5939. "schema": {
  5940. "type": "string",
  5941. "pattern": "^ses"
  5942. },
  5943. "required": true
  5944. },
  5945. {
  5946. "name": "directory",
  5947. "in": "query",
  5948. "schema": {
  5949. "type": "string"
  5950. },
  5951. "required": false
  5952. },
  5953. {
  5954. "name": "workspace",
  5955. "in": "query",
  5956. "schema": {
  5957. "type": "string"
  5958. },
  5959. "required": false
  5960. }
  5961. ],
  5962. "responses": {
  5963. "200": {
  5964. "description": "Todo list",
  5965. "content": {
  5966. "application/json": {
  5967. "schema": {
  5968. "type": "array",
  5969. "items": {
  5970. "$ref": "#/components/schemas/Todo"
  5971. },
  5972. "description": "Todo list"
  5973. }
  5974. }
  5975. }
  5976. },
  5977. "400": {
  5978. "description": "BadRequest | InvalidRequestError",
  5979. "content": {
  5980. "application/json": {
  5981. "schema": {
  5982. "anyOf": [
  5983. {
  5984. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5985. },
  5986. {
  5987. "$ref": "#/components/schemas/InvalidRequestError"
  5988. }
  5989. ]
  5990. }
  5991. }
  5992. }
  5993. },
  5994. "404": {
  5995. "description": "NotFoundError",
  5996. "content": {
  5997. "application/json": {
  5998. "schema": {
  5999. "$ref": "#/components/schemas/NotFoundError"
  6000. }
  6001. }
  6002. }
  6003. }
  6004. },
  6005. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6006. "summary": "Get session todos",
  6007. "x-codeSamples": [
  6008. {
  6009. "lang": "js",
  6010. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6011. }
  6012. ]
  6013. }
  6014. },
  6015. "/session/{sessionID}/diff": {
  6016. "get": {
  6017. "tags": ["session"],
  6018. "operationId": "session.diff",
  6019. "parameters": [
  6020. {
  6021. "name": "sessionID",
  6022. "in": "path",
  6023. "schema": {
  6024. "type": "string",
  6025. "pattern": "^ses"
  6026. },
  6027. "required": true
  6028. },
  6029. {
  6030. "name": "directory",
  6031. "in": "query",
  6032. "schema": {
  6033. "type": "string"
  6034. },
  6035. "required": false
  6036. },
  6037. {
  6038. "name": "workspace",
  6039. "in": "query",
  6040. "schema": {
  6041. "type": "string"
  6042. },
  6043. "required": false
  6044. },
  6045. {
  6046. "name": "messageID",
  6047. "in": "query",
  6048. "schema": {
  6049. "type": "string",
  6050. "pattern": "^msg"
  6051. },
  6052. "required": false
  6053. }
  6054. ],
  6055. "responses": {
  6056. "200": {
  6057. "description": "Successfully retrieved diff",
  6058. "content": {
  6059. "application/json": {
  6060. "schema": {
  6061. "type": "array",
  6062. "items": {
  6063. "$ref": "#/components/schemas/SnapshotFileDiff"
  6064. },
  6065. "description": "Successfully retrieved diff"
  6066. }
  6067. }
  6068. }
  6069. },
  6070. "400": {
  6071. "description": "Bad request",
  6072. "content": {
  6073. "application/json": {
  6074. "schema": {
  6075. "$ref": "#/components/schemas/BadRequestError"
  6076. }
  6077. }
  6078. }
  6079. }
  6080. },
  6081. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6082. "summary": "Get message diff",
  6083. "x-codeSamples": [
  6084. {
  6085. "lang": "js",
  6086. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6087. }
  6088. ]
  6089. }
  6090. },
  6091. "/session/{sessionID}/message": {
  6092. "get": {
  6093. "tags": ["session"],
  6094. "operationId": "session.messages",
  6095. "parameters": [
  6096. {
  6097. "name": "sessionID",
  6098. "in": "path",
  6099. "schema": {
  6100. "type": "string",
  6101. "pattern": "^ses"
  6102. },
  6103. "required": true
  6104. },
  6105. {
  6106. "name": "directory",
  6107. "in": "query",
  6108. "schema": {
  6109. "type": "string"
  6110. },
  6111. "required": false
  6112. },
  6113. {
  6114. "name": "workspace",
  6115. "in": "query",
  6116. "schema": {
  6117. "type": "string"
  6118. },
  6119. "required": false
  6120. },
  6121. {
  6122. "name": "limit",
  6123. "in": "query",
  6124. "schema": {
  6125. "type": "integer",
  6126. "minimum": 0,
  6127. "maximum": 9007199254740991
  6128. },
  6129. "required": false
  6130. },
  6131. {
  6132. "name": "before",
  6133. "in": "query",
  6134. "schema": {
  6135. "type": "string"
  6136. },
  6137. "required": false
  6138. }
  6139. ],
  6140. "responses": {
  6141. "200": {
  6142. "description": "List of messages",
  6143. "content": {
  6144. "application/json": {
  6145. "schema": {
  6146. "type": "array",
  6147. "items": {
  6148. "type": "object",
  6149. "properties": {
  6150. "info": {
  6151. "$ref": "#/components/schemas/Message"
  6152. },
  6153. "parts": {
  6154. "type": "array",
  6155. "items": {
  6156. "$ref": "#/components/schemas/Part"
  6157. }
  6158. }
  6159. },
  6160. "required": ["info", "parts"],
  6161. "additionalProperties": false
  6162. },
  6163. "description": "List of messages"
  6164. }
  6165. }
  6166. }
  6167. },
  6168. "400": {
  6169. "description": "BadRequest | InvalidRequestError",
  6170. "content": {
  6171. "application/json": {
  6172. "schema": {
  6173. "anyOf": [
  6174. {
  6175. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6176. },
  6177. {
  6178. "$ref": "#/components/schemas/InvalidRequestError"
  6179. }
  6180. ]
  6181. }
  6182. }
  6183. }
  6184. },
  6185. "404": {
  6186. "description": "NotFoundError",
  6187. "content": {
  6188. "application/json": {
  6189. "schema": {
  6190. "$ref": "#/components/schemas/NotFoundError"
  6191. }
  6192. }
  6193. }
  6194. }
  6195. },
  6196. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6197. "summary": "Get session messages",
  6198. "x-codeSamples": [
  6199. {
  6200. "lang": "js",
  6201. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6202. }
  6203. ]
  6204. },
  6205. "post": {
  6206. "tags": ["session"],
  6207. "operationId": "session.prompt",
  6208. "parameters": [
  6209. {
  6210. "name": "sessionID",
  6211. "in": "path",
  6212. "schema": {
  6213. "type": "string",
  6214. "pattern": "^ses"
  6215. },
  6216. "required": true
  6217. },
  6218. {
  6219. "name": "directory",
  6220. "in": "query",
  6221. "schema": {
  6222. "type": "string"
  6223. },
  6224. "required": false
  6225. },
  6226. {
  6227. "name": "workspace",
  6228. "in": "query",
  6229. "schema": {
  6230. "type": "string"
  6231. },
  6232. "required": false
  6233. }
  6234. ],
  6235. "responses": {
  6236. "200": {
  6237. "description": "Created message",
  6238. "content": {
  6239. "application/json": {
  6240. "schema": {
  6241. "type": "object",
  6242. "required": ["info", "parts"],
  6243. "properties": {
  6244. "info": {
  6245. "$ref": "#/components/schemas/AssistantMessage"
  6246. },
  6247. "parts": {
  6248. "type": "array",
  6249. "items": {
  6250. "$ref": "#/components/schemas/Part"
  6251. }
  6252. }
  6253. }
  6254. }
  6255. }
  6256. }
  6257. },
  6258. "400": {
  6259. "description": "BadRequest | InvalidRequestError",
  6260. "content": {
  6261. "application/json": {
  6262. "schema": {
  6263. "anyOf": [
  6264. {
  6265. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6266. },
  6267. {
  6268. "$ref": "#/components/schemas/InvalidRequestError"
  6269. }
  6270. ]
  6271. }
  6272. }
  6273. }
  6274. },
  6275. "404": {
  6276. "description": "NotFoundError",
  6277. "content": {
  6278. "application/json": {
  6279. "schema": {
  6280. "$ref": "#/components/schemas/NotFoundError"
  6281. }
  6282. }
  6283. }
  6284. }
  6285. },
  6286. "description": "Create and send a new message to a session, streaming the AI response.",
  6287. "summary": "Send message",
  6288. "requestBody": {
  6289. "content": {
  6290. "application/json": {
  6291. "schema": {
  6292. "type": "object",
  6293. "properties": {
  6294. "messageID": {
  6295. "type": "string",
  6296. "pattern": "^msg"
  6297. },
  6298. "model": {
  6299. "type": "object",
  6300. "properties": {
  6301. "providerID": {
  6302. "type": "string"
  6303. },
  6304. "modelID": {
  6305. "type": "string"
  6306. }
  6307. },
  6308. "required": ["providerID", "modelID"],
  6309. "additionalProperties": false
  6310. },
  6311. "agent": {
  6312. "type": "string"
  6313. },
  6314. "noReply": {
  6315. "type": "boolean"
  6316. },
  6317. "tools": {
  6318. "type": "object",
  6319. "additionalProperties": {
  6320. "type": "boolean"
  6321. }
  6322. },
  6323. "format": {
  6324. "$ref": "#/components/schemas/OutputFormat"
  6325. },
  6326. "system": {
  6327. "type": "string"
  6328. },
  6329. "variant": {
  6330. "type": "string"
  6331. },
  6332. "parts": {
  6333. "type": "array",
  6334. "items": {
  6335. "anyOf": [
  6336. {
  6337. "$ref": "#/components/schemas/TextPartInput"
  6338. },
  6339. {
  6340. "$ref": "#/components/schemas/FilePartInput"
  6341. },
  6342. {
  6343. "$ref": "#/components/schemas/AgentPartInput"
  6344. },
  6345. {
  6346. "$ref": "#/components/schemas/SubtaskPartInput"
  6347. }
  6348. ]
  6349. }
  6350. }
  6351. },
  6352. "required": ["parts"],
  6353. "additionalProperties": false
  6354. }
  6355. }
  6356. }
  6357. },
  6358. "x-codeSamples": [
  6359. {
  6360. "lang": "js",
  6361. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6362. }
  6363. ]
  6364. }
  6365. },
  6366. "/session/{sessionID}/message/{messageID}": {
  6367. "get": {
  6368. "tags": ["session"],
  6369. "operationId": "session.message",
  6370. "parameters": [
  6371. {
  6372. "name": "sessionID",
  6373. "in": "path",
  6374. "schema": {
  6375. "type": "string",
  6376. "pattern": "^ses"
  6377. },
  6378. "required": true
  6379. },
  6380. {
  6381. "name": "messageID",
  6382. "in": "path",
  6383. "schema": {
  6384. "type": "string",
  6385. "pattern": "^msg"
  6386. },
  6387. "required": true
  6388. },
  6389. {
  6390. "name": "directory",
  6391. "in": "query",
  6392. "schema": {
  6393. "type": "string"
  6394. },
  6395. "required": false
  6396. },
  6397. {
  6398. "name": "workspace",
  6399. "in": "query",
  6400. "schema": {
  6401. "type": "string"
  6402. },
  6403. "required": false
  6404. }
  6405. ],
  6406. "responses": {
  6407. "200": {
  6408. "description": "Message",
  6409. "content": {
  6410. "application/json": {
  6411. "schema": {
  6412. "type": "object",
  6413. "properties": {
  6414. "info": {
  6415. "$ref": "#/components/schemas/Message"
  6416. },
  6417. "parts": {
  6418. "type": "array",
  6419. "items": {
  6420. "$ref": "#/components/schemas/Part"
  6421. }
  6422. }
  6423. },
  6424. "required": ["info", "parts"],
  6425. "additionalProperties": false,
  6426. "description": "Message"
  6427. }
  6428. }
  6429. }
  6430. },
  6431. "400": {
  6432. "description": "BadRequest | InvalidRequestError",
  6433. "content": {
  6434. "application/json": {
  6435. "schema": {
  6436. "anyOf": [
  6437. {
  6438. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6439. },
  6440. {
  6441. "$ref": "#/components/schemas/InvalidRequestError"
  6442. }
  6443. ]
  6444. }
  6445. }
  6446. }
  6447. },
  6448. "404": {
  6449. "description": "NotFoundError",
  6450. "content": {
  6451. "application/json": {
  6452. "schema": {
  6453. "$ref": "#/components/schemas/NotFoundError"
  6454. }
  6455. }
  6456. }
  6457. }
  6458. },
  6459. "description": "Retrieve a specific message from a session by its message ID.",
  6460. "summary": "Get message",
  6461. "x-codeSamples": [
  6462. {
  6463. "lang": "js",
  6464. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6465. }
  6466. ]
  6467. },
  6468. "delete": {
  6469. "tags": ["session"],
  6470. "operationId": "session.deleteMessage",
  6471. "parameters": [
  6472. {
  6473. "name": "sessionID",
  6474. "in": "path",
  6475. "schema": {
  6476. "type": "string",
  6477. "pattern": "^ses"
  6478. },
  6479. "required": true
  6480. },
  6481. {
  6482. "name": "messageID",
  6483. "in": "path",
  6484. "schema": {
  6485. "type": "string",
  6486. "pattern": "^msg"
  6487. },
  6488. "required": true
  6489. },
  6490. {
  6491. "name": "directory",
  6492. "in": "query",
  6493. "schema": {
  6494. "type": "string"
  6495. },
  6496. "required": false
  6497. },
  6498. {
  6499. "name": "workspace",
  6500. "in": "query",
  6501. "schema": {
  6502. "type": "string"
  6503. },
  6504. "required": false
  6505. }
  6506. ],
  6507. "responses": {
  6508. "200": {
  6509. "description": "Successfully deleted message",
  6510. "content": {
  6511. "application/json": {
  6512. "schema": {
  6513. "type": "boolean",
  6514. "description": "Successfully deleted message"
  6515. }
  6516. }
  6517. }
  6518. },
  6519. "400": {
  6520. "description": "BadRequest | InvalidRequestError",
  6521. "content": {
  6522. "application/json": {
  6523. "schema": {
  6524. "anyOf": [
  6525. {
  6526. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6527. },
  6528. {
  6529. "$ref": "#/components/schemas/InvalidRequestError"
  6530. }
  6531. ]
  6532. }
  6533. }
  6534. }
  6535. },
  6536. "404": {
  6537. "description": "NotFoundError",
  6538. "content": {
  6539. "application/json": {
  6540. "schema": {
  6541. "$ref": "#/components/schemas/NotFoundError"
  6542. }
  6543. }
  6544. }
  6545. },
  6546. "409": {
  6547. "description": "SessionBusyError",
  6548. "content": {
  6549. "application/json": {
  6550. "schema": {
  6551. "$ref": "#/components/schemas/SessionBusyError"
  6552. }
  6553. }
  6554. }
  6555. }
  6556. },
  6557. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6558. "summary": "Delete message",
  6559. "x-codeSamples": [
  6560. {
  6561. "lang": "js",
  6562. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6563. }
  6564. ]
  6565. }
  6566. },
  6567. "/session/{sessionID}/fork": {
  6568. "post": {
  6569. "tags": ["session"],
  6570. "operationId": "session.fork",
  6571. "parameters": [
  6572. {
  6573. "name": "sessionID",
  6574. "in": "path",
  6575. "schema": {
  6576. "type": "string",
  6577. "pattern": "^ses"
  6578. },
  6579. "required": true
  6580. },
  6581. {
  6582. "name": "directory",
  6583. "in": "query",
  6584. "schema": {
  6585. "type": "string"
  6586. },
  6587. "required": false
  6588. },
  6589. {
  6590. "name": "workspace",
  6591. "in": "query",
  6592. "schema": {
  6593. "type": "string"
  6594. },
  6595. "required": false
  6596. }
  6597. ],
  6598. "responses": {
  6599. "200": {
  6600. "description": "200",
  6601. "content": {
  6602. "application/json": {
  6603. "schema": {
  6604. "$ref": "#/components/schemas/Session"
  6605. }
  6606. }
  6607. }
  6608. },
  6609. "400": {
  6610. "description": "BadRequest | InvalidRequestError",
  6611. "content": {
  6612. "application/json": {
  6613. "schema": {
  6614. "anyOf": [
  6615. {
  6616. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6617. },
  6618. {
  6619. "$ref": "#/components/schemas/InvalidRequestError"
  6620. }
  6621. ]
  6622. }
  6623. }
  6624. }
  6625. },
  6626. "404": {
  6627. "description": "NotFoundError",
  6628. "content": {
  6629. "application/json": {
  6630. "schema": {
  6631. "$ref": "#/components/schemas/NotFoundError"
  6632. }
  6633. }
  6634. }
  6635. }
  6636. },
  6637. "description": "Create a new session by forking an existing session at a specific message point.",
  6638. "summary": "Fork session",
  6639. "requestBody": {
  6640. "content": {
  6641. "application/json": {
  6642. "schema": {
  6643. "type": "object",
  6644. "properties": {
  6645. "messageID": {
  6646. "type": "string",
  6647. "pattern": "^msg"
  6648. }
  6649. },
  6650. "additionalProperties": false
  6651. }
  6652. }
  6653. }
  6654. },
  6655. "x-codeSamples": [
  6656. {
  6657. "lang": "js",
  6658. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6659. }
  6660. ]
  6661. }
  6662. },
  6663. "/session/{sessionID}/abort": {
  6664. "post": {
  6665. "tags": ["session"],
  6666. "operationId": "session.abort",
  6667. "parameters": [
  6668. {
  6669. "name": "sessionID",
  6670. "in": "path",
  6671. "schema": {
  6672. "type": "string",
  6673. "pattern": "^ses"
  6674. },
  6675. "required": true
  6676. },
  6677. {
  6678. "name": "directory",
  6679. "in": "query",
  6680. "schema": {
  6681. "type": "string"
  6682. },
  6683. "required": false
  6684. },
  6685. {
  6686. "name": "workspace",
  6687. "in": "query",
  6688. "schema": {
  6689. "type": "string"
  6690. },
  6691. "required": false
  6692. }
  6693. ],
  6694. "responses": {
  6695. "200": {
  6696. "description": "Aborted session",
  6697. "content": {
  6698. "application/json": {
  6699. "schema": {
  6700. "type": "boolean",
  6701. "description": "Aborted session"
  6702. }
  6703. }
  6704. }
  6705. },
  6706. "400": {
  6707. "description": "BadRequest | InvalidRequestError",
  6708. "content": {
  6709. "application/json": {
  6710. "schema": {
  6711. "anyOf": [
  6712. {
  6713. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6714. },
  6715. {
  6716. "$ref": "#/components/schemas/InvalidRequestError"
  6717. }
  6718. ]
  6719. }
  6720. }
  6721. }
  6722. }
  6723. },
  6724. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6725. "summary": "Abort session",
  6726. "x-codeSamples": [
  6727. {
  6728. "lang": "js",
  6729. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6730. }
  6731. ]
  6732. }
  6733. },
  6734. "/session/{sessionID}/init": {
  6735. "post": {
  6736. "tags": ["session"],
  6737. "operationId": "session.init",
  6738. "parameters": [
  6739. {
  6740. "name": "sessionID",
  6741. "in": "path",
  6742. "schema": {
  6743. "type": "string",
  6744. "pattern": "^ses"
  6745. },
  6746. "required": true
  6747. },
  6748. {
  6749. "name": "directory",
  6750. "in": "query",
  6751. "schema": {
  6752. "type": "string"
  6753. },
  6754. "required": false
  6755. },
  6756. {
  6757. "name": "workspace",
  6758. "in": "query",
  6759. "schema": {
  6760. "type": "string"
  6761. },
  6762. "required": false
  6763. }
  6764. ],
  6765. "responses": {
  6766. "200": {
  6767. "description": "200",
  6768. "content": {
  6769. "application/json": {
  6770. "schema": {
  6771. "type": "boolean",
  6772. "description": "200"
  6773. }
  6774. }
  6775. }
  6776. },
  6777. "400": {
  6778. "description": "BadRequest | InvalidRequestError",
  6779. "content": {
  6780. "application/json": {
  6781. "schema": {
  6782. "anyOf": [
  6783. {
  6784. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6785. },
  6786. {
  6787. "$ref": "#/components/schemas/InvalidRequestError"
  6788. }
  6789. ]
  6790. }
  6791. }
  6792. }
  6793. },
  6794. "404": {
  6795. "description": "NotFoundError",
  6796. "content": {
  6797. "application/json": {
  6798. "schema": {
  6799. "$ref": "#/components/schemas/NotFoundError"
  6800. }
  6801. }
  6802. }
  6803. }
  6804. },
  6805. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6806. "summary": "Initialize session",
  6807. "requestBody": {
  6808. "content": {
  6809. "application/json": {
  6810. "schema": {
  6811. "type": "object",
  6812. "properties": {
  6813. "modelID": {
  6814. "type": "string"
  6815. },
  6816. "providerID": {
  6817. "type": "string"
  6818. },
  6819. "messageID": {
  6820. "type": "string",
  6821. "pattern": "^msg"
  6822. }
  6823. },
  6824. "required": ["modelID", "providerID", "messageID"],
  6825. "additionalProperties": false
  6826. }
  6827. }
  6828. }
  6829. },
  6830. "x-codeSamples": [
  6831. {
  6832. "lang": "js",
  6833. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6834. }
  6835. ]
  6836. }
  6837. },
  6838. "/session/{sessionID}/share": {
  6839. "post": {
  6840. "tags": ["session"],
  6841. "operationId": "session.share",
  6842. "parameters": [
  6843. {
  6844. "name": "sessionID",
  6845. "in": "path",
  6846. "schema": {
  6847. "type": "string",
  6848. "pattern": "^ses"
  6849. },
  6850. "required": true
  6851. },
  6852. {
  6853. "name": "directory",
  6854. "in": "query",
  6855. "schema": {
  6856. "type": "string"
  6857. },
  6858. "required": false
  6859. },
  6860. {
  6861. "name": "workspace",
  6862. "in": "query",
  6863. "schema": {
  6864. "type": "string"
  6865. },
  6866. "required": false
  6867. }
  6868. ],
  6869. "responses": {
  6870. "200": {
  6871. "description": "Successfully shared session",
  6872. "content": {
  6873. "application/json": {
  6874. "schema": {
  6875. "$ref": "#/components/schemas/Session"
  6876. }
  6877. }
  6878. }
  6879. },
  6880. "400": {
  6881. "description": "Bad request",
  6882. "content": {
  6883. "application/json": {
  6884. "schema": {
  6885. "$ref": "#/components/schemas/BadRequestError"
  6886. }
  6887. }
  6888. }
  6889. },
  6890. "404": {
  6891. "description": "NotFoundError",
  6892. "content": {
  6893. "application/json": {
  6894. "schema": {
  6895. "$ref": "#/components/schemas/NotFoundError"
  6896. }
  6897. }
  6898. }
  6899. },
  6900. "500": {
  6901. "description": "InternalServerError",
  6902. "content": {
  6903. "application/json": {
  6904. "schema": {
  6905. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6906. }
  6907. }
  6908. }
  6909. }
  6910. },
  6911. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6912. "summary": "Share session",
  6913. "x-codeSamples": [
  6914. {
  6915. "lang": "js",
  6916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6917. }
  6918. ]
  6919. },
  6920. "delete": {
  6921. "tags": ["session"],
  6922. "operationId": "session.unshare",
  6923. "parameters": [
  6924. {
  6925. "name": "sessionID",
  6926. "in": "path",
  6927. "schema": {
  6928. "type": "string",
  6929. "pattern": "^ses"
  6930. },
  6931. "required": true
  6932. },
  6933. {
  6934. "name": "directory",
  6935. "in": "query",
  6936. "schema": {
  6937. "type": "string"
  6938. },
  6939. "required": false
  6940. },
  6941. {
  6942. "name": "workspace",
  6943. "in": "query",
  6944. "schema": {
  6945. "type": "string"
  6946. },
  6947. "required": false
  6948. }
  6949. ],
  6950. "responses": {
  6951. "200": {
  6952. "description": "Successfully unshared session",
  6953. "content": {
  6954. "application/json": {
  6955. "schema": {
  6956. "$ref": "#/components/schemas/Session"
  6957. }
  6958. }
  6959. }
  6960. },
  6961. "400": {
  6962. "description": "Bad request",
  6963. "content": {
  6964. "application/json": {
  6965. "schema": {
  6966. "$ref": "#/components/schemas/BadRequestError"
  6967. }
  6968. }
  6969. }
  6970. },
  6971. "404": {
  6972. "description": "NotFoundError",
  6973. "content": {
  6974. "application/json": {
  6975. "schema": {
  6976. "$ref": "#/components/schemas/NotFoundError"
  6977. }
  6978. }
  6979. }
  6980. },
  6981. "500": {
  6982. "description": "InternalServerError",
  6983. "content": {
  6984. "application/json": {
  6985. "schema": {
  6986. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6987. }
  6988. }
  6989. }
  6990. }
  6991. },
  6992. "description": "Remove the shareable link for a session, making it private again.",
  6993. "summary": "Unshare session",
  6994. "x-codeSamples": [
  6995. {
  6996. "lang": "js",
  6997. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6998. }
  6999. ]
  7000. }
  7001. },
  7002. "/session/{sessionID}/summarize": {
  7003. "post": {
  7004. "tags": ["session"],
  7005. "operationId": "session.summarize",
  7006. "parameters": [
  7007. {
  7008. "name": "sessionID",
  7009. "in": "path",
  7010. "schema": {
  7011. "type": "string",
  7012. "pattern": "^ses"
  7013. },
  7014. "required": true
  7015. },
  7016. {
  7017. "name": "directory",
  7018. "in": "query",
  7019. "schema": {
  7020. "type": "string"
  7021. },
  7022. "required": false
  7023. },
  7024. {
  7025. "name": "workspace",
  7026. "in": "query",
  7027. "schema": {
  7028. "type": "string"
  7029. },
  7030. "required": false
  7031. }
  7032. ],
  7033. "responses": {
  7034. "200": {
  7035. "description": "Summarized session",
  7036. "content": {
  7037. "application/json": {
  7038. "schema": {
  7039. "type": "boolean",
  7040. "description": "Summarized session"
  7041. }
  7042. }
  7043. }
  7044. },
  7045. "400": {
  7046. "description": "BadRequest | InvalidRequestError",
  7047. "content": {
  7048. "application/json": {
  7049. "schema": {
  7050. "anyOf": [
  7051. {
  7052. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7053. },
  7054. {
  7055. "$ref": "#/components/schemas/InvalidRequestError"
  7056. }
  7057. ]
  7058. }
  7059. }
  7060. }
  7061. },
  7062. "404": {
  7063. "description": "NotFoundError",
  7064. "content": {
  7065. "application/json": {
  7066. "schema": {
  7067. "$ref": "#/components/schemas/NotFoundError"
  7068. }
  7069. }
  7070. }
  7071. }
  7072. },
  7073. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7074. "summary": "Summarize session",
  7075. "requestBody": {
  7076. "content": {
  7077. "application/json": {
  7078. "schema": {
  7079. "type": "object",
  7080. "properties": {
  7081. "providerID": {
  7082. "type": "string"
  7083. },
  7084. "modelID": {
  7085. "type": "string"
  7086. },
  7087. "auto": {
  7088. "type": "boolean"
  7089. }
  7090. },
  7091. "required": ["providerID", "modelID"],
  7092. "additionalProperties": false
  7093. }
  7094. }
  7095. }
  7096. },
  7097. "x-codeSamples": [
  7098. {
  7099. "lang": "js",
  7100. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7101. }
  7102. ]
  7103. }
  7104. },
  7105. "/session/{sessionID}/prompt_async": {
  7106. "post": {
  7107. "tags": ["session"],
  7108. "operationId": "session.prompt_async",
  7109. "parameters": [
  7110. {
  7111. "name": "sessionID",
  7112. "in": "path",
  7113. "schema": {
  7114. "type": "string",
  7115. "pattern": "^ses"
  7116. },
  7117. "required": true
  7118. },
  7119. {
  7120. "name": "directory",
  7121. "in": "query",
  7122. "schema": {
  7123. "type": "string"
  7124. },
  7125. "required": false
  7126. },
  7127. {
  7128. "name": "workspace",
  7129. "in": "query",
  7130. "schema": {
  7131. "type": "string"
  7132. },
  7133. "required": false
  7134. }
  7135. ],
  7136. "responses": {
  7137. "204": {
  7138. "description": "Prompt accepted"
  7139. },
  7140. "400": {
  7141. "description": "BadRequest | InvalidRequestError",
  7142. "content": {
  7143. "application/json": {
  7144. "schema": {
  7145. "anyOf": [
  7146. {
  7147. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7148. },
  7149. {
  7150. "$ref": "#/components/schemas/InvalidRequestError"
  7151. }
  7152. ]
  7153. }
  7154. }
  7155. }
  7156. },
  7157. "404": {
  7158. "description": "NotFoundError",
  7159. "content": {
  7160. "application/json": {
  7161. "schema": {
  7162. "$ref": "#/components/schemas/NotFoundError"
  7163. }
  7164. }
  7165. }
  7166. }
  7167. },
  7168. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7169. "summary": "Send async message",
  7170. "requestBody": {
  7171. "content": {
  7172. "application/json": {
  7173. "schema": {
  7174. "type": "object",
  7175. "properties": {
  7176. "messageID": {
  7177. "type": "string",
  7178. "pattern": "^msg"
  7179. },
  7180. "model": {
  7181. "type": "object",
  7182. "properties": {
  7183. "providerID": {
  7184. "type": "string"
  7185. },
  7186. "modelID": {
  7187. "type": "string"
  7188. }
  7189. },
  7190. "required": ["providerID", "modelID"],
  7191. "additionalProperties": false
  7192. },
  7193. "agent": {
  7194. "type": "string"
  7195. },
  7196. "noReply": {
  7197. "type": "boolean"
  7198. },
  7199. "tools": {
  7200. "type": "object",
  7201. "additionalProperties": {
  7202. "type": "boolean"
  7203. }
  7204. },
  7205. "format": {
  7206. "$ref": "#/components/schemas/OutputFormat"
  7207. },
  7208. "system": {
  7209. "type": "string"
  7210. },
  7211. "variant": {
  7212. "type": "string"
  7213. },
  7214. "parts": {
  7215. "type": "array",
  7216. "items": {
  7217. "anyOf": [
  7218. {
  7219. "$ref": "#/components/schemas/TextPartInput"
  7220. },
  7221. {
  7222. "$ref": "#/components/schemas/FilePartInput"
  7223. },
  7224. {
  7225. "$ref": "#/components/schemas/AgentPartInput"
  7226. },
  7227. {
  7228. "$ref": "#/components/schemas/SubtaskPartInput"
  7229. }
  7230. ]
  7231. }
  7232. }
  7233. },
  7234. "required": ["parts"],
  7235. "additionalProperties": false
  7236. }
  7237. }
  7238. }
  7239. },
  7240. "x-codeSamples": [
  7241. {
  7242. "lang": "js",
  7243. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7244. }
  7245. ]
  7246. }
  7247. },
  7248. "/session/{sessionID}/command": {
  7249. "post": {
  7250. "tags": ["session"],
  7251. "operationId": "session.command",
  7252. "parameters": [
  7253. {
  7254. "name": "sessionID",
  7255. "in": "path",
  7256. "schema": {
  7257. "type": "string",
  7258. "pattern": "^ses"
  7259. },
  7260. "required": true
  7261. },
  7262. {
  7263. "name": "directory",
  7264. "in": "query",
  7265. "schema": {
  7266. "type": "string"
  7267. },
  7268. "required": false
  7269. },
  7270. {
  7271. "name": "workspace",
  7272. "in": "query",
  7273. "schema": {
  7274. "type": "string"
  7275. },
  7276. "required": false
  7277. }
  7278. ],
  7279. "responses": {
  7280. "200": {
  7281. "description": "Created message",
  7282. "content": {
  7283. "application/json": {
  7284. "schema": {
  7285. "type": "object",
  7286. "required": ["info", "parts"],
  7287. "properties": {
  7288. "info": {
  7289. "$ref": "#/components/schemas/AssistantMessage"
  7290. },
  7291. "parts": {
  7292. "type": "array",
  7293. "items": {
  7294. "$ref": "#/components/schemas/Part"
  7295. }
  7296. }
  7297. }
  7298. }
  7299. }
  7300. }
  7301. },
  7302. "400": {
  7303. "description": "BadRequest | InvalidRequestError",
  7304. "content": {
  7305. "application/json": {
  7306. "schema": {
  7307. "anyOf": [
  7308. {
  7309. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7310. },
  7311. {
  7312. "$ref": "#/components/schemas/InvalidRequestError"
  7313. }
  7314. ]
  7315. }
  7316. }
  7317. }
  7318. },
  7319. "404": {
  7320. "description": "NotFoundError",
  7321. "content": {
  7322. "application/json": {
  7323. "schema": {
  7324. "$ref": "#/components/schemas/NotFoundError"
  7325. }
  7326. }
  7327. }
  7328. }
  7329. },
  7330. "description": "Send a new command to a session for execution by the AI assistant.",
  7331. "summary": "Send command",
  7332. "requestBody": {
  7333. "content": {
  7334. "application/json": {
  7335. "schema": {
  7336. "type": "object",
  7337. "properties": {
  7338. "messageID": {
  7339. "type": "string",
  7340. "pattern": "^msg"
  7341. },
  7342. "agent": {
  7343. "type": "string"
  7344. },
  7345. "model": {
  7346. "type": "string"
  7347. },
  7348. "arguments": {
  7349. "type": "string"
  7350. },
  7351. "command": {
  7352. "type": "string"
  7353. },
  7354. "variant": {
  7355. "type": "string"
  7356. },
  7357. "parts": {
  7358. "type": "array",
  7359. "items": {
  7360. "type": "object",
  7361. "properties": {
  7362. "id": {
  7363. "type": "string",
  7364. "pattern": "^prt"
  7365. },
  7366. "type": {
  7367. "type": "string",
  7368. "enum": ["file"]
  7369. },
  7370. "mime": {
  7371. "type": "string"
  7372. },
  7373. "filename": {
  7374. "type": "string"
  7375. },
  7376. "url": {
  7377. "type": "string"
  7378. },
  7379. "source": {
  7380. "$ref": "#/components/schemas/FilePartSource"
  7381. }
  7382. },
  7383. "required": ["type", "mime", "url"],
  7384. "additionalProperties": false
  7385. }
  7386. }
  7387. },
  7388. "required": ["arguments", "command"],
  7389. "additionalProperties": false
  7390. }
  7391. }
  7392. }
  7393. },
  7394. "x-codeSamples": [
  7395. {
  7396. "lang": "js",
  7397. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7398. }
  7399. ]
  7400. }
  7401. },
  7402. "/session/{sessionID}/shell": {
  7403. "post": {
  7404. "tags": ["session"],
  7405. "operationId": "session.shell",
  7406. "parameters": [
  7407. {
  7408. "name": "sessionID",
  7409. "in": "path",
  7410. "schema": {
  7411. "type": "string",
  7412. "pattern": "^ses"
  7413. },
  7414. "required": true
  7415. },
  7416. {
  7417. "name": "directory",
  7418. "in": "query",
  7419. "schema": {
  7420. "type": "string"
  7421. },
  7422. "required": false
  7423. },
  7424. {
  7425. "name": "workspace",
  7426. "in": "query",
  7427. "schema": {
  7428. "type": "string"
  7429. },
  7430. "required": false
  7431. }
  7432. ],
  7433. "responses": {
  7434. "200": {
  7435. "description": "Created message",
  7436. "content": {
  7437. "application/json": {
  7438. "schema": {
  7439. "type": "object",
  7440. "properties": {
  7441. "info": {
  7442. "$ref": "#/components/schemas/Message"
  7443. },
  7444. "parts": {
  7445. "type": "array",
  7446. "items": {
  7447. "$ref": "#/components/schemas/Part"
  7448. }
  7449. }
  7450. },
  7451. "required": ["info", "parts"],
  7452. "additionalProperties": false,
  7453. "description": "Created message"
  7454. }
  7455. }
  7456. }
  7457. },
  7458. "400": {
  7459. "description": "BadRequest | InvalidRequestError",
  7460. "content": {
  7461. "application/json": {
  7462. "schema": {
  7463. "anyOf": [
  7464. {
  7465. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7466. },
  7467. {
  7468. "$ref": "#/components/schemas/InvalidRequestError"
  7469. }
  7470. ]
  7471. }
  7472. }
  7473. }
  7474. },
  7475. "404": {
  7476. "description": "NotFoundError",
  7477. "content": {
  7478. "application/json": {
  7479. "schema": {
  7480. "$ref": "#/components/schemas/NotFoundError"
  7481. }
  7482. }
  7483. }
  7484. },
  7485. "409": {
  7486. "description": "SessionBusyError",
  7487. "content": {
  7488. "application/json": {
  7489. "schema": {
  7490. "$ref": "#/components/schemas/SessionBusyError"
  7491. }
  7492. }
  7493. }
  7494. }
  7495. },
  7496. "description": "Execute a shell command within the session context and return the AI's response.",
  7497. "summary": "Run shell command",
  7498. "requestBody": {
  7499. "content": {
  7500. "application/json": {
  7501. "schema": {
  7502. "type": "object",
  7503. "properties": {
  7504. "messageID": {
  7505. "type": "string",
  7506. "pattern": "^msg"
  7507. },
  7508. "agent": {
  7509. "type": "string"
  7510. },
  7511. "model": {
  7512. "type": "object",
  7513. "properties": {
  7514. "providerID": {
  7515. "type": "string"
  7516. },
  7517. "modelID": {
  7518. "type": "string"
  7519. }
  7520. },
  7521. "required": ["providerID", "modelID"],
  7522. "additionalProperties": false
  7523. },
  7524. "command": {
  7525. "type": "string"
  7526. }
  7527. },
  7528. "required": ["agent", "command"],
  7529. "additionalProperties": false
  7530. }
  7531. }
  7532. }
  7533. },
  7534. "x-codeSamples": [
  7535. {
  7536. "lang": "js",
  7537. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7538. }
  7539. ]
  7540. }
  7541. },
  7542. "/session/{sessionID}/revert": {
  7543. "post": {
  7544. "tags": ["session"],
  7545. "operationId": "session.revert",
  7546. "parameters": [
  7547. {
  7548. "name": "sessionID",
  7549. "in": "path",
  7550. "schema": {
  7551. "type": "string",
  7552. "pattern": "^ses"
  7553. },
  7554. "required": true
  7555. },
  7556. {
  7557. "name": "directory",
  7558. "in": "query",
  7559. "schema": {
  7560. "type": "string"
  7561. },
  7562. "required": false
  7563. },
  7564. {
  7565. "name": "workspace",
  7566. "in": "query",
  7567. "schema": {
  7568. "type": "string"
  7569. },
  7570. "required": false
  7571. }
  7572. ],
  7573. "responses": {
  7574. "200": {
  7575. "description": "Updated session",
  7576. "content": {
  7577. "application/json": {
  7578. "schema": {
  7579. "$ref": "#/components/schemas/Session"
  7580. }
  7581. }
  7582. }
  7583. },
  7584. "400": {
  7585. "description": "BadRequest | InvalidRequestError",
  7586. "content": {
  7587. "application/json": {
  7588. "schema": {
  7589. "anyOf": [
  7590. {
  7591. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7592. },
  7593. {
  7594. "$ref": "#/components/schemas/InvalidRequestError"
  7595. }
  7596. ]
  7597. }
  7598. }
  7599. }
  7600. },
  7601. "404": {
  7602. "description": "NotFoundError",
  7603. "content": {
  7604. "application/json": {
  7605. "schema": {
  7606. "$ref": "#/components/schemas/NotFoundError"
  7607. }
  7608. }
  7609. }
  7610. },
  7611. "409": {
  7612. "description": "SessionBusyError",
  7613. "content": {
  7614. "application/json": {
  7615. "schema": {
  7616. "$ref": "#/components/schemas/SessionBusyError"
  7617. }
  7618. }
  7619. }
  7620. }
  7621. },
  7622. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7623. "summary": "Revert message",
  7624. "requestBody": {
  7625. "content": {
  7626. "application/json": {
  7627. "schema": {
  7628. "type": "object",
  7629. "properties": {
  7630. "messageID": {
  7631. "type": "string",
  7632. "pattern": "^msg"
  7633. },
  7634. "partID": {
  7635. "type": "string",
  7636. "pattern": "^prt"
  7637. }
  7638. },
  7639. "required": ["messageID"],
  7640. "additionalProperties": false
  7641. }
  7642. }
  7643. }
  7644. },
  7645. "x-codeSamples": [
  7646. {
  7647. "lang": "js",
  7648. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7649. }
  7650. ]
  7651. }
  7652. },
  7653. "/session/{sessionID}/unrevert": {
  7654. "post": {
  7655. "tags": ["session"],
  7656. "operationId": "session.unrevert",
  7657. "parameters": [
  7658. {
  7659. "name": "sessionID",
  7660. "in": "path",
  7661. "schema": {
  7662. "type": "string",
  7663. "pattern": "^ses"
  7664. },
  7665. "required": true
  7666. },
  7667. {
  7668. "name": "directory",
  7669. "in": "query",
  7670. "schema": {
  7671. "type": "string"
  7672. },
  7673. "required": false
  7674. },
  7675. {
  7676. "name": "workspace",
  7677. "in": "query",
  7678. "schema": {
  7679. "type": "string"
  7680. },
  7681. "required": false
  7682. }
  7683. ],
  7684. "responses": {
  7685. "200": {
  7686. "description": "Updated session",
  7687. "content": {
  7688. "application/json": {
  7689. "schema": {
  7690. "$ref": "#/components/schemas/Session"
  7691. }
  7692. }
  7693. }
  7694. },
  7695. "400": {
  7696. "description": "BadRequest | InvalidRequestError",
  7697. "content": {
  7698. "application/json": {
  7699. "schema": {
  7700. "anyOf": [
  7701. {
  7702. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7703. },
  7704. {
  7705. "$ref": "#/components/schemas/InvalidRequestError"
  7706. }
  7707. ]
  7708. }
  7709. }
  7710. }
  7711. },
  7712. "404": {
  7713. "description": "NotFoundError",
  7714. "content": {
  7715. "application/json": {
  7716. "schema": {
  7717. "$ref": "#/components/schemas/NotFoundError"
  7718. }
  7719. }
  7720. }
  7721. },
  7722. "409": {
  7723. "description": "SessionBusyError",
  7724. "content": {
  7725. "application/json": {
  7726. "schema": {
  7727. "$ref": "#/components/schemas/SessionBusyError"
  7728. }
  7729. }
  7730. }
  7731. }
  7732. },
  7733. "description": "Restore all previously reverted messages in a session.",
  7734. "summary": "Restore reverted messages",
  7735. "x-codeSamples": [
  7736. {
  7737. "lang": "js",
  7738. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7739. }
  7740. ]
  7741. }
  7742. },
  7743. "/session/{sessionID}/permissions/{permissionID}": {
  7744. "post": {
  7745. "tags": ["session"],
  7746. "operationId": "permission.respond",
  7747. "parameters": [
  7748. {
  7749. "name": "sessionID",
  7750. "in": "path",
  7751. "schema": {
  7752. "type": "string",
  7753. "pattern": "^ses"
  7754. },
  7755. "required": true
  7756. },
  7757. {
  7758. "name": "permissionID",
  7759. "in": "path",
  7760. "schema": {
  7761. "type": "string",
  7762. "pattern": "^per"
  7763. },
  7764. "required": true
  7765. },
  7766. {
  7767. "name": "directory",
  7768. "in": "query",
  7769. "schema": {
  7770. "type": "string"
  7771. },
  7772. "required": false
  7773. },
  7774. {
  7775. "name": "workspace",
  7776. "in": "query",
  7777. "schema": {
  7778. "type": "string"
  7779. },
  7780. "required": false
  7781. }
  7782. ],
  7783. "responses": {
  7784. "200": {
  7785. "description": "Permission processed successfully",
  7786. "content": {
  7787. "application/json": {
  7788. "schema": {
  7789. "type": "boolean",
  7790. "description": "Permission processed successfully"
  7791. }
  7792. }
  7793. }
  7794. },
  7795. "400": {
  7796. "description": "BadRequest | InvalidRequestError",
  7797. "content": {
  7798. "application/json": {
  7799. "schema": {
  7800. "anyOf": [
  7801. {
  7802. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7803. },
  7804. {
  7805. "$ref": "#/components/schemas/InvalidRequestError"
  7806. }
  7807. ]
  7808. }
  7809. }
  7810. }
  7811. },
  7812. "404": {
  7813. "description": "NotFoundError | PermissionNotFoundError",
  7814. "content": {
  7815. "application/json": {
  7816. "schema": {
  7817. "anyOf": [
  7818. {
  7819. "$ref": "#/components/schemas/NotFoundError"
  7820. },
  7821. {
  7822. "$ref": "#/components/schemas/PermissionNotFoundError"
  7823. }
  7824. ]
  7825. }
  7826. }
  7827. }
  7828. }
  7829. },
  7830. "description": "Approve or deny a permission request from the AI assistant.",
  7831. "summary": "Respond to permission",
  7832. "deprecated": true,
  7833. "requestBody": {
  7834. "content": {
  7835. "application/json": {
  7836. "schema": {
  7837. "type": "object",
  7838. "properties": {
  7839. "response": {
  7840. "type": "string",
  7841. "enum": ["once", "always", "reject"]
  7842. }
  7843. },
  7844. "required": ["response"],
  7845. "additionalProperties": false
  7846. }
  7847. }
  7848. }
  7849. },
  7850. "x-codeSamples": [
  7851. {
  7852. "lang": "js",
  7853. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7854. }
  7855. ]
  7856. }
  7857. },
  7858. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7859. "delete": {
  7860. "tags": ["session"],
  7861. "operationId": "part.delete",
  7862. "parameters": [
  7863. {
  7864. "name": "sessionID",
  7865. "in": "path",
  7866. "schema": {
  7867. "type": "string",
  7868. "pattern": "^ses"
  7869. },
  7870. "required": true
  7871. },
  7872. {
  7873. "name": "messageID",
  7874. "in": "path",
  7875. "schema": {
  7876. "type": "string",
  7877. "pattern": "^msg"
  7878. },
  7879. "required": true
  7880. },
  7881. {
  7882. "name": "partID",
  7883. "in": "path",
  7884. "schema": {
  7885. "type": "string",
  7886. "pattern": "^prt"
  7887. },
  7888. "required": true
  7889. },
  7890. {
  7891. "name": "directory",
  7892. "in": "query",
  7893. "schema": {
  7894. "type": "string"
  7895. },
  7896. "required": false
  7897. },
  7898. {
  7899. "name": "workspace",
  7900. "in": "query",
  7901. "schema": {
  7902. "type": "string"
  7903. },
  7904. "required": false
  7905. }
  7906. ],
  7907. "responses": {
  7908. "200": {
  7909. "description": "Successfully deleted part",
  7910. "content": {
  7911. "application/json": {
  7912. "schema": {
  7913. "type": "boolean",
  7914. "description": "Successfully deleted part"
  7915. }
  7916. }
  7917. }
  7918. },
  7919. "400": {
  7920. "description": "BadRequest | InvalidRequestError",
  7921. "content": {
  7922. "application/json": {
  7923. "schema": {
  7924. "anyOf": [
  7925. {
  7926. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7927. },
  7928. {
  7929. "$ref": "#/components/schemas/InvalidRequestError"
  7930. }
  7931. ]
  7932. }
  7933. }
  7934. }
  7935. },
  7936. "404": {
  7937. "description": "NotFoundError",
  7938. "content": {
  7939. "application/json": {
  7940. "schema": {
  7941. "$ref": "#/components/schemas/NotFoundError"
  7942. }
  7943. }
  7944. }
  7945. }
  7946. },
  7947. "description": "Delete a part from a message.",
  7948. "x-codeSamples": [
  7949. {
  7950. "lang": "js",
  7951. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7952. }
  7953. ]
  7954. },
  7955. "patch": {
  7956. "tags": ["session"],
  7957. "operationId": "part.update",
  7958. "parameters": [
  7959. {
  7960. "name": "sessionID",
  7961. "in": "path",
  7962. "schema": {
  7963. "type": "string",
  7964. "pattern": "^ses"
  7965. },
  7966. "required": true
  7967. },
  7968. {
  7969. "name": "messageID",
  7970. "in": "path",
  7971. "schema": {
  7972. "type": "string",
  7973. "pattern": "^msg"
  7974. },
  7975. "required": true
  7976. },
  7977. {
  7978. "name": "partID",
  7979. "in": "path",
  7980. "schema": {
  7981. "type": "string",
  7982. "pattern": "^prt"
  7983. },
  7984. "required": true
  7985. },
  7986. {
  7987. "name": "directory",
  7988. "in": "query",
  7989. "schema": {
  7990. "type": "string"
  7991. },
  7992. "required": false
  7993. },
  7994. {
  7995. "name": "workspace",
  7996. "in": "query",
  7997. "schema": {
  7998. "type": "string"
  7999. },
  8000. "required": false
  8001. }
  8002. ],
  8003. "responses": {
  8004. "200": {
  8005. "description": "Successfully updated part",
  8006. "content": {
  8007. "application/json": {
  8008. "schema": {
  8009. "$ref": "#/components/schemas/Part"
  8010. }
  8011. }
  8012. }
  8013. },
  8014. "400": {
  8015. "description": "BadRequest | InvalidRequestError",
  8016. "content": {
  8017. "application/json": {
  8018. "schema": {
  8019. "anyOf": [
  8020. {
  8021. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8022. },
  8023. {
  8024. "$ref": "#/components/schemas/InvalidRequestError"
  8025. }
  8026. ]
  8027. }
  8028. }
  8029. }
  8030. },
  8031. "404": {
  8032. "description": "NotFoundError",
  8033. "content": {
  8034. "application/json": {
  8035. "schema": {
  8036. "$ref": "#/components/schemas/NotFoundError"
  8037. }
  8038. }
  8039. }
  8040. }
  8041. },
  8042. "description": "Update a part in a message.",
  8043. "requestBody": {
  8044. "content": {
  8045. "application/json": {
  8046. "schema": {
  8047. "$ref": "#/components/schemas/Part"
  8048. }
  8049. }
  8050. }
  8051. },
  8052. "x-codeSamples": [
  8053. {
  8054. "lang": "js",
  8055. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8056. }
  8057. ]
  8058. }
  8059. },
  8060. "/sync/start": {
  8061. "post": {
  8062. "tags": ["sync"],
  8063. "operationId": "sync.start",
  8064. "parameters": [
  8065. {
  8066. "name": "directory",
  8067. "in": "query",
  8068. "schema": {
  8069. "type": "string"
  8070. },
  8071. "required": false
  8072. },
  8073. {
  8074. "name": "workspace",
  8075. "in": "query",
  8076. "schema": {
  8077. "type": "string"
  8078. },
  8079. "required": false
  8080. }
  8081. ],
  8082. "responses": {
  8083. "200": {
  8084. "description": "Workspace sync started",
  8085. "content": {
  8086. "application/json": {
  8087. "schema": {
  8088. "type": "boolean",
  8089. "description": "Workspace sync started"
  8090. }
  8091. }
  8092. }
  8093. },
  8094. "400": {
  8095. "description": "Bad request",
  8096. "content": {
  8097. "application/json": {
  8098. "schema": {
  8099. "$ref": "#/components/schemas/BadRequestError"
  8100. }
  8101. }
  8102. }
  8103. }
  8104. },
  8105. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8106. "summary": "Start workspace sync",
  8107. "x-codeSamples": [
  8108. {
  8109. "lang": "js",
  8110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8111. }
  8112. ]
  8113. }
  8114. },
  8115. "/sync/replay": {
  8116. "post": {
  8117. "tags": ["sync"],
  8118. "operationId": "sync.replay",
  8119. "parameters": [
  8120. {
  8121. "name": "directory",
  8122. "in": "query",
  8123. "schema": {
  8124. "type": "string"
  8125. },
  8126. "required": false
  8127. },
  8128. {
  8129. "name": "workspace",
  8130. "in": "query",
  8131. "schema": {
  8132. "type": "string"
  8133. },
  8134. "required": false
  8135. }
  8136. ],
  8137. "responses": {
  8138. "200": {
  8139. "description": "Replayed sync events",
  8140. "content": {
  8141. "application/json": {
  8142. "schema": {
  8143. "type": "object",
  8144. "properties": {
  8145. "sessionID": {
  8146. "type": "string"
  8147. }
  8148. },
  8149. "required": ["sessionID"],
  8150. "additionalProperties": false,
  8151. "description": "Replayed sync events"
  8152. }
  8153. }
  8154. }
  8155. },
  8156. "400": {
  8157. "description": "BadRequest | InvalidRequestError",
  8158. "content": {
  8159. "application/json": {
  8160. "schema": {
  8161. "anyOf": [
  8162. {
  8163. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8164. },
  8165. {
  8166. "$ref": "#/components/schemas/InvalidRequestError"
  8167. }
  8168. ]
  8169. }
  8170. }
  8171. }
  8172. }
  8173. },
  8174. "description": "Validate and replay a complete sync event history.",
  8175. "summary": "Replay sync events",
  8176. "requestBody": {
  8177. "content": {
  8178. "application/json": {
  8179. "schema": {
  8180. "type": "object",
  8181. "properties": {
  8182. "directory": {
  8183. "type": "string"
  8184. },
  8185. "events": {
  8186. "type": "array",
  8187. "minItems": 1,
  8188. "items": {
  8189. "type": "object",
  8190. "properties": {
  8191. "id": {
  8192. "type": "string",
  8193. "pattern": "^evt_"
  8194. },
  8195. "aggregateID": {
  8196. "type": "string"
  8197. },
  8198. "seq": {
  8199. "type": "integer",
  8200. "minimum": 0
  8201. },
  8202. "type": {
  8203. "type": "string"
  8204. },
  8205. "data": {
  8206. "type": "object"
  8207. }
  8208. },
  8209. "required": ["id", "aggregateID", "seq", "type", "data"],
  8210. "additionalProperties": false
  8211. }
  8212. }
  8213. },
  8214. "required": ["directory", "events"],
  8215. "additionalProperties": false
  8216. }
  8217. }
  8218. }
  8219. },
  8220. "x-codeSamples": [
  8221. {
  8222. "lang": "js",
  8223. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8224. }
  8225. ]
  8226. }
  8227. },
  8228. "/sync/steal": {
  8229. "post": {
  8230. "tags": ["sync"],
  8231. "operationId": "sync.steal",
  8232. "parameters": [
  8233. {
  8234. "name": "directory",
  8235. "in": "query",
  8236. "schema": {
  8237. "type": "string"
  8238. },
  8239. "required": false
  8240. },
  8241. {
  8242. "name": "workspace",
  8243. "in": "query",
  8244. "schema": {
  8245. "type": "string"
  8246. },
  8247. "required": false
  8248. }
  8249. ],
  8250. "responses": {
  8251. "200": {
  8252. "description": "Session stolen into workspace",
  8253. "content": {
  8254. "application/json": {
  8255. "schema": {
  8256. "type": "object",
  8257. "properties": {
  8258. "sessionID": {
  8259. "type": "string",
  8260. "pattern": "^ses"
  8261. }
  8262. },
  8263. "required": ["sessionID"],
  8264. "additionalProperties": false,
  8265. "description": "Session stolen into workspace"
  8266. }
  8267. }
  8268. }
  8269. },
  8270. "400": {
  8271. "description": "BadRequest | InvalidRequestError",
  8272. "content": {
  8273. "application/json": {
  8274. "schema": {
  8275. "anyOf": [
  8276. {
  8277. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8278. },
  8279. {
  8280. "$ref": "#/components/schemas/InvalidRequestError"
  8281. }
  8282. ]
  8283. }
  8284. }
  8285. }
  8286. }
  8287. },
  8288. "description": "Update a session to belong to the current workspace through the sync event system.",
  8289. "summary": "Steal session into workspace",
  8290. "requestBody": {
  8291. "content": {
  8292. "application/json": {
  8293. "schema": {
  8294. "type": "object",
  8295. "properties": {
  8296. "sessionID": {
  8297. "type": "string",
  8298. "pattern": "^ses"
  8299. }
  8300. },
  8301. "required": ["sessionID"],
  8302. "additionalProperties": false
  8303. }
  8304. }
  8305. }
  8306. },
  8307. "x-codeSamples": [
  8308. {
  8309. "lang": "js",
  8310. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8311. }
  8312. ]
  8313. }
  8314. },
  8315. "/sync/history": {
  8316. "post": {
  8317. "tags": ["sync"],
  8318. "operationId": "sync.history.list",
  8319. "parameters": [
  8320. {
  8321. "name": "directory",
  8322. "in": "query",
  8323. "schema": {
  8324. "type": "string"
  8325. },
  8326. "required": false
  8327. },
  8328. {
  8329. "name": "workspace",
  8330. "in": "query",
  8331. "schema": {
  8332. "type": "string"
  8333. },
  8334. "required": false
  8335. }
  8336. ],
  8337. "responses": {
  8338. "200": {
  8339. "description": "Sync events",
  8340. "content": {
  8341. "application/json": {
  8342. "schema": {
  8343. "type": "array",
  8344. "items": {
  8345. "type": "object",
  8346. "properties": {
  8347. "id": {
  8348. "type": "string",
  8349. "pattern": "^evt_"
  8350. },
  8351. "aggregate_id": {
  8352. "type": "string"
  8353. },
  8354. "seq": {
  8355. "type": "integer",
  8356. "minimum": 0
  8357. },
  8358. "type": {
  8359. "type": "string"
  8360. },
  8361. "data": {
  8362. "type": "object"
  8363. }
  8364. },
  8365. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8366. "additionalProperties": false
  8367. },
  8368. "description": "Sync events"
  8369. }
  8370. }
  8371. }
  8372. },
  8373. "400": {
  8374. "description": "BadRequest | InvalidRequestError",
  8375. "content": {
  8376. "application/json": {
  8377. "schema": {
  8378. "anyOf": [
  8379. {
  8380. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8381. },
  8382. {
  8383. "$ref": "#/components/schemas/InvalidRequestError"
  8384. }
  8385. ]
  8386. }
  8387. }
  8388. }
  8389. }
  8390. },
  8391. "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.",
  8392. "summary": "List sync events",
  8393. "requestBody": {
  8394. "content": {
  8395. "application/json": {
  8396. "schema": {
  8397. "type": "object",
  8398. "additionalProperties": {
  8399. "type": "integer",
  8400. "minimum": 0
  8401. }
  8402. }
  8403. }
  8404. }
  8405. },
  8406. "x-codeSamples": [
  8407. {
  8408. "lang": "js",
  8409. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8410. }
  8411. ]
  8412. }
  8413. },
  8414. "/tui/append-prompt": {
  8415. "post": {
  8416. "tags": ["tui"],
  8417. "operationId": "tui.appendPrompt",
  8418. "parameters": [
  8419. {
  8420. "name": "directory",
  8421. "in": "query",
  8422. "schema": {
  8423. "type": "string"
  8424. },
  8425. "required": false
  8426. },
  8427. {
  8428. "name": "workspace",
  8429. "in": "query",
  8430. "schema": {
  8431. "type": "string"
  8432. },
  8433. "required": false
  8434. }
  8435. ],
  8436. "responses": {
  8437. "200": {
  8438. "description": "Prompt processed successfully",
  8439. "content": {
  8440. "application/json": {
  8441. "schema": {
  8442. "type": "boolean",
  8443. "description": "Prompt processed successfully"
  8444. }
  8445. }
  8446. }
  8447. },
  8448. "400": {
  8449. "description": "BadRequest | InvalidRequestError",
  8450. "content": {
  8451. "application/json": {
  8452. "schema": {
  8453. "anyOf": [
  8454. {
  8455. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8456. },
  8457. {
  8458. "$ref": "#/components/schemas/InvalidRequestError"
  8459. }
  8460. ]
  8461. }
  8462. }
  8463. }
  8464. }
  8465. },
  8466. "description": "Append prompt to the TUI.",
  8467. "summary": "Append TUI prompt",
  8468. "requestBody": {
  8469. "content": {
  8470. "application/json": {
  8471. "schema": {
  8472. "type": "object",
  8473. "properties": {
  8474. "text": {
  8475. "type": "string"
  8476. }
  8477. },
  8478. "required": ["text"],
  8479. "additionalProperties": false
  8480. }
  8481. }
  8482. }
  8483. },
  8484. "x-codeSamples": [
  8485. {
  8486. "lang": "js",
  8487. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8488. }
  8489. ]
  8490. }
  8491. },
  8492. "/tui/open-help": {
  8493. "post": {
  8494. "tags": ["tui"],
  8495. "operationId": "tui.openHelp",
  8496. "parameters": [
  8497. {
  8498. "name": "directory",
  8499. "in": "query",
  8500. "schema": {
  8501. "type": "string"
  8502. },
  8503. "required": false
  8504. },
  8505. {
  8506. "name": "workspace",
  8507. "in": "query",
  8508. "schema": {
  8509. "type": "string"
  8510. },
  8511. "required": false
  8512. }
  8513. ],
  8514. "responses": {
  8515. "200": {
  8516. "description": "Help dialog opened successfully",
  8517. "content": {
  8518. "application/json": {
  8519. "schema": {
  8520. "type": "boolean",
  8521. "description": "Help dialog opened successfully"
  8522. }
  8523. }
  8524. }
  8525. },
  8526. "400": {
  8527. "description": "Bad request",
  8528. "content": {
  8529. "application/json": {
  8530. "schema": {
  8531. "$ref": "#/components/schemas/BadRequestError"
  8532. }
  8533. }
  8534. }
  8535. }
  8536. },
  8537. "description": "Open the help dialog in the TUI to display user assistance information.",
  8538. "summary": "Open help dialog",
  8539. "x-codeSamples": [
  8540. {
  8541. "lang": "js",
  8542. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8543. }
  8544. ]
  8545. }
  8546. },
  8547. "/tui/open-sessions": {
  8548. "post": {
  8549. "tags": ["tui"],
  8550. "operationId": "tui.openSessions",
  8551. "parameters": [
  8552. {
  8553. "name": "directory",
  8554. "in": "query",
  8555. "schema": {
  8556. "type": "string"
  8557. },
  8558. "required": false
  8559. },
  8560. {
  8561. "name": "workspace",
  8562. "in": "query",
  8563. "schema": {
  8564. "type": "string"
  8565. },
  8566. "required": false
  8567. }
  8568. ],
  8569. "responses": {
  8570. "200": {
  8571. "description": "Session dialog opened successfully",
  8572. "content": {
  8573. "application/json": {
  8574. "schema": {
  8575. "type": "boolean",
  8576. "description": "Session dialog opened successfully"
  8577. }
  8578. }
  8579. }
  8580. },
  8581. "400": {
  8582. "description": "Bad request",
  8583. "content": {
  8584. "application/json": {
  8585. "schema": {
  8586. "$ref": "#/components/schemas/BadRequestError"
  8587. }
  8588. }
  8589. }
  8590. }
  8591. },
  8592. "description": "Open the session dialog.",
  8593. "summary": "Open sessions dialog",
  8594. "x-codeSamples": [
  8595. {
  8596. "lang": "js",
  8597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8598. }
  8599. ]
  8600. }
  8601. },
  8602. "/tui/open-themes": {
  8603. "post": {
  8604. "tags": ["tui"],
  8605. "operationId": "tui.openThemes",
  8606. "parameters": [
  8607. {
  8608. "name": "directory",
  8609. "in": "query",
  8610. "schema": {
  8611. "type": "string"
  8612. },
  8613. "required": false
  8614. },
  8615. {
  8616. "name": "workspace",
  8617. "in": "query",
  8618. "schema": {
  8619. "type": "string"
  8620. },
  8621. "required": false
  8622. }
  8623. ],
  8624. "responses": {
  8625. "200": {
  8626. "description": "Theme dialog opened successfully",
  8627. "content": {
  8628. "application/json": {
  8629. "schema": {
  8630. "type": "boolean",
  8631. "description": "Theme dialog opened successfully"
  8632. }
  8633. }
  8634. }
  8635. },
  8636. "400": {
  8637. "description": "Bad request",
  8638. "content": {
  8639. "application/json": {
  8640. "schema": {
  8641. "$ref": "#/components/schemas/BadRequestError"
  8642. }
  8643. }
  8644. }
  8645. }
  8646. },
  8647. "description": "Open the theme dialog.",
  8648. "summary": "Open themes dialog",
  8649. "x-codeSamples": [
  8650. {
  8651. "lang": "js",
  8652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8653. }
  8654. ]
  8655. }
  8656. },
  8657. "/tui/open-models": {
  8658. "post": {
  8659. "tags": ["tui"],
  8660. "operationId": "tui.openModels",
  8661. "parameters": [
  8662. {
  8663. "name": "directory",
  8664. "in": "query",
  8665. "schema": {
  8666. "type": "string"
  8667. },
  8668. "required": false
  8669. },
  8670. {
  8671. "name": "workspace",
  8672. "in": "query",
  8673. "schema": {
  8674. "type": "string"
  8675. },
  8676. "required": false
  8677. }
  8678. ],
  8679. "responses": {
  8680. "200": {
  8681. "description": "Model dialog opened successfully",
  8682. "content": {
  8683. "application/json": {
  8684. "schema": {
  8685. "type": "boolean",
  8686. "description": "Model dialog opened successfully"
  8687. }
  8688. }
  8689. }
  8690. },
  8691. "400": {
  8692. "description": "Bad request",
  8693. "content": {
  8694. "application/json": {
  8695. "schema": {
  8696. "$ref": "#/components/schemas/BadRequestError"
  8697. }
  8698. }
  8699. }
  8700. }
  8701. },
  8702. "description": "Open the model dialog.",
  8703. "summary": "Open models dialog",
  8704. "x-codeSamples": [
  8705. {
  8706. "lang": "js",
  8707. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8708. }
  8709. ]
  8710. }
  8711. },
  8712. "/tui/submit-prompt": {
  8713. "post": {
  8714. "tags": ["tui"],
  8715. "operationId": "tui.submitPrompt",
  8716. "parameters": [
  8717. {
  8718. "name": "directory",
  8719. "in": "query",
  8720. "schema": {
  8721. "type": "string"
  8722. },
  8723. "required": false
  8724. },
  8725. {
  8726. "name": "workspace",
  8727. "in": "query",
  8728. "schema": {
  8729. "type": "string"
  8730. },
  8731. "required": false
  8732. }
  8733. ],
  8734. "responses": {
  8735. "200": {
  8736. "description": "Prompt submitted successfully",
  8737. "content": {
  8738. "application/json": {
  8739. "schema": {
  8740. "type": "boolean",
  8741. "description": "Prompt submitted successfully"
  8742. }
  8743. }
  8744. }
  8745. },
  8746. "400": {
  8747. "description": "Bad request",
  8748. "content": {
  8749. "application/json": {
  8750. "schema": {
  8751. "$ref": "#/components/schemas/BadRequestError"
  8752. }
  8753. }
  8754. }
  8755. }
  8756. },
  8757. "description": "Submit the prompt.",
  8758. "summary": "Submit TUI prompt",
  8759. "x-codeSamples": [
  8760. {
  8761. "lang": "js",
  8762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8763. }
  8764. ]
  8765. }
  8766. },
  8767. "/tui/clear-prompt": {
  8768. "post": {
  8769. "tags": ["tui"],
  8770. "operationId": "tui.clearPrompt",
  8771. "parameters": [
  8772. {
  8773. "name": "directory",
  8774. "in": "query",
  8775. "schema": {
  8776. "type": "string"
  8777. },
  8778. "required": false
  8779. },
  8780. {
  8781. "name": "workspace",
  8782. "in": "query",
  8783. "schema": {
  8784. "type": "string"
  8785. },
  8786. "required": false
  8787. }
  8788. ],
  8789. "responses": {
  8790. "200": {
  8791. "description": "Prompt cleared successfully",
  8792. "content": {
  8793. "application/json": {
  8794. "schema": {
  8795. "type": "boolean",
  8796. "description": "Prompt cleared successfully"
  8797. }
  8798. }
  8799. }
  8800. },
  8801. "400": {
  8802. "description": "Bad request",
  8803. "content": {
  8804. "application/json": {
  8805. "schema": {
  8806. "$ref": "#/components/schemas/BadRequestError"
  8807. }
  8808. }
  8809. }
  8810. }
  8811. },
  8812. "description": "Clear the prompt.",
  8813. "summary": "Clear TUI prompt",
  8814. "x-codeSamples": [
  8815. {
  8816. "lang": "js",
  8817. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8818. }
  8819. ]
  8820. }
  8821. },
  8822. "/tui/execute-command": {
  8823. "post": {
  8824. "tags": ["tui"],
  8825. "operationId": "tui.executeCommand",
  8826. "parameters": [
  8827. {
  8828. "name": "directory",
  8829. "in": "query",
  8830. "schema": {
  8831. "type": "string"
  8832. },
  8833. "required": false
  8834. },
  8835. {
  8836. "name": "workspace",
  8837. "in": "query",
  8838. "schema": {
  8839. "type": "string"
  8840. },
  8841. "required": false
  8842. }
  8843. ],
  8844. "responses": {
  8845. "200": {
  8846. "description": "Command executed successfully",
  8847. "content": {
  8848. "application/json": {
  8849. "schema": {
  8850. "type": "boolean",
  8851. "description": "Command executed successfully"
  8852. }
  8853. }
  8854. }
  8855. },
  8856. "400": {
  8857. "description": "BadRequest | InvalidRequestError",
  8858. "content": {
  8859. "application/json": {
  8860. "schema": {
  8861. "anyOf": [
  8862. {
  8863. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8864. },
  8865. {
  8866. "$ref": "#/components/schemas/InvalidRequestError"
  8867. }
  8868. ]
  8869. }
  8870. }
  8871. }
  8872. }
  8873. },
  8874. "description": "Execute a TUI command.",
  8875. "summary": "Execute TUI command",
  8876. "requestBody": {
  8877. "content": {
  8878. "application/json": {
  8879. "schema": {
  8880. "type": "object",
  8881. "properties": {
  8882. "command": {
  8883. "type": "string"
  8884. }
  8885. },
  8886. "required": ["command"],
  8887. "additionalProperties": false
  8888. }
  8889. }
  8890. }
  8891. },
  8892. "x-codeSamples": [
  8893. {
  8894. "lang": "js",
  8895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8896. }
  8897. ]
  8898. }
  8899. },
  8900. "/tui/show-toast": {
  8901. "post": {
  8902. "tags": ["tui"],
  8903. "operationId": "tui.showToast",
  8904. "parameters": [
  8905. {
  8906. "name": "directory",
  8907. "in": "query",
  8908. "schema": {
  8909. "type": "string"
  8910. },
  8911. "required": false
  8912. },
  8913. {
  8914. "name": "workspace",
  8915. "in": "query",
  8916. "schema": {
  8917. "type": "string"
  8918. },
  8919. "required": false
  8920. }
  8921. ],
  8922. "responses": {
  8923. "200": {
  8924. "description": "Toast notification shown successfully",
  8925. "content": {
  8926. "application/json": {
  8927. "schema": {
  8928. "type": "boolean",
  8929. "description": "Toast notification shown successfully"
  8930. }
  8931. }
  8932. }
  8933. },
  8934. "400": {
  8935. "description": "Bad request",
  8936. "content": {
  8937. "application/json": {
  8938. "schema": {
  8939. "$ref": "#/components/schemas/BadRequestError"
  8940. }
  8941. }
  8942. }
  8943. }
  8944. },
  8945. "description": "Show a toast notification in the TUI.",
  8946. "summary": "Show TUI toast",
  8947. "requestBody": {
  8948. "content": {
  8949. "application/json": {
  8950. "schema": {
  8951. "type": "object",
  8952. "properties": {
  8953. "title": {
  8954. "type": "string"
  8955. },
  8956. "message": {
  8957. "type": "string"
  8958. },
  8959. "variant": {
  8960. "type": "string",
  8961. "enum": ["info", "success", "warning", "error"]
  8962. },
  8963. "duration": {
  8964. "type": "integer",
  8965. "exclusiveMinimum": 0
  8966. }
  8967. },
  8968. "required": ["message", "variant"],
  8969. "additionalProperties": false
  8970. }
  8971. }
  8972. }
  8973. },
  8974. "x-codeSamples": [
  8975. {
  8976. "lang": "js",
  8977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8978. }
  8979. ]
  8980. }
  8981. },
  8982. "/tui/publish": {
  8983. "post": {
  8984. "tags": ["tui"],
  8985. "operationId": "tui.publish",
  8986. "parameters": [
  8987. {
  8988. "name": "directory",
  8989. "in": "query",
  8990. "schema": {
  8991. "type": "string"
  8992. },
  8993. "required": false
  8994. },
  8995. {
  8996. "name": "workspace",
  8997. "in": "query",
  8998. "schema": {
  8999. "type": "string"
  9000. },
  9001. "required": false
  9002. }
  9003. ],
  9004. "responses": {
  9005. "200": {
  9006. "description": "Event published successfully",
  9007. "content": {
  9008. "application/json": {
  9009. "schema": {
  9010. "type": "boolean",
  9011. "description": "Event published successfully"
  9012. }
  9013. }
  9014. }
  9015. },
  9016. "400": {
  9017. "description": "BadRequest | InvalidRequestError",
  9018. "content": {
  9019. "application/json": {
  9020. "schema": {
  9021. "anyOf": [
  9022. {
  9023. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9024. },
  9025. {
  9026. "$ref": "#/components/schemas/InvalidRequestError"
  9027. }
  9028. ]
  9029. }
  9030. }
  9031. }
  9032. }
  9033. },
  9034. "description": "Publish a TUI event.",
  9035. "summary": "Publish TUI event",
  9036. "requestBody": {
  9037. "content": {
  9038. "application/json": {
  9039. "schema": {
  9040. "anyOf": [
  9041. {
  9042. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9043. },
  9044. {
  9045. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9046. },
  9047. {
  9048. "$ref": "#/components/schemas/EventTuiToastShow"
  9049. },
  9050. {
  9051. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9052. }
  9053. ]
  9054. }
  9055. }
  9056. }
  9057. },
  9058. "x-codeSamples": [
  9059. {
  9060. "lang": "js",
  9061. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9062. }
  9063. ]
  9064. }
  9065. },
  9066. "/tui/select-session": {
  9067. "post": {
  9068. "tags": ["tui"],
  9069. "operationId": "tui.selectSession",
  9070. "parameters": [
  9071. {
  9072. "name": "directory",
  9073. "in": "query",
  9074. "schema": {
  9075. "type": "string"
  9076. },
  9077. "required": false
  9078. },
  9079. {
  9080. "name": "workspace",
  9081. "in": "query",
  9082. "schema": {
  9083. "type": "string"
  9084. },
  9085. "required": false
  9086. }
  9087. ],
  9088. "responses": {
  9089. "200": {
  9090. "description": "Session selected successfully",
  9091. "content": {
  9092. "application/json": {
  9093. "schema": {
  9094. "type": "boolean",
  9095. "description": "Session selected successfully"
  9096. }
  9097. }
  9098. }
  9099. },
  9100. "400": {
  9101. "description": "BadRequest | InvalidRequestError",
  9102. "content": {
  9103. "application/json": {
  9104. "schema": {
  9105. "anyOf": [
  9106. {
  9107. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9108. },
  9109. {
  9110. "$ref": "#/components/schemas/InvalidRequestError"
  9111. }
  9112. ]
  9113. }
  9114. }
  9115. }
  9116. },
  9117. "404": {
  9118. "description": "NotFoundError",
  9119. "content": {
  9120. "application/json": {
  9121. "schema": {
  9122. "$ref": "#/components/schemas/NotFoundError"
  9123. }
  9124. }
  9125. }
  9126. }
  9127. },
  9128. "description": "Navigate the TUI to display the specified session.",
  9129. "summary": "Select session",
  9130. "requestBody": {
  9131. "content": {
  9132. "application/json": {
  9133. "schema": {
  9134. "type": "object",
  9135. "properties": {
  9136. "sessionID": {
  9137. "type": "string",
  9138. "pattern": "^ses",
  9139. "description": "Session ID to navigate to"
  9140. }
  9141. },
  9142. "required": ["sessionID"],
  9143. "additionalProperties": false
  9144. }
  9145. }
  9146. }
  9147. },
  9148. "x-codeSamples": [
  9149. {
  9150. "lang": "js",
  9151. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9152. }
  9153. ]
  9154. }
  9155. },
  9156. "/tui/control/next": {
  9157. "get": {
  9158. "tags": ["tui"],
  9159. "operationId": "tui.control.next",
  9160. "parameters": [
  9161. {
  9162. "name": "directory",
  9163. "in": "query",
  9164. "schema": {
  9165. "type": "string"
  9166. },
  9167. "required": false
  9168. },
  9169. {
  9170. "name": "workspace",
  9171. "in": "query",
  9172. "schema": {
  9173. "type": "string"
  9174. },
  9175. "required": false
  9176. }
  9177. ],
  9178. "responses": {
  9179. "200": {
  9180. "description": "Next TUI request",
  9181. "content": {
  9182. "application/json": {
  9183. "schema": {
  9184. "type": "object",
  9185. "properties": {
  9186. "path": {
  9187. "type": "string"
  9188. },
  9189. "body": {}
  9190. },
  9191. "required": ["path", "body"],
  9192. "additionalProperties": false,
  9193. "description": "Next TUI request"
  9194. }
  9195. }
  9196. }
  9197. },
  9198. "400": {
  9199. "description": "Bad request",
  9200. "content": {
  9201. "application/json": {
  9202. "schema": {
  9203. "$ref": "#/components/schemas/BadRequestError"
  9204. }
  9205. }
  9206. }
  9207. }
  9208. },
  9209. "description": "Retrieve the next TUI request from the queue for processing.",
  9210. "summary": "Get next TUI request",
  9211. "x-codeSamples": [
  9212. {
  9213. "lang": "js",
  9214. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9215. }
  9216. ]
  9217. }
  9218. },
  9219. "/tui/control/response": {
  9220. "post": {
  9221. "tags": ["tui"],
  9222. "operationId": "tui.control.response",
  9223. "parameters": [
  9224. {
  9225. "name": "directory",
  9226. "in": "query",
  9227. "schema": {
  9228. "type": "string"
  9229. },
  9230. "required": false
  9231. },
  9232. {
  9233. "name": "workspace",
  9234. "in": "query",
  9235. "schema": {
  9236. "type": "string"
  9237. },
  9238. "required": false
  9239. }
  9240. ],
  9241. "responses": {
  9242. "200": {
  9243. "description": "Response submitted successfully",
  9244. "content": {
  9245. "application/json": {
  9246. "schema": {
  9247. "type": "boolean",
  9248. "description": "Response submitted successfully"
  9249. }
  9250. }
  9251. }
  9252. },
  9253. "400": {
  9254. "description": "Bad request",
  9255. "content": {
  9256. "application/json": {
  9257. "schema": {
  9258. "$ref": "#/components/schemas/BadRequestError"
  9259. }
  9260. }
  9261. }
  9262. }
  9263. },
  9264. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9265. "summary": "Submit TUI response",
  9266. "requestBody": {
  9267. "content": {
  9268. "application/json": {
  9269. "schema": {}
  9270. }
  9271. }
  9272. },
  9273. "x-codeSamples": [
  9274. {
  9275. "lang": "js",
  9276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9277. }
  9278. ]
  9279. }
  9280. },
  9281. "/experimental/workspace/adapter": {
  9282. "get": {
  9283. "tags": ["workspace"],
  9284. "operationId": "experimental.workspace.adapter.list",
  9285. "parameters": [
  9286. {
  9287. "name": "directory",
  9288. "in": "query",
  9289. "schema": {
  9290. "type": "string"
  9291. },
  9292. "required": false
  9293. },
  9294. {
  9295. "name": "workspace",
  9296. "in": "query",
  9297. "schema": {
  9298. "type": "string"
  9299. },
  9300. "required": false
  9301. }
  9302. ],
  9303. "responses": {
  9304. "200": {
  9305. "description": "Workspace adapters",
  9306. "content": {
  9307. "application/json": {
  9308. "schema": {
  9309. "type": "array",
  9310. "items": {
  9311. "type": "object",
  9312. "properties": {
  9313. "type": {
  9314. "type": "string"
  9315. },
  9316. "name": {
  9317. "type": "string"
  9318. },
  9319. "description": {
  9320. "type": "string"
  9321. }
  9322. },
  9323. "required": ["type", "name", "description"],
  9324. "additionalProperties": false
  9325. },
  9326. "description": "Workspace adapters"
  9327. }
  9328. }
  9329. }
  9330. },
  9331. "400": {
  9332. "description": "Bad request",
  9333. "content": {
  9334. "application/json": {
  9335. "schema": {
  9336. "$ref": "#/components/schemas/BadRequestError"
  9337. }
  9338. }
  9339. }
  9340. }
  9341. },
  9342. "description": "List all available workspace adapters for the current project.",
  9343. "summary": "List workspace adapters",
  9344. "x-codeSamples": [
  9345. {
  9346. "lang": "js",
  9347. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9348. }
  9349. ]
  9350. }
  9351. },
  9352. "/experimental/workspace": {
  9353. "get": {
  9354. "tags": ["workspace"],
  9355. "operationId": "experimental.workspace.list",
  9356. "parameters": [
  9357. {
  9358. "name": "directory",
  9359. "in": "query",
  9360. "schema": {
  9361. "type": "string"
  9362. },
  9363. "required": false
  9364. },
  9365. {
  9366. "name": "workspace",
  9367. "in": "query",
  9368. "schema": {
  9369. "type": "string"
  9370. },
  9371. "required": false
  9372. }
  9373. ],
  9374. "responses": {
  9375. "200": {
  9376. "description": "Workspaces",
  9377. "content": {
  9378. "application/json": {
  9379. "schema": {
  9380. "type": "array",
  9381. "items": {
  9382. "$ref": "#/components/schemas/Workspace"
  9383. },
  9384. "description": "Workspaces"
  9385. }
  9386. }
  9387. }
  9388. },
  9389. "400": {
  9390. "description": "Bad request",
  9391. "content": {
  9392. "application/json": {
  9393. "schema": {
  9394. "$ref": "#/components/schemas/BadRequestError"
  9395. }
  9396. }
  9397. }
  9398. }
  9399. },
  9400. "description": "List all workspaces.",
  9401. "summary": "List workspaces",
  9402. "x-codeSamples": [
  9403. {
  9404. "lang": "js",
  9405. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9406. }
  9407. ]
  9408. },
  9409. "post": {
  9410. "tags": ["workspace"],
  9411. "operationId": "experimental.workspace.create",
  9412. "parameters": [
  9413. {
  9414. "name": "directory",
  9415. "in": "query",
  9416. "schema": {
  9417. "type": "string"
  9418. },
  9419. "required": false
  9420. },
  9421. {
  9422. "name": "workspace",
  9423. "in": "query",
  9424. "schema": {
  9425. "type": "string"
  9426. },
  9427. "required": false
  9428. }
  9429. ],
  9430. "responses": {
  9431. "200": {
  9432. "description": "Workspace created",
  9433. "content": {
  9434. "application/json": {
  9435. "schema": {
  9436. "$ref": "#/components/schemas/Workspace"
  9437. }
  9438. }
  9439. }
  9440. },
  9441. "400": {
  9442. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9443. "content": {
  9444. "application/json": {
  9445. "schema": {
  9446. "anyOf": [
  9447. {
  9448. "$ref": "#/components/schemas/WorkspaceCreateError"
  9449. },
  9450. {
  9451. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9452. },
  9453. {
  9454. "$ref": "#/components/schemas/InvalidRequestError"
  9455. }
  9456. ]
  9457. }
  9458. }
  9459. }
  9460. }
  9461. },
  9462. "description": "Create a workspace for the current project.",
  9463. "summary": "Create workspace",
  9464. "requestBody": {
  9465. "content": {
  9466. "application/json": {
  9467. "schema": {
  9468. "type": "object",
  9469. "properties": {
  9470. "id": {
  9471. "type": "string",
  9472. "pattern": "^wrk"
  9473. },
  9474. "type": {
  9475. "type": "string"
  9476. },
  9477. "branch": {
  9478. "anyOf": [
  9479. {
  9480. "type": "string"
  9481. },
  9482. {
  9483. "type": "null"
  9484. }
  9485. ]
  9486. },
  9487. "extra": {
  9488. "anyOf": [
  9489. {},
  9490. {
  9491. "type": "null"
  9492. }
  9493. ]
  9494. }
  9495. },
  9496. "required": ["type"],
  9497. "additionalProperties": false
  9498. }
  9499. }
  9500. }
  9501. },
  9502. "x-codeSamples": [
  9503. {
  9504. "lang": "js",
  9505. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9506. }
  9507. ]
  9508. }
  9509. },
  9510. "/experimental/workspace/sync-list": {
  9511. "post": {
  9512. "tags": ["workspace"],
  9513. "operationId": "experimental.workspace.syncList",
  9514. "parameters": [
  9515. {
  9516. "name": "directory",
  9517. "in": "query",
  9518. "schema": {
  9519. "type": "string"
  9520. },
  9521. "required": false
  9522. },
  9523. {
  9524. "name": "workspace",
  9525. "in": "query",
  9526. "schema": {
  9527. "type": "string"
  9528. },
  9529. "required": false
  9530. }
  9531. ],
  9532. "responses": {
  9533. "204": {
  9534. "description": "Workspace list synced"
  9535. },
  9536. "400": {
  9537. "description": "Bad request",
  9538. "content": {
  9539. "application/json": {
  9540. "schema": {
  9541. "$ref": "#/components/schemas/BadRequestError"
  9542. }
  9543. }
  9544. }
  9545. }
  9546. },
  9547. "description": "Register missing workspaces returned by workspace adapters.",
  9548. "summary": "Sync workspace list",
  9549. "x-codeSamples": [
  9550. {
  9551. "lang": "js",
  9552. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9553. }
  9554. ]
  9555. }
  9556. },
  9557. "/experimental/workspace/status": {
  9558. "get": {
  9559. "tags": ["workspace"],
  9560. "operationId": "experimental.workspace.status",
  9561. "parameters": [
  9562. {
  9563. "name": "directory",
  9564. "in": "query",
  9565. "schema": {
  9566. "type": "string"
  9567. },
  9568. "required": false
  9569. },
  9570. {
  9571. "name": "workspace",
  9572. "in": "query",
  9573. "schema": {
  9574. "type": "string"
  9575. },
  9576. "required": false
  9577. }
  9578. ],
  9579. "responses": {
  9580. "200": {
  9581. "description": "Workspace status",
  9582. "content": {
  9583. "application/json": {
  9584. "schema": {
  9585. "type": "array",
  9586. "items": {
  9587. "$ref": "#/components/schemas/WorkspaceEventConnectionStatus"
  9588. },
  9589. "description": "Workspace status"
  9590. }
  9591. }
  9592. }
  9593. },
  9594. "400": {
  9595. "description": "Bad request",
  9596. "content": {
  9597. "application/json": {
  9598. "schema": {
  9599. "$ref": "#/components/schemas/BadRequestError"
  9600. }
  9601. }
  9602. }
  9603. }
  9604. },
  9605. "description": "Get connection status for workspaces in the current project.",
  9606. "summary": "Workspace status",
  9607. "x-codeSamples": [
  9608. {
  9609. "lang": "js",
  9610. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9611. }
  9612. ]
  9613. }
  9614. },
  9615. "/experimental/workspace/{id}": {
  9616. "delete": {
  9617. "tags": ["workspace"],
  9618. "operationId": "experimental.workspace.remove",
  9619. "parameters": [
  9620. {
  9621. "name": "id",
  9622. "in": "path",
  9623. "schema": {
  9624. "type": "string",
  9625. "pattern": "^wrk"
  9626. },
  9627. "required": true
  9628. },
  9629. {
  9630. "name": "directory",
  9631. "in": "query",
  9632. "schema": {
  9633. "type": "string"
  9634. },
  9635. "required": false
  9636. },
  9637. {
  9638. "name": "workspace",
  9639. "in": "query",
  9640. "schema": {
  9641. "type": "string"
  9642. },
  9643. "required": false
  9644. }
  9645. ],
  9646. "responses": {
  9647. "200": {
  9648. "description": "Workspace removed",
  9649. "content": {
  9650. "application/json": {
  9651. "schema": {
  9652. "$ref": "#/components/schemas/Workspace"
  9653. }
  9654. }
  9655. }
  9656. },
  9657. "400": {
  9658. "description": "BadRequest | InvalidRequestError",
  9659. "content": {
  9660. "application/json": {
  9661. "schema": {
  9662. "anyOf": [
  9663. {
  9664. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9665. },
  9666. {
  9667. "$ref": "#/components/schemas/InvalidRequestError"
  9668. }
  9669. ]
  9670. }
  9671. }
  9672. }
  9673. }
  9674. },
  9675. "description": "Remove an existing workspace.",
  9676. "summary": "Remove workspace",
  9677. "x-codeSamples": [
  9678. {
  9679. "lang": "js",
  9680. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9681. }
  9682. ]
  9683. }
  9684. },
  9685. "/experimental/workspace/warp": {
  9686. "post": {
  9687. "tags": ["workspace"],
  9688. "operationId": "experimental.workspace.warp",
  9689. "parameters": [
  9690. {
  9691. "name": "directory",
  9692. "in": "query",
  9693. "schema": {
  9694. "type": "string"
  9695. },
  9696. "required": false
  9697. },
  9698. {
  9699. "name": "workspace",
  9700. "in": "query",
  9701. "schema": {
  9702. "type": "string"
  9703. },
  9704. "required": false
  9705. }
  9706. ],
  9707. "responses": {
  9708. "204": {
  9709. "description": "Session warped"
  9710. },
  9711. "400": {
  9712. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9713. "content": {
  9714. "application/json": {
  9715. "schema": {
  9716. "anyOf": [
  9717. {
  9718. "$ref": "#/components/schemas/WorkspaceWarpError"
  9719. },
  9720. {
  9721. "$ref": "#/components/schemas/VcsApplyError"
  9722. },
  9723. {
  9724. "$ref": "#/components/schemas/InvalidRequestError"
  9725. }
  9726. ]
  9727. }
  9728. }
  9729. }
  9730. },
  9731. "404": {
  9732. "description": "NotFoundError",
  9733. "content": {
  9734. "application/json": {
  9735. "schema": {
  9736. "$ref": "#/components/schemas/NotFoundError"
  9737. }
  9738. }
  9739. }
  9740. }
  9741. },
  9742. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9743. "summary": "Warp session into workspace",
  9744. "requestBody": {
  9745. "content": {
  9746. "application/json": {
  9747. "schema": {
  9748. "type": "object",
  9749. "properties": {
  9750. "id": {
  9751. "anyOf": [
  9752. {
  9753. "type": "string",
  9754. "pattern": "^wrk"
  9755. },
  9756. {
  9757. "type": "null"
  9758. }
  9759. ]
  9760. },
  9761. "sessionID": {
  9762. "type": "string",
  9763. "pattern": "^ses"
  9764. },
  9765. "copyChanges": {
  9766. "type": "boolean"
  9767. }
  9768. },
  9769. "required": ["id", "sessionID"],
  9770. "additionalProperties": false
  9771. }
  9772. }
  9773. }
  9774. },
  9775. "x-codeSamples": [
  9776. {
  9777. "lang": "js",
  9778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9779. }
  9780. ]
  9781. }
  9782. },
  9783. "/api/health": {
  9784. "get": {
  9785. "tags": ["opencode HttpApi"],
  9786. "operationId": "v2.health.get",
  9787. "parameters": [],
  9788. "security": [],
  9789. "responses": {
  9790. "200": {
  9791. "description": "Success",
  9792. "content": {
  9793. "application/json": {
  9794. "schema": {
  9795. "type": "object",
  9796. "properties": {
  9797. "healthy": {
  9798. "type": "boolean",
  9799. "enum": [true]
  9800. }
  9801. },
  9802. "required": ["healthy"],
  9803. "additionalProperties": false
  9804. }
  9805. }
  9806. }
  9807. },
  9808. "400": {
  9809. "description": "InvalidRequestError",
  9810. "content": {
  9811. "application/json": {
  9812. "schema": {
  9813. "$ref": "#/components/schemas/InvalidRequestError"
  9814. }
  9815. }
  9816. }
  9817. },
  9818. "401": {
  9819. "description": "UnauthorizedError",
  9820. "content": {
  9821. "application/json": {
  9822. "schema": {
  9823. "$ref": "#/components/schemas/UnauthorizedError"
  9824. }
  9825. }
  9826. }
  9827. }
  9828. },
  9829. "description": "Check whether the API server is ready to accept requests.",
  9830. "summary": "Check server health",
  9831. "x-codeSamples": [
  9832. {
  9833. "lang": "js",
  9834. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9835. }
  9836. ]
  9837. }
  9838. },
  9839. "/api/location": {
  9840. "get": {
  9841. "tags": ["opencode HttpApi"],
  9842. "operationId": "v2.location.get",
  9843. "parameters": [
  9844. {
  9845. "name": "location",
  9846. "in": "query",
  9847. "schema": {
  9848. "type": "object",
  9849. "properties": {
  9850. "directory": {
  9851. "type": "string"
  9852. },
  9853. "workspace": {
  9854. "type": "string"
  9855. }
  9856. },
  9857. "additionalProperties": false
  9858. },
  9859. "required": false,
  9860. "style": "deepObject",
  9861. "explode": true
  9862. }
  9863. ],
  9864. "security": [],
  9865. "responses": {
  9866. "200": {
  9867. "description": "Location.Info",
  9868. "content": {
  9869. "application/json": {
  9870. "schema": {
  9871. "$ref": "#/components/schemas/LocationInfo"
  9872. }
  9873. }
  9874. }
  9875. },
  9876. "400": {
  9877. "description": "InvalidRequestError",
  9878. "content": {
  9879. "application/json": {
  9880. "schema": {
  9881. "$ref": "#/components/schemas/InvalidRequestError"
  9882. }
  9883. }
  9884. }
  9885. },
  9886. "401": {
  9887. "description": "UnauthorizedError",
  9888. "content": {
  9889. "application/json": {
  9890. "schema": {
  9891. "$ref": "#/components/schemas/UnauthorizedError"
  9892. }
  9893. }
  9894. }
  9895. }
  9896. },
  9897. "description": "Resolve the requested location or the server default location.",
  9898. "summary": "Get location",
  9899. "x-codeSamples": [
  9900. {
  9901. "lang": "js",
  9902. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  9903. }
  9904. ]
  9905. }
  9906. },
  9907. "/api/agent": {
  9908. "get": {
  9909. "tags": ["opencode HttpApi"],
  9910. "operationId": "v2.agent.list",
  9911. "parameters": [
  9912. {
  9913. "name": "location",
  9914. "in": "query",
  9915. "schema": {
  9916. "type": "object",
  9917. "properties": {
  9918. "directory": {
  9919. "type": "string"
  9920. },
  9921. "workspace": {
  9922. "type": "string"
  9923. }
  9924. },
  9925. "additionalProperties": false
  9926. },
  9927. "required": false,
  9928. "style": "deepObject",
  9929. "explode": true
  9930. }
  9931. ],
  9932. "security": [],
  9933. "responses": {
  9934. "200": {
  9935. "description": "Success",
  9936. "content": {
  9937. "application/json": {
  9938. "schema": {
  9939. "type": "object",
  9940. "properties": {
  9941. "location": {
  9942. "$ref": "#/components/schemas/LocationInfo"
  9943. },
  9944. "data": {
  9945. "type": "array",
  9946. "items": {
  9947. "$ref": "#/components/schemas/AgentV2Info"
  9948. }
  9949. }
  9950. },
  9951. "required": ["location", "data"],
  9952. "additionalProperties": false
  9953. }
  9954. }
  9955. }
  9956. },
  9957. "400": {
  9958. "description": "InvalidRequestError",
  9959. "content": {
  9960. "application/json": {
  9961. "schema": {
  9962. "$ref": "#/components/schemas/InvalidRequestError"
  9963. }
  9964. }
  9965. }
  9966. },
  9967. "401": {
  9968. "description": "UnauthorizedError",
  9969. "content": {
  9970. "application/json": {
  9971. "schema": {
  9972. "$ref": "#/components/schemas/UnauthorizedError"
  9973. }
  9974. }
  9975. }
  9976. }
  9977. },
  9978. "description": "Retrieve currently registered agents.",
  9979. "summary": "List agents",
  9980. "x-codeSamples": [
  9981. {
  9982. "lang": "js",
  9983. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  9984. }
  9985. ]
  9986. }
  9987. },
  9988. "/api/session": {
  9989. "get": {
  9990. "tags": ["sessions"],
  9991. "operationId": "v2.session.list",
  9992. "parameters": [
  9993. {
  9994. "name": "workspace",
  9995. "in": "query",
  9996. "schema": {
  9997. "type": "string",
  9998. "pattern": "^wrk"
  9999. },
  10000. "required": false
  10001. },
  10002. {
  10003. "name": "limit",
  10004. "in": "query",
  10005. "schema": {
  10006. "type": "number"
  10007. },
  10008. "required": false
  10009. },
  10010. {
  10011. "name": "order",
  10012. "in": "query",
  10013. "schema": {
  10014. "type": "string",
  10015. "enum": ["asc", "desc"]
  10016. },
  10017. "required": false
  10018. },
  10019. {
  10020. "name": "search",
  10021. "in": "query",
  10022. "schema": {
  10023. "type": "string"
  10024. },
  10025. "required": false
  10026. },
  10027. {
  10028. "name": "directory",
  10029. "in": "query",
  10030. "schema": {
  10031. "type": "string"
  10032. },
  10033. "required": false
  10034. },
  10035. {
  10036. "name": "project",
  10037. "in": "query",
  10038. "schema": {
  10039. "type": "string"
  10040. },
  10041. "required": false
  10042. },
  10043. {
  10044. "name": "subpath",
  10045. "in": "query",
  10046. "schema": {
  10047. "type": "string"
  10048. },
  10049. "required": false
  10050. },
  10051. {
  10052. "name": "cursor",
  10053. "in": "query",
  10054. "schema": {
  10055. "type": "string",
  10056. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10057. },
  10058. "required": false
  10059. }
  10060. ],
  10061. "security": [],
  10062. "responses": {
  10063. "200": {
  10064. "description": "SessionsResponse",
  10065. "content": {
  10066. "application/json": {
  10067. "schema": {
  10068. "$ref": "#/components/schemas/SessionsResponse"
  10069. }
  10070. }
  10071. }
  10072. },
  10073. "400": {
  10074. "description": "InvalidCursorError | InvalidRequestError",
  10075. "content": {
  10076. "application/json": {
  10077. "schema": {
  10078. "anyOf": [
  10079. {
  10080. "$ref": "#/components/schemas/InvalidCursorError"
  10081. },
  10082. {
  10083. "$ref": "#/components/schemas/InvalidRequestError"
  10084. },
  10085. {
  10086. "$ref": "#/components/schemas/InvalidRequestError"
  10087. }
  10088. ]
  10089. }
  10090. }
  10091. }
  10092. },
  10093. "401": {
  10094. "description": "UnauthorizedError",
  10095. "content": {
  10096. "application/json": {
  10097. "schema": {
  10098. "$ref": "#/components/schemas/UnauthorizedError"
  10099. }
  10100. }
  10101. }
  10102. }
  10103. },
  10104. "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.",
  10105. "summary": "List sessions",
  10106. "x-codeSamples": [
  10107. {
  10108. "lang": "js",
  10109. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10110. }
  10111. ]
  10112. },
  10113. "post": {
  10114. "tags": ["sessions"],
  10115. "operationId": "v2.session.create",
  10116. "parameters": [],
  10117. "security": [],
  10118. "responses": {
  10119. "200": {
  10120. "description": "Success",
  10121. "content": {
  10122. "application/json": {
  10123. "schema": {
  10124. "type": "object",
  10125. "properties": {
  10126. "data": {
  10127. "$ref": "#/components/schemas/SessionV2Info"
  10128. }
  10129. },
  10130. "required": ["data"],
  10131. "additionalProperties": false
  10132. }
  10133. }
  10134. }
  10135. },
  10136. "400": {
  10137. "description": "InvalidRequestError",
  10138. "content": {
  10139. "application/json": {
  10140. "schema": {
  10141. "$ref": "#/components/schemas/InvalidRequestError"
  10142. }
  10143. }
  10144. }
  10145. },
  10146. "401": {
  10147. "description": "UnauthorizedError",
  10148. "content": {
  10149. "application/json": {
  10150. "schema": {
  10151. "$ref": "#/components/schemas/UnauthorizedError"
  10152. }
  10153. }
  10154. }
  10155. }
  10156. },
  10157. "description": "Create a session at the requested location.",
  10158. "summary": "Create session",
  10159. "requestBody": {
  10160. "content": {
  10161. "application/json": {
  10162. "schema": {
  10163. "type": "object",
  10164. "properties": {
  10165. "id": {
  10166. "type": "string",
  10167. "pattern": "^ses"
  10168. },
  10169. "agent": {
  10170. "type": "string"
  10171. },
  10172. "model": {
  10173. "$ref": "#/components/schemas/ModelRef"
  10174. },
  10175. "location": {
  10176. "$ref": "#/components/schemas/LocationRef"
  10177. }
  10178. },
  10179. "additionalProperties": false
  10180. }
  10181. }
  10182. },
  10183. "required": true
  10184. },
  10185. "x-codeSamples": [
  10186. {
  10187. "lang": "js",
  10188. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10189. }
  10190. ]
  10191. }
  10192. },
  10193. "/api/session/active": {
  10194. "get": {
  10195. "tags": ["sessions"],
  10196. "operationId": "v2.session.active",
  10197. "parameters": [],
  10198. "security": [],
  10199. "responses": {
  10200. "200": {
  10201. "description": "Success",
  10202. "content": {
  10203. "application/json": {
  10204. "schema": {
  10205. "type": "object",
  10206. "properties": {
  10207. "data": {
  10208. "type": "object",
  10209. "patternProperties": {
  10210. "^ses": {
  10211. "$ref": "#/components/schemas/SessionActive"
  10212. }
  10213. }
  10214. }
  10215. },
  10216. "required": ["data"],
  10217. "additionalProperties": false
  10218. }
  10219. }
  10220. }
  10221. },
  10222. "400": {
  10223. "description": "InvalidRequestError",
  10224. "content": {
  10225. "application/json": {
  10226. "schema": {
  10227. "$ref": "#/components/schemas/InvalidRequestError"
  10228. }
  10229. }
  10230. }
  10231. },
  10232. "401": {
  10233. "description": "UnauthorizedError",
  10234. "content": {
  10235. "application/json": {
  10236. "schema": {
  10237. "$ref": "#/components/schemas/UnauthorizedError"
  10238. }
  10239. }
  10240. }
  10241. }
  10242. },
  10243. "description": "Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.",
  10244. "summary": "List active sessions",
  10245. "x-codeSamples": [
  10246. {
  10247. "lang": "js",
  10248. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.active({\n ...\n})"
  10249. }
  10250. ]
  10251. }
  10252. },
  10253. "/api/session/{sessionID}": {
  10254. "get": {
  10255. "tags": ["sessions"],
  10256. "operationId": "v2.session.get",
  10257. "parameters": [
  10258. {
  10259. "name": "sessionID",
  10260. "in": "path",
  10261. "schema": {
  10262. "type": "string",
  10263. "pattern": "^ses"
  10264. },
  10265. "required": true
  10266. }
  10267. ],
  10268. "security": [],
  10269. "responses": {
  10270. "200": {
  10271. "description": "Success",
  10272. "content": {
  10273. "application/json": {
  10274. "schema": {
  10275. "type": "object",
  10276. "properties": {
  10277. "data": {
  10278. "$ref": "#/components/schemas/SessionV2Info"
  10279. }
  10280. },
  10281. "required": ["data"],
  10282. "additionalProperties": false
  10283. }
  10284. }
  10285. }
  10286. },
  10287. "400": {
  10288. "description": "InvalidRequestError",
  10289. "content": {
  10290. "application/json": {
  10291. "schema": {
  10292. "$ref": "#/components/schemas/InvalidRequestError"
  10293. }
  10294. }
  10295. }
  10296. },
  10297. "401": {
  10298. "description": "UnauthorizedError",
  10299. "content": {
  10300. "application/json": {
  10301. "schema": {
  10302. "$ref": "#/components/schemas/UnauthorizedError"
  10303. }
  10304. }
  10305. }
  10306. },
  10307. "404": {
  10308. "description": "SessionNotFoundError",
  10309. "content": {
  10310. "application/json": {
  10311. "schema": {
  10312. "anyOf": [
  10313. {
  10314. "$ref": "#/components/schemas/SessionNotFoundError"
  10315. },
  10316. {
  10317. "$ref": "#/components/schemas/SessionNotFoundError"
  10318. }
  10319. ]
  10320. }
  10321. }
  10322. }
  10323. }
  10324. },
  10325. "description": "Retrieve a session by ID.",
  10326. "summary": "Get session",
  10327. "x-codeSamples": [
  10328. {
  10329. "lang": "js",
  10330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10331. }
  10332. ]
  10333. }
  10334. },
  10335. "/api/session/{sessionID}/agent": {
  10336. "post": {
  10337. "tags": ["sessions"],
  10338. "operationId": "v2.session.switchAgent",
  10339. "parameters": [
  10340. {
  10341. "name": "sessionID",
  10342. "in": "path",
  10343. "schema": {
  10344. "type": "string",
  10345. "pattern": "^ses"
  10346. },
  10347. "required": true
  10348. }
  10349. ],
  10350. "security": [],
  10351. "responses": {
  10352. "204": {
  10353. "description": "<No Content>"
  10354. },
  10355. "400": {
  10356. "description": "InvalidRequestError",
  10357. "content": {
  10358. "application/json": {
  10359. "schema": {
  10360. "$ref": "#/components/schemas/InvalidRequestError"
  10361. }
  10362. }
  10363. }
  10364. },
  10365. "401": {
  10366. "description": "UnauthorizedError",
  10367. "content": {
  10368. "application/json": {
  10369. "schema": {
  10370. "$ref": "#/components/schemas/UnauthorizedError"
  10371. }
  10372. }
  10373. }
  10374. },
  10375. "404": {
  10376. "description": "SessionNotFoundError",
  10377. "content": {
  10378. "application/json": {
  10379. "schema": {
  10380. "anyOf": [
  10381. {
  10382. "$ref": "#/components/schemas/SessionNotFoundError"
  10383. },
  10384. {
  10385. "$ref": "#/components/schemas/SessionNotFoundError"
  10386. }
  10387. ]
  10388. }
  10389. }
  10390. }
  10391. }
  10392. },
  10393. "description": "Switch the agent used by subsequent provider turns.",
  10394. "summary": "Switch session agent",
  10395. "requestBody": {
  10396. "content": {
  10397. "application/json": {
  10398. "schema": {
  10399. "type": "object",
  10400. "properties": {
  10401. "agent": {
  10402. "type": "string"
  10403. }
  10404. },
  10405. "required": ["agent"],
  10406. "additionalProperties": false
  10407. }
  10408. }
  10409. },
  10410. "required": true
  10411. },
  10412. "x-codeSamples": [
  10413. {
  10414. "lang": "js",
  10415. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchAgent({\n ...\n})"
  10416. }
  10417. ]
  10418. }
  10419. },
  10420. "/api/session/{sessionID}/model": {
  10421. "post": {
  10422. "tags": ["sessions"],
  10423. "operationId": "v2.session.switchModel",
  10424. "parameters": [
  10425. {
  10426. "name": "sessionID",
  10427. "in": "path",
  10428. "schema": {
  10429. "type": "string",
  10430. "pattern": "^ses"
  10431. },
  10432. "required": true
  10433. }
  10434. ],
  10435. "security": [],
  10436. "responses": {
  10437. "204": {
  10438. "description": "<No Content>"
  10439. },
  10440. "400": {
  10441. "description": "InvalidRequestError",
  10442. "content": {
  10443. "application/json": {
  10444. "schema": {
  10445. "$ref": "#/components/schemas/InvalidRequestError"
  10446. }
  10447. }
  10448. }
  10449. },
  10450. "401": {
  10451. "description": "UnauthorizedError",
  10452. "content": {
  10453. "application/json": {
  10454. "schema": {
  10455. "$ref": "#/components/schemas/UnauthorizedError"
  10456. }
  10457. }
  10458. }
  10459. },
  10460. "404": {
  10461. "description": "SessionNotFoundError",
  10462. "content": {
  10463. "application/json": {
  10464. "schema": {
  10465. "anyOf": [
  10466. {
  10467. "$ref": "#/components/schemas/SessionNotFoundError"
  10468. },
  10469. {
  10470. "$ref": "#/components/schemas/SessionNotFoundError"
  10471. }
  10472. ]
  10473. }
  10474. }
  10475. }
  10476. }
  10477. },
  10478. "description": "Switch the model used by subsequent provider turns.",
  10479. "summary": "Switch session model",
  10480. "requestBody": {
  10481. "content": {
  10482. "application/json": {
  10483. "schema": {
  10484. "type": "object",
  10485. "properties": {
  10486. "model": {
  10487. "$ref": "#/components/schemas/ModelRef"
  10488. }
  10489. },
  10490. "required": ["model"],
  10491. "additionalProperties": false
  10492. }
  10493. }
  10494. },
  10495. "required": true
  10496. },
  10497. "x-codeSamples": [
  10498. {
  10499. "lang": "js",
  10500. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchModel({\n ...\n})"
  10501. }
  10502. ]
  10503. }
  10504. },
  10505. "/api/session/{sessionID}/prompt": {
  10506. "post": {
  10507. "tags": ["sessions"],
  10508. "operationId": "v2.session.prompt",
  10509. "parameters": [
  10510. {
  10511. "name": "sessionID",
  10512. "in": "path",
  10513. "schema": {
  10514. "type": "string",
  10515. "pattern": "^ses"
  10516. },
  10517. "required": true
  10518. }
  10519. ],
  10520. "security": [],
  10521. "responses": {
  10522. "200": {
  10523. "description": "Success",
  10524. "content": {
  10525. "application/json": {
  10526. "schema": {
  10527. "type": "object",
  10528. "properties": {
  10529. "data": {
  10530. "$ref": "#/components/schemas/SessionInputAdmitted"
  10531. }
  10532. },
  10533. "required": ["data"],
  10534. "additionalProperties": false
  10535. }
  10536. }
  10537. }
  10538. },
  10539. "400": {
  10540. "description": "InvalidRequestError",
  10541. "content": {
  10542. "application/json": {
  10543. "schema": {
  10544. "$ref": "#/components/schemas/InvalidRequestError"
  10545. }
  10546. }
  10547. }
  10548. },
  10549. "401": {
  10550. "description": "UnauthorizedError",
  10551. "content": {
  10552. "application/json": {
  10553. "schema": {
  10554. "$ref": "#/components/schemas/UnauthorizedError"
  10555. }
  10556. }
  10557. }
  10558. },
  10559. "404": {
  10560. "description": "SessionNotFoundError",
  10561. "content": {
  10562. "application/json": {
  10563. "schema": {
  10564. "anyOf": [
  10565. {
  10566. "$ref": "#/components/schemas/SessionNotFoundError"
  10567. },
  10568. {
  10569. "$ref": "#/components/schemas/SessionNotFoundError"
  10570. }
  10571. ]
  10572. }
  10573. }
  10574. }
  10575. },
  10576. "409": {
  10577. "description": "ConflictError",
  10578. "content": {
  10579. "application/json": {
  10580. "schema": {
  10581. "$ref": "#/components/schemas/ConflictError"
  10582. }
  10583. }
  10584. }
  10585. }
  10586. },
  10587. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10588. "summary": "Send message",
  10589. "requestBody": {
  10590. "content": {
  10591. "application/json": {
  10592. "schema": {
  10593. "type": "object",
  10594. "properties": {
  10595. "id": {
  10596. "type": "string",
  10597. "pattern": "^msg_"
  10598. },
  10599. "prompt": {
  10600. "$ref": "#/components/schemas/PromptInput"
  10601. },
  10602. "delivery": {
  10603. "type": "string",
  10604. "enum": ["steer", "queue"]
  10605. },
  10606. "resume": {
  10607. "type": "boolean"
  10608. }
  10609. },
  10610. "required": ["prompt"],
  10611. "additionalProperties": false
  10612. }
  10613. }
  10614. },
  10615. "required": true
  10616. },
  10617. "x-codeSamples": [
  10618. {
  10619. "lang": "js",
  10620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10621. }
  10622. ]
  10623. }
  10624. },
  10625. "/api/session/{sessionID}/compact": {
  10626. "post": {
  10627. "tags": ["sessions"],
  10628. "operationId": "v2.session.compact",
  10629. "parameters": [
  10630. {
  10631. "name": "sessionID",
  10632. "in": "path",
  10633. "schema": {
  10634. "type": "string",
  10635. "pattern": "^ses"
  10636. },
  10637. "required": true
  10638. }
  10639. ],
  10640. "security": [],
  10641. "responses": {
  10642. "204": {
  10643. "description": "<No Content>"
  10644. },
  10645. "400": {
  10646. "description": "InvalidRequestError",
  10647. "content": {
  10648. "application/json": {
  10649. "schema": {
  10650. "$ref": "#/components/schemas/InvalidRequestError"
  10651. }
  10652. }
  10653. }
  10654. },
  10655. "401": {
  10656. "description": "UnauthorizedError",
  10657. "content": {
  10658. "application/json": {
  10659. "schema": {
  10660. "$ref": "#/components/schemas/UnauthorizedError"
  10661. }
  10662. }
  10663. }
  10664. },
  10665. "404": {
  10666. "description": "SessionNotFoundError",
  10667. "content": {
  10668. "application/json": {
  10669. "schema": {
  10670. "anyOf": [
  10671. {
  10672. "$ref": "#/components/schemas/SessionNotFoundError"
  10673. },
  10674. {
  10675. "$ref": "#/components/schemas/SessionNotFoundError"
  10676. }
  10677. ]
  10678. }
  10679. }
  10680. }
  10681. },
  10682. "503": {
  10683. "description": "ServiceUnavailableError",
  10684. "content": {
  10685. "application/json": {
  10686. "schema": {
  10687. "$ref": "#/components/schemas/ServiceUnavailableError"
  10688. }
  10689. }
  10690. }
  10691. }
  10692. },
  10693. "description": "Compact a session conversation.",
  10694. "summary": "Compact session",
  10695. "x-codeSamples": [
  10696. {
  10697. "lang": "js",
  10698. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10699. }
  10700. ]
  10701. }
  10702. },
  10703. "/api/session/{sessionID}/wait": {
  10704. "post": {
  10705. "tags": ["sessions"],
  10706. "operationId": "v2.session.wait",
  10707. "parameters": [
  10708. {
  10709. "name": "sessionID",
  10710. "in": "path",
  10711. "schema": {
  10712. "type": "string",
  10713. "pattern": "^ses"
  10714. },
  10715. "required": true
  10716. }
  10717. ],
  10718. "security": [],
  10719. "responses": {
  10720. "204": {
  10721. "description": "<No Content>"
  10722. },
  10723. "400": {
  10724. "description": "InvalidRequestError",
  10725. "content": {
  10726. "application/json": {
  10727. "schema": {
  10728. "$ref": "#/components/schemas/InvalidRequestError"
  10729. }
  10730. }
  10731. }
  10732. },
  10733. "401": {
  10734. "description": "UnauthorizedError",
  10735. "content": {
  10736. "application/json": {
  10737. "schema": {
  10738. "$ref": "#/components/schemas/UnauthorizedError"
  10739. }
  10740. }
  10741. }
  10742. },
  10743. "404": {
  10744. "description": "SessionNotFoundError",
  10745. "content": {
  10746. "application/json": {
  10747. "schema": {
  10748. "anyOf": [
  10749. {
  10750. "$ref": "#/components/schemas/SessionNotFoundError"
  10751. },
  10752. {
  10753. "$ref": "#/components/schemas/SessionNotFoundError"
  10754. }
  10755. ]
  10756. }
  10757. }
  10758. }
  10759. },
  10760. "503": {
  10761. "description": "ServiceUnavailableError",
  10762. "content": {
  10763. "application/json": {
  10764. "schema": {
  10765. "$ref": "#/components/schemas/ServiceUnavailableError"
  10766. }
  10767. }
  10768. }
  10769. }
  10770. },
  10771. "description": "Wait for a session agent loop to become idle.",
  10772. "summary": "Wait for session",
  10773. "x-codeSamples": [
  10774. {
  10775. "lang": "js",
  10776. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10777. }
  10778. ]
  10779. }
  10780. },
  10781. "/api/session/{sessionID}/revert/stage": {
  10782. "post": {
  10783. "tags": ["sessions"],
  10784. "operationId": "v2.session.revert.stage",
  10785. "parameters": [
  10786. {
  10787. "name": "sessionID",
  10788. "in": "path",
  10789. "schema": {
  10790. "type": "string",
  10791. "pattern": "^ses"
  10792. },
  10793. "required": true
  10794. }
  10795. ],
  10796. "security": [],
  10797. "responses": {
  10798. "200": {
  10799. "description": "Success",
  10800. "content": {
  10801. "application/json": {
  10802. "schema": {
  10803. "type": "object",
  10804. "properties": {
  10805. "data": {
  10806. "$ref": "#/components/schemas/RevertState"
  10807. }
  10808. },
  10809. "required": ["data"],
  10810. "additionalProperties": false
  10811. }
  10812. }
  10813. }
  10814. },
  10815. "400": {
  10816. "description": "InvalidRequestError",
  10817. "content": {
  10818. "application/json": {
  10819. "schema": {
  10820. "$ref": "#/components/schemas/InvalidRequestError"
  10821. }
  10822. }
  10823. }
  10824. },
  10825. "401": {
  10826. "description": "UnauthorizedError",
  10827. "content": {
  10828. "application/json": {
  10829. "schema": {
  10830. "$ref": "#/components/schemas/UnauthorizedError"
  10831. }
  10832. }
  10833. }
  10834. },
  10835. "404": {
  10836. "description": "MessageNotFoundError | SessionNotFoundError",
  10837. "content": {
  10838. "application/json": {
  10839. "schema": {
  10840. "anyOf": [
  10841. {
  10842. "$ref": "#/components/schemas/MessageNotFoundError"
  10843. },
  10844. {
  10845. "$ref": "#/components/schemas/SessionNotFoundError"
  10846. },
  10847. {
  10848. "$ref": "#/components/schemas/SessionNotFoundError"
  10849. }
  10850. ]
  10851. }
  10852. }
  10853. }
  10854. },
  10855. "500": {
  10856. "description": "UnknownError",
  10857. "content": {
  10858. "application/json": {
  10859. "schema": {
  10860. "$ref": "#/components/schemas/UnknownError1"
  10861. }
  10862. }
  10863. }
  10864. }
  10865. },
  10866. "description": "Stage or move a reversible session boundary and optionally apply its file changes.",
  10867. "summary": "Stage session revert",
  10868. "requestBody": {
  10869. "content": {
  10870. "application/json": {
  10871. "schema": {
  10872. "type": "object",
  10873. "properties": {
  10874. "messageID": {
  10875. "type": "string",
  10876. "pattern": "^msg_"
  10877. },
  10878. "files": {
  10879. "type": "boolean"
  10880. }
  10881. },
  10882. "required": ["messageID"],
  10883. "additionalProperties": false
  10884. }
  10885. }
  10886. },
  10887. "required": true
  10888. },
  10889. "x-codeSamples": [
  10890. {
  10891. "lang": "js",
  10892. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.stage({\n ...\n})"
  10893. }
  10894. ]
  10895. }
  10896. },
  10897. "/api/session/{sessionID}/revert/clear": {
  10898. "post": {
  10899. "tags": ["sessions"],
  10900. "operationId": "v2.session.revert.clear",
  10901. "parameters": [
  10902. {
  10903. "name": "sessionID",
  10904. "in": "path",
  10905. "schema": {
  10906. "type": "string",
  10907. "pattern": "^ses"
  10908. },
  10909. "required": true
  10910. }
  10911. ],
  10912. "security": [],
  10913. "responses": {
  10914. "204": {
  10915. "description": "<No Content>"
  10916. },
  10917. "400": {
  10918. "description": "InvalidRequestError",
  10919. "content": {
  10920. "application/json": {
  10921. "schema": {
  10922. "$ref": "#/components/schemas/InvalidRequestError"
  10923. }
  10924. }
  10925. }
  10926. },
  10927. "401": {
  10928. "description": "UnauthorizedError",
  10929. "content": {
  10930. "application/json": {
  10931. "schema": {
  10932. "$ref": "#/components/schemas/UnauthorizedError"
  10933. }
  10934. }
  10935. }
  10936. },
  10937. "404": {
  10938. "description": "SessionNotFoundError",
  10939. "content": {
  10940. "application/json": {
  10941. "schema": {
  10942. "anyOf": [
  10943. {
  10944. "$ref": "#/components/schemas/SessionNotFoundError"
  10945. },
  10946. {
  10947. "$ref": "#/components/schemas/SessionNotFoundError"
  10948. }
  10949. ]
  10950. }
  10951. }
  10952. }
  10953. },
  10954. "500": {
  10955. "description": "UnknownError",
  10956. "content": {
  10957. "application/json": {
  10958. "schema": {
  10959. "$ref": "#/components/schemas/UnknownError1"
  10960. }
  10961. }
  10962. }
  10963. }
  10964. },
  10965. "summary": "Clear staged revert",
  10966. "x-codeSamples": [
  10967. {
  10968. "lang": "js",
  10969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.clear({\n ...\n})"
  10970. }
  10971. ]
  10972. }
  10973. },
  10974. "/api/session/{sessionID}/revert/commit": {
  10975. "post": {
  10976. "tags": ["sessions"],
  10977. "operationId": "v2.session.revert.commit",
  10978. "parameters": [
  10979. {
  10980. "name": "sessionID",
  10981. "in": "path",
  10982. "schema": {
  10983. "type": "string",
  10984. "pattern": "^ses"
  10985. },
  10986. "required": true
  10987. }
  10988. ],
  10989. "security": [],
  10990. "responses": {
  10991. "204": {
  10992. "description": "<No Content>"
  10993. },
  10994. "400": {
  10995. "description": "InvalidRequestError",
  10996. "content": {
  10997. "application/json": {
  10998. "schema": {
  10999. "$ref": "#/components/schemas/InvalidRequestError"
  11000. }
  11001. }
  11002. }
  11003. },
  11004. "401": {
  11005. "description": "UnauthorizedError",
  11006. "content": {
  11007. "application/json": {
  11008. "schema": {
  11009. "$ref": "#/components/schemas/UnauthorizedError"
  11010. }
  11011. }
  11012. }
  11013. },
  11014. "404": {
  11015. "description": "SessionNotFoundError",
  11016. "content": {
  11017. "application/json": {
  11018. "schema": {
  11019. "anyOf": [
  11020. {
  11021. "$ref": "#/components/schemas/SessionNotFoundError"
  11022. },
  11023. {
  11024. "$ref": "#/components/schemas/SessionNotFoundError"
  11025. }
  11026. ]
  11027. }
  11028. }
  11029. }
  11030. }
  11031. },
  11032. "summary": "Commit staged revert",
  11033. "x-codeSamples": [
  11034. {
  11035. "lang": "js",
  11036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.commit({\n ...\n})"
  11037. }
  11038. ]
  11039. }
  11040. },
  11041. "/api/session/{sessionID}/context": {
  11042. "get": {
  11043. "tags": ["sessions"],
  11044. "operationId": "v2.session.context",
  11045. "parameters": [
  11046. {
  11047. "name": "sessionID",
  11048. "in": "path",
  11049. "schema": {
  11050. "type": "string",
  11051. "pattern": "^ses"
  11052. },
  11053. "required": true
  11054. }
  11055. ],
  11056. "security": [],
  11057. "responses": {
  11058. "200": {
  11059. "description": "Success",
  11060. "content": {
  11061. "application/json": {
  11062. "schema": {
  11063. "type": "object",
  11064. "properties": {
  11065. "data": {
  11066. "type": "array",
  11067. "items": {
  11068. "$ref": "#/components/schemas/SessionMessage"
  11069. }
  11070. }
  11071. },
  11072. "required": ["data"],
  11073. "additionalProperties": false
  11074. }
  11075. }
  11076. }
  11077. },
  11078. "400": {
  11079. "description": "InvalidRequestError",
  11080. "content": {
  11081. "application/json": {
  11082. "schema": {
  11083. "$ref": "#/components/schemas/InvalidRequestError"
  11084. }
  11085. }
  11086. }
  11087. },
  11088. "401": {
  11089. "description": "UnauthorizedError",
  11090. "content": {
  11091. "application/json": {
  11092. "schema": {
  11093. "$ref": "#/components/schemas/UnauthorizedError"
  11094. }
  11095. }
  11096. }
  11097. },
  11098. "404": {
  11099. "description": "SessionNotFoundError",
  11100. "content": {
  11101. "application/json": {
  11102. "schema": {
  11103. "anyOf": [
  11104. {
  11105. "$ref": "#/components/schemas/SessionNotFoundError"
  11106. },
  11107. {
  11108. "$ref": "#/components/schemas/SessionNotFoundError"
  11109. }
  11110. ]
  11111. }
  11112. }
  11113. }
  11114. },
  11115. "500": {
  11116. "description": "UnknownError",
  11117. "content": {
  11118. "application/json": {
  11119. "schema": {
  11120. "$ref": "#/components/schemas/UnknownError1"
  11121. }
  11122. }
  11123. }
  11124. }
  11125. },
  11126. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  11127. "summary": "Get session context",
  11128. "x-codeSamples": [
  11129. {
  11130. "lang": "js",
  11131. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  11132. }
  11133. ]
  11134. }
  11135. },
  11136. "/api/session/{sessionID}/history": {
  11137. "get": {
  11138. "tags": ["sessions"],
  11139. "operationId": "v2.session.history",
  11140. "parameters": [
  11141. {
  11142. "name": "sessionID",
  11143. "in": "path",
  11144. "schema": {
  11145. "type": "string",
  11146. "pattern": "^ses"
  11147. },
  11148. "required": true
  11149. },
  11150. {
  11151. "name": "limit",
  11152. "in": "query",
  11153. "schema": {
  11154. "type": "string"
  11155. },
  11156. "required": false
  11157. },
  11158. {
  11159. "name": "after",
  11160. "in": "query",
  11161. "schema": {
  11162. "type": "string"
  11163. },
  11164. "required": false
  11165. }
  11166. ],
  11167. "security": [],
  11168. "responses": {
  11169. "200": {
  11170. "description": "SessionHistory",
  11171. "content": {
  11172. "application/json": {
  11173. "schema": {
  11174. "$ref": "#/components/schemas/SessionHistory"
  11175. }
  11176. }
  11177. }
  11178. },
  11179. "400": {
  11180. "description": "InvalidRequestError",
  11181. "content": {
  11182. "application/json": {
  11183. "schema": {
  11184. "$ref": "#/components/schemas/InvalidRequestError"
  11185. }
  11186. }
  11187. }
  11188. },
  11189. "401": {
  11190. "description": "UnauthorizedError",
  11191. "content": {
  11192. "application/json": {
  11193. "schema": {
  11194. "$ref": "#/components/schemas/UnauthorizedError"
  11195. }
  11196. }
  11197. }
  11198. },
  11199. "404": {
  11200. "description": "SessionNotFoundError",
  11201. "content": {
  11202. "application/json": {
  11203. "schema": {
  11204. "anyOf": [
  11205. {
  11206. "$ref": "#/components/schemas/SessionNotFoundError"
  11207. },
  11208. {
  11209. "$ref": "#/components/schemas/SessionNotFoundError"
  11210. }
  11211. ]
  11212. }
  11213. }
  11214. }
  11215. }
  11216. },
  11217. "description": "Read one finite page of public durable Session events after an exclusive aggregate sequence. Newly committed events may appear on later pages.",
  11218. "summary": "Get session history",
  11219. "x-codeSamples": [
  11220. {
  11221. "lang": "js",
  11222. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.history({\n ...\n})"
  11223. }
  11224. ]
  11225. }
  11226. },
  11227. "/api/session/{sessionID}/event": {
  11228. "get": {
  11229. "tags": ["sessions"],
  11230. "operationId": "v2.session.events",
  11231. "parameters": [
  11232. {
  11233. "name": "sessionID",
  11234. "in": "path",
  11235. "schema": {
  11236. "type": "string",
  11237. "pattern": "^ses"
  11238. },
  11239. "required": true
  11240. },
  11241. {
  11242. "name": "after",
  11243. "in": "query",
  11244. "schema": {
  11245. "type": "string"
  11246. },
  11247. "required": false
  11248. }
  11249. ],
  11250. "security": [],
  11251. "responses": {
  11252. "200": {
  11253. "description": "Success",
  11254. "content": {
  11255. "text/event-stream": {
  11256. "schema": {
  11257. "type": "object",
  11258. "properties": {
  11259. "id": {
  11260. "type": "string"
  11261. },
  11262. "event": {
  11263. "type": "string"
  11264. },
  11265. "data": {
  11266. "$ref": "#/components/schemas/SessionDurableEventStream"
  11267. }
  11268. },
  11269. "required": ["id", "event", "data"],
  11270. "additionalProperties": false
  11271. },
  11272. "x-effect-stream": {
  11273. "encoding": "sse",
  11274. "causeSchema": {
  11275. "type": "array",
  11276. "items": {
  11277. "anyOf": [
  11278. {
  11279. "type": "object",
  11280. "properties": {
  11281. "_tag": {
  11282. "type": "string",
  11283. "enum": ["Fail"]
  11284. },
  11285. "error": {
  11286. "not": {}
  11287. }
  11288. },
  11289. "required": ["_tag", "error"],
  11290. "additionalProperties": false
  11291. },
  11292. {
  11293. "type": "object",
  11294. "properties": {
  11295. "_tag": {
  11296. "type": "string",
  11297. "enum": ["Die"]
  11298. },
  11299. "defect": {}
  11300. },
  11301. "required": ["_tag", "defect"],
  11302. "additionalProperties": false
  11303. },
  11304. {
  11305. "type": "object",
  11306. "properties": {
  11307. "_tag": {
  11308. "type": "string",
  11309. "enum": ["Interrupt"]
  11310. },
  11311. "fiberId": {
  11312. "anyOf": [
  11313. {
  11314. "type": "number"
  11315. },
  11316. {
  11317. "type": "null"
  11318. }
  11319. ]
  11320. }
  11321. },
  11322. "required": ["_tag", "fiberId"],
  11323. "additionalProperties": false
  11324. }
  11325. ]
  11326. }
  11327. },
  11328. "errorSchema": {
  11329. "not": {}
  11330. },
  11331. "failureEvent": "effect/httpapi/stream/failure"
  11332. }
  11333. }
  11334. }
  11335. },
  11336. "400": {
  11337. "description": "InvalidRequestError",
  11338. "content": {
  11339. "application/json": {
  11340. "schema": {
  11341. "$ref": "#/components/schemas/InvalidRequestError"
  11342. }
  11343. }
  11344. }
  11345. },
  11346. "401": {
  11347. "description": "UnauthorizedError",
  11348. "content": {
  11349. "application/json": {
  11350. "schema": {
  11351. "$ref": "#/components/schemas/UnauthorizedError"
  11352. }
  11353. }
  11354. }
  11355. },
  11356. "404": {
  11357. "description": "SessionNotFoundError",
  11358. "content": {
  11359. "application/json": {
  11360. "schema": {
  11361. "anyOf": [
  11362. {
  11363. "$ref": "#/components/schemas/SessionNotFoundError"
  11364. },
  11365. {
  11366. "$ref": "#/components/schemas/SessionNotFoundError"
  11367. }
  11368. ]
  11369. }
  11370. }
  11371. }
  11372. }
  11373. },
  11374. "description": "Replay durable events after an aggregate sequence, then continue with new durable events.",
  11375. "summary": "Subscribe to session events",
  11376. "x-codeSamples": [
  11377. {
  11378. "lang": "js",
  11379. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.events({\n ...\n})"
  11380. }
  11381. ]
  11382. }
  11383. },
  11384. "/api/session/{sessionID}/interrupt": {
  11385. "post": {
  11386. "tags": ["sessions"],
  11387. "operationId": "v2.session.interrupt",
  11388. "parameters": [
  11389. {
  11390. "name": "sessionID",
  11391. "in": "path",
  11392. "schema": {
  11393. "type": "string",
  11394. "pattern": "^ses"
  11395. },
  11396. "required": true
  11397. }
  11398. ],
  11399. "security": [],
  11400. "responses": {
  11401. "204": {
  11402. "description": "<No Content>"
  11403. },
  11404. "400": {
  11405. "description": "InvalidRequestError",
  11406. "content": {
  11407. "application/json": {
  11408. "schema": {
  11409. "$ref": "#/components/schemas/InvalidRequestError"
  11410. }
  11411. }
  11412. }
  11413. },
  11414. "401": {
  11415. "description": "UnauthorizedError",
  11416. "content": {
  11417. "application/json": {
  11418. "schema": {
  11419. "$ref": "#/components/schemas/UnauthorizedError"
  11420. }
  11421. }
  11422. }
  11423. },
  11424. "404": {
  11425. "description": "SessionNotFoundError",
  11426. "content": {
  11427. "application/json": {
  11428. "schema": {
  11429. "anyOf": [
  11430. {
  11431. "$ref": "#/components/schemas/SessionNotFoundError"
  11432. },
  11433. {
  11434. "$ref": "#/components/schemas/SessionNotFoundError"
  11435. }
  11436. ]
  11437. }
  11438. }
  11439. }
  11440. }
  11441. },
  11442. "description": "Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op.",
  11443. "summary": "Interrupt session execution",
  11444. "x-codeSamples": [
  11445. {
  11446. "lang": "js",
  11447. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.interrupt({\n ...\n})"
  11448. }
  11449. ]
  11450. }
  11451. },
  11452. "/api/session/{sessionID}/message/{messageID}": {
  11453. "get": {
  11454. "tags": ["sessions"],
  11455. "operationId": "v2.session.message",
  11456. "parameters": [
  11457. {
  11458. "name": "sessionID",
  11459. "in": "path",
  11460. "schema": {
  11461. "type": "string",
  11462. "pattern": "^ses"
  11463. },
  11464. "required": true
  11465. },
  11466. {
  11467. "name": "messageID",
  11468. "in": "path",
  11469. "schema": {
  11470. "type": "string",
  11471. "pattern": "^msg_"
  11472. },
  11473. "required": true
  11474. }
  11475. ],
  11476. "security": [],
  11477. "responses": {
  11478. "200": {
  11479. "description": "Success",
  11480. "content": {
  11481. "application/json": {
  11482. "schema": {
  11483. "type": "object",
  11484. "properties": {
  11485. "data": {
  11486. "$ref": "#/components/schemas/SessionMessage"
  11487. }
  11488. },
  11489. "required": ["data"],
  11490. "additionalProperties": false
  11491. }
  11492. }
  11493. }
  11494. },
  11495. "400": {
  11496. "description": "InvalidRequestError",
  11497. "content": {
  11498. "application/json": {
  11499. "schema": {
  11500. "$ref": "#/components/schemas/InvalidRequestError"
  11501. }
  11502. }
  11503. }
  11504. },
  11505. "401": {
  11506. "description": "UnauthorizedError",
  11507. "content": {
  11508. "application/json": {
  11509. "schema": {
  11510. "$ref": "#/components/schemas/UnauthorizedError"
  11511. }
  11512. }
  11513. }
  11514. },
  11515. "404": {
  11516. "description": "SessionNotFoundError | MessageNotFoundError",
  11517. "content": {
  11518. "application/json": {
  11519. "schema": {
  11520. "anyOf": [
  11521. {
  11522. "$ref": "#/components/schemas/MessageNotFoundError"
  11523. },
  11524. {
  11525. "$ref": "#/components/schemas/SessionNotFoundError"
  11526. },
  11527. {
  11528. "$ref": "#/components/schemas/SessionNotFoundError"
  11529. }
  11530. ]
  11531. }
  11532. }
  11533. }
  11534. }
  11535. },
  11536. "description": "Retrieve one projected message owned by the Session.",
  11537. "summary": "Get session message",
  11538. "x-codeSamples": [
  11539. {
  11540. "lang": "js",
  11541. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.message({\n ...\n})"
  11542. }
  11543. ]
  11544. }
  11545. },
  11546. "/api/session/{sessionID}/message": {
  11547. "get": {
  11548. "tags": ["messages"],
  11549. "operationId": "v2.session.messages",
  11550. "parameters": [
  11551. {
  11552. "name": "sessionID",
  11553. "in": "path",
  11554. "schema": {
  11555. "type": "string",
  11556. "pattern": "^ses"
  11557. },
  11558. "required": true
  11559. },
  11560. {
  11561. "name": "limit",
  11562. "in": "query",
  11563. "schema": {
  11564. "type": "number"
  11565. },
  11566. "required": false
  11567. },
  11568. {
  11569. "name": "order",
  11570. "in": "query",
  11571. "schema": {
  11572. "type": "string",
  11573. "enum": ["asc", "desc"]
  11574. },
  11575. "required": false
  11576. },
  11577. {
  11578. "name": "cursor",
  11579. "in": "query",
  11580. "schema": {
  11581. "type": "string",
  11582. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  11583. },
  11584. "required": false
  11585. }
  11586. ],
  11587. "security": [],
  11588. "responses": {
  11589. "200": {
  11590. "description": "SessionMessagesResponse",
  11591. "content": {
  11592. "application/json": {
  11593. "schema": {
  11594. "$ref": "#/components/schemas/SessionMessagesResponse"
  11595. }
  11596. }
  11597. }
  11598. },
  11599. "400": {
  11600. "description": "InvalidCursorError | InvalidRequestError",
  11601. "content": {
  11602. "application/json": {
  11603. "schema": {
  11604. "anyOf": [
  11605. {
  11606. "$ref": "#/components/schemas/InvalidCursorError"
  11607. },
  11608. {
  11609. "$ref": "#/components/schemas/InvalidRequestError"
  11610. }
  11611. ]
  11612. }
  11613. }
  11614. }
  11615. },
  11616. "401": {
  11617. "description": "UnauthorizedError",
  11618. "content": {
  11619. "application/json": {
  11620. "schema": {
  11621. "$ref": "#/components/schemas/UnauthorizedError"
  11622. }
  11623. }
  11624. }
  11625. },
  11626. "404": {
  11627. "description": "SessionNotFoundError",
  11628. "content": {
  11629. "application/json": {
  11630. "schema": {
  11631. "anyOf": [
  11632. {
  11633. "$ref": "#/components/schemas/SessionNotFoundError"
  11634. },
  11635. {
  11636. "$ref": "#/components/schemas/SessionNotFoundError"
  11637. }
  11638. ]
  11639. }
  11640. }
  11641. }
  11642. },
  11643. "500": {
  11644. "description": "UnknownError",
  11645. "content": {
  11646. "application/json": {
  11647. "schema": {
  11648. "$ref": "#/components/schemas/UnknownError1"
  11649. }
  11650. }
  11651. }
  11652. }
  11653. },
  11654. "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.",
  11655. "summary": "Get session messages",
  11656. "x-codeSamples": [
  11657. {
  11658. "lang": "js",
  11659. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  11660. }
  11661. ]
  11662. }
  11663. },
  11664. "/api/model": {
  11665. "get": {
  11666. "tags": ["models"],
  11667. "operationId": "v2.model.list",
  11668. "parameters": [
  11669. {
  11670. "name": "location",
  11671. "in": "query",
  11672. "schema": {
  11673. "type": "object",
  11674. "properties": {
  11675. "directory": {
  11676. "type": "string"
  11677. },
  11678. "workspace": {
  11679. "type": "string"
  11680. }
  11681. },
  11682. "additionalProperties": false
  11683. },
  11684. "required": false,
  11685. "style": "deepObject",
  11686. "explode": true
  11687. }
  11688. ],
  11689. "security": [],
  11690. "responses": {
  11691. "200": {
  11692. "description": "Success",
  11693. "content": {
  11694. "application/json": {
  11695. "schema": {
  11696. "type": "object",
  11697. "properties": {
  11698. "location": {
  11699. "$ref": "#/components/schemas/LocationInfo"
  11700. },
  11701. "data": {
  11702. "type": "array",
  11703. "items": {
  11704. "$ref": "#/components/schemas/ModelV2Info"
  11705. }
  11706. }
  11707. },
  11708. "required": ["location", "data"],
  11709. "additionalProperties": false
  11710. }
  11711. }
  11712. }
  11713. },
  11714. "400": {
  11715. "description": "InvalidRequestError",
  11716. "content": {
  11717. "application/json": {
  11718. "schema": {
  11719. "$ref": "#/components/schemas/InvalidRequestError"
  11720. }
  11721. }
  11722. }
  11723. },
  11724. "401": {
  11725. "description": "UnauthorizedError",
  11726. "content": {
  11727. "application/json": {
  11728. "schema": {
  11729. "$ref": "#/components/schemas/UnauthorizedError"
  11730. }
  11731. }
  11732. }
  11733. },
  11734. "503": {
  11735. "description": "ServiceUnavailableError",
  11736. "content": {
  11737. "application/json": {
  11738. "schema": {
  11739. "$ref": "#/components/schemas/ServiceUnavailableError"
  11740. }
  11741. }
  11742. }
  11743. }
  11744. },
  11745. "description": "Retrieve available models ordered by release date.",
  11746. "summary": "List models",
  11747. "x-codeSamples": [
  11748. {
  11749. "lang": "js",
  11750. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  11751. }
  11752. ]
  11753. }
  11754. },
  11755. "/api/provider": {
  11756. "get": {
  11757. "tags": ["providers"],
  11758. "operationId": "v2.provider.list",
  11759. "parameters": [
  11760. {
  11761. "name": "location",
  11762. "in": "query",
  11763. "schema": {
  11764. "type": "object",
  11765. "properties": {
  11766. "directory": {
  11767. "type": "string"
  11768. },
  11769. "workspace": {
  11770. "type": "string"
  11771. }
  11772. },
  11773. "additionalProperties": false
  11774. },
  11775. "required": false,
  11776. "style": "deepObject",
  11777. "explode": true
  11778. }
  11779. ],
  11780. "security": [],
  11781. "responses": {
  11782. "200": {
  11783. "description": "Success",
  11784. "content": {
  11785. "application/json": {
  11786. "schema": {
  11787. "type": "object",
  11788. "properties": {
  11789. "location": {
  11790. "$ref": "#/components/schemas/LocationInfo"
  11791. },
  11792. "data": {
  11793. "type": "array",
  11794. "items": {
  11795. "$ref": "#/components/schemas/ProviderV2Info"
  11796. }
  11797. }
  11798. },
  11799. "required": ["location", "data"],
  11800. "additionalProperties": false
  11801. }
  11802. }
  11803. }
  11804. },
  11805. "400": {
  11806. "description": "InvalidRequestError",
  11807. "content": {
  11808. "application/json": {
  11809. "schema": {
  11810. "$ref": "#/components/schemas/InvalidRequestError"
  11811. }
  11812. }
  11813. }
  11814. },
  11815. "401": {
  11816. "description": "UnauthorizedError",
  11817. "content": {
  11818. "application/json": {
  11819. "schema": {
  11820. "$ref": "#/components/schemas/UnauthorizedError"
  11821. }
  11822. }
  11823. }
  11824. },
  11825. "503": {
  11826. "description": "ServiceUnavailableError",
  11827. "content": {
  11828. "application/json": {
  11829. "schema": {
  11830. "$ref": "#/components/schemas/ServiceUnavailableError"
  11831. }
  11832. }
  11833. }
  11834. }
  11835. },
  11836. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11837. "summary": "List providers",
  11838. "x-codeSamples": [
  11839. {
  11840. "lang": "js",
  11841. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11842. }
  11843. ]
  11844. }
  11845. },
  11846. "/api/provider/{providerID}": {
  11847. "get": {
  11848. "tags": ["providers"],
  11849. "operationId": "v2.provider.get",
  11850. "parameters": [
  11851. {
  11852. "name": "providerID",
  11853. "in": "path",
  11854. "schema": {
  11855. "type": "string"
  11856. },
  11857. "required": true
  11858. },
  11859. {
  11860. "name": "location",
  11861. "in": "query",
  11862. "schema": {
  11863. "type": "object",
  11864. "properties": {
  11865. "directory": {
  11866. "type": "string"
  11867. },
  11868. "workspace": {
  11869. "type": "string"
  11870. }
  11871. },
  11872. "additionalProperties": false
  11873. },
  11874. "required": false,
  11875. "style": "deepObject",
  11876. "explode": true
  11877. }
  11878. ],
  11879. "security": [],
  11880. "responses": {
  11881. "200": {
  11882. "description": "Success",
  11883. "content": {
  11884. "application/json": {
  11885. "schema": {
  11886. "type": "object",
  11887. "properties": {
  11888. "location": {
  11889. "$ref": "#/components/schemas/LocationInfo"
  11890. },
  11891. "data": {
  11892. "$ref": "#/components/schemas/ProviderV2Info"
  11893. }
  11894. },
  11895. "required": ["location", "data"],
  11896. "additionalProperties": false
  11897. }
  11898. }
  11899. }
  11900. },
  11901. "400": {
  11902. "description": "InvalidRequestError",
  11903. "content": {
  11904. "application/json": {
  11905. "schema": {
  11906. "$ref": "#/components/schemas/InvalidRequestError"
  11907. }
  11908. }
  11909. }
  11910. },
  11911. "401": {
  11912. "description": "UnauthorizedError",
  11913. "content": {
  11914. "application/json": {
  11915. "schema": {
  11916. "$ref": "#/components/schemas/UnauthorizedError"
  11917. }
  11918. }
  11919. }
  11920. },
  11921. "404": {
  11922. "description": "ProviderNotFoundError",
  11923. "content": {
  11924. "application/json": {
  11925. "schema": {
  11926. "$ref": "#/components/schemas/ProviderNotFoundError"
  11927. }
  11928. }
  11929. }
  11930. },
  11931. "503": {
  11932. "description": "ServiceUnavailableError",
  11933. "content": {
  11934. "application/json": {
  11935. "schema": {
  11936. "$ref": "#/components/schemas/ServiceUnavailableError"
  11937. }
  11938. }
  11939. }
  11940. }
  11941. },
  11942. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11943. "summary": "Get provider",
  11944. "x-codeSamples": [
  11945. {
  11946. "lang": "js",
  11947. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11948. }
  11949. ]
  11950. }
  11951. },
  11952. "/api/integration": {
  11953. "get": {
  11954. "tags": ["integrations"],
  11955. "operationId": "v2.integration.list",
  11956. "parameters": [
  11957. {
  11958. "name": "location",
  11959. "in": "query",
  11960. "schema": {
  11961. "type": "object",
  11962. "properties": {
  11963. "directory": {
  11964. "type": "string"
  11965. },
  11966. "workspace": {
  11967. "type": "string"
  11968. }
  11969. },
  11970. "additionalProperties": false
  11971. },
  11972. "required": false,
  11973. "style": "deepObject",
  11974. "explode": true
  11975. }
  11976. ],
  11977. "security": [],
  11978. "responses": {
  11979. "200": {
  11980. "description": "Success",
  11981. "content": {
  11982. "application/json": {
  11983. "schema": {
  11984. "type": "object",
  11985. "properties": {
  11986. "location": {
  11987. "$ref": "#/components/schemas/LocationInfo"
  11988. },
  11989. "data": {
  11990. "type": "array",
  11991. "items": {
  11992. "$ref": "#/components/schemas/IntegrationInfo"
  11993. }
  11994. }
  11995. },
  11996. "required": ["location", "data"],
  11997. "additionalProperties": false
  11998. }
  11999. }
  12000. }
  12001. },
  12002. "400": {
  12003. "description": "InvalidRequestError",
  12004. "content": {
  12005. "application/json": {
  12006. "schema": {
  12007. "$ref": "#/components/schemas/InvalidRequestError"
  12008. }
  12009. }
  12010. }
  12011. },
  12012. "401": {
  12013. "description": "UnauthorizedError",
  12014. "content": {
  12015. "application/json": {
  12016. "schema": {
  12017. "$ref": "#/components/schemas/UnauthorizedError"
  12018. }
  12019. }
  12020. }
  12021. }
  12022. },
  12023. "description": "Retrieve available integrations and their authentication methods.",
  12024. "summary": "List integrations",
  12025. "x-codeSamples": [
  12026. {
  12027. "lang": "js",
  12028. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  12029. }
  12030. ]
  12031. }
  12032. },
  12033. "/api/integration/{integrationID}": {
  12034. "get": {
  12035. "tags": ["integrations"],
  12036. "operationId": "v2.integration.get",
  12037. "parameters": [
  12038. {
  12039. "name": "integrationID",
  12040. "in": "path",
  12041. "schema": {
  12042. "type": "string"
  12043. },
  12044. "required": true
  12045. },
  12046. {
  12047. "name": "location",
  12048. "in": "query",
  12049. "schema": {
  12050. "type": "object",
  12051. "properties": {
  12052. "directory": {
  12053. "type": "string"
  12054. },
  12055. "workspace": {
  12056. "type": "string"
  12057. }
  12058. },
  12059. "additionalProperties": false
  12060. },
  12061. "required": false,
  12062. "style": "deepObject",
  12063. "explode": true
  12064. }
  12065. ],
  12066. "security": [],
  12067. "responses": {
  12068. "200": {
  12069. "description": "Success",
  12070. "content": {
  12071. "application/json": {
  12072. "schema": {
  12073. "type": "object",
  12074. "properties": {
  12075. "location": {
  12076. "$ref": "#/components/schemas/LocationInfo"
  12077. },
  12078. "data": {
  12079. "$ref": "#/components/schemas/IntegrationInfo"
  12080. }
  12081. },
  12082. "required": ["location", "data"],
  12083. "additionalProperties": false
  12084. }
  12085. }
  12086. }
  12087. },
  12088. "400": {
  12089. "description": "InvalidRequestError",
  12090. "content": {
  12091. "application/json": {
  12092. "schema": {
  12093. "$ref": "#/components/schemas/InvalidRequestError"
  12094. }
  12095. }
  12096. }
  12097. },
  12098. "401": {
  12099. "description": "UnauthorizedError",
  12100. "content": {
  12101. "application/json": {
  12102. "schema": {
  12103. "$ref": "#/components/schemas/UnauthorizedError"
  12104. }
  12105. }
  12106. }
  12107. }
  12108. },
  12109. "description": "Retrieve one integration and its authentication methods.",
  12110. "summary": "Get integration",
  12111. "x-codeSamples": [
  12112. {
  12113. "lang": "js",
  12114. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  12115. }
  12116. ]
  12117. }
  12118. },
  12119. "/api/integration/{integrationID}/connect/key": {
  12120. "post": {
  12121. "tags": ["integrations"],
  12122. "operationId": "v2.integration.connect.key",
  12123. "parameters": [
  12124. {
  12125. "name": "integrationID",
  12126. "in": "path",
  12127. "schema": {
  12128. "type": "string"
  12129. },
  12130. "required": true
  12131. },
  12132. {
  12133. "name": "location",
  12134. "in": "query",
  12135. "schema": {
  12136. "type": "object",
  12137. "properties": {
  12138. "directory": {
  12139. "type": "string"
  12140. },
  12141. "workspace": {
  12142. "type": "string"
  12143. }
  12144. },
  12145. "additionalProperties": false
  12146. },
  12147. "required": false,
  12148. "style": "deepObject",
  12149. "explode": true
  12150. }
  12151. ],
  12152. "security": [],
  12153. "responses": {
  12154. "204": {
  12155. "description": "<No Content>"
  12156. },
  12157. "400": {
  12158. "description": "InvalidRequestError",
  12159. "content": {
  12160. "application/json": {
  12161. "schema": {
  12162. "anyOf": [
  12163. {
  12164. "$ref": "#/components/schemas/InvalidRequestError"
  12165. },
  12166. {
  12167. "$ref": "#/components/schemas/InvalidRequestError"
  12168. }
  12169. ]
  12170. }
  12171. }
  12172. }
  12173. },
  12174. "401": {
  12175. "description": "UnauthorizedError",
  12176. "content": {
  12177. "application/json": {
  12178. "schema": {
  12179. "$ref": "#/components/schemas/UnauthorizedError"
  12180. }
  12181. }
  12182. }
  12183. }
  12184. },
  12185. "description": "Run a key authentication method and store the resulting credential.",
  12186. "summary": "Connect with key",
  12187. "requestBody": {
  12188. "content": {
  12189. "application/json": {
  12190. "schema": {
  12191. "type": "object",
  12192. "properties": {
  12193. "key": {
  12194. "type": "string"
  12195. },
  12196. "label": {
  12197. "type": "string"
  12198. }
  12199. },
  12200. "required": ["key"],
  12201. "additionalProperties": false
  12202. }
  12203. }
  12204. },
  12205. "required": true
  12206. },
  12207. "x-codeSamples": [
  12208. {
  12209. "lang": "js",
  12210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  12211. }
  12212. ]
  12213. }
  12214. },
  12215. "/api/integration/{integrationID}/connect/oauth": {
  12216. "post": {
  12217. "tags": ["integrations"],
  12218. "operationId": "v2.integration.connect.oauth",
  12219. "parameters": [
  12220. {
  12221. "name": "integrationID",
  12222. "in": "path",
  12223. "schema": {
  12224. "type": "string"
  12225. },
  12226. "required": true
  12227. },
  12228. {
  12229. "name": "location",
  12230. "in": "query",
  12231. "schema": {
  12232. "type": "object",
  12233. "properties": {
  12234. "directory": {
  12235. "type": "string"
  12236. },
  12237. "workspace": {
  12238. "type": "string"
  12239. }
  12240. },
  12241. "additionalProperties": false
  12242. },
  12243. "required": false,
  12244. "style": "deepObject",
  12245. "explode": true
  12246. }
  12247. ],
  12248. "security": [],
  12249. "responses": {
  12250. "200": {
  12251. "description": "Success",
  12252. "content": {
  12253. "application/json": {
  12254. "schema": {
  12255. "type": "object",
  12256. "properties": {
  12257. "location": {
  12258. "$ref": "#/components/schemas/LocationInfo"
  12259. },
  12260. "data": {
  12261. "$ref": "#/components/schemas/IntegrationAttempt"
  12262. }
  12263. },
  12264. "required": ["location", "data"],
  12265. "additionalProperties": false
  12266. }
  12267. }
  12268. }
  12269. },
  12270. "400": {
  12271. "description": "InvalidRequestError",
  12272. "content": {
  12273. "application/json": {
  12274. "schema": {
  12275. "anyOf": [
  12276. {
  12277. "$ref": "#/components/schemas/InvalidRequestError"
  12278. },
  12279. {
  12280. "$ref": "#/components/schemas/InvalidRequestError"
  12281. }
  12282. ]
  12283. }
  12284. }
  12285. }
  12286. },
  12287. "401": {
  12288. "description": "UnauthorizedError",
  12289. "content": {
  12290. "application/json": {
  12291. "schema": {
  12292. "$ref": "#/components/schemas/UnauthorizedError"
  12293. }
  12294. }
  12295. }
  12296. }
  12297. },
  12298. "description": "Start an OAuth attempt and return the authorization details.",
  12299. "summary": "Begin OAuth connection",
  12300. "requestBody": {
  12301. "content": {
  12302. "application/json": {
  12303. "schema": {
  12304. "type": "object",
  12305. "properties": {
  12306. "methodID": {
  12307. "type": "string"
  12308. },
  12309. "inputs": {
  12310. "type": "object",
  12311. "additionalProperties": {
  12312. "type": "string"
  12313. }
  12314. },
  12315. "label": {
  12316. "type": "string"
  12317. }
  12318. },
  12319. "required": ["methodID", "inputs"],
  12320. "additionalProperties": false
  12321. }
  12322. }
  12323. },
  12324. "required": true
  12325. },
  12326. "x-codeSamples": [
  12327. {
  12328. "lang": "js",
  12329. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  12330. }
  12331. ]
  12332. }
  12333. },
  12334. "/api/integration/attempt/{attemptID}": {
  12335. "get": {
  12336. "tags": ["integrations"],
  12337. "operationId": "v2.integration.attempt.status",
  12338. "parameters": [
  12339. {
  12340. "name": "attemptID",
  12341. "in": "path",
  12342. "schema": {
  12343. "type": "string"
  12344. },
  12345. "required": true
  12346. },
  12347. {
  12348. "name": "location",
  12349. "in": "query",
  12350. "schema": {
  12351. "type": "object",
  12352. "properties": {
  12353. "directory": {
  12354. "type": "string"
  12355. },
  12356. "workspace": {
  12357. "type": "string"
  12358. }
  12359. },
  12360. "additionalProperties": false
  12361. },
  12362. "required": false,
  12363. "style": "deepObject",
  12364. "explode": true
  12365. }
  12366. ],
  12367. "security": [],
  12368. "responses": {
  12369. "200": {
  12370. "description": "Success",
  12371. "content": {
  12372. "application/json": {
  12373. "schema": {
  12374. "type": "object",
  12375. "properties": {
  12376. "location": {
  12377. "$ref": "#/components/schemas/LocationInfo"
  12378. },
  12379. "data": {
  12380. "$ref": "#/components/schemas/IntegrationAttemptStatus"
  12381. }
  12382. },
  12383. "required": ["location", "data"],
  12384. "additionalProperties": false
  12385. }
  12386. }
  12387. }
  12388. },
  12389. "400": {
  12390. "description": "InvalidRequestError",
  12391. "content": {
  12392. "application/json": {
  12393. "schema": {
  12394. "$ref": "#/components/schemas/InvalidRequestError"
  12395. }
  12396. }
  12397. }
  12398. },
  12399. "401": {
  12400. "description": "UnauthorizedError",
  12401. "content": {
  12402. "application/json": {
  12403. "schema": {
  12404. "$ref": "#/components/schemas/UnauthorizedError"
  12405. }
  12406. }
  12407. }
  12408. }
  12409. },
  12410. "description": "Poll the current status of an OAuth attempt.",
  12411. "summary": "Get OAuth attempt status",
  12412. "x-codeSamples": [
  12413. {
  12414. "lang": "js",
  12415. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  12416. }
  12417. ]
  12418. },
  12419. "delete": {
  12420. "tags": ["integrations"],
  12421. "operationId": "v2.integration.attempt.cancel",
  12422. "parameters": [
  12423. {
  12424. "name": "attemptID",
  12425. "in": "path",
  12426. "schema": {
  12427. "type": "string"
  12428. },
  12429. "required": true
  12430. },
  12431. {
  12432. "name": "location",
  12433. "in": "query",
  12434. "schema": {
  12435. "type": "object",
  12436. "properties": {
  12437. "directory": {
  12438. "type": "string"
  12439. },
  12440. "workspace": {
  12441. "type": "string"
  12442. }
  12443. },
  12444. "additionalProperties": false
  12445. },
  12446. "required": false,
  12447. "style": "deepObject",
  12448. "explode": true
  12449. }
  12450. ],
  12451. "security": [],
  12452. "responses": {
  12453. "204": {
  12454. "description": "<No Content>"
  12455. },
  12456. "400": {
  12457. "description": "InvalidRequestError",
  12458. "content": {
  12459. "application/json": {
  12460. "schema": {
  12461. "$ref": "#/components/schemas/InvalidRequestError"
  12462. }
  12463. }
  12464. }
  12465. },
  12466. "401": {
  12467. "description": "UnauthorizedError",
  12468. "content": {
  12469. "application/json": {
  12470. "schema": {
  12471. "$ref": "#/components/schemas/UnauthorizedError"
  12472. }
  12473. }
  12474. }
  12475. }
  12476. },
  12477. "description": "Cancel an OAuth attempt and release its resources.",
  12478. "summary": "Cancel OAuth connection",
  12479. "x-codeSamples": [
  12480. {
  12481. "lang": "js",
  12482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  12483. }
  12484. ]
  12485. }
  12486. },
  12487. "/api/integration/attempt/{attemptID}/complete": {
  12488. "post": {
  12489. "tags": ["integrations"],
  12490. "operationId": "v2.integration.attempt.complete",
  12491. "parameters": [
  12492. {
  12493. "name": "attemptID",
  12494. "in": "path",
  12495. "schema": {
  12496. "type": "string"
  12497. },
  12498. "required": true
  12499. },
  12500. {
  12501. "name": "location",
  12502. "in": "query",
  12503. "schema": {
  12504. "type": "object",
  12505. "properties": {
  12506. "directory": {
  12507. "type": "string"
  12508. },
  12509. "workspace": {
  12510. "type": "string"
  12511. }
  12512. },
  12513. "additionalProperties": false
  12514. },
  12515. "required": false,
  12516. "style": "deepObject",
  12517. "explode": true
  12518. }
  12519. ],
  12520. "security": [],
  12521. "responses": {
  12522. "204": {
  12523. "description": "<No Content>"
  12524. },
  12525. "400": {
  12526. "description": "InvalidRequestError",
  12527. "content": {
  12528. "application/json": {
  12529. "schema": {
  12530. "anyOf": [
  12531. {
  12532. "$ref": "#/components/schemas/InvalidRequestError"
  12533. },
  12534. {
  12535. "$ref": "#/components/schemas/InvalidRequestError"
  12536. }
  12537. ]
  12538. }
  12539. }
  12540. }
  12541. },
  12542. "401": {
  12543. "description": "UnauthorizedError",
  12544. "content": {
  12545. "application/json": {
  12546. "schema": {
  12547. "$ref": "#/components/schemas/UnauthorizedError"
  12548. }
  12549. }
  12550. }
  12551. }
  12552. },
  12553. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12554. "summary": "Complete OAuth connection",
  12555. "requestBody": {
  12556. "content": {
  12557. "application/json": {
  12558. "schema": {
  12559. "type": "object",
  12560. "properties": {
  12561. "code": {
  12562. "type": "string"
  12563. }
  12564. },
  12565. "additionalProperties": false
  12566. }
  12567. }
  12568. },
  12569. "required": true
  12570. },
  12571. "x-codeSamples": [
  12572. {
  12573. "lang": "js",
  12574. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  12575. }
  12576. ]
  12577. }
  12578. },
  12579. "/api/credential/{credentialID}": {
  12580. "patch": {
  12581. "tags": ["opencode HttpApi"],
  12582. "operationId": "v2.credential.update",
  12583. "parameters": [
  12584. {
  12585. "name": "credentialID",
  12586. "in": "path",
  12587. "schema": {
  12588. "type": "string"
  12589. },
  12590. "required": true
  12591. },
  12592. {
  12593. "name": "location",
  12594. "in": "query",
  12595. "schema": {
  12596. "type": "object",
  12597. "properties": {
  12598. "directory": {
  12599. "type": "string"
  12600. },
  12601. "workspace": {
  12602. "type": "string"
  12603. }
  12604. },
  12605. "additionalProperties": false
  12606. },
  12607. "required": false,
  12608. "style": "deepObject",
  12609. "explode": true
  12610. }
  12611. ],
  12612. "security": [],
  12613. "responses": {
  12614. "204": {
  12615. "description": "<No Content>"
  12616. },
  12617. "400": {
  12618. "description": "InvalidRequestError",
  12619. "content": {
  12620. "application/json": {
  12621. "schema": {
  12622. "$ref": "#/components/schemas/InvalidRequestError"
  12623. }
  12624. }
  12625. }
  12626. },
  12627. "401": {
  12628. "description": "UnauthorizedError",
  12629. "content": {
  12630. "application/json": {
  12631. "schema": {
  12632. "$ref": "#/components/schemas/UnauthorizedError"
  12633. }
  12634. }
  12635. }
  12636. }
  12637. },
  12638. "description": "Update a stored credential label.",
  12639. "summary": "Update credential",
  12640. "requestBody": {
  12641. "content": {
  12642. "application/json": {
  12643. "schema": {
  12644. "type": "object",
  12645. "properties": {
  12646. "label": {
  12647. "type": "string"
  12648. }
  12649. },
  12650. "required": ["label"],
  12651. "additionalProperties": false
  12652. }
  12653. }
  12654. },
  12655. "required": true
  12656. },
  12657. "x-codeSamples": [
  12658. {
  12659. "lang": "js",
  12660. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12661. }
  12662. ]
  12663. },
  12664. "delete": {
  12665. "tags": ["opencode HttpApi"],
  12666. "operationId": "v2.credential.remove",
  12667. "parameters": [
  12668. {
  12669. "name": "credentialID",
  12670. "in": "path",
  12671. "schema": {
  12672. "type": "string"
  12673. },
  12674. "required": true
  12675. },
  12676. {
  12677. "name": "location",
  12678. "in": "query",
  12679. "schema": {
  12680. "type": "object",
  12681. "properties": {
  12682. "directory": {
  12683. "type": "string"
  12684. },
  12685. "workspace": {
  12686. "type": "string"
  12687. }
  12688. },
  12689. "additionalProperties": false
  12690. },
  12691. "required": false,
  12692. "style": "deepObject",
  12693. "explode": true
  12694. }
  12695. ],
  12696. "security": [],
  12697. "responses": {
  12698. "204": {
  12699. "description": "<No Content>"
  12700. },
  12701. "400": {
  12702. "description": "InvalidRequestError",
  12703. "content": {
  12704. "application/json": {
  12705. "schema": {
  12706. "$ref": "#/components/schemas/InvalidRequestError"
  12707. }
  12708. }
  12709. }
  12710. },
  12711. "401": {
  12712. "description": "UnauthorizedError",
  12713. "content": {
  12714. "application/json": {
  12715. "schema": {
  12716. "$ref": "#/components/schemas/UnauthorizedError"
  12717. }
  12718. }
  12719. }
  12720. }
  12721. },
  12722. "description": "Remove a stored integration credential.",
  12723. "summary": "Remove credential",
  12724. "x-codeSamples": [
  12725. {
  12726. "lang": "js",
  12727. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12728. }
  12729. ]
  12730. }
  12731. },
  12732. "/api/permission/request": {
  12733. "get": {
  12734. "tags": ["permissions"],
  12735. "operationId": "v2.permission.request.list",
  12736. "parameters": [
  12737. {
  12738. "name": "location",
  12739. "in": "query",
  12740. "schema": {
  12741. "type": "object",
  12742. "properties": {
  12743. "directory": {
  12744. "type": "string"
  12745. },
  12746. "workspace": {
  12747. "type": "string"
  12748. }
  12749. },
  12750. "additionalProperties": false
  12751. },
  12752. "required": false,
  12753. "style": "deepObject",
  12754. "explode": true
  12755. }
  12756. ],
  12757. "security": [],
  12758. "responses": {
  12759. "200": {
  12760. "description": "Success",
  12761. "content": {
  12762. "application/json": {
  12763. "schema": {
  12764. "type": "object",
  12765. "properties": {
  12766. "location": {
  12767. "$ref": "#/components/schemas/LocationInfo"
  12768. },
  12769. "data": {
  12770. "type": "array",
  12771. "items": {
  12772. "$ref": "#/components/schemas/PermissionV2Request"
  12773. }
  12774. }
  12775. },
  12776. "required": ["location", "data"],
  12777. "additionalProperties": false
  12778. }
  12779. }
  12780. }
  12781. },
  12782. "400": {
  12783. "description": "InvalidRequestError",
  12784. "content": {
  12785. "application/json": {
  12786. "schema": {
  12787. "$ref": "#/components/schemas/InvalidRequestError"
  12788. }
  12789. }
  12790. }
  12791. },
  12792. "401": {
  12793. "description": "UnauthorizedError",
  12794. "content": {
  12795. "application/json": {
  12796. "schema": {
  12797. "$ref": "#/components/schemas/UnauthorizedError"
  12798. }
  12799. }
  12800. }
  12801. }
  12802. },
  12803. "description": "Retrieve pending permission requests for a location.",
  12804. "summary": "List pending permission requests",
  12805. "x-codeSamples": [
  12806. {
  12807. "lang": "js",
  12808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12809. }
  12810. ]
  12811. }
  12812. },
  12813. "/api/permission/saved": {
  12814. "get": {
  12815. "tags": ["permissions"],
  12816. "operationId": "v2.permission.saved.list",
  12817. "parameters": [
  12818. {
  12819. "name": "projectID",
  12820. "in": "query",
  12821. "schema": {
  12822. "type": "string"
  12823. },
  12824. "required": false
  12825. }
  12826. ],
  12827. "security": [],
  12828. "responses": {
  12829. "200": {
  12830. "description": "Success",
  12831. "content": {
  12832. "application/json": {
  12833. "schema": {
  12834. "type": "object",
  12835. "properties": {
  12836. "data": {
  12837. "type": "array",
  12838. "items": {
  12839. "$ref": "#/components/schemas/PermissionSavedInfo"
  12840. }
  12841. }
  12842. },
  12843. "required": ["data"],
  12844. "additionalProperties": false
  12845. }
  12846. }
  12847. }
  12848. },
  12849. "400": {
  12850. "description": "InvalidRequestError",
  12851. "content": {
  12852. "application/json": {
  12853. "schema": {
  12854. "$ref": "#/components/schemas/InvalidRequestError"
  12855. }
  12856. }
  12857. }
  12858. },
  12859. "401": {
  12860. "description": "UnauthorizedError",
  12861. "content": {
  12862. "application/json": {
  12863. "schema": {
  12864. "$ref": "#/components/schemas/UnauthorizedError"
  12865. }
  12866. }
  12867. }
  12868. }
  12869. },
  12870. "description": "Retrieve saved permissions, optionally filtered by project.",
  12871. "summary": "List saved permissions",
  12872. "x-codeSamples": [
  12873. {
  12874. "lang": "js",
  12875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12876. }
  12877. ]
  12878. }
  12879. },
  12880. "/api/permission/saved/{id}": {
  12881. "delete": {
  12882. "tags": ["permissions"],
  12883. "operationId": "v2.permission.saved.remove",
  12884. "parameters": [
  12885. {
  12886. "name": "id",
  12887. "in": "path",
  12888. "schema": {
  12889. "type": "string"
  12890. },
  12891. "required": true
  12892. }
  12893. ],
  12894. "security": [],
  12895. "responses": {
  12896. "204": {
  12897. "description": "<No Content>"
  12898. },
  12899. "400": {
  12900. "description": "InvalidRequestError",
  12901. "content": {
  12902. "application/json": {
  12903. "schema": {
  12904. "$ref": "#/components/schemas/InvalidRequestError"
  12905. }
  12906. }
  12907. }
  12908. },
  12909. "401": {
  12910. "description": "UnauthorizedError",
  12911. "content": {
  12912. "application/json": {
  12913. "schema": {
  12914. "$ref": "#/components/schemas/UnauthorizedError"
  12915. }
  12916. }
  12917. }
  12918. }
  12919. },
  12920. "description": "Remove a saved permission by ID.",
  12921. "summary": "Remove saved permission",
  12922. "x-codeSamples": [
  12923. {
  12924. "lang": "js",
  12925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12926. }
  12927. ]
  12928. }
  12929. },
  12930. "/api/session/{sessionID}/permission": {
  12931. "post": {
  12932. "tags": ["permissions"],
  12933. "operationId": "v2.session.permission.create",
  12934. "parameters": [
  12935. {
  12936. "name": "sessionID",
  12937. "in": "path",
  12938. "schema": {
  12939. "type": "string",
  12940. "pattern": "^ses"
  12941. },
  12942. "required": true
  12943. }
  12944. ],
  12945. "security": [],
  12946. "responses": {
  12947. "200": {
  12948. "description": "Success",
  12949. "content": {
  12950. "application/json": {
  12951. "schema": {
  12952. "type": "object",
  12953. "properties": {
  12954. "data": {
  12955. "type": "object",
  12956. "properties": {
  12957. "id": {
  12958. "type": "string",
  12959. "pattern": "^per"
  12960. },
  12961. "effect": {
  12962. "$ref": "#/components/schemas/PermissionV2Effect"
  12963. }
  12964. },
  12965. "required": ["id", "effect"],
  12966. "additionalProperties": false
  12967. }
  12968. },
  12969. "required": ["data"],
  12970. "additionalProperties": false
  12971. }
  12972. }
  12973. }
  12974. },
  12975. "400": {
  12976. "description": "InvalidRequestError",
  12977. "content": {
  12978. "application/json": {
  12979. "schema": {
  12980. "$ref": "#/components/schemas/InvalidRequestError"
  12981. }
  12982. }
  12983. }
  12984. },
  12985. "401": {
  12986. "description": "UnauthorizedError",
  12987. "content": {
  12988. "application/json": {
  12989. "schema": {
  12990. "$ref": "#/components/schemas/UnauthorizedError"
  12991. }
  12992. }
  12993. }
  12994. },
  12995. "404": {
  12996. "description": "SessionNotFoundError",
  12997. "content": {
  12998. "application/json": {
  12999. "schema": {
  13000. "anyOf": [
  13001. {
  13002. "$ref": "#/components/schemas/SessionNotFoundError"
  13003. },
  13004. {
  13005. "$ref": "#/components/schemas/SessionNotFoundError"
  13006. }
  13007. ]
  13008. }
  13009. }
  13010. }
  13011. }
  13012. },
  13013. "description": "Evaluate and, when approval is required, create a permission request for a session.",
  13014. "summary": "Create permission request",
  13015. "requestBody": {
  13016. "content": {
  13017. "application/json": {
  13018. "schema": {
  13019. "type": "object",
  13020. "properties": {
  13021. "id": {
  13022. "type": "string",
  13023. "pattern": "^per"
  13024. },
  13025. "action": {
  13026. "type": "string"
  13027. },
  13028. "resources": {
  13029. "type": "array",
  13030. "items": {
  13031. "type": "string"
  13032. }
  13033. },
  13034. "save": {
  13035. "type": "array",
  13036. "items": {
  13037. "type": "string"
  13038. }
  13039. },
  13040. "metadata": {
  13041. "type": "object"
  13042. },
  13043. "source": {
  13044. "$ref": "#/components/schemas/PermissionV2Source"
  13045. },
  13046. "agent": {
  13047. "type": "string"
  13048. }
  13049. },
  13050. "required": ["action", "resources"],
  13051. "additionalProperties": false
  13052. }
  13053. }
  13054. },
  13055. "required": true
  13056. },
  13057. "x-codeSamples": [
  13058. {
  13059. "lang": "js",
  13060. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.create({\n ...\n})"
  13061. }
  13062. ]
  13063. },
  13064. "get": {
  13065. "tags": ["permissions"],
  13066. "operationId": "v2.session.permission.list",
  13067. "parameters": [
  13068. {
  13069. "name": "sessionID",
  13070. "in": "path",
  13071. "schema": {
  13072. "type": "string",
  13073. "pattern": "^ses"
  13074. },
  13075. "required": true
  13076. }
  13077. ],
  13078. "security": [],
  13079. "responses": {
  13080. "200": {
  13081. "description": "Success",
  13082. "content": {
  13083. "application/json": {
  13084. "schema": {
  13085. "type": "object",
  13086. "properties": {
  13087. "data": {
  13088. "type": "array",
  13089. "items": {
  13090. "$ref": "#/components/schemas/PermissionV2Request"
  13091. }
  13092. }
  13093. },
  13094. "required": ["data"],
  13095. "additionalProperties": false
  13096. }
  13097. }
  13098. }
  13099. },
  13100. "400": {
  13101. "description": "InvalidRequestError",
  13102. "content": {
  13103. "application/json": {
  13104. "schema": {
  13105. "$ref": "#/components/schemas/InvalidRequestError"
  13106. }
  13107. }
  13108. }
  13109. },
  13110. "401": {
  13111. "description": "UnauthorizedError",
  13112. "content": {
  13113. "application/json": {
  13114. "schema": {
  13115. "$ref": "#/components/schemas/UnauthorizedError"
  13116. }
  13117. }
  13118. }
  13119. },
  13120. "404": {
  13121. "description": "SessionNotFoundError",
  13122. "content": {
  13123. "application/json": {
  13124. "schema": {
  13125. "anyOf": [
  13126. {
  13127. "$ref": "#/components/schemas/SessionNotFoundError"
  13128. },
  13129. {
  13130. "$ref": "#/components/schemas/SessionNotFoundError"
  13131. }
  13132. ]
  13133. }
  13134. }
  13135. }
  13136. }
  13137. },
  13138. "description": "Retrieve pending permission requests owned by a session.",
  13139. "summary": "List session permission requests",
  13140. "x-codeSamples": [
  13141. {
  13142. "lang": "js",
  13143. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  13144. }
  13145. ]
  13146. }
  13147. },
  13148. "/api/session/{sessionID}/permission/{requestID}": {
  13149. "get": {
  13150. "tags": ["permissions"],
  13151. "operationId": "v2.session.permission.get",
  13152. "parameters": [
  13153. {
  13154. "name": "sessionID",
  13155. "in": "path",
  13156. "schema": {
  13157. "type": "string",
  13158. "pattern": "^ses"
  13159. },
  13160. "required": true
  13161. },
  13162. {
  13163. "name": "requestID",
  13164. "in": "path",
  13165. "schema": {
  13166. "type": "string",
  13167. "pattern": "^per"
  13168. },
  13169. "required": true
  13170. }
  13171. ],
  13172. "security": [],
  13173. "responses": {
  13174. "200": {
  13175. "description": "Success",
  13176. "content": {
  13177. "application/json": {
  13178. "schema": {
  13179. "type": "object",
  13180. "properties": {
  13181. "data": {
  13182. "$ref": "#/components/schemas/PermissionV2Request"
  13183. }
  13184. },
  13185. "required": ["data"],
  13186. "additionalProperties": false
  13187. }
  13188. }
  13189. }
  13190. },
  13191. "400": {
  13192. "description": "InvalidRequestError",
  13193. "content": {
  13194. "application/json": {
  13195. "schema": {
  13196. "$ref": "#/components/schemas/InvalidRequestError"
  13197. }
  13198. }
  13199. }
  13200. },
  13201. "401": {
  13202. "description": "UnauthorizedError",
  13203. "content": {
  13204. "application/json": {
  13205. "schema": {
  13206. "$ref": "#/components/schemas/UnauthorizedError"
  13207. }
  13208. }
  13209. }
  13210. },
  13211. "404": {
  13212. "description": "SessionNotFoundError | PermissionNotFoundError",
  13213. "content": {
  13214. "application/json": {
  13215. "schema": {
  13216. "anyOf": [
  13217. {
  13218. "$ref": "#/components/schemas/PermissionNotFoundError"
  13219. },
  13220. {
  13221. "$ref": "#/components/schemas/SessionNotFoundError"
  13222. },
  13223. {
  13224. "$ref": "#/components/schemas/SessionNotFoundError"
  13225. }
  13226. ]
  13227. }
  13228. }
  13229. }
  13230. }
  13231. },
  13232. "description": "Retrieve a pending permission request owned by a session.",
  13233. "summary": "Get permission request",
  13234. "x-codeSamples": [
  13235. {
  13236. "lang": "js",
  13237. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.get({\n ...\n})"
  13238. }
  13239. ]
  13240. }
  13241. },
  13242. "/api/session/{sessionID}/permission/{requestID}/reply": {
  13243. "post": {
  13244. "tags": ["permissions"],
  13245. "operationId": "v2.session.permission.reply",
  13246. "parameters": [
  13247. {
  13248. "name": "sessionID",
  13249. "in": "path",
  13250. "schema": {
  13251. "type": "string",
  13252. "pattern": "^ses"
  13253. },
  13254. "required": true
  13255. },
  13256. {
  13257. "name": "requestID",
  13258. "in": "path",
  13259. "schema": {
  13260. "type": "string",
  13261. "pattern": "^per"
  13262. },
  13263. "required": true
  13264. }
  13265. ],
  13266. "security": [],
  13267. "responses": {
  13268. "204": {
  13269. "description": "<No Content>"
  13270. },
  13271. "400": {
  13272. "description": "InvalidRequestError",
  13273. "content": {
  13274. "application/json": {
  13275. "schema": {
  13276. "$ref": "#/components/schemas/InvalidRequestError"
  13277. }
  13278. }
  13279. }
  13280. },
  13281. "401": {
  13282. "description": "UnauthorizedError",
  13283. "content": {
  13284. "application/json": {
  13285. "schema": {
  13286. "$ref": "#/components/schemas/UnauthorizedError"
  13287. }
  13288. }
  13289. }
  13290. },
  13291. "404": {
  13292. "description": "SessionNotFoundError | PermissionNotFoundError",
  13293. "content": {
  13294. "application/json": {
  13295. "schema": {
  13296. "anyOf": [
  13297. {
  13298. "$ref": "#/components/schemas/PermissionNotFoundError"
  13299. },
  13300. {
  13301. "$ref": "#/components/schemas/SessionNotFoundError"
  13302. },
  13303. {
  13304. "$ref": "#/components/schemas/SessionNotFoundError"
  13305. }
  13306. ]
  13307. }
  13308. }
  13309. }
  13310. }
  13311. },
  13312. "description": "Respond to a pending permission request owned by a session.",
  13313. "summary": "Reply to pending permission request",
  13314. "requestBody": {
  13315. "content": {
  13316. "application/json": {
  13317. "schema": {
  13318. "type": "object",
  13319. "properties": {
  13320. "reply": {
  13321. "$ref": "#/components/schemas/PermissionV2Reply"
  13322. },
  13323. "message": {
  13324. "type": "string"
  13325. }
  13326. },
  13327. "required": ["reply"],
  13328. "additionalProperties": false
  13329. }
  13330. }
  13331. },
  13332. "required": true
  13333. },
  13334. "x-codeSamples": [
  13335. {
  13336. "lang": "js",
  13337. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  13338. }
  13339. ]
  13340. }
  13341. },
  13342. "/api/fs/read/*": {
  13343. "get": {
  13344. "tags": ["filesystem"],
  13345. "operationId": "v2.fs.read",
  13346. "parameters": [
  13347. {
  13348. "name": "location",
  13349. "in": "query",
  13350. "schema": {
  13351. "type": "object",
  13352. "properties": {
  13353. "directory": {
  13354. "type": "string"
  13355. },
  13356. "workspace": {
  13357. "type": "string"
  13358. }
  13359. },
  13360. "additionalProperties": false
  13361. },
  13362. "required": false,
  13363. "style": "deepObject",
  13364. "explode": true
  13365. }
  13366. ],
  13367. "security": [],
  13368. "responses": {
  13369. "200": {
  13370. "description": "Success",
  13371. "content": {
  13372. "application/octet-stream": {
  13373. "schema": {
  13374. "type": "string",
  13375. "format": "binary"
  13376. }
  13377. }
  13378. }
  13379. },
  13380. "400": {
  13381. "description": "InvalidRequestError",
  13382. "content": {
  13383. "application/json": {
  13384. "schema": {
  13385. "$ref": "#/components/schemas/InvalidRequestError"
  13386. }
  13387. }
  13388. }
  13389. },
  13390. "401": {
  13391. "description": "UnauthorizedError",
  13392. "content": {
  13393. "application/json": {
  13394. "schema": {
  13395. "$ref": "#/components/schemas/UnauthorizedError"
  13396. }
  13397. }
  13398. }
  13399. }
  13400. },
  13401. "description": "Serve one file relative to the requested location.",
  13402. "summary": "Read file",
  13403. "x-codeSamples": [
  13404. {
  13405. "lang": "js",
  13406. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  13407. }
  13408. ]
  13409. }
  13410. },
  13411. "/api/fs/list": {
  13412. "get": {
  13413. "tags": ["filesystem"],
  13414. "operationId": "v2.fs.list",
  13415. "parameters": [
  13416. {
  13417. "name": "location",
  13418. "in": "query",
  13419. "schema": {
  13420. "type": "object",
  13421. "properties": {
  13422. "directory": {
  13423. "type": "string"
  13424. },
  13425. "workspace": {
  13426. "type": "string"
  13427. }
  13428. },
  13429. "additionalProperties": false
  13430. },
  13431. "required": false,
  13432. "style": "deepObject",
  13433. "explode": true
  13434. },
  13435. {
  13436. "name": "path",
  13437. "in": "query",
  13438. "schema": {
  13439. "type": "string"
  13440. },
  13441. "required": false
  13442. }
  13443. ],
  13444. "security": [],
  13445. "responses": {
  13446. "200": {
  13447. "description": "Success",
  13448. "content": {
  13449. "application/json": {
  13450. "schema": {
  13451. "type": "object",
  13452. "properties": {
  13453. "location": {
  13454. "$ref": "#/components/schemas/LocationInfo"
  13455. },
  13456. "data": {
  13457. "type": "array",
  13458. "items": {
  13459. "$ref": "#/components/schemas/FileSystemEntry"
  13460. }
  13461. }
  13462. },
  13463. "required": ["location", "data"],
  13464. "additionalProperties": false
  13465. }
  13466. }
  13467. }
  13468. },
  13469. "400": {
  13470. "description": "InvalidRequestError",
  13471. "content": {
  13472. "application/json": {
  13473. "schema": {
  13474. "$ref": "#/components/schemas/InvalidRequestError"
  13475. }
  13476. }
  13477. }
  13478. },
  13479. "401": {
  13480. "description": "UnauthorizedError",
  13481. "content": {
  13482. "application/json": {
  13483. "schema": {
  13484. "$ref": "#/components/schemas/UnauthorizedError"
  13485. }
  13486. }
  13487. }
  13488. }
  13489. },
  13490. "description": "List direct children of one directory relative to the requested location.",
  13491. "summary": "List directory",
  13492. "x-codeSamples": [
  13493. {
  13494. "lang": "js",
  13495. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  13496. }
  13497. ]
  13498. }
  13499. },
  13500. "/api/fs/find": {
  13501. "get": {
  13502. "tags": ["filesystem"],
  13503. "operationId": "v2.fs.find",
  13504. "parameters": [
  13505. {
  13506. "name": "location",
  13507. "in": "query",
  13508. "schema": {
  13509. "type": "object",
  13510. "properties": {
  13511. "directory": {
  13512. "type": "string"
  13513. },
  13514. "workspace": {
  13515. "type": "string"
  13516. }
  13517. },
  13518. "additionalProperties": false
  13519. },
  13520. "required": false,
  13521. "style": "deepObject",
  13522. "explode": true
  13523. },
  13524. {
  13525. "name": "query",
  13526. "in": "query",
  13527. "schema": {
  13528. "type": "string"
  13529. },
  13530. "required": true
  13531. },
  13532. {
  13533. "name": "type",
  13534. "in": "query",
  13535. "schema": {
  13536. "type": "string",
  13537. "enum": ["file", "directory"]
  13538. },
  13539. "required": false
  13540. },
  13541. {
  13542. "name": "limit",
  13543. "in": "query",
  13544. "schema": {
  13545. "type": "string"
  13546. },
  13547. "required": false
  13548. }
  13549. ],
  13550. "security": [],
  13551. "responses": {
  13552. "200": {
  13553. "description": "Success",
  13554. "content": {
  13555. "application/json": {
  13556. "schema": {
  13557. "type": "object",
  13558. "properties": {
  13559. "location": {
  13560. "$ref": "#/components/schemas/LocationInfo"
  13561. },
  13562. "data": {
  13563. "type": "array",
  13564. "items": {
  13565. "$ref": "#/components/schemas/FileSystemEntry"
  13566. }
  13567. }
  13568. },
  13569. "required": ["location", "data"],
  13570. "additionalProperties": false
  13571. }
  13572. }
  13573. }
  13574. },
  13575. "400": {
  13576. "description": "InvalidRequestError",
  13577. "content": {
  13578. "application/json": {
  13579. "schema": {
  13580. "$ref": "#/components/schemas/InvalidRequestError"
  13581. }
  13582. }
  13583. }
  13584. },
  13585. "401": {
  13586. "description": "UnauthorizedError",
  13587. "content": {
  13588. "application/json": {
  13589. "schema": {
  13590. "$ref": "#/components/schemas/UnauthorizedError"
  13591. }
  13592. }
  13593. }
  13594. }
  13595. },
  13596. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  13597. "summary": "Find files",
  13598. "x-codeSamples": [
  13599. {
  13600. "lang": "js",
  13601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  13602. }
  13603. ]
  13604. }
  13605. },
  13606. "/api/command": {
  13607. "get": {
  13608. "tags": ["commands"],
  13609. "operationId": "v2.command.list",
  13610. "parameters": [
  13611. {
  13612. "name": "location",
  13613. "in": "query",
  13614. "schema": {
  13615. "type": "object",
  13616. "properties": {
  13617. "directory": {
  13618. "type": "string"
  13619. },
  13620. "workspace": {
  13621. "type": "string"
  13622. }
  13623. },
  13624. "additionalProperties": false
  13625. },
  13626. "required": false,
  13627. "style": "deepObject",
  13628. "explode": true
  13629. }
  13630. ],
  13631. "security": [],
  13632. "responses": {
  13633. "200": {
  13634. "description": "Success",
  13635. "content": {
  13636. "application/json": {
  13637. "schema": {
  13638. "type": "object",
  13639. "properties": {
  13640. "location": {
  13641. "$ref": "#/components/schemas/LocationInfo"
  13642. },
  13643. "data": {
  13644. "type": "array",
  13645. "items": {
  13646. "$ref": "#/components/schemas/CommandV2Info"
  13647. }
  13648. }
  13649. },
  13650. "required": ["location", "data"],
  13651. "additionalProperties": false
  13652. }
  13653. }
  13654. }
  13655. },
  13656. "400": {
  13657. "description": "InvalidRequestError",
  13658. "content": {
  13659. "application/json": {
  13660. "schema": {
  13661. "$ref": "#/components/schemas/InvalidRequestError"
  13662. }
  13663. }
  13664. }
  13665. },
  13666. "401": {
  13667. "description": "UnauthorizedError",
  13668. "content": {
  13669. "application/json": {
  13670. "schema": {
  13671. "$ref": "#/components/schemas/UnauthorizedError"
  13672. }
  13673. }
  13674. }
  13675. }
  13676. },
  13677. "description": "Retrieve currently registered commands.",
  13678. "summary": "List commands",
  13679. "x-codeSamples": [
  13680. {
  13681. "lang": "js",
  13682. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  13683. }
  13684. ]
  13685. }
  13686. },
  13687. "/api/skill": {
  13688. "get": {
  13689. "tags": ["skills"],
  13690. "operationId": "v2.skill.list",
  13691. "parameters": [
  13692. {
  13693. "name": "location",
  13694. "in": "query",
  13695. "schema": {
  13696. "type": "object",
  13697. "properties": {
  13698. "directory": {
  13699. "type": "string"
  13700. },
  13701. "workspace": {
  13702. "type": "string"
  13703. }
  13704. },
  13705. "additionalProperties": false
  13706. },
  13707. "required": false,
  13708. "style": "deepObject",
  13709. "explode": true
  13710. }
  13711. ],
  13712. "security": [],
  13713. "responses": {
  13714. "200": {
  13715. "description": "Success",
  13716. "content": {
  13717. "application/json": {
  13718. "schema": {
  13719. "type": "object",
  13720. "properties": {
  13721. "location": {
  13722. "$ref": "#/components/schemas/LocationInfo"
  13723. },
  13724. "data": {
  13725. "type": "array",
  13726. "items": {
  13727. "$ref": "#/components/schemas/SkillV2Info"
  13728. }
  13729. }
  13730. },
  13731. "required": ["location", "data"],
  13732. "additionalProperties": false
  13733. }
  13734. }
  13735. }
  13736. },
  13737. "400": {
  13738. "description": "InvalidRequestError",
  13739. "content": {
  13740. "application/json": {
  13741. "schema": {
  13742. "$ref": "#/components/schemas/InvalidRequestError"
  13743. }
  13744. }
  13745. }
  13746. },
  13747. "401": {
  13748. "description": "UnauthorizedError",
  13749. "content": {
  13750. "application/json": {
  13751. "schema": {
  13752. "$ref": "#/components/schemas/UnauthorizedError"
  13753. }
  13754. }
  13755. }
  13756. }
  13757. },
  13758. "description": "Retrieve currently registered skills.",
  13759. "summary": "List skills",
  13760. "x-codeSamples": [
  13761. {
  13762. "lang": "js",
  13763. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  13764. }
  13765. ]
  13766. }
  13767. },
  13768. "/api/event": {
  13769. "get": {
  13770. "tags": ["events"],
  13771. "operationId": "v2.event.subscribe",
  13772. "parameters": [],
  13773. "security": [],
  13774. "responses": {
  13775. "200": {
  13776. "description": "Event stream",
  13777. "content": {
  13778. "text/event-stream": {
  13779. "schema": {
  13780. "$ref": "#/components/schemas/V2Event"
  13781. }
  13782. }
  13783. }
  13784. },
  13785. "400": {
  13786. "description": "InvalidRequestError",
  13787. "content": {
  13788. "application/json": {
  13789. "schema": {
  13790. "$ref": "#/components/schemas/InvalidRequestError"
  13791. }
  13792. }
  13793. }
  13794. },
  13795. "401": {
  13796. "description": "UnauthorizedError",
  13797. "content": {
  13798. "application/json": {
  13799. "schema": {
  13800. "$ref": "#/components/schemas/UnauthorizedError"
  13801. }
  13802. }
  13803. }
  13804. }
  13805. },
  13806. "description": "Subscribe to native event payloads for the server.",
  13807. "summary": "Subscribe to events",
  13808. "x-codeSamples": [
  13809. {
  13810. "lang": "js",
  13811. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13812. }
  13813. ]
  13814. }
  13815. },
  13816. "/api/pty": {
  13817. "get": {
  13818. "tags": ["pty"],
  13819. "operationId": "v2.pty.list",
  13820. "parameters": [
  13821. {
  13822. "name": "location",
  13823. "in": "query",
  13824. "schema": {
  13825. "type": "object",
  13826. "properties": {
  13827. "directory": {
  13828. "type": "string"
  13829. },
  13830. "workspace": {
  13831. "type": "string"
  13832. }
  13833. },
  13834. "additionalProperties": false
  13835. },
  13836. "required": false,
  13837. "style": "deepObject",
  13838. "explode": true
  13839. }
  13840. ],
  13841. "security": [],
  13842. "responses": {
  13843. "200": {
  13844. "description": "Success",
  13845. "content": {
  13846. "application/json": {
  13847. "schema": {
  13848. "type": "object",
  13849. "properties": {
  13850. "location": {
  13851. "$ref": "#/components/schemas/LocationInfo"
  13852. },
  13853. "data": {
  13854. "type": "array",
  13855. "items": {
  13856. "$ref": "#/components/schemas/Pty"
  13857. }
  13858. }
  13859. },
  13860. "required": ["location", "data"],
  13861. "additionalProperties": false
  13862. }
  13863. }
  13864. }
  13865. },
  13866. "400": {
  13867. "description": "InvalidRequestError",
  13868. "content": {
  13869. "application/json": {
  13870. "schema": {
  13871. "$ref": "#/components/schemas/InvalidRequestError"
  13872. }
  13873. }
  13874. }
  13875. },
  13876. "401": {
  13877. "description": "UnauthorizedError",
  13878. "content": {
  13879. "application/json": {
  13880. "schema": {
  13881. "$ref": "#/components/schemas/UnauthorizedError"
  13882. }
  13883. }
  13884. }
  13885. }
  13886. },
  13887. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13888. "summary": "List PTY sessions",
  13889. "x-codeSamples": [
  13890. {
  13891. "lang": "js",
  13892. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13893. }
  13894. ]
  13895. },
  13896. "post": {
  13897. "tags": ["pty"],
  13898. "operationId": "v2.pty.create",
  13899. "parameters": [
  13900. {
  13901. "name": "location",
  13902. "in": "query",
  13903. "schema": {
  13904. "type": "object",
  13905. "properties": {
  13906. "directory": {
  13907. "type": "string"
  13908. },
  13909. "workspace": {
  13910. "type": "string"
  13911. }
  13912. },
  13913. "additionalProperties": false
  13914. },
  13915. "required": false,
  13916. "style": "deepObject",
  13917. "explode": true
  13918. }
  13919. ],
  13920. "security": [],
  13921. "responses": {
  13922. "200": {
  13923. "description": "Success",
  13924. "content": {
  13925. "application/json": {
  13926. "schema": {
  13927. "type": "object",
  13928. "properties": {
  13929. "location": {
  13930. "$ref": "#/components/schemas/LocationInfo"
  13931. },
  13932. "data": {
  13933. "$ref": "#/components/schemas/Pty"
  13934. }
  13935. },
  13936. "required": ["location", "data"],
  13937. "additionalProperties": false
  13938. }
  13939. }
  13940. }
  13941. },
  13942. "400": {
  13943. "description": "InvalidRequestError",
  13944. "content": {
  13945. "application/json": {
  13946. "schema": {
  13947. "$ref": "#/components/schemas/InvalidRequestError"
  13948. }
  13949. }
  13950. }
  13951. },
  13952. "401": {
  13953. "description": "UnauthorizedError",
  13954. "content": {
  13955. "application/json": {
  13956. "schema": {
  13957. "$ref": "#/components/schemas/UnauthorizedError"
  13958. }
  13959. }
  13960. }
  13961. }
  13962. },
  13963. "description": "Create a pseudo-terminal session for a location.",
  13964. "summary": "Create PTY session",
  13965. "requestBody": {
  13966. "content": {
  13967. "application/json": {
  13968. "schema": {
  13969. "type": "object",
  13970. "properties": {
  13971. "command": {
  13972. "type": "string"
  13973. },
  13974. "args": {
  13975. "type": "array",
  13976. "items": {
  13977. "type": "string"
  13978. }
  13979. },
  13980. "cwd": {
  13981. "type": "string"
  13982. },
  13983. "title": {
  13984. "type": "string"
  13985. },
  13986. "env": {
  13987. "type": "object",
  13988. "additionalProperties": {
  13989. "type": "string"
  13990. }
  13991. }
  13992. },
  13993. "additionalProperties": false
  13994. }
  13995. }
  13996. },
  13997. "required": true
  13998. },
  13999. "x-codeSamples": [
  14000. {
  14001. "lang": "js",
  14002. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  14003. }
  14004. ]
  14005. }
  14006. },
  14007. "/api/pty/{ptyID}": {
  14008. "get": {
  14009. "tags": ["pty"],
  14010. "operationId": "v2.pty.get",
  14011. "parameters": [
  14012. {
  14013. "name": "ptyID",
  14014. "in": "path",
  14015. "schema": {
  14016. "type": "string",
  14017. "pattern": "^pty"
  14018. },
  14019. "required": true
  14020. },
  14021. {
  14022. "name": "location",
  14023. "in": "query",
  14024. "schema": {
  14025. "type": "object",
  14026. "properties": {
  14027. "directory": {
  14028. "type": "string"
  14029. },
  14030. "workspace": {
  14031. "type": "string"
  14032. }
  14033. },
  14034. "additionalProperties": false
  14035. },
  14036. "required": false,
  14037. "style": "deepObject",
  14038. "explode": true
  14039. }
  14040. ],
  14041. "security": [],
  14042. "responses": {
  14043. "200": {
  14044. "description": "Success",
  14045. "content": {
  14046. "application/json": {
  14047. "schema": {
  14048. "type": "object",
  14049. "properties": {
  14050. "location": {
  14051. "$ref": "#/components/schemas/LocationInfo"
  14052. },
  14053. "data": {
  14054. "$ref": "#/components/schemas/Pty"
  14055. }
  14056. },
  14057. "required": ["location", "data"],
  14058. "additionalProperties": false
  14059. }
  14060. }
  14061. }
  14062. },
  14063. "400": {
  14064. "description": "InvalidRequestError",
  14065. "content": {
  14066. "application/json": {
  14067. "schema": {
  14068. "$ref": "#/components/schemas/InvalidRequestError"
  14069. }
  14070. }
  14071. }
  14072. },
  14073. "401": {
  14074. "description": "UnauthorizedError",
  14075. "content": {
  14076. "application/json": {
  14077. "schema": {
  14078. "$ref": "#/components/schemas/UnauthorizedError"
  14079. }
  14080. }
  14081. }
  14082. },
  14083. "404": {
  14084. "description": "PtyNotFoundError",
  14085. "content": {
  14086. "application/json": {
  14087. "schema": {
  14088. "$ref": "#/components/schemas/PtyNotFoundError"
  14089. }
  14090. }
  14091. }
  14092. }
  14093. },
  14094. "description": "Get one PTY session, including its exit code once exited.",
  14095. "summary": "Get PTY session",
  14096. "x-codeSamples": [
  14097. {
  14098. "lang": "js",
  14099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  14100. }
  14101. ]
  14102. },
  14103. "put": {
  14104. "tags": ["pty"],
  14105. "operationId": "v2.pty.update",
  14106. "parameters": [
  14107. {
  14108. "name": "ptyID",
  14109. "in": "path",
  14110. "schema": {
  14111. "type": "string",
  14112. "pattern": "^pty"
  14113. },
  14114. "required": true
  14115. },
  14116. {
  14117. "name": "location",
  14118. "in": "query",
  14119. "schema": {
  14120. "type": "object",
  14121. "properties": {
  14122. "directory": {
  14123. "type": "string"
  14124. },
  14125. "workspace": {
  14126. "type": "string"
  14127. }
  14128. },
  14129. "additionalProperties": false
  14130. },
  14131. "required": false,
  14132. "style": "deepObject",
  14133. "explode": true
  14134. }
  14135. ],
  14136. "security": [],
  14137. "responses": {
  14138. "200": {
  14139. "description": "Success",
  14140. "content": {
  14141. "application/json": {
  14142. "schema": {
  14143. "type": "object",
  14144. "properties": {
  14145. "location": {
  14146. "$ref": "#/components/schemas/LocationInfo"
  14147. },
  14148. "data": {
  14149. "$ref": "#/components/schemas/Pty"
  14150. }
  14151. },
  14152. "required": ["location", "data"],
  14153. "additionalProperties": false
  14154. }
  14155. }
  14156. }
  14157. },
  14158. "400": {
  14159. "description": "InvalidRequestError",
  14160. "content": {
  14161. "application/json": {
  14162. "schema": {
  14163. "$ref": "#/components/schemas/InvalidRequestError"
  14164. }
  14165. }
  14166. }
  14167. },
  14168. "401": {
  14169. "description": "UnauthorizedError",
  14170. "content": {
  14171. "application/json": {
  14172. "schema": {
  14173. "$ref": "#/components/schemas/UnauthorizedError"
  14174. }
  14175. }
  14176. }
  14177. },
  14178. "404": {
  14179. "description": "PtyNotFoundError",
  14180. "content": {
  14181. "application/json": {
  14182. "schema": {
  14183. "$ref": "#/components/schemas/PtyNotFoundError"
  14184. }
  14185. }
  14186. }
  14187. }
  14188. },
  14189. "description": "Update the title or viewport size of one PTY session.",
  14190. "summary": "Update PTY session",
  14191. "requestBody": {
  14192. "content": {
  14193. "application/json": {
  14194. "schema": {
  14195. "type": "object",
  14196. "properties": {
  14197. "title": {
  14198. "type": "string"
  14199. },
  14200. "size": {
  14201. "type": "object",
  14202. "properties": {
  14203. "rows": {
  14204. "type": "integer",
  14205. "exclusiveMinimum": 0
  14206. },
  14207. "cols": {
  14208. "type": "integer",
  14209. "exclusiveMinimum": 0
  14210. }
  14211. },
  14212. "required": ["rows", "cols"],
  14213. "additionalProperties": false
  14214. }
  14215. },
  14216. "additionalProperties": false
  14217. }
  14218. }
  14219. },
  14220. "required": true
  14221. },
  14222. "x-codeSamples": [
  14223. {
  14224. "lang": "js",
  14225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  14226. }
  14227. ]
  14228. },
  14229. "delete": {
  14230. "tags": ["pty"],
  14231. "operationId": "v2.pty.remove",
  14232. "parameters": [
  14233. {
  14234. "name": "ptyID",
  14235. "in": "path",
  14236. "schema": {
  14237. "type": "string",
  14238. "pattern": "^pty"
  14239. },
  14240. "required": true
  14241. },
  14242. {
  14243. "name": "location",
  14244. "in": "query",
  14245. "schema": {
  14246. "type": "object",
  14247. "properties": {
  14248. "directory": {
  14249. "type": "string"
  14250. },
  14251. "workspace": {
  14252. "type": "string"
  14253. }
  14254. },
  14255. "additionalProperties": false
  14256. },
  14257. "required": false,
  14258. "style": "deepObject",
  14259. "explode": true
  14260. }
  14261. ],
  14262. "security": [],
  14263. "responses": {
  14264. "204": {
  14265. "description": "<No Content>"
  14266. },
  14267. "400": {
  14268. "description": "InvalidRequestError",
  14269. "content": {
  14270. "application/json": {
  14271. "schema": {
  14272. "$ref": "#/components/schemas/InvalidRequestError"
  14273. }
  14274. }
  14275. }
  14276. },
  14277. "401": {
  14278. "description": "UnauthorizedError",
  14279. "content": {
  14280. "application/json": {
  14281. "schema": {
  14282. "$ref": "#/components/schemas/UnauthorizedError"
  14283. }
  14284. }
  14285. }
  14286. },
  14287. "404": {
  14288. "description": "PtyNotFoundError",
  14289. "content": {
  14290. "application/json": {
  14291. "schema": {
  14292. "$ref": "#/components/schemas/PtyNotFoundError"
  14293. }
  14294. }
  14295. }
  14296. }
  14297. },
  14298. "description": "Terminate and remove one PTY session.",
  14299. "summary": "Remove PTY session",
  14300. "x-codeSamples": [
  14301. {
  14302. "lang": "js",
  14303. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  14304. }
  14305. ]
  14306. }
  14307. },
  14308. "/api/pty/{ptyID}/connect-token": {
  14309. "post": {
  14310. "tags": ["pty"],
  14311. "operationId": "v2.pty.connectToken",
  14312. "parameters": [
  14313. {
  14314. "name": "ptyID",
  14315. "in": "path",
  14316. "schema": {
  14317. "type": "string",
  14318. "pattern": "^pty"
  14319. },
  14320. "required": true
  14321. },
  14322. {
  14323. "name": "location",
  14324. "in": "query",
  14325. "schema": {
  14326. "type": "object",
  14327. "properties": {
  14328. "directory": {
  14329. "type": "string"
  14330. },
  14331. "workspace": {
  14332. "type": "string"
  14333. }
  14334. },
  14335. "additionalProperties": false
  14336. },
  14337. "required": false,
  14338. "style": "deepObject",
  14339. "explode": true
  14340. }
  14341. ],
  14342. "security": [],
  14343. "responses": {
  14344. "200": {
  14345. "description": "Success",
  14346. "content": {
  14347. "application/json": {
  14348. "schema": {
  14349. "type": "object",
  14350. "properties": {
  14351. "location": {
  14352. "$ref": "#/components/schemas/LocationInfo"
  14353. },
  14354. "data": {
  14355. "$ref": "#/components/schemas/PtyTicketConnectToken"
  14356. }
  14357. },
  14358. "required": ["location", "data"],
  14359. "additionalProperties": false
  14360. }
  14361. }
  14362. }
  14363. },
  14364. "400": {
  14365. "description": "InvalidRequestError",
  14366. "content": {
  14367. "application/json": {
  14368. "schema": {
  14369. "$ref": "#/components/schemas/InvalidRequestError"
  14370. }
  14371. }
  14372. }
  14373. },
  14374. "401": {
  14375. "description": "UnauthorizedError",
  14376. "content": {
  14377. "application/json": {
  14378. "schema": {
  14379. "$ref": "#/components/schemas/UnauthorizedError"
  14380. }
  14381. }
  14382. }
  14383. },
  14384. "403": {
  14385. "description": "ForbiddenError",
  14386. "content": {
  14387. "application/json": {
  14388. "schema": {
  14389. "$ref": "#/components/schemas/ForbiddenError"
  14390. }
  14391. }
  14392. }
  14393. },
  14394. "404": {
  14395. "description": "PtyNotFoundError",
  14396. "content": {
  14397. "application/json": {
  14398. "schema": {
  14399. "$ref": "#/components/schemas/PtyNotFoundError"
  14400. }
  14401. }
  14402. }
  14403. }
  14404. },
  14405. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  14406. "summary": "Create PTY WebSocket token",
  14407. "x-codeSamples": [
  14408. {
  14409. "lang": "js",
  14410. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  14411. }
  14412. ]
  14413. }
  14414. },
  14415. "/api/pty/{ptyID}/connect": {
  14416. "get": {
  14417. "tags": ["pty"],
  14418. "operationId": "v2.pty.connect",
  14419. "parameters": [
  14420. {
  14421. "name": "ptyID",
  14422. "in": "path",
  14423. "schema": {
  14424. "type": "string",
  14425. "pattern": "^pty"
  14426. },
  14427. "required": true
  14428. },
  14429. {
  14430. "in": "query",
  14431. "name": "location[directory]",
  14432. "schema": {
  14433. "type": "string"
  14434. }
  14435. },
  14436. {
  14437. "in": "query",
  14438. "name": "location[workspace]",
  14439. "schema": {
  14440. "type": "string"
  14441. }
  14442. },
  14443. {
  14444. "in": "query",
  14445. "name": "cursor",
  14446. "schema": {
  14447. "type": "string"
  14448. }
  14449. },
  14450. {
  14451. "in": "query",
  14452. "name": "ticket",
  14453. "schema": {
  14454. "type": "string"
  14455. }
  14456. }
  14457. ],
  14458. "security": [],
  14459. "responses": {
  14460. "200": {
  14461. "description": "Success",
  14462. "content": {
  14463. "application/json": {
  14464. "schema": {
  14465. "type": "boolean"
  14466. }
  14467. }
  14468. }
  14469. },
  14470. "400": {
  14471. "description": "InvalidRequestError",
  14472. "content": {
  14473. "application/json": {
  14474. "schema": {
  14475. "$ref": "#/components/schemas/InvalidRequestError"
  14476. }
  14477. }
  14478. }
  14479. },
  14480. "401": {
  14481. "description": "UnauthorizedError",
  14482. "content": {
  14483. "application/json": {
  14484. "schema": {
  14485. "$ref": "#/components/schemas/UnauthorizedError"
  14486. }
  14487. }
  14488. }
  14489. },
  14490. "403": {
  14491. "description": "ForbiddenError",
  14492. "content": {
  14493. "application/json": {
  14494. "schema": {
  14495. "$ref": "#/components/schemas/ForbiddenError"
  14496. }
  14497. }
  14498. }
  14499. },
  14500. "404": {
  14501. "description": "PtyNotFoundError",
  14502. "content": {
  14503. "application/json": {
  14504. "schema": {
  14505. "$ref": "#/components/schemas/PtyNotFoundError"
  14506. }
  14507. }
  14508. }
  14509. }
  14510. },
  14511. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  14512. "summary": "Connect to PTY session",
  14513. "x-websocket": true,
  14514. "x-codeSamples": [
  14515. {
  14516. "lang": "js",
  14517. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  14518. }
  14519. ]
  14520. }
  14521. },
  14522. "/api/question/request": {
  14523. "get": {
  14524. "tags": ["session questions"],
  14525. "operationId": "v2.question.request.list",
  14526. "parameters": [
  14527. {
  14528. "name": "location",
  14529. "in": "query",
  14530. "schema": {
  14531. "type": "object",
  14532. "properties": {
  14533. "directory": {
  14534. "type": "string"
  14535. },
  14536. "workspace": {
  14537. "type": "string"
  14538. }
  14539. },
  14540. "additionalProperties": false
  14541. },
  14542. "required": false,
  14543. "style": "deepObject",
  14544. "explode": true
  14545. }
  14546. ],
  14547. "security": [],
  14548. "responses": {
  14549. "200": {
  14550. "description": "Success",
  14551. "content": {
  14552. "application/json": {
  14553. "schema": {
  14554. "type": "object",
  14555. "properties": {
  14556. "location": {
  14557. "$ref": "#/components/schemas/LocationInfo"
  14558. },
  14559. "data": {
  14560. "type": "array",
  14561. "items": {
  14562. "$ref": "#/components/schemas/QuestionV2Request"
  14563. }
  14564. }
  14565. },
  14566. "required": ["location", "data"],
  14567. "additionalProperties": false
  14568. }
  14569. }
  14570. }
  14571. },
  14572. "400": {
  14573. "description": "InvalidRequestError",
  14574. "content": {
  14575. "application/json": {
  14576. "schema": {
  14577. "$ref": "#/components/schemas/InvalidRequestError"
  14578. }
  14579. }
  14580. }
  14581. },
  14582. "401": {
  14583. "description": "UnauthorizedError",
  14584. "content": {
  14585. "application/json": {
  14586. "schema": {
  14587. "$ref": "#/components/schemas/UnauthorizedError"
  14588. }
  14589. }
  14590. }
  14591. }
  14592. },
  14593. "description": "Retrieve pending question requests for a location.",
  14594. "summary": "List pending question requests",
  14595. "x-codeSamples": [
  14596. {
  14597. "lang": "js",
  14598. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  14599. }
  14600. ]
  14601. }
  14602. },
  14603. "/api/session/{sessionID}/question": {
  14604. "get": {
  14605. "tags": ["session questions"],
  14606. "operationId": "v2.session.question.list",
  14607. "parameters": [
  14608. {
  14609. "name": "sessionID",
  14610. "in": "path",
  14611. "schema": {
  14612. "type": "string",
  14613. "pattern": "^ses"
  14614. },
  14615. "required": true
  14616. }
  14617. ],
  14618. "security": [],
  14619. "responses": {
  14620. "200": {
  14621. "description": "Success",
  14622. "content": {
  14623. "application/json": {
  14624. "schema": {
  14625. "type": "object",
  14626. "properties": {
  14627. "data": {
  14628. "type": "array",
  14629. "items": {
  14630. "$ref": "#/components/schemas/QuestionV2Request"
  14631. }
  14632. }
  14633. },
  14634. "required": ["data"],
  14635. "additionalProperties": false
  14636. }
  14637. }
  14638. }
  14639. },
  14640. "400": {
  14641. "description": "InvalidRequestError",
  14642. "content": {
  14643. "application/json": {
  14644. "schema": {
  14645. "$ref": "#/components/schemas/InvalidRequestError"
  14646. }
  14647. }
  14648. }
  14649. },
  14650. "401": {
  14651. "description": "UnauthorizedError",
  14652. "content": {
  14653. "application/json": {
  14654. "schema": {
  14655. "$ref": "#/components/schemas/UnauthorizedError"
  14656. }
  14657. }
  14658. }
  14659. },
  14660. "404": {
  14661. "description": "SessionNotFoundError",
  14662. "content": {
  14663. "application/json": {
  14664. "schema": {
  14665. "anyOf": [
  14666. {
  14667. "$ref": "#/components/schemas/SessionNotFoundError"
  14668. },
  14669. {
  14670. "$ref": "#/components/schemas/SessionNotFoundError"
  14671. }
  14672. ]
  14673. }
  14674. }
  14675. }
  14676. }
  14677. },
  14678. "description": "Retrieve pending question requests owned by a session.",
  14679. "summary": "List session question requests",
  14680. "x-codeSamples": [
  14681. {
  14682. "lang": "js",
  14683. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14684. }
  14685. ]
  14686. }
  14687. },
  14688. "/api/session/{sessionID}/question/{requestID}/reply": {
  14689. "post": {
  14690. "tags": ["session questions"],
  14691. "operationId": "v2.session.question.reply",
  14692. "parameters": [
  14693. {
  14694. "name": "sessionID",
  14695. "in": "path",
  14696. "schema": {
  14697. "type": "string",
  14698. "pattern": "^ses"
  14699. },
  14700. "required": true
  14701. },
  14702. {
  14703. "name": "requestID",
  14704. "in": "path",
  14705. "schema": {
  14706. "type": "string",
  14707. "pattern": "^que"
  14708. },
  14709. "required": true
  14710. }
  14711. ],
  14712. "security": [],
  14713. "responses": {
  14714. "204": {
  14715. "description": "<No Content>"
  14716. },
  14717. "400": {
  14718. "description": "InvalidRequestError",
  14719. "content": {
  14720. "application/json": {
  14721. "schema": {
  14722. "$ref": "#/components/schemas/InvalidRequestError"
  14723. }
  14724. }
  14725. }
  14726. },
  14727. "401": {
  14728. "description": "UnauthorizedError",
  14729. "content": {
  14730. "application/json": {
  14731. "schema": {
  14732. "$ref": "#/components/schemas/UnauthorizedError"
  14733. }
  14734. }
  14735. }
  14736. },
  14737. "404": {
  14738. "description": "SessionNotFoundError | QuestionNotFoundError",
  14739. "content": {
  14740. "application/json": {
  14741. "schema": {
  14742. "anyOf": [
  14743. {
  14744. "$ref": "#/components/schemas/QuestionNotFoundError"
  14745. },
  14746. {
  14747. "$ref": "#/components/schemas/SessionNotFoundError"
  14748. },
  14749. {
  14750. "$ref": "#/components/schemas/SessionNotFoundError"
  14751. }
  14752. ]
  14753. }
  14754. }
  14755. }
  14756. }
  14757. },
  14758. "description": "Answer a pending question request owned by a session.",
  14759. "summary": "Reply to pending question request",
  14760. "requestBody": {
  14761. "content": {
  14762. "application/json": {
  14763. "schema": {
  14764. "$ref": "#/components/schemas/QuestionV2Reply"
  14765. }
  14766. }
  14767. },
  14768. "required": true
  14769. },
  14770. "x-codeSamples": [
  14771. {
  14772. "lang": "js",
  14773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14774. }
  14775. ]
  14776. }
  14777. },
  14778. "/api/session/{sessionID}/question/{requestID}/reject": {
  14779. "post": {
  14780. "tags": ["session questions"],
  14781. "operationId": "v2.session.question.reject",
  14782. "parameters": [
  14783. {
  14784. "name": "sessionID",
  14785. "in": "path",
  14786. "schema": {
  14787. "type": "string",
  14788. "pattern": "^ses"
  14789. },
  14790. "required": true
  14791. },
  14792. {
  14793. "name": "requestID",
  14794. "in": "path",
  14795. "schema": {
  14796. "type": "string",
  14797. "pattern": "^que"
  14798. },
  14799. "required": true
  14800. }
  14801. ],
  14802. "security": [],
  14803. "responses": {
  14804. "204": {
  14805. "description": "<No Content>"
  14806. },
  14807. "400": {
  14808. "description": "InvalidRequestError",
  14809. "content": {
  14810. "application/json": {
  14811. "schema": {
  14812. "$ref": "#/components/schemas/InvalidRequestError"
  14813. }
  14814. }
  14815. }
  14816. },
  14817. "401": {
  14818. "description": "UnauthorizedError",
  14819. "content": {
  14820. "application/json": {
  14821. "schema": {
  14822. "$ref": "#/components/schemas/UnauthorizedError"
  14823. }
  14824. }
  14825. }
  14826. },
  14827. "404": {
  14828. "description": "SessionNotFoundError | QuestionNotFoundError",
  14829. "content": {
  14830. "application/json": {
  14831. "schema": {
  14832. "anyOf": [
  14833. {
  14834. "$ref": "#/components/schemas/QuestionNotFoundError"
  14835. },
  14836. {
  14837. "$ref": "#/components/schemas/SessionNotFoundError"
  14838. },
  14839. {
  14840. "$ref": "#/components/schemas/SessionNotFoundError"
  14841. }
  14842. ]
  14843. }
  14844. }
  14845. }
  14846. }
  14847. },
  14848. "description": "Reject a pending question request owned by a session.",
  14849. "summary": "Reject pending question request",
  14850. "x-codeSamples": [
  14851. {
  14852. "lang": "js",
  14853. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14854. }
  14855. ]
  14856. }
  14857. },
  14858. "/api/reference": {
  14859. "get": {
  14860. "tags": ["reference"],
  14861. "operationId": "v2.reference.list",
  14862. "parameters": [
  14863. {
  14864. "name": "location",
  14865. "in": "query",
  14866. "schema": {
  14867. "type": "object",
  14868. "properties": {
  14869. "directory": {
  14870. "type": "string"
  14871. },
  14872. "workspace": {
  14873. "type": "string"
  14874. }
  14875. },
  14876. "additionalProperties": false
  14877. },
  14878. "required": false,
  14879. "style": "deepObject",
  14880. "explode": true
  14881. }
  14882. ],
  14883. "security": [],
  14884. "responses": {
  14885. "200": {
  14886. "description": "Success",
  14887. "content": {
  14888. "application/json": {
  14889. "schema": {
  14890. "type": "object",
  14891. "properties": {
  14892. "location": {
  14893. "$ref": "#/components/schemas/LocationInfo"
  14894. },
  14895. "data": {
  14896. "type": "array",
  14897. "items": {
  14898. "$ref": "#/components/schemas/ReferenceInfo"
  14899. }
  14900. }
  14901. },
  14902. "required": ["location", "data"],
  14903. "additionalProperties": false
  14904. }
  14905. }
  14906. }
  14907. },
  14908. "400": {
  14909. "description": "InvalidRequestError",
  14910. "content": {
  14911. "application/json": {
  14912. "schema": {
  14913. "$ref": "#/components/schemas/InvalidRequestError"
  14914. }
  14915. }
  14916. }
  14917. },
  14918. "401": {
  14919. "description": "UnauthorizedError",
  14920. "content": {
  14921. "application/json": {
  14922. "schema": {
  14923. "$ref": "#/components/schemas/UnauthorizedError"
  14924. }
  14925. }
  14926. }
  14927. }
  14928. },
  14929. "description": "List references available in the requested location.",
  14930. "summary": "List references",
  14931. "x-codeSamples": [
  14932. {
  14933. "lang": "js",
  14934. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14935. }
  14936. ]
  14937. }
  14938. },
  14939. "/experimental/project/{projectID}/copy": {
  14940. "post": {
  14941. "tags": ["projectCopy"],
  14942. "operationId": "v2.projectCopy.create",
  14943. "parameters": [
  14944. {
  14945. "name": "projectID",
  14946. "in": "path",
  14947. "schema": {
  14948. "type": "string"
  14949. },
  14950. "required": true
  14951. },
  14952. {
  14953. "name": "location",
  14954. "in": "query",
  14955. "schema": {
  14956. "type": "object",
  14957. "properties": {
  14958. "directory": {
  14959. "type": "string"
  14960. },
  14961. "workspace": {
  14962. "type": "string"
  14963. }
  14964. },
  14965. "additionalProperties": false
  14966. },
  14967. "required": false,
  14968. "style": "deepObject",
  14969. "explode": true
  14970. }
  14971. ],
  14972. "responses": {
  14973. "200": {
  14974. "description": "ProjectCopy.Copy",
  14975. "content": {
  14976. "application/json": {
  14977. "schema": {
  14978. "$ref": "#/components/schemas/ProjectCopyCopy"
  14979. }
  14980. }
  14981. }
  14982. },
  14983. "400": {
  14984. "description": "ProjectCopyError | InvalidRequestError",
  14985. "content": {
  14986. "application/json": {
  14987. "schema": {
  14988. "anyOf": [
  14989. {
  14990. "$ref": "#/components/schemas/ProjectCopyError"
  14991. },
  14992. {
  14993. "$ref": "#/components/schemas/InvalidRequestError"
  14994. }
  14995. ]
  14996. }
  14997. }
  14998. }
  14999. }
  15000. },
  15001. "requestBody": {
  15002. "content": {
  15003. "application/json": {
  15004. "schema": {
  15005. "type": "object",
  15006. "properties": {
  15007. "strategy": {
  15008. "type": "string"
  15009. },
  15010. "directory": {
  15011. "type": "string"
  15012. },
  15013. "name": {
  15014. "type": "string"
  15015. }
  15016. },
  15017. "required": ["strategy", "directory"],
  15018. "additionalProperties": false
  15019. }
  15020. }
  15021. }
  15022. },
  15023. "x-codeSamples": [
  15024. {
  15025. "lang": "js",
  15026. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  15027. }
  15028. ]
  15029. },
  15030. "delete": {
  15031. "tags": ["projectCopy"],
  15032. "operationId": "v2.projectCopy.remove",
  15033. "parameters": [
  15034. {
  15035. "name": "projectID",
  15036. "in": "path",
  15037. "schema": {
  15038. "type": "string"
  15039. },
  15040. "required": true
  15041. },
  15042. {
  15043. "name": "location",
  15044. "in": "query",
  15045. "schema": {
  15046. "type": "object",
  15047. "properties": {
  15048. "directory": {
  15049. "type": "string"
  15050. },
  15051. "workspace": {
  15052. "type": "string"
  15053. }
  15054. },
  15055. "additionalProperties": false
  15056. },
  15057. "required": false,
  15058. "style": "deepObject",
  15059. "explode": true
  15060. }
  15061. ],
  15062. "responses": {
  15063. "204": {
  15064. "description": "<No Content>"
  15065. },
  15066. "400": {
  15067. "description": "ProjectCopyError | InvalidRequestError",
  15068. "content": {
  15069. "application/json": {
  15070. "schema": {
  15071. "anyOf": [
  15072. {
  15073. "$ref": "#/components/schemas/ProjectCopyError"
  15074. },
  15075. {
  15076. "$ref": "#/components/schemas/InvalidRequestError"
  15077. }
  15078. ]
  15079. }
  15080. }
  15081. }
  15082. }
  15083. },
  15084. "requestBody": {
  15085. "content": {
  15086. "application/json": {
  15087. "schema": {
  15088. "type": "object",
  15089. "properties": {
  15090. "directory": {
  15091. "type": "string"
  15092. },
  15093. "force": {
  15094. "type": "boolean"
  15095. }
  15096. },
  15097. "required": ["directory", "force"],
  15098. "additionalProperties": false
  15099. }
  15100. }
  15101. }
  15102. },
  15103. "x-codeSamples": [
  15104. {
  15105. "lang": "js",
  15106. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  15107. }
  15108. ]
  15109. }
  15110. },
  15111. "/experimental/project/{projectID}/copy/refresh": {
  15112. "post": {
  15113. "tags": ["projectCopy"],
  15114. "operationId": "v2.projectCopy.refresh",
  15115. "parameters": [
  15116. {
  15117. "name": "projectID",
  15118. "in": "path",
  15119. "schema": {
  15120. "type": "string"
  15121. },
  15122. "required": true
  15123. },
  15124. {
  15125. "name": "location",
  15126. "in": "query",
  15127. "schema": {
  15128. "type": "object",
  15129. "properties": {
  15130. "directory": {
  15131. "type": "string"
  15132. },
  15133. "workspace": {
  15134. "type": "string"
  15135. }
  15136. },
  15137. "additionalProperties": false
  15138. },
  15139. "required": false,
  15140. "style": "deepObject",
  15141. "explode": true
  15142. }
  15143. ],
  15144. "responses": {
  15145. "204": {
  15146. "description": "<No Content>"
  15147. },
  15148. "400": {
  15149. "description": "ProjectCopyError | InvalidRequestError",
  15150. "content": {
  15151. "application/json": {
  15152. "schema": {
  15153. "anyOf": [
  15154. {
  15155. "$ref": "#/components/schemas/ProjectCopyError"
  15156. },
  15157. {
  15158. "$ref": "#/components/schemas/InvalidRequestError"
  15159. }
  15160. ]
  15161. }
  15162. }
  15163. }
  15164. }
  15165. },
  15166. "x-codeSamples": [
  15167. {
  15168. "lang": "js",
  15169. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  15170. }
  15171. ]
  15172. }
  15173. },
  15174. "/pty/{ptyID}/connect": {
  15175. "get": {
  15176. "tags": ["pty"],
  15177. "operationId": "pty.connect",
  15178. "parameters": [
  15179. {
  15180. "name": "ptyID",
  15181. "in": "path",
  15182. "schema": {
  15183. "type": "string",
  15184. "pattern": "^pty"
  15185. },
  15186. "required": true
  15187. },
  15188. {
  15189. "in": "query",
  15190. "name": "directory",
  15191. "schema": {
  15192. "type": "string"
  15193. }
  15194. },
  15195. {
  15196. "in": "query",
  15197. "name": "workspace",
  15198. "schema": {
  15199. "type": "string"
  15200. }
  15201. },
  15202. {
  15203. "in": "query",
  15204. "name": "cursor",
  15205. "schema": {
  15206. "type": "string"
  15207. }
  15208. },
  15209. {
  15210. "in": "query",
  15211. "name": "ticket",
  15212. "schema": {
  15213. "type": "string"
  15214. }
  15215. }
  15216. ],
  15217. "responses": {
  15218. "200": {
  15219. "description": "Connected session",
  15220. "content": {
  15221. "application/json": {
  15222. "schema": {
  15223. "type": "boolean",
  15224. "description": "Connected session"
  15225. }
  15226. }
  15227. }
  15228. },
  15229. "403": {
  15230. "description": "Forbidden",
  15231. "content": {
  15232. "application/json": {
  15233. "schema": {
  15234. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  15235. }
  15236. }
  15237. }
  15238. },
  15239. "404": {
  15240. "description": "Not found",
  15241. "content": {
  15242. "application/json": {
  15243. "schema": {
  15244. "$ref": "#/components/schemas/NotFoundError"
  15245. }
  15246. }
  15247. }
  15248. }
  15249. },
  15250. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  15251. "summary": "Connect to PTY session",
  15252. "x-codeSamples": [
  15253. {
  15254. "lang": "js",
  15255. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  15256. }
  15257. ]
  15258. }
  15259. }
  15260. },
  15261. "components": {
  15262. "schemas": {
  15263. "Event": {
  15264. "anyOf": [
  15265. {
  15266. "$ref": "#/components/schemas/EventModels-devRefreshed"
  15267. },
  15268. {
  15269. "$ref": "#/components/schemas/EventIntegrationUpdated"
  15270. },
  15271. {
  15272. "$ref": "#/components/schemas/EventIntegrationConnectionUpdated"
  15273. },
  15274. {
  15275. "$ref": "#/components/schemas/EventCatalogUpdated"
  15276. },
  15277. {
  15278. "$ref": "#/components/schemas/EventSessionCreated"
  15279. },
  15280. {
  15281. "$ref": "#/components/schemas/EventSessionUpdated"
  15282. },
  15283. {
  15284. "$ref": "#/components/schemas/EventSessionDeleted"
  15285. },
  15286. {
  15287. "$ref": "#/components/schemas/EventMessageUpdated"
  15288. },
  15289. {
  15290. "$ref": "#/components/schemas/EventMessageRemoved"
  15291. },
  15292. {
  15293. "$ref": "#/components/schemas/EventMessagePartUpdated"
  15294. },
  15295. {
  15296. "$ref": "#/components/schemas/EventMessagePartRemoved"
  15297. },
  15298. {
  15299. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  15300. },
  15301. {
  15302. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  15303. },
  15304. {
  15305. "$ref": "#/components/schemas/EventSessionNextMoved"
  15306. },
  15307. {
  15308. "$ref": "#/components/schemas/EventSessionNextPrompted"
  15309. },
  15310. {
  15311. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  15312. },
  15313. {
  15314. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  15315. },
  15316. {
  15317. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  15318. },
  15319. {
  15320. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  15321. },
  15322. {
  15323. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  15324. },
  15325. {
  15326. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  15327. },
  15328. {
  15329. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  15330. },
  15331. {
  15332. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  15333. },
  15334. {
  15335. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  15336. },
  15337. {
  15338. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  15339. },
  15340. {
  15341. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  15342. },
  15343. {
  15344. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  15345. },
  15346. {
  15347. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  15348. },
  15349. {
  15350. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  15351. },
  15352. {
  15353. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  15354. },
  15355. {
  15356. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  15357. },
  15358. {
  15359. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  15360. },
  15361. {
  15362. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  15363. },
  15364. {
  15365. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  15366. },
  15367. {
  15368. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  15369. },
  15370. {
  15371. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  15372. },
  15373. {
  15374. "$ref": "#/components/schemas/EventSessionNextRetried"
  15375. },
  15376. {
  15377. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  15378. },
  15379. {
  15380. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  15381. },
  15382. {
  15383. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  15384. },
  15385. {
  15386. "$ref": "#/components/schemas/EventSessionNextRevertStaged"
  15387. },
  15388. {
  15389. "$ref": "#/components/schemas/EventSessionNextRevertCleared"
  15390. },
  15391. {
  15392. "$ref": "#/components/schemas/EventSessionNextRevertCommitted"
  15393. },
  15394. {
  15395. "$ref": "#/components/schemas/EventMessagePartDelta"
  15396. },
  15397. {
  15398. "$ref": "#/components/schemas/EventSessionDiff"
  15399. },
  15400. {
  15401. "$ref": "#/components/schemas/EventSessionError"
  15402. },
  15403. {
  15404. "$ref": "#/components/schemas/EventInstallationUpdated"
  15405. },
  15406. {
  15407. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  15408. },
  15409. {
  15410. "$ref": "#/components/schemas/EventFileEdited"
  15411. },
  15412. {
  15413. "$ref": "#/components/schemas/EventReferenceUpdated"
  15414. },
  15415. {
  15416. "$ref": "#/components/schemas/EventPermissionV2Asked"
  15417. },
  15418. {
  15419. "$ref": "#/components/schemas/EventPermissionV2Replied"
  15420. },
  15421. {
  15422. "$ref": "#/components/schemas/EventPluginAdded"
  15423. },
  15424. {
  15425. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  15426. },
  15427. {
  15428. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  15429. },
  15430. {
  15431. "$ref": "#/components/schemas/EventPtyCreated"
  15432. },
  15433. {
  15434. "$ref": "#/components/schemas/EventPtyUpdated"
  15435. },
  15436. {
  15437. "$ref": "#/components/schemas/EventPtyExited"
  15438. },
  15439. {
  15440. "$ref": "#/components/schemas/EventPtyDeleted"
  15441. },
  15442. {
  15443. "$ref": "#/components/schemas/EventQuestionV2Asked"
  15444. },
  15445. {
  15446. "$ref": "#/components/schemas/EventQuestionV2Replied"
  15447. },
  15448. {
  15449. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  15450. },
  15451. {
  15452. "$ref": "#/components/schemas/EventTodoUpdated"
  15453. },
  15454. {
  15455. "$ref": "#/components/schemas/EventLspUpdated"
  15456. },
  15457. {
  15458. "$ref": "#/components/schemas/EventPermissionAsked"
  15459. },
  15460. {
  15461. "$ref": "#/components/schemas/EventPermissionReplied"
  15462. },
  15463. {
  15464. "$ref": "#/components/schemas/Event.tui.prompt.append"
  15465. },
  15466. {
  15467. "$ref": "#/components/schemas/Event.tui.command.execute"
  15468. },
  15469. {
  15470. "$ref": "#/components/schemas/Event.tui.toast.show"
  15471. },
  15472. {
  15473. "$ref": "#/components/schemas/Event.tui.session.select"
  15474. },
  15475. {
  15476. "$ref": "#/components/schemas/EventMcpToolsChanged"
  15477. },
  15478. {
  15479. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  15480. },
  15481. {
  15482. "$ref": "#/components/schemas/EventCommandExecuted"
  15483. },
  15484. {
  15485. "$ref": "#/components/schemas/EventProjectUpdated"
  15486. },
  15487. {
  15488. "$ref": "#/components/schemas/EventSessionStatus"
  15489. },
  15490. {
  15491. "$ref": "#/components/schemas/EventSessionIdle"
  15492. },
  15493. {
  15494. "$ref": "#/components/schemas/EventQuestionAsked"
  15495. },
  15496. {
  15497. "$ref": "#/components/schemas/EventQuestionReplied"
  15498. },
  15499. {
  15500. "$ref": "#/components/schemas/EventQuestionRejected"
  15501. },
  15502. {
  15503. "$ref": "#/components/schemas/EventSessionCompacted"
  15504. },
  15505. {
  15506. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  15507. },
  15508. {
  15509. "$ref": "#/components/schemas/EventWorkspaceReady"
  15510. },
  15511. {
  15512. "$ref": "#/components/schemas/EventWorkspaceFailed"
  15513. },
  15514. {
  15515. "$ref": "#/components/schemas/EventWorkspaceStatus"
  15516. },
  15517. {
  15518. "$ref": "#/components/schemas/EventWorktreeReady"
  15519. },
  15520. {
  15521. "$ref": "#/components/schemas/EventWorktreeFailed"
  15522. },
  15523. {
  15524. "$ref": "#/components/schemas/EventServerConnected"
  15525. },
  15526. {
  15527. "$ref": "#/components/schemas/EventGlobalDisposed"
  15528. },
  15529. {
  15530. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15531. }
  15532. ]
  15533. },
  15534. "QuestionReplied": {
  15535. "type": "object",
  15536. "properties": {
  15537. "sessionID": {
  15538. "type": "string",
  15539. "pattern": "^ses"
  15540. },
  15541. "requestID": {
  15542. "type": "string",
  15543. "pattern": "^que"
  15544. },
  15545. "answers": {
  15546. "type": "array",
  15547. "items": {
  15548. "$ref": "#/components/schemas/QuestionAnswer"
  15549. }
  15550. }
  15551. },
  15552. "required": ["sessionID", "requestID", "answers"],
  15553. "additionalProperties": false
  15554. },
  15555. "QuestionRejected": {
  15556. "type": "object",
  15557. "properties": {
  15558. "sessionID": {
  15559. "type": "string",
  15560. "pattern": "^ses"
  15561. },
  15562. "requestID": {
  15563. "type": "string",
  15564. "pattern": "^que"
  15565. }
  15566. },
  15567. "required": ["sessionID", "requestID"],
  15568. "additionalProperties": false
  15569. },
  15570. "OAuth": {
  15571. "type": "object",
  15572. "properties": {
  15573. "type": {
  15574. "type": "string",
  15575. "enum": ["oauth"]
  15576. },
  15577. "refresh": {
  15578. "type": "string"
  15579. },
  15580. "access": {
  15581. "type": "string"
  15582. },
  15583. "expires": {
  15584. "type": "integer",
  15585. "minimum": 0
  15586. },
  15587. "accountId": {
  15588. "type": "string"
  15589. },
  15590. "enterpriseUrl": {
  15591. "type": "string"
  15592. }
  15593. },
  15594. "required": ["type", "refresh", "access", "expires"],
  15595. "additionalProperties": false
  15596. },
  15597. "ApiAuth": {
  15598. "type": "object",
  15599. "properties": {
  15600. "type": {
  15601. "type": "string",
  15602. "enum": ["api"]
  15603. },
  15604. "key": {
  15605. "type": "string"
  15606. },
  15607. "metadata": {
  15608. "type": "object",
  15609. "additionalProperties": {
  15610. "type": "string"
  15611. }
  15612. }
  15613. },
  15614. "required": ["type", "key"],
  15615. "additionalProperties": false
  15616. },
  15617. "WellKnownAuth": {
  15618. "type": "object",
  15619. "properties": {
  15620. "type": {
  15621. "type": "string",
  15622. "enum": ["wellknown"]
  15623. },
  15624. "key": {
  15625. "type": "string"
  15626. },
  15627. "token": {
  15628. "type": "string"
  15629. }
  15630. },
  15631. "required": ["type", "key", "token"],
  15632. "additionalProperties": false
  15633. },
  15634. "Auth": {
  15635. "anyOf": [
  15636. {
  15637. "$ref": "#/components/schemas/OAuth"
  15638. },
  15639. {
  15640. "$ref": "#/components/schemas/ApiAuth"
  15641. },
  15642. {
  15643. "$ref": "#/components/schemas/WellKnownAuth"
  15644. }
  15645. ]
  15646. },
  15647. "effect_HttpApiError_BadRequest": {
  15648. "type": "object",
  15649. "properties": {
  15650. "_tag": {
  15651. "type": "string",
  15652. "enum": ["BadRequest"]
  15653. }
  15654. },
  15655. "required": ["_tag"],
  15656. "additionalProperties": false
  15657. },
  15658. "InvalidRequestError": {
  15659. "type": "object",
  15660. "properties": {
  15661. "_tag": {
  15662. "type": "string",
  15663. "enum": ["InvalidRequestError"]
  15664. },
  15665. "message": {
  15666. "type": "string"
  15667. },
  15668. "kind": {
  15669. "type": "string"
  15670. },
  15671. "field": {
  15672. "type": "string"
  15673. }
  15674. },
  15675. "required": ["_tag", "message"],
  15676. "additionalProperties": false
  15677. },
  15678. "MoveSessionError": {
  15679. "type": "object",
  15680. "properties": {
  15681. "name": {
  15682. "type": "string",
  15683. "enum": ["MoveSessionError"]
  15684. },
  15685. "data": {
  15686. "type": "object",
  15687. "properties": {
  15688. "message": {
  15689. "type": "string"
  15690. }
  15691. },
  15692. "required": ["message"],
  15693. "additionalProperties": false
  15694. }
  15695. },
  15696. "required": ["name", "data"],
  15697. "additionalProperties": false
  15698. },
  15699. "SnapshotFileDiff": {
  15700. "type": "object",
  15701. "properties": {
  15702. "file": {
  15703. "type": "string"
  15704. },
  15705. "patch": {
  15706. "type": "string"
  15707. },
  15708. "additions": {
  15709. "type": "number"
  15710. },
  15711. "deletions": {
  15712. "type": "number"
  15713. },
  15714. "status": {
  15715. "type": "string",
  15716. "enum": ["added", "deleted", "modified"]
  15717. }
  15718. },
  15719. "required": ["additions", "deletions"],
  15720. "additionalProperties": false
  15721. },
  15722. "PermissionAction": {
  15723. "type": "string",
  15724. "enum": ["allow", "deny", "ask"]
  15725. },
  15726. "PermissionRule": {
  15727. "type": "object",
  15728. "properties": {
  15729. "permission": {
  15730. "type": "string"
  15731. },
  15732. "pattern": {
  15733. "type": "string"
  15734. },
  15735. "action": {
  15736. "$ref": "#/components/schemas/PermissionAction"
  15737. }
  15738. },
  15739. "required": ["permission", "pattern", "action"],
  15740. "additionalProperties": false
  15741. },
  15742. "PermissionRuleset": {
  15743. "type": "array",
  15744. "items": {
  15745. "$ref": "#/components/schemas/PermissionRule"
  15746. }
  15747. },
  15748. "Session": {
  15749. "type": "object",
  15750. "properties": {
  15751. "id": {
  15752. "type": "string",
  15753. "pattern": "^ses"
  15754. },
  15755. "slug": {
  15756. "type": "string"
  15757. },
  15758. "projectID": {
  15759. "type": "string"
  15760. },
  15761. "workspaceID": {
  15762. "type": "string",
  15763. "pattern": "^wrk"
  15764. },
  15765. "directory": {
  15766. "type": "string"
  15767. },
  15768. "path": {
  15769. "type": "string"
  15770. },
  15771. "parentID": {
  15772. "type": "string",
  15773. "pattern": "^ses"
  15774. },
  15775. "summary": {
  15776. "type": "object",
  15777. "properties": {
  15778. "additions": {
  15779. "type": "number"
  15780. },
  15781. "deletions": {
  15782. "type": "number"
  15783. },
  15784. "files": {
  15785. "type": "number"
  15786. },
  15787. "diffs": {
  15788. "type": "array",
  15789. "items": {
  15790. "$ref": "#/components/schemas/SnapshotFileDiff"
  15791. }
  15792. }
  15793. },
  15794. "required": ["additions", "deletions", "files"],
  15795. "additionalProperties": false
  15796. },
  15797. "cost": {
  15798. "type": "number"
  15799. },
  15800. "tokens": {
  15801. "type": "object",
  15802. "properties": {
  15803. "input": {
  15804. "type": "number"
  15805. },
  15806. "output": {
  15807. "type": "number"
  15808. },
  15809. "reasoning": {
  15810. "type": "number"
  15811. },
  15812. "cache": {
  15813. "type": "object",
  15814. "properties": {
  15815. "read": {
  15816. "type": "number"
  15817. },
  15818. "write": {
  15819. "type": "number"
  15820. }
  15821. },
  15822. "required": ["read", "write"],
  15823. "additionalProperties": false
  15824. }
  15825. },
  15826. "required": ["input", "output", "reasoning", "cache"],
  15827. "additionalProperties": false
  15828. },
  15829. "share": {
  15830. "type": "object",
  15831. "properties": {
  15832. "url": {
  15833. "type": "string"
  15834. }
  15835. },
  15836. "required": ["url"],
  15837. "additionalProperties": false
  15838. },
  15839. "title": {
  15840. "type": "string"
  15841. },
  15842. "agent": {
  15843. "type": "string"
  15844. },
  15845. "model": {
  15846. "type": "object",
  15847. "properties": {
  15848. "id": {
  15849. "type": "string"
  15850. },
  15851. "providerID": {
  15852. "type": "string"
  15853. },
  15854. "variant": {
  15855. "type": "string"
  15856. }
  15857. },
  15858. "required": ["id", "providerID"],
  15859. "additionalProperties": false
  15860. },
  15861. "version": {
  15862. "type": "string"
  15863. },
  15864. "metadata": {
  15865. "type": "object"
  15866. },
  15867. "time": {
  15868. "type": "object",
  15869. "properties": {
  15870. "created": {
  15871. "type": "integer",
  15872. "minimum": 0
  15873. },
  15874. "updated": {
  15875. "type": "integer",
  15876. "minimum": 0
  15877. },
  15878. "compacting": {
  15879. "type": "integer",
  15880. "minimum": 0
  15881. },
  15882. "archived": {
  15883. "type": "number"
  15884. }
  15885. },
  15886. "required": ["created", "updated"],
  15887. "additionalProperties": false
  15888. },
  15889. "permission": {
  15890. "$ref": "#/components/schemas/PermissionRuleset"
  15891. },
  15892. "revert": {
  15893. "type": "object",
  15894. "properties": {
  15895. "messageID": {
  15896. "type": "string",
  15897. "pattern": "^msg"
  15898. },
  15899. "partID": {
  15900. "type": "string",
  15901. "pattern": "^prt"
  15902. },
  15903. "snapshot": {
  15904. "type": "string"
  15905. },
  15906. "diff": {
  15907. "type": "string"
  15908. }
  15909. },
  15910. "required": ["messageID"],
  15911. "additionalProperties": false
  15912. }
  15913. },
  15914. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15915. "additionalProperties": false
  15916. },
  15917. "OutputFormatText": {
  15918. "type": "object",
  15919. "properties": {
  15920. "type": {
  15921. "type": "string",
  15922. "enum": ["text"]
  15923. }
  15924. },
  15925. "required": ["type"],
  15926. "additionalProperties": false
  15927. },
  15928. "JSONSchema": {
  15929. "type": "object"
  15930. },
  15931. "OutputFormatJsonSchema": {
  15932. "type": "object",
  15933. "properties": {
  15934. "type": {
  15935. "type": "string",
  15936. "enum": ["json_schema"]
  15937. },
  15938. "schema": {
  15939. "$ref": "#/components/schemas/JSONSchema"
  15940. },
  15941. "retryCount": {
  15942. "type": "integer",
  15943. "minimum": 0
  15944. }
  15945. },
  15946. "required": ["type", "schema"],
  15947. "additionalProperties": false
  15948. },
  15949. "OutputFormat": {
  15950. "anyOf": [
  15951. {
  15952. "$ref": "#/components/schemas/OutputFormatText"
  15953. },
  15954. {
  15955. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15956. }
  15957. ]
  15958. },
  15959. "UserMessage": {
  15960. "type": "object",
  15961. "properties": {
  15962. "id": {
  15963. "type": "string",
  15964. "pattern": "^msg"
  15965. },
  15966. "sessionID": {
  15967. "type": "string",
  15968. "pattern": "^ses"
  15969. },
  15970. "role": {
  15971. "type": "string",
  15972. "enum": ["user"]
  15973. },
  15974. "time": {
  15975. "type": "object",
  15976. "properties": {
  15977. "created": {
  15978. "type": "number",
  15979. "minimum": 0
  15980. }
  15981. },
  15982. "required": ["created"],
  15983. "additionalProperties": false
  15984. },
  15985. "format": {
  15986. "$ref": "#/components/schemas/OutputFormat"
  15987. },
  15988. "summary": {
  15989. "type": "object",
  15990. "properties": {
  15991. "title": {
  15992. "type": "string"
  15993. },
  15994. "body": {
  15995. "type": "string"
  15996. },
  15997. "diffs": {
  15998. "type": "array",
  15999. "items": {
  16000. "$ref": "#/components/schemas/SnapshotFileDiff"
  16001. }
  16002. }
  16003. },
  16004. "required": ["diffs"],
  16005. "additionalProperties": false
  16006. },
  16007. "agent": {
  16008. "type": "string"
  16009. },
  16010. "model": {
  16011. "type": "object",
  16012. "properties": {
  16013. "providerID": {
  16014. "type": "string"
  16015. },
  16016. "modelID": {
  16017. "type": "string"
  16018. },
  16019. "variant": {
  16020. "type": "string"
  16021. }
  16022. },
  16023. "required": ["providerID", "modelID"],
  16024. "additionalProperties": false
  16025. },
  16026. "system": {
  16027. "type": "string"
  16028. },
  16029. "tools": {
  16030. "type": "object",
  16031. "additionalProperties": {
  16032. "type": "boolean"
  16033. }
  16034. }
  16035. },
  16036. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  16037. "additionalProperties": false
  16038. },
  16039. "ProviderAuthError": {
  16040. "type": "object",
  16041. "properties": {
  16042. "name": {
  16043. "type": "string",
  16044. "enum": ["ProviderAuthError"]
  16045. },
  16046. "data": {
  16047. "type": "object",
  16048. "properties": {
  16049. "providerID": {
  16050. "type": "string"
  16051. },
  16052. "message": {
  16053. "type": "string"
  16054. }
  16055. },
  16056. "required": ["providerID", "message"],
  16057. "additionalProperties": false
  16058. }
  16059. },
  16060. "required": ["name", "data"],
  16061. "additionalProperties": false
  16062. },
  16063. "UnknownError": {
  16064. "type": "object",
  16065. "properties": {
  16066. "name": {
  16067. "type": "string",
  16068. "enum": ["UnknownError"]
  16069. },
  16070. "data": {
  16071. "type": "object",
  16072. "properties": {
  16073. "message": {
  16074. "type": "string"
  16075. },
  16076. "ref": {
  16077. "type": "string"
  16078. }
  16079. },
  16080. "required": ["message"],
  16081. "additionalProperties": false
  16082. }
  16083. },
  16084. "required": ["name", "data"],
  16085. "additionalProperties": false
  16086. },
  16087. "MessageOutputLengthError": {
  16088. "type": "object",
  16089. "properties": {
  16090. "name": {
  16091. "type": "string",
  16092. "enum": ["MessageOutputLengthError"]
  16093. },
  16094. "data": {
  16095. "type": "object",
  16096. "properties": {}
  16097. }
  16098. },
  16099. "required": ["name", "data"],
  16100. "additionalProperties": false
  16101. },
  16102. "MessageAbortedError": {
  16103. "type": "object",
  16104. "properties": {
  16105. "name": {
  16106. "type": "string",
  16107. "enum": ["MessageAbortedError"]
  16108. },
  16109. "data": {
  16110. "type": "object",
  16111. "properties": {
  16112. "message": {
  16113. "type": "string"
  16114. }
  16115. },
  16116. "required": ["message"],
  16117. "additionalProperties": false
  16118. }
  16119. },
  16120. "required": ["name", "data"],
  16121. "additionalProperties": false
  16122. },
  16123. "StructuredOutputError": {
  16124. "type": "object",
  16125. "properties": {
  16126. "name": {
  16127. "type": "string",
  16128. "enum": ["StructuredOutputError"]
  16129. },
  16130. "data": {
  16131. "type": "object",
  16132. "properties": {
  16133. "message": {
  16134. "type": "string"
  16135. },
  16136. "retries": {
  16137. "type": "integer",
  16138. "minimum": 0
  16139. }
  16140. },
  16141. "required": ["message", "retries"],
  16142. "additionalProperties": false
  16143. }
  16144. },
  16145. "required": ["name", "data"],
  16146. "additionalProperties": false
  16147. },
  16148. "ContextOverflowError": {
  16149. "type": "object",
  16150. "properties": {
  16151. "name": {
  16152. "type": "string",
  16153. "enum": ["ContextOverflowError"]
  16154. },
  16155. "data": {
  16156. "type": "object",
  16157. "properties": {
  16158. "message": {
  16159. "type": "string"
  16160. },
  16161. "responseBody": {
  16162. "type": "string"
  16163. }
  16164. },
  16165. "required": ["message"],
  16166. "additionalProperties": false
  16167. }
  16168. },
  16169. "required": ["name", "data"],
  16170. "additionalProperties": false
  16171. },
  16172. "ContentFilterError": {
  16173. "type": "object",
  16174. "properties": {
  16175. "name": {
  16176. "type": "string",
  16177. "enum": ["ContentFilterError"]
  16178. },
  16179. "data": {
  16180. "type": "object",
  16181. "properties": {
  16182. "message": {
  16183. "type": "string"
  16184. }
  16185. },
  16186. "required": ["message"],
  16187. "additionalProperties": false
  16188. }
  16189. },
  16190. "required": ["name", "data"],
  16191. "additionalProperties": false
  16192. },
  16193. "APIError": {
  16194. "type": "object",
  16195. "properties": {
  16196. "name": {
  16197. "type": "string",
  16198. "enum": ["APIError"]
  16199. },
  16200. "data": {
  16201. "type": "object",
  16202. "properties": {
  16203. "message": {
  16204. "type": "string"
  16205. },
  16206. "statusCode": {
  16207. "type": "integer",
  16208. "minimum": 0
  16209. },
  16210. "isRetryable": {
  16211. "type": "boolean"
  16212. },
  16213. "responseHeaders": {
  16214. "type": "object",
  16215. "additionalProperties": {
  16216. "type": "string"
  16217. }
  16218. },
  16219. "responseBody": {
  16220. "type": "string"
  16221. },
  16222. "metadata": {
  16223. "type": "object",
  16224. "additionalProperties": {
  16225. "type": "string"
  16226. }
  16227. }
  16228. },
  16229. "required": ["message", "isRetryable"],
  16230. "additionalProperties": false
  16231. }
  16232. },
  16233. "required": ["name", "data"],
  16234. "additionalProperties": false
  16235. },
  16236. "AssistantMessage": {
  16237. "type": "object",
  16238. "properties": {
  16239. "id": {
  16240. "type": "string",
  16241. "pattern": "^msg"
  16242. },
  16243. "sessionID": {
  16244. "type": "string",
  16245. "pattern": "^ses"
  16246. },
  16247. "role": {
  16248. "type": "string",
  16249. "enum": ["assistant"]
  16250. },
  16251. "time": {
  16252. "type": "object",
  16253. "properties": {
  16254. "created": {
  16255. "type": "integer",
  16256. "minimum": 0
  16257. },
  16258. "completed": {
  16259. "type": "integer",
  16260. "minimum": 0
  16261. }
  16262. },
  16263. "required": ["created"],
  16264. "additionalProperties": false
  16265. },
  16266. "error": {
  16267. "anyOf": [
  16268. {
  16269. "$ref": "#/components/schemas/ProviderAuthError"
  16270. },
  16271. {
  16272. "$ref": "#/components/schemas/UnknownError"
  16273. },
  16274. {
  16275. "$ref": "#/components/schemas/MessageOutputLengthError"
  16276. },
  16277. {
  16278. "$ref": "#/components/schemas/MessageAbortedError"
  16279. },
  16280. {
  16281. "$ref": "#/components/schemas/StructuredOutputError"
  16282. },
  16283. {
  16284. "$ref": "#/components/schemas/ContextOverflowError"
  16285. },
  16286. {
  16287. "$ref": "#/components/schemas/ContentFilterError"
  16288. },
  16289. {
  16290. "$ref": "#/components/schemas/APIError"
  16291. }
  16292. ]
  16293. },
  16294. "parentID": {
  16295. "type": "string",
  16296. "pattern": "^msg"
  16297. },
  16298. "modelID": {
  16299. "type": "string"
  16300. },
  16301. "providerID": {
  16302. "type": "string"
  16303. },
  16304. "mode": {
  16305. "type": "string"
  16306. },
  16307. "agent": {
  16308. "type": "string"
  16309. },
  16310. "path": {
  16311. "type": "object",
  16312. "properties": {
  16313. "cwd": {
  16314. "type": "string"
  16315. },
  16316. "root": {
  16317. "type": "string"
  16318. }
  16319. },
  16320. "required": ["cwd", "root"],
  16321. "additionalProperties": false
  16322. },
  16323. "summary": {
  16324. "type": "boolean"
  16325. },
  16326. "cost": {
  16327. "type": "number"
  16328. },
  16329. "tokens": {
  16330. "type": "object",
  16331. "properties": {
  16332. "total": {
  16333. "type": "number"
  16334. },
  16335. "input": {
  16336. "type": "number"
  16337. },
  16338. "output": {
  16339. "type": "number"
  16340. },
  16341. "reasoning": {
  16342. "type": "number"
  16343. },
  16344. "cache": {
  16345. "type": "object",
  16346. "properties": {
  16347. "read": {
  16348. "type": "number"
  16349. },
  16350. "write": {
  16351. "type": "number"
  16352. }
  16353. },
  16354. "required": ["read", "write"],
  16355. "additionalProperties": false
  16356. }
  16357. },
  16358. "required": ["input", "output", "reasoning", "cache"],
  16359. "additionalProperties": false
  16360. },
  16361. "structured": {},
  16362. "variant": {
  16363. "type": "string"
  16364. },
  16365. "finish": {
  16366. "type": "string"
  16367. }
  16368. },
  16369. "required": [
  16370. "id",
  16371. "sessionID",
  16372. "role",
  16373. "time",
  16374. "parentID",
  16375. "modelID",
  16376. "providerID",
  16377. "mode",
  16378. "agent",
  16379. "path",
  16380. "cost",
  16381. "tokens"
  16382. ],
  16383. "additionalProperties": false
  16384. },
  16385. "Message": {
  16386. "anyOf": [
  16387. {
  16388. "$ref": "#/components/schemas/UserMessage"
  16389. },
  16390. {
  16391. "$ref": "#/components/schemas/AssistantMessage"
  16392. }
  16393. ]
  16394. },
  16395. "TextPart": {
  16396. "type": "object",
  16397. "properties": {
  16398. "id": {
  16399. "type": "string",
  16400. "pattern": "^prt"
  16401. },
  16402. "sessionID": {
  16403. "type": "string",
  16404. "pattern": "^ses"
  16405. },
  16406. "messageID": {
  16407. "type": "string",
  16408. "pattern": "^msg"
  16409. },
  16410. "type": {
  16411. "type": "string",
  16412. "enum": ["text"]
  16413. },
  16414. "text": {
  16415. "type": "string"
  16416. },
  16417. "synthetic": {
  16418. "type": "boolean"
  16419. },
  16420. "ignored": {
  16421. "type": "boolean"
  16422. },
  16423. "time": {
  16424. "type": "object",
  16425. "properties": {
  16426. "start": {
  16427. "type": "integer",
  16428. "minimum": 0
  16429. },
  16430. "end": {
  16431. "type": "integer",
  16432. "minimum": 0
  16433. }
  16434. },
  16435. "required": ["start"],
  16436. "additionalProperties": false
  16437. },
  16438. "metadata": {
  16439. "type": "object"
  16440. }
  16441. },
  16442. "required": ["id", "sessionID", "messageID", "type", "text"],
  16443. "additionalProperties": false
  16444. },
  16445. "SubtaskPart": {
  16446. "type": "object",
  16447. "properties": {
  16448. "id": {
  16449. "type": "string",
  16450. "pattern": "^prt"
  16451. },
  16452. "sessionID": {
  16453. "type": "string",
  16454. "pattern": "^ses"
  16455. },
  16456. "messageID": {
  16457. "type": "string",
  16458. "pattern": "^msg"
  16459. },
  16460. "type": {
  16461. "type": "string",
  16462. "enum": ["subtask"]
  16463. },
  16464. "prompt": {
  16465. "type": "string"
  16466. },
  16467. "description": {
  16468. "type": "string"
  16469. },
  16470. "agent": {
  16471. "type": "string"
  16472. },
  16473. "model": {
  16474. "type": "object",
  16475. "properties": {
  16476. "providerID": {
  16477. "type": "string"
  16478. },
  16479. "modelID": {
  16480. "type": "string"
  16481. }
  16482. },
  16483. "required": ["providerID", "modelID"],
  16484. "additionalProperties": false
  16485. },
  16486. "command": {
  16487. "type": "string"
  16488. }
  16489. },
  16490. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  16491. "additionalProperties": false
  16492. },
  16493. "ReasoningPart": {
  16494. "type": "object",
  16495. "properties": {
  16496. "id": {
  16497. "type": "string",
  16498. "pattern": "^prt"
  16499. },
  16500. "sessionID": {
  16501. "type": "string",
  16502. "pattern": "^ses"
  16503. },
  16504. "messageID": {
  16505. "type": "string",
  16506. "pattern": "^msg"
  16507. },
  16508. "type": {
  16509. "type": "string",
  16510. "enum": ["reasoning"]
  16511. },
  16512. "text": {
  16513. "type": "string"
  16514. },
  16515. "metadata": {
  16516. "type": "object"
  16517. },
  16518. "time": {
  16519. "type": "object",
  16520. "properties": {
  16521. "start": {
  16522. "type": "integer",
  16523. "minimum": 0
  16524. },
  16525. "end": {
  16526. "type": "integer",
  16527. "minimum": 0
  16528. }
  16529. },
  16530. "required": ["start"],
  16531. "additionalProperties": false
  16532. }
  16533. },
  16534. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  16535. "additionalProperties": false
  16536. },
  16537. "FilePartSourceText": {
  16538. "type": "object",
  16539. "properties": {
  16540. "value": {
  16541. "type": "string"
  16542. },
  16543. "start": {
  16544. "type": "number"
  16545. },
  16546. "end": {
  16547. "type": "number"
  16548. }
  16549. },
  16550. "required": ["value", "start", "end"],
  16551. "additionalProperties": false
  16552. },
  16553. "FileSource": {
  16554. "type": "object",
  16555. "properties": {
  16556. "text": {
  16557. "$ref": "#/components/schemas/FilePartSourceText"
  16558. },
  16559. "type": {
  16560. "type": "string",
  16561. "enum": ["file"]
  16562. },
  16563. "path": {
  16564. "type": "string"
  16565. }
  16566. },
  16567. "required": ["text", "type", "path"],
  16568. "additionalProperties": false
  16569. },
  16570. "Range": {
  16571. "type": "object",
  16572. "properties": {
  16573. "start": {
  16574. "type": "object",
  16575. "properties": {
  16576. "line": {
  16577. "type": "integer",
  16578. "minimum": 0
  16579. },
  16580. "character": {
  16581. "type": "integer",
  16582. "minimum": 0
  16583. }
  16584. },
  16585. "required": ["line", "character"],
  16586. "additionalProperties": false
  16587. },
  16588. "end": {
  16589. "type": "object",
  16590. "properties": {
  16591. "line": {
  16592. "type": "integer",
  16593. "minimum": 0
  16594. },
  16595. "character": {
  16596. "type": "integer",
  16597. "minimum": 0
  16598. }
  16599. },
  16600. "required": ["line", "character"],
  16601. "additionalProperties": false
  16602. }
  16603. },
  16604. "required": ["start", "end"],
  16605. "additionalProperties": false
  16606. },
  16607. "SymbolSource": {
  16608. "type": "object",
  16609. "properties": {
  16610. "text": {
  16611. "$ref": "#/components/schemas/FilePartSourceText"
  16612. },
  16613. "type": {
  16614. "type": "string",
  16615. "enum": ["symbol"]
  16616. },
  16617. "path": {
  16618. "type": "string"
  16619. },
  16620. "range": {
  16621. "$ref": "#/components/schemas/Range"
  16622. },
  16623. "name": {
  16624. "type": "string"
  16625. },
  16626. "kind": {
  16627. "type": "integer",
  16628. "minimum": 0
  16629. }
  16630. },
  16631. "required": ["text", "type", "path", "range", "name", "kind"],
  16632. "additionalProperties": false
  16633. },
  16634. "ResourceSource": {
  16635. "type": "object",
  16636. "properties": {
  16637. "text": {
  16638. "$ref": "#/components/schemas/FilePartSourceText"
  16639. },
  16640. "type": {
  16641. "type": "string",
  16642. "enum": ["resource"]
  16643. },
  16644. "clientName": {
  16645. "type": "string"
  16646. },
  16647. "uri": {
  16648. "type": "string"
  16649. }
  16650. },
  16651. "required": ["text", "type", "clientName", "uri"],
  16652. "additionalProperties": false
  16653. },
  16654. "FilePartSource": {
  16655. "anyOf": [
  16656. {
  16657. "$ref": "#/components/schemas/FileSource"
  16658. },
  16659. {
  16660. "$ref": "#/components/schemas/SymbolSource"
  16661. },
  16662. {
  16663. "$ref": "#/components/schemas/ResourceSource"
  16664. }
  16665. ]
  16666. },
  16667. "FilePart": {
  16668. "type": "object",
  16669. "properties": {
  16670. "id": {
  16671. "type": "string",
  16672. "pattern": "^prt"
  16673. },
  16674. "sessionID": {
  16675. "type": "string",
  16676. "pattern": "^ses"
  16677. },
  16678. "messageID": {
  16679. "type": "string",
  16680. "pattern": "^msg"
  16681. },
  16682. "type": {
  16683. "type": "string",
  16684. "enum": ["file"]
  16685. },
  16686. "mime": {
  16687. "type": "string"
  16688. },
  16689. "filename": {
  16690. "type": "string"
  16691. },
  16692. "url": {
  16693. "type": "string"
  16694. },
  16695. "source": {
  16696. "$ref": "#/components/schemas/FilePartSource"
  16697. }
  16698. },
  16699. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16700. "additionalProperties": false
  16701. },
  16702. "ToolStatePending": {
  16703. "type": "object",
  16704. "properties": {
  16705. "status": {
  16706. "type": "string",
  16707. "enum": ["pending"]
  16708. },
  16709. "input": {
  16710. "type": "object"
  16711. },
  16712. "raw": {
  16713. "type": "string"
  16714. }
  16715. },
  16716. "required": ["status", "input", "raw"],
  16717. "additionalProperties": false
  16718. },
  16719. "ToolStateRunning": {
  16720. "type": "object",
  16721. "properties": {
  16722. "status": {
  16723. "type": "string",
  16724. "enum": ["running"]
  16725. },
  16726. "input": {
  16727. "type": "object"
  16728. },
  16729. "title": {
  16730. "type": "string"
  16731. },
  16732. "metadata": {
  16733. "type": "object"
  16734. },
  16735. "time": {
  16736. "type": "object",
  16737. "properties": {
  16738. "start": {
  16739. "type": "integer",
  16740. "minimum": 0
  16741. }
  16742. },
  16743. "required": ["start"],
  16744. "additionalProperties": false
  16745. }
  16746. },
  16747. "required": ["status", "input", "time"],
  16748. "additionalProperties": false
  16749. },
  16750. "ToolStateCompleted": {
  16751. "type": "object",
  16752. "properties": {
  16753. "status": {
  16754. "type": "string",
  16755. "enum": ["completed"]
  16756. },
  16757. "input": {
  16758. "type": "object"
  16759. },
  16760. "output": {
  16761. "type": "string"
  16762. },
  16763. "title": {
  16764. "type": "string"
  16765. },
  16766. "metadata": {
  16767. "type": "object"
  16768. },
  16769. "time": {
  16770. "type": "object",
  16771. "properties": {
  16772. "start": {
  16773. "type": "integer",
  16774. "minimum": 0
  16775. },
  16776. "end": {
  16777. "type": "integer",
  16778. "minimum": 0
  16779. },
  16780. "compacted": {
  16781. "type": "integer",
  16782. "minimum": 0
  16783. }
  16784. },
  16785. "required": ["start", "end"],
  16786. "additionalProperties": false
  16787. },
  16788. "attachments": {
  16789. "type": "array",
  16790. "items": {
  16791. "$ref": "#/components/schemas/FilePart"
  16792. }
  16793. }
  16794. },
  16795. "required": ["status", "input", "output", "title", "metadata", "time"],
  16796. "additionalProperties": false
  16797. },
  16798. "ToolStateError": {
  16799. "type": "object",
  16800. "properties": {
  16801. "status": {
  16802. "type": "string",
  16803. "enum": ["error"]
  16804. },
  16805. "input": {
  16806. "type": "object"
  16807. },
  16808. "error": {
  16809. "type": "string"
  16810. },
  16811. "metadata": {
  16812. "type": "object"
  16813. },
  16814. "time": {
  16815. "type": "object",
  16816. "properties": {
  16817. "start": {
  16818. "type": "integer",
  16819. "minimum": 0
  16820. },
  16821. "end": {
  16822. "type": "integer",
  16823. "minimum": 0
  16824. }
  16825. },
  16826. "required": ["start", "end"],
  16827. "additionalProperties": false
  16828. }
  16829. },
  16830. "required": ["status", "input", "error", "time"],
  16831. "additionalProperties": false
  16832. },
  16833. "ToolState": {
  16834. "anyOf": [
  16835. {
  16836. "$ref": "#/components/schemas/ToolStatePending"
  16837. },
  16838. {
  16839. "$ref": "#/components/schemas/ToolStateRunning"
  16840. },
  16841. {
  16842. "$ref": "#/components/schemas/ToolStateCompleted"
  16843. },
  16844. {
  16845. "$ref": "#/components/schemas/ToolStateError"
  16846. }
  16847. ]
  16848. },
  16849. "ToolPart": {
  16850. "type": "object",
  16851. "properties": {
  16852. "id": {
  16853. "type": "string",
  16854. "pattern": "^prt"
  16855. },
  16856. "sessionID": {
  16857. "type": "string",
  16858. "pattern": "^ses"
  16859. },
  16860. "messageID": {
  16861. "type": "string",
  16862. "pattern": "^msg"
  16863. },
  16864. "type": {
  16865. "type": "string",
  16866. "enum": ["tool"]
  16867. },
  16868. "callID": {
  16869. "type": "string"
  16870. },
  16871. "tool": {
  16872. "type": "string"
  16873. },
  16874. "state": {
  16875. "$ref": "#/components/schemas/ToolState"
  16876. },
  16877. "metadata": {
  16878. "type": "object"
  16879. }
  16880. },
  16881. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16882. "additionalProperties": false
  16883. },
  16884. "StepStartPart": {
  16885. "type": "object",
  16886. "properties": {
  16887. "id": {
  16888. "type": "string",
  16889. "pattern": "^prt"
  16890. },
  16891. "sessionID": {
  16892. "type": "string",
  16893. "pattern": "^ses"
  16894. },
  16895. "messageID": {
  16896. "type": "string",
  16897. "pattern": "^msg"
  16898. },
  16899. "type": {
  16900. "type": "string",
  16901. "enum": ["step-start"]
  16902. },
  16903. "snapshot": {
  16904. "type": "string"
  16905. }
  16906. },
  16907. "required": ["id", "sessionID", "messageID", "type"],
  16908. "additionalProperties": false
  16909. },
  16910. "StepFinishPart": {
  16911. "type": "object",
  16912. "properties": {
  16913. "id": {
  16914. "type": "string",
  16915. "pattern": "^prt"
  16916. },
  16917. "sessionID": {
  16918. "type": "string",
  16919. "pattern": "^ses"
  16920. },
  16921. "messageID": {
  16922. "type": "string",
  16923. "pattern": "^msg"
  16924. },
  16925. "type": {
  16926. "type": "string",
  16927. "enum": ["step-finish"]
  16928. },
  16929. "reason": {
  16930. "type": "string"
  16931. },
  16932. "snapshot": {
  16933. "type": "string"
  16934. },
  16935. "cost": {
  16936. "type": "number"
  16937. },
  16938. "tokens": {
  16939. "type": "object",
  16940. "properties": {
  16941. "total": {
  16942. "type": "number"
  16943. },
  16944. "input": {
  16945. "type": "number"
  16946. },
  16947. "output": {
  16948. "type": "number"
  16949. },
  16950. "reasoning": {
  16951. "type": "number"
  16952. },
  16953. "cache": {
  16954. "type": "object",
  16955. "properties": {
  16956. "read": {
  16957. "type": "number"
  16958. },
  16959. "write": {
  16960. "type": "number"
  16961. }
  16962. },
  16963. "required": ["read", "write"],
  16964. "additionalProperties": false
  16965. }
  16966. },
  16967. "required": ["input", "output", "reasoning", "cache"],
  16968. "additionalProperties": false
  16969. }
  16970. },
  16971. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16972. "additionalProperties": false
  16973. },
  16974. "SnapshotPart": {
  16975. "type": "object",
  16976. "properties": {
  16977. "id": {
  16978. "type": "string",
  16979. "pattern": "^prt"
  16980. },
  16981. "sessionID": {
  16982. "type": "string",
  16983. "pattern": "^ses"
  16984. },
  16985. "messageID": {
  16986. "type": "string",
  16987. "pattern": "^msg"
  16988. },
  16989. "type": {
  16990. "type": "string",
  16991. "enum": ["snapshot"]
  16992. },
  16993. "snapshot": {
  16994. "type": "string"
  16995. }
  16996. },
  16997. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16998. "additionalProperties": false
  16999. },
  17000. "PatchPart": {
  17001. "type": "object",
  17002. "properties": {
  17003. "id": {
  17004. "type": "string",
  17005. "pattern": "^prt"
  17006. },
  17007. "sessionID": {
  17008. "type": "string",
  17009. "pattern": "^ses"
  17010. },
  17011. "messageID": {
  17012. "type": "string",
  17013. "pattern": "^msg"
  17014. },
  17015. "type": {
  17016. "type": "string",
  17017. "enum": ["patch"]
  17018. },
  17019. "hash": {
  17020. "type": "string"
  17021. },
  17022. "files": {
  17023. "type": "array",
  17024. "items": {
  17025. "type": "string"
  17026. }
  17027. }
  17028. },
  17029. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  17030. "additionalProperties": false
  17031. },
  17032. "AgentPart": {
  17033. "type": "object",
  17034. "properties": {
  17035. "id": {
  17036. "type": "string",
  17037. "pattern": "^prt"
  17038. },
  17039. "sessionID": {
  17040. "type": "string",
  17041. "pattern": "^ses"
  17042. },
  17043. "messageID": {
  17044. "type": "string",
  17045. "pattern": "^msg"
  17046. },
  17047. "type": {
  17048. "type": "string",
  17049. "enum": ["agent"]
  17050. },
  17051. "name": {
  17052. "type": "string"
  17053. },
  17054. "source": {
  17055. "type": "object",
  17056. "properties": {
  17057. "value": {
  17058. "type": "string"
  17059. },
  17060. "start": {
  17061. "type": "integer",
  17062. "minimum": 0
  17063. },
  17064. "end": {
  17065. "type": "integer",
  17066. "minimum": 0
  17067. }
  17068. },
  17069. "required": ["value", "start", "end"],
  17070. "additionalProperties": false
  17071. }
  17072. },
  17073. "required": ["id", "sessionID", "messageID", "type", "name"],
  17074. "additionalProperties": false
  17075. },
  17076. "RetryPart": {
  17077. "type": "object",
  17078. "properties": {
  17079. "id": {
  17080. "type": "string",
  17081. "pattern": "^prt"
  17082. },
  17083. "sessionID": {
  17084. "type": "string",
  17085. "pattern": "^ses"
  17086. },
  17087. "messageID": {
  17088. "type": "string",
  17089. "pattern": "^msg"
  17090. },
  17091. "type": {
  17092. "type": "string",
  17093. "enum": ["retry"]
  17094. },
  17095. "attempt": {
  17096. "type": "integer",
  17097. "minimum": 0
  17098. },
  17099. "error": {
  17100. "$ref": "#/components/schemas/APIError"
  17101. },
  17102. "time": {
  17103. "type": "object",
  17104. "properties": {
  17105. "created": {
  17106. "type": "integer",
  17107. "minimum": 0
  17108. }
  17109. },
  17110. "required": ["created"],
  17111. "additionalProperties": false
  17112. }
  17113. },
  17114. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  17115. "additionalProperties": false
  17116. },
  17117. "CompactionPart": {
  17118. "type": "object",
  17119. "properties": {
  17120. "id": {
  17121. "type": "string",
  17122. "pattern": "^prt"
  17123. },
  17124. "sessionID": {
  17125. "type": "string",
  17126. "pattern": "^ses"
  17127. },
  17128. "messageID": {
  17129. "type": "string",
  17130. "pattern": "^msg"
  17131. },
  17132. "type": {
  17133. "type": "string",
  17134. "enum": ["compaction"]
  17135. },
  17136. "auto": {
  17137. "type": "boolean"
  17138. },
  17139. "overflow": {
  17140. "type": "boolean"
  17141. },
  17142. "tail_start_id": {
  17143. "type": "string",
  17144. "pattern": "^msg"
  17145. }
  17146. },
  17147. "required": ["id", "sessionID", "messageID", "type", "auto"],
  17148. "additionalProperties": false
  17149. },
  17150. "Part": {
  17151. "anyOf": [
  17152. {
  17153. "$ref": "#/components/schemas/TextPart"
  17154. },
  17155. {
  17156. "$ref": "#/components/schemas/SubtaskPart"
  17157. },
  17158. {
  17159. "$ref": "#/components/schemas/ReasoningPart"
  17160. },
  17161. {
  17162. "$ref": "#/components/schemas/FilePart"
  17163. },
  17164. {
  17165. "$ref": "#/components/schemas/ToolPart"
  17166. },
  17167. {
  17168. "$ref": "#/components/schemas/StepStartPart"
  17169. },
  17170. {
  17171. "$ref": "#/components/schemas/StepFinishPart"
  17172. },
  17173. {
  17174. "$ref": "#/components/schemas/SnapshotPart"
  17175. },
  17176. {
  17177. "$ref": "#/components/schemas/PatchPart"
  17178. },
  17179. {
  17180. "$ref": "#/components/schemas/AgentPart"
  17181. },
  17182. {
  17183. "$ref": "#/components/schemas/RetryPart"
  17184. },
  17185. {
  17186. "$ref": "#/components/schemas/CompactionPart"
  17187. }
  17188. ]
  17189. },
  17190. "Prompt": {
  17191. "type": "object",
  17192. "properties": {
  17193. "text": {
  17194. "type": "string"
  17195. },
  17196. "files": {
  17197. "type": "array",
  17198. "items": {
  17199. "$ref": "#/components/schemas/PromptFileAttachment"
  17200. }
  17201. },
  17202. "agents": {
  17203. "type": "array",
  17204. "items": {
  17205. "$ref": "#/components/schemas/PromptAgentAttachment"
  17206. }
  17207. }
  17208. },
  17209. "required": ["text"],
  17210. "additionalProperties": false
  17211. },
  17212. "Pty": {
  17213. "type": "object",
  17214. "properties": {
  17215. "id": {
  17216. "type": "string",
  17217. "pattern": "^pty"
  17218. },
  17219. "title": {
  17220. "type": "string"
  17221. },
  17222. "command": {
  17223. "type": "string"
  17224. },
  17225. "args": {
  17226. "type": "array",
  17227. "items": {
  17228. "type": "string"
  17229. }
  17230. },
  17231. "cwd": {
  17232. "type": "string"
  17233. },
  17234. "status": {
  17235. "type": "string",
  17236. "enum": ["running", "exited"]
  17237. },
  17238. "pid": {
  17239. "type": "integer",
  17240. "minimum": 0
  17241. },
  17242. "exitCode": {
  17243. "type": "integer",
  17244. "minimum": 0
  17245. }
  17246. },
  17247. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  17248. "additionalProperties": false
  17249. },
  17250. "Todo": {
  17251. "type": "object",
  17252. "properties": {
  17253. "content": {
  17254. "type": "string",
  17255. "description": "Brief description of the task"
  17256. },
  17257. "status": {
  17258. "type": "string",
  17259. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  17260. },
  17261. "priority": {
  17262. "type": "string",
  17263. "description": "Priority level of the task: high, medium, low"
  17264. }
  17265. },
  17266. "required": ["content", "status", "priority"],
  17267. "additionalProperties": false
  17268. },
  17269. "SessionStatus": {
  17270. "anyOf": [
  17271. {
  17272. "type": "object",
  17273. "properties": {
  17274. "type": {
  17275. "type": "string",
  17276. "enum": ["idle"]
  17277. }
  17278. },
  17279. "required": ["type"],
  17280. "additionalProperties": false
  17281. },
  17282. {
  17283. "type": "object",
  17284. "properties": {
  17285. "type": {
  17286. "type": "string",
  17287. "enum": ["retry"]
  17288. },
  17289. "attempt": {
  17290. "type": "integer",
  17291. "minimum": 0
  17292. },
  17293. "message": {
  17294. "type": "string"
  17295. },
  17296. "action": {
  17297. "type": "object",
  17298. "properties": {
  17299. "reason": {
  17300. "type": "string"
  17301. },
  17302. "provider": {
  17303. "type": "string"
  17304. },
  17305. "title": {
  17306. "type": "string"
  17307. },
  17308. "message": {
  17309. "type": "string"
  17310. },
  17311. "label": {
  17312. "type": "string"
  17313. },
  17314. "link": {
  17315. "type": "string"
  17316. }
  17317. },
  17318. "required": ["reason", "provider", "title", "message", "label"],
  17319. "additionalProperties": false
  17320. },
  17321. "next": {
  17322. "type": "integer",
  17323. "minimum": 0
  17324. }
  17325. },
  17326. "required": ["type", "attempt", "message", "next"],
  17327. "additionalProperties": false
  17328. },
  17329. {
  17330. "type": "object",
  17331. "properties": {
  17332. "type": {
  17333. "type": "string",
  17334. "enum": ["busy"]
  17335. }
  17336. },
  17337. "required": ["type"],
  17338. "additionalProperties": false
  17339. }
  17340. ]
  17341. },
  17342. "QuestionOption": {
  17343. "type": "object",
  17344. "properties": {
  17345. "label": {
  17346. "type": "string",
  17347. "description": "Display text (1-5 words, concise)"
  17348. },
  17349. "description": {
  17350. "type": "string",
  17351. "description": "Explanation of choice"
  17352. }
  17353. },
  17354. "required": ["label", "description"],
  17355. "additionalProperties": false
  17356. },
  17357. "QuestionInfo": {
  17358. "type": "object",
  17359. "properties": {
  17360. "question": {
  17361. "type": "string",
  17362. "description": "Complete question"
  17363. },
  17364. "header": {
  17365. "type": "string",
  17366. "description": "Very short label (max 30 chars)"
  17367. },
  17368. "options": {
  17369. "type": "array",
  17370. "items": {
  17371. "$ref": "#/components/schemas/QuestionOption"
  17372. },
  17373. "description": "Available choices"
  17374. },
  17375. "multiple": {
  17376. "type": "boolean"
  17377. },
  17378. "custom": {
  17379. "type": "boolean"
  17380. }
  17381. },
  17382. "required": ["question", "header", "options"],
  17383. "additionalProperties": false
  17384. },
  17385. "QuestionTool": {
  17386. "type": "object",
  17387. "properties": {
  17388. "messageID": {
  17389. "type": "string",
  17390. "pattern": "^msg"
  17391. },
  17392. "callID": {
  17393. "type": "string"
  17394. }
  17395. },
  17396. "required": ["messageID", "callID"],
  17397. "additionalProperties": false
  17398. },
  17399. "QuestionAnswer": {
  17400. "type": "array",
  17401. "items": {
  17402. "type": "string"
  17403. }
  17404. },
  17405. "GlobalEvent": {
  17406. "type": "object",
  17407. "properties": {
  17408. "directory": {
  17409. "type": "string"
  17410. },
  17411. "project": {
  17412. "type": "string"
  17413. },
  17414. "workspace": {
  17415. "type": "string"
  17416. },
  17417. "payload": {
  17418. "anyOf": [
  17419. {
  17420. "type": "object",
  17421. "properties": {
  17422. "id": {
  17423. "type": "string",
  17424. "pattern": "^evt_"
  17425. },
  17426. "type": {
  17427. "type": "string",
  17428. "enum": ["models-dev.refreshed"]
  17429. },
  17430. "properties": {
  17431. "type": "object",
  17432. "properties": {}
  17433. }
  17434. },
  17435. "required": ["id", "type", "properties"],
  17436. "additionalProperties": false
  17437. },
  17438. {
  17439. "type": "object",
  17440. "properties": {
  17441. "id": {
  17442. "type": "string",
  17443. "pattern": "^evt_"
  17444. },
  17445. "type": {
  17446. "type": "string",
  17447. "enum": ["integration.updated"]
  17448. },
  17449. "properties": {
  17450. "type": "object",
  17451. "properties": {}
  17452. }
  17453. },
  17454. "required": ["id", "type", "properties"],
  17455. "additionalProperties": false
  17456. },
  17457. {
  17458. "type": "object",
  17459. "properties": {
  17460. "id": {
  17461. "type": "string",
  17462. "pattern": "^evt_"
  17463. },
  17464. "type": {
  17465. "type": "string",
  17466. "enum": ["integration.connection.updated"]
  17467. },
  17468. "properties": {
  17469. "type": "object",
  17470. "properties": {
  17471. "integrationID": {
  17472. "type": "string"
  17473. }
  17474. },
  17475. "required": ["integrationID"],
  17476. "additionalProperties": false
  17477. }
  17478. },
  17479. "required": ["id", "type", "properties"],
  17480. "additionalProperties": false
  17481. },
  17482. {
  17483. "type": "object",
  17484. "properties": {
  17485. "id": {
  17486. "type": "string",
  17487. "pattern": "^evt_"
  17488. },
  17489. "type": {
  17490. "type": "string",
  17491. "enum": ["catalog.updated"]
  17492. },
  17493. "properties": {
  17494. "type": "object",
  17495. "properties": {}
  17496. }
  17497. },
  17498. "required": ["id", "type", "properties"],
  17499. "additionalProperties": false
  17500. },
  17501. {
  17502. "type": "object",
  17503. "properties": {
  17504. "id": {
  17505. "type": "string",
  17506. "pattern": "^evt_"
  17507. },
  17508. "type": {
  17509. "type": "string",
  17510. "enum": ["session.created"]
  17511. },
  17512. "properties": {
  17513. "type": "object",
  17514. "properties": {
  17515. "sessionID": {
  17516. "type": "string",
  17517. "pattern": "^ses"
  17518. },
  17519. "info": {
  17520. "$ref": "#/components/schemas/Session"
  17521. }
  17522. },
  17523. "required": ["sessionID", "info"],
  17524. "additionalProperties": false
  17525. }
  17526. },
  17527. "required": ["id", "type", "properties"],
  17528. "additionalProperties": false
  17529. },
  17530. {
  17531. "type": "object",
  17532. "properties": {
  17533. "id": {
  17534. "type": "string",
  17535. "pattern": "^evt_"
  17536. },
  17537. "type": {
  17538. "type": "string",
  17539. "enum": ["session.updated"]
  17540. },
  17541. "properties": {
  17542. "type": "object",
  17543. "properties": {
  17544. "sessionID": {
  17545. "type": "string",
  17546. "pattern": "^ses"
  17547. },
  17548. "info": {
  17549. "$ref": "#/components/schemas/Session"
  17550. }
  17551. },
  17552. "required": ["sessionID", "info"],
  17553. "additionalProperties": false
  17554. }
  17555. },
  17556. "required": ["id", "type", "properties"],
  17557. "additionalProperties": false
  17558. },
  17559. {
  17560. "type": "object",
  17561. "properties": {
  17562. "id": {
  17563. "type": "string",
  17564. "pattern": "^evt_"
  17565. },
  17566. "type": {
  17567. "type": "string",
  17568. "enum": ["session.deleted"]
  17569. },
  17570. "properties": {
  17571. "type": "object",
  17572. "properties": {
  17573. "sessionID": {
  17574. "type": "string",
  17575. "pattern": "^ses"
  17576. },
  17577. "info": {
  17578. "$ref": "#/components/schemas/Session"
  17579. }
  17580. },
  17581. "required": ["sessionID", "info"],
  17582. "additionalProperties": false
  17583. }
  17584. },
  17585. "required": ["id", "type", "properties"],
  17586. "additionalProperties": false
  17587. },
  17588. {
  17589. "type": "object",
  17590. "properties": {
  17591. "id": {
  17592. "type": "string",
  17593. "pattern": "^evt_"
  17594. },
  17595. "type": {
  17596. "type": "string",
  17597. "enum": ["message.updated"]
  17598. },
  17599. "properties": {
  17600. "type": "object",
  17601. "properties": {
  17602. "sessionID": {
  17603. "type": "string",
  17604. "pattern": "^ses"
  17605. },
  17606. "info": {
  17607. "$ref": "#/components/schemas/Message"
  17608. }
  17609. },
  17610. "required": ["sessionID", "info"],
  17611. "additionalProperties": false
  17612. }
  17613. },
  17614. "required": ["id", "type", "properties"],
  17615. "additionalProperties": false
  17616. },
  17617. {
  17618. "type": "object",
  17619. "properties": {
  17620. "id": {
  17621. "type": "string",
  17622. "pattern": "^evt_"
  17623. },
  17624. "type": {
  17625. "type": "string",
  17626. "enum": ["message.removed"]
  17627. },
  17628. "properties": {
  17629. "type": "object",
  17630. "properties": {
  17631. "sessionID": {
  17632. "type": "string",
  17633. "pattern": "^ses"
  17634. },
  17635. "messageID": {
  17636. "type": "string",
  17637. "pattern": "^msg"
  17638. }
  17639. },
  17640. "required": ["sessionID", "messageID"],
  17641. "additionalProperties": false
  17642. }
  17643. },
  17644. "required": ["id", "type", "properties"],
  17645. "additionalProperties": false
  17646. },
  17647. {
  17648. "type": "object",
  17649. "properties": {
  17650. "id": {
  17651. "type": "string",
  17652. "pattern": "^evt_"
  17653. },
  17654. "type": {
  17655. "type": "string",
  17656. "enum": ["message.part.updated"]
  17657. },
  17658. "properties": {
  17659. "type": "object",
  17660. "properties": {
  17661. "sessionID": {
  17662. "type": "string",
  17663. "pattern": "^ses"
  17664. },
  17665. "part": {
  17666. "$ref": "#/components/schemas/Part"
  17667. },
  17668. "time": {
  17669. "type": "number"
  17670. }
  17671. },
  17672. "required": ["sessionID", "part", "time"],
  17673. "additionalProperties": false
  17674. }
  17675. },
  17676. "required": ["id", "type", "properties"],
  17677. "additionalProperties": false
  17678. },
  17679. {
  17680. "type": "object",
  17681. "properties": {
  17682. "id": {
  17683. "type": "string",
  17684. "pattern": "^evt_"
  17685. },
  17686. "type": {
  17687. "type": "string",
  17688. "enum": ["message.part.removed"]
  17689. },
  17690. "properties": {
  17691. "type": "object",
  17692. "properties": {
  17693. "sessionID": {
  17694. "type": "string",
  17695. "pattern": "^ses"
  17696. },
  17697. "messageID": {
  17698. "type": "string",
  17699. "pattern": "^msg"
  17700. },
  17701. "partID": {
  17702. "type": "string",
  17703. "pattern": "^prt"
  17704. }
  17705. },
  17706. "required": ["sessionID", "messageID", "partID"],
  17707. "additionalProperties": false
  17708. }
  17709. },
  17710. "required": ["id", "type", "properties"],
  17711. "additionalProperties": false
  17712. },
  17713. {
  17714. "type": "object",
  17715. "properties": {
  17716. "id": {
  17717. "type": "string",
  17718. "pattern": "^evt_"
  17719. },
  17720. "type": {
  17721. "type": "string",
  17722. "enum": ["session.next.agent.switched"]
  17723. },
  17724. "properties": {
  17725. "type": "object",
  17726. "properties": {
  17727. "timestamp": {
  17728. "type": "number"
  17729. },
  17730. "sessionID": {
  17731. "type": "string",
  17732. "pattern": "^ses"
  17733. },
  17734. "messageID": {
  17735. "type": "string",
  17736. "pattern": "^msg_"
  17737. },
  17738. "agent": {
  17739. "type": "string"
  17740. }
  17741. },
  17742. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17743. "additionalProperties": false
  17744. }
  17745. },
  17746. "required": ["id", "type", "properties"],
  17747. "additionalProperties": false
  17748. },
  17749. {
  17750. "type": "object",
  17751. "properties": {
  17752. "id": {
  17753. "type": "string",
  17754. "pattern": "^evt_"
  17755. },
  17756. "type": {
  17757. "type": "string",
  17758. "enum": ["session.next.model.switched"]
  17759. },
  17760. "properties": {
  17761. "type": "object",
  17762. "properties": {
  17763. "timestamp": {
  17764. "type": "number"
  17765. },
  17766. "sessionID": {
  17767. "type": "string",
  17768. "pattern": "^ses"
  17769. },
  17770. "messageID": {
  17771. "type": "string",
  17772. "pattern": "^msg_"
  17773. },
  17774. "model": {
  17775. "$ref": "#/components/schemas/ModelRef"
  17776. }
  17777. },
  17778. "required": ["timestamp", "sessionID", "messageID", "model"],
  17779. "additionalProperties": false
  17780. }
  17781. },
  17782. "required": ["id", "type", "properties"],
  17783. "additionalProperties": false
  17784. },
  17785. {
  17786. "type": "object",
  17787. "properties": {
  17788. "id": {
  17789. "type": "string",
  17790. "pattern": "^evt_"
  17791. },
  17792. "type": {
  17793. "type": "string",
  17794. "enum": ["session.next.moved"]
  17795. },
  17796. "properties": {
  17797. "type": "object",
  17798. "properties": {
  17799. "timestamp": {
  17800. "type": "number"
  17801. },
  17802. "sessionID": {
  17803. "type": "string",
  17804. "pattern": "^ses"
  17805. },
  17806. "location": {
  17807. "$ref": "#/components/schemas/LocationRef"
  17808. },
  17809. "subdirectory": {
  17810. "type": "string"
  17811. }
  17812. },
  17813. "required": ["timestamp", "sessionID", "location"],
  17814. "additionalProperties": false
  17815. }
  17816. },
  17817. "required": ["id", "type", "properties"],
  17818. "additionalProperties": false
  17819. },
  17820. {
  17821. "type": "object",
  17822. "properties": {
  17823. "id": {
  17824. "type": "string",
  17825. "pattern": "^evt_"
  17826. },
  17827. "type": {
  17828. "type": "string",
  17829. "enum": ["session.next.prompted"]
  17830. },
  17831. "properties": {
  17832. "type": "object",
  17833. "properties": {
  17834. "timestamp": {
  17835. "type": "number"
  17836. },
  17837. "sessionID": {
  17838. "type": "string",
  17839. "pattern": "^ses"
  17840. },
  17841. "messageID": {
  17842. "type": "string",
  17843. "pattern": "^msg_"
  17844. },
  17845. "prompt": {
  17846. "$ref": "#/components/schemas/Prompt"
  17847. },
  17848. "delivery": {
  17849. "type": "string",
  17850. "enum": ["steer", "queue"]
  17851. }
  17852. },
  17853. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17854. "additionalProperties": false
  17855. }
  17856. },
  17857. "required": ["id", "type", "properties"],
  17858. "additionalProperties": false
  17859. },
  17860. {
  17861. "type": "object",
  17862. "properties": {
  17863. "id": {
  17864. "type": "string",
  17865. "pattern": "^evt_"
  17866. },
  17867. "type": {
  17868. "type": "string",
  17869. "enum": ["session.next.prompt.admitted"]
  17870. },
  17871. "properties": {
  17872. "type": "object",
  17873. "properties": {
  17874. "timestamp": {
  17875. "type": "number"
  17876. },
  17877. "sessionID": {
  17878. "type": "string",
  17879. "pattern": "^ses"
  17880. },
  17881. "messageID": {
  17882. "type": "string",
  17883. "pattern": "^msg_"
  17884. },
  17885. "prompt": {
  17886. "$ref": "#/components/schemas/Prompt"
  17887. },
  17888. "delivery": {
  17889. "type": "string",
  17890. "enum": ["steer", "queue"]
  17891. }
  17892. },
  17893. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17894. "additionalProperties": false
  17895. }
  17896. },
  17897. "required": ["id", "type", "properties"],
  17898. "additionalProperties": false
  17899. },
  17900. {
  17901. "type": "object",
  17902. "properties": {
  17903. "id": {
  17904. "type": "string",
  17905. "pattern": "^evt_"
  17906. },
  17907. "type": {
  17908. "type": "string",
  17909. "enum": ["session.next.context.updated"]
  17910. },
  17911. "properties": {
  17912. "type": "object",
  17913. "properties": {
  17914. "timestamp": {
  17915. "type": "number"
  17916. },
  17917. "sessionID": {
  17918. "type": "string",
  17919. "pattern": "^ses"
  17920. },
  17921. "messageID": {
  17922. "type": "string",
  17923. "pattern": "^msg_"
  17924. },
  17925. "text": {
  17926. "type": "string"
  17927. }
  17928. },
  17929. "required": ["timestamp", "sessionID", "messageID", "text"],
  17930. "additionalProperties": false
  17931. }
  17932. },
  17933. "required": ["id", "type", "properties"],
  17934. "additionalProperties": false
  17935. },
  17936. {
  17937. "type": "object",
  17938. "properties": {
  17939. "id": {
  17940. "type": "string",
  17941. "pattern": "^evt_"
  17942. },
  17943. "type": {
  17944. "type": "string",
  17945. "enum": ["session.next.synthetic"]
  17946. },
  17947. "properties": {
  17948. "type": "object",
  17949. "properties": {
  17950. "timestamp": {
  17951. "type": "number"
  17952. },
  17953. "sessionID": {
  17954. "type": "string",
  17955. "pattern": "^ses"
  17956. },
  17957. "messageID": {
  17958. "type": "string",
  17959. "pattern": "^msg_"
  17960. },
  17961. "text": {
  17962. "type": "string"
  17963. }
  17964. },
  17965. "required": ["timestamp", "sessionID", "messageID", "text"],
  17966. "additionalProperties": false
  17967. }
  17968. },
  17969. "required": ["id", "type", "properties"],
  17970. "additionalProperties": false
  17971. },
  17972. {
  17973. "type": "object",
  17974. "properties": {
  17975. "id": {
  17976. "type": "string",
  17977. "pattern": "^evt_"
  17978. },
  17979. "type": {
  17980. "type": "string",
  17981. "enum": ["session.next.shell.started"]
  17982. },
  17983. "properties": {
  17984. "type": "object",
  17985. "properties": {
  17986. "timestamp": {
  17987. "type": "number"
  17988. },
  17989. "sessionID": {
  17990. "type": "string",
  17991. "pattern": "^ses"
  17992. },
  17993. "messageID": {
  17994. "type": "string",
  17995. "pattern": "^msg_"
  17996. },
  17997. "callID": {
  17998. "type": "string"
  17999. },
  18000. "command": {
  18001. "type": "string"
  18002. }
  18003. },
  18004. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  18005. "additionalProperties": false
  18006. }
  18007. },
  18008. "required": ["id", "type", "properties"],
  18009. "additionalProperties": false
  18010. },
  18011. {
  18012. "type": "object",
  18013. "properties": {
  18014. "id": {
  18015. "type": "string",
  18016. "pattern": "^evt_"
  18017. },
  18018. "type": {
  18019. "type": "string",
  18020. "enum": ["session.next.shell.ended"]
  18021. },
  18022. "properties": {
  18023. "type": "object",
  18024. "properties": {
  18025. "timestamp": {
  18026. "type": "number"
  18027. },
  18028. "sessionID": {
  18029. "type": "string",
  18030. "pattern": "^ses"
  18031. },
  18032. "callID": {
  18033. "type": "string"
  18034. },
  18035. "output": {
  18036. "type": "string"
  18037. }
  18038. },
  18039. "required": ["timestamp", "sessionID", "callID", "output"],
  18040. "additionalProperties": false
  18041. }
  18042. },
  18043. "required": ["id", "type", "properties"],
  18044. "additionalProperties": false
  18045. },
  18046. {
  18047. "type": "object",
  18048. "properties": {
  18049. "id": {
  18050. "type": "string",
  18051. "pattern": "^evt_"
  18052. },
  18053. "type": {
  18054. "type": "string",
  18055. "enum": ["session.next.step.started"]
  18056. },
  18057. "properties": {
  18058. "type": "object",
  18059. "properties": {
  18060. "timestamp": {
  18061. "type": "number"
  18062. },
  18063. "sessionID": {
  18064. "type": "string",
  18065. "pattern": "^ses"
  18066. },
  18067. "assistantMessageID": {
  18068. "type": "string",
  18069. "pattern": "^msg_"
  18070. },
  18071. "agent": {
  18072. "type": "string"
  18073. },
  18074. "model": {
  18075. "$ref": "#/components/schemas/ModelRef"
  18076. },
  18077. "snapshot": {
  18078. "type": "string"
  18079. }
  18080. },
  18081. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  18082. "additionalProperties": false
  18083. }
  18084. },
  18085. "required": ["id", "type", "properties"],
  18086. "additionalProperties": false
  18087. },
  18088. {
  18089. "type": "object",
  18090. "properties": {
  18091. "id": {
  18092. "type": "string",
  18093. "pattern": "^evt_"
  18094. },
  18095. "type": {
  18096. "type": "string",
  18097. "enum": ["session.next.step.ended"]
  18098. },
  18099. "properties": {
  18100. "type": "object",
  18101. "properties": {
  18102. "timestamp": {
  18103. "type": "number"
  18104. },
  18105. "sessionID": {
  18106. "type": "string",
  18107. "pattern": "^ses"
  18108. },
  18109. "assistantMessageID": {
  18110. "type": "string",
  18111. "pattern": "^msg_"
  18112. },
  18113. "finish": {
  18114. "type": "string"
  18115. },
  18116. "cost": {
  18117. "type": "number"
  18118. },
  18119. "tokens": {
  18120. "type": "object",
  18121. "properties": {
  18122. "input": {
  18123. "type": "number"
  18124. },
  18125. "output": {
  18126. "type": "number"
  18127. },
  18128. "reasoning": {
  18129. "type": "number"
  18130. },
  18131. "cache": {
  18132. "type": "object",
  18133. "properties": {
  18134. "read": {
  18135. "type": "number"
  18136. },
  18137. "write": {
  18138. "type": "number"
  18139. }
  18140. },
  18141. "required": ["read", "write"],
  18142. "additionalProperties": false
  18143. }
  18144. },
  18145. "required": ["input", "output", "reasoning", "cache"],
  18146. "additionalProperties": false
  18147. },
  18148. "snapshot": {
  18149. "type": "string"
  18150. },
  18151. "files": {
  18152. "type": "array",
  18153. "items": {
  18154. "type": "string"
  18155. }
  18156. }
  18157. },
  18158. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  18159. "additionalProperties": false
  18160. }
  18161. },
  18162. "required": ["id", "type", "properties"],
  18163. "additionalProperties": false
  18164. },
  18165. {
  18166. "type": "object",
  18167. "properties": {
  18168. "id": {
  18169. "type": "string",
  18170. "pattern": "^evt_"
  18171. },
  18172. "type": {
  18173. "type": "string",
  18174. "enum": ["session.next.step.failed"]
  18175. },
  18176. "properties": {
  18177. "type": "object",
  18178. "properties": {
  18179. "timestamp": {
  18180. "type": "number"
  18181. },
  18182. "sessionID": {
  18183. "type": "string",
  18184. "pattern": "^ses"
  18185. },
  18186. "assistantMessageID": {
  18187. "type": "string",
  18188. "pattern": "^msg_"
  18189. },
  18190. "error": {
  18191. "$ref": "#/components/schemas/SessionErrorUnknown"
  18192. }
  18193. },
  18194. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  18195. "additionalProperties": false
  18196. }
  18197. },
  18198. "required": ["id", "type", "properties"],
  18199. "additionalProperties": false
  18200. },
  18201. {
  18202. "type": "object",
  18203. "properties": {
  18204. "id": {
  18205. "type": "string",
  18206. "pattern": "^evt_"
  18207. },
  18208. "type": {
  18209. "type": "string",
  18210. "enum": ["session.next.text.started"]
  18211. },
  18212. "properties": {
  18213. "type": "object",
  18214. "properties": {
  18215. "timestamp": {
  18216. "type": "number"
  18217. },
  18218. "sessionID": {
  18219. "type": "string",
  18220. "pattern": "^ses"
  18221. },
  18222. "assistantMessageID": {
  18223. "type": "string",
  18224. "pattern": "^msg_"
  18225. },
  18226. "textID": {
  18227. "type": "string"
  18228. }
  18229. },
  18230. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  18231. "additionalProperties": false
  18232. }
  18233. },
  18234. "required": ["id", "type", "properties"],
  18235. "additionalProperties": false
  18236. },
  18237. {
  18238. "type": "object",
  18239. "properties": {
  18240. "id": {
  18241. "type": "string",
  18242. "pattern": "^evt_"
  18243. },
  18244. "type": {
  18245. "type": "string",
  18246. "enum": ["session.next.text.delta"]
  18247. },
  18248. "properties": {
  18249. "type": "object",
  18250. "properties": {
  18251. "timestamp": {
  18252. "type": "number"
  18253. },
  18254. "sessionID": {
  18255. "type": "string",
  18256. "pattern": "^ses"
  18257. },
  18258. "assistantMessageID": {
  18259. "type": "string",
  18260. "pattern": "^msg_"
  18261. },
  18262. "textID": {
  18263. "type": "string"
  18264. },
  18265. "delta": {
  18266. "type": "string"
  18267. }
  18268. },
  18269. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  18270. "additionalProperties": false
  18271. }
  18272. },
  18273. "required": ["id", "type", "properties"],
  18274. "additionalProperties": false
  18275. },
  18276. {
  18277. "type": "object",
  18278. "properties": {
  18279. "id": {
  18280. "type": "string",
  18281. "pattern": "^evt_"
  18282. },
  18283. "type": {
  18284. "type": "string",
  18285. "enum": ["session.next.text.ended"]
  18286. },
  18287. "properties": {
  18288. "type": "object",
  18289. "properties": {
  18290. "timestamp": {
  18291. "type": "number"
  18292. },
  18293. "sessionID": {
  18294. "type": "string",
  18295. "pattern": "^ses"
  18296. },
  18297. "assistantMessageID": {
  18298. "type": "string",
  18299. "pattern": "^msg_"
  18300. },
  18301. "textID": {
  18302. "type": "string"
  18303. },
  18304. "text": {
  18305. "type": "string"
  18306. }
  18307. },
  18308. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  18309. "additionalProperties": false
  18310. }
  18311. },
  18312. "required": ["id", "type", "properties"],
  18313. "additionalProperties": false
  18314. },
  18315. {
  18316. "type": "object",
  18317. "properties": {
  18318. "id": {
  18319. "type": "string",
  18320. "pattern": "^evt_"
  18321. },
  18322. "type": {
  18323. "type": "string",
  18324. "enum": ["session.next.reasoning.started"]
  18325. },
  18326. "properties": {
  18327. "type": "object",
  18328. "properties": {
  18329. "timestamp": {
  18330. "type": "number"
  18331. },
  18332. "sessionID": {
  18333. "type": "string",
  18334. "pattern": "^ses"
  18335. },
  18336. "assistantMessageID": {
  18337. "type": "string",
  18338. "pattern": "^msg_"
  18339. },
  18340. "reasoningID": {
  18341. "type": "string"
  18342. },
  18343. "providerMetadata": {
  18344. "$ref": "#/components/schemas/LLMProviderMetadata"
  18345. }
  18346. },
  18347. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  18348. "additionalProperties": false
  18349. }
  18350. },
  18351. "required": ["id", "type", "properties"],
  18352. "additionalProperties": false
  18353. },
  18354. {
  18355. "type": "object",
  18356. "properties": {
  18357. "id": {
  18358. "type": "string",
  18359. "pattern": "^evt_"
  18360. },
  18361. "type": {
  18362. "type": "string",
  18363. "enum": ["session.next.reasoning.delta"]
  18364. },
  18365. "properties": {
  18366. "type": "object",
  18367. "properties": {
  18368. "timestamp": {
  18369. "type": "number"
  18370. },
  18371. "sessionID": {
  18372. "type": "string",
  18373. "pattern": "^ses"
  18374. },
  18375. "assistantMessageID": {
  18376. "type": "string",
  18377. "pattern": "^msg_"
  18378. },
  18379. "reasoningID": {
  18380. "type": "string"
  18381. },
  18382. "delta": {
  18383. "type": "string"
  18384. }
  18385. },
  18386. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  18387. "additionalProperties": false
  18388. }
  18389. },
  18390. "required": ["id", "type", "properties"],
  18391. "additionalProperties": false
  18392. },
  18393. {
  18394. "type": "object",
  18395. "properties": {
  18396. "id": {
  18397. "type": "string",
  18398. "pattern": "^evt_"
  18399. },
  18400. "type": {
  18401. "type": "string",
  18402. "enum": ["session.next.reasoning.ended"]
  18403. },
  18404. "properties": {
  18405. "type": "object",
  18406. "properties": {
  18407. "timestamp": {
  18408. "type": "number"
  18409. },
  18410. "sessionID": {
  18411. "type": "string",
  18412. "pattern": "^ses"
  18413. },
  18414. "assistantMessageID": {
  18415. "type": "string",
  18416. "pattern": "^msg_"
  18417. },
  18418. "reasoningID": {
  18419. "type": "string"
  18420. },
  18421. "text": {
  18422. "type": "string"
  18423. },
  18424. "providerMetadata": {
  18425. "$ref": "#/components/schemas/LLMProviderMetadata"
  18426. }
  18427. },
  18428. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  18429. "additionalProperties": false
  18430. }
  18431. },
  18432. "required": ["id", "type", "properties"],
  18433. "additionalProperties": false
  18434. },
  18435. {
  18436. "type": "object",
  18437. "properties": {
  18438. "id": {
  18439. "type": "string",
  18440. "pattern": "^evt_"
  18441. },
  18442. "type": {
  18443. "type": "string",
  18444. "enum": ["session.next.tool.input.started"]
  18445. },
  18446. "properties": {
  18447. "type": "object",
  18448. "properties": {
  18449. "timestamp": {
  18450. "type": "number"
  18451. },
  18452. "sessionID": {
  18453. "type": "string",
  18454. "pattern": "^ses"
  18455. },
  18456. "assistantMessageID": {
  18457. "type": "string",
  18458. "pattern": "^msg_"
  18459. },
  18460. "callID": {
  18461. "type": "string"
  18462. },
  18463. "name": {
  18464. "type": "string"
  18465. }
  18466. },
  18467. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  18468. "additionalProperties": false
  18469. }
  18470. },
  18471. "required": ["id", "type", "properties"],
  18472. "additionalProperties": false
  18473. },
  18474. {
  18475. "type": "object",
  18476. "properties": {
  18477. "id": {
  18478. "type": "string",
  18479. "pattern": "^evt_"
  18480. },
  18481. "type": {
  18482. "type": "string",
  18483. "enum": ["session.next.tool.input.delta"]
  18484. },
  18485. "properties": {
  18486. "type": "object",
  18487. "properties": {
  18488. "timestamp": {
  18489. "type": "number"
  18490. },
  18491. "sessionID": {
  18492. "type": "string",
  18493. "pattern": "^ses"
  18494. },
  18495. "assistantMessageID": {
  18496. "type": "string",
  18497. "pattern": "^msg_"
  18498. },
  18499. "callID": {
  18500. "type": "string"
  18501. },
  18502. "delta": {
  18503. "type": "string"
  18504. }
  18505. },
  18506. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  18507. "additionalProperties": false
  18508. }
  18509. },
  18510. "required": ["id", "type", "properties"],
  18511. "additionalProperties": false
  18512. },
  18513. {
  18514. "type": "object",
  18515. "properties": {
  18516. "id": {
  18517. "type": "string",
  18518. "pattern": "^evt_"
  18519. },
  18520. "type": {
  18521. "type": "string",
  18522. "enum": ["session.next.tool.input.ended"]
  18523. },
  18524. "properties": {
  18525. "type": "object",
  18526. "properties": {
  18527. "timestamp": {
  18528. "type": "number"
  18529. },
  18530. "sessionID": {
  18531. "type": "string",
  18532. "pattern": "^ses"
  18533. },
  18534. "assistantMessageID": {
  18535. "type": "string",
  18536. "pattern": "^msg_"
  18537. },
  18538. "callID": {
  18539. "type": "string"
  18540. },
  18541. "text": {
  18542. "type": "string"
  18543. }
  18544. },
  18545. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  18546. "additionalProperties": false
  18547. }
  18548. },
  18549. "required": ["id", "type", "properties"],
  18550. "additionalProperties": false
  18551. },
  18552. {
  18553. "type": "object",
  18554. "properties": {
  18555. "id": {
  18556. "type": "string",
  18557. "pattern": "^evt_"
  18558. },
  18559. "type": {
  18560. "type": "string",
  18561. "enum": ["session.next.tool.called"]
  18562. },
  18563. "properties": {
  18564. "type": "object",
  18565. "properties": {
  18566. "timestamp": {
  18567. "type": "number"
  18568. },
  18569. "sessionID": {
  18570. "type": "string",
  18571. "pattern": "^ses"
  18572. },
  18573. "assistantMessageID": {
  18574. "type": "string",
  18575. "pattern": "^msg_"
  18576. },
  18577. "callID": {
  18578. "type": "string"
  18579. },
  18580. "tool": {
  18581. "type": "string"
  18582. },
  18583. "input": {
  18584. "type": "object"
  18585. },
  18586. "provider": {
  18587. "type": "object",
  18588. "properties": {
  18589. "executed": {
  18590. "type": "boolean"
  18591. },
  18592. "metadata": {
  18593. "$ref": "#/components/schemas/LLMProviderMetadata"
  18594. }
  18595. },
  18596. "required": ["executed"],
  18597. "additionalProperties": false
  18598. }
  18599. },
  18600. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18601. "additionalProperties": false
  18602. }
  18603. },
  18604. "required": ["id", "type", "properties"],
  18605. "additionalProperties": false
  18606. },
  18607. {
  18608. "type": "object",
  18609. "properties": {
  18610. "id": {
  18611. "type": "string",
  18612. "pattern": "^evt_"
  18613. },
  18614. "type": {
  18615. "type": "string",
  18616. "enum": ["session.next.tool.progress"]
  18617. },
  18618. "properties": {
  18619. "type": "object",
  18620. "properties": {
  18621. "timestamp": {
  18622. "type": "number"
  18623. },
  18624. "sessionID": {
  18625. "type": "string",
  18626. "pattern": "^ses"
  18627. },
  18628. "assistantMessageID": {
  18629. "type": "string",
  18630. "pattern": "^msg_"
  18631. },
  18632. "callID": {
  18633. "type": "string"
  18634. },
  18635. "structured": {
  18636. "type": "object"
  18637. },
  18638. "content": {
  18639. "type": "array",
  18640. "items": {
  18641. "$ref": "#/components/schemas/LLMToolContent"
  18642. }
  18643. }
  18644. },
  18645. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18646. "additionalProperties": false
  18647. }
  18648. },
  18649. "required": ["id", "type", "properties"],
  18650. "additionalProperties": false
  18651. },
  18652. {
  18653. "type": "object",
  18654. "properties": {
  18655. "id": {
  18656. "type": "string",
  18657. "pattern": "^evt_"
  18658. },
  18659. "type": {
  18660. "type": "string",
  18661. "enum": ["session.next.tool.success"]
  18662. },
  18663. "properties": {
  18664. "type": "object",
  18665. "properties": {
  18666. "timestamp": {
  18667. "type": "number"
  18668. },
  18669. "sessionID": {
  18670. "type": "string",
  18671. "pattern": "^ses"
  18672. },
  18673. "assistantMessageID": {
  18674. "type": "string",
  18675. "pattern": "^msg_"
  18676. },
  18677. "callID": {
  18678. "type": "string"
  18679. },
  18680. "structured": {
  18681. "type": "object"
  18682. },
  18683. "content": {
  18684. "type": "array",
  18685. "items": {
  18686. "$ref": "#/components/schemas/LLMToolContent"
  18687. }
  18688. },
  18689. "outputPaths": {
  18690. "type": "array",
  18691. "items": {
  18692. "type": "string"
  18693. }
  18694. },
  18695. "result": {},
  18696. "provider": {
  18697. "type": "object",
  18698. "properties": {
  18699. "executed": {
  18700. "type": "boolean"
  18701. },
  18702. "metadata": {
  18703. "$ref": "#/components/schemas/LLMProviderMetadata"
  18704. }
  18705. },
  18706. "required": ["executed"],
  18707. "additionalProperties": false
  18708. }
  18709. },
  18710. "required": [
  18711. "timestamp",
  18712. "sessionID",
  18713. "assistantMessageID",
  18714. "callID",
  18715. "structured",
  18716. "content",
  18717. "provider"
  18718. ],
  18719. "additionalProperties": false
  18720. }
  18721. },
  18722. "required": ["id", "type", "properties"],
  18723. "additionalProperties": false
  18724. },
  18725. {
  18726. "type": "object",
  18727. "properties": {
  18728. "id": {
  18729. "type": "string",
  18730. "pattern": "^evt_"
  18731. },
  18732. "type": {
  18733. "type": "string",
  18734. "enum": ["session.next.tool.failed"]
  18735. },
  18736. "properties": {
  18737. "type": "object",
  18738. "properties": {
  18739. "timestamp": {
  18740. "type": "number"
  18741. },
  18742. "sessionID": {
  18743. "type": "string",
  18744. "pattern": "^ses"
  18745. },
  18746. "assistantMessageID": {
  18747. "type": "string",
  18748. "pattern": "^msg_"
  18749. },
  18750. "callID": {
  18751. "type": "string"
  18752. },
  18753. "error": {
  18754. "$ref": "#/components/schemas/SessionErrorUnknown"
  18755. },
  18756. "result": {},
  18757. "provider": {
  18758. "type": "object",
  18759. "properties": {
  18760. "executed": {
  18761. "type": "boolean"
  18762. },
  18763. "metadata": {
  18764. "$ref": "#/components/schemas/LLMProviderMetadata"
  18765. }
  18766. },
  18767. "required": ["executed"],
  18768. "additionalProperties": false
  18769. }
  18770. },
  18771. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18772. "additionalProperties": false
  18773. }
  18774. },
  18775. "required": ["id", "type", "properties"],
  18776. "additionalProperties": false
  18777. },
  18778. {
  18779. "type": "object",
  18780. "properties": {
  18781. "id": {
  18782. "type": "string",
  18783. "pattern": "^evt_"
  18784. },
  18785. "type": {
  18786. "type": "string",
  18787. "enum": ["session.next.retried"]
  18788. },
  18789. "properties": {
  18790. "type": "object",
  18791. "properties": {
  18792. "timestamp": {
  18793. "type": "number"
  18794. },
  18795. "sessionID": {
  18796. "type": "string",
  18797. "pattern": "^ses"
  18798. },
  18799. "attempt": {
  18800. "type": "number"
  18801. },
  18802. "error": {
  18803. "$ref": "#/components/schemas/SessionNextRetry_error"
  18804. }
  18805. },
  18806. "required": ["timestamp", "sessionID", "attempt", "error"],
  18807. "additionalProperties": false
  18808. }
  18809. },
  18810. "required": ["id", "type", "properties"],
  18811. "additionalProperties": false
  18812. },
  18813. {
  18814. "type": "object",
  18815. "properties": {
  18816. "id": {
  18817. "type": "string",
  18818. "pattern": "^evt_"
  18819. },
  18820. "type": {
  18821. "type": "string",
  18822. "enum": ["session.next.compaction.started"]
  18823. },
  18824. "properties": {
  18825. "type": "object",
  18826. "properties": {
  18827. "timestamp": {
  18828. "type": "number"
  18829. },
  18830. "sessionID": {
  18831. "type": "string",
  18832. "pattern": "^ses"
  18833. },
  18834. "messageID": {
  18835. "type": "string",
  18836. "pattern": "^msg_"
  18837. },
  18838. "reason": {
  18839. "type": "string",
  18840. "enum": ["auto", "manual"]
  18841. }
  18842. },
  18843. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18844. "additionalProperties": false
  18845. }
  18846. },
  18847. "required": ["id", "type", "properties"],
  18848. "additionalProperties": false
  18849. },
  18850. {
  18851. "type": "object",
  18852. "properties": {
  18853. "id": {
  18854. "type": "string",
  18855. "pattern": "^evt_"
  18856. },
  18857. "type": {
  18858. "type": "string",
  18859. "enum": ["session.next.compaction.delta"]
  18860. },
  18861. "properties": {
  18862. "type": "object",
  18863. "properties": {
  18864. "timestamp": {
  18865. "type": "number"
  18866. },
  18867. "sessionID": {
  18868. "type": "string",
  18869. "pattern": "^ses"
  18870. },
  18871. "messageID": {
  18872. "type": "string",
  18873. "pattern": "^msg_"
  18874. },
  18875. "text": {
  18876. "type": "string"
  18877. }
  18878. },
  18879. "required": ["timestamp", "sessionID", "messageID", "text"],
  18880. "additionalProperties": false
  18881. }
  18882. },
  18883. "required": ["id", "type", "properties"],
  18884. "additionalProperties": false
  18885. },
  18886. {
  18887. "type": "object",
  18888. "properties": {
  18889. "id": {
  18890. "type": "string",
  18891. "pattern": "^evt_"
  18892. },
  18893. "type": {
  18894. "type": "string",
  18895. "enum": ["session.next.compaction.ended"]
  18896. },
  18897. "properties": {
  18898. "type": "object",
  18899. "properties": {
  18900. "timestamp": {
  18901. "type": "number"
  18902. },
  18903. "sessionID": {
  18904. "type": "string",
  18905. "pattern": "^ses"
  18906. },
  18907. "messageID": {
  18908. "type": "string",
  18909. "pattern": "^msg_"
  18910. },
  18911. "reason": {
  18912. "type": "string",
  18913. "enum": ["auto", "manual"]
  18914. },
  18915. "text": {
  18916. "type": "string"
  18917. },
  18918. "recent": {
  18919. "type": "string"
  18920. }
  18921. },
  18922. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18923. "additionalProperties": false
  18924. }
  18925. },
  18926. "required": ["id", "type", "properties"],
  18927. "additionalProperties": false
  18928. },
  18929. {
  18930. "type": "object",
  18931. "properties": {
  18932. "id": {
  18933. "type": "string",
  18934. "pattern": "^evt_"
  18935. },
  18936. "type": {
  18937. "type": "string",
  18938. "enum": ["session.next.revert.staged"]
  18939. },
  18940. "properties": {
  18941. "type": "object",
  18942. "properties": {
  18943. "timestamp": {
  18944. "type": "number"
  18945. },
  18946. "sessionID": {
  18947. "type": "string",
  18948. "pattern": "^ses"
  18949. },
  18950. "revert": {
  18951. "$ref": "#/components/schemas/RevertState"
  18952. }
  18953. },
  18954. "required": ["timestamp", "sessionID", "revert"],
  18955. "additionalProperties": false
  18956. }
  18957. },
  18958. "required": ["id", "type", "properties"],
  18959. "additionalProperties": false
  18960. },
  18961. {
  18962. "type": "object",
  18963. "properties": {
  18964. "id": {
  18965. "type": "string",
  18966. "pattern": "^evt_"
  18967. },
  18968. "type": {
  18969. "type": "string",
  18970. "enum": ["session.next.revert.cleared"]
  18971. },
  18972. "properties": {
  18973. "type": "object",
  18974. "properties": {
  18975. "timestamp": {
  18976. "type": "number"
  18977. },
  18978. "sessionID": {
  18979. "type": "string",
  18980. "pattern": "^ses"
  18981. }
  18982. },
  18983. "required": ["timestamp", "sessionID"],
  18984. "additionalProperties": false
  18985. }
  18986. },
  18987. "required": ["id", "type", "properties"],
  18988. "additionalProperties": false
  18989. },
  18990. {
  18991. "type": "object",
  18992. "properties": {
  18993. "id": {
  18994. "type": "string",
  18995. "pattern": "^evt_"
  18996. },
  18997. "type": {
  18998. "type": "string",
  18999. "enum": ["session.next.revert.committed"]
  19000. },
  19001. "properties": {
  19002. "type": "object",
  19003. "properties": {
  19004. "timestamp": {
  19005. "type": "number"
  19006. },
  19007. "sessionID": {
  19008. "type": "string",
  19009. "pattern": "^ses"
  19010. },
  19011. "messageID": {
  19012. "type": "string",
  19013. "pattern": "^msg_"
  19014. }
  19015. },
  19016. "required": ["timestamp", "sessionID", "messageID"],
  19017. "additionalProperties": false
  19018. }
  19019. },
  19020. "required": ["id", "type", "properties"],
  19021. "additionalProperties": false
  19022. },
  19023. {
  19024. "type": "object",
  19025. "properties": {
  19026. "id": {
  19027. "type": "string",
  19028. "pattern": "^evt_"
  19029. },
  19030. "type": {
  19031. "type": "string",
  19032. "enum": ["message.part.delta"]
  19033. },
  19034. "properties": {
  19035. "type": "object",
  19036. "properties": {
  19037. "sessionID": {
  19038. "type": "string",
  19039. "pattern": "^ses"
  19040. },
  19041. "messageID": {
  19042. "type": "string",
  19043. "pattern": "^msg"
  19044. },
  19045. "partID": {
  19046. "type": "string",
  19047. "pattern": "^prt"
  19048. },
  19049. "field": {
  19050. "type": "string"
  19051. },
  19052. "delta": {
  19053. "type": "string"
  19054. }
  19055. },
  19056. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  19057. "additionalProperties": false
  19058. }
  19059. },
  19060. "required": ["id", "type", "properties"],
  19061. "additionalProperties": false
  19062. },
  19063. {
  19064. "type": "object",
  19065. "properties": {
  19066. "id": {
  19067. "type": "string",
  19068. "pattern": "^evt_"
  19069. },
  19070. "type": {
  19071. "type": "string",
  19072. "enum": ["session.diff"]
  19073. },
  19074. "properties": {
  19075. "type": "object",
  19076. "properties": {
  19077. "sessionID": {
  19078. "type": "string",
  19079. "pattern": "^ses"
  19080. },
  19081. "diff": {
  19082. "type": "array",
  19083. "items": {
  19084. "$ref": "#/components/schemas/SnapshotFileDiff"
  19085. }
  19086. }
  19087. },
  19088. "required": ["sessionID", "diff"],
  19089. "additionalProperties": false
  19090. }
  19091. },
  19092. "required": ["id", "type", "properties"],
  19093. "additionalProperties": false
  19094. },
  19095. {
  19096. "type": "object",
  19097. "properties": {
  19098. "id": {
  19099. "type": "string",
  19100. "pattern": "^evt_"
  19101. },
  19102. "type": {
  19103. "type": "string",
  19104. "enum": ["session.error"]
  19105. },
  19106. "properties": {
  19107. "type": "object",
  19108. "properties": {
  19109. "sessionID": {
  19110. "type": "string",
  19111. "pattern": "^ses"
  19112. },
  19113. "error": {
  19114. "anyOf": [
  19115. {
  19116. "$ref": "#/components/schemas/ProviderAuthError"
  19117. },
  19118. {
  19119. "$ref": "#/components/schemas/UnknownError"
  19120. },
  19121. {
  19122. "$ref": "#/components/schemas/MessageOutputLengthError"
  19123. },
  19124. {
  19125. "$ref": "#/components/schemas/MessageAbortedError"
  19126. },
  19127. {
  19128. "$ref": "#/components/schemas/StructuredOutputError"
  19129. },
  19130. {
  19131. "$ref": "#/components/schemas/ContextOverflowError"
  19132. },
  19133. {
  19134. "$ref": "#/components/schemas/ContentFilterError"
  19135. },
  19136. {
  19137. "$ref": "#/components/schemas/APIError"
  19138. }
  19139. ]
  19140. }
  19141. },
  19142. "additionalProperties": false
  19143. }
  19144. },
  19145. "required": ["id", "type", "properties"],
  19146. "additionalProperties": false
  19147. },
  19148. {
  19149. "type": "object",
  19150. "properties": {
  19151. "id": {
  19152. "type": "string",
  19153. "pattern": "^evt_"
  19154. },
  19155. "type": {
  19156. "type": "string",
  19157. "enum": ["installation.updated"]
  19158. },
  19159. "properties": {
  19160. "type": "object",
  19161. "properties": {
  19162. "version": {
  19163. "type": "string"
  19164. }
  19165. },
  19166. "required": ["version"],
  19167. "additionalProperties": false
  19168. }
  19169. },
  19170. "required": ["id", "type", "properties"],
  19171. "additionalProperties": false
  19172. },
  19173. {
  19174. "type": "object",
  19175. "properties": {
  19176. "id": {
  19177. "type": "string",
  19178. "pattern": "^evt_"
  19179. },
  19180. "type": {
  19181. "type": "string",
  19182. "enum": ["installation.update-available"]
  19183. },
  19184. "properties": {
  19185. "type": "object",
  19186. "properties": {
  19187. "version": {
  19188. "type": "string"
  19189. }
  19190. },
  19191. "required": ["version"],
  19192. "additionalProperties": false
  19193. }
  19194. },
  19195. "required": ["id", "type", "properties"],
  19196. "additionalProperties": false
  19197. },
  19198. {
  19199. "type": "object",
  19200. "properties": {
  19201. "id": {
  19202. "type": "string",
  19203. "pattern": "^evt_"
  19204. },
  19205. "type": {
  19206. "type": "string",
  19207. "enum": ["file.edited"]
  19208. },
  19209. "properties": {
  19210. "type": "object",
  19211. "properties": {
  19212. "file": {
  19213. "type": "string"
  19214. }
  19215. },
  19216. "required": ["file"],
  19217. "additionalProperties": false
  19218. }
  19219. },
  19220. "required": ["id", "type", "properties"],
  19221. "additionalProperties": false
  19222. },
  19223. {
  19224. "type": "object",
  19225. "properties": {
  19226. "id": {
  19227. "type": "string",
  19228. "pattern": "^evt_"
  19229. },
  19230. "type": {
  19231. "type": "string",
  19232. "enum": ["reference.updated"]
  19233. },
  19234. "properties": {
  19235. "type": "object",
  19236. "properties": {}
  19237. }
  19238. },
  19239. "required": ["id", "type", "properties"],
  19240. "additionalProperties": false
  19241. },
  19242. {
  19243. "type": "object",
  19244. "properties": {
  19245. "id": {
  19246. "type": "string",
  19247. "pattern": "^evt_"
  19248. },
  19249. "type": {
  19250. "type": "string",
  19251. "enum": ["permission.v2.asked"]
  19252. },
  19253. "properties": {
  19254. "type": "object",
  19255. "properties": {
  19256. "id": {
  19257. "type": "string",
  19258. "pattern": "^per"
  19259. },
  19260. "sessionID": {
  19261. "type": "string",
  19262. "pattern": "^ses"
  19263. },
  19264. "action": {
  19265. "type": "string"
  19266. },
  19267. "resources": {
  19268. "type": "array",
  19269. "items": {
  19270. "type": "string"
  19271. }
  19272. },
  19273. "save": {
  19274. "type": "array",
  19275. "items": {
  19276. "type": "string"
  19277. }
  19278. },
  19279. "metadata": {
  19280. "type": "object"
  19281. },
  19282. "source": {
  19283. "$ref": "#/components/schemas/PermissionV2Source"
  19284. }
  19285. },
  19286. "required": ["id", "sessionID", "action", "resources"],
  19287. "additionalProperties": false
  19288. }
  19289. },
  19290. "required": ["id", "type", "properties"],
  19291. "additionalProperties": false
  19292. },
  19293. {
  19294. "type": "object",
  19295. "properties": {
  19296. "id": {
  19297. "type": "string",
  19298. "pattern": "^evt_"
  19299. },
  19300. "type": {
  19301. "type": "string",
  19302. "enum": ["permission.v2.replied"]
  19303. },
  19304. "properties": {
  19305. "type": "object",
  19306. "properties": {
  19307. "sessionID": {
  19308. "type": "string",
  19309. "pattern": "^ses"
  19310. },
  19311. "requestID": {
  19312. "type": "string",
  19313. "pattern": "^per"
  19314. },
  19315. "reply": {
  19316. "$ref": "#/components/schemas/PermissionV2Reply"
  19317. }
  19318. },
  19319. "required": ["sessionID", "requestID", "reply"],
  19320. "additionalProperties": false
  19321. }
  19322. },
  19323. "required": ["id", "type", "properties"],
  19324. "additionalProperties": false
  19325. },
  19326. {
  19327. "type": "object",
  19328. "properties": {
  19329. "id": {
  19330. "type": "string",
  19331. "pattern": "^evt_"
  19332. },
  19333. "type": {
  19334. "type": "string",
  19335. "enum": ["plugin.added"]
  19336. },
  19337. "properties": {
  19338. "type": "object",
  19339. "properties": {
  19340. "id": {
  19341. "type": "string"
  19342. }
  19343. },
  19344. "required": ["id"],
  19345. "additionalProperties": false
  19346. }
  19347. },
  19348. "required": ["id", "type", "properties"],
  19349. "additionalProperties": false
  19350. },
  19351. {
  19352. "type": "object",
  19353. "properties": {
  19354. "id": {
  19355. "type": "string",
  19356. "pattern": "^evt_"
  19357. },
  19358. "type": {
  19359. "type": "string",
  19360. "enum": ["project.directories.updated"]
  19361. },
  19362. "properties": {
  19363. "type": "object",
  19364. "properties": {
  19365. "projectID": {
  19366. "type": "string"
  19367. }
  19368. },
  19369. "required": ["projectID"],
  19370. "additionalProperties": false
  19371. }
  19372. },
  19373. "required": ["id", "type", "properties"],
  19374. "additionalProperties": false
  19375. },
  19376. {
  19377. "type": "object",
  19378. "properties": {
  19379. "id": {
  19380. "type": "string",
  19381. "pattern": "^evt_"
  19382. },
  19383. "type": {
  19384. "type": "string",
  19385. "enum": ["file.watcher.updated"]
  19386. },
  19387. "properties": {
  19388. "type": "object",
  19389. "properties": {
  19390. "file": {
  19391. "type": "string"
  19392. },
  19393. "event": {
  19394. "type": "string",
  19395. "enum": ["add", "change", "unlink"]
  19396. }
  19397. },
  19398. "required": ["file", "event"],
  19399. "additionalProperties": false
  19400. }
  19401. },
  19402. "required": ["id", "type", "properties"],
  19403. "additionalProperties": false
  19404. },
  19405. {
  19406. "type": "object",
  19407. "properties": {
  19408. "id": {
  19409. "type": "string",
  19410. "pattern": "^evt_"
  19411. },
  19412. "type": {
  19413. "type": "string",
  19414. "enum": ["pty.created"]
  19415. },
  19416. "properties": {
  19417. "type": "object",
  19418. "properties": {
  19419. "info": {
  19420. "$ref": "#/components/schemas/Pty"
  19421. }
  19422. },
  19423. "required": ["info"],
  19424. "additionalProperties": false
  19425. }
  19426. },
  19427. "required": ["id", "type", "properties"],
  19428. "additionalProperties": false
  19429. },
  19430. {
  19431. "type": "object",
  19432. "properties": {
  19433. "id": {
  19434. "type": "string",
  19435. "pattern": "^evt_"
  19436. },
  19437. "type": {
  19438. "type": "string",
  19439. "enum": ["pty.updated"]
  19440. },
  19441. "properties": {
  19442. "type": "object",
  19443. "properties": {
  19444. "info": {
  19445. "$ref": "#/components/schemas/Pty"
  19446. }
  19447. },
  19448. "required": ["info"],
  19449. "additionalProperties": false
  19450. }
  19451. },
  19452. "required": ["id", "type", "properties"],
  19453. "additionalProperties": false
  19454. },
  19455. {
  19456. "type": "object",
  19457. "properties": {
  19458. "id": {
  19459. "type": "string",
  19460. "pattern": "^evt_"
  19461. },
  19462. "type": {
  19463. "type": "string",
  19464. "enum": ["pty.exited"]
  19465. },
  19466. "properties": {
  19467. "type": "object",
  19468. "properties": {
  19469. "id": {
  19470. "type": "string",
  19471. "pattern": "^pty"
  19472. },
  19473. "exitCode": {
  19474. "type": "integer",
  19475. "minimum": 0
  19476. }
  19477. },
  19478. "required": ["id", "exitCode"],
  19479. "additionalProperties": false
  19480. }
  19481. },
  19482. "required": ["id", "type", "properties"],
  19483. "additionalProperties": false
  19484. },
  19485. {
  19486. "type": "object",
  19487. "properties": {
  19488. "id": {
  19489. "type": "string",
  19490. "pattern": "^evt_"
  19491. },
  19492. "type": {
  19493. "type": "string",
  19494. "enum": ["pty.deleted"]
  19495. },
  19496. "properties": {
  19497. "type": "object",
  19498. "properties": {
  19499. "id": {
  19500. "type": "string",
  19501. "pattern": "^pty"
  19502. }
  19503. },
  19504. "required": ["id"],
  19505. "additionalProperties": false
  19506. }
  19507. },
  19508. "required": ["id", "type", "properties"],
  19509. "additionalProperties": false
  19510. },
  19511. {
  19512. "type": "object",
  19513. "properties": {
  19514. "id": {
  19515. "type": "string",
  19516. "pattern": "^evt_"
  19517. },
  19518. "type": {
  19519. "type": "string",
  19520. "enum": ["question.v2.asked"]
  19521. },
  19522. "properties": {
  19523. "type": "object",
  19524. "properties": {
  19525. "id": {
  19526. "type": "string",
  19527. "pattern": "^que"
  19528. },
  19529. "sessionID": {
  19530. "type": "string",
  19531. "pattern": "^ses"
  19532. },
  19533. "questions": {
  19534. "type": "array",
  19535. "items": {
  19536. "$ref": "#/components/schemas/QuestionV2Info"
  19537. },
  19538. "description": "Questions to ask"
  19539. },
  19540. "tool": {
  19541. "$ref": "#/components/schemas/QuestionV2Tool"
  19542. }
  19543. },
  19544. "required": ["id", "sessionID", "questions"],
  19545. "additionalProperties": false
  19546. }
  19547. },
  19548. "required": ["id", "type", "properties"],
  19549. "additionalProperties": false
  19550. },
  19551. {
  19552. "type": "object",
  19553. "properties": {
  19554. "id": {
  19555. "type": "string",
  19556. "pattern": "^evt_"
  19557. },
  19558. "type": {
  19559. "type": "string",
  19560. "enum": ["question.v2.replied"]
  19561. },
  19562. "properties": {
  19563. "type": "object",
  19564. "properties": {
  19565. "sessionID": {
  19566. "type": "string",
  19567. "pattern": "^ses"
  19568. },
  19569. "requestID": {
  19570. "type": "string",
  19571. "pattern": "^que"
  19572. },
  19573. "answers": {
  19574. "type": "array",
  19575. "items": {
  19576. "$ref": "#/components/schemas/QuestionV2Answer"
  19577. }
  19578. }
  19579. },
  19580. "required": ["sessionID", "requestID", "answers"],
  19581. "additionalProperties": false
  19582. }
  19583. },
  19584. "required": ["id", "type", "properties"],
  19585. "additionalProperties": false
  19586. },
  19587. {
  19588. "type": "object",
  19589. "properties": {
  19590. "id": {
  19591. "type": "string",
  19592. "pattern": "^evt_"
  19593. },
  19594. "type": {
  19595. "type": "string",
  19596. "enum": ["question.v2.rejected"]
  19597. },
  19598. "properties": {
  19599. "type": "object",
  19600. "properties": {
  19601. "sessionID": {
  19602. "type": "string",
  19603. "pattern": "^ses"
  19604. },
  19605. "requestID": {
  19606. "type": "string",
  19607. "pattern": "^que"
  19608. }
  19609. },
  19610. "required": ["sessionID", "requestID"],
  19611. "additionalProperties": false
  19612. }
  19613. },
  19614. "required": ["id", "type", "properties"],
  19615. "additionalProperties": false
  19616. },
  19617. {
  19618. "type": "object",
  19619. "properties": {
  19620. "id": {
  19621. "type": "string",
  19622. "pattern": "^evt_"
  19623. },
  19624. "type": {
  19625. "type": "string",
  19626. "enum": ["todo.updated"]
  19627. },
  19628. "properties": {
  19629. "type": "object",
  19630. "properties": {
  19631. "sessionID": {
  19632. "type": "string",
  19633. "pattern": "^ses"
  19634. },
  19635. "todos": {
  19636. "type": "array",
  19637. "items": {
  19638. "$ref": "#/components/schemas/Todo"
  19639. }
  19640. }
  19641. },
  19642. "required": ["sessionID", "todos"],
  19643. "additionalProperties": false
  19644. }
  19645. },
  19646. "required": ["id", "type", "properties"],
  19647. "additionalProperties": false
  19648. },
  19649. {
  19650. "type": "object",
  19651. "properties": {
  19652. "id": {
  19653. "type": "string",
  19654. "pattern": "^evt_"
  19655. },
  19656. "type": {
  19657. "type": "string",
  19658. "enum": ["lsp.updated"]
  19659. },
  19660. "properties": {
  19661. "type": "object",
  19662. "properties": {}
  19663. }
  19664. },
  19665. "required": ["id", "type", "properties"],
  19666. "additionalProperties": false
  19667. },
  19668. {
  19669. "type": "object",
  19670. "properties": {
  19671. "id": {
  19672. "type": "string",
  19673. "pattern": "^evt_"
  19674. },
  19675. "type": {
  19676. "type": "string",
  19677. "enum": ["permission.asked"]
  19678. },
  19679. "properties": {
  19680. "type": "object",
  19681. "properties": {
  19682. "id": {
  19683. "type": "string",
  19684. "pattern": "^per"
  19685. },
  19686. "sessionID": {
  19687. "type": "string",
  19688. "pattern": "^ses"
  19689. },
  19690. "permission": {
  19691. "type": "string"
  19692. },
  19693. "patterns": {
  19694. "type": "array",
  19695. "items": {
  19696. "type": "string"
  19697. }
  19698. },
  19699. "metadata": {
  19700. "type": "object"
  19701. },
  19702. "always": {
  19703. "type": "array",
  19704. "items": {
  19705. "type": "string"
  19706. }
  19707. },
  19708. "tool": {
  19709. "type": "object",
  19710. "properties": {
  19711. "messageID": {
  19712. "type": "string"
  19713. },
  19714. "callID": {
  19715. "type": "string"
  19716. }
  19717. },
  19718. "required": ["messageID", "callID"],
  19719. "additionalProperties": false
  19720. }
  19721. },
  19722. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19723. "additionalProperties": false
  19724. }
  19725. },
  19726. "required": ["id", "type", "properties"],
  19727. "additionalProperties": false
  19728. },
  19729. {
  19730. "type": "object",
  19731. "properties": {
  19732. "id": {
  19733. "type": "string",
  19734. "pattern": "^evt_"
  19735. },
  19736. "type": {
  19737. "type": "string",
  19738. "enum": ["permission.replied"]
  19739. },
  19740. "properties": {
  19741. "type": "object",
  19742. "properties": {
  19743. "sessionID": {
  19744. "type": "string",
  19745. "pattern": "^ses"
  19746. },
  19747. "requestID": {
  19748. "type": "string",
  19749. "pattern": "^per"
  19750. },
  19751. "reply": {
  19752. "type": "string",
  19753. "enum": ["once", "always", "reject"]
  19754. }
  19755. },
  19756. "required": ["sessionID", "requestID", "reply"],
  19757. "additionalProperties": false
  19758. }
  19759. },
  19760. "required": ["id", "type", "properties"],
  19761. "additionalProperties": false
  19762. },
  19763. {
  19764. "type": "object",
  19765. "properties": {
  19766. "id": {
  19767. "type": "string",
  19768. "pattern": "^evt_"
  19769. },
  19770. "type": {
  19771. "type": "string",
  19772. "enum": ["tui.prompt.append"]
  19773. },
  19774. "properties": {
  19775. "type": "object",
  19776. "properties": {
  19777. "text": {
  19778. "type": "string"
  19779. }
  19780. },
  19781. "required": ["text"],
  19782. "additionalProperties": false
  19783. }
  19784. },
  19785. "required": ["id", "type", "properties"],
  19786. "additionalProperties": false
  19787. },
  19788. {
  19789. "type": "object",
  19790. "properties": {
  19791. "id": {
  19792. "type": "string",
  19793. "pattern": "^evt_"
  19794. },
  19795. "type": {
  19796. "type": "string",
  19797. "enum": ["tui.command.execute"]
  19798. },
  19799. "properties": {
  19800. "type": "object",
  19801. "properties": {
  19802. "command": {
  19803. "anyOf": [
  19804. {
  19805. "type": "string",
  19806. "enum": [
  19807. "session.list",
  19808. "session.new",
  19809. "session.share",
  19810. "session.interrupt",
  19811. "session.compact",
  19812. "session.page.up",
  19813. "session.page.down",
  19814. "session.line.up",
  19815. "session.line.down",
  19816. "session.half.page.up",
  19817. "session.half.page.down",
  19818. "session.first",
  19819. "session.last",
  19820. "prompt.clear",
  19821. "prompt.submit",
  19822. "agent.cycle"
  19823. ]
  19824. },
  19825. {
  19826. "type": "string"
  19827. }
  19828. ]
  19829. }
  19830. },
  19831. "required": ["command"],
  19832. "additionalProperties": false
  19833. }
  19834. },
  19835. "required": ["id", "type", "properties"],
  19836. "additionalProperties": false
  19837. },
  19838. {
  19839. "type": "object",
  19840. "properties": {
  19841. "id": {
  19842. "type": "string",
  19843. "pattern": "^evt_"
  19844. },
  19845. "type": {
  19846. "type": "string",
  19847. "enum": ["tui.toast.show"]
  19848. },
  19849. "properties": {
  19850. "type": "object",
  19851. "properties": {
  19852. "title": {
  19853. "type": "string"
  19854. },
  19855. "message": {
  19856. "type": "string"
  19857. },
  19858. "variant": {
  19859. "type": "string",
  19860. "enum": ["info", "success", "warning", "error"]
  19861. },
  19862. "duration": {
  19863. "type": "integer",
  19864. "exclusiveMinimum": 0
  19865. }
  19866. },
  19867. "required": ["message", "variant"],
  19868. "additionalProperties": false
  19869. }
  19870. },
  19871. "required": ["id", "type", "properties"],
  19872. "additionalProperties": false
  19873. },
  19874. {
  19875. "type": "object",
  19876. "properties": {
  19877. "id": {
  19878. "type": "string",
  19879. "pattern": "^evt_"
  19880. },
  19881. "type": {
  19882. "type": "string",
  19883. "enum": ["tui.session.select"]
  19884. },
  19885. "properties": {
  19886. "type": "object",
  19887. "properties": {
  19888. "sessionID": {
  19889. "type": "string",
  19890. "pattern": "^ses",
  19891. "description": "Session ID to navigate to"
  19892. }
  19893. },
  19894. "required": ["sessionID"],
  19895. "additionalProperties": false
  19896. }
  19897. },
  19898. "required": ["id", "type", "properties"],
  19899. "additionalProperties": false
  19900. },
  19901. {
  19902. "type": "object",
  19903. "properties": {
  19904. "id": {
  19905. "type": "string",
  19906. "pattern": "^evt_"
  19907. },
  19908. "type": {
  19909. "type": "string",
  19910. "enum": ["mcp.tools.changed"]
  19911. },
  19912. "properties": {
  19913. "type": "object",
  19914. "properties": {
  19915. "server": {
  19916. "type": "string"
  19917. }
  19918. },
  19919. "required": ["server"],
  19920. "additionalProperties": false
  19921. }
  19922. },
  19923. "required": ["id", "type", "properties"],
  19924. "additionalProperties": false
  19925. },
  19926. {
  19927. "type": "object",
  19928. "properties": {
  19929. "id": {
  19930. "type": "string",
  19931. "pattern": "^evt_"
  19932. },
  19933. "type": {
  19934. "type": "string",
  19935. "enum": ["mcp.browser.open.failed"]
  19936. },
  19937. "properties": {
  19938. "type": "object",
  19939. "properties": {
  19940. "mcpName": {
  19941. "type": "string"
  19942. },
  19943. "url": {
  19944. "type": "string"
  19945. }
  19946. },
  19947. "required": ["mcpName", "url"],
  19948. "additionalProperties": false
  19949. }
  19950. },
  19951. "required": ["id", "type", "properties"],
  19952. "additionalProperties": false
  19953. },
  19954. {
  19955. "type": "object",
  19956. "properties": {
  19957. "id": {
  19958. "type": "string",
  19959. "pattern": "^evt_"
  19960. },
  19961. "type": {
  19962. "type": "string",
  19963. "enum": ["command.executed"]
  19964. },
  19965. "properties": {
  19966. "type": "object",
  19967. "properties": {
  19968. "name": {
  19969. "type": "string"
  19970. },
  19971. "sessionID": {
  19972. "type": "string",
  19973. "pattern": "^ses"
  19974. },
  19975. "arguments": {
  19976. "type": "string"
  19977. },
  19978. "messageID": {
  19979. "type": "string",
  19980. "pattern": "^msg"
  19981. }
  19982. },
  19983. "required": ["name", "sessionID", "arguments", "messageID"],
  19984. "additionalProperties": false
  19985. }
  19986. },
  19987. "required": ["id", "type", "properties"],
  19988. "additionalProperties": false
  19989. },
  19990. {
  19991. "type": "object",
  19992. "properties": {
  19993. "id": {
  19994. "type": "string",
  19995. "pattern": "^evt_"
  19996. },
  19997. "type": {
  19998. "type": "string",
  19999. "enum": ["project.updated"]
  20000. },
  20001. "properties": {
  20002. "type": "object",
  20003. "properties": {
  20004. "id": {
  20005. "type": "string"
  20006. },
  20007. "worktree": {
  20008. "type": "string"
  20009. },
  20010. "vcs": {
  20011. "$ref": "#/components/schemas/ProjectVcs"
  20012. },
  20013. "name": {
  20014. "type": "string"
  20015. },
  20016. "icon": {
  20017. "$ref": "#/components/schemas/ProjectIcon"
  20018. },
  20019. "commands": {
  20020. "$ref": "#/components/schemas/ProjectCommands"
  20021. },
  20022. "time": {
  20023. "$ref": "#/components/schemas/ProjectTime"
  20024. },
  20025. "sandboxes": {
  20026. "type": "array",
  20027. "items": {
  20028. "type": "string"
  20029. }
  20030. }
  20031. },
  20032. "required": ["id", "worktree", "time", "sandboxes"],
  20033. "additionalProperties": false
  20034. }
  20035. },
  20036. "required": ["id", "type", "properties"],
  20037. "additionalProperties": false
  20038. },
  20039. {
  20040. "type": "object",
  20041. "properties": {
  20042. "id": {
  20043. "type": "string",
  20044. "pattern": "^evt_"
  20045. },
  20046. "type": {
  20047. "type": "string",
  20048. "enum": ["session.status"]
  20049. },
  20050. "properties": {
  20051. "type": "object",
  20052. "properties": {
  20053. "sessionID": {
  20054. "type": "string",
  20055. "pattern": "^ses"
  20056. },
  20057. "status": {
  20058. "$ref": "#/components/schemas/SessionStatus"
  20059. }
  20060. },
  20061. "required": ["sessionID", "status"],
  20062. "additionalProperties": false
  20063. }
  20064. },
  20065. "required": ["id", "type", "properties"],
  20066. "additionalProperties": false
  20067. },
  20068. {
  20069. "type": "object",
  20070. "properties": {
  20071. "id": {
  20072. "type": "string",
  20073. "pattern": "^evt_"
  20074. },
  20075. "type": {
  20076. "type": "string",
  20077. "enum": ["session.idle"]
  20078. },
  20079. "properties": {
  20080. "type": "object",
  20081. "properties": {
  20082. "sessionID": {
  20083. "type": "string",
  20084. "pattern": "^ses"
  20085. }
  20086. },
  20087. "required": ["sessionID"],
  20088. "additionalProperties": false
  20089. }
  20090. },
  20091. "required": ["id", "type", "properties"],
  20092. "additionalProperties": false
  20093. },
  20094. {
  20095. "type": "object",
  20096. "properties": {
  20097. "id": {
  20098. "type": "string",
  20099. "pattern": "^evt_"
  20100. },
  20101. "type": {
  20102. "type": "string",
  20103. "enum": ["question.asked"]
  20104. },
  20105. "properties": {
  20106. "type": "object",
  20107. "properties": {
  20108. "id": {
  20109. "type": "string",
  20110. "pattern": "^que"
  20111. },
  20112. "sessionID": {
  20113. "type": "string",
  20114. "pattern": "^ses"
  20115. },
  20116. "questions": {
  20117. "type": "array",
  20118. "items": {
  20119. "$ref": "#/components/schemas/QuestionInfo"
  20120. },
  20121. "description": "Questions to ask"
  20122. },
  20123. "tool": {
  20124. "$ref": "#/components/schemas/QuestionTool"
  20125. }
  20126. },
  20127. "required": ["id", "sessionID", "questions"],
  20128. "additionalProperties": false
  20129. }
  20130. },
  20131. "required": ["id", "type", "properties"],
  20132. "additionalProperties": false
  20133. },
  20134. {
  20135. "type": "object",
  20136. "properties": {
  20137. "id": {
  20138. "type": "string",
  20139. "pattern": "^evt_"
  20140. },
  20141. "type": {
  20142. "type": "string",
  20143. "enum": ["question.replied"]
  20144. },
  20145. "properties": {
  20146. "type": "object",
  20147. "properties": {
  20148. "sessionID": {
  20149. "type": "string",
  20150. "pattern": "^ses"
  20151. },
  20152. "requestID": {
  20153. "type": "string",
  20154. "pattern": "^que"
  20155. },
  20156. "answers": {
  20157. "type": "array",
  20158. "items": {
  20159. "$ref": "#/components/schemas/QuestionAnswer"
  20160. }
  20161. }
  20162. },
  20163. "required": ["sessionID", "requestID", "answers"],
  20164. "additionalProperties": false
  20165. }
  20166. },
  20167. "required": ["id", "type", "properties"],
  20168. "additionalProperties": false
  20169. },
  20170. {
  20171. "type": "object",
  20172. "properties": {
  20173. "id": {
  20174. "type": "string",
  20175. "pattern": "^evt_"
  20176. },
  20177. "type": {
  20178. "type": "string",
  20179. "enum": ["question.rejected"]
  20180. },
  20181. "properties": {
  20182. "type": "object",
  20183. "properties": {
  20184. "sessionID": {
  20185. "type": "string",
  20186. "pattern": "^ses"
  20187. },
  20188. "requestID": {
  20189. "type": "string",
  20190. "pattern": "^que"
  20191. }
  20192. },
  20193. "required": ["sessionID", "requestID"],
  20194. "additionalProperties": false
  20195. }
  20196. },
  20197. "required": ["id", "type", "properties"],
  20198. "additionalProperties": false
  20199. },
  20200. {
  20201. "type": "object",
  20202. "properties": {
  20203. "id": {
  20204. "type": "string",
  20205. "pattern": "^evt_"
  20206. },
  20207. "type": {
  20208. "type": "string",
  20209. "enum": ["session.compacted"]
  20210. },
  20211. "properties": {
  20212. "type": "object",
  20213. "properties": {
  20214. "sessionID": {
  20215. "type": "string",
  20216. "pattern": "^ses"
  20217. }
  20218. },
  20219. "required": ["sessionID"],
  20220. "additionalProperties": false
  20221. }
  20222. },
  20223. "required": ["id", "type", "properties"],
  20224. "additionalProperties": false
  20225. },
  20226. {
  20227. "type": "object",
  20228. "properties": {
  20229. "id": {
  20230. "type": "string",
  20231. "pattern": "^evt_"
  20232. },
  20233. "type": {
  20234. "type": "string",
  20235. "enum": ["vcs.branch.updated"]
  20236. },
  20237. "properties": {
  20238. "type": "object",
  20239. "properties": {
  20240. "branch": {
  20241. "type": "string"
  20242. }
  20243. },
  20244. "additionalProperties": false
  20245. }
  20246. },
  20247. "required": ["id", "type", "properties"],
  20248. "additionalProperties": false
  20249. },
  20250. {
  20251. "type": "object",
  20252. "properties": {
  20253. "id": {
  20254. "type": "string",
  20255. "pattern": "^evt_"
  20256. },
  20257. "type": {
  20258. "type": "string",
  20259. "enum": ["workspace.ready"]
  20260. },
  20261. "properties": {
  20262. "type": "object",
  20263. "properties": {
  20264. "name": {
  20265. "type": "string"
  20266. }
  20267. },
  20268. "required": ["name"],
  20269. "additionalProperties": false
  20270. }
  20271. },
  20272. "required": ["id", "type", "properties"],
  20273. "additionalProperties": false
  20274. },
  20275. {
  20276. "type": "object",
  20277. "properties": {
  20278. "id": {
  20279. "type": "string",
  20280. "pattern": "^evt_"
  20281. },
  20282. "type": {
  20283. "type": "string",
  20284. "enum": ["workspace.failed"]
  20285. },
  20286. "properties": {
  20287. "type": "object",
  20288. "properties": {
  20289. "message": {
  20290. "type": "string"
  20291. }
  20292. },
  20293. "required": ["message"],
  20294. "additionalProperties": false
  20295. }
  20296. },
  20297. "required": ["id", "type", "properties"],
  20298. "additionalProperties": false
  20299. },
  20300. {
  20301. "type": "object",
  20302. "properties": {
  20303. "id": {
  20304. "type": "string",
  20305. "pattern": "^evt_"
  20306. },
  20307. "type": {
  20308. "type": "string",
  20309. "enum": ["workspace.status"]
  20310. },
  20311. "properties": {
  20312. "type": "object",
  20313. "properties": {
  20314. "workspaceID": {
  20315. "type": "string",
  20316. "pattern": "^wrk"
  20317. },
  20318. "status": {
  20319. "type": "string",
  20320. "enum": ["connected", "connecting", "disconnected", "error"]
  20321. }
  20322. },
  20323. "required": ["workspaceID", "status"],
  20324. "additionalProperties": false
  20325. }
  20326. },
  20327. "required": ["id", "type", "properties"],
  20328. "additionalProperties": false
  20329. },
  20330. {
  20331. "type": "object",
  20332. "properties": {
  20333. "id": {
  20334. "type": "string",
  20335. "pattern": "^evt_"
  20336. },
  20337. "type": {
  20338. "type": "string",
  20339. "enum": ["worktree.ready"]
  20340. },
  20341. "properties": {
  20342. "type": "object",
  20343. "properties": {
  20344. "name": {
  20345. "type": "string"
  20346. },
  20347. "branch": {
  20348. "type": "string"
  20349. }
  20350. },
  20351. "required": ["name"],
  20352. "additionalProperties": false
  20353. }
  20354. },
  20355. "required": ["id", "type", "properties"],
  20356. "additionalProperties": false
  20357. },
  20358. {
  20359. "type": "object",
  20360. "properties": {
  20361. "id": {
  20362. "type": "string",
  20363. "pattern": "^evt_"
  20364. },
  20365. "type": {
  20366. "type": "string",
  20367. "enum": ["worktree.failed"]
  20368. },
  20369. "properties": {
  20370. "type": "object",
  20371. "properties": {
  20372. "message": {
  20373. "type": "string"
  20374. }
  20375. },
  20376. "required": ["message"],
  20377. "additionalProperties": false
  20378. }
  20379. },
  20380. "required": ["id", "type", "properties"],
  20381. "additionalProperties": false
  20382. },
  20383. {
  20384. "type": "object",
  20385. "properties": {
  20386. "id": {
  20387. "type": "string",
  20388. "pattern": "^evt_"
  20389. },
  20390. "type": {
  20391. "type": "string",
  20392. "enum": ["server.connected"]
  20393. },
  20394. "properties": {
  20395. "type": "object",
  20396. "properties": {}
  20397. }
  20398. },
  20399. "required": ["id", "type", "properties"],
  20400. "additionalProperties": false
  20401. },
  20402. {
  20403. "type": "object",
  20404. "properties": {
  20405. "id": {
  20406. "type": "string",
  20407. "pattern": "^evt_"
  20408. },
  20409. "type": {
  20410. "type": "string",
  20411. "enum": ["global.disposed"]
  20412. },
  20413. "properties": {
  20414. "type": "object",
  20415. "properties": {}
  20416. }
  20417. },
  20418. "required": ["id", "type", "properties"],
  20419. "additionalProperties": false
  20420. },
  20421. {
  20422. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  20423. },
  20424. {
  20425. "$ref": "#/components/schemas/SyncEventSessionCreated"
  20426. },
  20427. {
  20428. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  20429. },
  20430. {
  20431. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  20432. },
  20433. {
  20434. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  20435. },
  20436. {
  20437. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  20438. },
  20439. {
  20440. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  20441. },
  20442. {
  20443. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  20444. },
  20445. {
  20446. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  20447. },
  20448. {
  20449. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  20450. },
  20451. {
  20452. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  20453. },
  20454. {
  20455. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  20456. },
  20457. {
  20458. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  20459. },
  20460. {
  20461. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  20462. },
  20463. {
  20464. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  20465. },
  20466. {
  20467. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  20468. },
  20469. {
  20470. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  20471. },
  20472. {
  20473. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  20474. },
  20475. {
  20476. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  20477. },
  20478. {
  20479. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  20480. },
  20481. {
  20482. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  20483. },
  20484. {
  20485. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  20486. },
  20487. {
  20488. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  20489. },
  20490. {
  20491. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  20492. },
  20493. {
  20494. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  20495. },
  20496. {
  20497. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  20498. },
  20499. {
  20500. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  20501. },
  20502. {
  20503. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  20504. },
  20505. {
  20506. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  20507. },
  20508. {
  20509. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  20510. },
  20511. {
  20512. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  20513. },
  20514. {
  20515. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  20516. },
  20517. {
  20518. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  20519. },
  20520. {
  20521. "$ref": "#/components/schemas/SyncEventSessionNextRevertStaged"
  20522. },
  20523. {
  20524. "$ref": "#/components/schemas/SyncEventSessionNextRevertCleared"
  20525. },
  20526. {
  20527. "$ref": "#/components/schemas/SyncEventSessionNextRevertCommitted"
  20528. }
  20529. ]
  20530. }
  20531. },
  20532. "required": ["directory", "payload"],
  20533. "additionalProperties": false
  20534. },
  20535. "LogLevel": {
  20536. "type": "string",
  20537. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  20538. "description": "Log level"
  20539. },
  20540. "ServerConfig": {
  20541. "type": "object",
  20542. "properties": {
  20543. "port": {
  20544. "type": "integer",
  20545. "exclusiveMinimum": 0
  20546. },
  20547. "hostname": {
  20548. "type": "string"
  20549. },
  20550. "mdns": {
  20551. "type": "boolean"
  20552. },
  20553. "mdnsDomain": {
  20554. "type": "string"
  20555. },
  20556. "cors": {
  20557. "type": "array",
  20558. "items": {
  20559. "type": "string"
  20560. }
  20561. }
  20562. },
  20563. "additionalProperties": false,
  20564. "description": "Server configuration for opencode serve and web commands"
  20565. },
  20566. "PermissionActionConfig": {
  20567. "type": "string",
  20568. "enum": ["ask", "allow", "deny"]
  20569. },
  20570. "PermissionObjectConfig": {
  20571. "type": "object",
  20572. "additionalProperties": {
  20573. "$ref": "#/components/schemas/PermissionActionConfig"
  20574. }
  20575. },
  20576. "PermissionRuleConfig": {
  20577. "anyOf": [
  20578. {
  20579. "$ref": "#/components/schemas/PermissionActionConfig"
  20580. },
  20581. {
  20582. "$ref": "#/components/schemas/PermissionObjectConfig"
  20583. }
  20584. ]
  20585. },
  20586. "PermissionConfig": {
  20587. "anyOf": [
  20588. {
  20589. "$ref": "#/components/schemas/PermissionActionConfig"
  20590. },
  20591. {
  20592. "type": "object",
  20593. "properties": {
  20594. "read": {
  20595. "$ref": "#/components/schemas/PermissionRuleConfig"
  20596. },
  20597. "edit": {
  20598. "$ref": "#/components/schemas/PermissionRuleConfig"
  20599. },
  20600. "glob": {
  20601. "$ref": "#/components/schemas/PermissionRuleConfig"
  20602. },
  20603. "grep": {
  20604. "$ref": "#/components/schemas/PermissionRuleConfig"
  20605. },
  20606. "list": {
  20607. "$ref": "#/components/schemas/PermissionRuleConfig"
  20608. },
  20609. "bash": {
  20610. "$ref": "#/components/schemas/PermissionRuleConfig"
  20611. },
  20612. "task": {
  20613. "$ref": "#/components/schemas/PermissionRuleConfig"
  20614. },
  20615. "external_directory": {
  20616. "$ref": "#/components/schemas/PermissionRuleConfig"
  20617. },
  20618. "todowrite": {
  20619. "$ref": "#/components/schemas/PermissionActionConfig"
  20620. },
  20621. "question": {
  20622. "$ref": "#/components/schemas/PermissionActionConfig"
  20623. },
  20624. "webfetch": {
  20625. "$ref": "#/components/schemas/PermissionActionConfig"
  20626. },
  20627. "websearch": {
  20628. "$ref": "#/components/schemas/PermissionActionConfig"
  20629. },
  20630. "lsp": {
  20631. "$ref": "#/components/schemas/PermissionRuleConfig"
  20632. },
  20633. "doom_loop": {
  20634. "$ref": "#/components/schemas/PermissionActionConfig"
  20635. },
  20636. "skill": {
  20637. "$ref": "#/components/schemas/PermissionRuleConfig"
  20638. }
  20639. },
  20640. "additionalProperties": {
  20641. "$ref": "#/components/schemas/PermissionRuleConfig"
  20642. }
  20643. }
  20644. ]
  20645. },
  20646. "AgentConfig": {
  20647. "type": "object",
  20648. "properties": {
  20649. "model": {
  20650. "type": "string"
  20651. },
  20652. "variant": {
  20653. "type": "string"
  20654. },
  20655. "temperature": {
  20656. "type": "number"
  20657. },
  20658. "top_p": {
  20659. "type": "number"
  20660. },
  20661. "prompt": {
  20662. "type": "string"
  20663. },
  20664. "tools": {
  20665. "type": "object",
  20666. "additionalProperties": {
  20667. "type": "boolean"
  20668. }
  20669. },
  20670. "disable": {
  20671. "type": "boolean"
  20672. },
  20673. "description": {
  20674. "type": "string"
  20675. },
  20676. "mode": {
  20677. "type": "string",
  20678. "enum": ["subagent", "primary", "all"]
  20679. },
  20680. "hidden": {
  20681. "type": "boolean"
  20682. },
  20683. "options": {
  20684. "type": "object"
  20685. },
  20686. "color": {
  20687. "anyOf": [
  20688. {
  20689. "type": "string",
  20690. "pattern": "^#[0-9a-fA-F]{6}$"
  20691. },
  20692. {
  20693. "type": "string",
  20694. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20695. }
  20696. ],
  20697. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20698. },
  20699. "steps": {
  20700. "type": "integer",
  20701. "exclusiveMinimum": 0
  20702. },
  20703. "maxSteps": {
  20704. "type": "integer",
  20705. "exclusiveMinimum": 0
  20706. },
  20707. "permission": {
  20708. "$ref": "#/components/schemas/PermissionConfig"
  20709. }
  20710. },
  20711. "additionalProperties": {}
  20712. },
  20713. "ProviderConfig": {
  20714. "type": "object",
  20715. "properties": {
  20716. "api": {
  20717. "type": "string"
  20718. },
  20719. "name": {
  20720. "type": "string"
  20721. },
  20722. "env": {
  20723. "type": "array",
  20724. "items": {
  20725. "type": "string"
  20726. }
  20727. },
  20728. "id": {
  20729. "type": "string"
  20730. },
  20731. "npm": {
  20732. "type": "string"
  20733. },
  20734. "whitelist": {
  20735. "type": "array",
  20736. "items": {
  20737. "type": "string"
  20738. }
  20739. },
  20740. "blacklist": {
  20741. "type": "array",
  20742. "items": {
  20743. "type": "string"
  20744. }
  20745. },
  20746. "options": {
  20747. "type": "object",
  20748. "properties": {
  20749. "apiKey": {
  20750. "type": "string"
  20751. },
  20752. "baseURL": {
  20753. "type": "string"
  20754. },
  20755. "enterpriseUrl": {
  20756. "type": "string"
  20757. },
  20758. "setCacheKey": {
  20759. "type": "boolean"
  20760. },
  20761. "timeout": {
  20762. "anyOf": [
  20763. {
  20764. "type": "integer",
  20765. "exclusiveMinimum": 0
  20766. },
  20767. {
  20768. "type": "boolean",
  20769. "enum": [false]
  20770. }
  20771. ],
  20772. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20773. },
  20774. "headerTimeout": {
  20775. "anyOf": [
  20776. {
  20777. "type": "integer",
  20778. "exclusiveMinimum": 0
  20779. },
  20780. {
  20781. "type": "boolean",
  20782. "enum": [false]
  20783. }
  20784. ],
  20785. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20786. },
  20787. "chunkTimeout": {
  20788. "type": "integer",
  20789. "exclusiveMinimum": 0
  20790. }
  20791. },
  20792. "additionalProperties": {}
  20793. },
  20794. "models": {
  20795. "type": "object",
  20796. "additionalProperties": {
  20797. "type": "object",
  20798. "properties": {
  20799. "id": {
  20800. "type": "string"
  20801. },
  20802. "name": {
  20803. "type": "string"
  20804. },
  20805. "family": {
  20806. "type": "string"
  20807. },
  20808. "release_date": {
  20809. "type": "string"
  20810. },
  20811. "attachment": {
  20812. "type": "boolean"
  20813. },
  20814. "reasoning": {
  20815. "type": "boolean"
  20816. },
  20817. "temperature": {
  20818. "type": "boolean"
  20819. },
  20820. "tool_call": {
  20821. "type": "boolean"
  20822. },
  20823. "interleaved": {
  20824. "anyOf": [
  20825. {
  20826. "type": "boolean",
  20827. "enum": [true]
  20828. },
  20829. {
  20830. "type": "object",
  20831. "properties": {
  20832. "field": {
  20833. "type": "string",
  20834. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20835. }
  20836. },
  20837. "required": ["field"],
  20838. "additionalProperties": false
  20839. }
  20840. ]
  20841. },
  20842. "cost": {
  20843. "type": "object",
  20844. "properties": {
  20845. "input": {
  20846. "type": "number"
  20847. },
  20848. "output": {
  20849. "type": "number"
  20850. },
  20851. "cache_read": {
  20852. "type": "number"
  20853. },
  20854. "cache_write": {
  20855. "type": "number"
  20856. },
  20857. "context_over_200k": {
  20858. "type": "object",
  20859. "properties": {
  20860. "input": {
  20861. "type": "number"
  20862. },
  20863. "output": {
  20864. "type": "number"
  20865. },
  20866. "cache_read": {
  20867. "type": "number"
  20868. },
  20869. "cache_write": {
  20870. "type": "number"
  20871. }
  20872. },
  20873. "required": ["input", "output"],
  20874. "additionalProperties": false
  20875. }
  20876. },
  20877. "required": ["input", "output"],
  20878. "additionalProperties": false
  20879. },
  20880. "limit": {
  20881. "type": "object",
  20882. "properties": {
  20883. "context": {
  20884. "type": "number"
  20885. },
  20886. "input": {
  20887. "type": "number"
  20888. },
  20889. "output": {
  20890. "type": "number"
  20891. }
  20892. },
  20893. "required": ["context", "output"],
  20894. "additionalProperties": false
  20895. },
  20896. "modalities": {
  20897. "type": "object",
  20898. "properties": {
  20899. "input": {
  20900. "type": "array",
  20901. "items": {
  20902. "type": "string",
  20903. "enum": ["text", "audio", "image", "video", "pdf"]
  20904. }
  20905. },
  20906. "output": {
  20907. "type": "array",
  20908. "items": {
  20909. "type": "string",
  20910. "enum": ["text", "audio", "image", "video", "pdf"]
  20911. }
  20912. }
  20913. },
  20914. "additionalProperties": false
  20915. },
  20916. "experimental": {
  20917. "type": "boolean"
  20918. },
  20919. "status": {
  20920. "type": "string",
  20921. "enum": ["alpha", "beta", "deprecated", "active"]
  20922. },
  20923. "provider": {
  20924. "type": "object",
  20925. "properties": {
  20926. "npm": {
  20927. "type": "string"
  20928. },
  20929. "api": {
  20930. "type": "string"
  20931. }
  20932. },
  20933. "additionalProperties": false
  20934. },
  20935. "options": {
  20936. "type": "object"
  20937. },
  20938. "headers": {
  20939. "type": "object",
  20940. "additionalProperties": {
  20941. "type": "string"
  20942. }
  20943. },
  20944. "variants": {
  20945. "type": "object",
  20946. "additionalProperties": {
  20947. "type": "object",
  20948. "properties": {
  20949. "disabled": {
  20950. "type": "boolean"
  20951. }
  20952. },
  20953. "additionalProperties": {}
  20954. },
  20955. "description": "Variant-specific configuration"
  20956. }
  20957. },
  20958. "additionalProperties": false
  20959. }
  20960. }
  20961. },
  20962. "additionalProperties": false
  20963. },
  20964. "McpLocalConfig": {
  20965. "type": "object",
  20966. "properties": {
  20967. "type": {
  20968. "type": "string",
  20969. "enum": ["local"],
  20970. "description": "Type of MCP server connection"
  20971. },
  20972. "command": {
  20973. "type": "array",
  20974. "items": {
  20975. "type": "string"
  20976. },
  20977. "description": "Command and arguments to run the MCP server"
  20978. },
  20979. "cwd": {
  20980. "type": "string"
  20981. },
  20982. "environment": {
  20983. "type": "object",
  20984. "additionalProperties": {
  20985. "type": "string"
  20986. }
  20987. },
  20988. "enabled": {
  20989. "type": "boolean"
  20990. },
  20991. "timeout": {
  20992. "type": "integer",
  20993. "exclusiveMinimum": 0
  20994. }
  20995. },
  20996. "required": ["type", "command"],
  20997. "additionalProperties": false
  20998. },
  20999. "McpOAuthConfig": {
  21000. "type": "object",
  21001. "properties": {
  21002. "clientId": {
  21003. "type": "string"
  21004. },
  21005. "clientSecret": {
  21006. "type": "string"
  21007. },
  21008. "scope": {
  21009. "type": "string"
  21010. },
  21011. "callbackPort": {
  21012. "type": "integer",
  21013. "minimum": 1,
  21014. "maximum": 65535
  21015. },
  21016. "redirectUri": {
  21017. "type": "string"
  21018. }
  21019. },
  21020. "additionalProperties": false
  21021. },
  21022. "McpRemoteConfig": {
  21023. "type": "object",
  21024. "properties": {
  21025. "type": {
  21026. "type": "string",
  21027. "enum": ["remote"],
  21028. "description": "Type of MCP server connection"
  21029. },
  21030. "url": {
  21031. "type": "string",
  21032. "description": "URL of the remote MCP server"
  21033. },
  21034. "enabled": {
  21035. "type": "boolean"
  21036. },
  21037. "headers": {
  21038. "type": "object",
  21039. "additionalProperties": {
  21040. "type": "string"
  21041. }
  21042. },
  21043. "oauth": {
  21044. "anyOf": [
  21045. {
  21046. "$ref": "#/components/schemas/McpOAuthConfig"
  21047. },
  21048. {
  21049. "type": "boolean",
  21050. "enum": [false]
  21051. }
  21052. ],
  21053. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  21054. },
  21055. "timeout": {
  21056. "type": "integer",
  21057. "exclusiveMinimum": 0
  21058. }
  21059. },
  21060. "required": ["type", "url"],
  21061. "additionalProperties": false
  21062. },
  21063. "LayoutConfig": {
  21064. "type": "string",
  21065. "enum": ["auto", "stretch"],
  21066. "description": "@deprecated Always uses stretch layout."
  21067. },
  21068. "ImageAttachmentConfig": {
  21069. "type": "object",
  21070. "properties": {
  21071. "auto_resize": {
  21072. "type": "boolean"
  21073. },
  21074. "max_width": {
  21075. "type": "integer",
  21076. "exclusiveMinimum": 0
  21077. },
  21078. "max_height": {
  21079. "type": "integer",
  21080. "exclusiveMinimum": 0
  21081. },
  21082. "max_base64_bytes": {
  21083. "type": "integer",
  21084. "exclusiveMinimum": 0
  21085. }
  21086. },
  21087. "additionalProperties": false
  21088. },
  21089. "AttachmentConfig": {
  21090. "type": "object",
  21091. "properties": {
  21092. "image": {
  21093. "$ref": "#/components/schemas/ImageAttachmentConfig"
  21094. }
  21095. },
  21096. "additionalProperties": false
  21097. },
  21098. "Config": {
  21099. "type": "object",
  21100. "properties": {
  21101. "$schema": {
  21102. "type": "string"
  21103. },
  21104. "shell": {
  21105. "type": "string"
  21106. },
  21107. "logLevel": {
  21108. "$ref": "#/components/schemas/LogLevel"
  21109. },
  21110. "server": {
  21111. "$ref": "#/components/schemas/ServerConfig"
  21112. },
  21113. "command": {
  21114. "type": "object",
  21115. "additionalProperties": {
  21116. "type": "object",
  21117. "properties": {
  21118. "template": {
  21119. "type": "string"
  21120. },
  21121. "description": {
  21122. "type": "string"
  21123. },
  21124. "agent": {
  21125. "type": "string"
  21126. },
  21127. "model": {
  21128. "type": "string"
  21129. },
  21130. "variant": {
  21131. "type": "string"
  21132. },
  21133. "subtask": {
  21134. "type": "boolean"
  21135. }
  21136. },
  21137. "required": ["template"],
  21138. "additionalProperties": false
  21139. }
  21140. },
  21141. "skills": {
  21142. "type": "object",
  21143. "properties": {
  21144. "paths": {
  21145. "type": "array",
  21146. "items": {
  21147. "type": "string"
  21148. }
  21149. },
  21150. "urls": {
  21151. "type": "array",
  21152. "items": {
  21153. "type": "string"
  21154. }
  21155. }
  21156. },
  21157. "additionalProperties": false
  21158. },
  21159. "references": {
  21160. "type": "object",
  21161. "additionalProperties": {
  21162. "anyOf": [
  21163. {
  21164. "type": "string"
  21165. },
  21166. {
  21167. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21168. },
  21169. {
  21170. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21171. }
  21172. ]
  21173. }
  21174. },
  21175. "reference": {
  21176. "type": "object",
  21177. "additionalProperties": {
  21178. "anyOf": [
  21179. {
  21180. "type": "string"
  21181. },
  21182. {
  21183. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21184. },
  21185. {
  21186. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21187. }
  21188. ]
  21189. }
  21190. },
  21191. "watcher": {
  21192. "type": "object",
  21193. "properties": {
  21194. "ignore": {
  21195. "type": "array",
  21196. "items": {
  21197. "type": "string"
  21198. }
  21199. }
  21200. },
  21201. "additionalProperties": false
  21202. },
  21203. "snapshot": {
  21204. "type": "boolean"
  21205. },
  21206. "plugin": {
  21207. "type": "array",
  21208. "items": {
  21209. "anyOf": [
  21210. {
  21211. "type": "string"
  21212. },
  21213. {
  21214. "type": "array",
  21215. "prefixItems": [
  21216. {
  21217. "type": "string"
  21218. },
  21219. {
  21220. "type": "object"
  21221. }
  21222. ],
  21223. "maxItems": 2,
  21224. "minItems": 2
  21225. }
  21226. ]
  21227. }
  21228. },
  21229. "share": {
  21230. "type": "string",
  21231. "enum": ["manual", "auto", "disabled"]
  21232. },
  21233. "autoshare": {
  21234. "type": "boolean"
  21235. },
  21236. "autoupdate": {
  21237. "anyOf": [
  21238. {
  21239. "type": "boolean"
  21240. },
  21241. {
  21242. "type": "string",
  21243. "enum": ["notify"]
  21244. }
  21245. ],
  21246. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  21247. },
  21248. "disabled_providers": {
  21249. "type": "array",
  21250. "items": {
  21251. "type": "string"
  21252. }
  21253. },
  21254. "enabled_providers": {
  21255. "type": "array",
  21256. "items": {
  21257. "type": "string"
  21258. }
  21259. },
  21260. "model": {
  21261. "type": "string"
  21262. },
  21263. "small_model": {
  21264. "type": "string"
  21265. },
  21266. "default_agent": {
  21267. "type": "string"
  21268. },
  21269. "subagent_depth": {
  21270. "type": "integer",
  21271. "minimum": 0
  21272. },
  21273. "username": {
  21274. "type": "string"
  21275. },
  21276. "mode": {
  21277. "type": "object",
  21278. "properties": {
  21279. "build": {
  21280. "$ref": "#/components/schemas/AgentConfig"
  21281. },
  21282. "plan": {
  21283. "$ref": "#/components/schemas/AgentConfig"
  21284. }
  21285. },
  21286. "additionalProperties": {
  21287. "$ref": "#/components/schemas/AgentConfig"
  21288. }
  21289. },
  21290. "agent": {
  21291. "type": "object",
  21292. "properties": {
  21293. "plan": {
  21294. "$ref": "#/components/schemas/AgentConfig"
  21295. },
  21296. "build": {
  21297. "$ref": "#/components/schemas/AgentConfig"
  21298. },
  21299. "general": {
  21300. "$ref": "#/components/schemas/AgentConfig"
  21301. },
  21302. "explore": {
  21303. "$ref": "#/components/schemas/AgentConfig"
  21304. },
  21305. "title": {
  21306. "$ref": "#/components/schemas/AgentConfig"
  21307. },
  21308. "summary": {
  21309. "$ref": "#/components/schemas/AgentConfig"
  21310. },
  21311. "compaction": {
  21312. "$ref": "#/components/schemas/AgentConfig"
  21313. }
  21314. },
  21315. "additionalProperties": {
  21316. "$ref": "#/components/schemas/AgentConfig"
  21317. }
  21318. },
  21319. "provider": {
  21320. "type": "object",
  21321. "additionalProperties": {
  21322. "$ref": "#/components/schemas/ProviderConfig"
  21323. }
  21324. },
  21325. "mcp": {
  21326. "type": "object",
  21327. "additionalProperties": {
  21328. "anyOf": [
  21329. {
  21330. "$ref": "#/components/schemas/McpLocalConfig"
  21331. },
  21332. {
  21333. "$ref": "#/components/schemas/McpRemoteConfig"
  21334. },
  21335. {
  21336. "type": "object",
  21337. "properties": {
  21338. "enabled": {
  21339. "type": "boolean"
  21340. }
  21341. },
  21342. "required": ["enabled"],
  21343. "additionalProperties": false
  21344. }
  21345. ]
  21346. }
  21347. },
  21348. "formatter": {
  21349. "anyOf": [
  21350. {
  21351. "type": "boolean"
  21352. },
  21353. {
  21354. "type": "object",
  21355. "additionalProperties": {
  21356. "type": "object",
  21357. "properties": {
  21358. "disabled": {
  21359. "type": "boolean"
  21360. },
  21361. "command": {
  21362. "type": "array",
  21363. "items": {
  21364. "type": "string"
  21365. }
  21366. },
  21367. "environment": {
  21368. "type": "object",
  21369. "additionalProperties": {
  21370. "type": "string"
  21371. }
  21372. },
  21373. "extensions": {
  21374. "type": "array",
  21375. "items": {
  21376. "type": "string"
  21377. }
  21378. }
  21379. },
  21380. "additionalProperties": false
  21381. }
  21382. }
  21383. ],
  21384. "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."
  21385. },
  21386. "lsp": {
  21387. "anyOf": [
  21388. {
  21389. "type": "boolean"
  21390. },
  21391. {
  21392. "type": "object",
  21393. "additionalProperties": {
  21394. "anyOf": [
  21395. {
  21396. "type": "object",
  21397. "properties": {
  21398. "disabled": {
  21399. "type": "boolean",
  21400. "enum": [true]
  21401. }
  21402. },
  21403. "required": ["disabled"],
  21404. "additionalProperties": false
  21405. },
  21406. {
  21407. "type": "object",
  21408. "properties": {
  21409. "command": {
  21410. "type": "array",
  21411. "items": {
  21412. "type": "string"
  21413. }
  21414. },
  21415. "extensions": {
  21416. "type": "array",
  21417. "items": {
  21418. "type": "string"
  21419. }
  21420. },
  21421. "disabled": {
  21422. "type": "boolean"
  21423. },
  21424. "env": {
  21425. "type": "object",
  21426. "additionalProperties": {
  21427. "type": "string"
  21428. }
  21429. },
  21430. "initialization": {
  21431. "type": "object"
  21432. }
  21433. },
  21434. "required": ["command"],
  21435. "additionalProperties": false
  21436. }
  21437. ]
  21438. }
  21439. }
  21440. ],
  21441. "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."
  21442. },
  21443. "instructions": {
  21444. "type": "array",
  21445. "items": {
  21446. "type": "string"
  21447. }
  21448. },
  21449. "layout": {
  21450. "$ref": "#/components/schemas/LayoutConfig"
  21451. },
  21452. "permission": {
  21453. "$ref": "#/components/schemas/PermissionConfig"
  21454. },
  21455. "tools": {
  21456. "type": "object",
  21457. "additionalProperties": {
  21458. "type": "boolean"
  21459. }
  21460. },
  21461. "attachment": {
  21462. "$ref": "#/components/schemas/AttachmentConfig"
  21463. },
  21464. "enterprise": {
  21465. "type": "object",
  21466. "properties": {
  21467. "url": {
  21468. "type": "string"
  21469. }
  21470. },
  21471. "additionalProperties": false
  21472. },
  21473. "tool_output": {
  21474. "type": "object",
  21475. "properties": {
  21476. "max_lines": {
  21477. "type": "integer",
  21478. "exclusiveMinimum": 0
  21479. },
  21480. "max_bytes": {
  21481. "type": "integer",
  21482. "exclusiveMinimum": 0
  21483. }
  21484. },
  21485. "additionalProperties": false
  21486. },
  21487. "compaction": {
  21488. "type": "object",
  21489. "properties": {
  21490. "auto": {
  21491. "type": "boolean"
  21492. },
  21493. "prune": {
  21494. "type": "boolean"
  21495. },
  21496. "tail_turns": {
  21497. "type": "integer",
  21498. "minimum": 0
  21499. },
  21500. "preserve_recent_tokens": {
  21501. "type": "integer",
  21502. "minimum": 0
  21503. },
  21504. "reserved": {
  21505. "type": "integer",
  21506. "minimum": 0
  21507. }
  21508. },
  21509. "additionalProperties": false
  21510. },
  21511. "experimental": {
  21512. "type": "object",
  21513. "properties": {
  21514. "disable_paste_summary": {
  21515. "type": "boolean"
  21516. },
  21517. "batch_tool": {
  21518. "type": "boolean"
  21519. },
  21520. "openTelemetry": {
  21521. "type": "boolean"
  21522. },
  21523. "primary_tools": {
  21524. "type": "array",
  21525. "items": {
  21526. "type": "string"
  21527. }
  21528. },
  21529. "continue_loop_on_deny": {
  21530. "type": "boolean"
  21531. },
  21532. "mcp_timeout": {
  21533. "type": "integer",
  21534. "exclusiveMinimum": 0
  21535. },
  21536. "policies": {
  21537. "type": "array",
  21538. "items": {
  21539. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  21540. }
  21541. }
  21542. },
  21543. "additionalProperties": false
  21544. }
  21545. },
  21546. "additionalProperties": false
  21547. },
  21548. "Model": {
  21549. "type": "object",
  21550. "properties": {
  21551. "id": {
  21552. "type": "string"
  21553. },
  21554. "providerID": {
  21555. "type": "string"
  21556. },
  21557. "api": {
  21558. "type": "object",
  21559. "properties": {
  21560. "id": {
  21561. "type": "string"
  21562. },
  21563. "url": {
  21564. "type": "string"
  21565. },
  21566. "npm": {
  21567. "type": "string"
  21568. }
  21569. },
  21570. "required": ["id", "url", "npm"],
  21571. "additionalProperties": false
  21572. },
  21573. "name": {
  21574. "type": "string"
  21575. },
  21576. "family": {
  21577. "type": "string"
  21578. },
  21579. "capabilities": {
  21580. "type": "object",
  21581. "properties": {
  21582. "temperature": {
  21583. "type": "boolean"
  21584. },
  21585. "reasoning": {
  21586. "type": "boolean"
  21587. },
  21588. "attachment": {
  21589. "type": "boolean"
  21590. },
  21591. "toolcall": {
  21592. "type": "boolean"
  21593. },
  21594. "input": {
  21595. "type": "object",
  21596. "properties": {
  21597. "text": {
  21598. "type": "boolean"
  21599. },
  21600. "audio": {
  21601. "type": "boolean"
  21602. },
  21603. "image": {
  21604. "type": "boolean"
  21605. },
  21606. "video": {
  21607. "type": "boolean"
  21608. },
  21609. "pdf": {
  21610. "type": "boolean"
  21611. }
  21612. },
  21613. "required": ["text", "audio", "image", "video", "pdf"],
  21614. "additionalProperties": false
  21615. },
  21616. "output": {
  21617. "type": "object",
  21618. "properties": {
  21619. "text": {
  21620. "type": "boolean"
  21621. },
  21622. "audio": {
  21623. "type": "boolean"
  21624. },
  21625. "image": {
  21626. "type": "boolean"
  21627. },
  21628. "video": {
  21629. "type": "boolean"
  21630. },
  21631. "pdf": {
  21632. "type": "boolean"
  21633. }
  21634. },
  21635. "required": ["text", "audio", "image", "video", "pdf"],
  21636. "additionalProperties": false
  21637. },
  21638. "interleaved": {
  21639. "anyOf": [
  21640. {
  21641. "type": "boolean"
  21642. },
  21643. {
  21644. "type": "object",
  21645. "properties": {
  21646. "field": {
  21647. "type": "string",
  21648. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  21649. }
  21650. },
  21651. "required": ["field"],
  21652. "additionalProperties": false
  21653. }
  21654. ]
  21655. }
  21656. },
  21657. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21658. "additionalProperties": false
  21659. },
  21660. "cost": {
  21661. "type": "object",
  21662. "properties": {
  21663. "input": {
  21664. "type": "number"
  21665. },
  21666. "output": {
  21667. "type": "number"
  21668. },
  21669. "cache": {
  21670. "type": "object",
  21671. "properties": {
  21672. "read": {
  21673. "type": "number"
  21674. },
  21675. "write": {
  21676. "type": "number"
  21677. }
  21678. },
  21679. "required": ["read", "write"],
  21680. "additionalProperties": false
  21681. },
  21682. "tiers": {
  21683. "type": "array",
  21684. "items": {
  21685. "type": "object",
  21686. "properties": {
  21687. "input": {
  21688. "type": "number"
  21689. },
  21690. "output": {
  21691. "type": "number"
  21692. },
  21693. "cache": {
  21694. "type": "object",
  21695. "properties": {
  21696. "read": {
  21697. "type": "number"
  21698. },
  21699. "write": {
  21700. "type": "number"
  21701. }
  21702. },
  21703. "required": ["read", "write"],
  21704. "additionalProperties": false
  21705. },
  21706. "tier": {
  21707. "type": "object",
  21708. "properties": {
  21709. "type": {
  21710. "type": "string",
  21711. "enum": ["context"]
  21712. },
  21713. "size": {
  21714. "type": "number"
  21715. }
  21716. },
  21717. "required": ["type", "size"],
  21718. "additionalProperties": false
  21719. }
  21720. },
  21721. "required": ["input", "output", "cache", "tier"],
  21722. "additionalProperties": false
  21723. }
  21724. },
  21725. "experimentalOver200K": {
  21726. "type": "object",
  21727. "properties": {
  21728. "input": {
  21729. "type": "number"
  21730. },
  21731. "output": {
  21732. "type": "number"
  21733. },
  21734. "cache": {
  21735. "type": "object",
  21736. "properties": {
  21737. "read": {
  21738. "type": "number"
  21739. },
  21740. "write": {
  21741. "type": "number"
  21742. }
  21743. },
  21744. "required": ["read", "write"],
  21745. "additionalProperties": false
  21746. }
  21747. },
  21748. "required": ["input", "output", "cache"],
  21749. "additionalProperties": false
  21750. }
  21751. },
  21752. "required": ["input", "output", "cache"],
  21753. "additionalProperties": false
  21754. },
  21755. "limit": {
  21756. "type": "object",
  21757. "properties": {
  21758. "context": {
  21759. "type": "number"
  21760. },
  21761. "input": {
  21762. "type": "number"
  21763. },
  21764. "output": {
  21765. "type": "number"
  21766. }
  21767. },
  21768. "required": ["context", "output"],
  21769. "additionalProperties": false
  21770. },
  21771. "status": {
  21772. "type": "string",
  21773. "enum": ["alpha", "beta", "deprecated", "active"]
  21774. },
  21775. "options": {
  21776. "type": "object"
  21777. },
  21778. "headers": {
  21779. "type": "object",
  21780. "additionalProperties": {
  21781. "type": "string"
  21782. }
  21783. },
  21784. "release_date": {
  21785. "type": "string"
  21786. },
  21787. "variants": {
  21788. "type": "object",
  21789. "additionalProperties": {
  21790. "type": "object"
  21791. }
  21792. }
  21793. },
  21794. "required": [
  21795. "id",
  21796. "providerID",
  21797. "api",
  21798. "name",
  21799. "capabilities",
  21800. "cost",
  21801. "limit",
  21802. "status",
  21803. "options",
  21804. "headers",
  21805. "release_date"
  21806. ],
  21807. "additionalProperties": false
  21808. },
  21809. "Provider": {
  21810. "type": "object",
  21811. "properties": {
  21812. "id": {
  21813. "type": "string"
  21814. },
  21815. "name": {
  21816. "type": "string"
  21817. },
  21818. "source": {
  21819. "type": "string",
  21820. "enum": ["env", "config", "custom", "api"]
  21821. },
  21822. "env": {
  21823. "type": "array",
  21824. "items": {
  21825. "type": "string"
  21826. }
  21827. },
  21828. "key": {
  21829. "type": "string"
  21830. },
  21831. "options": {
  21832. "type": "object"
  21833. },
  21834. "models": {
  21835. "type": "object",
  21836. "additionalProperties": {
  21837. "$ref": "#/components/schemas/Model"
  21838. }
  21839. }
  21840. },
  21841. "required": ["id", "name", "source", "env", "options", "models"],
  21842. "additionalProperties": false
  21843. },
  21844. "ExperimentalCapabilities": {
  21845. "type": "object",
  21846. "properties": {
  21847. "backgroundSubagents": {
  21848. "type": "boolean"
  21849. }
  21850. },
  21851. "required": ["backgroundSubagents"],
  21852. "additionalProperties": false
  21853. },
  21854. "ConsoleState": {
  21855. "type": "object",
  21856. "properties": {
  21857. "consoleManagedProviders": {
  21858. "type": "array",
  21859. "items": {
  21860. "type": "string"
  21861. }
  21862. },
  21863. "activeOrgName": {
  21864. "type": "string"
  21865. },
  21866. "switchableOrgCount": {
  21867. "type": "integer",
  21868. "minimum": 0
  21869. }
  21870. },
  21871. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21872. "additionalProperties": false
  21873. },
  21874. "effect_HttpApiError_InternalServerError": {
  21875. "type": "object",
  21876. "properties": {
  21877. "_tag": {
  21878. "type": "string",
  21879. "enum": ["InternalServerError"]
  21880. }
  21881. },
  21882. "required": ["_tag"],
  21883. "additionalProperties": false
  21884. },
  21885. "ToolListItem": {
  21886. "type": "object",
  21887. "properties": {
  21888. "id": {
  21889. "type": "string"
  21890. },
  21891. "description": {
  21892. "type": "string"
  21893. },
  21894. "parameters": {}
  21895. },
  21896. "required": ["id", "description", "parameters"],
  21897. "additionalProperties": false
  21898. },
  21899. "ToolList": {
  21900. "type": "array",
  21901. "items": {
  21902. "$ref": "#/components/schemas/ToolListItem"
  21903. }
  21904. },
  21905. "ToolIDs": {
  21906. "type": "array",
  21907. "items": {
  21908. "type": "string"
  21909. }
  21910. },
  21911. "WorktreeError": {
  21912. "type": "object",
  21913. "properties": {
  21914. "name": {
  21915. "type": "string",
  21916. "enum": [
  21917. "WorktreeNotGitError",
  21918. "WorktreeNameGenerationFailedError",
  21919. "WorktreeCreateFailedError",
  21920. "WorktreeStartCommandFailedError",
  21921. "WorktreeRemoveFailedError",
  21922. "WorktreeResetFailedError",
  21923. "WorktreeListFailedError"
  21924. ]
  21925. },
  21926. "data": {
  21927. "type": "object",
  21928. "properties": {
  21929. "message": {
  21930. "type": "string"
  21931. }
  21932. },
  21933. "required": ["message"],
  21934. "additionalProperties": false
  21935. }
  21936. },
  21937. "required": ["name", "data"],
  21938. "additionalProperties": false
  21939. },
  21940. "WorktreeCreateInput": {
  21941. "type": "object",
  21942. "properties": {
  21943. "name": {
  21944. "type": "string"
  21945. },
  21946. "startCommand": {
  21947. "type": "string",
  21948. "description": "Additional startup script to run after the project's start command"
  21949. }
  21950. },
  21951. "additionalProperties": false
  21952. },
  21953. "Worktree": {
  21954. "type": "object",
  21955. "properties": {
  21956. "name": {
  21957. "type": "string"
  21958. },
  21959. "branch": {
  21960. "type": "string"
  21961. },
  21962. "directory": {
  21963. "type": "string"
  21964. }
  21965. },
  21966. "required": ["name", "directory"],
  21967. "additionalProperties": false
  21968. },
  21969. "WorktreeRemoveInput": {
  21970. "type": "object",
  21971. "properties": {
  21972. "directory": {
  21973. "type": "string"
  21974. }
  21975. },
  21976. "required": ["directory"],
  21977. "additionalProperties": false
  21978. },
  21979. "WorktreeResetInput": {
  21980. "type": "object",
  21981. "properties": {
  21982. "directory": {
  21983. "type": "string"
  21984. }
  21985. },
  21986. "required": ["directory"],
  21987. "additionalProperties": false
  21988. },
  21989. "ProjectSummary": {
  21990. "type": "object",
  21991. "properties": {
  21992. "id": {
  21993. "type": "string"
  21994. },
  21995. "name": {
  21996. "type": "string"
  21997. },
  21998. "worktree": {
  21999. "type": "string"
  22000. }
  22001. },
  22002. "required": ["id", "worktree"],
  22003. "additionalProperties": false
  22004. },
  22005. "GlobalSession": {
  22006. "type": "object",
  22007. "properties": {
  22008. "id": {
  22009. "type": "string",
  22010. "pattern": "^ses"
  22011. },
  22012. "slug": {
  22013. "type": "string"
  22014. },
  22015. "projectID": {
  22016. "type": "string"
  22017. },
  22018. "workspaceID": {
  22019. "type": "string",
  22020. "pattern": "^wrk"
  22021. },
  22022. "directory": {
  22023. "type": "string"
  22024. },
  22025. "path": {
  22026. "type": "string"
  22027. },
  22028. "parentID": {
  22029. "type": "string",
  22030. "pattern": "^ses"
  22031. },
  22032. "summary": {
  22033. "type": "object",
  22034. "properties": {
  22035. "additions": {
  22036. "type": "number"
  22037. },
  22038. "deletions": {
  22039. "type": "number"
  22040. },
  22041. "files": {
  22042. "type": "number"
  22043. },
  22044. "diffs": {
  22045. "type": "array",
  22046. "items": {
  22047. "$ref": "#/components/schemas/SnapshotFileDiff"
  22048. }
  22049. }
  22050. },
  22051. "required": ["additions", "deletions", "files"],
  22052. "additionalProperties": false
  22053. },
  22054. "cost": {
  22055. "type": "number"
  22056. },
  22057. "tokens": {
  22058. "type": "object",
  22059. "properties": {
  22060. "input": {
  22061. "type": "number"
  22062. },
  22063. "output": {
  22064. "type": "number"
  22065. },
  22066. "reasoning": {
  22067. "type": "number"
  22068. },
  22069. "cache": {
  22070. "type": "object",
  22071. "properties": {
  22072. "read": {
  22073. "type": "number"
  22074. },
  22075. "write": {
  22076. "type": "number"
  22077. }
  22078. },
  22079. "required": ["read", "write"],
  22080. "additionalProperties": false
  22081. }
  22082. },
  22083. "required": ["input", "output", "reasoning", "cache"],
  22084. "additionalProperties": false
  22085. },
  22086. "share": {
  22087. "type": "object",
  22088. "properties": {
  22089. "url": {
  22090. "type": "string"
  22091. }
  22092. },
  22093. "required": ["url"],
  22094. "additionalProperties": false
  22095. },
  22096. "title": {
  22097. "type": "string"
  22098. },
  22099. "agent": {
  22100. "type": "string"
  22101. },
  22102. "model": {
  22103. "type": "object",
  22104. "properties": {
  22105. "id": {
  22106. "type": "string"
  22107. },
  22108. "providerID": {
  22109. "type": "string"
  22110. },
  22111. "variant": {
  22112. "type": "string"
  22113. }
  22114. },
  22115. "required": ["id", "providerID"],
  22116. "additionalProperties": false
  22117. },
  22118. "version": {
  22119. "type": "string"
  22120. },
  22121. "metadata": {
  22122. "type": "object"
  22123. },
  22124. "time": {
  22125. "type": "object",
  22126. "properties": {
  22127. "created": {
  22128. "type": "integer",
  22129. "minimum": 0
  22130. },
  22131. "updated": {
  22132. "type": "integer",
  22133. "minimum": 0
  22134. },
  22135. "compacting": {
  22136. "type": "integer",
  22137. "minimum": 0
  22138. },
  22139. "archived": {
  22140. "type": "number"
  22141. }
  22142. },
  22143. "required": ["created", "updated"],
  22144. "additionalProperties": false
  22145. },
  22146. "permission": {
  22147. "$ref": "#/components/schemas/PermissionRuleset"
  22148. },
  22149. "revert": {
  22150. "type": "object",
  22151. "properties": {
  22152. "messageID": {
  22153. "type": "string",
  22154. "pattern": "^msg"
  22155. },
  22156. "partID": {
  22157. "type": "string",
  22158. "pattern": "^prt"
  22159. },
  22160. "snapshot": {
  22161. "type": "string"
  22162. },
  22163. "diff": {
  22164. "type": "string"
  22165. }
  22166. },
  22167. "required": ["messageID"],
  22168. "additionalProperties": false
  22169. },
  22170. "project": {
  22171. "anyOf": [
  22172. {
  22173. "$ref": "#/components/schemas/ProjectSummary"
  22174. },
  22175. {
  22176. "type": "null"
  22177. }
  22178. ]
  22179. }
  22180. },
  22181. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  22182. "additionalProperties": false
  22183. },
  22184. "McpResource": {
  22185. "type": "object",
  22186. "properties": {
  22187. "name": {
  22188. "type": "string"
  22189. },
  22190. "uri": {
  22191. "type": "string"
  22192. },
  22193. "description": {
  22194. "type": "string"
  22195. },
  22196. "mimeType": {
  22197. "type": "string"
  22198. },
  22199. "client": {
  22200. "type": "string"
  22201. }
  22202. },
  22203. "required": ["name", "uri", "client"],
  22204. "additionalProperties": false
  22205. },
  22206. "Symbol": {
  22207. "type": "object",
  22208. "properties": {
  22209. "name": {
  22210. "type": "string"
  22211. },
  22212. "kind": {
  22213. "type": "integer",
  22214. "minimum": 0
  22215. },
  22216. "location": {
  22217. "type": "object",
  22218. "properties": {
  22219. "uri": {
  22220. "type": "string"
  22221. },
  22222. "range": {
  22223. "$ref": "#/components/schemas/Range"
  22224. }
  22225. },
  22226. "required": ["uri", "range"],
  22227. "additionalProperties": false
  22228. }
  22229. },
  22230. "required": ["name", "kind", "location"],
  22231. "additionalProperties": false
  22232. },
  22233. "FileNode": {
  22234. "type": "object",
  22235. "properties": {
  22236. "name": {
  22237. "type": "string"
  22238. },
  22239. "path": {
  22240. "type": "string"
  22241. },
  22242. "absolute": {
  22243. "type": "string"
  22244. },
  22245. "type": {
  22246. "type": "string",
  22247. "enum": ["file", "directory"]
  22248. },
  22249. "ignored": {
  22250. "type": "boolean"
  22251. }
  22252. },
  22253. "required": ["name", "path", "absolute", "type", "ignored"],
  22254. "additionalProperties": false
  22255. },
  22256. "FileContent": {
  22257. "type": "object",
  22258. "properties": {
  22259. "type": {
  22260. "type": "string",
  22261. "enum": ["text", "binary"]
  22262. },
  22263. "content": {
  22264. "type": "string"
  22265. },
  22266. "diff": {
  22267. "type": "string"
  22268. },
  22269. "patch": {
  22270. "type": "object",
  22271. "properties": {
  22272. "oldFileName": {
  22273. "type": "string"
  22274. },
  22275. "newFileName": {
  22276. "type": "string"
  22277. },
  22278. "oldHeader": {
  22279. "type": "string"
  22280. },
  22281. "newHeader": {
  22282. "type": "string"
  22283. },
  22284. "hunks": {
  22285. "type": "array",
  22286. "items": {
  22287. "type": "object",
  22288. "properties": {
  22289. "oldStart": {
  22290. "type": "integer",
  22291. "minimum": 0
  22292. },
  22293. "oldLines": {
  22294. "type": "integer",
  22295. "minimum": 0
  22296. },
  22297. "newStart": {
  22298. "type": "integer",
  22299. "minimum": 0
  22300. },
  22301. "newLines": {
  22302. "type": "integer",
  22303. "minimum": 0
  22304. },
  22305. "lines": {
  22306. "type": "array",
  22307. "items": {
  22308. "type": "string"
  22309. }
  22310. }
  22311. },
  22312. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  22313. "additionalProperties": false
  22314. }
  22315. },
  22316. "index": {
  22317. "type": "string"
  22318. }
  22319. },
  22320. "required": ["oldFileName", "newFileName", "hunks"],
  22321. "additionalProperties": false
  22322. },
  22323. "encoding": {
  22324. "type": "string",
  22325. "enum": ["base64"]
  22326. },
  22327. "mimeType": {
  22328. "type": "string"
  22329. }
  22330. },
  22331. "required": ["type", "content"],
  22332. "additionalProperties": false
  22333. },
  22334. "File": {
  22335. "type": "object",
  22336. "properties": {
  22337. "path": {
  22338. "type": "string"
  22339. },
  22340. "added": {
  22341. "type": "integer",
  22342. "minimum": 0
  22343. },
  22344. "removed": {
  22345. "type": "integer",
  22346. "minimum": 0
  22347. },
  22348. "status": {
  22349. "type": "string",
  22350. "enum": ["added", "deleted", "modified"]
  22351. }
  22352. },
  22353. "required": ["path", "added", "removed", "status"],
  22354. "additionalProperties": false
  22355. },
  22356. "Path": {
  22357. "type": "object",
  22358. "properties": {
  22359. "home": {
  22360. "type": "string"
  22361. },
  22362. "state": {
  22363. "type": "string"
  22364. },
  22365. "config": {
  22366. "type": "string"
  22367. },
  22368. "worktree": {
  22369. "type": "string"
  22370. },
  22371. "directory": {
  22372. "type": "string"
  22373. }
  22374. },
  22375. "required": ["home", "state", "config", "worktree", "directory"],
  22376. "additionalProperties": false
  22377. },
  22378. "VcsInfo": {
  22379. "type": "object",
  22380. "properties": {
  22381. "branch": {
  22382. "type": "string"
  22383. },
  22384. "default_branch": {
  22385. "type": "string"
  22386. }
  22387. },
  22388. "additionalProperties": false
  22389. },
  22390. "VcsFileStatus": {
  22391. "type": "object",
  22392. "properties": {
  22393. "file": {
  22394. "type": "string"
  22395. },
  22396. "additions": {
  22397. "type": "number"
  22398. },
  22399. "deletions": {
  22400. "type": "number"
  22401. },
  22402. "status": {
  22403. "type": "string",
  22404. "enum": ["added", "deleted", "modified"]
  22405. }
  22406. },
  22407. "required": ["file", "additions", "deletions", "status"],
  22408. "additionalProperties": false
  22409. },
  22410. "VcsFileDiff": {
  22411. "type": "object",
  22412. "properties": {
  22413. "file": {
  22414. "type": "string"
  22415. },
  22416. "patch": {
  22417. "type": "string"
  22418. },
  22419. "additions": {
  22420. "type": "number"
  22421. },
  22422. "deletions": {
  22423. "type": "number"
  22424. },
  22425. "status": {
  22426. "type": "string",
  22427. "enum": ["added", "deleted", "modified"]
  22428. }
  22429. },
  22430. "required": ["file", "additions", "deletions"],
  22431. "additionalProperties": false
  22432. },
  22433. "VcsApplyError": {
  22434. "type": "object",
  22435. "properties": {
  22436. "name": {
  22437. "type": "string",
  22438. "enum": ["VcsApplyError"]
  22439. },
  22440. "data": {
  22441. "type": "object",
  22442. "properties": {
  22443. "message": {
  22444. "type": "string"
  22445. },
  22446. "reason": {
  22447. "type": "string",
  22448. "enum": ["non-git", "not-clean"]
  22449. }
  22450. },
  22451. "required": ["message", "reason"],
  22452. "additionalProperties": false
  22453. }
  22454. },
  22455. "required": ["name", "data"],
  22456. "additionalProperties": false
  22457. },
  22458. "Command": {
  22459. "type": "object",
  22460. "properties": {
  22461. "name": {
  22462. "type": "string"
  22463. },
  22464. "description": {
  22465. "type": "string"
  22466. },
  22467. "agent": {
  22468. "type": "string"
  22469. },
  22470. "model": {
  22471. "type": "string"
  22472. },
  22473. "source": {
  22474. "type": "string",
  22475. "enum": ["command", "mcp", "skill"]
  22476. },
  22477. "template": {
  22478. "type": "string"
  22479. },
  22480. "subtask": {
  22481. "type": "boolean"
  22482. },
  22483. "hints": {
  22484. "type": "array",
  22485. "items": {
  22486. "type": "string"
  22487. }
  22488. }
  22489. },
  22490. "required": ["name", "template", "hints"],
  22491. "additionalProperties": false
  22492. },
  22493. "Agent": {
  22494. "type": "object",
  22495. "properties": {
  22496. "name": {
  22497. "type": "string"
  22498. },
  22499. "description": {
  22500. "type": "string"
  22501. },
  22502. "mode": {
  22503. "type": "string",
  22504. "enum": ["subagent", "primary", "all"]
  22505. },
  22506. "native": {
  22507. "type": "boolean"
  22508. },
  22509. "hidden": {
  22510. "type": "boolean"
  22511. },
  22512. "topP": {
  22513. "type": "number"
  22514. },
  22515. "temperature": {
  22516. "type": "number"
  22517. },
  22518. "color": {
  22519. "type": "string"
  22520. },
  22521. "permission": {
  22522. "$ref": "#/components/schemas/PermissionRuleset"
  22523. },
  22524. "model": {
  22525. "type": "object",
  22526. "properties": {
  22527. "modelID": {
  22528. "type": "string"
  22529. },
  22530. "providerID": {
  22531. "type": "string"
  22532. }
  22533. },
  22534. "required": ["modelID", "providerID"],
  22535. "additionalProperties": false
  22536. },
  22537. "variant": {
  22538. "type": "string"
  22539. },
  22540. "prompt": {
  22541. "type": "string"
  22542. },
  22543. "options": {
  22544. "type": "object"
  22545. },
  22546. "steps": {
  22547. "type": "number"
  22548. }
  22549. },
  22550. "required": ["name", "mode", "permission", "options"],
  22551. "additionalProperties": false
  22552. },
  22553. "LSPStatus": {
  22554. "type": "object",
  22555. "properties": {
  22556. "id": {
  22557. "type": "string"
  22558. },
  22559. "name": {
  22560. "type": "string"
  22561. },
  22562. "root": {
  22563. "type": "string"
  22564. },
  22565. "status": {
  22566. "type": "string",
  22567. "enum": ["connected", "error"]
  22568. }
  22569. },
  22570. "required": ["id", "name", "root", "status"],
  22571. "additionalProperties": false
  22572. },
  22573. "FormatterStatus": {
  22574. "type": "object",
  22575. "properties": {
  22576. "name": {
  22577. "type": "string"
  22578. },
  22579. "extensions": {
  22580. "type": "array",
  22581. "items": {
  22582. "type": "string"
  22583. }
  22584. },
  22585. "enabled": {
  22586. "type": "boolean"
  22587. }
  22588. },
  22589. "required": ["name", "extensions", "enabled"],
  22590. "additionalProperties": false
  22591. },
  22592. "MCPStatusConnected": {
  22593. "type": "object",
  22594. "properties": {
  22595. "status": {
  22596. "type": "string",
  22597. "enum": ["connected"]
  22598. }
  22599. },
  22600. "required": ["status"],
  22601. "additionalProperties": false
  22602. },
  22603. "MCPStatusDisabled": {
  22604. "type": "object",
  22605. "properties": {
  22606. "status": {
  22607. "type": "string",
  22608. "enum": ["disabled"]
  22609. }
  22610. },
  22611. "required": ["status"],
  22612. "additionalProperties": false
  22613. },
  22614. "MCPStatusFailed": {
  22615. "type": "object",
  22616. "properties": {
  22617. "status": {
  22618. "type": "string",
  22619. "enum": ["failed"]
  22620. },
  22621. "error": {
  22622. "type": "string"
  22623. }
  22624. },
  22625. "required": ["status", "error"],
  22626. "additionalProperties": false
  22627. },
  22628. "MCPStatusNeedsAuth": {
  22629. "type": "object",
  22630. "properties": {
  22631. "status": {
  22632. "type": "string",
  22633. "enum": ["needs_auth"]
  22634. }
  22635. },
  22636. "required": ["status"],
  22637. "additionalProperties": false
  22638. },
  22639. "MCPStatusNeedsClientRegistration": {
  22640. "type": "object",
  22641. "properties": {
  22642. "status": {
  22643. "type": "string",
  22644. "enum": ["needs_client_registration"]
  22645. },
  22646. "error": {
  22647. "type": "string"
  22648. }
  22649. },
  22650. "required": ["status", "error"],
  22651. "additionalProperties": false
  22652. },
  22653. "MCPStatus": {
  22654. "anyOf": [
  22655. {
  22656. "$ref": "#/components/schemas/MCPStatusConnected"
  22657. },
  22658. {
  22659. "$ref": "#/components/schemas/MCPStatusDisabled"
  22660. },
  22661. {
  22662. "$ref": "#/components/schemas/MCPStatusFailed"
  22663. },
  22664. {
  22665. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22666. },
  22667. {
  22668. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22669. }
  22670. ]
  22671. },
  22672. "McpUnsupportedOAuthError": {
  22673. "type": "object",
  22674. "properties": {
  22675. "error": {
  22676. "type": "string"
  22677. }
  22678. },
  22679. "required": ["error"],
  22680. "additionalProperties": false
  22681. },
  22682. "McpServerNotFoundError": {
  22683. "type": "object",
  22684. "properties": {
  22685. "_tag": {
  22686. "type": "string",
  22687. "enum": ["McpServerNotFoundError"]
  22688. },
  22689. "name": {
  22690. "type": "string"
  22691. },
  22692. "message": {
  22693. "type": "string"
  22694. }
  22695. },
  22696. "required": ["_tag", "name", "message"],
  22697. "additionalProperties": false
  22698. },
  22699. "Project": {
  22700. "type": "object",
  22701. "properties": {
  22702. "id": {
  22703. "type": "string"
  22704. },
  22705. "worktree": {
  22706. "type": "string"
  22707. },
  22708. "vcs": {
  22709. "$ref": "#/components/schemas/ProjectVcs"
  22710. },
  22711. "name": {
  22712. "type": "string"
  22713. },
  22714. "icon": {
  22715. "$ref": "#/components/schemas/ProjectIcon"
  22716. },
  22717. "commands": {
  22718. "$ref": "#/components/schemas/ProjectCommands"
  22719. },
  22720. "time": {
  22721. "$ref": "#/components/schemas/ProjectTime"
  22722. },
  22723. "sandboxes": {
  22724. "type": "array",
  22725. "items": {
  22726. "type": "string"
  22727. }
  22728. }
  22729. },
  22730. "required": ["id", "worktree", "time", "sandboxes"],
  22731. "additionalProperties": false
  22732. },
  22733. "ProjectNotFoundError": {
  22734. "type": "object",
  22735. "properties": {
  22736. "_tag": {
  22737. "type": "string",
  22738. "enum": ["ProjectNotFoundError"]
  22739. },
  22740. "projectID": {
  22741. "type": "string"
  22742. },
  22743. "message": {
  22744. "type": "string"
  22745. }
  22746. },
  22747. "required": ["_tag", "projectID", "message"],
  22748. "additionalProperties": false
  22749. },
  22750. "PtyNotFoundError": {
  22751. "type": "object",
  22752. "properties": {
  22753. "_tag": {
  22754. "type": "string",
  22755. "enum": ["PtyNotFoundError"]
  22756. },
  22757. "ptyID": {
  22758. "type": "string"
  22759. },
  22760. "message": {
  22761. "type": "string"
  22762. }
  22763. },
  22764. "required": ["_tag", "ptyID", "message"],
  22765. "additionalProperties": false
  22766. },
  22767. "PtyForbiddenError": {
  22768. "type": "object",
  22769. "properties": {
  22770. "_tag": {
  22771. "type": "string",
  22772. "enum": ["PtyForbiddenError"]
  22773. },
  22774. "message": {
  22775. "type": "string"
  22776. }
  22777. },
  22778. "required": ["_tag", "message"],
  22779. "additionalProperties": false
  22780. },
  22781. "QuestionRequest": {
  22782. "type": "object",
  22783. "properties": {
  22784. "id": {
  22785. "type": "string",
  22786. "pattern": "^que"
  22787. },
  22788. "sessionID": {
  22789. "type": "string",
  22790. "pattern": "^ses"
  22791. },
  22792. "questions": {
  22793. "type": "array",
  22794. "items": {
  22795. "$ref": "#/components/schemas/QuestionInfo"
  22796. },
  22797. "description": "Questions to ask"
  22798. },
  22799. "tool": {
  22800. "$ref": "#/components/schemas/QuestionTool"
  22801. }
  22802. },
  22803. "required": ["id", "sessionID", "questions"],
  22804. "additionalProperties": false
  22805. },
  22806. "QuestionNotFoundError": {
  22807. "type": "object",
  22808. "properties": {
  22809. "_tag": {
  22810. "type": "string",
  22811. "enum": ["QuestionNotFoundError"]
  22812. },
  22813. "requestID": {
  22814. "type": "string"
  22815. },
  22816. "message": {
  22817. "type": "string"
  22818. }
  22819. },
  22820. "required": ["_tag", "requestID", "message"],
  22821. "additionalProperties": false
  22822. },
  22823. "PermissionRequest": {
  22824. "type": "object",
  22825. "properties": {
  22826. "id": {
  22827. "type": "string",
  22828. "pattern": "^per"
  22829. },
  22830. "sessionID": {
  22831. "type": "string",
  22832. "pattern": "^ses"
  22833. },
  22834. "permission": {
  22835. "type": "string"
  22836. },
  22837. "patterns": {
  22838. "type": "array",
  22839. "items": {
  22840. "type": "string"
  22841. }
  22842. },
  22843. "metadata": {
  22844. "type": "object"
  22845. },
  22846. "always": {
  22847. "type": "array",
  22848. "items": {
  22849. "type": "string"
  22850. }
  22851. },
  22852. "tool": {
  22853. "type": "object",
  22854. "properties": {
  22855. "messageID": {
  22856. "type": "string"
  22857. },
  22858. "callID": {
  22859. "type": "string"
  22860. }
  22861. },
  22862. "required": ["messageID", "callID"],
  22863. "additionalProperties": false
  22864. }
  22865. },
  22866. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22867. "additionalProperties": false
  22868. },
  22869. "PermissionNotFoundError": {
  22870. "type": "object",
  22871. "properties": {
  22872. "_tag": {
  22873. "type": "string",
  22874. "enum": ["PermissionNotFoundError"]
  22875. },
  22876. "requestID": {
  22877. "type": "string"
  22878. },
  22879. "message": {
  22880. "type": "string"
  22881. }
  22882. },
  22883. "required": ["_tag", "requestID", "message"],
  22884. "additionalProperties": false
  22885. },
  22886. "ProviderAuthMethod": {
  22887. "type": "object",
  22888. "properties": {
  22889. "type": {
  22890. "type": "string",
  22891. "enum": ["oauth", "api"]
  22892. },
  22893. "label": {
  22894. "type": "string"
  22895. },
  22896. "prompts": {
  22897. "type": "array",
  22898. "items": {
  22899. "anyOf": [
  22900. {
  22901. "type": "object",
  22902. "properties": {
  22903. "type": {
  22904. "type": "string",
  22905. "enum": ["text"]
  22906. },
  22907. "key": {
  22908. "type": "string"
  22909. },
  22910. "message": {
  22911. "type": "string"
  22912. },
  22913. "placeholder": {
  22914. "type": "string"
  22915. },
  22916. "when": {
  22917. "type": "object",
  22918. "properties": {
  22919. "key": {
  22920. "type": "string"
  22921. },
  22922. "op": {
  22923. "type": "string",
  22924. "enum": ["eq", "neq"]
  22925. },
  22926. "value": {
  22927. "type": "string"
  22928. }
  22929. },
  22930. "required": ["key", "op", "value"],
  22931. "additionalProperties": false
  22932. }
  22933. },
  22934. "required": ["type", "key", "message"],
  22935. "additionalProperties": false
  22936. },
  22937. {
  22938. "type": "object",
  22939. "properties": {
  22940. "type": {
  22941. "type": "string",
  22942. "enum": ["select"]
  22943. },
  22944. "key": {
  22945. "type": "string"
  22946. },
  22947. "message": {
  22948. "type": "string"
  22949. },
  22950. "options": {
  22951. "type": "array",
  22952. "items": {
  22953. "type": "object",
  22954. "properties": {
  22955. "label": {
  22956. "type": "string"
  22957. },
  22958. "value": {
  22959. "type": "string"
  22960. },
  22961. "hint": {
  22962. "type": "string"
  22963. }
  22964. },
  22965. "required": ["label", "value"],
  22966. "additionalProperties": false
  22967. }
  22968. },
  22969. "when": {
  22970. "type": "object",
  22971. "properties": {
  22972. "key": {
  22973. "type": "string"
  22974. },
  22975. "op": {
  22976. "type": "string",
  22977. "enum": ["eq", "neq"]
  22978. },
  22979. "value": {
  22980. "type": "string"
  22981. }
  22982. },
  22983. "required": ["key", "op", "value"],
  22984. "additionalProperties": false
  22985. }
  22986. },
  22987. "required": ["type", "key", "message", "options"],
  22988. "additionalProperties": false
  22989. }
  22990. ]
  22991. }
  22992. }
  22993. },
  22994. "required": ["type", "label"],
  22995. "additionalProperties": false
  22996. },
  22997. "ProviderAuthAuthorization": {
  22998. "type": "object",
  22999. "properties": {
  23000. "url": {
  23001. "type": "string"
  23002. },
  23003. "method": {
  23004. "type": "string",
  23005. "enum": ["auto", "code"]
  23006. },
  23007. "instructions": {
  23008. "type": "string"
  23009. }
  23010. },
  23011. "required": ["url", "method", "instructions"],
  23012. "additionalProperties": false
  23013. },
  23014. "ProviderAuthError1": {
  23015. "type": "object",
  23016. "properties": {
  23017. "name": {
  23018. "type": "string",
  23019. "enum": [
  23020. "BadRequest",
  23021. "ProviderAuthOauthMissing",
  23022. "ProviderAuthOauthCodeMissing",
  23023. "ProviderAuthOauthCallbackFailed",
  23024. "ProviderAuthValidationFailed"
  23025. ]
  23026. },
  23027. "data": {
  23028. "type": "object",
  23029. "properties": {
  23030. "providerID": {
  23031. "type": "string"
  23032. },
  23033. "field": {
  23034. "type": "string"
  23035. },
  23036. "message": {
  23037. "type": "string"
  23038. },
  23039. "kind": {
  23040. "type": "string"
  23041. }
  23042. },
  23043. "additionalProperties": false
  23044. }
  23045. },
  23046. "required": ["name", "data"],
  23047. "additionalProperties": false
  23048. },
  23049. "NotFoundError": {
  23050. "type": "object",
  23051. "required": ["name", "data"],
  23052. "properties": {
  23053. "name": {
  23054. "type": "string",
  23055. "enum": ["NotFoundError"]
  23056. },
  23057. "data": {
  23058. "type": "object",
  23059. "required": ["message"],
  23060. "properties": {
  23061. "message": {
  23062. "type": "string"
  23063. }
  23064. }
  23065. }
  23066. }
  23067. },
  23068. "TextPartInput": {
  23069. "type": "object",
  23070. "properties": {
  23071. "id": {
  23072. "type": "string",
  23073. "pattern": "^prt"
  23074. },
  23075. "type": {
  23076. "type": "string",
  23077. "enum": ["text"]
  23078. },
  23079. "text": {
  23080. "type": "string"
  23081. },
  23082. "synthetic": {
  23083. "type": "boolean"
  23084. },
  23085. "ignored": {
  23086. "type": "boolean"
  23087. },
  23088. "time": {
  23089. "type": "object",
  23090. "properties": {
  23091. "start": {
  23092. "type": "integer",
  23093. "minimum": 0
  23094. },
  23095. "end": {
  23096. "type": "integer",
  23097. "minimum": 0
  23098. }
  23099. },
  23100. "required": ["start"],
  23101. "additionalProperties": false
  23102. },
  23103. "metadata": {
  23104. "type": "object"
  23105. }
  23106. },
  23107. "required": ["type", "text"],
  23108. "additionalProperties": false
  23109. },
  23110. "FilePartInput": {
  23111. "type": "object",
  23112. "properties": {
  23113. "id": {
  23114. "type": "string",
  23115. "pattern": "^prt"
  23116. },
  23117. "type": {
  23118. "type": "string",
  23119. "enum": ["file"]
  23120. },
  23121. "mime": {
  23122. "type": "string"
  23123. },
  23124. "filename": {
  23125. "type": "string"
  23126. },
  23127. "url": {
  23128. "type": "string"
  23129. },
  23130. "source": {
  23131. "$ref": "#/components/schemas/FilePartSource"
  23132. }
  23133. },
  23134. "required": ["type", "mime", "url"],
  23135. "additionalProperties": false
  23136. },
  23137. "AgentPartInput": {
  23138. "type": "object",
  23139. "properties": {
  23140. "id": {
  23141. "type": "string",
  23142. "pattern": "^prt"
  23143. },
  23144. "type": {
  23145. "type": "string",
  23146. "enum": ["agent"]
  23147. },
  23148. "name": {
  23149. "type": "string"
  23150. },
  23151. "source": {
  23152. "type": "object",
  23153. "properties": {
  23154. "value": {
  23155. "type": "string"
  23156. },
  23157. "start": {
  23158. "type": "integer",
  23159. "minimum": 0
  23160. },
  23161. "end": {
  23162. "type": "integer",
  23163. "minimum": 0
  23164. }
  23165. },
  23166. "required": ["value", "start", "end"],
  23167. "additionalProperties": false
  23168. }
  23169. },
  23170. "required": ["type", "name"],
  23171. "additionalProperties": false
  23172. },
  23173. "SubtaskPartInput": {
  23174. "type": "object",
  23175. "properties": {
  23176. "id": {
  23177. "type": "string",
  23178. "pattern": "^prt"
  23179. },
  23180. "type": {
  23181. "type": "string",
  23182. "enum": ["subtask"]
  23183. },
  23184. "prompt": {
  23185. "type": "string"
  23186. },
  23187. "description": {
  23188. "type": "string"
  23189. },
  23190. "agent": {
  23191. "type": "string"
  23192. },
  23193. "model": {
  23194. "type": "object",
  23195. "properties": {
  23196. "providerID": {
  23197. "type": "string"
  23198. },
  23199. "modelID": {
  23200. "type": "string"
  23201. }
  23202. },
  23203. "required": ["providerID", "modelID"],
  23204. "additionalProperties": false
  23205. },
  23206. "command": {
  23207. "type": "string"
  23208. }
  23209. },
  23210. "required": ["type", "prompt", "description", "agent"],
  23211. "additionalProperties": false
  23212. },
  23213. "SessionBusyError": {
  23214. "type": "object",
  23215. "properties": {
  23216. "_tag": {
  23217. "type": "string",
  23218. "enum": ["SessionBusyError"]
  23219. },
  23220. "sessionID": {
  23221. "type": "string"
  23222. },
  23223. "message": {
  23224. "type": "string"
  23225. }
  23226. },
  23227. "required": ["_tag", "sessionID", "message"],
  23228. "additionalProperties": false
  23229. },
  23230. "EventTuiPromptAppend": {
  23231. "type": "object",
  23232. "properties": {
  23233. "type": {
  23234. "type": "string",
  23235. "enum": ["tui.prompt.append"]
  23236. },
  23237. "properties": {
  23238. "type": "object",
  23239. "properties": {
  23240. "text": {
  23241. "type": "string"
  23242. }
  23243. },
  23244. "required": ["text"],
  23245. "additionalProperties": false
  23246. }
  23247. },
  23248. "required": ["type", "properties"],
  23249. "additionalProperties": false
  23250. },
  23251. "EventTuiCommandExecute": {
  23252. "type": "object",
  23253. "properties": {
  23254. "type": {
  23255. "type": "string",
  23256. "enum": ["tui.command.execute"]
  23257. },
  23258. "properties": {
  23259. "type": "object",
  23260. "properties": {
  23261. "command": {
  23262. "anyOf": [
  23263. {
  23264. "type": "string",
  23265. "enum": [
  23266. "session.list",
  23267. "session.new",
  23268. "session.share",
  23269. "session.interrupt",
  23270. "session.compact",
  23271. "session.page.up",
  23272. "session.page.down",
  23273. "session.line.up",
  23274. "session.line.down",
  23275. "session.half.page.up",
  23276. "session.half.page.down",
  23277. "session.first",
  23278. "session.last",
  23279. "prompt.clear",
  23280. "prompt.submit",
  23281. "agent.cycle"
  23282. ]
  23283. },
  23284. {
  23285. "type": "string"
  23286. }
  23287. ]
  23288. }
  23289. },
  23290. "required": ["command"],
  23291. "additionalProperties": false
  23292. }
  23293. },
  23294. "required": ["type", "properties"],
  23295. "additionalProperties": false
  23296. },
  23297. "EventTuiToastShow": {
  23298. "type": "object",
  23299. "properties": {
  23300. "type": {
  23301. "type": "string",
  23302. "enum": ["tui.toast.show"]
  23303. },
  23304. "properties": {
  23305. "type": "object",
  23306. "properties": {
  23307. "title": {
  23308. "type": "string"
  23309. },
  23310. "message": {
  23311. "type": "string"
  23312. },
  23313. "variant": {
  23314. "type": "string",
  23315. "enum": ["info", "success", "warning", "error"]
  23316. },
  23317. "duration": {
  23318. "type": "integer",
  23319. "exclusiveMinimum": 0
  23320. }
  23321. },
  23322. "required": ["message", "variant"],
  23323. "additionalProperties": false
  23324. }
  23325. },
  23326. "required": ["type", "properties"],
  23327. "additionalProperties": false
  23328. },
  23329. "EventTuiSessionSelect": {
  23330. "type": "object",
  23331. "properties": {
  23332. "type": {
  23333. "type": "string",
  23334. "enum": ["tui.session.select"]
  23335. },
  23336. "properties": {
  23337. "type": "object",
  23338. "properties": {
  23339. "sessionID": {
  23340. "type": "string",
  23341. "pattern": "^ses",
  23342. "description": "Session ID to navigate to"
  23343. }
  23344. },
  23345. "required": ["sessionID"],
  23346. "additionalProperties": false
  23347. }
  23348. },
  23349. "required": ["type", "properties"],
  23350. "additionalProperties": false
  23351. },
  23352. "Workspace": {
  23353. "type": "object",
  23354. "properties": {
  23355. "id": {
  23356. "type": "string",
  23357. "pattern": "^wrk"
  23358. },
  23359. "type": {
  23360. "type": "string"
  23361. },
  23362. "name": {
  23363. "type": "string"
  23364. },
  23365. "branch": {
  23366. "anyOf": [
  23367. {
  23368. "type": "string"
  23369. },
  23370. {
  23371. "type": "null"
  23372. }
  23373. ]
  23374. },
  23375. "directory": {
  23376. "anyOf": [
  23377. {
  23378. "type": "string"
  23379. },
  23380. {
  23381. "type": "null"
  23382. }
  23383. ]
  23384. },
  23385. "extra": {
  23386. "anyOf": [
  23387. {},
  23388. {
  23389. "type": "null"
  23390. }
  23391. ]
  23392. },
  23393. "projectID": {
  23394. "type": "string"
  23395. },
  23396. "timeUsed": {
  23397. "anyOf": [
  23398. {
  23399. "type": "number"
  23400. },
  23401. {
  23402. "type": "string",
  23403. "enum": ["NaN"]
  23404. },
  23405. {
  23406. "type": "string",
  23407. "enum": ["Infinity"]
  23408. },
  23409. {
  23410. "type": "string",
  23411. "enum": ["-Infinity"]
  23412. },
  23413. {
  23414. "type": "string",
  23415. "enum": ["Infinity", "-Infinity", "NaN"]
  23416. }
  23417. ]
  23418. }
  23419. },
  23420. "required": ["id", "type", "name", "projectID", "timeUsed"],
  23421. "additionalProperties": false
  23422. },
  23423. "WorkspaceCreateError": {
  23424. "type": "object",
  23425. "properties": {
  23426. "name": {
  23427. "type": "string",
  23428. "enum": ["WorkspaceCreateError"]
  23429. },
  23430. "data": {
  23431. "type": "object",
  23432. "properties": {
  23433. "message": {
  23434. "type": "string"
  23435. }
  23436. },
  23437. "required": ["message"],
  23438. "additionalProperties": false
  23439. }
  23440. },
  23441. "required": ["name", "data"],
  23442. "additionalProperties": false
  23443. },
  23444. "WorkspaceWarpError": {
  23445. "type": "object",
  23446. "properties": {
  23447. "name": {
  23448. "type": "string",
  23449. "enum": ["WorkspaceWarpError"]
  23450. },
  23451. "data": {
  23452. "type": "object",
  23453. "properties": {
  23454. "message": {
  23455. "type": "string"
  23456. }
  23457. },
  23458. "required": ["message"],
  23459. "additionalProperties": false
  23460. }
  23461. },
  23462. "required": ["name", "data"],
  23463. "additionalProperties": false
  23464. },
  23465. "UnauthorizedError": {
  23466. "type": "object",
  23467. "properties": {
  23468. "_tag": {
  23469. "type": "string",
  23470. "enum": ["UnauthorizedError"]
  23471. },
  23472. "message": {
  23473. "type": "string"
  23474. }
  23475. },
  23476. "required": ["_tag", "message"],
  23477. "additionalProperties": false
  23478. },
  23479. "SessionsResponse": {
  23480. "type": "object",
  23481. "properties": {
  23482. "data": {
  23483. "type": "array",
  23484. "items": {
  23485. "$ref": "#/components/schemas/SessionV2Info"
  23486. }
  23487. },
  23488. "cursor": {
  23489. "type": "object",
  23490. "properties": {
  23491. "previous": {
  23492. "type": "string"
  23493. },
  23494. "next": {
  23495. "type": "string"
  23496. }
  23497. },
  23498. "additionalProperties": false
  23499. }
  23500. },
  23501. "required": ["data", "cursor"],
  23502. "additionalProperties": false
  23503. },
  23504. "InvalidCursorError": {
  23505. "type": "object",
  23506. "properties": {
  23507. "_tag": {
  23508. "type": "string",
  23509. "enum": ["InvalidCursorError"]
  23510. },
  23511. "message": {
  23512. "type": "string"
  23513. }
  23514. },
  23515. "required": ["_tag", "message"],
  23516. "additionalProperties": false
  23517. },
  23518. "SessionActive": {
  23519. "type": "object",
  23520. "properties": {
  23521. "type": {
  23522. "type": "string",
  23523. "enum": ["running"]
  23524. }
  23525. },
  23526. "required": ["type"],
  23527. "additionalProperties": false
  23528. },
  23529. "SessionNotFoundError": {
  23530. "type": "object",
  23531. "properties": {
  23532. "_tag": {
  23533. "type": "string",
  23534. "enum": ["SessionNotFoundError"]
  23535. },
  23536. "sessionID": {
  23537. "type": "string"
  23538. },
  23539. "message": {
  23540. "type": "string"
  23541. }
  23542. },
  23543. "required": ["_tag", "sessionID", "message"],
  23544. "additionalProperties": false
  23545. },
  23546. "PromptInput": {
  23547. "type": "object",
  23548. "properties": {
  23549. "text": {
  23550. "type": "string"
  23551. },
  23552. "files": {
  23553. "type": "array",
  23554. "items": {
  23555. "$ref": "#/components/schemas/PromptInputFileAttachment"
  23556. }
  23557. },
  23558. "agents": {
  23559. "type": "array",
  23560. "items": {
  23561. "$ref": "#/components/schemas/PromptAgentAttachment"
  23562. }
  23563. }
  23564. },
  23565. "required": ["text"],
  23566. "additionalProperties": false
  23567. },
  23568. "ConflictError": {
  23569. "type": "object",
  23570. "properties": {
  23571. "_tag": {
  23572. "type": "string",
  23573. "enum": ["ConflictError"]
  23574. },
  23575. "message": {
  23576. "type": "string"
  23577. },
  23578. "resource": {
  23579. "type": "string"
  23580. }
  23581. },
  23582. "required": ["_tag", "message"],
  23583. "additionalProperties": false
  23584. },
  23585. "ServiceUnavailableError": {
  23586. "type": "object",
  23587. "properties": {
  23588. "_tag": {
  23589. "type": "string",
  23590. "enum": ["ServiceUnavailableError"]
  23591. },
  23592. "message": {
  23593. "type": "string"
  23594. },
  23595. "service": {
  23596. "type": "string"
  23597. }
  23598. },
  23599. "required": ["_tag", "message"],
  23600. "additionalProperties": false
  23601. },
  23602. "MessageNotFoundError": {
  23603. "type": "object",
  23604. "properties": {
  23605. "_tag": {
  23606. "type": "string",
  23607. "enum": ["MessageNotFoundError"]
  23608. },
  23609. "sessionID": {
  23610. "type": "string"
  23611. },
  23612. "messageID": {
  23613. "type": "string"
  23614. },
  23615. "message": {
  23616. "type": "string"
  23617. }
  23618. },
  23619. "required": ["_tag", "sessionID", "messageID", "message"],
  23620. "additionalProperties": false
  23621. },
  23622. "UnknownError1": {
  23623. "type": "object",
  23624. "properties": {
  23625. "_tag": {
  23626. "type": "string",
  23627. "enum": ["UnknownError"]
  23628. },
  23629. "message": {
  23630. "type": "string"
  23631. },
  23632. "ref": {
  23633. "type": "string"
  23634. }
  23635. },
  23636. "required": ["_tag", "message"],
  23637. "additionalProperties": false
  23638. },
  23639. "SessionDurableEvent": {
  23640. "oneOf": [
  23641. {
  23642. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  23643. },
  23644. {
  23645. "$ref": "#/components/schemas/SessionNextModelSwitched"
  23646. },
  23647. {
  23648. "$ref": "#/components/schemas/SessionNextMoved"
  23649. },
  23650. {
  23651. "$ref": "#/components/schemas/SessionNextPrompted"
  23652. },
  23653. {
  23654. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  23655. },
  23656. {
  23657. "$ref": "#/components/schemas/SessionNextContextUpdated"
  23658. },
  23659. {
  23660. "$ref": "#/components/schemas/SessionNextSynthetic"
  23661. },
  23662. {
  23663. "$ref": "#/components/schemas/SessionNextShellStarted"
  23664. },
  23665. {
  23666. "$ref": "#/components/schemas/SessionNextShellEnded"
  23667. },
  23668. {
  23669. "$ref": "#/components/schemas/SessionNextStepStarted"
  23670. },
  23671. {
  23672. "$ref": "#/components/schemas/SessionNextStepEnded"
  23673. },
  23674. {
  23675. "$ref": "#/components/schemas/SessionNextStepFailed"
  23676. },
  23677. {
  23678. "$ref": "#/components/schemas/SessionNextTextStarted"
  23679. },
  23680. {
  23681. "$ref": "#/components/schemas/SessionNextTextEnded"
  23682. },
  23683. {
  23684. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  23685. },
  23686. {
  23687. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  23688. },
  23689. {
  23690. "$ref": "#/components/schemas/SessionNextToolCalled"
  23691. },
  23692. {
  23693. "$ref": "#/components/schemas/SessionNextToolProgress"
  23694. },
  23695. {
  23696. "$ref": "#/components/schemas/SessionNextToolSuccess"
  23697. },
  23698. {
  23699. "$ref": "#/components/schemas/SessionNextToolFailed"
  23700. },
  23701. {
  23702. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  23703. },
  23704. {
  23705. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  23706. },
  23707. {
  23708. "$ref": "#/components/schemas/SessionNextRetried"
  23709. },
  23710. {
  23711. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  23712. },
  23713. {
  23714. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  23715. },
  23716. {
  23717. "$ref": "#/components/schemas/SessionNextRevertStaged"
  23718. },
  23719. {
  23720. "$ref": "#/components/schemas/SessionNextRevertCleared"
  23721. },
  23722. {
  23723. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  23724. }
  23725. ]
  23726. },
  23727. "SessionHistory": {
  23728. "type": "object",
  23729. "properties": {
  23730. "data": {
  23731. "type": "array",
  23732. "items": {
  23733. "$ref": "#/components/schemas/SessionDurableEvent"
  23734. }
  23735. },
  23736. "hasMore": {
  23737. "type": "boolean"
  23738. }
  23739. },
  23740. "required": ["data", "hasMore"],
  23741. "additionalProperties": false
  23742. },
  23743. "SessionDurableEventStream": {
  23744. "type": "string",
  23745. "contentSchema": {
  23746. "$ref": "#/components/schemas/SessionDurableEvent"
  23747. },
  23748. "contentMediaType": "application/json"
  23749. },
  23750. "SessionMessagesResponse": {
  23751. "type": "object",
  23752. "properties": {
  23753. "data": {
  23754. "type": "array",
  23755. "items": {
  23756. "$ref": "#/components/schemas/SessionMessage"
  23757. }
  23758. },
  23759. "cursor": {
  23760. "type": "object",
  23761. "properties": {
  23762. "previous": {
  23763. "type": "string"
  23764. },
  23765. "next": {
  23766. "type": "string"
  23767. }
  23768. },
  23769. "additionalProperties": false
  23770. }
  23771. },
  23772. "required": ["data", "cursor"],
  23773. "additionalProperties": false
  23774. },
  23775. "ProviderNotFoundError": {
  23776. "type": "object",
  23777. "properties": {
  23778. "_tag": {
  23779. "type": "string",
  23780. "enum": ["ProviderNotFoundError"]
  23781. },
  23782. "providerID": {
  23783. "type": "string"
  23784. },
  23785. "message": {
  23786. "type": "string"
  23787. }
  23788. },
  23789. "required": ["_tag", "providerID", "message"],
  23790. "additionalProperties": false
  23791. },
  23792. "OutputFormat1": {
  23793. "anyOf": [
  23794. {
  23795. "type": "object",
  23796. "properties": {
  23797. "type": {
  23798. "type": "string",
  23799. "enum": ["text"]
  23800. }
  23801. },
  23802. "required": ["type"],
  23803. "additionalProperties": false
  23804. },
  23805. {
  23806. "type": "object",
  23807. "properties": {
  23808. "type": {
  23809. "type": "string",
  23810. "enum": ["json_schema"]
  23811. },
  23812. "schema": {
  23813. "$ref": "#/components/schemas/JSONSchema"
  23814. },
  23815. "retryCount": {
  23816. "type": "integer",
  23817. "minimum": 0
  23818. }
  23819. },
  23820. "required": ["type", "schema"],
  23821. "additionalProperties": false
  23822. }
  23823. ]
  23824. },
  23825. "session.status": {
  23826. "type": "object",
  23827. "properties": {
  23828. "id": {
  23829. "type": "string",
  23830. "pattern": "^evt_"
  23831. },
  23832. "metadata": {
  23833. "type": "object"
  23834. },
  23835. "type": {
  23836. "type": "string",
  23837. "enum": ["session.status"]
  23838. },
  23839. "durable": {
  23840. "type": "object",
  23841. "properties": {
  23842. "aggregateID": {
  23843. "type": "string"
  23844. },
  23845. "seq": {
  23846. "type": "integer"
  23847. },
  23848. "version": {
  23849. "type": "integer"
  23850. }
  23851. },
  23852. "required": ["aggregateID", "seq", "version"],
  23853. "additionalProperties": false
  23854. },
  23855. "location": {
  23856. "$ref": "#/components/schemas/LocationRef"
  23857. },
  23858. "data": {
  23859. "type": "object",
  23860. "properties": {
  23861. "sessionID": {
  23862. "type": "string",
  23863. "pattern": "^ses"
  23864. },
  23865. "status": {
  23866. "$ref": "#/components/schemas/SessionStatus"
  23867. }
  23868. },
  23869. "required": ["sessionID", "status"],
  23870. "additionalProperties": false
  23871. }
  23872. },
  23873. "required": ["id", "type", "data"],
  23874. "additionalProperties": false
  23875. },
  23876. "question.replied": {
  23877. "type": "object",
  23878. "properties": {
  23879. "id": {
  23880. "type": "string",
  23881. "pattern": "^evt_"
  23882. },
  23883. "metadata": {
  23884. "type": "object"
  23885. },
  23886. "type": {
  23887. "type": "string",
  23888. "enum": ["question.replied"]
  23889. },
  23890. "durable": {
  23891. "type": "object",
  23892. "properties": {
  23893. "aggregateID": {
  23894. "type": "string"
  23895. },
  23896. "seq": {
  23897. "type": "integer"
  23898. },
  23899. "version": {
  23900. "type": "integer"
  23901. }
  23902. },
  23903. "required": ["aggregateID", "seq", "version"],
  23904. "additionalProperties": false
  23905. },
  23906. "location": {
  23907. "$ref": "#/components/schemas/LocationRef"
  23908. },
  23909. "data": {
  23910. "type": "object",
  23911. "properties": {
  23912. "sessionID": {
  23913. "type": "string",
  23914. "pattern": "^ses"
  23915. },
  23916. "requestID": {
  23917. "type": "string",
  23918. "pattern": "^que"
  23919. },
  23920. "answers": {
  23921. "type": "array",
  23922. "items": {
  23923. "$ref": "#/components/schemas/QuestionAnswer"
  23924. }
  23925. }
  23926. },
  23927. "required": ["sessionID", "requestID", "answers"],
  23928. "additionalProperties": false
  23929. }
  23930. },
  23931. "required": ["id", "type", "data"],
  23932. "additionalProperties": false
  23933. },
  23934. "question.rejected": {
  23935. "type": "object",
  23936. "properties": {
  23937. "id": {
  23938. "type": "string",
  23939. "pattern": "^evt_"
  23940. },
  23941. "metadata": {
  23942. "type": "object"
  23943. },
  23944. "type": {
  23945. "type": "string",
  23946. "enum": ["question.rejected"]
  23947. },
  23948. "durable": {
  23949. "type": "object",
  23950. "properties": {
  23951. "aggregateID": {
  23952. "type": "string"
  23953. },
  23954. "seq": {
  23955. "type": "integer"
  23956. },
  23957. "version": {
  23958. "type": "integer"
  23959. }
  23960. },
  23961. "required": ["aggregateID", "seq", "version"],
  23962. "additionalProperties": false
  23963. },
  23964. "location": {
  23965. "$ref": "#/components/schemas/LocationRef"
  23966. },
  23967. "data": {
  23968. "type": "object",
  23969. "properties": {
  23970. "sessionID": {
  23971. "type": "string",
  23972. "pattern": "^ses"
  23973. },
  23974. "requestID": {
  23975. "type": "string",
  23976. "pattern": "^que"
  23977. }
  23978. },
  23979. "required": ["sessionID", "requestID"],
  23980. "additionalProperties": false
  23981. }
  23982. },
  23983. "required": ["id", "type", "data"],
  23984. "additionalProperties": false
  23985. },
  23986. "V2Event": {
  23987. "anyOf": [
  23988. {
  23989. "$ref": "#/components/schemas/Models-devRefreshed"
  23990. },
  23991. {
  23992. "$ref": "#/components/schemas/IntegrationUpdated"
  23993. },
  23994. {
  23995. "$ref": "#/components/schemas/IntegrationConnectionUpdated"
  23996. },
  23997. {
  23998. "$ref": "#/components/schemas/CatalogUpdated"
  23999. },
  24000. {
  24001. "$ref": "#/components/schemas/SessionCreated"
  24002. },
  24003. {
  24004. "$ref": "#/components/schemas/SessionUpdated"
  24005. },
  24006. {
  24007. "$ref": "#/components/schemas/SessionDeleted"
  24008. },
  24009. {
  24010. "$ref": "#/components/schemas/MessageUpdated"
  24011. },
  24012. {
  24013. "$ref": "#/components/schemas/MessageRemoved"
  24014. },
  24015. {
  24016. "$ref": "#/components/schemas/MessagePartUpdated"
  24017. },
  24018. {
  24019. "$ref": "#/components/schemas/MessagePartRemoved"
  24020. },
  24021. {
  24022. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  24023. },
  24024. {
  24025. "$ref": "#/components/schemas/SessionNextModelSwitched"
  24026. },
  24027. {
  24028. "$ref": "#/components/schemas/SessionNextMoved"
  24029. },
  24030. {
  24031. "$ref": "#/components/schemas/SessionNextPrompted"
  24032. },
  24033. {
  24034. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  24035. },
  24036. {
  24037. "$ref": "#/components/schemas/SessionNextContextUpdated"
  24038. },
  24039. {
  24040. "$ref": "#/components/schemas/SessionNextSynthetic"
  24041. },
  24042. {
  24043. "$ref": "#/components/schemas/SessionNextShellStarted"
  24044. },
  24045. {
  24046. "$ref": "#/components/schemas/SessionNextShellEnded"
  24047. },
  24048. {
  24049. "$ref": "#/components/schemas/SessionNextStepStarted"
  24050. },
  24051. {
  24052. "$ref": "#/components/schemas/SessionNextStepEnded"
  24053. },
  24054. {
  24055. "$ref": "#/components/schemas/SessionNextStepFailed"
  24056. },
  24057. {
  24058. "$ref": "#/components/schemas/SessionNextTextStarted"
  24059. },
  24060. {
  24061. "$ref": "#/components/schemas/SessionNextTextDelta"
  24062. },
  24063. {
  24064. "$ref": "#/components/schemas/SessionNextTextEnded"
  24065. },
  24066. {
  24067. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  24068. },
  24069. {
  24070. "$ref": "#/components/schemas/SessionNextReasoningDelta"
  24071. },
  24072. {
  24073. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  24074. },
  24075. {
  24076. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  24077. },
  24078. {
  24079. "$ref": "#/components/schemas/SessionNextToolInputDelta"
  24080. },
  24081. {
  24082. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  24083. },
  24084. {
  24085. "$ref": "#/components/schemas/SessionNextToolCalled"
  24086. },
  24087. {
  24088. "$ref": "#/components/schemas/SessionNextToolProgress"
  24089. },
  24090. {
  24091. "$ref": "#/components/schemas/SessionNextToolSuccess"
  24092. },
  24093. {
  24094. "$ref": "#/components/schemas/SessionNextToolFailed"
  24095. },
  24096. {
  24097. "$ref": "#/components/schemas/SessionNextRetried"
  24098. },
  24099. {
  24100. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  24101. },
  24102. {
  24103. "$ref": "#/components/schemas/SessionNextCompactionDelta"
  24104. },
  24105. {
  24106. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  24107. },
  24108. {
  24109. "$ref": "#/components/schemas/SessionNextRevertStaged"
  24110. },
  24111. {
  24112. "$ref": "#/components/schemas/SessionNextRevertCleared"
  24113. },
  24114. {
  24115. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  24116. },
  24117. {
  24118. "$ref": "#/components/schemas/MessagePartDelta"
  24119. },
  24120. {
  24121. "$ref": "#/components/schemas/SessionDiff"
  24122. },
  24123. {
  24124. "$ref": "#/components/schemas/SessionError"
  24125. },
  24126. {
  24127. "$ref": "#/components/schemas/InstallationUpdated"
  24128. },
  24129. {
  24130. "$ref": "#/components/schemas/InstallationUpdate-available"
  24131. },
  24132. {
  24133. "$ref": "#/components/schemas/FileEdited"
  24134. },
  24135. {
  24136. "$ref": "#/components/schemas/ReferenceUpdated"
  24137. },
  24138. {
  24139. "$ref": "#/components/schemas/PermissionV2Asked"
  24140. },
  24141. {
  24142. "$ref": "#/components/schemas/PermissionV2Replied"
  24143. },
  24144. {
  24145. "$ref": "#/components/schemas/PluginAdded"
  24146. },
  24147. {
  24148. "$ref": "#/components/schemas/ProjectDirectoriesUpdated"
  24149. },
  24150. {
  24151. "$ref": "#/components/schemas/FileWatcherUpdated"
  24152. },
  24153. {
  24154. "$ref": "#/components/schemas/PtyCreated"
  24155. },
  24156. {
  24157. "$ref": "#/components/schemas/PtyUpdated"
  24158. },
  24159. {
  24160. "$ref": "#/components/schemas/PtyExited"
  24161. },
  24162. {
  24163. "$ref": "#/components/schemas/PtyDeleted"
  24164. },
  24165. {
  24166. "$ref": "#/components/schemas/QuestionV2Asked"
  24167. },
  24168. {
  24169. "$ref": "#/components/schemas/QuestionV2Replied"
  24170. },
  24171. {
  24172. "$ref": "#/components/schemas/QuestionV2Rejected"
  24173. },
  24174. {
  24175. "$ref": "#/components/schemas/TodoUpdated"
  24176. },
  24177. {
  24178. "$ref": "#/components/schemas/LspUpdated"
  24179. },
  24180. {
  24181. "$ref": "#/components/schemas/PermissionAsked"
  24182. },
  24183. {
  24184. "$ref": "#/components/schemas/PermissionReplied"
  24185. },
  24186. {
  24187. "$ref": "#/components/schemas/TuiPromptAppend"
  24188. },
  24189. {
  24190. "$ref": "#/components/schemas/TuiCommandExecute"
  24191. },
  24192. {
  24193. "$ref": "#/components/schemas/TuiToastShow"
  24194. },
  24195. {
  24196. "$ref": "#/components/schemas/TuiSessionSelect"
  24197. },
  24198. {
  24199. "$ref": "#/components/schemas/McpToolsChanged"
  24200. },
  24201. {
  24202. "$ref": "#/components/schemas/McpBrowserOpenFailed"
  24203. },
  24204. {
  24205. "$ref": "#/components/schemas/CommandExecuted"
  24206. },
  24207. {
  24208. "$ref": "#/components/schemas/ProjectUpdated"
  24209. },
  24210. {
  24211. "$ref": "#/components/schemas/session.status"
  24212. },
  24213. {
  24214. "$ref": "#/components/schemas/SessionIdle"
  24215. },
  24216. {
  24217. "$ref": "#/components/schemas/QuestionAsked"
  24218. },
  24219. {
  24220. "$ref": "#/components/schemas/question.replied"
  24221. },
  24222. {
  24223. "$ref": "#/components/schemas/question.rejected"
  24224. },
  24225. {
  24226. "$ref": "#/components/schemas/SessionCompacted"
  24227. },
  24228. {
  24229. "$ref": "#/components/schemas/VcsBranchUpdated"
  24230. },
  24231. {
  24232. "$ref": "#/components/schemas/WorkspaceReady"
  24233. },
  24234. {
  24235. "$ref": "#/components/schemas/WorkspaceFailed"
  24236. },
  24237. {
  24238. "$ref": "#/components/schemas/WorkspaceStatus"
  24239. },
  24240. {
  24241. "$ref": "#/components/schemas/WorktreeReady"
  24242. },
  24243. {
  24244. "$ref": "#/components/schemas/WorktreeFailed"
  24245. },
  24246. {
  24247. "$ref": "#/components/schemas/ServerConnected"
  24248. },
  24249. {
  24250. "$ref": "#/components/schemas/GlobalDisposed"
  24251. }
  24252. ]
  24253. },
  24254. "V2EventStream": {
  24255. "type": "string",
  24256. "contentSchema": {
  24257. "$ref": "#/components/schemas/V2Event"
  24258. },
  24259. "contentMediaType": "application/json"
  24260. },
  24261. "ForbiddenError": {
  24262. "type": "object",
  24263. "properties": {
  24264. "_tag": {
  24265. "type": "string",
  24266. "enum": ["ForbiddenError"]
  24267. },
  24268. "message": {
  24269. "type": "string"
  24270. }
  24271. },
  24272. "required": ["_tag", "message"],
  24273. "additionalProperties": false
  24274. },
  24275. "ProjectCopyError": {
  24276. "type": "object",
  24277. "properties": {
  24278. "name": {
  24279. "type": "string",
  24280. "enum": ["ProjectCopyError"]
  24281. },
  24282. "data": {
  24283. "type": "object",
  24284. "properties": {
  24285. "message": {
  24286. "type": "string"
  24287. },
  24288. "forceRequired": {
  24289. "type": "boolean"
  24290. }
  24291. },
  24292. "required": ["message"],
  24293. "additionalProperties": false
  24294. }
  24295. },
  24296. "required": ["name", "data"],
  24297. "additionalProperties": false
  24298. },
  24299. "effect_HttpApiError_Forbidden": {
  24300. "type": "object",
  24301. "properties": {
  24302. "_tag": {
  24303. "type": "string",
  24304. "enum": ["Forbidden"]
  24305. }
  24306. },
  24307. "required": ["_tag"],
  24308. "additionalProperties": false
  24309. },
  24310. "Event.tui.prompt.append": {
  24311. "type": "object",
  24312. "properties": {
  24313. "id": {
  24314. "type": "string",
  24315. "pattern": "^evt_"
  24316. },
  24317. "type": {
  24318. "type": "string",
  24319. "enum": ["tui.prompt.append"]
  24320. },
  24321. "properties": {
  24322. "type": "object",
  24323. "properties": {
  24324. "text": {
  24325. "type": "string"
  24326. }
  24327. },
  24328. "required": ["text"],
  24329. "additionalProperties": false
  24330. }
  24331. },
  24332. "required": ["id", "type", "properties"],
  24333. "additionalProperties": false
  24334. },
  24335. "Event.tui.command.execute": {
  24336. "type": "object",
  24337. "properties": {
  24338. "id": {
  24339. "type": "string",
  24340. "pattern": "^evt_"
  24341. },
  24342. "type": {
  24343. "type": "string",
  24344. "enum": ["tui.command.execute"]
  24345. },
  24346. "properties": {
  24347. "type": "object",
  24348. "properties": {
  24349. "command": {
  24350. "anyOf": [
  24351. {
  24352. "type": "string",
  24353. "enum": [
  24354. "session.list",
  24355. "session.new",
  24356. "session.share",
  24357. "session.interrupt",
  24358. "session.compact",
  24359. "session.page.up",
  24360. "session.page.down",
  24361. "session.line.up",
  24362. "session.line.down",
  24363. "session.half.page.up",
  24364. "session.half.page.down",
  24365. "session.first",
  24366. "session.last",
  24367. "prompt.clear",
  24368. "prompt.submit",
  24369. "agent.cycle"
  24370. ]
  24371. },
  24372. {
  24373. "type": "string"
  24374. }
  24375. ]
  24376. }
  24377. },
  24378. "required": ["command"],
  24379. "additionalProperties": false
  24380. }
  24381. },
  24382. "required": ["id", "type", "properties"],
  24383. "additionalProperties": false
  24384. },
  24385. "Event.tui.toast.show": {
  24386. "type": "object",
  24387. "properties": {
  24388. "id": {
  24389. "type": "string",
  24390. "pattern": "^evt_"
  24391. },
  24392. "type": {
  24393. "type": "string",
  24394. "enum": ["tui.toast.show"]
  24395. },
  24396. "properties": {
  24397. "type": "object",
  24398. "properties": {
  24399. "title": {
  24400. "type": "string"
  24401. },
  24402. "message": {
  24403. "type": "string"
  24404. },
  24405. "variant": {
  24406. "type": "string",
  24407. "enum": ["info", "success", "warning", "error"]
  24408. },
  24409. "duration": {
  24410. "type": "integer",
  24411. "exclusiveMinimum": 0
  24412. }
  24413. },
  24414. "required": ["message", "variant"],
  24415. "additionalProperties": false
  24416. }
  24417. },
  24418. "required": ["id", "type", "properties"],
  24419. "additionalProperties": false
  24420. },
  24421. "Event.tui.session.select": {
  24422. "type": "object",
  24423. "properties": {
  24424. "id": {
  24425. "type": "string",
  24426. "pattern": "^evt_"
  24427. },
  24428. "type": {
  24429. "type": "string",
  24430. "enum": ["tui.session.select"]
  24431. },
  24432. "properties": {
  24433. "type": "object",
  24434. "properties": {
  24435. "sessionID": {
  24436. "type": "string",
  24437. "pattern": "^ses",
  24438. "description": "Session ID to navigate to"
  24439. }
  24440. },
  24441. "required": ["sessionID"],
  24442. "additionalProperties": false
  24443. }
  24444. },
  24445. "required": ["id", "type", "properties"],
  24446. "additionalProperties": false
  24447. },
  24448. "CredentialValue": {
  24449. "anyOf": [
  24450. {
  24451. "$ref": "#/components/schemas/CredentialOAuth"
  24452. },
  24453. {
  24454. "$ref": "#/components/schemas/CredentialKey"
  24455. }
  24456. ]
  24457. },
  24458. "IntegrationInputs": {
  24459. "type": "object",
  24460. "additionalProperties": {
  24461. "type": "string"
  24462. }
  24463. },
  24464. "IntegrationMethod": {
  24465. "anyOf": [
  24466. {
  24467. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  24468. },
  24469. {
  24470. "$ref": "#/components/schemas/IntegrationKeyMethod"
  24471. },
  24472. {
  24473. "$ref": "#/components/schemas/IntegrationEnvMethod"
  24474. }
  24475. ]
  24476. },
  24477. "IntegrationRef": {
  24478. "type": "object",
  24479. "properties": {
  24480. "id": {
  24481. "type": "string"
  24482. },
  24483. "name": {
  24484. "type": "string"
  24485. }
  24486. },
  24487. "required": ["id", "name"],
  24488. "additionalProperties": false
  24489. },
  24490. "SkillV2Source": {
  24491. "anyOf": [
  24492. {
  24493. "$ref": "#/components/schemas/SkillV2DirectorySource"
  24494. },
  24495. {
  24496. "$ref": "#/components/schemas/SkillV2UrlSource"
  24497. },
  24498. {
  24499. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  24500. }
  24501. ]
  24502. },
  24503. "MoveSessionDestination": {
  24504. "type": "object",
  24505. "properties": {
  24506. "directory": {
  24507. "type": "string"
  24508. }
  24509. },
  24510. "required": ["directory"],
  24511. "additionalProperties": false
  24512. },
  24513. "ModelRef": {
  24514. "type": "object",
  24515. "properties": {
  24516. "id": {
  24517. "type": "string"
  24518. },
  24519. "providerID": {
  24520. "type": "string"
  24521. },
  24522. "variant": {
  24523. "type": "string"
  24524. }
  24525. },
  24526. "required": ["id", "providerID"],
  24527. "additionalProperties": false
  24528. },
  24529. "LocationRef": {
  24530. "type": "object",
  24531. "properties": {
  24532. "directory": {
  24533. "type": "string"
  24534. },
  24535. "workspaceID": {
  24536. "type": "string",
  24537. "pattern": "^wrk"
  24538. }
  24539. },
  24540. "required": ["directory"],
  24541. "additionalProperties": false
  24542. },
  24543. "PromptSource": {
  24544. "type": "object",
  24545. "properties": {
  24546. "start": {
  24547. "type": "number"
  24548. },
  24549. "end": {
  24550. "type": "number"
  24551. },
  24552. "text": {
  24553. "type": "string"
  24554. }
  24555. },
  24556. "required": ["start", "end", "text"],
  24557. "additionalProperties": false
  24558. },
  24559. "PromptFileAttachment": {
  24560. "type": "object",
  24561. "properties": {
  24562. "uri": {
  24563. "type": "string"
  24564. },
  24565. "mime": {
  24566. "type": "string"
  24567. },
  24568. "name": {
  24569. "type": "string"
  24570. },
  24571. "description": {
  24572. "type": "string"
  24573. },
  24574. "source": {
  24575. "$ref": "#/components/schemas/PromptSource"
  24576. }
  24577. },
  24578. "required": ["uri", "mime"],
  24579. "additionalProperties": false
  24580. },
  24581. "PromptAgentAttachment": {
  24582. "type": "object",
  24583. "properties": {
  24584. "name": {
  24585. "type": "string"
  24586. },
  24587. "source": {
  24588. "$ref": "#/components/schemas/PromptSource"
  24589. }
  24590. },
  24591. "required": ["name"],
  24592. "additionalProperties": false
  24593. },
  24594. "SessionErrorUnknown": {
  24595. "type": "object",
  24596. "properties": {
  24597. "type": {
  24598. "type": "string",
  24599. "enum": ["unknown"]
  24600. },
  24601. "message": {
  24602. "type": "string"
  24603. }
  24604. },
  24605. "required": ["type", "message"],
  24606. "additionalProperties": false
  24607. },
  24608. "LLMProviderMetadata": {
  24609. "type": "object",
  24610. "additionalProperties": {
  24611. "type": "object"
  24612. }
  24613. },
  24614. "ToolTextContent": {
  24615. "type": "object",
  24616. "properties": {
  24617. "type": {
  24618. "type": "string",
  24619. "enum": ["text"]
  24620. },
  24621. "text": {
  24622. "type": "string"
  24623. }
  24624. },
  24625. "required": ["type", "text"],
  24626. "additionalProperties": false
  24627. },
  24628. "ToolFileContent": {
  24629. "type": "object",
  24630. "properties": {
  24631. "type": {
  24632. "type": "string",
  24633. "enum": ["file"]
  24634. },
  24635. "uri": {
  24636. "type": "string"
  24637. },
  24638. "mime": {
  24639. "type": "string"
  24640. },
  24641. "name": {
  24642. "type": "string"
  24643. }
  24644. },
  24645. "required": ["type", "uri", "mime"],
  24646. "additionalProperties": false
  24647. },
  24648. "LLMToolContent": {
  24649. "anyOf": [
  24650. {
  24651. "$ref": "#/components/schemas/ToolTextContent"
  24652. },
  24653. {
  24654. "$ref": "#/components/schemas/ToolFileContent"
  24655. }
  24656. ]
  24657. },
  24658. "SessionNextRetry_error": {
  24659. "type": "object",
  24660. "properties": {
  24661. "message": {
  24662. "type": "string"
  24663. },
  24664. "statusCode": {
  24665. "type": "number"
  24666. },
  24667. "isRetryable": {
  24668. "type": "boolean"
  24669. },
  24670. "responseHeaders": {
  24671. "type": "object",
  24672. "additionalProperties": {
  24673. "type": "string"
  24674. }
  24675. },
  24676. "responseBody": {
  24677. "type": "string"
  24678. },
  24679. "metadata": {
  24680. "type": "object",
  24681. "additionalProperties": {
  24682. "type": "string"
  24683. }
  24684. }
  24685. },
  24686. "required": ["message", "isRetryable"],
  24687. "additionalProperties": false
  24688. },
  24689. "FileDiff": {
  24690. "type": "object",
  24691. "properties": {
  24692. "path": {
  24693. "type": "string"
  24694. },
  24695. "status": {
  24696. "type": "string",
  24697. "enum": ["added", "modified", "deleted"]
  24698. },
  24699. "additions": {
  24700. "type": "integer",
  24701. "minimum": 0
  24702. },
  24703. "deletions": {
  24704. "type": "integer",
  24705. "minimum": 0
  24706. },
  24707. "patch": {
  24708. "type": "string"
  24709. }
  24710. },
  24711. "required": ["path", "status", "additions", "deletions", "patch"],
  24712. "additionalProperties": false
  24713. },
  24714. "RevertState": {
  24715. "type": "object",
  24716. "properties": {
  24717. "messageID": {
  24718. "type": "string",
  24719. "pattern": "^msg_"
  24720. },
  24721. "partID": {
  24722. "type": "string"
  24723. },
  24724. "snapshot": {
  24725. "type": "string"
  24726. },
  24727. "diff": {
  24728. "type": "string"
  24729. },
  24730. "files": {
  24731. "type": "array",
  24732. "items": {
  24733. "$ref": "#/components/schemas/FileDiff"
  24734. }
  24735. }
  24736. },
  24737. "required": ["messageID"],
  24738. "additionalProperties": false
  24739. },
  24740. "PermissionV2Source": {
  24741. "type": "object",
  24742. "properties": {
  24743. "type": {
  24744. "type": "string",
  24745. "enum": ["tool"]
  24746. },
  24747. "messageID": {
  24748. "type": "string"
  24749. },
  24750. "callID": {
  24751. "type": "string"
  24752. }
  24753. },
  24754. "required": ["type", "messageID", "callID"],
  24755. "additionalProperties": false
  24756. },
  24757. "PermissionV2Reply": {
  24758. "type": "string",
  24759. "enum": ["once", "always", "reject"]
  24760. },
  24761. "QuestionV2Option": {
  24762. "type": "object",
  24763. "properties": {
  24764. "label": {
  24765. "type": "string",
  24766. "description": "Display text (1-5 words, concise)"
  24767. },
  24768. "description": {
  24769. "type": "string",
  24770. "description": "Explanation of choice"
  24771. }
  24772. },
  24773. "required": ["label", "description"],
  24774. "additionalProperties": false
  24775. },
  24776. "QuestionV2Info": {
  24777. "type": "object",
  24778. "properties": {
  24779. "question": {
  24780. "type": "string",
  24781. "description": "Complete question"
  24782. },
  24783. "header": {
  24784. "type": "string",
  24785. "description": "Very short label (max 30 chars)"
  24786. },
  24787. "options": {
  24788. "type": "array",
  24789. "items": {
  24790. "$ref": "#/components/schemas/QuestionV2Option"
  24791. },
  24792. "description": "Available choices"
  24793. },
  24794. "multiple": {
  24795. "type": "boolean"
  24796. },
  24797. "custom": {
  24798. "type": "boolean"
  24799. }
  24800. },
  24801. "required": ["question", "header", "options"],
  24802. "additionalProperties": false
  24803. },
  24804. "QuestionV2Tool": {
  24805. "type": "object",
  24806. "properties": {
  24807. "messageID": {
  24808. "type": "string"
  24809. },
  24810. "callID": {
  24811. "type": "string"
  24812. }
  24813. },
  24814. "required": ["messageID", "callID"],
  24815. "additionalProperties": false
  24816. },
  24817. "QuestionV2Answer": {
  24818. "type": "array",
  24819. "items": {
  24820. "type": "string"
  24821. }
  24822. },
  24823. "ProjectVcs": {
  24824. "type": "string",
  24825. "enum": ["git"]
  24826. },
  24827. "ProjectIcon": {
  24828. "type": "object",
  24829. "properties": {
  24830. "url": {
  24831. "type": "string"
  24832. },
  24833. "override": {
  24834. "type": "string"
  24835. },
  24836. "color": {
  24837. "type": "string"
  24838. }
  24839. },
  24840. "additionalProperties": false
  24841. },
  24842. "ProjectCommands": {
  24843. "type": "object",
  24844. "properties": {
  24845. "start": {
  24846. "type": "string",
  24847. "description": "Startup script to run when creating a new workspace (worktree)"
  24848. }
  24849. },
  24850. "additionalProperties": false
  24851. },
  24852. "ProjectTime": {
  24853. "type": "object",
  24854. "properties": {
  24855. "created": {
  24856. "type": "integer",
  24857. "minimum": 0
  24858. },
  24859. "updated": {
  24860. "type": "integer",
  24861. "minimum": 0
  24862. },
  24863. "initialized": {
  24864. "type": "integer",
  24865. "minimum": 0
  24866. }
  24867. },
  24868. "required": ["created", "updated"],
  24869. "additionalProperties": false
  24870. },
  24871. "EventServerInstanceDisposed": {
  24872. "type": "object",
  24873. "properties": {
  24874. "id": {
  24875. "type": "string"
  24876. },
  24877. "type": {
  24878. "type": "string",
  24879. "enum": ["server.instance.disposed"]
  24880. },
  24881. "properties": {
  24882. "type": "object",
  24883. "properties": {
  24884. "directory": {
  24885. "type": "string"
  24886. }
  24887. },
  24888. "required": ["directory"],
  24889. "additionalProperties": false
  24890. }
  24891. },
  24892. "required": ["id", "type", "properties"],
  24893. "additionalProperties": false
  24894. },
  24895. "SyncEventSessionCreated": {
  24896. "type": "object",
  24897. "properties": {
  24898. "type": {
  24899. "type": "string",
  24900. "enum": ["sync"]
  24901. },
  24902. "id": {
  24903. "type": "string",
  24904. "pattern": "^evt_"
  24905. },
  24906. "syncEvent": {
  24907. "type": "object",
  24908. "properties": {
  24909. "type": {
  24910. "type": "string",
  24911. "enum": ["session.created.1"]
  24912. },
  24913. "id": {
  24914. "type": "string",
  24915. "pattern": "^evt_"
  24916. },
  24917. "seq": {
  24918. "type": "number"
  24919. },
  24920. "aggregateID": {
  24921. "type": "string"
  24922. },
  24923. "data": {
  24924. "type": "object",
  24925. "properties": {
  24926. "sessionID": {
  24927. "type": "string",
  24928. "pattern": "^ses"
  24929. },
  24930. "info": {
  24931. "$ref": "#/components/schemas/Session"
  24932. }
  24933. },
  24934. "required": ["sessionID", "info"],
  24935. "additionalProperties": false
  24936. }
  24937. },
  24938. "required": ["type", "id", "seq", "aggregateID", "data"],
  24939. "additionalProperties": false
  24940. }
  24941. },
  24942. "required": ["type", "id", "syncEvent"],
  24943. "additionalProperties": false
  24944. },
  24945. "SyncEventSessionUpdated": {
  24946. "type": "object",
  24947. "properties": {
  24948. "type": {
  24949. "type": "string",
  24950. "enum": ["sync"]
  24951. },
  24952. "id": {
  24953. "type": "string",
  24954. "pattern": "^evt_"
  24955. },
  24956. "syncEvent": {
  24957. "type": "object",
  24958. "properties": {
  24959. "type": {
  24960. "type": "string",
  24961. "enum": ["session.updated.1"]
  24962. },
  24963. "id": {
  24964. "type": "string",
  24965. "pattern": "^evt_"
  24966. },
  24967. "seq": {
  24968. "type": "number"
  24969. },
  24970. "aggregateID": {
  24971. "type": "string"
  24972. },
  24973. "data": {
  24974. "type": "object",
  24975. "properties": {
  24976. "sessionID": {
  24977. "type": "string",
  24978. "pattern": "^ses"
  24979. },
  24980. "info": {
  24981. "$ref": "#/components/schemas/Session"
  24982. }
  24983. },
  24984. "required": ["sessionID", "info"],
  24985. "additionalProperties": false
  24986. }
  24987. },
  24988. "required": ["type", "id", "seq", "aggregateID", "data"],
  24989. "additionalProperties": false
  24990. }
  24991. },
  24992. "required": ["type", "id", "syncEvent"],
  24993. "additionalProperties": false
  24994. },
  24995. "SyncEventSessionDeleted": {
  24996. "type": "object",
  24997. "properties": {
  24998. "type": {
  24999. "type": "string",
  25000. "enum": ["sync"]
  25001. },
  25002. "id": {
  25003. "type": "string",
  25004. "pattern": "^evt_"
  25005. },
  25006. "syncEvent": {
  25007. "type": "object",
  25008. "properties": {
  25009. "type": {
  25010. "type": "string",
  25011. "enum": ["session.deleted.1"]
  25012. },
  25013. "id": {
  25014. "type": "string",
  25015. "pattern": "^evt_"
  25016. },
  25017. "seq": {
  25018. "type": "number"
  25019. },
  25020. "aggregateID": {
  25021. "type": "string"
  25022. },
  25023. "data": {
  25024. "type": "object",
  25025. "properties": {
  25026. "sessionID": {
  25027. "type": "string",
  25028. "pattern": "^ses"
  25029. },
  25030. "info": {
  25031. "$ref": "#/components/schemas/Session"
  25032. }
  25033. },
  25034. "required": ["sessionID", "info"],
  25035. "additionalProperties": false
  25036. }
  25037. },
  25038. "required": ["type", "id", "seq", "aggregateID", "data"],
  25039. "additionalProperties": false
  25040. }
  25041. },
  25042. "required": ["type", "id", "syncEvent"],
  25043. "additionalProperties": false
  25044. },
  25045. "SyncEventMessageUpdated": {
  25046. "type": "object",
  25047. "properties": {
  25048. "type": {
  25049. "type": "string",
  25050. "enum": ["sync"]
  25051. },
  25052. "id": {
  25053. "type": "string",
  25054. "pattern": "^evt_"
  25055. },
  25056. "syncEvent": {
  25057. "type": "object",
  25058. "properties": {
  25059. "type": {
  25060. "type": "string",
  25061. "enum": ["message.updated.1"]
  25062. },
  25063. "id": {
  25064. "type": "string",
  25065. "pattern": "^evt_"
  25066. },
  25067. "seq": {
  25068. "type": "number"
  25069. },
  25070. "aggregateID": {
  25071. "type": "string"
  25072. },
  25073. "data": {
  25074. "type": "object",
  25075. "properties": {
  25076. "sessionID": {
  25077. "type": "string",
  25078. "pattern": "^ses"
  25079. },
  25080. "info": {
  25081. "$ref": "#/components/schemas/Message"
  25082. }
  25083. },
  25084. "required": ["sessionID", "info"],
  25085. "additionalProperties": false
  25086. }
  25087. },
  25088. "required": ["type", "id", "seq", "aggregateID", "data"],
  25089. "additionalProperties": false
  25090. }
  25091. },
  25092. "required": ["type", "id", "syncEvent"],
  25093. "additionalProperties": false
  25094. },
  25095. "SyncEventMessageRemoved": {
  25096. "type": "object",
  25097. "properties": {
  25098. "type": {
  25099. "type": "string",
  25100. "enum": ["sync"]
  25101. },
  25102. "id": {
  25103. "type": "string",
  25104. "pattern": "^evt_"
  25105. },
  25106. "syncEvent": {
  25107. "type": "object",
  25108. "properties": {
  25109. "type": {
  25110. "type": "string",
  25111. "enum": ["message.removed.1"]
  25112. },
  25113. "id": {
  25114. "type": "string",
  25115. "pattern": "^evt_"
  25116. },
  25117. "seq": {
  25118. "type": "number"
  25119. },
  25120. "aggregateID": {
  25121. "type": "string"
  25122. },
  25123. "data": {
  25124. "type": "object",
  25125. "properties": {
  25126. "sessionID": {
  25127. "type": "string",
  25128. "pattern": "^ses"
  25129. },
  25130. "messageID": {
  25131. "type": "string",
  25132. "pattern": "^msg"
  25133. }
  25134. },
  25135. "required": ["sessionID", "messageID"],
  25136. "additionalProperties": false
  25137. }
  25138. },
  25139. "required": ["type", "id", "seq", "aggregateID", "data"],
  25140. "additionalProperties": false
  25141. }
  25142. },
  25143. "required": ["type", "id", "syncEvent"],
  25144. "additionalProperties": false
  25145. },
  25146. "SyncEventMessagePartUpdated": {
  25147. "type": "object",
  25148. "properties": {
  25149. "type": {
  25150. "type": "string",
  25151. "enum": ["sync"]
  25152. },
  25153. "id": {
  25154. "type": "string",
  25155. "pattern": "^evt_"
  25156. },
  25157. "syncEvent": {
  25158. "type": "object",
  25159. "properties": {
  25160. "type": {
  25161. "type": "string",
  25162. "enum": ["message.part.updated.1"]
  25163. },
  25164. "id": {
  25165. "type": "string",
  25166. "pattern": "^evt_"
  25167. },
  25168. "seq": {
  25169. "type": "number"
  25170. },
  25171. "aggregateID": {
  25172. "type": "string"
  25173. },
  25174. "data": {
  25175. "type": "object",
  25176. "properties": {
  25177. "sessionID": {
  25178. "type": "string",
  25179. "pattern": "^ses"
  25180. },
  25181. "part": {
  25182. "$ref": "#/components/schemas/Part"
  25183. },
  25184. "time": {
  25185. "type": "number"
  25186. }
  25187. },
  25188. "required": ["sessionID", "part", "time"],
  25189. "additionalProperties": false
  25190. }
  25191. },
  25192. "required": ["type", "id", "seq", "aggregateID", "data"],
  25193. "additionalProperties": false
  25194. }
  25195. },
  25196. "required": ["type", "id", "syncEvent"],
  25197. "additionalProperties": false
  25198. },
  25199. "SyncEventMessagePartRemoved": {
  25200. "type": "object",
  25201. "properties": {
  25202. "type": {
  25203. "type": "string",
  25204. "enum": ["sync"]
  25205. },
  25206. "id": {
  25207. "type": "string",
  25208. "pattern": "^evt_"
  25209. },
  25210. "syncEvent": {
  25211. "type": "object",
  25212. "properties": {
  25213. "type": {
  25214. "type": "string",
  25215. "enum": ["message.part.removed.1"]
  25216. },
  25217. "id": {
  25218. "type": "string",
  25219. "pattern": "^evt_"
  25220. },
  25221. "seq": {
  25222. "type": "number"
  25223. },
  25224. "aggregateID": {
  25225. "type": "string"
  25226. },
  25227. "data": {
  25228. "type": "object",
  25229. "properties": {
  25230. "sessionID": {
  25231. "type": "string",
  25232. "pattern": "^ses"
  25233. },
  25234. "messageID": {
  25235. "type": "string",
  25236. "pattern": "^msg"
  25237. },
  25238. "partID": {
  25239. "type": "string",
  25240. "pattern": "^prt"
  25241. }
  25242. },
  25243. "required": ["sessionID", "messageID", "partID"],
  25244. "additionalProperties": false
  25245. }
  25246. },
  25247. "required": ["type", "id", "seq", "aggregateID", "data"],
  25248. "additionalProperties": false
  25249. }
  25250. },
  25251. "required": ["type", "id", "syncEvent"],
  25252. "additionalProperties": false
  25253. },
  25254. "SyncEventSessionNextAgentSwitched": {
  25255. "type": "object",
  25256. "properties": {
  25257. "type": {
  25258. "type": "string",
  25259. "enum": ["sync"]
  25260. },
  25261. "id": {
  25262. "type": "string",
  25263. "pattern": "^evt_"
  25264. },
  25265. "syncEvent": {
  25266. "type": "object",
  25267. "properties": {
  25268. "type": {
  25269. "type": "string",
  25270. "enum": ["session.next.agent.switched.1"]
  25271. },
  25272. "id": {
  25273. "type": "string",
  25274. "pattern": "^evt_"
  25275. },
  25276. "seq": {
  25277. "type": "number"
  25278. },
  25279. "aggregateID": {
  25280. "type": "string"
  25281. },
  25282. "data": {
  25283. "type": "object",
  25284. "properties": {
  25285. "timestamp": {
  25286. "type": "number"
  25287. },
  25288. "sessionID": {
  25289. "type": "string",
  25290. "pattern": "^ses"
  25291. },
  25292. "messageID": {
  25293. "type": "string",
  25294. "pattern": "^msg_"
  25295. },
  25296. "agent": {
  25297. "type": "string"
  25298. }
  25299. },
  25300. "required": ["timestamp", "sessionID", "messageID", "agent"],
  25301. "additionalProperties": false
  25302. }
  25303. },
  25304. "required": ["type", "id", "seq", "aggregateID", "data"],
  25305. "additionalProperties": false
  25306. }
  25307. },
  25308. "required": ["type", "id", "syncEvent"],
  25309. "additionalProperties": false
  25310. },
  25311. "SyncEventSessionNextModelSwitched": {
  25312. "type": "object",
  25313. "properties": {
  25314. "type": {
  25315. "type": "string",
  25316. "enum": ["sync"]
  25317. },
  25318. "id": {
  25319. "type": "string",
  25320. "pattern": "^evt_"
  25321. },
  25322. "syncEvent": {
  25323. "type": "object",
  25324. "properties": {
  25325. "type": {
  25326. "type": "string",
  25327. "enum": ["session.next.model.switched.1"]
  25328. },
  25329. "id": {
  25330. "type": "string",
  25331. "pattern": "^evt_"
  25332. },
  25333. "seq": {
  25334. "type": "number"
  25335. },
  25336. "aggregateID": {
  25337. "type": "string"
  25338. },
  25339. "data": {
  25340. "type": "object",
  25341. "properties": {
  25342. "timestamp": {
  25343. "type": "number"
  25344. },
  25345. "sessionID": {
  25346. "type": "string",
  25347. "pattern": "^ses"
  25348. },
  25349. "messageID": {
  25350. "type": "string",
  25351. "pattern": "^msg_"
  25352. },
  25353. "model": {
  25354. "$ref": "#/components/schemas/ModelRef"
  25355. }
  25356. },
  25357. "required": ["timestamp", "sessionID", "messageID", "model"],
  25358. "additionalProperties": false
  25359. }
  25360. },
  25361. "required": ["type", "id", "seq", "aggregateID", "data"],
  25362. "additionalProperties": false
  25363. }
  25364. },
  25365. "required": ["type", "id", "syncEvent"],
  25366. "additionalProperties": false
  25367. },
  25368. "SyncEventSessionNextMoved": {
  25369. "type": "object",
  25370. "properties": {
  25371. "type": {
  25372. "type": "string",
  25373. "enum": ["sync"]
  25374. },
  25375. "id": {
  25376. "type": "string",
  25377. "pattern": "^evt_"
  25378. },
  25379. "syncEvent": {
  25380. "type": "object",
  25381. "properties": {
  25382. "type": {
  25383. "type": "string",
  25384. "enum": ["session.next.moved.1"]
  25385. },
  25386. "id": {
  25387. "type": "string",
  25388. "pattern": "^evt_"
  25389. },
  25390. "seq": {
  25391. "type": "number"
  25392. },
  25393. "aggregateID": {
  25394. "type": "string"
  25395. },
  25396. "data": {
  25397. "type": "object",
  25398. "properties": {
  25399. "timestamp": {
  25400. "type": "number"
  25401. },
  25402. "sessionID": {
  25403. "type": "string",
  25404. "pattern": "^ses"
  25405. },
  25406. "location": {
  25407. "$ref": "#/components/schemas/LocationRef"
  25408. },
  25409. "subdirectory": {
  25410. "type": "string"
  25411. }
  25412. },
  25413. "required": ["timestamp", "sessionID", "location"],
  25414. "additionalProperties": false
  25415. }
  25416. },
  25417. "required": ["type", "id", "seq", "aggregateID", "data"],
  25418. "additionalProperties": false
  25419. }
  25420. },
  25421. "required": ["type", "id", "syncEvent"],
  25422. "additionalProperties": false
  25423. },
  25424. "SyncEventSessionNextPrompted": {
  25425. "type": "object",
  25426. "properties": {
  25427. "type": {
  25428. "type": "string",
  25429. "enum": ["sync"]
  25430. },
  25431. "id": {
  25432. "type": "string",
  25433. "pattern": "^evt_"
  25434. },
  25435. "syncEvent": {
  25436. "type": "object",
  25437. "properties": {
  25438. "type": {
  25439. "type": "string",
  25440. "enum": ["session.next.prompted.1"]
  25441. },
  25442. "id": {
  25443. "type": "string",
  25444. "pattern": "^evt_"
  25445. },
  25446. "seq": {
  25447. "type": "number"
  25448. },
  25449. "aggregateID": {
  25450. "type": "string"
  25451. },
  25452. "data": {
  25453. "type": "object",
  25454. "properties": {
  25455. "timestamp": {
  25456. "type": "number"
  25457. },
  25458. "sessionID": {
  25459. "type": "string",
  25460. "pattern": "^ses"
  25461. },
  25462. "messageID": {
  25463. "type": "string",
  25464. "pattern": "^msg_"
  25465. },
  25466. "prompt": {
  25467. "$ref": "#/components/schemas/Prompt"
  25468. },
  25469. "delivery": {
  25470. "type": "string",
  25471. "enum": ["steer", "queue"]
  25472. }
  25473. },
  25474. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25475. "additionalProperties": false
  25476. }
  25477. },
  25478. "required": ["type", "id", "seq", "aggregateID", "data"],
  25479. "additionalProperties": false
  25480. }
  25481. },
  25482. "required": ["type", "id", "syncEvent"],
  25483. "additionalProperties": false
  25484. },
  25485. "SyncEventSessionNextPromptAdmitted": {
  25486. "type": "object",
  25487. "properties": {
  25488. "type": {
  25489. "type": "string",
  25490. "enum": ["sync"]
  25491. },
  25492. "id": {
  25493. "type": "string",
  25494. "pattern": "^evt_"
  25495. },
  25496. "syncEvent": {
  25497. "type": "object",
  25498. "properties": {
  25499. "type": {
  25500. "type": "string",
  25501. "enum": ["session.next.prompt.admitted.1"]
  25502. },
  25503. "id": {
  25504. "type": "string",
  25505. "pattern": "^evt_"
  25506. },
  25507. "seq": {
  25508. "type": "number"
  25509. },
  25510. "aggregateID": {
  25511. "type": "string"
  25512. },
  25513. "data": {
  25514. "type": "object",
  25515. "properties": {
  25516. "timestamp": {
  25517. "type": "number"
  25518. },
  25519. "sessionID": {
  25520. "type": "string",
  25521. "pattern": "^ses"
  25522. },
  25523. "messageID": {
  25524. "type": "string",
  25525. "pattern": "^msg_"
  25526. },
  25527. "prompt": {
  25528. "$ref": "#/components/schemas/Prompt"
  25529. },
  25530. "delivery": {
  25531. "type": "string",
  25532. "enum": ["steer", "queue"]
  25533. }
  25534. },
  25535. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25536. "additionalProperties": false
  25537. }
  25538. },
  25539. "required": ["type", "id", "seq", "aggregateID", "data"],
  25540. "additionalProperties": false
  25541. }
  25542. },
  25543. "required": ["type", "id", "syncEvent"],
  25544. "additionalProperties": false
  25545. },
  25546. "SyncEventSessionNextContextUpdated": {
  25547. "type": "object",
  25548. "properties": {
  25549. "type": {
  25550. "type": "string",
  25551. "enum": ["sync"]
  25552. },
  25553. "id": {
  25554. "type": "string",
  25555. "pattern": "^evt_"
  25556. },
  25557. "syncEvent": {
  25558. "type": "object",
  25559. "properties": {
  25560. "type": {
  25561. "type": "string",
  25562. "enum": ["session.next.context.updated.1"]
  25563. },
  25564. "id": {
  25565. "type": "string",
  25566. "pattern": "^evt_"
  25567. },
  25568. "seq": {
  25569. "type": "number"
  25570. },
  25571. "aggregateID": {
  25572. "type": "string"
  25573. },
  25574. "data": {
  25575. "type": "object",
  25576. "properties": {
  25577. "timestamp": {
  25578. "type": "number"
  25579. },
  25580. "sessionID": {
  25581. "type": "string",
  25582. "pattern": "^ses"
  25583. },
  25584. "messageID": {
  25585. "type": "string",
  25586. "pattern": "^msg_"
  25587. },
  25588. "text": {
  25589. "type": "string"
  25590. }
  25591. },
  25592. "required": ["timestamp", "sessionID", "messageID", "text"],
  25593. "additionalProperties": false
  25594. }
  25595. },
  25596. "required": ["type", "id", "seq", "aggregateID", "data"],
  25597. "additionalProperties": false
  25598. }
  25599. },
  25600. "required": ["type", "id", "syncEvent"],
  25601. "additionalProperties": false
  25602. },
  25603. "SyncEventSessionNextSynthetic": {
  25604. "type": "object",
  25605. "properties": {
  25606. "type": {
  25607. "type": "string",
  25608. "enum": ["sync"]
  25609. },
  25610. "id": {
  25611. "type": "string",
  25612. "pattern": "^evt_"
  25613. },
  25614. "syncEvent": {
  25615. "type": "object",
  25616. "properties": {
  25617. "type": {
  25618. "type": "string",
  25619. "enum": ["session.next.synthetic.1"]
  25620. },
  25621. "id": {
  25622. "type": "string",
  25623. "pattern": "^evt_"
  25624. },
  25625. "seq": {
  25626. "type": "number"
  25627. },
  25628. "aggregateID": {
  25629. "type": "string"
  25630. },
  25631. "data": {
  25632. "type": "object",
  25633. "properties": {
  25634. "timestamp": {
  25635. "type": "number"
  25636. },
  25637. "sessionID": {
  25638. "type": "string",
  25639. "pattern": "^ses"
  25640. },
  25641. "messageID": {
  25642. "type": "string",
  25643. "pattern": "^msg_"
  25644. },
  25645. "text": {
  25646. "type": "string"
  25647. }
  25648. },
  25649. "required": ["timestamp", "sessionID", "messageID", "text"],
  25650. "additionalProperties": false
  25651. }
  25652. },
  25653. "required": ["type", "id", "seq", "aggregateID", "data"],
  25654. "additionalProperties": false
  25655. }
  25656. },
  25657. "required": ["type", "id", "syncEvent"],
  25658. "additionalProperties": false
  25659. },
  25660. "SyncEventSessionNextShellStarted": {
  25661. "type": "object",
  25662. "properties": {
  25663. "type": {
  25664. "type": "string",
  25665. "enum": ["sync"]
  25666. },
  25667. "id": {
  25668. "type": "string",
  25669. "pattern": "^evt_"
  25670. },
  25671. "syncEvent": {
  25672. "type": "object",
  25673. "properties": {
  25674. "type": {
  25675. "type": "string",
  25676. "enum": ["session.next.shell.started.1"]
  25677. },
  25678. "id": {
  25679. "type": "string",
  25680. "pattern": "^evt_"
  25681. },
  25682. "seq": {
  25683. "type": "number"
  25684. },
  25685. "aggregateID": {
  25686. "type": "string"
  25687. },
  25688. "data": {
  25689. "type": "object",
  25690. "properties": {
  25691. "timestamp": {
  25692. "type": "number"
  25693. },
  25694. "sessionID": {
  25695. "type": "string",
  25696. "pattern": "^ses"
  25697. },
  25698. "messageID": {
  25699. "type": "string",
  25700. "pattern": "^msg_"
  25701. },
  25702. "callID": {
  25703. "type": "string"
  25704. },
  25705. "command": {
  25706. "type": "string"
  25707. }
  25708. },
  25709. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25710. "additionalProperties": false
  25711. }
  25712. },
  25713. "required": ["type", "id", "seq", "aggregateID", "data"],
  25714. "additionalProperties": false
  25715. }
  25716. },
  25717. "required": ["type", "id", "syncEvent"],
  25718. "additionalProperties": false
  25719. },
  25720. "SyncEventSessionNextShellEnded": {
  25721. "type": "object",
  25722. "properties": {
  25723. "type": {
  25724. "type": "string",
  25725. "enum": ["sync"]
  25726. },
  25727. "id": {
  25728. "type": "string",
  25729. "pattern": "^evt_"
  25730. },
  25731. "syncEvent": {
  25732. "type": "object",
  25733. "properties": {
  25734. "type": {
  25735. "type": "string",
  25736. "enum": ["session.next.shell.ended.1"]
  25737. },
  25738. "id": {
  25739. "type": "string",
  25740. "pattern": "^evt_"
  25741. },
  25742. "seq": {
  25743. "type": "number"
  25744. },
  25745. "aggregateID": {
  25746. "type": "string"
  25747. },
  25748. "data": {
  25749. "type": "object",
  25750. "properties": {
  25751. "timestamp": {
  25752. "type": "number"
  25753. },
  25754. "sessionID": {
  25755. "type": "string",
  25756. "pattern": "^ses"
  25757. },
  25758. "callID": {
  25759. "type": "string"
  25760. },
  25761. "output": {
  25762. "type": "string"
  25763. }
  25764. },
  25765. "required": ["timestamp", "sessionID", "callID", "output"],
  25766. "additionalProperties": false
  25767. }
  25768. },
  25769. "required": ["type", "id", "seq", "aggregateID", "data"],
  25770. "additionalProperties": false
  25771. }
  25772. },
  25773. "required": ["type", "id", "syncEvent"],
  25774. "additionalProperties": false
  25775. },
  25776. "SyncEventSessionNextStepStarted": {
  25777. "type": "object",
  25778. "properties": {
  25779. "type": {
  25780. "type": "string",
  25781. "enum": ["sync"]
  25782. },
  25783. "id": {
  25784. "type": "string",
  25785. "pattern": "^evt_"
  25786. },
  25787. "syncEvent": {
  25788. "type": "object",
  25789. "properties": {
  25790. "type": {
  25791. "type": "string",
  25792. "enum": ["session.next.step.started.1"]
  25793. },
  25794. "id": {
  25795. "type": "string",
  25796. "pattern": "^evt_"
  25797. },
  25798. "seq": {
  25799. "type": "number"
  25800. },
  25801. "aggregateID": {
  25802. "type": "string"
  25803. },
  25804. "data": {
  25805. "type": "object",
  25806. "properties": {
  25807. "timestamp": {
  25808. "type": "number"
  25809. },
  25810. "sessionID": {
  25811. "type": "string",
  25812. "pattern": "^ses"
  25813. },
  25814. "assistantMessageID": {
  25815. "type": "string",
  25816. "pattern": "^msg_"
  25817. },
  25818. "agent": {
  25819. "type": "string"
  25820. },
  25821. "model": {
  25822. "$ref": "#/components/schemas/ModelRef"
  25823. },
  25824. "snapshot": {
  25825. "type": "string"
  25826. }
  25827. },
  25828. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25829. "additionalProperties": false
  25830. }
  25831. },
  25832. "required": ["type", "id", "seq", "aggregateID", "data"],
  25833. "additionalProperties": false
  25834. }
  25835. },
  25836. "required": ["type", "id", "syncEvent"],
  25837. "additionalProperties": false
  25838. },
  25839. "SyncEventSessionNextStepEnded": {
  25840. "type": "object",
  25841. "properties": {
  25842. "type": {
  25843. "type": "string",
  25844. "enum": ["sync"]
  25845. },
  25846. "id": {
  25847. "type": "string",
  25848. "pattern": "^evt_"
  25849. },
  25850. "syncEvent": {
  25851. "type": "object",
  25852. "properties": {
  25853. "type": {
  25854. "type": "string",
  25855. "enum": ["session.next.step.ended.2"]
  25856. },
  25857. "id": {
  25858. "type": "string",
  25859. "pattern": "^evt_"
  25860. },
  25861. "seq": {
  25862. "type": "number"
  25863. },
  25864. "aggregateID": {
  25865. "type": "string"
  25866. },
  25867. "data": {
  25868. "type": "object",
  25869. "properties": {
  25870. "timestamp": {
  25871. "type": "number"
  25872. },
  25873. "sessionID": {
  25874. "type": "string",
  25875. "pattern": "^ses"
  25876. },
  25877. "assistantMessageID": {
  25878. "type": "string",
  25879. "pattern": "^msg_"
  25880. },
  25881. "finish": {
  25882. "type": "string"
  25883. },
  25884. "cost": {
  25885. "type": "number"
  25886. },
  25887. "tokens": {
  25888. "type": "object",
  25889. "properties": {
  25890. "input": {
  25891. "type": "number"
  25892. },
  25893. "output": {
  25894. "type": "number"
  25895. },
  25896. "reasoning": {
  25897. "type": "number"
  25898. },
  25899. "cache": {
  25900. "type": "object",
  25901. "properties": {
  25902. "read": {
  25903. "type": "number"
  25904. },
  25905. "write": {
  25906. "type": "number"
  25907. }
  25908. },
  25909. "required": ["read", "write"],
  25910. "additionalProperties": false
  25911. }
  25912. },
  25913. "required": ["input", "output", "reasoning", "cache"],
  25914. "additionalProperties": false
  25915. },
  25916. "snapshot": {
  25917. "type": "string"
  25918. },
  25919. "files": {
  25920. "type": "array",
  25921. "items": {
  25922. "type": "string"
  25923. }
  25924. }
  25925. },
  25926. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25927. "additionalProperties": false
  25928. }
  25929. },
  25930. "required": ["type", "id", "seq", "aggregateID", "data"],
  25931. "additionalProperties": false
  25932. }
  25933. },
  25934. "required": ["type", "id", "syncEvent"],
  25935. "additionalProperties": false
  25936. },
  25937. "SyncEventSessionNextStepFailed": {
  25938. "type": "object",
  25939. "properties": {
  25940. "type": {
  25941. "type": "string",
  25942. "enum": ["sync"]
  25943. },
  25944. "id": {
  25945. "type": "string",
  25946. "pattern": "^evt_"
  25947. },
  25948. "syncEvent": {
  25949. "type": "object",
  25950. "properties": {
  25951. "type": {
  25952. "type": "string",
  25953. "enum": ["session.next.step.failed.2"]
  25954. },
  25955. "id": {
  25956. "type": "string",
  25957. "pattern": "^evt_"
  25958. },
  25959. "seq": {
  25960. "type": "number"
  25961. },
  25962. "aggregateID": {
  25963. "type": "string"
  25964. },
  25965. "data": {
  25966. "type": "object",
  25967. "properties": {
  25968. "timestamp": {
  25969. "type": "number"
  25970. },
  25971. "sessionID": {
  25972. "type": "string",
  25973. "pattern": "^ses"
  25974. },
  25975. "assistantMessageID": {
  25976. "type": "string",
  25977. "pattern": "^msg_"
  25978. },
  25979. "error": {
  25980. "$ref": "#/components/schemas/SessionErrorUnknown"
  25981. }
  25982. },
  25983. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25984. "additionalProperties": false
  25985. }
  25986. },
  25987. "required": ["type", "id", "seq", "aggregateID", "data"],
  25988. "additionalProperties": false
  25989. }
  25990. },
  25991. "required": ["type", "id", "syncEvent"],
  25992. "additionalProperties": false
  25993. },
  25994. "SyncEventSessionNextTextStarted": {
  25995. "type": "object",
  25996. "properties": {
  25997. "type": {
  25998. "type": "string",
  25999. "enum": ["sync"]
  26000. },
  26001. "id": {
  26002. "type": "string",
  26003. "pattern": "^evt_"
  26004. },
  26005. "syncEvent": {
  26006. "type": "object",
  26007. "properties": {
  26008. "type": {
  26009. "type": "string",
  26010. "enum": ["session.next.text.started.1"]
  26011. },
  26012. "id": {
  26013. "type": "string",
  26014. "pattern": "^evt_"
  26015. },
  26016. "seq": {
  26017. "type": "number"
  26018. },
  26019. "aggregateID": {
  26020. "type": "string"
  26021. },
  26022. "data": {
  26023. "type": "object",
  26024. "properties": {
  26025. "timestamp": {
  26026. "type": "number"
  26027. },
  26028. "sessionID": {
  26029. "type": "string",
  26030. "pattern": "^ses"
  26031. },
  26032. "assistantMessageID": {
  26033. "type": "string",
  26034. "pattern": "^msg_"
  26035. },
  26036. "textID": {
  26037. "type": "string"
  26038. }
  26039. },
  26040. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  26041. "additionalProperties": false
  26042. }
  26043. },
  26044. "required": ["type", "id", "seq", "aggregateID", "data"],
  26045. "additionalProperties": false
  26046. }
  26047. },
  26048. "required": ["type", "id", "syncEvent"],
  26049. "additionalProperties": false
  26050. },
  26051. "SyncEventSessionNextTextEnded": {
  26052. "type": "object",
  26053. "properties": {
  26054. "type": {
  26055. "type": "string",
  26056. "enum": ["sync"]
  26057. },
  26058. "id": {
  26059. "type": "string",
  26060. "pattern": "^evt_"
  26061. },
  26062. "syncEvent": {
  26063. "type": "object",
  26064. "properties": {
  26065. "type": {
  26066. "type": "string",
  26067. "enum": ["session.next.text.ended.1"]
  26068. },
  26069. "id": {
  26070. "type": "string",
  26071. "pattern": "^evt_"
  26072. },
  26073. "seq": {
  26074. "type": "number"
  26075. },
  26076. "aggregateID": {
  26077. "type": "string"
  26078. },
  26079. "data": {
  26080. "type": "object",
  26081. "properties": {
  26082. "timestamp": {
  26083. "type": "number"
  26084. },
  26085. "sessionID": {
  26086. "type": "string",
  26087. "pattern": "^ses"
  26088. },
  26089. "assistantMessageID": {
  26090. "type": "string",
  26091. "pattern": "^msg_"
  26092. },
  26093. "textID": {
  26094. "type": "string"
  26095. },
  26096. "text": {
  26097. "type": "string"
  26098. }
  26099. },
  26100. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  26101. "additionalProperties": false
  26102. }
  26103. },
  26104. "required": ["type", "id", "seq", "aggregateID", "data"],
  26105. "additionalProperties": false
  26106. }
  26107. },
  26108. "required": ["type", "id", "syncEvent"],
  26109. "additionalProperties": false
  26110. },
  26111. "SyncEventSessionNextReasoningStarted": {
  26112. "type": "object",
  26113. "properties": {
  26114. "type": {
  26115. "type": "string",
  26116. "enum": ["sync"]
  26117. },
  26118. "id": {
  26119. "type": "string",
  26120. "pattern": "^evt_"
  26121. },
  26122. "syncEvent": {
  26123. "type": "object",
  26124. "properties": {
  26125. "type": {
  26126. "type": "string",
  26127. "enum": ["session.next.reasoning.started.1"]
  26128. },
  26129. "id": {
  26130. "type": "string",
  26131. "pattern": "^evt_"
  26132. },
  26133. "seq": {
  26134. "type": "number"
  26135. },
  26136. "aggregateID": {
  26137. "type": "string"
  26138. },
  26139. "data": {
  26140. "type": "object",
  26141. "properties": {
  26142. "timestamp": {
  26143. "type": "number"
  26144. },
  26145. "sessionID": {
  26146. "type": "string",
  26147. "pattern": "^ses"
  26148. },
  26149. "assistantMessageID": {
  26150. "type": "string",
  26151. "pattern": "^msg_"
  26152. },
  26153. "reasoningID": {
  26154. "type": "string"
  26155. },
  26156. "providerMetadata": {
  26157. "$ref": "#/components/schemas/LLMProviderMetadata"
  26158. }
  26159. },
  26160. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  26161. "additionalProperties": false
  26162. }
  26163. },
  26164. "required": ["type", "id", "seq", "aggregateID", "data"],
  26165. "additionalProperties": false
  26166. }
  26167. },
  26168. "required": ["type", "id", "syncEvent"],
  26169. "additionalProperties": false
  26170. },
  26171. "SyncEventSessionNextReasoningEnded": {
  26172. "type": "object",
  26173. "properties": {
  26174. "type": {
  26175. "type": "string",
  26176. "enum": ["sync"]
  26177. },
  26178. "id": {
  26179. "type": "string",
  26180. "pattern": "^evt_"
  26181. },
  26182. "syncEvent": {
  26183. "type": "object",
  26184. "properties": {
  26185. "type": {
  26186. "type": "string",
  26187. "enum": ["session.next.reasoning.ended.1"]
  26188. },
  26189. "id": {
  26190. "type": "string",
  26191. "pattern": "^evt_"
  26192. },
  26193. "seq": {
  26194. "type": "number"
  26195. },
  26196. "aggregateID": {
  26197. "type": "string"
  26198. },
  26199. "data": {
  26200. "type": "object",
  26201. "properties": {
  26202. "timestamp": {
  26203. "type": "number"
  26204. },
  26205. "sessionID": {
  26206. "type": "string",
  26207. "pattern": "^ses"
  26208. },
  26209. "assistantMessageID": {
  26210. "type": "string",
  26211. "pattern": "^msg_"
  26212. },
  26213. "reasoningID": {
  26214. "type": "string"
  26215. },
  26216. "text": {
  26217. "type": "string"
  26218. },
  26219. "providerMetadata": {
  26220. "$ref": "#/components/schemas/LLMProviderMetadata"
  26221. }
  26222. },
  26223. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  26224. "additionalProperties": false
  26225. }
  26226. },
  26227. "required": ["type", "id", "seq", "aggregateID", "data"],
  26228. "additionalProperties": false
  26229. }
  26230. },
  26231. "required": ["type", "id", "syncEvent"],
  26232. "additionalProperties": false
  26233. },
  26234. "SyncEventSessionNextToolInputStarted": {
  26235. "type": "object",
  26236. "properties": {
  26237. "type": {
  26238. "type": "string",
  26239. "enum": ["sync"]
  26240. },
  26241. "id": {
  26242. "type": "string",
  26243. "pattern": "^evt_"
  26244. },
  26245. "syncEvent": {
  26246. "type": "object",
  26247. "properties": {
  26248. "type": {
  26249. "type": "string",
  26250. "enum": ["session.next.tool.input.started.1"]
  26251. },
  26252. "id": {
  26253. "type": "string",
  26254. "pattern": "^evt_"
  26255. },
  26256. "seq": {
  26257. "type": "number"
  26258. },
  26259. "aggregateID": {
  26260. "type": "string"
  26261. },
  26262. "data": {
  26263. "type": "object",
  26264. "properties": {
  26265. "timestamp": {
  26266. "type": "number"
  26267. },
  26268. "sessionID": {
  26269. "type": "string",
  26270. "pattern": "^ses"
  26271. },
  26272. "assistantMessageID": {
  26273. "type": "string",
  26274. "pattern": "^msg_"
  26275. },
  26276. "callID": {
  26277. "type": "string"
  26278. },
  26279. "name": {
  26280. "type": "string"
  26281. }
  26282. },
  26283. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  26284. "additionalProperties": false
  26285. }
  26286. },
  26287. "required": ["type", "id", "seq", "aggregateID", "data"],
  26288. "additionalProperties": false
  26289. }
  26290. },
  26291. "required": ["type", "id", "syncEvent"],
  26292. "additionalProperties": false
  26293. },
  26294. "SyncEventSessionNextToolInputEnded": {
  26295. "type": "object",
  26296. "properties": {
  26297. "type": {
  26298. "type": "string",
  26299. "enum": ["sync"]
  26300. },
  26301. "id": {
  26302. "type": "string",
  26303. "pattern": "^evt_"
  26304. },
  26305. "syncEvent": {
  26306. "type": "object",
  26307. "properties": {
  26308. "type": {
  26309. "type": "string",
  26310. "enum": ["session.next.tool.input.ended.1"]
  26311. },
  26312. "id": {
  26313. "type": "string",
  26314. "pattern": "^evt_"
  26315. },
  26316. "seq": {
  26317. "type": "number"
  26318. },
  26319. "aggregateID": {
  26320. "type": "string"
  26321. },
  26322. "data": {
  26323. "type": "object",
  26324. "properties": {
  26325. "timestamp": {
  26326. "type": "number"
  26327. },
  26328. "sessionID": {
  26329. "type": "string",
  26330. "pattern": "^ses"
  26331. },
  26332. "assistantMessageID": {
  26333. "type": "string",
  26334. "pattern": "^msg_"
  26335. },
  26336. "callID": {
  26337. "type": "string"
  26338. },
  26339. "text": {
  26340. "type": "string"
  26341. }
  26342. },
  26343. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  26344. "additionalProperties": false
  26345. }
  26346. },
  26347. "required": ["type", "id", "seq", "aggregateID", "data"],
  26348. "additionalProperties": false
  26349. }
  26350. },
  26351. "required": ["type", "id", "syncEvent"],
  26352. "additionalProperties": false
  26353. },
  26354. "SyncEventSessionNextToolCalled": {
  26355. "type": "object",
  26356. "properties": {
  26357. "type": {
  26358. "type": "string",
  26359. "enum": ["sync"]
  26360. },
  26361. "id": {
  26362. "type": "string",
  26363. "pattern": "^evt_"
  26364. },
  26365. "syncEvent": {
  26366. "type": "object",
  26367. "properties": {
  26368. "type": {
  26369. "type": "string",
  26370. "enum": ["session.next.tool.called.1"]
  26371. },
  26372. "id": {
  26373. "type": "string",
  26374. "pattern": "^evt_"
  26375. },
  26376. "seq": {
  26377. "type": "number"
  26378. },
  26379. "aggregateID": {
  26380. "type": "string"
  26381. },
  26382. "data": {
  26383. "type": "object",
  26384. "properties": {
  26385. "timestamp": {
  26386. "type": "number"
  26387. },
  26388. "sessionID": {
  26389. "type": "string",
  26390. "pattern": "^ses"
  26391. },
  26392. "assistantMessageID": {
  26393. "type": "string",
  26394. "pattern": "^msg_"
  26395. },
  26396. "callID": {
  26397. "type": "string"
  26398. },
  26399. "tool": {
  26400. "type": "string"
  26401. },
  26402. "input": {
  26403. "type": "object"
  26404. },
  26405. "provider": {
  26406. "type": "object",
  26407. "properties": {
  26408. "executed": {
  26409. "type": "boolean"
  26410. },
  26411. "metadata": {
  26412. "$ref": "#/components/schemas/LLMProviderMetadata"
  26413. }
  26414. },
  26415. "required": ["executed"],
  26416. "additionalProperties": false
  26417. }
  26418. },
  26419. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26420. "additionalProperties": false
  26421. }
  26422. },
  26423. "required": ["type", "id", "seq", "aggregateID", "data"],
  26424. "additionalProperties": false
  26425. }
  26426. },
  26427. "required": ["type", "id", "syncEvent"],
  26428. "additionalProperties": false
  26429. },
  26430. "SyncEventSessionNextToolProgress": {
  26431. "type": "object",
  26432. "properties": {
  26433. "type": {
  26434. "type": "string",
  26435. "enum": ["sync"]
  26436. },
  26437. "id": {
  26438. "type": "string",
  26439. "pattern": "^evt_"
  26440. },
  26441. "syncEvent": {
  26442. "type": "object",
  26443. "properties": {
  26444. "type": {
  26445. "type": "string",
  26446. "enum": ["session.next.tool.progress.1"]
  26447. },
  26448. "id": {
  26449. "type": "string",
  26450. "pattern": "^evt_"
  26451. },
  26452. "seq": {
  26453. "type": "number"
  26454. },
  26455. "aggregateID": {
  26456. "type": "string"
  26457. },
  26458. "data": {
  26459. "type": "object",
  26460. "properties": {
  26461. "timestamp": {
  26462. "type": "number"
  26463. },
  26464. "sessionID": {
  26465. "type": "string",
  26466. "pattern": "^ses"
  26467. },
  26468. "assistantMessageID": {
  26469. "type": "string",
  26470. "pattern": "^msg_"
  26471. },
  26472. "callID": {
  26473. "type": "string"
  26474. },
  26475. "structured": {
  26476. "type": "object"
  26477. },
  26478. "content": {
  26479. "type": "array",
  26480. "items": {
  26481. "$ref": "#/components/schemas/LLMToolContent"
  26482. }
  26483. }
  26484. },
  26485. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26486. "additionalProperties": false
  26487. }
  26488. },
  26489. "required": ["type", "id", "seq", "aggregateID", "data"],
  26490. "additionalProperties": false
  26491. }
  26492. },
  26493. "required": ["type", "id", "syncEvent"],
  26494. "additionalProperties": false
  26495. },
  26496. "SyncEventSessionNextToolSuccess": {
  26497. "type": "object",
  26498. "properties": {
  26499. "type": {
  26500. "type": "string",
  26501. "enum": ["sync"]
  26502. },
  26503. "id": {
  26504. "type": "string",
  26505. "pattern": "^evt_"
  26506. },
  26507. "syncEvent": {
  26508. "type": "object",
  26509. "properties": {
  26510. "type": {
  26511. "type": "string",
  26512. "enum": ["session.next.tool.success.1"]
  26513. },
  26514. "id": {
  26515. "type": "string",
  26516. "pattern": "^evt_"
  26517. },
  26518. "seq": {
  26519. "type": "number"
  26520. },
  26521. "aggregateID": {
  26522. "type": "string"
  26523. },
  26524. "data": {
  26525. "type": "object",
  26526. "properties": {
  26527. "timestamp": {
  26528. "type": "number"
  26529. },
  26530. "sessionID": {
  26531. "type": "string",
  26532. "pattern": "^ses"
  26533. },
  26534. "assistantMessageID": {
  26535. "type": "string",
  26536. "pattern": "^msg_"
  26537. },
  26538. "callID": {
  26539. "type": "string"
  26540. },
  26541. "structured": {
  26542. "type": "object"
  26543. },
  26544. "content": {
  26545. "type": "array",
  26546. "items": {
  26547. "$ref": "#/components/schemas/LLMToolContent"
  26548. }
  26549. },
  26550. "outputPaths": {
  26551. "type": "array",
  26552. "items": {
  26553. "type": "string"
  26554. }
  26555. },
  26556. "result": {},
  26557. "provider": {
  26558. "type": "object",
  26559. "properties": {
  26560. "executed": {
  26561. "type": "boolean"
  26562. },
  26563. "metadata": {
  26564. "$ref": "#/components/schemas/LLMProviderMetadata"
  26565. }
  26566. },
  26567. "required": ["executed"],
  26568. "additionalProperties": false
  26569. }
  26570. },
  26571. "required": [
  26572. "timestamp",
  26573. "sessionID",
  26574. "assistantMessageID",
  26575. "callID",
  26576. "structured",
  26577. "content",
  26578. "provider"
  26579. ],
  26580. "additionalProperties": false
  26581. }
  26582. },
  26583. "required": ["type", "id", "seq", "aggregateID", "data"],
  26584. "additionalProperties": false
  26585. }
  26586. },
  26587. "required": ["type", "id", "syncEvent"],
  26588. "additionalProperties": false
  26589. },
  26590. "SyncEventSessionNextToolFailed": {
  26591. "type": "object",
  26592. "properties": {
  26593. "type": {
  26594. "type": "string",
  26595. "enum": ["sync"]
  26596. },
  26597. "id": {
  26598. "type": "string",
  26599. "pattern": "^evt_"
  26600. },
  26601. "syncEvent": {
  26602. "type": "object",
  26603. "properties": {
  26604. "type": {
  26605. "type": "string",
  26606. "enum": ["session.next.tool.failed.1"]
  26607. },
  26608. "id": {
  26609. "type": "string",
  26610. "pattern": "^evt_"
  26611. },
  26612. "seq": {
  26613. "type": "number"
  26614. },
  26615. "aggregateID": {
  26616. "type": "string"
  26617. },
  26618. "data": {
  26619. "type": "object",
  26620. "properties": {
  26621. "timestamp": {
  26622. "type": "number"
  26623. },
  26624. "sessionID": {
  26625. "type": "string",
  26626. "pattern": "^ses"
  26627. },
  26628. "assistantMessageID": {
  26629. "type": "string",
  26630. "pattern": "^msg_"
  26631. },
  26632. "callID": {
  26633. "type": "string"
  26634. },
  26635. "error": {
  26636. "$ref": "#/components/schemas/SessionErrorUnknown"
  26637. },
  26638. "result": {},
  26639. "provider": {
  26640. "type": "object",
  26641. "properties": {
  26642. "executed": {
  26643. "type": "boolean"
  26644. },
  26645. "metadata": {
  26646. "$ref": "#/components/schemas/LLMProviderMetadata"
  26647. }
  26648. },
  26649. "required": ["executed"],
  26650. "additionalProperties": false
  26651. }
  26652. },
  26653. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26654. "additionalProperties": false
  26655. }
  26656. },
  26657. "required": ["type", "id", "seq", "aggregateID", "data"],
  26658. "additionalProperties": false
  26659. }
  26660. },
  26661. "required": ["type", "id", "syncEvent"],
  26662. "additionalProperties": false
  26663. },
  26664. "SyncEventSessionNextRetried": {
  26665. "type": "object",
  26666. "properties": {
  26667. "type": {
  26668. "type": "string",
  26669. "enum": ["sync"]
  26670. },
  26671. "id": {
  26672. "type": "string",
  26673. "pattern": "^evt_"
  26674. },
  26675. "syncEvent": {
  26676. "type": "object",
  26677. "properties": {
  26678. "type": {
  26679. "type": "string",
  26680. "enum": ["session.next.retried.1"]
  26681. },
  26682. "id": {
  26683. "type": "string",
  26684. "pattern": "^evt_"
  26685. },
  26686. "seq": {
  26687. "type": "number"
  26688. },
  26689. "aggregateID": {
  26690. "type": "string"
  26691. },
  26692. "data": {
  26693. "type": "object",
  26694. "properties": {
  26695. "timestamp": {
  26696. "type": "number"
  26697. },
  26698. "sessionID": {
  26699. "type": "string",
  26700. "pattern": "^ses"
  26701. },
  26702. "attempt": {
  26703. "type": "number"
  26704. },
  26705. "error": {
  26706. "$ref": "#/components/schemas/SessionNextRetry_error"
  26707. }
  26708. },
  26709. "required": ["timestamp", "sessionID", "attempt", "error"],
  26710. "additionalProperties": false
  26711. }
  26712. },
  26713. "required": ["type", "id", "seq", "aggregateID", "data"],
  26714. "additionalProperties": false
  26715. }
  26716. },
  26717. "required": ["type", "id", "syncEvent"],
  26718. "additionalProperties": false
  26719. },
  26720. "SyncEventSessionNextCompactionStarted": {
  26721. "type": "object",
  26722. "properties": {
  26723. "type": {
  26724. "type": "string",
  26725. "enum": ["sync"]
  26726. },
  26727. "id": {
  26728. "type": "string",
  26729. "pattern": "^evt_"
  26730. },
  26731. "syncEvent": {
  26732. "type": "object",
  26733. "properties": {
  26734. "type": {
  26735. "type": "string",
  26736. "enum": ["session.next.compaction.started.1"]
  26737. },
  26738. "id": {
  26739. "type": "string",
  26740. "pattern": "^evt_"
  26741. },
  26742. "seq": {
  26743. "type": "number"
  26744. },
  26745. "aggregateID": {
  26746. "type": "string"
  26747. },
  26748. "data": {
  26749. "type": "object",
  26750. "properties": {
  26751. "timestamp": {
  26752. "type": "number"
  26753. },
  26754. "sessionID": {
  26755. "type": "string",
  26756. "pattern": "^ses"
  26757. },
  26758. "messageID": {
  26759. "type": "string",
  26760. "pattern": "^msg_"
  26761. },
  26762. "reason": {
  26763. "type": "string",
  26764. "enum": ["auto", "manual"]
  26765. }
  26766. },
  26767. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26768. "additionalProperties": false
  26769. }
  26770. },
  26771. "required": ["type", "id", "seq", "aggregateID", "data"],
  26772. "additionalProperties": false
  26773. }
  26774. },
  26775. "required": ["type", "id", "syncEvent"],
  26776. "additionalProperties": false
  26777. },
  26778. "SyncEventSessionNextCompactionEnded": {
  26779. "type": "object",
  26780. "properties": {
  26781. "type": {
  26782. "type": "string",
  26783. "enum": ["sync"]
  26784. },
  26785. "id": {
  26786. "type": "string",
  26787. "pattern": "^evt_"
  26788. },
  26789. "syncEvent": {
  26790. "type": "object",
  26791. "properties": {
  26792. "type": {
  26793. "type": "string",
  26794. "enum": ["session.next.compaction.ended.1"]
  26795. },
  26796. "id": {
  26797. "type": "string",
  26798. "pattern": "^evt_"
  26799. },
  26800. "seq": {
  26801. "type": "number"
  26802. },
  26803. "aggregateID": {
  26804. "type": "string"
  26805. },
  26806. "data": {
  26807. "type": "object",
  26808. "properties": {
  26809. "timestamp": {
  26810. "type": "number"
  26811. },
  26812. "sessionID": {
  26813. "type": "string",
  26814. "pattern": "^ses"
  26815. },
  26816. "messageID": {
  26817. "type": "string",
  26818. "pattern": "^msg_"
  26819. },
  26820. "reason": {
  26821. "type": "string",
  26822. "enum": ["auto", "manual"]
  26823. },
  26824. "text": {
  26825. "type": "string"
  26826. },
  26827. "recent": {
  26828. "type": "string"
  26829. }
  26830. },
  26831. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  26832. "additionalProperties": false
  26833. }
  26834. },
  26835. "required": ["type", "id", "seq", "aggregateID", "data"],
  26836. "additionalProperties": false
  26837. }
  26838. },
  26839. "required": ["type", "id", "syncEvent"],
  26840. "additionalProperties": false
  26841. },
  26842. "SyncEventSessionNextRevertStaged": {
  26843. "type": "object",
  26844. "properties": {
  26845. "type": {
  26846. "type": "string",
  26847. "enum": ["sync"]
  26848. },
  26849. "id": {
  26850. "type": "string",
  26851. "pattern": "^evt_"
  26852. },
  26853. "syncEvent": {
  26854. "type": "object",
  26855. "properties": {
  26856. "type": {
  26857. "type": "string",
  26858. "enum": ["session.next.revert.staged.1"]
  26859. },
  26860. "id": {
  26861. "type": "string",
  26862. "pattern": "^evt_"
  26863. },
  26864. "seq": {
  26865. "type": "number"
  26866. },
  26867. "aggregateID": {
  26868. "type": "string"
  26869. },
  26870. "data": {
  26871. "type": "object",
  26872. "properties": {
  26873. "timestamp": {
  26874. "type": "number"
  26875. },
  26876. "sessionID": {
  26877. "type": "string",
  26878. "pattern": "^ses"
  26879. },
  26880. "revert": {
  26881. "$ref": "#/components/schemas/RevertState"
  26882. }
  26883. },
  26884. "required": ["timestamp", "sessionID", "revert"],
  26885. "additionalProperties": false
  26886. }
  26887. },
  26888. "required": ["type", "id", "seq", "aggregateID", "data"],
  26889. "additionalProperties": false
  26890. }
  26891. },
  26892. "required": ["type", "id", "syncEvent"],
  26893. "additionalProperties": false
  26894. },
  26895. "SyncEventSessionNextRevertCleared": {
  26896. "type": "object",
  26897. "properties": {
  26898. "type": {
  26899. "type": "string",
  26900. "enum": ["sync"]
  26901. },
  26902. "id": {
  26903. "type": "string",
  26904. "pattern": "^evt_"
  26905. },
  26906. "syncEvent": {
  26907. "type": "object",
  26908. "properties": {
  26909. "type": {
  26910. "type": "string",
  26911. "enum": ["session.next.revert.cleared.1"]
  26912. },
  26913. "id": {
  26914. "type": "string",
  26915. "pattern": "^evt_"
  26916. },
  26917. "seq": {
  26918. "type": "number"
  26919. },
  26920. "aggregateID": {
  26921. "type": "string"
  26922. },
  26923. "data": {
  26924. "type": "object",
  26925. "properties": {
  26926. "timestamp": {
  26927. "type": "number"
  26928. },
  26929. "sessionID": {
  26930. "type": "string",
  26931. "pattern": "^ses"
  26932. }
  26933. },
  26934. "required": ["timestamp", "sessionID"],
  26935. "additionalProperties": false
  26936. }
  26937. },
  26938. "required": ["type", "id", "seq", "aggregateID", "data"],
  26939. "additionalProperties": false
  26940. }
  26941. },
  26942. "required": ["type", "id", "syncEvent"],
  26943. "additionalProperties": false
  26944. },
  26945. "SyncEventSessionNextRevertCommitted": {
  26946. "type": "object",
  26947. "properties": {
  26948. "type": {
  26949. "type": "string",
  26950. "enum": ["sync"]
  26951. },
  26952. "id": {
  26953. "type": "string",
  26954. "pattern": "^evt_"
  26955. },
  26956. "syncEvent": {
  26957. "type": "object",
  26958. "properties": {
  26959. "type": {
  26960. "type": "string",
  26961. "enum": ["session.next.revert.committed.1"]
  26962. },
  26963. "id": {
  26964. "type": "string",
  26965. "pattern": "^evt_"
  26966. },
  26967. "seq": {
  26968. "type": "number"
  26969. },
  26970. "aggregateID": {
  26971. "type": "string"
  26972. },
  26973. "data": {
  26974. "type": "object",
  26975. "properties": {
  26976. "timestamp": {
  26977. "type": "number"
  26978. },
  26979. "sessionID": {
  26980. "type": "string",
  26981. "pattern": "^ses"
  26982. },
  26983. "messageID": {
  26984. "type": "string",
  26985. "pattern": "^msg_"
  26986. }
  26987. },
  26988. "required": ["timestamp", "sessionID", "messageID"],
  26989. "additionalProperties": false
  26990. }
  26991. },
  26992. "required": ["type", "id", "seq", "aggregateID", "data"],
  26993. "additionalProperties": false
  26994. }
  26995. },
  26996. "required": ["type", "id", "syncEvent"],
  26997. "additionalProperties": false
  26998. },
  26999. "ConfigV2ReferenceGit": {
  27000. "type": "object",
  27001. "properties": {
  27002. "repository": {
  27003. "type": "string"
  27004. },
  27005. "branch": {
  27006. "type": "string"
  27007. },
  27008. "description": {
  27009. "type": "string"
  27010. },
  27011. "hidden": {
  27012. "type": "boolean"
  27013. }
  27014. },
  27015. "required": ["repository"],
  27016. "additionalProperties": false
  27017. },
  27018. "ConfigV2ReferenceLocal": {
  27019. "type": "object",
  27020. "properties": {
  27021. "path": {
  27022. "type": "string"
  27023. },
  27024. "description": {
  27025. "type": "string"
  27026. },
  27027. "hidden": {
  27028. "type": "boolean"
  27029. }
  27030. },
  27031. "required": ["path"],
  27032. "additionalProperties": false
  27033. },
  27034. "PolicyEffect": {
  27035. "type": "string",
  27036. "enum": ["allow", "deny"]
  27037. },
  27038. "ConfigV2ExperimentalPolicy": {
  27039. "type": "object",
  27040. "properties": {
  27041. "action": {
  27042. "type": "string",
  27043. "enum": ["provider.use"]
  27044. },
  27045. "effect": {
  27046. "$ref": "#/components/schemas/PolicyEffect"
  27047. },
  27048. "resource": {
  27049. "type": "string"
  27050. }
  27051. },
  27052. "required": ["action", "effect", "resource"],
  27053. "additionalProperties": false
  27054. },
  27055. "ProjectDirectories": {
  27056. "type": "array",
  27057. "items": {
  27058. "type": "object",
  27059. "properties": {
  27060. "directory": {
  27061. "type": "string"
  27062. },
  27063. "strategy": {
  27064. "type": "string"
  27065. }
  27066. },
  27067. "required": ["directory"],
  27068. "additionalProperties": false
  27069. }
  27070. },
  27071. "PtyTicketConnectToken": {
  27072. "type": "object",
  27073. "properties": {
  27074. "ticket": {
  27075. "type": "string"
  27076. },
  27077. "expires_in": {
  27078. "type": "integer",
  27079. "exclusiveMinimum": 0
  27080. }
  27081. },
  27082. "required": ["ticket", "expires_in"],
  27083. "additionalProperties": false
  27084. },
  27085. "WorkspaceEventConnectionStatus": {
  27086. "type": "object",
  27087. "properties": {
  27088. "workspaceID": {
  27089. "type": "string",
  27090. "pattern": "^wrk"
  27091. },
  27092. "status": {
  27093. "type": "string",
  27094. "enum": ["connected", "connecting", "disconnected", "error"]
  27095. }
  27096. },
  27097. "required": ["workspaceID", "status"],
  27098. "additionalProperties": false
  27099. },
  27100. "LocationInfo": {
  27101. "type": "object",
  27102. "properties": {
  27103. "directory": {
  27104. "type": "string"
  27105. },
  27106. "workspaceID": {
  27107. "type": "string",
  27108. "pattern": "^wrk"
  27109. },
  27110. "project": {
  27111. "type": "object",
  27112. "properties": {
  27113. "id": {
  27114. "type": "string"
  27115. },
  27116. "directory": {
  27117. "type": "string"
  27118. }
  27119. },
  27120. "required": ["id", "directory"],
  27121. "additionalProperties": false
  27122. }
  27123. },
  27124. "required": ["directory", "project"],
  27125. "additionalProperties": false
  27126. },
  27127. "ProviderRequest": {
  27128. "type": "object",
  27129. "properties": {
  27130. "headers": {
  27131. "type": "object",
  27132. "additionalProperties": {
  27133. "type": "string"
  27134. }
  27135. },
  27136. "body": {
  27137. "type": "object"
  27138. }
  27139. },
  27140. "required": ["headers", "body"],
  27141. "additionalProperties": false
  27142. },
  27143. "AgentColor": {
  27144. "anyOf": [
  27145. {
  27146. "type": "string",
  27147. "pattern": "^#[0-9a-fA-F]{6}$"
  27148. },
  27149. {
  27150. "type": "string",
  27151. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  27152. }
  27153. ]
  27154. },
  27155. "PermissionV2Effect": {
  27156. "type": "string",
  27157. "enum": ["allow", "deny", "ask"]
  27158. },
  27159. "PermissionV2Rule": {
  27160. "type": "object",
  27161. "properties": {
  27162. "action": {
  27163. "type": "string"
  27164. },
  27165. "resource": {
  27166. "type": "string"
  27167. },
  27168. "effect": {
  27169. "$ref": "#/components/schemas/PermissionV2Effect"
  27170. }
  27171. },
  27172. "required": ["action", "resource", "effect"],
  27173. "additionalProperties": false
  27174. },
  27175. "PermissionV2Ruleset": {
  27176. "type": "array",
  27177. "items": {
  27178. "$ref": "#/components/schemas/PermissionV2Rule"
  27179. }
  27180. },
  27181. "AgentV2Info": {
  27182. "type": "object",
  27183. "properties": {
  27184. "id": {
  27185. "type": "string"
  27186. },
  27187. "model": {
  27188. "$ref": "#/components/schemas/ModelRef"
  27189. },
  27190. "request": {
  27191. "$ref": "#/components/schemas/ProviderRequest"
  27192. },
  27193. "system": {
  27194. "type": "string"
  27195. },
  27196. "description": {
  27197. "type": "string"
  27198. },
  27199. "mode": {
  27200. "type": "string",
  27201. "enum": ["subagent", "primary", "all"]
  27202. },
  27203. "hidden": {
  27204. "type": "boolean"
  27205. },
  27206. "color": {
  27207. "$ref": "#/components/schemas/AgentColor"
  27208. },
  27209. "steps": {
  27210. "type": "integer",
  27211. "exclusiveMinimum": 0
  27212. },
  27213. "permissions": {
  27214. "$ref": "#/components/schemas/PermissionV2Ruleset"
  27215. }
  27216. },
  27217. "required": ["id", "request", "mode", "hidden", "permissions"],
  27218. "additionalProperties": false
  27219. },
  27220. "SessionV2Info": {
  27221. "type": "object",
  27222. "properties": {
  27223. "id": {
  27224. "type": "string",
  27225. "pattern": "^ses"
  27226. },
  27227. "parentID": {
  27228. "type": "string",
  27229. "pattern": "^ses"
  27230. },
  27231. "projectID": {
  27232. "type": "string"
  27233. },
  27234. "agent": {
  27235. "type": "string"
  27236. },
  27237. "model": {
  27238. "$ref": "#/components/schemas/ModelRef"
  27239. },
  27240. "cost": {
  27241. "type": "number"
  27242. },
  27243. "tokens": {
  27244. "type": "object",
  27245. "properties": {
  27246. "input": {
  27247. "type": "number"
  27248. },
  27249. "output": {
  27250. "type": "number"
  27251. },
  27252. "reasoning": {
  27253. "type": "number"
  27254. },
  27255. "cache": {
  27256. "type": "object",
  27257. "properties": {
  27258. "read": {
  27259. "type": "number"
  27260. },
  27261. "write": {
  27262. "type": "number"
  27263. }
  27264. },
  27265. "required": ["read", "write"],
  27266. "additionalProperties": false
  27267. }
  27268. },
  27269. "required": ["input", "output", "reasoning", "cache"],
  27270. "additionalProperties": false
  27271. },
  27272. "time": {
  27273. "type": "object",
  27274. "properties": {
  27275. "created": {
  27276. "type": "number"
  27277. },
  27278. "updated": {
  27279. "type": "number"
  27280. },
  27281. "archived": {
  27282. "type": "number"
  27283. }
  27284. },
  27285. "required": ["created", "updated"],
  27286. "additionalProperties": false
  27287. },
  27288. "title": {
  27289. "type": "string"
  27290. },
  27291. "location": {
  27292. "$ref": "#/components/schemas/LocationRef"
  27293. },
  27294. "subpath": {
  27295. "type": "string"
  27296. },
  27297. "revert": {
  27298. "$ref": "#/components/schemas/RevertState"
  27299. }
  27300. },
  27301. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  27302. "additionalProperties": false
  27303. },
  27304. "PromptInputFileAttachment": {
  27305. "type": "object",
  27306. "properties": {
  27307. "uri": {
  27308. "type": "string"
  27309. },
  27310. "name": {
  27311. "type": "string"
  27312. },
  27313. "description": {
  27314. "type": "string"
  27315. },
  27316. "source": {
  27317. "$ref": "#/components/schemas/PromptSource"
  27318. }
  27319. },
  27320. "required": ["uri"],
  27321. "additionalProperties": false
  27322. },
  27323. "SessionInputAdmitted": {
  27324. "type": "object",
  27325. "properties": {
  27326. "admittedSeq": {
  27327. "type": "integer",
  27328. "minimum": 0
  27329. },
  27330. "id": {
  27331. "type": "string",
  27332. "pattern": "^msg_"
  27333. },
  27334. "sessionID": {
  27335. "type": "string",
  27336. "pattern": "^ses"
  27337. },
  27338. "prompt": {
  27339. "$ref": "#/components/schemas/Prompt"
  27340. },
  27341. "delivery": {
  27342. "type": "string",
  27343. "enum": ["steer", "queue"]
  27344. },
  27345. "timeCreated": {
  27346. "type": "number"
  27347. },
  27348. "promotedSeq": {
  27349. "type": "integer",
  27350. "minimum": 0
  27351. }
  27352. },
  27353. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  27354. "additionalProperties": false
  27355. },
  27356. "SessionMessageAgentSwitched": {
  27357. "type": "object",
  27358. "properties": {
  27359. "id": {
  27360. "type": "string",
  27361. "pattern": "^msg_"
  27362. },
  27363. "metadata": {
  27364. "type": "object"
  27365. },
  27366. "time": {
  27367. "type": "object",
  27368. "properties": {
  27369. "created": {
  27370. "type": "number"
  27371. }
  27372. },
  27373. "required": ["created"],
  27374. "additionalProperties": false
  27375. },
  27376. "type": {
  27377. "type": "string",
  27378. "enum": ["agent-switched"]
  27379. },
  27380. "agent": {
  27381. "type": "string"
  27382. }
  27383. },
  27384. "required": ["id", "time", "type", "agent"],
  27385. "additionalProperties": false
  27386. },
  27387. "SessionMessageModelSwitched": {
  27388. "type": "object",
  27389. "properties": {
  27390. "id": {
  27391. "type": "string",
  27392. "pattern": "^msg_"
  27393. },
  27394. "metadata": {
  27395. "type": "object"
  27396. },
  27397. "time": {
  27398. "type": "object",
  27399. "properties": {
  27400. "created": {
  27401. "type": "number"
  27402. }
  27403. },
  27404. "required": ["created"],
  27405. "additionalProperties": false
  27406. },
  27407. "type": {
  27408. "type": "string",
  27409. "enum": ["model-switched"]
  27410. },
  27411. "model": {
  27412. "$ref": "#/components/schemas/ModelRef"
  27413. }
  27414. },
  27415. "required": ["id", "time", "type", "model"],
  27416. "additionalProperties": false
  27417. },
  27418. "SessionMessageUser": {
  27419. "type": "object",
  27420. "properties": {
  27421. "id": {
  27422. "type": "string",
  27423. "pattern": "^msg_"
  27424. },
  27425. "metadata": {
  27426. "type": "object"
  27427. },
  27428. "time": {
  27429. "type": "object",
  27430. "properties": {
  27431. "created": {
  27432. "type": "number"
  27433. }
  27434. },
  27435. "required": ["created"],
  27436. "additionalProperties": false
  27437. },
  27438. "text": {
  27439. "type": "string"
  27440. },
  27441. "files": {
  27442. "type": "array",
  27443. "items": {
  27444. "$ref": "#/components/schemas/PromptFileAttachment"
  27445. }
  27446. },
  27447. "agents": {
  27448. "type": "array",
  27449. "items": {
  27450. "$ref": "#/components/schemas/PromptAgentAttachment"
  27451. }
  27452. },
  27453. "type": {
  27454. "type": "string",
  27455. "enum": ["user"]
  27456. }
  27457. },
  27458. "required": ["id", "time", "text", "type"],
  27459. "additionalProperties": false
  27460. },
  27461. "SessionMessageSynthetic": {
  27462. "type": "object",
  27463. "properties": {
  27464. "id": {
  27465. "type": "string",
  27466. "pattern": "^msg_"
  27467. },
  27468. "metadata": {
  27469. "type": "object"
  27470. },
  27471. "time": {
  27472. "type": "object",
  27473. "properties": {
  27474. "created": {
  27475. "type": "number"
  27476. }
  27477. },
  27478. "required": ["created"],
  27479. "additionalProperties": false
  27480. },
  27481. "sessionID": {
  27482. "type": "string",
  27483. "pattern": "^ses"
  27484. },
  27485. "text": {
  27486. "type": "string"
  27487. },
  27488. "type": {
  27489. "type": "string",
  27490. "enum": ["synthetic"]
  27491. }
  27492. },
  27493. "required": ["id", "time", "sessionID", "text", "type"],
  27494. "additionalProperties": false
  27495. },
  27496. "SessionMessageSystem": {
  27497. "type": "object",
  27498. "properties": {
  27499. "id": {
  27500. "type": "string",
  27501. "pattern": "^msg_"
  27502. },
  27503. "metadata": {
  27504. "type": "object"
  27505. },
  27506. "time": {
  27507. "type": "object",
  27508. "properties": {
  27509. "created": {
  27510. "type": "number"
  27511. }
  27512. },
  27513. "required": ["created"],
  27514. "additionalProperties": false
  27515. },
  27516. "type": {
  27517. "type": "string",
  27518. "enum": ["system"]
  27519. },
  27520. "text": {
  27521. "type": "string"
  27522. }
  27523. },
  27524. "required": ["id", "time", "type", "text"],
  27525. "additionalProperties": false
  27526. },
  27527. "SessionMessageShell": {
  27528. "type": "object",
  27529. "properties": {
  27530. "id": {
  27531. "type": "string",
  27532. "pattern": "^msg_"
  27533. },
  27534. "metadata": {
  27535. "type": "object"
  27536. },
  27537. "time": {
  27538. "type": "object",
  27539. "properties": {
  27540. "created": {
  27541. "type": "number"
  27542. },
  27543. "completed": {
  27544. "type": "number"
  27545. }
  27546. },
  27547. "required": ["created"],
  27548. "additionalProperties": false
  27549. },
  27550. "type": {
  27551. "type": "string",
  27552. "enum": ["shell"]
  27553. },
  27554. "callID": {
  27555. "type": "string"
  27556. },
  27557. "command": {
  27558. "type": "string"
  27559. },
  27560. "output": {
  27561. "type": "string"
  27562. }
  27563. },
  27564. "required": ["id", "time", "type", "callID", "command", "output"],
  27565. "additionalProperties": false
  27566. },
  27567. "SessionMessageAssistantText": {
  27568. "type": "object",
  27569. "properties": {
  27570. "type": {
  27571. "type": "string",
  27572. "enum": ["text"]
  27573. },
  27574. "id": {
  27575. "type": "string"
  27576. },
  27577. "text": {
  27578. "type": "string"
  27579. }
  27580. },
  27581. "required": ["type", "id", "text"],
  27582. "additionalProperties": false
  27583. },
  27584. "SessionMessageAssistantReasoning": {
  27585. "type": "object",
  27586. "properties": {
  27587. "type": {
  27588. "type": "string",
  27589. "enum": ["reasoning"]
  27590. },
  27591. "id": {
  27592. "type": "string"
  27593. },
  27594. "text": {
  27595. "type": "string"
  27596. },
  27597. "providerMetadata": {
  27598. "$ref": "#/components/schemas/LLMProviderMetadata"
  27599. },
  27600. "time": {
  27601. "type": "object",
  27602. "properties": {
  27603. "created": {
  27604. "type": "number"
  27605. },
  27606. "completed": {
  27607. "type": "number"
  27608. }
  27609. },
  27610. "required": ["created"],
  27611. "additionalProperties": false
  27612. }
  27613. },
  27614. "required": ["type", "id", "text"],
  27615. "additionalProperties": false
  27616. },
  27617. "SessionMessageToolStatePending": {
  27618. "type": "object",
  27619. "properties": {
  27620. "status": {
  27621. "type": "string",
  27622. "enum": ["pending"]
  27623. },
  27624. "input": {
  27625. "type": "string"
  27626. }
  27627. },
  27628. "required": ["status", "input"],
  27629. "additionalProperties": false
  27630. },
  27631. "SessionMessageToolStateRunning": {
  27632. "type": "object",
  27633. "properties": {
  27634. "status": {
  27635. "type": "string",
  27636. "enum": ["running"]
  27637. },
  27638. "input": {
  27639. "type": "object"
  27640. },
  27641. "structured": {
  27642. "type": "object"
  27643. },
  27644. "content": {
  27645. "type": "array",
  27646. "items": {
  27647. "$ref": "#/components/schemas/LLMToolContent"
  27648. }
  27649. }
  27650. },
  27651. "required": ["status", "input", "structured", "content"],
  27652. "additionalProperties": false
  27653. },
  27654. "SessionMessageToolStateCompleted": {
  27655. "type": "object",
  27656. "properties": {
  27657. "status": {
  27658. "type": "string",
  27659. "enum": ["completed"]
  27660. },
  27661. "input": {
  27662. "type": "object"
  27663. },
  27664. "attachments": {
  27665. "type": "array",
  27666. "items": {
  27667. "$ref": "#/components/schemas/PromptFileAttachment"
  27668. }
  27669. },
  27670. "content": {
  27671. "type": "array",
  27672. "items": {
  27673. "$ref": "#/components/schemas/LLMToolContent"
  27674. }
  27675. },
  27676. "outputPaths": {
  27677. "type": "array",
  27678. "items": {
  27679. "type": "string"
  27680. }
  27681. },
  27682. "structured": {
  27683. "type": "object"
  27684. },
  27685. "result": {}
  27686. },
  27687. "required": ["status", "input", "content", "structured"],
  27688. "additionalProperties": false
  27689. },
  27690. "SessionMessageToolStateError": {
  27691. "type": "object",
  27692. "properties": {
  27693. "status": {
  27694. "type": "string",
  27695. "enum": ["error"]
  27696. },
  27697. "input": {
  27698. "type": "object"
  27699. },
  27700. "content": {
  27701. "type": "array",
  27702. "items": {
  27703. "$ref": "#/components/schemas/LLMToolContent"
  27704. }
  27705. },
  27706. "structured": {
  27707. "type": "object"
  27708. },
  27709. "error": {
  27710. "$ref": "#/components/schemas/SessionErrorUnknown"
  27711. },
  27712. "result": {}
  27713. },
  27714. "required": ["status", "input", "content", "structured", "error"],
  27715. "additionalProperties": false
  27716. },
  27717. "SessionMessageAssistantTool": {
  27718. "type": "object",
  27719. "properties": {
  27720. "type": {
  27721. "type": "string",
  27722. "enum": ["tool"]
  27723. },
  27724. "id": {
  27725. "type": "string"
  27726. },
  27727. "name": {
  27728. "type": "string"
  27729. },
  27730. "provider": {
  27731. "type": "object",
  27732. "properties": {
  27733. "executed": {
  27734. "type": "boolean"
  27735. },
  27736. "metadata": {
  27737. "$ref": "#/components/schemas/LLMProviderMetadata"
  27738. },
  27739. "resultMetadata": {
  27740. "$ref": "#/components/schemas/LLMProviderMetadata"
  27741. }
  27742. },
  27743. "required": ["executed"],
  27744. "additionalProperties": false
  27745. },
  27746. "state": {
  27747. "anyOf": [
  27748. {
  27749. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  27750. },
  27751. {
  27752. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  27753. },
  27754. {
  27755. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  27756. },
  27757. {
  27758. "$ref": "#/components/schemas/SessionMessageToolStateError"
  27759. }
  27760. ]
  27761. },
  27762. "time": {
  27763. "type": "object",
  27764. "properties": {
  27765. "created": {
  27766. "type": "number"
  27767. },
  27768. "ran": {
  27769. "type": "number"
  27770. },
  27771. "completed": {
  27772. "type": "number"
  27773. },
  27774. "pruned": {
  27775. "type": "number"
  27776. }
  27777. },
  27778. "required": ["created"],
  27779. "additionalProperties": false
  27780. }
  27781. },
  27782. "required": ["type", "id", "name", "state", "time"],
  27783. "additionalProperties": false
  27784. },
  27785. "SessionMessageAssistant": {
  27786. "type": "object",
  27787. "properties": {
  27788. "id": {
  27789. "type": "string",
  27790. "pattern": "^msg_"
  27791. },
  27792. "metadata": {
  27793. "type": "object"
  27794. },
  27795. "time": {
  27796. "type": "object",
  27797. "properties": {
  27798. "created": {
  27799. "type": "number"
  27800. },
  27801. "completed": {
  27802. "type": "number"
  27803. }
  27804. },
  27805. "required": ["created"],
  27806. "additionalProperties": false
  27807. },
  27808. "type": {
  27809. "type": "string",
  27810. "enum": ["assistant"]
  27811. },
  27812. "agent": {
  27813. "type": "string"
  27814. },
  27815. "model": {
  27816. "$ref": "#/components/schemas/ModelRef"
  27817. },
  27818. "content": {
  27819. "type": "array",
  27820. "items": {
  27821. "anyOf": [
  27822. {
  27823. "$ref": "#/components/schemas/SessionMessageAssistantText"
  27824. },
  27825. {
  27826. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  27827. },
  27828. {
  27829. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  27830. }
  27831. ]
  27832. }
  27833. },
  27834. "snapshot": {
  27835. "type": "object",
  27836. "properties": {
  27837. "start": {
  27838. "type": "string"
  27839. },
  27840. "end": {
  27841. "type": "string"
  27842. },
  27843. "files": {
  27844. "type": "array",
  27845. "items": {
  27846. "type": "string"
  27847. }
  27848. }
  27849. },
  27850. "additionalProperties": false
  27851. },
  27852. "finish": {
  27853. "type": "string"
  27854. },
  27855. "cost": {
  27856. "type": "number"
  27857. },
  27858. "tokens": {
  27859. "type": "object",
  27860. "properties": {
  27861. "input": {
  27862. "type": "number"
  27863. },
  27864. "output": {
  27865. "type": "number"
  27866. },
  27867. "reasoning": {
  27868. "type": "number"
  27869. },
  27870. "cache": {
  27871. "type": "object",
  27872. "properties": {
  27873. "read": {
  27874. "type": "number"
  27875. },
  27876. "write": {
  27877. "type": "number"
  27878. }
  27879. },
  27880. "required": ["read", "write"],
  27881. "additionalProperties": false
  27882. }
  27883. },
  27884. "required": ["input", "output", "reasoning", "cache"],
  27885. "additionalProperties": false
  27886. },
  27887. "error": {
  27888. "$ref": "#/components/schemas/SessionErrorUnknown"
  27889. }
  27890. },
  27891. "required": ["id", "time", "type", "agent", "model", "content"],
  27892. "additionalProperties": false
  27893. },
  27894. "SessionMessageCompaction": {
  27895. "type": "object",
  27896. "properties": {
  27897. "type": {
  27898. "type": "string",
  27899. "enum": ["compaction"]
  27900. },
  27901. "reason": {
  27902. "type": "string",
  27903. "enum": ["auto", "manual"]
  27904. },
  27905. "summary": {
  27906. "type": "string"
  27907. },
  27908. "recent": {
  27909. "type": "string"
  27910. },
  27911. "id": {
  27912. "type": "string",
  27913. "pattern": "^msg_"
  27914. },
  27915. "metadata": {
  27916. "type": "object"
  27917. },
  27918. "time": {
  27919. "type": "object",
  27920. "properties": {
  27921. "created": {
  27922. "type": "number"
  27923. }
  27924. },
  27925. "required": ["created"],
  27926. "additionalProperties": false
  27927. }
  27928. },
  27929. "required": ["type", "reason", "summary", "recent", "id", "time"],
  27930. "additionalProperties": false
  27931. },
  27932. "SessionMessage": {
  27933. "anyOf": [
  27934. {
  27935. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  27936. },
  27937. {
  27938. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  27939. },
  27940. {
  27941. "$ref": "#/components/schemas/SessionMessageUser"
  27942. },
  27943. {
  27944. "$ref": "#/components/schemas/SessionMessageSynthetic"
  27945. },
  27946. {
  27947. "$ref": "#/components/schemas/SessionMessageSystem"
  27948. },
  27949. {
  27950. "$ref": "#/components/schemas/SessionMessageShell"
  27951. },
  27952. {
  27953. "$ref": "#/components/schemas/SessionMessageAssistant"
  27954. },
  27955. {
  27956. "$ref": "#/components/schemas/SessionMessageCompaction"
  27957. }
  27958. ]
  27959. },
  27960. "SessionNextAgentSwitched": {
  27961. "type": "object",
  27962. "properties": {
  27963. "id": {
  27964. "type": "string",
  27965. "pattern": "^evt_"
  27966. },
  27967. "metadata": {
  27968. "type": "object"
  27969. },
  27970. "type": {
  27971. "type": "string",
  27972. "enum": ["session.next.agent.switched"]
  27973. },
  27974. "durable": {
  27975. "type": "object",
  27976. "properties": {
  27977. "aggregateID": {
  27978. "type": "string"
  27979. },
  27980. "seq": {
  27981. "type": "integer"
  27982. },
  27983. "version": {
  27984. "type": "integer"
  27985. }
  27986. },
  27987. "required": ["aggregateID", "seq", "version"],
  27988. "additionalProperties": false
  27989. },
  27990. "location": {
  27991. "$ref": "#/components/schemas/LocationRef"
  27992. },
  27993. "data": {
  27994. "type": "object",
  27995. "properties": {
  27996. "timestamp": {
  27997. "type": "number"
  27998. },
  27999. "sessionID": {
  28000. "type": "string",
  28001. "pattern": "^ses"
  28002. },
  28003. "messageID": {
  28004. "type": "string",
  28005. "pattern": "^msg_"
  28006. },
  28007. "agent": {
  28008. "type": "string"
  28009. }
  28010. },
  28011. "required": ["timestamp", "sessionID", "messageID", "agent"],
  28012. "additionalProperties": false
  28013. }
  28014. },
  28015. "required": ["id", "type", "data"],
  28016. "additionalProperties": false
  28017. },
  28018. "SessionNextModelSwitched": {
  28019. "type": "object",
  28020. "properties": {
  28021. "id": {
  28022. "type": "string",
  28023. "pattern": "^evt_"
  28024. },
  28025. "metadata": {
  28026. "type": "object"
  28027. },
  28028. "type": {
  28029. "type": "string",
  28030. "enum": ["session.next.model.switched"]
  28031. },
  28032. "durable": {
  28033. "type": "object",
  28034. "properties": {
  28035. "aggregateID": {
  28036. "type": "string"
  28037. },
  28038. "seq": {
  28039. "type": "integer"
  28040. },
  28041. "version": {
  28042. "type": "integer"
  28043. }
  28044. },
  28045. "required": ["aggregateID", "seq", "version"],
  28046. "additionalProperties": false
  28047. },
  28048. "location": {
  28049. "$ref": "#/components/schemas/LocationRef"
  28050. },
  28051. "data": {
  28052. "type": "object",
  28053. "properties": {
  28054. "timestamp": {
  28055. "type": "number"
  28056. },
  28057. "sessionID": {
  28058. "type": "string",
  28059. "pattern": "^ses"
  28060. },
  28061. "messageID": {
  28062. "type": "string",
  28063. "pattern": "^msg_"
  28064. },
  28065. "model": {
  28066. "$ref": "#/components/schemas/ModelRef"
  28067. }
  28068. },
  28069. "required": ["timestamp", "sessionID", "messageID", "model"],
  28070. "additionalProperties": false
  28071. }
  28072. },
  28073. "required": ["id", "type", "data"],
  28074. "additionalProperties": false
  28075. },
  28076. "SessionNextMoved": {
  28077. "type": "object",
  28078. "properties": {
  28079. "id": {
  28080. "type": "string",
  28081. "pattern": "^evt_"
  28082. },
  28083. "metadata": {
  28084. "type": "object"
  28085. },
  28086. "type": {
  28087. "type": "string",
  28088. "enum": ["session.next.moved"]
  28089. },
  28090. "durable": {
  28091. "type": "object",
  28092. "properties": {
  28093. "aggregateID": {
  28094. "type": "string"
  28095. },
  28096. "seq": {
  28097. "type": "integer"
  28098. },
  28099. "version": {
  28100. "type": "integer"
  28101. }
  28102. },
  28103. "required": ["aggregateID", "seq", "version"],
  28104. "additionalProperties": false
  28105. },
  28106. "location": {
  28107. "$ref": "#/components/schemas/LocationRef"
  28108. },
  28109. "data": {
  28110. "type": "object",
  28111. "properties": {
  28112. "timestamp": {
  28113. "type": "number"
  28114. },
  28115. "sessionID": {
  28116. "type": "string",
  28117. "pattern": "^ses"
  28118. },
  28119. "location": {
  28120. "$ref": "#/components/schemas/LocationRef"
  28121. },
  28122. "subdirectory": {
  28123. "type": "string"
  28124. }
  28125. },
  28126. "required": ["timestamp", "sessionID", "location"],
  28127. "additionalProperties": false
  28128. }
  28129. },
  28130. "required": ["id", "type", "data"],
  28131. "additionalProperties": false
  28132. },
  28133. "SessionNextPrompted": {
  28134. "type": "object",
  28135. "properties": {
  28136. "id": {
  28137. "type": "string",
  28138. "pattern": "^evt_"
  28139. },
  28140. "metadata": {
  28141. "type": "object"
  28142. },
  28143. "type": {
  28144. "type": "string",
  28145. "enum": ["session.next.prompted"]
  28146. },
  28147. "durable": {
  28148. "type": "object",
  28149. "properties": {
  28150. "aggregateID": {
  28151. "type": "string"
  28152. },
  28153. "seq": {
  28154. "type": "integer"
  28155. },
  28156. "version": {
  28157. "type": "integer"
  28158. }
  28159. },
  28160. "required": ["aggregateID", "seq", "version"],
  28161. "additionalProperties": false
  28162. },
  28163. "location": {
  28164. "$ref": "#/components/schemas/LocationRef"
  28165. },
  28166. "data": {
  28167. "type": "object",
  28168. "properties": {
  28169. "timestamp": {
  28170. "type": "number"
  28171. },
  28172. "sessionID": {
  28173. "type": "string",
  28174. "pattern": "^ses"
  28175. },
  28176. "messageID": {
  28177. "type": "string",
  28178. "pattern": "^msg_"
  28179. },
  28180. "prompt": {
  28181. "$ref": "#/components/schemas/Prompt"
  28182. },
  28183. "delivery": {
  28184. "type": "string",
  28185. "enum": ["steer", "queue"]
  28186. }
  28187. },
  28188. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28189. "additionalProperties": false
  28190. }
  28191. },
  28192. "required": ["id", "type", "data"],
  28193. "additionalProperties": false
  28194. },
  28195. "SessionNextPromptAdmitted": {
  28196. "type": "object",
  28197. "properties": {
  28198. "id": {
  28199. "type": "string",
  28200. "pattern": "^evt_"
  28201. },
  28202. "metadata": {
  28203. "type": "object"
  28204. },
  28205. "type": {
  28206. "type": "string",
  28207. "enum": ["session.next.prompt.admitted"]
  28208. },
  28209. "durable": {
  28210. "type": "object",
  28211. "properties": {
  28212. "aggregateID": {
  28213. "type": "string"
  28214. },
  28215. "seq": {
  28216. "type": "integer"
  28217. },
  28218. "version": {
  28219. "type": "integer"
  28220. }
  28221. },
  28222. "required": ["aggregateID", "seq", "version"],
  28223. "additionalProperties": false
  28224. },
  28225. "location": {
  28226. "$ref": "#/components/schemas/LocationRef"
  28227. },
  28228. "data": {
  28229. "type": "object",
  28230. "properties": {
  28231. "timestamp": {
  28232. "type": "number"
  28233. },
  28234. "sessionID": {
  28235. "type": "string",
  28236. "pattern": "^ses"
  28237. },
  28238. "messageID": {
  28239. "type": "string",
  28240. "pattern": "^msg_"
  28241. },
  28242. "prompt": {
  28243. "$ref": "#/components/schemas/Prompt"
  28244. },
  28245. "delivery": {
  28246. "type": "string",
  28247. "enum": ["steer", "queue"]
  28248. }
  28249. },
  28250. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28251. "additionalProperties": false
  28252. }
  28253. },
  28254. "required": ["id", "type", "data"],
  28255. "additionalProperties": false
  28256. },
  28257. "SessionNextContextUpdated": {
  28258. "type": "object",
  28259. "properties": {
  28260. "id": {
  28261. "type": "string",
  28262. "pattern": "^evt_"
  28263. },
  28264. "metadata": {
  28265. "type": "object"
  28266. },
  28267. "type": {
  28268. "type": "string",
  28269. "enum": ["session.next.context.updated"]
  28270. },
  28271. "durable": {
  28272. "type": "object",
  28273. "properties": {
  28274. "aggregateID": {
  28275. "type": "string"
  28276. },
  28277. "seq": {
  28278. "type": "integer"
  28279. },
  28280. "version": {
  28281. "type": "integer"
  28282. }
  28283. },
  28284. "required": ["aggregateID", "seq", "version"],
  28285. "additionalProperties": false
  28286. },
  28287. "location": {
  28288. "$ref": "#/components/schemas/LocationRef"
  28289. },
  28290. "data": {
  28291. "type": "object",
  28292. "properties": {
  28293. "timestamp": {
  28294. "type": "number"
  28295. },
  28296. "sessionID": {
  28297. "type": "string",
  28298. "pattern": "^ses"
  28299. },
  28300. "messageID": {
  28301. "type": "string",
  28302. "pattern": "^msg_"
  28303. },
  28304. "text": {
  28305. "type": "string"
  28306. }
  28307. },
  28308. "required": ["timestamp", "sessionID", "messageID", "text"],
  28309. "additionalProperties": false
  28310. }
  28311. },
  28312. "required": ["id", "type", "data"],
  28313. "additionalProperties": false
  28314. },
  28315. "SessionNextSynthetic": {
  28316. "type": "object",
  28317. "properties": {
  28318. "id": {
  28319. "type": "string",
  28320. "pattern": "^evt_"
  28321. },
  28322. "metadata": {
  28323. "type": "object"
  28324. },
  28325. "type": {
  28326. "type": "string",
  28327. "enum": ["session.next.synthetic"]
  28328. },
  28329. "durable": {
  28330. "type": "object",
  28331. "properties": {
  28332. "aggregateID": {
  28333. "type": "string"
  28334. },
  28335. "seq": {
  28336. "type": "integer"
  28337. },
  28338. "version": {
  28339. "type": "integer"
  28340. }
  28341. },
  28342. "required": ["aggregateID", "seq", "version"],
  28343. "additionalProperties": false
  28344. },
  28345. "location": {
  28346. "$ref": "#/components/schemas/LocationRef"
  28347. },
  28348. "data": {
  28349. "type": "object",
  28350. "properties": {
  28351. "timestamp": {
  28352. "type": "number"
  28353. },
  28354. "sessionID": {
  28355. "type": "string",
  28356. "pattern": "^ses"
  28357. },
  28358. "messageID": {
  28359. "type": "string",
  28360. "pattern": "^msg_"
  28361. },
  28362. "text": {
  28363. "type": "string"
  28364. }
  28365. },
  28366. "required": ["timestamp", "sessionID", "messageID", "text"],
  28367. "additionalProperties": false
  28368. }
  28369. },
  28370. "required": ["id", "type", "data"],
  28371. "additionalProperties": false
  28372. },
  28373. "SessionNextShellStarted": {
  28374. "type": "object",
  28375. "properties": {
  28376. "id": {
  28377. "type": "string",
  28378. "pattern": "^evt_"
  28379. },
  28380. "metadata": {
  28381. "type": "object"
  28382. },
  28383. "type": {
  28384. "type": "string",
  28385. "enum": ["session.next.shell.started"]
  28386. },
  28387. "durable": {
  28388. "type": "object",
  28389. "properties": {
  28390. "aggregateID": {
  28391. "type": "string"
  28392. },
  28393. "seq": {
  28394. "type": "integer"
  28395. },
  28396. "version": {
  28397. "type": "integer"
  28398. }
  28399. },
  28400. "required": ["aggregateID", "seq", "version"],
  28401. "additionalProperties": false
  28402. },
  28403. "location": {
  28404. "$ref": "#/components/schemas/LocationRef"
  28405. },
  28406. "data": {
  28407. "type": "object",
  28408. "properties": {
  28409. "timestamp": {
  28410. "type": "number"
  28411. },
  28412. "sessionID": {
  28413. "type": "string",
  28414. "pattern": "^ses"
  28415. },
  28416. "messageID": {
  28417. "type": "string",
  28418. "pattern": "^msg_"
  28419. },
  28420. "callID": {
  28421. "type": "string"
  28422. },
  28423. "command": {
  28424. "type": "string"
  28425. }
  28426. },
  28427. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28428. "additionalProperties": false
  28429. }
  28430. },
  28431. "required": ["id", "type", "data"],
  28432. "additionalProperties": false
  28433. },
  28434. "SessionNextShellEnded": {
  28435. "type": "object",
  28436. "properties": {
  28437. "id": {
  28438. "type": "string",
  28439. "pattern": "^evt_"
  28440. },
  28441. "metadata": {
  28442. "type": "object"
  28443. },
  28444. "type": {
  28445. "type": "string",
  28446. "enum": ["session.next.shell.ended"]
  28447. },
  28448. "durable": {
  28449. "type": "object",
  28450. "properties": {
  28451. "aggregateID": {
  28452. "type": "string"
  28453. },
  28454. "seq": {
  28455. "type": "integer"
  28456. },
  28457. "version": {
  28458. "type": "integer"
  28459. }
  28460. },
  28461. "required": ["aggregateID", "seq", "version"],
  28462. "additionalProperties": false
  28463. },
  28464. "location": {
  28465. "$ref": "#/components/schemas/LocationRef"
  28466. },
  28467. "data": {
  28468. "type": "object",
  28469. "properties": {
  28470. "timestamp": {
  28471. "type": "number"
  28472. },
  28473. "sessionID": {
  28474. "type": "string",
  28475. "pattern": "^ses"
  28476. },
  28477. "callID": {
  28478. "type": "string"
  28479. },
  28480. "output": {
  28481. "type": "string"
  28482. }
  28483. },
  28484. "required": ["timestamp", "sessionID", "callID", "output"],
  28485. "additionalProperties": false
  28486. }
  28487. },
  28488. "required": ["id", "type", "data"],
  28489. "additionalProperties": false
  28490. },
  28491. "SessionNextStepStarted": {
  28492. "type": "object",
  28493. "properties": {
  28494. "id": {
  28495. "type": "string",
  28496. "pattern": "^evt_"
  28497. },
  28498. "metadata": {
  28499. "type": "object"
  28500. },
  28501. "type": {
  28502. "type": "string",
  28503. "enum": ["session.next.step.started"]
  28504. },
  28505. "durable": {
  28506. "type": "object",
  28507. "properties": {
  28508. "aggregateID": {
  28509. "type": "string"
  28510. },
  28511. "seq": {
  28512. "type": "integer"
  28513. },
  28514. "version": {
  28515. "type": "integer"
  28516. }
  28517. },
  28518. "required": ["aggregateID", "seq", "version"],
  28519. "additionalProperties": false
  28520. },
  28521. "location": {
  28522. "$ref": "#/components/schemas/LocationRef"
  28523. },
  28524. "data": {
  28525. "type": "object",
  28526. "properties": {
  28527. "timestamp": {
  28528. "type": "number"
  28529. },
  28530. "sessionID": {
  28531. "type": "string",
  28532. "pattern": "^ses"
  28533. },
  28534. "assistantMessageID": {
  28535. "type": "string",
  28536. "pattern": "^msg_"
  28537. },
  28538. "agent": {
  28539. "type": "string"
  28540. },
  28541. "model": {
  28542. "$ref": "#/components/schemas/ModelRef"
  28543. },
  28544. "snapshot": {
  28545. "type": "string"
  28546. }
  28547. },
  28548. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28549. "additionalProperties": false
  28550. }
  28551. },
  28552. "required": ["id", "type", "data"],
  28553. "additionalProperties": false
  28554. },
  28555. "SessionNextStepEnded": {
  28556. "type": "object",
  28557. "properties": {
  28558. "id": {
  28559. "type": "string",
  28560. "pattern": "^evt_"
  28561. },
  28562. "metadata": {
  28563. "type": "object"
  28564. },
  28565. "type": {
  28566. "type": "string",
  28567. "enum": ["session.next.step.ended"]
  28568. },
  28569. "durable": {
  28570. "type": "object",
  28571. "properties": {
  28572. "aggregateID": {
  28573. "type": "string"
  28574. },
  28575. "seq": {
  28576. "type": "integer"
  28577. },
  28578. "version": {
  28579. "type": "integer"
  28580. }
  28581. },
  28582. "required": ["aggregateID", "seq", "version"],
  28583. "additionalProperties": false
  28584. },
  28585. "location": {
  28586. "$ref": "#/components/schemas/LocationRef"
  28587. },
  28588. "data": {
  28589. "type": "object",
  28590. "properties": {
  28591. "timestamp": {
  28592. "type": "number"
  28593. },
  28594. "sessionID": {
  28595. "type": "string",
  28596. "pattern": "^ses"
  28597. },
  28598. "assistantMessageID": {
  28599. "type": "string",
  28600. "pattern": "^msg_"
  28601. },
  28602. "finish": {
  28603. "type": "string"
  28604. },
  28605. "cost": {
  28606. "type": "number"
  28607. },
  28608. "tokens": {
  28609. "type": "object",
  28610. "properties": {
  28611. "input": {
  28612. "type": "number"
  28613. },
  28614. "output": {
  28615. "type": "number"
  28616. },
  28617. "reasoning": {
  28618. "type": "number"
  28619. },
  28620. "cache": {
  28621. "type": "object",
  28622. "properties": {
  28623. "read": {
  28624. "type": "number"
  28625. },
  28626. "write": {
  28627. "type": "number"
  28628. }
  28629. },
  28630. "required": ["read", "write"],
  28631. "additionalProperties": false
  28632. }
  28633. },
  28634. "required": ["input", "output", "reasoning", "cache"],
  28635. "additionalProperties": false
  28636. },
  28637. "snapshot": {
  28638. "type": "string"
  28639. },
  28640. "files": {
  28641. "type": "array",
  28642. "items": {
  28643. "type": "string"
  28644. }
  28645. }
  28646. },
  28647. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28648. "additionalProperties": false
  28649. }
  28650. },
  28651. "required": ["id", "type", "data"],
  28652. "additionalProperties": false
  28653. },
  28654. "SessionNextStepFailed": {
  28655. "type": "object",
  28656. "properties": {
  28657. "id": {
  28658. "type": "string",
  28659. "pattern": "^evt_"
  28660. },
  28661. "metadata": {
  28662. "type": "object"
  28663. },
  28664. "type": {
  28665. "type": "string",
  28666. "enum": ["session.next.step.failed"]
  28667. },
  28668. "durable": {
  28669. "type": "object",
  28670. "properties": {
  28671. "aggregateID": {
  28672. "type": "string"
  28673. },
  28674. "seq": {
  28675. "type": "integer"
  28676. },
  28677. "version": {
  28678. "type": "integer"
  28679. }
  28680. },
  28681. "required": ["aggregateID", "seq", "version"],
  28682. "additionalProperties": false
  28683. },
  28684. "location": {
  28685. "$ref": "#/components/schemas/LocationRef"
  28686. },
  28687. "data": {
  28688. "type": "object",
  28689. "properties": {
  28690. "timestamp": {
  28691. "type": "number"
  28692. },
  28693. "sessionID": {
  28694. "type": "string",
  28695. "pattern": "^ses"
  28696. },
  28697. "assistantMessageID": {
  28698. "type": "string",
  28699. "pattern": "^msg_"
  28700. },
  28701. "error": {
  28702. "$ref": "#/components/schemas/SessionErrorUnknown"
  28703. }
  28704. },
  28705. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28706. "additionalProperties": false
  28707. }
  28708. },
  28709. "required": ["id", "type", "data"],
  28710. "additionalProperties": false
  28711. },
  28712. "SessionNextTextStarted": {
  28713. "type": "object",
  28714. "properties": {
  28715. "id": {
  28716. "type": "string",
  28717. "pattern": "^evt_"
  28718. },
  28719. "metadata": {
  28720. "type": "object"
  28721. },
  28722. "type": {
  28723. "type": "string",
  28724. "enum": ["session.next.text.started"]
  28725. },
  28726. "durable": {
  28727. "type": "object",
  28728. "properties": {
  28729. "aggregateID": {
  28730. "type": "string"
  28731. },
  28732. "seq": {
  28733. "type": "integer"
  28734. },
  28735. "version": {
  28736. "type": "integer"
  28737. }
  28738. },
  28739. "required": ["aggregateID", "seq", "version"],
  28740. "additionalProperties": false
  28741. },
  28742. "location": {
  28743. "$ref": "#/components/schemas/LocationRef"
  28744. },
  28745. "data": {
  28746. "type": "object",
  28747. "properties": {
  28748. "timestamp": {
  28749. "type": "number"
  28750. },
  28751. "sessionID": {
  28752. "type": "string",
  28753. "pattern": "^ses"
  28754. },
  28755. "assistantMessageID": {
  28756. "type": "string",
  28757. "pattern": "^msg_"
  28758. },
  28759. "textID": {
  28760. "type": "string"
  28761. }
  28762. },
  28763. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28764. "additionalProperties": false
  28765. }
  28766. },
  28767. "required": ["id", "type", "data"],
  28768. "additionalProperties": false
  28769. },
  28770. "SessionNextTextEnded": {
  28771. "type": "object",
  28772. "properties": {
  28773. "id": {
  28774. "type": "string",
  28775. "pattern": "^evt_"
  28776. },
  28777. "metadata": {
  28778. "type": "object"
  28779. },
  28780. "type": {
  28781. "type": "string",
  28782. "enum": ["session.next.text.ended"]
  28783. },
  28784. "durable": {
  28785. "type": "object",
  28786. "properties": {
  28787. "aggregateID": {
  28788. "type": "string"
  28789. },
  28790. "seq": {
  28791. "type": "integer"
  28792. },
  28793. "version": {
  28794. "type": "integer"
  28795. }
  28796. },
  28797. "required": ["aggregateID", "seq", "version"],
  28798. "additionalProperties": false
  28799. },
  28800. "location": {
  28801. "$ref": "#/components/schemas/LocationRef"
  28802. },
  28803. "data": {
  28804. "type": "object",
  28805. "properties": {
  28806. "timestamp": {
  28807. "type": "number"
  28808. },
  28809. "sessionID": {
  28810. "type": "string",
  28811. "pattern": "^ses"
  28812. },
  28813. "assistantMessageID": {
  28814. "type": "string",
  28815. "pattern": "^msg_"
  28816. },
  28817. "textID": {
  28818. "type": "string"
  28819. },
  28820. "text": {
  28821. "type": "string"
  28822. }
  28823. },
  28824. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28825. "additionalProperties": false
  28826. }
  28827. },
  28828. "required": ["id", "type", "data"],
  28829. "additionalProperties": false
  28830. },
  28831. "SessionNextToolInputStarted": {
  28832. "type": "object",
  28833. "properties": {
  28834. "id": {
  28835. "type": "string",
  28836. "pattern": "^evt_"
  28837. },
  28838. "metadata": {
  28839. "type": "object"
  28840. },
  28841. "type": {
  28842. "type": "string",
  28843. "enum": ["session.next.tool.input.started"]
  28844. },
  28845. "durable": {
  28846. "type": "object",
  28847. "properties": {
  28848. "aggregateID": {
  28849. "type": "string"
  28850. },
  28851. "seq": {
  28852. "type": "integer"
  28853. },
  28854. "version": {
  28855. "type": "integer"
  28856. }
  28857. },
  28858. "required": ["aggregateID", "seq", "version"],
  28859. "additionalProperties": false
  28860. },
  28861. "location": {
  28862. "$ref": "#/components/schemas/LocationRef"
  28863. },
  28864. "data": {
  28865. "type": "object",
  28866. "properties": {
  28867. "timestamp": {
  28868. "type": "number"
  28869. },
  28870. "sessionID": {
  28871. "type": "string",
  28872. "pattern": "^ses"
  28873. },
  28874. "assistantMessageID": {
  28875. "type": "string",
  28876. "pattern": "^msg_"
  28877. },
  28878. "callID": {
  28879. "type": "string"
  28880. },
  28881. "name": {
  28882. "type": "string"
  28883. }
  28884. },
  28885. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28886. "additionalProperties": false
  28887. }
  28888. },
  28889. "required": ["id", "type", "data"],
  28890. "additionalProperties": false
  28891. },
  28892. "SessionNextToolInputEnded": {
  28893. "type": "object",
  28894. "properties": {
  28895. "id": {
  28896. "type": "string",
  28897. "pattern": "^evt_"
  28898. },
  28899. "metadata": {
  28900. "type": "object"
  28901. },
  28902. "type": {
  28903. "type": "string",
  28904. "enum": ["session.next.tool.input.ended"]
  28905. },
  28906. "durable": {
  28907. "type": "object",
  28908. "properties": {
  28909. "aggregateID": {
  28910. "type": "string"
  28911. },
  28912. "seq": {
  28913. "type": "integer"
  28914. },
  28915. "version": {
  28916. "type": "integer"
  28917. }
  28918. },
  28919. "required": ["aggregateID", "seq", "version"],
  28920. "additionalProperties": false
  28921. },
  28922. "location": {
  28923. "$ref": "#/components/schemas/LocationRef"
  28924. },
  28925. "data": {
  28926. "type": "object",
  28927. "properties": {
  28928. "timestamp": {
  28929. "type": "number"
  28930. },
  28931. "sessionID": {
  28932. "type": "string",
  28933. "pattern": "^ses"
  28934. },
  28935. "assistantMessageID": {
  28936. "type": "string",
  28937. "pattern": "^msg_"
  28938. },
  28939. "callID": {
  28940. "type": "string"
  28941. },
  28942. "text": {
  28943. "type": "string"
  28944. }
  28945. },
  28946. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  28947. "additionalProperties": false
  28948. }
  28949. },
  28950. "required": ["id", "type", "data"],
  28951. "additionalProperties": false
  28952. },
  28953. "SessionNextToolCalled": {
  28954. "type": "object",
  28955. "properties": {
  28956. "id": {
  28957. "type": "string",
  28958. "pattern": "^evt_"
  28959. },
  28960. "metadata": {
  28961. "type": "object"
  28962. },
  28963. "type": {
  28964. "type": "string",
  28965. "enum": ["session.next.tool.called"]
  28966. },
  28967. "durable": {
  28968. "type": "object",
  28969. "properties": {
  28970. "aggregateID": {
  28971. "type": "string"
  28972. },
  28973. "seq": {
  28974. "type": "integer"
  28975. },
  28976. "version": {
  28977. "type": "integer"
  28978. }
  28979. },
  28980. "required": ["aggregateID", "seq", "version"],
  28981. "additionalProperties": false
  28982. },
  28983. "location": {
  28984. "$ref": "#/components/schemas/LocationRef"
  28985. },
  28986. "data": {
  28987. "type": "object",
  28988. "properties": {
  28989. "timestamp": {
  28990. "type": "number"
  28991. },
  28992. "sessionID": {
  28993. "type": "string",
  28994. "pattern": "^ses"
  28995. },
  28996. "assistantMessageID": {
  28997. "type": "string",
  28998. "pattern": "^msg_"
  28999. },
  29000. "callID": {
  29001. "type": "string"
  29002. },
  29003. "tool": {
  29004. "type": "string"
  29005. },
  29006. "input": {
  29007. "type": "object"
  29008. },
  29009. "provider": {
  29010. "type": "object",
  29011. "properties": {
  29012. "executed": {
  29013. "type": "boolean"
  29014. },
  29015. "metadata": {
  29016. "$ref": "#/components/schemas/LLMProviderMetadata"
  29017. }
  29018. },
  29019. "required": ["executed"],
  29020. "additionalProperties": false
  29021. }
  29022. },
  29023. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29024. "additionalProperties": false
  29025. }
  29026. },
  29027. "required": ["id", "type", "data"],
  29028. "additionalProperties": false
  29029. },
  29030. "SessionNextToolProgress": {
  29031. "type": "object",
  29032. "properties": {
  29033. "id": {
  29034. "type": "string",
  29035. "pattern": "^evt_"
  29036. },
  29037. "metadata": {
  29038. "type": "object"
  29039. },
  29040. "type": {
  29041. "type": "string",
  29042. "enum": ["session.next.tool.progress"]
  29043. },
  29044. "durable": {
  29045. "type": "object",
  29046. "properties": {
  29047. "aggregateID": {
  29048. "type": "string"
  29049. },
  29050. "seq": {
  29051. "type": "integer"
  29052. },
  29053. "version": {
  29054. "type": "integer"
  29055. }
  29056. },
  29057. "required": ["aggregateID", "seq", "version"],
  29058. "additionalProperties": false
  29059. },
  29060. "location": {
  29061. "$ref": "#/components/schemas/LocationRef"
  29062. },
  29063. "data": {
  29064. "type": "object",
  29065. "properties": {
  29066. "timestamp": {
  29067. "type": "number"
  29068. },
  29069. "sessionID": {
  29070. "type": "string",
  29071. "pattern": "^ses"
  29072. },
  29073. "assistantMessageID": {
  29074. "type": "string",
  29075. "pattern": "^msg_"
  29076. },
  29077. "callID": {
  29078. "type": "string"
  29079. },
  29080. "structured": {
  29081. "type": "object"
  29082. },
  29083. "content": {
  29084. "type": "array",
  29085. "items": {
  29086. "$ref": "#/components/schemas/LLMToolContent"
  29087. }
  29088. }
  29089. },
  29090. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29091. "additionalProperties": false
  29092. }
  29093. },
  29094. "required": ["id", "type", "data"],
  29095. "additionalProperties": false
  29096. },
  29097. "SessionNextToolSuccess": {
  29098. "type": "object",
  29099. "properties": {
  29100. "id": {
  29101. "type": "string",
  29102. "pattern": "^evt_"
  29103. },
  29104. "metadata": {
  29105. "type": "object"
  29106. },
  29107. "type": {
  29108. "type": "string",
  29109. "enum": ["session.next.tool.success"]
  29110. },
  29111. "durable": {
  29112. "type": "object",
  29113. "properties": {
  29114. "aggregateID": {
  29115. "type": "string"
  29116. },
  29117. "seq": {
  29118. "type": "integer"
  29119. },
  29120. "version": {
  29121. "type": "integer"
  29122. }
  29123. },
  29124. "required": ["aggregateID", "seq", "version"],
  29125. "additionalProperties": false
  29126. },
  29127. "location": {
  29128. "$ref": "#/components/schemas/LocationRef"
  29129. },
  29130. "data": {
  29131. "type": "object",
  29132. "properties": {
  29133. "timestamp": {
  29134. "type": "number"
  29135. },
  29136. "sessionID": {
  29137. "type": "string",
  29138. "pattern": "^ses"
  29139. },
  29140. "assistantMessageID": {
  29141. "type": "string",
  29142. "pattern": "^msg_"
  29143. },
  29144. "callID": {
  29145. "type": "string"
  29146. },
  29147. "structured": {
  29148. "type": "object"
  29149. },
  29150. "content": {
  29151. "type": "array",
  29152. "items": {
  29153. "$ref": "#/components/schemas/LLMToolContent"
  29154. }
  29155. },
  29156. "outputPaths": {
  29157. "type": "array",
  29158. "items": {
  29159. "type": "string"
  29160. }
  29161. },
  29162. "result": {},
  29163. "provider": {
  29164. "type": "object",
  29165. "properties": {
  29166. "executed": {
  29167. "type": "boolean"
  29168. },
  29169. "metadata": {
  29170. "$ref": "#/components/schemas/LLMProviderMetadata"
  29171. }
  29172. },
  29173. "required": ["executed"],
  29174. "additionalProperties": false
  29175. }
  29176. },
  29177. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29178. "additionalProperties": false
  29179. }
  29180. },
  29181. "required": ["id", "type", "data"],
  29182. "additionalProperties": false
  29183. },
  29184. "SessionNextToolFailed": {
  29185. "type": "object",
  29186. "properties": {
  29187. "id": {
  29188. "type": "string",
  29189. "pattern": "^evt_"
  29190. },
  29191. "metadata": {
  29192. "type": "object"
  29193. },
  29194. "type": {
  29195. "type": "string",
  29196. "enum": ["session.next.tool.failed"]
  29197. },
  29198. "durable": {
  29199. "type": "object",
  29200. "properties": {
  29201. "aggregateID": {
  29202. "type": "string"
  29203. },
  29204. "seq": {
  29205. "type": "integer"
  29206. },
  29207. "version": {
  29208. "type": "integer"
  29209. }
  29210. },
  29211. "required": ["aggregateID", "seq", "version"],
  29212. "additionalProperties": false
  29213. },
  29214. "location": {
  29215. "$ref": "#/components/schemas/LocationRef"
  29216. },
  29217. "data": {
  29218. "type": "object",
  29219. "properties": {
  29220. "timestamp": {
  29221. "type": "number"
  29222. },
  29223. "sessionID": {
  29224. "type": "string",
  29225. "pattern": "^ses"
  29226. },
  29227. "assistantMessageID": {
  29228. "type": "string",
  29229. "pattern": "^msg_"
  29230. },
  29231. "callID": {
  29232. "type": "string"
  29233. },
  29234. "error": {
  29235. "$ref": "#/components/schemas/SessionErrorUnknown"
  29236. },
  29237. "result": {},
  29238. "provider": {
  29239. "type": "object",
  29240. "properties": {
  29241. "executed": {
  29242. "type": "boolean"
  29243. },
  29244. "metadata": {
  29245. "$ref": "#/components/schemas/LLMProviderMetadata"
  29246. }
  29247. },
  29248. "required": ["executed"],
  29249. "additionalProperties": false
  29250. }
  29251. },
  29252. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29253. "additionalProperties": false
  29254. }
  29255. },
  29256. "required": ["id", "type", "data"],
  29257. "additionalProperties": false
  29258. },
  29259. "SessionNextReasoningStarted": {
  29260. "type": "object",
  29261. "properties": {
  29262. "id": {
  29263. "type": "string",
  29264. "pattern": "^evt_"
  29265. },
  29266. "metadata": {
  29267. "type": "object"
  29268. },
  29269. "type": {
  29270. "type": "string",
  29271. "enum": ["session.next.reasoning.started"]
  29272. },
  29273. "durable": {
  29274. "type": "object",
  29275. "properties": {
  29276. "aggregateID": {
  29277. "type": "string"
  29278. },
  29279. "seq": {
  29280. "type": "integer"
  29281. },
  29282. "version": {
  29283. "type": "integer"
  29284. }
  29285. },
  29286. "required": ["aggregateID", "seq", "version"],
  29287. "additionalProperties": false
  29288. },
  29289. "location": {
  29290. "$ref": "#/components/schemas/LocationRef"
  29291. },
  29292. "data": {
  29293. "type": "object",
  29294. "properties": {
  29295. "timestamp": {
  29296. "type": "number"
  29297. },
  29298. "sessionID": {
  29299. "type": "string",
  29300. "pattern": "^ses"
  29301. },
  29302. "assistantMessageID": {
  29303. "type": "string",
  29304. "pattern": "^msg_"
  29305. },
  29306. "reasoningID": {
  29307. "type": "string"
  29308. },
  29309. "providerMetadata": {
  29310. "$ref": "#/components/schemas/LLMProviderMetadata"
  29311. }
  29312. },
  29313. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29314. "additionalProperties": false
  29315. }
  29316. },
  29317. "required": ["id", "type", "data"],
  29318. "additionalProperties": false
  29319. },
  29320. "SessionNextReasoningEnded": {
  29321. "type": "object",
  29322. "properties": {
  29323. "id": {
  29324. "type": "string",
  29325. "pattern": "^evt_"
  29326. },
  29327. "metadata": {
  29328. "type": "object"
  29329. },
  29330. "type": {
  29331. "type": "string",
  29332. "enum": ["session.next.reasoning.ended"]
  29333. },
  29334. "durable": {
  29335. "type": "object",
  29336. "properties": {
  29337. "aggregateID": {
  29338. "type": "string"
  29339. },
  29340. "seq": {
  29341. "type": "integer"
  29342. },
  29343. "version": {
  29344. "type": "integer"
  29345. }
  29346. },
  29347. "required": ["aggregateID", "seq", "version"],
  29348. "additionalProperties": false
  29349. },
  29350. "location": {
  29351. "$ref": "#/components/schemas/LocationRef"
  29352. },
  29353. "data": {
  29354. "type": "object",
  29355. "properties": {
  29356. "timestamp": {
  29357. "type": "number"
  29358. },
  29359. "sessionID": {
  29360. "type": "string",
  29361. "pattern": "^ses"
  29362. },
  29363. "assistantMessageID": {
  29364. "type": "string",
  29365. "pattern": "^msg_"
  29366. },
  29367. "reasoningID": {
  29368. "type": "string"
  29369. },
  29370. "text": {
  29371. "type": "string"
  29372. },
  29373. "providerMetadata": {
  29374. "$ref": "#/components/schemas/LLMProviderMetadata"
  29375. }
  29376. },
  29377. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29378. "additionalProperties": false
  29379. }
  29380. },
  29381. "required": ["id", "type", "data"],
  29382. "additionalProperties": false
  29383. },
  29384. "SessionNextRetried": {
  29385. "type": "object",
  29386. "properties": {
  29387. "id": {
  29388. "type": "string",
  29389. "pattern": "^evt_"
  29390. },
  29391. "metadata": {
  29392. "type": "object"
  29393. },
  29394. "type": {
  29395. "type": "string",
  29396. "enum": ["session.next.retried"]
  29397. },
  29398. "durable": {
  29399. "type": "object",
  29400. "properties": {
  29401. "aggregateID": {
  29402. "type": "string"
  29403. },
  29404. "seq": {
  29405. "type": "integer"
  29406. },
  29407. "version": {
  29408. "type": "integer"
  29409. }
  29410. },
  29411. "required": ["aggregateID", "seq", "version"],
  29412. "additionalProperties": false
  29413. },
  29414. "location": {
  29415. "$ref": "#/components/schemas/LocationRef"
  29416. },
  29417. "data": {
  29418. "type": "object",
  29419. "properties": {
  29420. "timestamp": {
  29421. "type": "number"
  29422. },
  29423. "sessionID": {
  29424. "type": "string",
  29425. "pattern": "^ses"
  29426. },
  29427. "attempt": {
  29428. "type": "number"
  29429. },
  29430. "error": {
  29431. "$ref": "#/components/schemas/SessionNextRetry_error"
  29432. }
  29433. },
  29434. "required": ["timestamp", "sessionID", "attempt", "error"],
  29435. "additionalProperties": false
  29436. }
  29437. },
  29438. "required": ["id", "type", "data"],
  29439. "additionalProperties": false
  29440. },
  29441. "SessionNextCompactionStarted": {
  29442. "type": "object",
  29443. "properties": {
  29444. "id": {
  29445. "type": "string",
  29446. "pattern": "^evt_"
  29447. },
  29448. "metadata": {
  29449. "type": "object"
  29450. },
  29451. "type": {
  29452. "type": "string",
  29453. "enum": ["session.next.compaction.started"]
  29454. },
  29455. "durable": {
  29456. "type": "object",
  29457. "properties": {
  29458. "aggregateID": {
  29459. "type": "string"
  29460. },
  29461. "seq": {
  29462. "type": "integer"
  29463. },
  29464. "version": {
  29465. "type": "integer"
  29466. }
  29467. },
  29468. "required": ["aggregateID", "seq", "version"],
  29469. "additionalProperties": false
  29470. },
  29471. "location": {
  29472. "$ref": "#/components/schemas/LocationRef"
  29473. },
  29474. "data": {
  29475. "type": "object",
  29476. "properties": {
  29477. "timestamp": {
  29478. "type": "number"
  29479. },
  29480. "sessionID": {
  29481. "type": "string",
  29482. "pattern": "^ses"
  29483. },
  29484. "messageID": {
  29485. "type": "string",
  29486. "pattern": "^msg_"
  29487. },
  29488. "reason": {
  29489. "type": "string",
  29490. "enum": ["auto", "manual"]
  29491. }
  29492. },
  29493. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29494. "additionalProperties": false
  29495. }
  29496. },
  29497. "required": ["id", "type", "data"],
  29498. "additionalProperties": false
  29499. },
  29500. "SessionNextCompactionEnded": {
  29501. "type": "object",
  29502. "properties": {
  29503. "id": {
  29504. "type": "string",
  29505. "pattern": "^evt_"
  29506. },
  29507. "metadata": {
  29508. "type": "object"
  29509. },
  29510. "type": {
  29511. "type": "string",
  29512. "enum": ["session.next.compaction.ended"]
  29513. },
  29514. "durable": {
  29515. "type": "object",
  29516. "properties": {
  29517. "aggregateID": {
  29518. "type": "string"
  29519. },
  29520. "seq": {
  29521. "type": "integer"
  29522. },
  29523. "version": {
  29524. "type": "integer"
  29525. }
  29526. },
  29527. "required": ["aggregateID", "seq", "version"],
  29528. "additionalProperties": false
  29529. },
  29530. "location": {
  29531. "$ref": "#/components/schemas/LocationRef"
  29532. },
  29533. "data": {
  29534. "type": "object",
  29535. "properties": {
  29536. "timestamp": {
  29537. "type": "number"
  29538. },
  29539. "sessionID": {
  29540. "type": "string",
  29541. "pattern": "^ses"
  29542. },
  29543. "messageID": {
  29544. "type": "string",
  29545. "pattern": "^msg_"
  29546. },
  29547. "reason": {
  29548. "type": "string",
  29549. "enum": ["auto", "manual"]
  29550. },
  29551. "text": {
  29552. "type": "string"
  29553. },
  29554. "recent": {
  29555. "type": "string"
  29556. }
  29557. },
  29558. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  29559. "additionalProperties": false
  29560. }
  29561. },
  29562. "required": ["id", "type", "data"],
  29563. "additionalProperties": false
  29564. },
  29565. "SessionNextRevertStaged": {
  29566. "type": "object",
  29567. "properties": {
  29568. "id": {
  29569. "type": "string",
  29570. "pattern": "^evt_"
  29571. },
  29572. "metadata": {
  29573. "type": "object"
  29574. },
  29575. "type": {
  29576. "type": "string",
  29577. "enum": ["session.next.revert.staged"]
  29578. },
  29579. "durable": {
  29580. "type": "object",
  29581. "properties": {
  29582. "aggregateID": {
  29583. "type": "string"
  29584. },
  29585. "seq": {
  29586. "type": "integer"
  29587. },
  29588. "version": {
  29589. "type": "integer"
  29590. }
  29591. },
  29592. "required": ["aggregateID", "seq", "version"],
  29593. "additionalProperties": false
  29594. },
  29595. "location": {
  29596. "$ref": "#/components/schemas/LocationRef"
  29597. },
  29598. "data": {
  29599. "type": "object",
  29600. "properties": {
  29601. "timestamp": {
  29602. "type": "number"
  29603. },
  29604. "sessionID": {
  29605. "type": "string",
  29606. "pattern": "^ses"
  29607. },
  29608. "revert": {
  29609. "$ref": "#/components/schemas/RevertState"
  29610. }
  29611. },
  29612. "required": ["timestamp", "sessionID", "revert"],
  29613. "additionalProperties": false
  29614. }
  29615. },
  29616. "required": ["id", "type", "data"],
  29617. "additionalProperties": false
  29618. },
  29619. "SessionNextRevertCleared": {
  29620. "type": "object",
  29621. "properties": {
  29622. "id": {
  29623. "type": "string",
  29624. "pattern": "^evt_"
  29625. },
  29626. "metadata": {
  29627. "type": "object"
  29628. },
  29629. "type": {
  29630. "type": "string",
  29631. "enum": ["session.next.revert.cleared"]
  29632. },
  29633. "durable": {
  29634. "type": "object",
  29635. "properties": {
  29636. "aggregateID": {
  29637. "type": "string"
  29638. },
  29639. "seq": {
  29640. "type": "integer"
  29641. },
  29642. "version": {
  29643. "type": "integer"
  29644. }
  29645. },
  29646. "required": ["aggregateID", "seq", "version"],
  29647. "additionalProperties": false
  29648. },
  29649. "location": {
  29650. "$ref": "#/components/schemas/LocationRef"
  29651. },
  29652. "data": {
  29653. "type": "object",
  29654. "properties": {
  29655. "timestamp": {
  29656. "type": "number"
  29657. },
  29658. "sessionID": {
  29659. "type": "string",
  29660. "pattern": "^ses"
  29661. }
  29662. },
  29663. "required": ["timestamp", "sessionID"],
  29664. "additionalProperties": false
  29665. }
  29666. },
  29667. "required": ["id", "type", "data"],
  29668. "additionalProperties": false
  29669. },
  29670. "SessionNextRevertCommitted": {
  29671. "type": "object",
  29672. "properties": {
  29673. "id": {
  29674. "type": "string",
  29675. "pattern": "^evt_"
  29676. },
  29677. "metadata": {
  29678. "type": "object"
  29679. },
  29680. "type": {
  29681. "type": "string",
  29682. "enum": ["session.next.revert.committed"]
  29683. },
  29684. "durable": {
  29685. "type": "object",
  29686. "properties": {
  29687. "aggregateID": {
  29688. "type": "string"
  29689. },
  29690. "seq": {
  29691. "type": "integer"
  29692. },
  29693. "version": {
  29694. "type": "integer"
  29695. }
  29696. },
  29697. "required": ["aggregateID", "seq", "version"],
  29698. "additionalProperties": false
  29699. },
  29700. "location": {
  29701. "$ref": "#/components/schemas/LocationRef"
  29702. },
  29703. "data": {
  29704. "type": "object",
  29705. "properties": {
  29706. "timestamp": {
  29707. "type": "number"
  29708. },
  29709. "sessionID": {
  29710. "type": "string",
  29711. "pattern": "^ses"
  29712. },
  29713. "messageID": {
  29714. "type": "string",
  29715. "pattern": "^msg_"
  29716. }
  29717. },
  29718. "required": ["timestamp", "sessionID", "messageID"],
  29719. "additionalProperties": false
  29720. }
  29721. },
  29722. "required": ["id", "type", "data"],
  29723. "additionalProperties": false
  29724. },
  29725. "ModelApi": {
  29726. "anyOf": [
  29727. {
  29728. "type": "object",
  29729. "properties": {
  29730. "id": {
  29731. "type": "string"
  29732. },
  29733. "type": {
  29734. "type": "string",
  29735. "enum": ["aisdk"]
  29736. },
  29737. "package": {
  29738. "type": "string"
  29739. },
  29740. "url": {
  29741. "type": "string"
  29742. },
  29743. "settings": {
  29744. "type": "object"
  29745. }
  29746. },
  29747. "required": ["id", "type", "package"],
  29748. "additionalProperties": false
  29749. },
  29750. {
  29751. "type": "object",
  29752. "properties": {
  29753. "id": {
  29754. "type": "string"
  29755. },
  29756. "type": {
  29757. "type": "string",
  29758. "enum": ["native"]
  29759. },
  29760. "url": {
  29761. "type": "string"
  29762. },
  29763. "settings": {
  29764. "type": "object"
  29765. }
  29766. },
  29767. "required": ["id", "type", "settings"],
  29768. "additionalProperties": false
  29769. }
  29770. ]
  29771. },
  29772. "ModelCapabilities": {
  29773. "type": "object",
  29774. "properties": {
  29775. "tools": {
  29776. "type": "boolean"
  29777. },
  29778. "input": {
  29779. "type": "array",
  29780. "items": {
  29781. "type": "string"
  29782. }
  29783. },
  29784. "output": {
  29785. "type": "array",
  29786. "items": {
  29787. "type": "string"
  29788. }
  29789. }
  29790. },
  29791. "required": ["tools", "input", "output"],
  29792. "additionalProperties": false
  29793. },
  29794. "ModelCost": {
  29795. "type": "object",
  29796. "properties": {
  29797. "tier": {
  29798. "type": "object",
  29799. "properties": {
  29800. "type": {
  29801. "type": "string",
  29802. "enum": ["context"]
  29803. },
  29804. "size": {
  29805. "type": "integer"
  29806. }
  29807. },
  29808. "required": ["type", "size"],
  29809. "additionalProperties": false
  29810. },
  29811. "input": {
  29812. "type": "number"
  29813. },
  29814. "output": {
  29815. "type": "number"
  29816. },
  29817. "cache": {
  29818. "type": "object",
  29819. "properties": {
  29820. "read": {
  29821. "type": "number"
  29822. },
  29823. "write": {
  29824. "type": "number"
  29825. }
  29826. },
  29827. "required": ["read", "write"],
  29828. "additionalProperties": false
  29829. }
  29830. },
  29831. "required": ["input", "output", "cache"],
  29832. "additionalProperties": false
  29833. },
  29834. "ModelV2Info": {
  29835. "type": "object",
  29836. "properties": {
  29837. "id": {
  29838. "type": "string"
  29839. },
  29840. "providerID": {
  29841. "type": "string"
  29842. },
  29843. "family": {
  29844. "type": "string"
  29845. },
  29846. "name": {
  29847. "type": "string"
  29848. },
  29849. "api": {
  29850. "$ref": "#/components/schemas/ModelApi"
  29851. },
  29852. "capabilities": {
  29853. "$ref": "#/components/schemas/ModelCapabilities"
  29854. },
  29855. "request": {
  29856. "type": "object",
  29857. "properties": {
  29858. "headers": {
  29859. "type": "object",
  29860. "additionalProperties": {
  29861. "type": "string"
  29862. }
  29863. },
  29864. "body": {
  29865. "type": "object"
  29866. },
  29867. "variant": {
  29868. "type": "string"
  29869. }
  29870. },
  29871. "required": ["headers", "body"],
  29872. "additionalProperties": false
  29873. },
  29874. "variants": {
  29875. "type": "array",
  29876. "items": {
  29877. "type": "object",
  29878. "properties": {
  29879. "id": {
  29880. "type": "string"
  29881. },
  29882. "headers": {
  29883. "type": "object",
  29884. "additionalProperties": {
  29885. "type": "string"
  29886. }
  29887. },
  29888. "body": {
  29889. "type": "object"
  29890. }
  29891. },
  29892. "required": ["id", "headers", "body"],
  29893. "additionalProperties": false
  29894. }
  29895. },
  29896. "time": {
  29897. "type": "object",
  29898. "properties": {
  29899. "released": {
  29900. "type": "number"
  29901. }
  29902. },
  29903. "required": ["released"],
  29904. "additionalProperties": false
  29905. },
  29906. "cost": {
  29907. "type": "array",
  29908. "items": {
  29909. "$ref": "#/components/schemas/ModelCost"
  29910. }
  29911. },
  29912. "status": {
  29913. "type": "string",
  29914. "enum": ["alpha", "beta", "deprecated", "active"]
  29915. },
  29916. "enabled": {
  29917. "type": "boolean"
  29918. },
  29919. "limit": {
  29920. "type": "object",
  29921. "properties": {
  29922. "context": {
  29923. "type": "integer"
  29924. },
  29925. "input": {
  29926. "type": "integer"
  29927. },
  29928. "output": {
  29929. "type": "integer"
  29930. }
  29931. },
  29932. "required": ["context", "output"],
  29933. "additionalProperties": false
  29934. }
  29935. },
  29936. "required": [
  29937. "id",
  29938. "providerID",
  29939. "name",
  29940. "api",
  29941. "capabilities",
  29942. "request",
  29943. "variants",
  29944. "time",
  29945. "cost",
  29946. "status",
  29947. "enabled",
  29948. "limit"
  29949. ],
  29950. "additionalProperties": false
  29951. },
  29952. "ProviderAISDK": {
  29953. "type": "object",
  29954. "properties": {
  29955. "type": {
  29956. "type": "string",
  29957. "enum": ["aisdk"]
  29958. },
  29959. "package": {
  29960. "type": "string"
  29961. },
  29962. "url": {
  29963. "type": "string"
  29964. },
  29965. "settings": {
  29966. "type": "object"
  29967. }
  29968. },
  29969. "required": ["type", "package"],
  29970. "additionalProperties": false
  29971. },
  29972. "ProviderNative": {
  29973. "type": "object",
  29974. "properties": {
  29975. "type": {
  29976. "type": "string",
  29977. "enum": ["native"]
  29978. },
  29979. "url": {
  29980. "type": "string"
  29981. },
  29982. "settings": {
  29983. "type": "object"
  29984. }
  29985. },
  29986. "required": ["type", "settings"],
  29987. "additionalProperties": false
  29988. },
  29989. "ProviderApi": {
  29990. "anyOf": [
  29991. {
  29992. "$ref": "#/components/schemas/ProviderAISDK"
  29993. },
  29994. {
  29995. "$ref": "#/components/schemas/ProviderNative"
  29996. }
  29997. ]
  29998. },
  29999. "ProviderV2Info": {
  30000. "type": "object",
  30001. "properties": {
  30002. "id": {
  30003. "type": "string"
  30004. },
  30005. "integrationID": {
  30006. "type": "string"
  30007. },
  30008. "name": {
  30009. "type": "string"
  30010. },
  30011. "disabled": {
  30012. "type": "boolean"
  30013. },
  30014. "api": {
  30015. "$ref": "#/components/schemas/ProviderApi"
  30016. },
  30017. "request": {
  30018. "$ref": "#/components/schemas/ProviderRequest"
  30019. }
  30020. },
  30021. "required": ["id", "name", "api", "request"],
  30022. "additionalProperties": false
  30023. },
  30024. "IntegrationWhen": {
  30025. "type": "object",
  30026. "properties": {
  30027. "key": {
  30028. "type": "string"
  30029. },
  30030. "op": {
  30031. "type": "string",
  30032. "enum": ["eq", "neq"]
  30033. },
  30034. "value": {
  30035. "type": "string"
  30036. }
  30037. },
  30038. "required": ["key", "op", "value"],
  30039. "additionalProperties": false
  30040. },
  30041. "IntegrationTextPrompt": {
  30042. "type": "object",
  30043. "properties": {
  30044. "type": {
  30045. "type": "string",
  30046. "enum": ["text"]
  30047. },
  30048. "key": {
  30049. "type": "string"
  30050. },
  30051. "message": {
  30052. "type": "string"
  30053. },
  30054. "placeholder": {
  30055. "type": "string"
  30056. },
  30057. "when": {
  30058. "$ref": "#/components/schemas/IntegrationWhen"
  30059. }
  30060. },
  30061. "required": ["type", "key", "message"],
  30062. "additionalProperties": false
  30063. },
  30064. "IntegrationSelectPrompt": {
  30065. "type": "object",
  30066. "properties": {
  30067. "type": {
  30068. "type": "string",
  30069. "enum": ["select"]
  30070. },
  30071. "key": {
  30072. "type": "string"
  30073. },
  30074. "message": {
  30075. "type": "string"
  30076. },
  30077. "options": {
  30078. "type": "array",
  30079. "items": {
  30080. "type": "object",
  30081. "properties": {
  30082. "label": {
  30083. "type": "string"
  30084. },
  30085. "value": {
  30086. "type": "string"
  30087. },
  30088. "hint": {
  30089. "type": "string"
  30090. }
  30091. },
  30092. "required": ["label", "value"],
  30093. "additionalProperties": false
  30094. }
  30095. },
  30096. "when": {
  30097. "$ref": "#/components/schemas/IntegrationWhen"
  30098. }
  30099. },
  30100. "required": ["type", "key", "message", "options"],
  30101. "additionalProperties": false
  30102. },
  30103. "IntegrationOAuthMethod": {
  30104. "type": "object",
  30105. "properties": {
  30106. "id": {
  30107. "type": "string"
  30108. },
  30109. "type": {
  30110. "type": "string",
  30111. "enum": ["oauth"]
  30112. },
  30113. "label": {
  30114. "type": "string"
  30115. },
  30116. "prompts": {
  30117. "type": "array",
  30118. "items": {
  30119. "anyOf": [
  30120. {
  30121. "$ref": "#/components/schemas/IntegrationTextPrompt"
  30122. },
  30123. {
  30124. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  30125. }
  30126. ]
  30127. }
  30128. }
  30129. },
  30130. "required": ["id", "type", "label"],
  30131. "additionalProperties": false
  30132. },
  30133. "IntegrationKeyMethod": {
  30134. "type": "object",
  30135. "properties": {
  30136. "type": {
  30137. "type": "string",
  30138. "enum": ["key"]
  30139. },
  30140. "label": {
  30141. "type": "string"
  30142. }
  30143. },
  30144. "required": ["type"],
  30145. "additionalProperties": false
  30146. },
  30147. "IntegrationEnvMethod": {
  30148. "type": "object",
  30149. "properties": {
  30150. "type": {
  30151. "type": "string",
  30152. "enum": ["env"]
  30153. },
  30154. "names": {
  30155. "type": "array",
  30156. "items": {
  30157. "type": "string"
  30158. }
  30159. }
  30160. },
  30161. "required": ["type", "names"],
  30162. "additionalProperties": false
  30163. },
  30164. "ConnectionCredentialInfo": {
  30165. "type": "object",
  30166. "properties": {
  30167. "type": {
  30168. "type": "string",
  30169. "enum": ["credential"]
  30170. },
  30171. "id": {
  30172. "type": "string"
  30173. },
  30174. "label": {
  30175. "type": "string"
  30176. }
  30177. },
  30178. "required": ["type", "id", "label"],
  30179. "additionalProperties": false
  30180. },
  30181. "ConnectionEnvInfo": {
  30182. "type": "object",
  30183. "properties": {
  30184. "type": {
  30185. "type": "string",
  30186. "enum": ["env"]
  30187. },
  30188. "name": {
  30189. "type": "string"
  30190. }
  30191. },
  30192. "required": ["type", "name"],
  30193. "additionalProperties": false
  30194. },
  30195. "ConnectionInfo": {
  30196. "anyOf": [
  30197. {
  30198. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  30199. },
  30200. {
  30201. "$ref": "#/components/schemas/ConnectionEnvInfo"
  30202. }
  30203. ]
  30204. },
  30205. "IntegrationInfo": {
  30206. "type": "object",
  30207. "properties": {
  30208. "id": {
  30209. "type": "string"
  30210. },
  30211. "name": {
  30212. "type": "string"
  30213. },
  30214. "methods": {
  30215. "type": "array",
  30216. "items": {
  30217. "$ref": "#/components/schemas/IntegrationMethod"
  30218. }
  30219. },
  30220. "connections": {
  30221. "type": "array",
  30222. "items": {
  30223. "$ref": "#/components/schemas/ConnectionInfo"
  30224. }
  30225. }
  30226. },
  30227. "required": ["id", "name", "methods", "connections"],
  30228. "additionalProperties": false
  30229. },
  30230. "IntegrationAttempt": {
  30231. "type": "object",
  30232. "properties": {
  30233. "attemptID": {
  30234. "type": "string"
  30235. },
  30236. "url": {
  30237. "type": "string"
  30238. },
  30239. "instructions": {
  30240. "type": "string"
  30241. },
  30242. "mode": {
  30243. "type": "string",
  30244. "enum": ["auto", "code"]
  30245. },
  30246. "time": {
  30247. "type": "object",
  30248. "properties": {
  30249. "created": {
  30250. "anyOf": [
  30251. {
  30252. "type": "number"
  30253. },
  30254. {
  30255. "type": "string",
  30256. "enum": ["NaN"]
  30257. },
  30258. {
  30259. "type": "string",
  30260. "enum": ["Infinity"]
  30261. },
  30262. {
  30263. "type": "string",
  30264. "enum": ["-Infinity"]
  30265. },
  30266. {
  30267. "type": "string",
  30268. "enum": ["Infinity", "-Infinity", "NaN"]
  30269. }
  30270. ]
  30271. },
  30272. "expires": {
  30273. "anyOf": [
  30274. {
  30275. "type": "number"
  30276. },
  30277. {
  30278. "type": "string",
  30279. "enum": ["NaN"]
  30280. },
  30281. {
  30282. "type": "string",
  30283. "enum": ["Infinity"]
  30284. },
  30285. {
  30286. "type": "string",
  30287. "enum": ["-Infinity"]
  30288. },
  30289. {
  30290. "type": "string",
  30291. "enum": ["Infinity", "-Infinity", "NaN"]
  30292. }
  30293. ]
  30294. }
  30295. },
  30296. "required": ["created", "expires"],
  30297. "additionalProperties": false
  30298. }
  30299. },
  30300. "required": ["attemptID", "url", "instructions", "mode", "time"],
  30301. "additionalProperties": false
  30302. },
  30303. "IntegrationAttemptStatus": {
  30304. "anyOf": [
  30305. {
  30306. "type": "object",
  30307. "properties": {
  30308. "status": {
  30309. "type": "string",
  30310. "enum": ["pending"]
  30311. },
  30312. "time": {
  30313. "type": "object",
  30314. "properties": {
  30315. "created": {
  30316. "anyOf": [
  30317. {
  30318. "type": "number"
  30319. },
  30320. {
  30321. "type": "string",
  30322. "enum": ["NaN"]
  30323. },
  30324. {
  30325. "type": "string",
  30326. "enum": ["Infinity"]
  30327. },
  30328. {
  30329. "type": "string",
  30330. "enum": ["-Infinity"]
  30331. },
  30332. {
  30333. "type": "string",
  30334. "enum": ["Infinity", "-Infinity", "NaN"]
  30335. }
  30336. ]
  30337. },
  30338. "expires": {
  30339. "anyOf": [
  30340. {
  30341. "type": "number"
  30342. },
  30343. {
  30344. "type": "string",
  30345. "enum": ["NaN"]
  30346. },
  30347. {
  30348. "type": "string",
  30349. "enum": ["Infinity"]
  30350. },
  30351. {
  30352. "type": "string",
  30353. "enum": ["-Infinity"]
  30354. },
  30355. {
  30356. "type": "string",
  30357. "enum": ["Infinity", "-Infinity", "NaN"]
  30358. }
  30359. ]
  30360. }
  30361. },
  30362. "required": ["created", "expires"],
  30363. "additionalProperties": false
  30364. }
  30365. },
  30366. "required": ["status", "time"],
  30367. "additionalProperties": false
  30368. },
  30369. {
  30370. "type": "object",
  30371. "properties": {
  30372. "status": {
  30373. "type": "string",
  30374. "enum": ["complete"]
  30375. },
  30376. "time": {
  30377. "type": "object",
  30378. "properties": {
  30379. "created": {
  30380. "anyOf": [
  30381. {
  30382. "type": "number"
  30383. },
  30384. {
  30385. "type": "string",
  30386. "enum": ["NaN"]
  30387. },
  30388. {
  30389. "type": "string",
  30390. "enum": ["Infinity"]
  30391. },
  30392. {
  30393. "type": "string",
  30394. "enum": ["-Infinity"]
  30395. },
  30396. {
  30397. "type": "string",
  30398. "enum": ["Infinity", "-Infinity", "NaN"]
  30399. }
  30400. ]
  30401. },
  30402. "expires": {
  30403. "anyOf": [
  30404. {
  30405. "type": "number"
  30406. },
  30407. {
  30408. "type": "string",
  30409. "enum": ["NaN"]
  30410. },
  30411. {
  30412. "type": "string",
  30413. "enum": ["Infinity"]
  30414. },
  30415. {
  30416. "type": "string",
  30417. "enum": ["-Infinity"]
  30418. },
  30419. {
  30420. "type": "string",
  30421. "enum": ["Infinity", "-Infinity", "NaN"]
  30422. }
  30423. ]
  30424. }
  30425. },
  30426. "required": ["created", "expires"],
  30427. "additionalProperties": false
  30428. }
  30429. },
  30430. "required": ["status", "time"],
  30431. "additionalProperties": false
  30432. },
  30433. {
  30434. "type": "object",
  30435. "properties": {
  30436. "status": {
  30437. "type": "string",
  30438. "enum": ["failed"]
  30439. },
  30440. "message": {
  30441. "type": "string"
  30442. },
  30443. "time": {
  30444. "type": "object",
  30445. "properties": {
  30446. "created": {
  30447. "anyOf": [
  30448. {
  30449. "type": "number"
  30450. },
  30451. {
  30452. "type": "string",
  30453. "enum": ["NaN"]
  30454. },
  30455. {
  30456. "type": "string",
  30457. "enum": ["Infinity"]
  30458. },
  30459. {
  30460. "type": "string",
  30461. "enum": ["-Infinity"]
  30462. },
  30463. {
  30464. "type": "string",
  30465. "enum": ["Infinity", "-Infinity", "NaN"]
  30466. }
  30467. ]
  30468. },
  30469. "expires": {
  30470. "anyOf": [
  30471. {
  30472. "type": "number"
  30473. },
  30474. {
  30475. "type": "string",
  30476. "enum": ["NaN"]
  30477. },
  30478. {
  30479. "type": "string",
  30480. "enum": ["Infinity"]
  30481. },
  30482. {
  30483. "type": "string",
  30484. "enum": ["-Infinity"]
  30485. },
  30486. {
  30487. "type": "string",
  30488. "enum": ["Infinity", "-Infinity", "NaN"]
  30489. }
  30490. ]
  30491. }
  30492. },
  30493. "required": ["created", "expires"],
  30494. "additionalProperties": false
  30495. }
  30496. },
  30497. "required": ["status", "message", "time"],
  30498. "additionalProperties": false
  30499. },
  30500. {
  30501. "type": "object",
  30502. "properties": {
  30503. "status": {
  30504. "type": "string",
  30505. "enum": ["expired"]
  30506. },
  30507. "time": {
  30508. "type": "object",
  30509. "properties": {
  30510. "created": {
  30511. "anyOf": [
  30512. {
  30513. "type": "number"
  30514. },
  30515. {
  30516. "type": "string",
  30517. "enum": ["NaN"]
  30518. },
  30519. {
  30520. "type": "string",
  30521. "enum": ["Infinity"]
  30522. },
  30523. {
  30524. "type": "string",
  30525. "enum": ["-Infinity"]
  30526. },
  30527. {
  30528. "type": "string",
  30529. "enum": ["Infinity", "-Infinity", "NaN"]
  30530. }
  30531. ]
  30532. },
  30533. "expires": {
  30534. "anyOf": [
  30535. {
  30536. "type": "number"
  30537. },
  30538. {
  30539. "type": "string",
  30540. "enum": ["NaN"]
  30541. },
  30542. {
  30543. "type": "string",
  30544. "enum": ["Infinity"]
  30545. },
  30546. {
  30547. "type": "string",
  30548. "enum": ["-Infinity"]
  30549. },
  30550. {
  30551. "type": "string",
  30552. "enum": ["Infinity", "-Infinity", "NaN"]
  30553. }
  30554. ]
  30555. }
  30556. },
  30557. "required": ["created", "expires"],
  30558. "additionalProperties": false
  30559. }
  30560. },
  30561. "required": ["status", "time"],
  30562. "additionalProperties": false
  30563. }
  30564. ]
  30565. },
  30566. "PermissionV2Request": {
  30567. "type": "object",
  30568. "properties": {
  30569. "id": {
  30570. "type": "string",
  30571. "pattern": "^per"
  30572. },
  30573. "sessionID": {
  30574. "type": "string",
  30575. "pattern": "^ses"
  30576. },
  30577. "action": {
  30578. "type": "string"
  30579. },
  30580. "resources": {
  30581. "type": "array",
  30582. "items": {
  30583. "type": "string"
  30584. }
  30585. },
  30586. "save": {
  30587. "type": "array",
  30588. "items": {
  30589. "type": "string"
  30590. }
  30591. },
  30592. "metadata": {
  30593. "type": "object"
  30594. },
  30595. "source": {
  30596. "$ref": "#/components/schemas/PermissionV2Source"
  30597. }
  30598. },
  30599. "required": ["id", "sessionID", "action", "resources"],
  30600. "additionalProperties": false
  30601. },
  30602. "PermissionSavedInfo": {
  30603. "type": "object",
  30604. "properties": {
  30605. "id": {
  30606. "type": "string"
  30607. },
  30608. "projectID": {
  30609. "type": "string"
  30610. },
  30611. "action": {
  30612. "type": "string"
  30613. },
  30614. "resource": {
  30615. "type": "string"
  30616. }
  30617. },
  30618. "required": ["id", "projectID", "action", "resource"],
  30619. "additionalProperties": false
  30620. },
  30621. "FileSystemEntry": {
  30622. "type": "object",
  30623. "properties": {
  30624. "path": {
  30625. "type": "string"
  30626. },
  30627. "type": {
  30628. "type": "string",
  30629. "enum": ["file", "directory"]
  30630. }
  30631. },
  30632. "required": ["path", "type"],
  30633. "additionalProperties": false
  30634. },
  30635. "CommandV2Info": {
  30636. "type": "object",
  30637. "properties": {
  30638. "name": {
  30639. "type": "string"
  30640. },
  30641. "template": {
  30642. "type": "string"
  30643. },
  30644. "description": {
  30645. "type": "string"
  30646. },
  30647. "agent": {
  30648. "type": "string"
  30649. },
  30650. "model": {
  30651. "$ref": "#/components/schemas/ModelRef"
  30652. },
  30653. "subtask": {
  30654. "type": "boolean"
  30655. }
  30656. },
  30657. "required": ["name", "template"],
  30658. "additionalProperties": false
  30659. },
  30660. "SkillV2Info": {
  30661. "type": "object",
  30662. "properties": {
  30663. "name": {
  30664. "type": "string"
  30665. },
  30666. "description": {
  30667. "type": "string"
  30668. },
  30669. "slash": {
  30670. "type": "boolean"
  30671. },
  30672. "location": {
  30673. "type": "string"
  30674. },
  30675. "content": {
  30676. "type": "string"
  30677. }
  30678. },
  30679. "required": ["name", "location", "content"],
  30680. "additionalProperties": false
  30681. },
  30682. "Models-devRefreshed": {
  30683. "type": "object",
  30684. "properties": {
  30685. "id": {
  30686. "type": "string",
  30687. "pattern": "^evt_"
  30688. },
  30689. "metadata": {
  30690. "type": "object"
  30691. },
  30692. "type": {
  30693. "type": "string",
  30694. "enum": ["models-dev.refreshed"]
  30695. },
  30696. "durable": {
  30697. "type": "object",
  30698. "properties": {
  30699. "aggregateID": {
  30700. "type": "string"
  30701. },
  30702. "seq": {
  30703. "type": "integer"
  30704. },
  30705. "version": {
  30706. "type": "integer"
  30707. }
  30708. },
  30709. "required": ["aggregateID", "seq", "version"],
  30710. "additionalProperties": false
  30711. },
  30712. "location": {
  30713. "$ref": "#/components/schemas/LocationRef"
  30714. },
  30715. "data": {
  30716. "type": "object",
  30717. "properties": {}
  30718. }
  30719. },
  30720. "required": ["id", "type", "data"],
  30721. "additionalProperties": false
  30722. },
  30723. "IntegrationUpdated": {
  30724. "type": "object",
  30725. "properties": {
  30726. "id": {
  30727. "type": "string",
  30728. "pattern": "^evt_"
  30729. },
  30730. "metadata": {
  30731. "type": "object"
  30732. },
  30733. "type": {
  30734. "type": "string",
  30735. "enum": ["integration.updated"]
  30736. },
  30737. "durable": {
  30738. "type": "object",
  30739. "properties": {
  30740. "aggregateID": {
  30741. "type": "string"
  30742. },
  30743. "seq": {
  30744. "type": "integer"
  30745. },
  30746. "version": {
  30747. "type": "integer"
  30748. }
  30749. },
  30750. "required": ["aggregateID", "seq", "version"],
  30751. "additionalProperties": false
  30752. },
  30753. "location": {
  30754. "$ref": "#/components/schemas/LocationRef"
  30755. },
  30756. "data": {
  30757. "type": "object",
  30758. "properties": {}
  30759. }
  30760. },
  30761. "required": ["id", "type", "data"],
  30762. "additionalProperties": false
  30763. },
  30764. "IntegrationConnectionUpdated": {
  30765. "type": "object",
  30766. "properties": {
  30767. "id": {
  30768. "type": "string",
  30769. "pattern": "^evt_"
  30770. },
  30771. "metadata": {
  30772. "type": "object"
  30773. },
  30774. "type": {
  30775. "type": "string",
  30776. "enum": ["integration.connection.updated"]
  30777. },
  30778. "durable": {
  30779. "type": "object",
  30780. "properties": {
  30781. "aggregateID": {
  30782. "type": "string"
  30783. },
  30784. "seq": {
  30785. "type": "integer"
  30786. },
  30787. "version": {
  30788. "type": "integer"
  30789. }
  30790. },
  30791. "required": ["aggregateID", "seq", "version"],
  30792. "additionalProperties": false
  30793. },
  30794. "location": {
  30795. "$ref": "#/components/schemas/LocationRef"
  30796. },
  30797. "data": {
  30798. "type": "object",
  30799. "properties": {
  30800. "integrationID": {
  30801. "type": "string"
  30802. }
  30803. },
  30804. "required": ["integrationID"],
  30805. "additionalProperties": false
  30806. }
  30807. },
  30808. "required": ["id", "type", "data"],
  30809. "additionalProperties": false
  30810. },
  30811. "CatalogUpdated": {
  30812. "type": "object",
  30813. "properties": {
  30814. "id": {
  30815. "type": "string",
  30816. "pattern": "^evt_"
  30817. },
  30818. "metadata": {
  30819. "type": "object"
  30820. },
  30821. "type": {
  30822. "type": "string",
  30823. "enum": ["catalog.updated"]
  30824. },
  30825. "durable": {
  30826. "type": "object",
  30827. "properties": {
  30828. "aggregateID": {
  30829. "type": "string"
  30830. },
  30831. "seq": {
  30832. "type": "integer"
  30833. },
  30834. "version": {
  30835. "type": "integer"
  30836. }
  30837. },
  30838. "required": ["aggregateID", "seq", "version"],
  30839. "additionalProperties": false
  30840. },
  30841. "location": {
  30842. "$ref": "#/components/schemas/LocationRef"
  30843. },
  30844. "data": {
  30845. "type": "object",
  30846. "properties": {}
  30847. }
  30848. },
  30849. "required": ["id", "type", "data"],
  30850. "additionalProperties": false
  30851. },
  30852. "SessionCreated": {
  30853. "type": "object",
  30854. "properties": {
  30855. "id": {
  30856. "type": "string",
  30857. "pattern": "^evt_"
  30858. },
  30859. "metadata": {
  30860. "type": "object"
  30861. },
  30862. "type": {
  30863. "type": "string",
  30864. "enum": ["session.created"]
  30865. },
  30866. "durable": {
  30867. "type": "object",
  30868. "properties": {
  30869. "aggregateID": {
  30870. "type": "string"
  30871. },
  30872. "seq": {
  30873. "type": "integer"
  30874. },
  30875. "version": {
  30876. "type": "integer"
  30877. }
  30878. },
  30879. "required": ["aggregateID", "seq", "version"],
  30880. "additionalProperties": false
  30881. },
  30882. "location": {
  30883. "$ref": "#/components/schemas/LocationRef"
  30884. },
  30885. "data": {
  30886. "type": "object",
  30887. "properties": {
  30888. "sessionID": {
  30889. "type": "string",
  30890. "pattern": "^ses"
  30891. },
  30892. "info": {
  30893. "$ref": "#/components/schemas/Session"
  30894. }
  30895. },
  30896. "required": ["sessionID", "info"],
  30897. "additionalProperties": false
  30898. }
  30899. },
  30900. "required": ["id", "type", "data"],
  30901. "additionalProperties": false
  30902. },
  30903. "SessionUpdated": {
  30904. "type": "object",
  30905. "properties": {
  30906. "id": {
  30907. "type": "string",
  30908. "pattern": "^evt_"
  30909. },
  30910. "metadata": {
  30911. "type": "object"
  30912. },
  30913. "type": {
  30914. "type": "string",
  30915. "enum": ["session.updated"]
  30916. },
  30917. "durable": {
  30918. "type": "object",
  30919. "properties": {
  30920. "aggregateID": {
  30921. "type": "string"
  30922. },
  30923. "seq": {
  30924. "type": "integer"
  30925. },
  30926. "version": {
  30927. "type": "integer"
  30928. }
  30929. },
  30930. "required": ["aggregateID", "seq", "version"],
  30931. "additionalProperties": false
  30932. },
  30933. "location": {
  30934. "$ref": "#/components/schemas/LocationRef"
  30935. },
  30936. "data": {
  30937. "type": "object",
  30938. "properties": {
  30939. "sessionID": {
  30940. "type": "string",
  30941. "pattern": "^ses"
  30942. },
  30943. "info": {
  30944. "$ref": "#/components/schemas/Session"
  30945. }
  30946. },
  30947. "required": ["sessionID", "info"],
  30948. "additionalProperties": false
  30949. }
  30950. },
  30951. "required": ["id", "type", "data"],
  30952. "additionalProperties": false
  30953. },
  30954. "SessionDeleted": {
  30955. "type": "object",
  30956. "properties": {
  30957. "id": {
  30958. "type": "string",
  30959. "pattern": "^evt_"
  30960. },
  30961. "metadata": {
  30962. "type": "object"
  30963. },
  30964. "type": {
  30965. "type": "string",
  30966. "enum": ["session.deleted"]
  30967. },
  30968. "durable": {
  30969. "type": "object",
  30970. "properties": {
  30971. "aggregateID": {
  30972. "type": "string"
  30973. },
  30974. "seq": {
  30975. "type": "integer"
  30976. },
  30977. "version": {
  30978. "type": "integer"
  30979. }
  30980. },
  30981. "required": ["aggregateID", "seq", "version"],
  30982. "additionalProperties": false
  30983. },
  30984. "location": {
  30985. "$ref": "#/components/schemas/LocationRef"
  30986. },
  30987. "data": {
  30988. "type": "object",
  30989. "properties": {
  30990. "sessionID": {
  30991. "type": "string",
  30992. "pattern": "^ses"
  30993. },
  30994. "info": {
  30995. "$ref": "#/components/schemas/Session"
  30996. }
  30997. },
  30998. "required": ["sessionID", "info"],
  30999. "additionalProperties": false
  31000. }
  31001. },
  31002. "required": ["id", "type", "data"],
  31003. "additionalProperties": false
  31004. },
  31005. "MessageUpdated": {
  31006. "type": "object",
  31007. "properties": {
  31008. "id": {
  31009. "type": "string",
  31010. "pattern": "^evt_"
  31011. },
  31012. "metadata": {
  31013. "type": "object"
  31014. },
  31015. "type": {
  31016. "type": "string",
  31017. "enum": ["message.updated"]
  31018. },
  31019. "durable": {
  31020. "type": "object",
  31021. "properties": {
  31022. "aggregateID": {
  31023. "type": "string"
  31024. },
  31025. "seq": {
  31026. "type": "integer"
  31027. },
  31028. "version": {
  31029. "type": "integer"
  31030. }
  31031. },
  31032. "required": ["aggregateID", "seq", "version"],
  31033. "additionalProperties": false
  31034. },
  31035. "location": {
  31036. "$ref": "#/components/schemas/LocationRef"
  31037. },
  31038. "data": {
  31039. "type": "object",
  31040. "properties": {
  31041. "sessionID": {
  31042. "type": "string",
  31043. "pattern": "^ses"
  31044. },
  31045. "info": {
  31046. "$ref": "#/components/schemas/Message"
  31047. }
  31048. },
  31049. "required": ["sessionID", "info"],
  31050. "additionalProperties": false
  31051. }
  31052. },
  31053. "required": ["id", "type", "data"],
  31054. "additionalProperties": false
  31055. },
  31056. "MessageRemoved": {
  31057. "type": "object",
  31058. "properties": {
  31059. "id": {
  31060. "type": "string",
  31061. "pattern": "^evt_"
  31062. },
  31063. "metadata": {
  31064. "type": "object"
  31065. },
  31066. "type": {
  31067. "type": "string",
  31068. "enum": ["message.removed"]
  31069. },
  31070. "durable": {
  31071. "type": "object",
  31072. "properties": {
  31073. "aggregateID": {
  31074. "type": "string"
  31075. },
  31076. "seq": {
  31077. "type": "integer"
  31078. },
  31079. "version": {
  31080. "type": "integer"
  31081. }
  31082. },
  31083. "required": ["aggregateID", "seq", "version"],
  31084. "additionalProperties": false
  31085. },
  31086. "location": {
  31087. "$ref": "#/components/schemas/LocationRef"
  31088. },
  31089. "data": {
  31090. "type": "object",
  31091. "properties": {
  31092. "sessionID": {
  31093. "type": "string",
  31094. "pattern": "^ses"
  31095. },
  31096. "messageID": {
  31097. "type": "string",
  31098. "pattern": "^msg"
  31099. }
  31100. },
  31101. "required": ["sessionID", "messageID"],
  31102. "additionalProperties": false
  31103. }
  31104. },
  31105. "required": ["id", "type", "data"],
  31106. "additionalProperties": false
  31107. },
  31108. "MessagePartUpdated": {
  31109. "type": "object",
  31110. "properties": {
  31111. "id": {
  31112. "type": "string",
  31113. "pattern": "^evt_"
  31114. },
  31115. "metadata": {
  31116. "type": "object"
  31117. },
  31118. "type": {
  31119. "type": "string",
  31120. "enum": ["message.part.updated"]
  31121. },
  31122. "durable": {
  31123. "type": "object",
  31124. "properties": {
  31125. "aggregateID": {
  31126. "type": "string"
  31127. },
  31128. "seq": {
  31129. "type": "integer"
  31130. },
  31131. "version": {
  31132. "type": "integer"
  31133. }
  31134. },
  31135. "required": ["aggregateID", "seq", "version"],
  31136. "additionalProperties": false
  31137. },
  31138. "location": {
  31139. "$ref": "#/components/schemas/LocationRef"
  31140. },
  31141. "data": {
  31142. "type": "object",
  31143. "properties": {
  31144. "sessionID": {
  31145. "type": "string",
  31146. "pattern": "^ses"
  31147. },
  31148. "part": {
  31149. "$ref": "#/components/schemas/Part"
  31150. },
  31151. "time": {
  31152. "type": "number"
  31153. }
  31154. },
  31155. "required": ["sessionID", "part", "time"],
  31156. "additionalProperties": false
  31157. }
  31158. },
  31159. "required": ["id", "type", "data"],
  31160. "additionalProperties": false
  31161. },
  31162. "MessagePartRemoved": {
  31163. "type": "object",
  31164. "properties": {
  31165. "id": {
  31166. "type": "string",
  31167. "pattern": "^evt_"
  31168. },
  31169. "metadata": {
  31170. "type": "object"
  31171. },
  31172. "type": {
  31173. "type": "string",
  31174. "enum": ["message.part.removed"]
  31175. },
  31176. "durable": {
  31177. "type": "object",
  31178. "properties": {
  31179. "aggregateID": {
  31180. "type": "string"
  31181. },
  31182. "seq": {
  31183. "type": "integer"
  31184. },
  31185. "version": {
  31186. "type": "integer"
  31187. }
  31188. },
  31189. "required": ["aggregateID", "seq", "version"],
  31190. "additionalProperties": false
  31191. },
  31192. "location": {
  31193. "$ref": "#/components/schemas/LocationRef"
  31194. },
  31195. "data": {
  31196. "type": "object",
  31197. "properties": {
  31198. "sessionID": {
  31199. "type": "string",
  31200. "pattern": "^ses"
  31201. },
  31202. "messageID": {
  31203. "type": "string",
  31204. "pattern": "^msg"
  31205. },
  31206. "partID": {
  31207. "type": "string",
  31208. "pattern": "^prt"
  31209. }
  31210. },
  31211. "required": ["sessionID", "messageID", "partID"],
  31212. "additionalProperties": false
  31213. }
  31214. },
  31215. "required": ["id", "type", "data"],
  31216. "additionalProperties": false
  31217. },
  31218. "SessionNextTextDelta": {
  31219. "type": "object",
  31220. "properties": {
  31221. "id": {
  31222. "type": "string",
  31223. "pattern": "^evt_"
  31224. },
  31225. "metadata": {
  31226. "type": "object"
  31227. },
  31228. "type": {
  31229. "type": "string",
  31230. "enum": ["session.next.text.delta"]
  31231. },
  31232. "durable": {
  31233. "type": "object",
  31234. "properties": {
  31235. "aggregateID": {
  31236. "type": "string"
  31237. },
  31238. "seq": {
  31239. "type": "integer"
  31240. },
  31241. "version": {
  31242. "type": "integer"
  31243. }
  31244. },
  31245. "required": ["aggregateID", "seq", "version"],
  31246. "additionalProperties": false
  31247. },
  31248. "location": {
  31249. "$ref": "#/components/schemas/LocationRef"
  31250. },
  31251. "data": {
  31252. "type": "object",
  31253. "properties": {
  31254. "timestamp": {
  31255. "type": "number"
  31256. },
  31257. "sessionID": {
  31258. "type": "string",
  31259. "pattern": "^ses"
  31260. },
  31261. "assistantMessageID": {
  31262. "type": "string",
  31263. "pattern": "^msg_"
  31264. },
  31265. "textID": {
  31266. "type": "string"
  31267. },
  31268. "delta": {
  31269. "type": "string"
  31270. }
  31271. },
  31272. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  31273. "additionalProperties": false
  31274. }
  31275. },
  31276. "required": ["id", "type", "data"],
  31277. "additionalProperties": false
  31278. },
  31279. "SessionNextReasoningDelta": {
  31280. "type": "object",
  31281. "properties": {
  31282. "id": {
  31283. "type": "string",
  31284. "pattern": "^evt_"
  31285. },
  31286. "metadata": {
  31287. "type": "object"
  31288. },
  31289. "type": {
  31290. "type": "string",
  31291. "enum": ["session.next.reasoning.delta"]
  31292. },
  31293. "durable": {
  31294. "type": "object",
  31295. "properties": {
  31296. "aggregateID": {
  31297. "type": "string"
  31298. },
  31299. "seq": {
  31300. "type": "integer"
  31301. },
  31302. "version": {
  31303. "type": "integer"
  31304. }
  31305. },
  31306. "required": ["aggregateID", "seq", "version"],
  31307. "additionalProperties": false
  31308. },
  31309. "location": {
  31310. "$ref": "#/components/schemas/LocationRef"
  31311. },
  31312. "data": {
  31313. "type": "object",
  31314. "properties": {
  31315. "timestamp": {
  31316. "type": "number"
  31317. },
  31318. "sessionID": {
  31319. "type": "string",
  31320. "pattern": "^ses"
  31321. },
  31322. "assistantMessageID": {
  31323. "type": "string",
  31324. "pattern": "^msg_"
  31325. },
  31326. "reasoningID": {
  31327. "type": "string"
  31328. },
  31329. "delta": {
  31330. "type": "string"
  31331. }
  31332. },
  31333. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  31334. "additionalProperties": false
  31335. }
  31336. },
  31337. "required": ["id", "type", "data"],
  31338. "additionalProperties": false
  31339. },
  31340. "SessionNextToolInputDelta": {
  31341. "type": "object",
  31342. "properties": {
  31343. "id": {
  31344. "type": "string",
  31345. "pattern": "^evt_"
  31346. },
  31347. "metadata": {
  31348. "type": "object"
  31349. },
  31350. "type": {
  31351. "type": "string",
  31352. "enum": ["session.next.tool.input.delta"]
  31353. },
  31354. "durable": {
  31355. "type": "object",
  31356. "properties": {
  31357. "aggregateID": {
  31358. "type": "string"
  31359. },
  31360. "seq": {
  31361. "type": "integer"
  31362. },
  31363. "version": {
  31364. "type": "integer"
  31365. }
  31366. },
  31367. "required": ["aggregateID", "seq", "version"],
  31368. "additionalProperties": false
  31369. },
  31370. "location": {
  31371. "$ref": "#/components/schemas/LocationRef"
  31372. },
  31373. "data": {
  31374. "type": "object",
  31375. "properties": {
  31376. "timestamp": {
  31377. "type": "number"
  31378. },
  31379. "sessionID": {
  31380. "type": "string",
  31381. "pattern": "^ses"
  31382. },
  31383. "assistantMessageID": {
  31384. "type": "string",
  31385. "pattern": "^msg_"
  31386. },
  31387. "callID": {
  31388. "type": "string"
  31389. },
  31390. "delta": {
  31391. "type": "string"
  31392. }
  31393. },
  31394. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  31395. "additionalProperties": false
  31396. }
  31397. },
  31398. "required": ["id", "type", "data"],
  31399. "additionalProperties": false
  31400. },
  31401. "SessionNextCompactionDelta": {
  31402. "type": "object",
  31403. "properties": {
  31404. "id": {
  31405. "type": "string",
  31406. "pattern": "^evt_"
  31407. },
  31408. "metadata": {
  31409. "type": "object"
  31410. },
  31411. "type": {
  31412. "type": "string",
  31413. "enum": ["session.next.compaction.delta"]
  31414. },
  31415. "durable": {
  31416. "type": "object",
  31417. "properties": {
  31418. "aggregateID": {
  31419. "type": "string"
  31420. },
  31421. "seq": {
  31422. "type": "integer"
  31423. },
  31424. "version": {
  31425. "type": "integer"
  31426. }
  31427. },
  31428. "required": ["aggregateID", "seq", "version"],
  31429. "additionalProperties": false
  31430. },
  31431. "location": {
  31432. "$ref": "#/components/schemas/LocationRef"
  31433. },
  31434. "data": {
  31435. "type": "object",
  31436. "properties": {
  31437. "timestamp": {
  31438. "type": "number"
  31439. },
  31440. "sessionID": {
  31441. "type": "string",
  31442. "pattern": "^ses"
  31443. },
  31444. "messageID": {
  31445. "type": "string",
  31446. "pattern": "^msg_"
  31447. },
  31448. "text": {
  31449. "type": "string"
  31450. }
  31451. },
  31452. "required": ["timestamp", "sessionID", "messageID", "text"],
  31453. "additionalProperties": false
  31454. }
  31455. },
  31456. "required": ["id", "type", "data"],
  31457. "additionalProperties": false
  31458. },
  31459. "MessagePartDelta": {
  31460. "type": "object",
  31461. "properties": {
  31462. "id": {
  31463. "type": "string",
  31464. "pattern": "^evt_"
  31465. },
  31466. "metadata": {
  31467. "type": "object"
  31468. },
  31469. "type": {
  31470. "type": "string",
  31471. "enum": ["message.part.delta"]
  31472. },
  31473. "durable": {
  31474. "type": "object",
  31475. "properties": {
  31476. "aggregateID": {
  31477. "type": "string"
  31478. },
  31479. "seq": {
  31480. "type": "integer"
  31481. },
  31482. "version": {
  31483. "type": "integer"
  31484. }
  31485. },
  31486. "required": ["aggregateID", "seq", "version"],
  31487. "additionalProperties": false
  31488. },
  31489. "location": {
  31490. "$ref": "#/components/schemas/LocationRef"
  31491. },
  31492. "data": {
  31493. "type": "object",
  31494. "properties": {
  31495. "sessionID": {
  31496. "type": "string",
  31497. "pattern": "^ses"
  31498. },
  31499. "messageID": {
  31500. "type": "string",
  31501. "pattern": "^msg"
  31502. },
  31503. "partID": {
  31504. "type": "string",
  31505. "pattern": "^prt"
  31506. },
  31507. "field": {
  31508. "type": "string"
  31509. },
  31510. "delta": {
  31511. "type": "string"
  31512. }
  31513. },
  31514. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  31515. "additionalProperties": false
  31516. }
  31517. },
  31518. "required": ["id", "type", "data"],
  31519. "additionalProperties": false
  31520. },
  31521. "SessionDiff": {
  31522. "type": "object",
  31523. "properties": {
  31524. "id": {
  31525. "type": "string",
  31526. "pattern": "^evt_"
  31527. },
  31528. "metadata": {
  31529. "type": "object"
  31530. },
  31531. "type": {
  31532. "type": "string",
  31533. "enum": ["session.diff"]
  31534. },
  31535. "durable": {
  31536. "type": "object",
  31537. "properties": {
  31538. "aggregateID": {
  31539. "type": "string"
  31540. },
  31541. "seq": {
  31542. "type": "integer"
  31543. },
  31544. "version": {
  31545. "type": "integer"
  31546. }
  31547. },
  31548. "required": ["aggregateID", "seq", "version"],
  31549. "additionalProperties": false
  31550. },
  31551. "location": {
  31552. "$ref": "#/components/schemas/LocationRef"
  31553. },
  31554. "data": {
  31555. "type": "object",
  31556. "properties": {
  31557. "sessionID": {
  31558. "type": "string",
  31559. "pattern": "^ses"
  31560. },
  31561. "diff": {
  31562. "type": "array",
  31563. "items": {
  31564. "$ref": "#/components/schemas/SnapshotFileDiff"
  31565. }
  31566. }
  31567. },
  31568. "required": ["sessionID", "diff"],
  31569. "additionalProperties": false
  31570. }
  31571. },
  31572. "required": ["id", "type", "data"],
  31573. "additionalProperties": false
  31574. },
  31575. "SessionError": {
  31576. "type": "object",
  31577. "properties": {
  31578. "id": {
  31579. "type": "string",
  31580. "pattern": "^evt_"
  31581. },
  31582. "metadata": {
  31583. "type": "object"
  31584. },
  31585. "type": {
  31586. "type": "string",
  31587. "enum": ["session.error"]
  31588. },
  31589. "durable": {
  31590. "type": "object",
  31591. "properties": {
  31592. "aggregateID": {
  31593. "type": "string"
  31594. },
  31595. "seq": {
  31596. "type": "integer"
  31597. },
  31598. "version": {
  31599. "type": "integer"
  31600. }
  31601. },
  31602. "required": ["aggregateID", "seq", "version"],
  31603. "additionalProperties": false
  31604. },
  31605. "location": {
  31606. "$ref": "#/components/schemas/LocationRef"
  31607. },
  31608. "data": {
  31609. "type": "object",
  31610. "properties": {
  31611. "sessionID": {
  31612. "type": "string",
  31613. "pattern": "^ses"
  31614. },
  31615. "error": {
  31616. "anyOf": [
  31617. {
  31618. "$ref": "#/components/schemas/ProviderAuthError"
  31619. },
  31620. {
  31621. "$ref": "#/components/schemas/UnknownError"
  31622. },
  31623. {
  31624. "$ref": "#/components/schemas/MessageOutputLengthError"
  31625. },
  31626. {
  31627. "$ref": "#/components/schemas/MessageAbortedError"
  31628. },
  31629. {
  31630. "$ref": "#/components/schemas/StructuredOutputError"
  31631. },
  31632. {
  31633. "$ref": "#/components/schemas/ContextOverflowError"
  31634. },
  31635. {
  31636. "$ref": "#/components/schemas/ContentFilterError"
  31637. },
  31638. {
  31639. "$ref": "#/components/schemas/APIError"
  31640. }
  31641. ]
  31642. }
  31643. },
  31644. "additionalProperties": false
  31645. }
  31646. },
  31647. "required": ["id", "type", "data"],
  31648. "additionalProperties": false
  31649. },
  31650. "InstallationUpdated": {
  31651. "type": "object",
  31652. "properties": {
  31653. "id": {
  31654. "type": "string",
  31655. "pattern": "^evt_"
  31656. },
  31657. "metadata": {
  31658. "type": "object"
  31659. },
  31660. "type": {
  31661. "type": "string",
  31662. "enum": ["installation.updated"]
  31663. },
  31664. "durable": {
  31665. "type": "object",
  31666. "properties": {
  31667. "aggregateID": {
  31668. "type": "string"
  31669. },
  31670. "seq": {
  31671. "type": "integer"
  31672. },
  31673. "version": {
  31674. "type": "integer"
  31675. }
  31676. },
  31677. "required": ["aggregateID", "seq", "version"],
  31678. "additionalProperties": false
  31679. },
  31680. "location": {
  31681. "$ref": "#/components/schemas/LocationRef"
  31682. },
  31683. "data": {
  31684. "type": "object",
  31685. "properties": {
  31686. "version": {
  31687. "type": "string"
  31688. }
  31689. },
  31690. "required": ["version"],
  31691. "additionalProperties": false
  31692. }
  31693. },
  31694. "required": ["id", "type", "data"],
  31695. "additionalProperties": false
  31696. },
  31697. "InstallationUpdate-available": {
  31698. "type": "object",
  31699. "properties": {
  31700. "id": {
  31701. "type": "string",
  31702. "pattern": "^evt_"
  31703. },
  31704. "metadata": {
  31705. "type": "object"
  31706. },
  31707. "type": {
  31708. "type": "string",
  31709. "enum": ["installation.update-available"]
  31710. },
  31711. "durable": {
  31712. "type": "object",
  31713. "properties": {
  31714. "aggregateID": {
  31715. "type": "string"
  31716. },
  31717. "seq": {
  31718. "type": "integer"
  31719. },
  31720. "version": {
  31721. "type": "integer"
  31722. }
  31723. },
  31724. "required": ["aggregateID", "seq", "version"],
  31725. "additionalProperties": false
  31726. },
  31727. "location": {
  31728. "$ref": "#/components/schemas/LocationRef"
  31729. },
  31730. "data": {
  31731. "type": "object",
  31732. "properties": {
  31733. "version": {
  31734. "type": "string"
  31735. }
  31736. },
  31737. "required": ["version"],
  31738. "additionalProperties": false
  31739. }
  31740. },
  31741. "required": ["id", "type", "data"],
  31742. "additionalProperties": false
  31743. },
  31744. "FileEdited": {
  31745. "type": "object",
  31746. "properties": {
  31747. "id": {
  31748. "type": "string",
  31749. "pattern": "^evt_"
  31750. },
  31751. "metadata": {
  31752. "type": "object"
  31753. },
  31754. "type": {
  31755. "type": "string",
  31756. "enum": ["file.edited"]
  31757. },
  31758. "durable": {
  31759. "type": "object",
  31760. "properties": {
  31761. "aggregateID": {
  31762. "type": "string"
  31763. },
  31764. "seq": {
  31765. "type": "integer"
  31766. },
  31767. "version": {
  31768. "type": "integer"
  31769. }
  31770. },
  31771. "required": ["aggregateID", "seq", "version"],
  31772. "additionalProperties": false
  31773. },
  31774. "location": {
  31775. "$ref": "#/components/schemas/LocationRef"
  31776. },
  31777. "data": {
  31778. "type": "object",
  31779. "properties": {
  31780. "file": {
  31781. "type": "string"
  31782. }
  31783. },
  31784. "required": ["file"],
  31785. "additionalProperties": false
  31786. }
  31787. },
  31788. "required": ["id", "type", "data"],
  31789. "additionalProperties": false
  31790. },
  31791. "ReferenceUpdated": {
  31792. "type": "object",
  31793. "properties": {
  31794. "id": {
  31795. "type": "string",
  31796. "pattern": "^evt_"
  31797. },
  31798. "metadata": {
  31799. "type": "object"
  31800. },
  31801. "type": {
  31802. "type": "string",
  31803. "enum": ["reference.updated"]
  31804. },
  31805. "durable": {
  31806. "type": "object",
  31807. "properties": {
  31808. "aggregateID": {
  31809. "type": "string"
  31810. },
  31811. "seq": {
  31812. "type": "integer"
  31813. },
  31814. "version": {
  31815. "type": "integer"
  31816. }
  31817. },
  31818. "required": ["aggregateID", "seq", "version"],
  31819. "additionalProperties": false
  31820. },
  31821. "location": {
  31822. "$ref": "#/components/schemas/LocationRef"
  31823. },
  31824. "data": {
  31825. "type": "object",
  31826. "properties": {}
  31827. }
  31828. },
  31829. "required": ["id", "type", "data"],
  31830. "additionalProperties": false
  31831. },
  31832. "PermissionV2Asked": {
  31833. "type": "object",
  31834. "properties": {
  31835. "id": {
  31836. "type": "string",
  31837. "pattern": "^evt_"
  31838. },
  31839. "metadata": {
  31840. "type": "object"
  31841. },
  31842. "type": {
  31843. "type": "string",
  31844. "enum": ["permission.v2.asked"]
  31845. },
  31846. "durable": {
  31847. "type": "object",
  31848. "properties": {
  31849. "aggregateID": {
  31850. "type": "string"
  31851. },
  31852. "seq": {
  31853. "type": "integer"
  31854. },
  31855. "version": {
  31856. "type": "integer"
  31857. }
  31858. },
  31859. "required": ["aggregateID", "seq", "version"],
  31860. "additionalProperties": false
  31861. },
  31862. "location": {
  31863. "$ref": "#/components/schemas/LocationRef"
  31864. },
  31865. "data": {
  31866. "type": "object",
  31867. "properties": {
  31868. "id": {
  31869. "type": "string",
  31870. "pattern": "^per"
  31871. },
  31872. "sessionID": {
  31873. "type": "string",
  31874. "pattern": "^ses"
  31875. },
  31876. "action": {
  31877. "type": "string"
  31878. },
  31879. "resources": {
  31880. "type": "array",
  31881. "items": {
  31882. "type": "string"
  31883. }
  31884. },
  31885. "save": {
  31886. "type": "array",
  31887. "items": {
  31888. "type": "string"
  31889. }
  31890. },
  31891. "metadata": {
  31892. "type": "object"
  31893. },
  31894. "source": {
  31895. "$ref": "#/components/schemas/PermissionV2Source"
  31896. }
  31897. },
  31898. "required": ["id", "sessionID", "action", "resources"],
  31899. "additionalProperties": false
  31900. }
  31901. },
  31902. "required": ["id", "type", "data"],
  31903. "additionalProperties": false
  31904. },
  31905. "PermissionV2Replied": {
  31906. "type": "object",
  31907. "properties": {
  31908. "id": {
  31909. "type": "string",
  31910. "pattern": "^evt_"
  31911. },
  31912. "metadata": {
  31913. "type": "object"
  31914. },
  31915. "type": {
  31916. "type": "string",
  31917. "enum": ["permission.v2.replied"]
  31918. },
  31919. "durable": {
  31920. "type": "object",
  31921. "properties": {
  31922. "aggregateID": {
  31923. "type": "string"
  31924. },
  31925. "seq": {
  31926. "type": "integer"
  31927. },
  31928. "version": {
  31929. "type": "integer"
  31930. }
  31931. },
  31932. "required": ["aggregateID", "seq", "version"],
  31933. "additionalProperties": false
  31934. },
  31935. "location": {
  31936. "$ref": "#/components/schemas/LocationRef"
  31937. },
  31938. "data": {
  31939. "type": "object",
  31940. "properties": {
  31941. "sessionID": {
  31942. "type": "string",
  31943. "pattern": "^ses"
  31944. },
  31945. "requestID": {
  31946. "type": "string",
  31947. "pattern": "^per"
  31948. },
  31949. "reply": {
  31950. "$ref": "#/components/schemas/PermissionV2Reply"
  31951. }
  31952. },
  31953. "required": ["sessionID", "requestID", "reply"],
  31954. "additionalProperties": false
  31955. }
  31956. },
  31957. "required": ["id", "type", "data"],
  31958. "additionalProperties": false
  31959. },
  31960. "PluginAdded": {
  31961. "type": "object",
  31962. "properties": {
  31963. "id": {
  31964. "type": "string",
  31965. "pattern": "^evt_"
  31966. },
  31967. "metadata": {
  31968. "type": "object"
  31969. },
  31970. "type": {
  31971. "type": "string",
  31972. "enum": ["plugin.added"]
  31973. },
  31974. "durable": {
  31975. "type": "object",
  31976. "properties": {
  31977. "aggregateID": {
  31978. "type": "string"
  31979. },
  31980. "seq": {
  31981. "type": "integer"
  31982. },
  31983. "version": {
  31984. "type": "integer"
  31985. }
  31986. },
  31987. "required": ["aggregateID", "seq", "version"],
  31988. "additionalProperties": false
  31989. },
  31990. "location": {
  31991. "$ref": "#/components/schemas/LocationRef"
  31992. },
  31993. "data": {
  31994. "type": "object",
  31995. "properties": {
  31996. "id": {
  31997. "type": "string"
  31998. }
  31999. },
  32000. "required": ["id"],
  32001. "additionalProperties": false
  32002. }
  32003. },
  32004. "required": ["id", "type", "data"],
  32005. "additionalProperties": false
  32006. },
  32007. "ProjectDirectoriesUpdated": {
  32008. "type": "object",
  32009. "properties": {
  32010. "id": {
  32011. "type": "string",
  32012. "pattern": "^evt_"
  32013. },
  32014. "metadata": {
  32015. "type": "object"
  32016. },
  32017. "type": {
  32018. "type": "string",
  32019. "enum": ["project.directories.updated"]
  32020. },
  32021. "durable": {
  32022. "type": "object",
  32023. "properties": {
  32024. "aggregateID": {
  32025. "type": "string"
  32026. },
  32027. "seq": {
  32028. "type": "integer"
  32029. },
  32030. "version": {
  32031. "type": "integer"
  32032. }
  32033. },
  32034. "required": ["aggregateID", "seq", "version"],
  32035. "additionalProperties": false
  32036. },
  32037. "location": {
  32038. "$ref": "#/components/schemas/LocationRef"
  32039. },
  32040. "data": {
  32041. "type": "object",
  32042. "properties": {
  32043. "projectID": {
  32044. "type": "string"
  32045. }
  32046. },
  32047. "required": ["projectID"],
  32048. "additionalProperties": false
  32049. }
  32050. },
  32051. "required": ["id", "type", "data"],
  32052. "additionalProperties": false
  32053. },
  32054. "FileWatcherUpdated": {
  32055. "type": "object",
  32056. "properties": {
  32057. "id": {
  32058. "type": "string",
  32059. "pattern": "^evt_"
  32060. },
  32061. "metadata": {
  32062. "type": "object"
  32063. },
  32064. "type": {
  32065. "type": "string",
  32066. "enum": ["file.watcher.updated"]
  32067. },
  32068. "durable": {
  32069. "type": "object",
  32070. "properties": {
  32071. "aggregateID": {
  32072. "type": "string"
  32073. },
  32074. "seq": {
  32075. "type": "integer"
  32076. },
  32077. "version": {
  32078. "type": "integer"
  32079. }
  32080. },
  32081. "required": ["aggregateID", "seq", "version"],
  32082. "additionalProperties": false
  32083. },
  32084. "location": {
  32085. "$ref": "#/components/schemas/LocationRef"
  32086. },
  32087. "data": {
  32088. "type": "object",
  32089. "properties": {
  32090. "file": {
  32091. "type": "string"
  32092. },
  32093. "event": {
  32094. "type": "string",
  32095. "enum": ["add", "change", "unlink"]
  32096. }
  32097. },
  32098. "required": ["file", "event"],
  32099. "additionalProperties": false
  32100. }
  32101. },
  32102. "required": ["id", "type", "data"],
  32103. "additionalProperties": false
  32104. },
  32105. "PtyCreated": {
  32106. "type": "object",
  32107. "properties": {
  32108. "id": {
  32109. "type": "string",
  32110. "pattern": "^evt_"
  32111. },
  32112. "metadata": {
  32113. "type": "object"
  32114. },
  32115. "type": {
  32116. "type": "string",
  32117. "enum": ["pty.created"]
  32118. },
  32119. "durable": {
  32120. "type": "object",
  32121. "properties": {
  32122. "aggregateID": {
  32123. "type": "string"
  32124. },
  32125. "seq": {
  32126. "type": "integer"
  32127. },
  32128. "version": {
  32129. "type": "integer"
  32130. }
  32131. },
  32132. "required": ["aggregateID", "seq", "version"],
  32133. "additionalProperties": false
  32134. },
  32135. "location": {
  32136. "$ref": "#/components/schemas/LocationRef"
  32137. },
  32138. "data": {
  32139. "type": "object",
  32140. "properties": {
  32141. "info": {
  32142. "$ref": "#/components/schemas/Pty"
  32143. }
  32144. },
  32145. "required": ["info"],
  32146. "additionalProperties": false
  32147. }
  32148. },
  32149. "required": ["id", "type", "data"],
  32150. "additionalProperties": false
  32151. },
  32152. "PtyUpdated": {
  32153. "type": "object",
  32154. "properties": {
  32155. "id": {
  32156. "type": "string",
  32157. "pattern": "^evt_"
  32158. },
  32159. "metadata": {
  32160. "type": "object"
  32161. },
  32162. "type": {
  32163. "type": "string",
  32164. "enum": ["pty.updated"]
  32165. },
  32166. "durable": {
  32167. "type": "object",
  32168. "properties": {
  32169. "aggregateID": {
  32170. "type": "string"
  32171. },
  32172. "seq": {
  32173. "type": "integer"
  32174. },
  32175. "version": {
  32176. "type": "integer"
  32177. }
  32178. },
  32179. "required": ["aggregateID", "seq", "version"],
  32180. "additionalProperties": false
  32181. },
  32182. "location": {
  32183. "$ref": "#/components/schemas/LocationRef"
  32184. },
  32185. "data": {
  32186. "type": "object",
  32187. "properties": {
  32188. "info": {
  32189. "$ref": "#/components/schemas/Pty"
  32190. }
  32191. },
  32192. "required": ["info"],
  32193. "additionalProperties": false
  32194. }
  32195. },
  32196. "required": ["id", "type", "data"],
  32197. "additionalProperties": false
  32198. },
  32199. "PtyExited": {
  32200. "type": "object",
  32201. "properties": {
  32202. "id": {
  32203. "type": "string",
  32204. "pattern": "^evt_"
  32205. },
  32206. "metadata": {
  32207. "type": "object"
  32208. },
  32209. "type": {
  32210. "type": "string",
  32211. "enum": ["pty.exited"]
  32212. },
  32213. "durable": {
  32214. "type": "object",
  32215. "properties": {
  32216. "aggregateID": {
  32217. "type": "string"
  32218. },
  32219. "seq": {
  32220. "type": "integer"
  32221. },
  32222. "version": {
  32223. "type": "integer"
  32224. }
  32225. },
  32226. "required": ["aggregateID", "seq", "version"],
  32227. "additionalProperties": false
  32228. },
  32229. "location": {
  32230. "$ref": "#/components/schemas/LocationRef"
  32231. },
  32232. "data": {
  32233. "type": "object",
  32234. "properties": {
  32235. "id": {
  32236. "type": "string",
  32237. "pattern": "^pty"
  32238. },
  32239. "exitCode": {
  32240. "type": "integer",
  32241. "minimum": 0
  32242. }
  32243. },
  32244. "required": ["id", "exitCode"],
  32245. "additionalProperties": false
  32246. }
  32247. },
  32248. "required": ["id", "type", "data"],
  32249. "additionalProperties": false
  32250. },
  32251. "PtyDeleted": {
  32252. "type": "object",
  32253. "properties": {
  32254. "id": {
  32255. "type": "string",
  32256. "pattern": "^evt_"
  32257. },
  32258. "metadata": {
  32259. "type": "object"
  32260. },
  32261. "type": {
  32262. "type": "string",
  32263. "enum": ["pty.deleted"]
  32264. },
  32265. "durable": {
  32266. "type": "object",
  32267. "properties": {
  32268. "aggregateID": {
  32269. "type": "string"
  32270. },
  32271. "seq": {
  32272. "type": "integer"
  32273. },
  32274. "version": {
  32275. "type": "integer"
  32276. }
  32277. },
  32278. "required": ["aggregateID", "seq", "version"],
  32279. "additionalProperties": false
  32280. },
  32281. "location": {
  32282. "$ref": "#/components/schemas/LocationRef"
  32283. },
  32284. "data": {
  32285. "type": "object",
  32286. "properties": {
  32287. "id": {
  32288. "type": "string",
  32289. "pattern": "^pty"
  32290. }
  32291. },
  32292. "required": ["id"],
  32293. "additionalProperties": false
  32294. }
  32295. },
  32296. "required": ["id", "type", "data"],
  32297. "additionalProperties": false
  32298. },
  32299. "QuestionV2Asked": {
  32300. "type": "object",
  32301. "properties": {
  32302. "id": {
  32303. "type": "string",
  32304. "pattern": "^evt_"
  32305. },
  32306. "metadata": {
  32307. "type": "object"
  32308. },
  32309. "type": {
  32310. "type": "string",
  32311. "enum": ["question.v2.asked"]
  32312. },
  32313. "durable": {
  32314. "type": "object",
  32315. "properties": {
  32316. "aggregateID": {
  32317. "type": "string"
  32318. },
  32319. "seq": {
  32320. "type": "integer"
  32321. },
  32322. "version": {
  32323. "type": "integer"
  32324. }
  32325. },
  32326. "required": ["aggregateID", "seq", "version"],
  32327. "additionalProperties": false
  32328. },
  32329. "location": {
  32330. "$ref": "#/components/schemas/LocationRef"
  32331. },
  32332. "data": {
  32333. "type": "object",
  32334. "properties": {
  32335. "id": {
  32336. "type": "string",
  32337. "pattern": "^que"
  32338. },
  32339. "sessionID": {
  32340. "type": "string",
  32341. "pattern": "^ses"
  32342. },
  32343. "questions": {
  32344. "type": "array",
  32345. "items": {
  32346. "$ref": "#/components/schemas/QuestionV2Info"
  32347. },
  32348. "description": "Questions to ask"
  32349. },
  32350. "tool": {
  32351. "$ref": "#/components/schemas/QuestionV2Tool"
  32352. }
  32353. },
  32354. "required": ["id", "sessionID", "questions"],
  32355. "additionalProperties": false
  32356. }
  32357. },
  32358. "required": ["id", "type", "data"],
  32359. "additionalProperties": false
  32360. },
  32361. "QuestionV2Replied": {
  32362. "type": "object",
  32363. "properties": {
  32364. "id": {
  32365. "type": "string",
  32366. "pattern": "^evt_"
  32367. },
  32368. "metadata": {
  32369. "type": "object"
  32370. },
  32371. "type": {
  32372. "type": "string",
  32373. "enum": ["question.v2.replied"]
  32374. },
  32375. "durable": {
  32376. "type": "object",
  32377. "properties": {
  32378. "aggregateID": {
  32379. "type": "string"
  32380. },
  32381. "seq": {
  32382. "type": "integer"
  32383. },
  32384. "version": {
  32385. "type": "integer"
  32386. }
  32387. },
  32388. "required": ["aggregateID", "seq", "version"],
  32389. "additionalProperties": false
  32390. },
  32391. "location": {
  32392. "$ref": "#/components/schemas/LocationRef"
  32393. },
  32394. "data": {
  32395. "type": "object",
  32396. "properties": {
  32397. "sessionID": {
  32398. "type": "string",
  32399. "pattern": "^ses"
  32400. },
  32401. "requestID": {
  32402. "type": "string",
  32403. "pattern": "^que"
  32404. },
  32405. "answers": {
  32406. "type": "array",
  32407. "items": {
  32408. "$ref": "#/components/schemas/QuestionV2Answer"
  32409. }
  32410. }
  32411. },
  32412. "required": ["sessionID", "requestID", "answers"],
  32413. "additionalProperties": false
  32414. }
  32415. },
  32416. "required": ["id", "type", "data"],
  32417. "additionalProperties": false
  32418. },
  32419. "QuestionV2Rejected": {
  32420. "type": "object",
  32421. "properties": {
  32422. "id": {
  32423. "type": "string",
  32424. "pattern": "^evt_"
  32425. },
  32426. "metadata": {
  32427. "type": "object"
  32428. },
  32429. "type": {
  32430. "type": "string",
  32431. "enum": ["question.v2.rejected"]
  32432. },
  32433. "durable": {
  32434. "type": "object",
  32435. "properties": {
  32436. "aggregateID": {
  32437. "type": "string"
  32438. },
  32439. "seq": {
  32440. "type": "integer"
  32441. },
  32442. "version": {
  32443. "type": "integer"
  32444. }
  32445. },
  32446. "required": ["aggregateID", "seq", "version"],
  32447. "additionalProperties": false
  32448. },
  32449. "location": {
  32450. "$ref": "#/components/schemas/LocationRef"
  32451. },
  32452. "data": {
  32453. "type": "object",
  32454. "properties": {
  32455. "sessionID": {
  32456. "type": "string",
  32457. "pattern": "^ses"
  32458. },
  32459. "requestID": {
  32460. "type": "string",
  32461. "pattern": "^que"
  32462. }
  32463. },
  32464. "required": ["sessionID", "requestID"],
  32465. "additionalProperties": false
  32466. }
  32467. },
  32468. "required": ["id", "type", "data"],
  32469. "additionalProperties": false
  32470. },
  32471. "TodoUpdated": {
  32472. "type": "object",
  32473. "properties": {
  32474. "id": {
  32475. "type": "string",
  32476. "pattern": "^evt_"
  32477. },
  32478. "metadata": {
  32479. "type": "object"
  32480. },
  32481. "type": {
  32482. "type": "string",
  32483. "enum": ["todo.updated"]
  32484. },
  32485. "durable": {
  32486. "type": "object",
  32487. "properties": {
  32488. "aggregateID": {
  32489. "type": "string"
  32490. },
  32491. "seq": {
  32492. "type": "integer"
  32493. },
  32494. "version": {
  32495. "type": "integer"
  32496. }
  32497. },
  32498. "required": ["aggregateID", "seq", "version"],
  32499. "additionalProperties": false
  32500. },
  32501. "location": {
  32502. "$ref": "#/components/schemas/LocationRef"
  32503. },
  32504. "data": {
  32505. "type": "object",
  32506. "properties": {
  32507. "sessionID": {
  32508. "type": "string",
  32509. "pattern": "^ses"
  32510. },
  32511. "todos": {
  32512. "type": "array",
  32513. "items": {
  32514. "$ref": "#/components/schemas/Todo"
  32515. }
  32516. }
  32517. },
  32518. "required": ["sessionID", "todos"],
  32519. "additionalProperties": false
  32520. }
  32521. },
  32522. "required": ["id", "type", "data"],
  32523. "additionalProperties": false
  32524. },
  32525. "LspUpdated": {
  32526. "type": "object",
  32527. "properties": {
  32528. "id": {
  32529. "type": "string",
  32530. "pattern": "^evt_"
  32531. },
  32532. "metadata": {
  32533. "type": "object"
  32534. },
  32535. "type": {
  32536. "type": "string",
  32537. "enum": ["lsp.updated"]
  32538. },
  32539. "durable": {
  32540. "type": "object",
  32541. "properties": {
  32542. "aggregateID": {
  32543. "type": "string"
  32544. },
  32545. "seq": {
  32546. "type": "integer"
  32547. },
  32548. "version": {
  32549. "type": "integer"
  32550. }
  32551. },
  32552. "required": ["aggregateID", "seq", "version"],
  32553. "additionalProperties": false
  32554. },
  32555. "location": {
  32556. "$ref": "#/components/schemas/LocationRef"
  32557. },
  32558. "data": {
  32559. "type": "object",
  32560. "properties": {}
  32561. }
  32562. },
  32563. "required": ["id", "type", "data"],
  32564. "additionalProperties": false
  32565. },
  32566. "PermissionAsked": {
  32567. "type": "object",
  32568. "properties": {
  32569. "id": {
  32570. "type": "string",
  32571. "pattern": "^evt_"
  32572. },
  32573. "metadata": {
  32574. "type": "object"
  32575. },
  32576. "type": {
  32577. "type": "string",
  32578. "enum": ["permission.asked"]
  32579. },
  32580. "durable": {
  32581. "type": "object",
  32582. "properties": {
  32583. "aggregateID": {
  32584. "type": "string"
  32585. },
  32586. "seq": {
  32587. "type": "integer"
  32588. },
  32589. "version": {
  32590. "type": "integer"
  32591. }
  32592. },
  32593. "required": ["aggregateID", "seq", "version"],
  32594. "additionalProperties": false
  32595. },
  32596. "location": {
  32597. "$ref": "#/components/schemas/LocationRef"
  32598. },
  32599. "data": {
  32600. "type": "object",
  32601. "properties": {
  32602. "id": {
  32603. "type": "string",
  32604. "pattern": "^per"
  32605. },
  32606. "sessionID": {
  32607. "type": "string",
  32608. "pattern": "^ses"
  32609. },
  32610. "permission": {
  32611. "type": "string"
  32612. },
  32613. "patterns": {
  32614. "type": "array",
  32615. "items": {
  32616. "type": "string"
  32617. }
  32618. },
  32619. "metadata": {
  32620. "type": "object"
  32621. },
  32622. "always": {
  32623. "type": "array",
  32624. "items": {
  32625. "type": "string"
  32626. }
  32627. },
  32628. "tool": {
  32629. "type": "object",
  32630. "properties": {
  32631. "messageID": {
  32632. "type": "string"
  32633. },
  32634. "callID": {
  32635. "type": "string"
  32636. }
  32637. },
  32638. "required": ["messageID", "callID"],
  32639. "additionalProperties": false
  32640. }
  32641. },
  32642. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  32643. "additionalProperties": false
  32644. }
  32645. },
  32646. "required": ["id", "type", "data"],
  32647. "additionalProperties": false
  32648. },
  32649. "PermissionReplied": {
  32650. "type": "object",
  32651. "properties": {
  32652. "id": {
  32653. "type": "string",
  32654. "pattern": "^evt_"
  32655. },
  32656. "metadata": {
  32657. "type": "object"
  32658. },
  32659. "type": {
  32660. "type": "string",
  32661. "enum": ["permission.replied"]
  32662. },
  32663. "durable": {
  32664. "type": "object",
  32665. "properties": {
  32666. "aggregateID": {
  32667. "type": "string"
  32668. },
  32669. "seq": {
  32670. "type": "integer"
  32671. },
  32672. "version": {
  32673. "type": "integer"
  32674. }
  32675. },
  32676. "required": ["aggregateID", "seq", "version"],
  32677. "additionalProperties": false
  32678. },
  32679. "location": {
  32680. "$ref": "#/components/schemas/LocationRef"
  32681. },
  32682. "data": {
  32683. "type": "object",
  32684. "properties": {
  32685. "sessionID": {
  32686. "type": "string",
  32687. "pattern": "^ses"
  32688. },
  32689. "requestID": {
  32690. "type": "string",
  32691. "pattern": "^per"
  32692. },
  32693. "reply": {
  32694. "type": "string",
  32695. "enum": ["once", "always", "reject"]
  32696. }
  32697. },
  32698. "required": ["sessionID", "requestID", "reply"],
  32699. "additionalProperties": false
  32700. }
  32701. },
  32702. "required": ["id", "type", "data"],
  32703. "additionalProperties": false
  32704. },
  32705. "TuiPromptAppend": {
  32706. "type": "object",
  32707. "properties": {
  32708. "id": {
  32709. "type": "string",
  32710. "pattern": "^evt_"
  32711. },
  32712. "metadata": {
  32713. "type": "object"
  32714. },
  32715. "type": {
  32716. "type": "string",
  32717. "enum": ["tui.prompt.append"]
  32718. },
  32719. "durable": {
  32720. "type": "object",
  32721. "properties": {
  32722. "aggregateID": {
  32723. "type": "string"
  32724. },
  32725. "seq": {
  32726. "type": "integer"
  32727. },
  32728. "version": {
  32729. "type": "integer"
  32730. }
  32731. },
  32732. "required": ["aggregateID", "seq", "version"],
  32733. "additionalProperties": false
  32734. },
  32735. "location": {
  32736. "$ref": "#/components/schemas/LocationRef"
  32737. },
  32738. "data": {
  32739. "type": "object",
  32740. "properties": {
  32741. "text": {
  32742. "type": "string"
  32743. }
  32744. },
  32745. "required": ["text"],
  32746. "additionalProperties": false
  32747. }
  32748. },
  32749. "required": ["id", "type", "data"],
  32750. "additionalProperties": false
  32751. },
  32752. "TuiCommandExecute": {
  32753. "type": "object",
  32754. "properties": {
  32755. "id": {
  32756. "type": "string",
  32757. "pattern": "^evt_"
  32758. },
  32759. "metadata": {
  32760. "type": "object"
  32761. },
  32762. "type": {
  32763. "type": "string",
  32764. "enum": ["tui.command.execute"]
  32765. },
  32766. "durable": {
  32767. "type": "object",
  32768. "properties": {
  32769. "aggregateID": {
  32770. "type": "string"
  32771. },
  32772. "seq": {
  32773. "type": "integer"
  32774. },
  32775. "version": {
  32776. "type": "integer"
  32777. }
  32778. },
  32779. "required": ["aggregateID", "seq", "version"],
  32780. "additionalProperties": false
  32781. },
  32782. "location": {
  32783. "$ref": "#/components/schemas/LocationRef"
  32784. },
  32785. "data": {
  32786. "type": "object",
  32787. "properties": {
  32788. "command": {
  32789. "anyOf": [
  32790. {
  32791. "type": "string",
  32792. "enum": [
  32793. "session.list",
  32794. "session.new",
  32795. "session.share",
  32796. "session.interrupt",
  32797. "session.compact",
  32798. "session.page.up",
  32799. "session.page.down",
  32800. "session.line.up",
  32801. "session.line.down",
  32802. "session.half.page.up",
  32803. "session.half.page.down",
  32804. "session.first",
  32805. "session.last",
  32806. "prompt.clear",
  32807. "prompt.submit",
  32808. "agent.cycle"
  32809. ]
  32810. },
  32811. {
  32812. "type": "string"
  32813. }
  32814. ]
  32815. }
  32816. },
  32817. "required": ["command"],
  32818. "additionalProperties": false
  32819. }
  32820. },
  32821. "required": ["id", "type", "data"],
  32822. "additionalProperties": false
  32823. },
  32824. "TuiToastShow": {
  32825. "type": "object",
  32826. "properties": {
  32827. "id": {
  32828. "type": "string",
  32829. "pattern": "^evt_"
  32830. },
  32831. "metadata": {
  32832. "type": "object"
  32833. },
  32834. "type": {
  32835. "type": "string",
  32836. "enum": ["tui.toast.show"]
  32837. },
  32838. "durable": {
  32839. "type": "object",
  32840. "properties": {
  32841. "aggregateID": {
  32842. "type": "string"
  32843. },
  32844. "seq": {
  32845. "type": "integer"
  32846. },
  32847. "version": {
  32848. "type": "integer"
  32849. }
  32850. },
  32851. "required": ["aggregateID", "seq", "version"],
  32852. "additionalProperties": false
  32853. },
  32854. "location": {
  32855. "$ref": "#/components/schemas/LocationRef"
  32856. },
  32857. "data": {
  32858. "type": "object",
  32859. "properties": {
  32860. "title": {
  32861. "type": "string"
  32862. },
  32863. "message": {
  32864. "type": "string"
  32865. },
  32866. "variant": {
  32867. "type": "string",
  32868. "enum": ["info", "success", "warning", "error"]
  32869. },
  32870. "duration": {
  32871. "type": "integer",
  32872. "exclusiveMinimum": 0
  32873. }
  32874. },
  32875. "required": ["message", "variant"],
  32876. "additionalProperties": false
  32877. }
  32878. },
  32879. "required": ["id", "type", "data"],
  32880. "additionalProperties": false
  32881. },
  32882. "TuiSessionSelect": {
  32883. "type": "object",
  32884. "properties": {
  32885. "id": {
  32886. "type": "string",
  32887. "pattern": "^evt_"
  32888. },
  32889. "metadata": {
  32890. "type": "object"
  32891. },
  32892. "type": {
  32893. "type": "string",
  32894. "enum": ["tui.session.select"]
  32895. },
  32896. "durable": {
  32897. "type": "object",
  32898. "properties": {
  32899. "aggregateID": {
  32900. "type": "string"
  32901. },
  32902. "seq": {
  32903. "type": "integer"
  32904. },
  32905. "version": {
  32906. "type": "integer"
  32907. }
  32908. },
  32909. "required": ["aggregateID", "seq", "version"],
  32910. "additionalProperties": false
  32911. },
  32912. "location": {
  32913. "$ref": "#/components/schemas/LocationRef"
  32914. },
  32915. "data": {
  32916. "type": "object",
  32917. "properties": {
  32918. "sessionID": {
  32919. "type": "string",
  32920. "pattern": "^ses",
  32921. "description": "Session ID to navigate to"
  32922. }
  32923. },
  32924. "required": ["sessionID"],
  32925. "additionalProperties": false
  32926. }
  32927. },
  32928. "required": ["id", "type", "data"],
  32929. "additionalProperties": false
  32930. },
  32931. "McpToolsChanged": {
  32932. "type": "object",
  32933. "properties": {
  32934. "id": {
  32935. "type": "string",
  32936. "pattern": "^evt_"
  32937. },
  32938. "metadata": {
  32939. "type": "object"
  32940. },
  32941. "type": {
  32942. "type": "string",
  32943. "enum": ["mcp.tools.changed"]
  32944. },
  32945. "durable": {
  32946. "type": "object",
  32947. "properties": {
  32948. "aggregateID": {
  32949. "type": "string"
  32950. },
  32951. "seq": {
  32952. "type": "integer"
  32953. },
  32954. "version": {
  32955. "type": "integer"
  32956. }
  32957. },
  32958. "required": ["aggregateID", "seq", "version"],
  32959. "additionalProperties": false
  32960. },
  32961. "location": {
  32962. "$ref": "#/components/schemas/LocationRef"
  32963. },
  32964. "data": {
  32965. "type": "object",
  32966. "properties": {
  32967. "server": {
  32968. "type": "string"
  32969. }
  32970. },
  32971. "required": ["server"],
  32972. "additionalProperties": false
  32973. }
  32974. },
  32975. "required": ["id", "type", "data"],
  32976. "additionalProperties": false
  32977. },
  32978. "McpBrowserOpenFailed": {
  32979. "type": "object",
  32980. "properties": {
  32981. "id": {
  32982. "type": "string",
  32983. "pattern": "^evt_"
  32984. },
  32985. "metadata": {
  32986. "type": "object"
  32987. },
  32988. "type": {
  32989. "type": "string",
  32990. "enum": ["mcp.browser.open.failed"]
  32991. },
  32992. "durable": {
  32993. "type": "object",
  32994. "properties": {
  32995. "aggregateID": {
  32996. "type": "string"
  32997. },
  32998. "seq": {
  32999. "type": "integer"
  33000. },
  33001. "version": {
  33002. "type": "integer"
  33003. }
  33004. },
  33005. "required": ["aggregateID", "seq", "version"],
  33006. "additionalProperties": false
  33007. },
  33008. "location": {
  33009. "$ref": "#/components/schemas/LocationRef"
  33010. },
  33011. "data": {
  33012. "type": "object",
  33013. "properties": {
  33014. "mcpName": {
  33015. "type": "string"
  33016. },
  33017. "url": {
  33018. "type": "string"
  33019. }
  33020. },
  33021. "required": ["mcpName", "url"],
  33022. "additionalProperties": false
  33023. }
  33024. },
  33025. "required": ["id", "type", "data"],
  33026. "additionalProperties": false
  33027. },
  33028. "CommandExecuted": {
  33029. "type": "object",
  33030. "properties": {
  33031. "id": {
  33032. "type": "string",
  33033. "pattern": "^evt_"
  33034. },
  33035. "metadata": {
  33036. "type": "object"
  33037. },
  33038. "type": {
  33039. "type": "string",
  33040. "enum": ["command.executed"]
  33041. },
  33042. "durable": {
  33043. "type": "object",
  33044. "properties": {
  33045. "aggregateID": {
  33046. "type": "string"
  33047. },
  33048. "seq": {
  33049. "type": "integer"
  33050. },
  33051. "version": {
  33052. "type": "integer"
  33053. }
  33054. },
  33055. "required": ["aggregateID", "seq", "version"],
  33056. "additionalProperties": false
  33057. },
  33058. "location": {
  33059. "$ref": "#/components/schemas/LocationRef"
  33060. },
  33061. "data": {
  33062. "type": "object",
  33063. "properties": {
  33064. "name": {
  33065. "type": "string"
  33066. },
  33067. "sessionID": {
  33068. "type": "string",
  33069. "pattern": "^ses"
  33070. },
  33071. "arguments": {
  33072. "type": "string"
  33073. },
  33074. "messageID": {
  33075. "type": "string",
  33076. "pattern": "^msg"
  33077. }
  33078. },
  33079. "required": ["name", "sessionID", "arguments", "messageID"],
  33080. "additionalProperties": false
  33081. }
  33082. },
  33083. "required": ["id", "type", "data"],
  33084. "additionalProperties": false
  33085. },
  33086. "ProjectUpdated": {
  33087. "type": "object",
  33088. "properties": {
  33089. "id": {
  33090. "type": "string",
  33091. "pattern": "^evt_"
  33092. },
  33093. "metadata": {
  33094. "type": "object"
  33095. },
  33096. "type": {
  33097. "type": "string",
  33098. "enum": ["project.updated"]
  33099. },
  33100. "durable": {
  33101. "type": "object",
  33102. "properties": {
  33103. "aggregateID": {
  33104. "type": "string"
  33105. },
  33106. "seq": {
  33107. "type": "integer"
  33108. },
  33109. "version": {
  33110. "type": "integer"
  33111. }
  33112. },
  33113. "required": ["aggregateID", "seq", "version"],
  33114. "additionalProperties": false
  33115. },
  33116. "location": {
  33117. "$ref": "#/components/schemas/LocationRef"
  33118. },
  33119. "data": {
  33120. "type": "object",
  33121. "properties": {
  33122. "id": {
  33123. "type": "string"
  33124. },
  33125. "worktree": {
  33126. "type": "string"
  33127. },
  33128. "vcs": {
  33129. "$ref": "#/components/schemas/ProjectVcs"
  33130. },
  33131. "name": {
  33132. "type": "string"
  33133. },
  33134. "icon": {
  33135. "$ref": "#/components/schemas/ProjectIcon"
  33136. },
  33137. "commands": {
  33138. "$ref": "#/components/schemas/ProjectCommands"
  33139. },
  33140. "time": {
  33141. "$ref": "#/components/schemas/ProjectTime"
  33142. },
  33143. "sandboxes": {
  33144. "type": "array",
  33145. "items": {
  33146. "type": "string"
  33147. }
  33148. }
  33149. },
  33150. "required": ["id", "worktree", "time", "sandboxes"],
  33151. "additionalProperties": false
  33152. }
  33153. },
  33154. "required": ["id", "type", "data"],
  33155. "additionalProperties": false
  33156. },
  33157. "SessionIdle": {
  33158. "type": "object",
  33159. "properties": {
  33160. "id": {
  33161. "type": "string",
  33162. "pattern": "^evt_"
  33163. },
  33164. "metadata": {
  33165. "type": "object"
  33166. },
  33167. "type": {
  33168. "type": "string",
  33169. "enum": ["session.idle"]
  33170. },
  33171. "durable": {
  33172. "type": "object",
  33173. "properties": {
  33174. "aggregateID": {
  33175. "type": "string"
  33176. },
  33177. "seq": {
  33178. "type": "integer"
  33179. },
  33180. "version": {
  33181. "type": "integer"
  33182. }
  33183. },
  33184. "required": ["aggregateID", "seq", "version"],
  33185. "additionalProperties": false
  33186. },
  33187. "location": {
  33188. "$ref": "#/components/schemas/LocationRef"
  33189. },
  33190. "data": {
  33191. "type": "object",
  33192. "properties": {
  33193. "sessionID": {
  33194. "type": "string",
  33195. "pattern": "^ses"
  33196. }
  33197. },
  33198. "required": ["sessionID"],
  33199. "additionalProperties": false
  33200. }
  33201. },
  33202. "required": ["id", "type", "data"],
  33203. "additionalProperties": false
  33204. },
  33205. "QuestionAsked": {
  33206. "type": "object",
  33207. "properties": {
  33208. "id": {
  33209. "type": "string",
  33210. "pattern": "^evt_"
  33211. },
  33212. "metadata": {
  33213. "type": "object"
  33214. },
  33215. "type": {
  33216. "type": "string",
  33217. "enum": ["question.asked"]
  33218. },
  33219. "durable": {
  33220. "type": "object",
  33221. "properties": {
  33222. "aggregateID": {
  33223. "type": "string"
  33224. },
  33225. "seq": {
  33226. "type": "integer"
  33227. },
  33228. "version": {
  33229. "type": "integer"
  33230. }
  33231. },
  33232. "required": ["aggregateID", "seq", "version"],
  33233. "additionalProperties": false
  33234. },
  33235. "location": {
  33236. "$ref": "#/components/schemas/LocationRef"
  33237. },
  33238. "data": {
  33239. "type": "object",
  33240. "properties": {
  33241. "id": {
  33242. "type": "string",
  33243. "pattern": "^que"
  33244. },
  33245. "sessionID": {
  33246. "type": "string",
  33247. "pattern": "^ses"
  33248. },
  33249. "questions": {
  33250. "type": "array",
  33251. "items": {
  33252. "$ref": "#/components/schemas/QuestionInfo"
  33253. },
  33254. "description": "Questions to ask"
  33255. },
  33256. "tool": {
  33257. "$ref": "#/components/schemas/QuestionTool"
  33258. }
  33259. },
  33260. "required": ["id", "sessionID", "questions"],
  33261. "additionalProperties": false
  33262. }
  33263. },
  33264. "required": ["id", "type", "data"],
  33265. "additionalProperties": false
  33266. },
  33267. "SessionCompacted": {
  33268. "type": "object",
  33269. "properties": {
  33270. "id": {
  33271. "type": "string",
  33272. "pattern": "^evt_"
  33273. },
  33274. "metadata": {
  33275. "type": "object"
  33276. },
  33277. "type": {
  33278. "type": "string",
  33279. "enum": ["session.compacted"]
  33280. },
  33281. "durable": {
  33282. "type": "object",
  33283. "properties": {
  33284. "aggregateID": {
  33285. "type": "string"
  33286. },
  33287. "seq": {
  33288. "type": "integer"
  33289. },
  33290. "version": {
  33291. "type": "integer"
  33292. }
  33293. },
  33294. "required": ["aggregateID", "seq", "version"],
  33295. "additionalProperties": false
  33296. },
  33297. "location": {
  33298. "$ref": "#/components/schemas/LocationRef"
  33299. },
  33300. "data": {
  33301. "type": "object",
  33302. "properties": {
  33303. "sessionID": {
  33304. "type": "string",
  33305. "pattern": "^ses"
  33306. }
  33307. },
  33308. "required": ["sessionID"],
  33309. "additionalProperties": false
  33310. }
  33311. },
  33312. "required": ["id", "type", "data"],
  33313. "additionalProperties": false
  33314. },
  33315. "VcsBranchUpdated": {
  33316. "type": "object",
  33317. "properties": {
  33318. "id": {
  33319. "type": "string",
  33320. "pattern": "^evt_"
  33321. },
  33322. "metadata": {
  33323. "type": "object"
  33324. },
  33325. "type": {
  33326. "type": "string",
  33327. "enum": ["vcs.branch.updated"]
  33328. },
  33329. "durable": {
  33330. "type": "object",
  33331. "properties": {
  33332. "aggregateID": {
  33333. "type": "string"
  33334. },
  33335. "seq": {
  33336. "type": "integer"
  33337. },
  33338. "version": {
  33339. "type": "integer"
  33340. }
  33341. },
  33342. "required": ["aggregateID", "seq", "version"],
  33343. "additionalProperties": false
  33344. },
  33345. "location": {
  33346. "$ref": "#/components/schemas/LocationRef"
  33347. },
  33348. "data": {
  33349. "type": "object",
  33350. "properties": {
  33351. "branch": {
  33352. "type": "string"
  33353. }
  33354. },
  33355. "additionalProperties": false
  33356. }
  33357. },
  33358. "required": ["id", "type", "data"],
  33359. "additionalProperties": false
  33360. },
  33361. "WorkspaceReady": {
  33362. "type": "object",
  33363. "properties": {
  33364. "id": {
  33365. "type": "string",
  33366. "pattern": "^evt_"
  33367. },
  33368. "metadata": {
  33369. "type": "object"
  33370. },
  33371. "type": {
  33372. "type": "string",
  33373. "enum": ["workspace.ready"]
  33374. },
  33375. "durable": {
  33376. "type": "object",
  33377. "properties": {
  33378. "aggregateID": {
  33379. "type": "string"
  33380. },
  33381. "seq": {
  33382. "type": "integer"
  33383. },
  33384. "version": {
  33385. "type": "integer"
  33386. }
  33387. },
  33388. "required": ["aggregateID", "seq", "version"],
  33389. "additionalProperties": false
  33390. },
  33391. "location": {
  33392. "$ref": "#/components/schemas/LocationRef"
  33393. },
  33394. "data": {
  33395. "type": "object",
  33396. "properties": {
  33397. "name": {
  33398. "type": "string"
  33399. }
  33400. },
  33401. "required": ["name"],
  33402. "additionalProperties": false
  33403. }
  33404. },
  33405. "required": ["id", "type", "data"],
  33406. "additionalProperties": false
  33407. },
  33408. "WorkspaceFailed": {
  33409. "type": "object",
  33410. "properties": {
  33411. "id": {
  33412. "type": "string",
  33413. "pattern": "^evt_"
  33414. },
  33415. "metadata": {
  33416. "type": "object"
  33417. },
  33418. "type": {
  33419. "type": "string",
  33420. "enum": ["workspace.failed"]
  33421. },
  33422. "durable": {
  33423. "type": "object",
  33424. "properties": {
  33425. "aggregateID": {
  33426. "type": "string"
  33427. },
  33428. "seq": {
  33429. "type": "integer"
  33430. },
  33431. "version": {
  33432. "type": "integer"
  33433. }
  33434. },
  33435. "required": ["aggregateID", "seq", "version"],
  33436. "additionalProperties": false
  33437. },
  33438. "location": {
  33439. "$ref": "#/components/schemas/LocationRef"
  33440. },
  33441. "data": {
  33442. "type": "object",
  33443. "properties": {
  33444. "message": {
  33445. "type": "string"
  33446. }
  33447. },
  33448. "required": ["message"],
  33449. "additionalProperties": false
  33450. }
  33451. },
  33452. "required": ["id", "type", "data"],
  33453. "additionalProperties": false
  33454. },
  33455. "WorkspaceStatus": {
  33456. "type": "object",
  33457. "properties": {
  33458. "id": {
  33459. "type": "string",
  33460. "pattern": "^evt_"
  33461. },
  33462. "metadata": {
  33463. "type": "object"
  33464. },
  33465. "type": {
  33466. "type": "string",
  33467. "enum": ["workspace.status"]
  33468. },
  33469. "durable": {
  33470. "type": "object",
  33471. "properties": {
  33472. "aggregateID": {
  33473. "type": "string"
  33474. },
  33475. "seq": {
  33476. "type": "integer"
  33477. },
  33478. "version": {
  33479. "type": "integer"
  33480. }
  33481. },
  33482. "required": ["aggregateID", "seq", "version"],
  33483. "additionalProperties": false
  33484. },
  33485. "location": {
  33486. "$ref": "#/components/schemas/LocationRef"
  33487. },
  33488. "data": {
  33489. "type": "object",
  33490. "properties": {
  33491. "workspaceID": {
  33492. "type": "string",
  33493. "pattern": "^wrk"
  33494. },
  33495. "status": {
  33496. "type": "string",
  33497. "enum": ["connected", "connecting", "disconnected", "error"]
  33498. }
  33499. },
  33500. "required": ["workspaceID", "status"],
  33501. "additionalProperties": false
  33502. }
  33503. },
  33504. "required": ["id", "type", "data"],
  33505. "additionalProperties": false
  33506. },
  33507. "WorktreeReady": {
  33508. "type": "object",
  33509. "properties": {
  33510. "id": {
  33511. "type": "string",
  33512. "pattern": "^evt_"
  33513. },
  33514. "metadata": {
  33515. "type": "object"
  33516. },
  33517. "type": {
  33518. "type": "string",
  33519. "enum": ["worktree.ready"]
  33520. },
  33521. "durable": {
  33522. "type": "object",
  33523. "properties": {
  33524. "aggregateID": {
  33525. "type": "string"
  33526. },
  33527. "seq": {
  33528. "type": "integer"
  33529. },
  33530. "version": {
  33531. "type": "integer"
  33532. }
  33533. },
  33534. "required": ["aggregateID", "seq", "version"],
  33535. "additionalProperties": false
  33536. },
  33537. "location": {
  33538. "$ref": "#/components/schemas/LocationRef"
  33539. },
  33540. "data": {
  33541. "type": "object",
  33542. "properties": {
  33543. "name": {
  33544. "type": "string"
  33545. },
  33546. "branch": {
  33547. "type": "string"
  33548. }
  33549. },
  33550. "required": ["name"],
  33551. "additionalProperties": false
  33552. }
  33553. },
  33554. "required": ["id", "type", "data"],
  33555. "additionalProperties": false
  33556. },
  33557. "WorktreeFailed": {
  33558. "type": "object",
  33559. "properties": {
  33560. "id": {
  33561. "type": "string",
  33562. "pattern": "^evt_"
  33563. },
  33564. "metadata": {
  33565. "type": "object"
  33566. },
  33567. "type": {
  33568. "type": "string",
  33569. "enum": ["worktree.failed"]
  33570. },
  33571. "durable": {
  33572. "type": "object",
  33573. "properties": {
  33574. "aggregateID": {
  33575. "type": "string"
  33576. },
  33577. "seq": {
  33578. "type": "integer"
  33579. },
  33580. "version": {
  33581. "type": "integer"
  33582. }
  33583. },
  33584. "required": ["aggregateID", "seq", "version"],
  33585. "additionalProperties": false
  33586. },
  33587. "location": {
  33588. "$ref": "#/components/schemas/LocationRef"
  33589. },
  33590. "data": {
  33591. "type": "object",
  33592. "properties": {
  33593. "message": {
  33594. "type": "string"
  33595. }
  33596. },
  33597. "required": ["message"],
  33598. "additionalProperties": false
  33599. }
  33600. },
  33601. "required": ["id", "type", "data"],
  33602. "additionalProperties": false
  33603. },
  33604. "ServerConnected": {
  33605. "type": "object",
  33606. "properties": {
  33607. "id": {
  33608. "type": "string",
  33609. "pattern": "^evt_"
  33610. },
  33611. "metadata": {
  33612. "type": "object"
  33613. },
  33614. "type": {
  33615. "type": "string",
  33616. "enum": ["server.connected"]
  33617. },
  33618. "durable": {
  33619. "type": "object",
  33620. "properties": {
  33621. "aggregateID": {
  33622. "type": "string"
  33623. },
  33624. "seq": {
  33625. "type": "integer"
  33626. },
  33627. "version": {
  33628. "type": "integer"
  33629. }
  33630. },
  33631. "required": ["aggregateID", "seq", "version"],
  33632. "additionalProperties": false
  33633. },
  33634. "location": {
  33635. "$ref": "#/components/schemas/LocationRef"
  33636. },
  33637. "data": {
  33638. "type": "object",
  33639. "properties": {}
  33640. }
  33641. },
  33642. "required": ["id", "type", "data"],
  33643. "additionalProperties": false
  33644. },
  33645. "GlobalDisposed": {
  33646. "type": "object",
  33647. "properties": {
  33648. "id": {
  33649. "type": "string",
  33650. "pattern": "^evt_"
  33651. },
  33652. "metadata": {
  33653. "type": "object"
  33654. },
  33655. "type": {
  33656. "type": "string",
  33657. "enum": ["global.disposed"]
  33658. },
  33659. "durable": {
  33660. "type": "object",
  33661. "properties": {
  33662. "aggregateID": {
  33663. "type": "string"
  33664. },
  33665. "seq": {
  33666. "type": "integer"
  33667. },
  33668. "version": {
  33669. "type": "integer"
  33670. }
  33671. },
  33672. "required": ["aggregateID", "seq", "version"],
  33673. "additionalProperties": false
  33674. },
  33675. "location": {
  33676. "$ref": "#/components/schemas/LocationRef"
  33677. },
  33678. "data": {
  33679. "type": "object",
  33680. "properties": {}
  33681. }
  33682. },
  33683. "required": ["id", "type", "data"],
  33684. "additionalProperties": false
  33685. },
  33686. "QuestionV2Request": {
  33687. "type": "object",
  33688. "properties": {
  33689. "id": {
  33690. "type": "string",
  33691. "pattern": "^que"
  33692. },
  33693. "sessionID": {
  33694. "type": "string",
  33695. "pattern": "^ses"
  33696. },
  33697. "questions": {
  33698. "type": "array",
  33699. "items": {
  33700. "$ref": "#/components/schemas/QuestionV2Info"
  33701. },
  33702. "description": "Questions to ask"
  33703. },
  33704. "tool": {
  33705. "$ref": "#/components/schemas/QuestionV2Tool"
  33706. }
  33707. },
  33708. "required": ["id", "sessionID", "questions"],
  33709. "additionalProperties": false
  33710. },
  33711. "QuestionV2Reply": {
  33712. "type": "object",
  33713. "properties": {
  33714. "answers": {
  33715. "type": "array",
  33716. "items": {
  33717. "$ref": "#/components/schemas/QuestionV2Answer"
  33718. },
  33719. "description": "User answers in order of questions (each answer is an array of selected labels)"
  33720. }
  33721. },
  33722. "required": ["answers"],
  33723. "additionalProperties": false
  33724. },
  33725. "ReferenceLocalSource": {
  33726. "type": "object",
  33727. "properties": {
  33728. "type": {
  33729. "type": "string",
  33730. "enum": ["local"]
  33731. },
  33732. "path": {
  33733. "type": "string"
  33734. },
  33735. "description": {
  33736. "type": "string"
  33737. },
  33738. "hidden": {
  33739. "type": "boolean"
  33740. }
  33741. },
  33742. "required": ["type", "path"],
  33743. "additionalProperties": false
  33744. },
  33745. "ReferenceGitSource": {
  33746. "type": "object",
  33747. "properties": {
  33748. "type": {
  33749. "type": "string",
  33750. "enum": ["git"]
  33751. },
  33752. "repository": {
  33753. "type": "string"
  33754. },
  33755. "branch": {
  33756. "type": "string"
  33757. },
  33758. "description": {
  33759. "type": "string"
  33760. },
  33761. "hidden": {
  33762. "type": "boolean"
  33763. }
  33764. },
  33765. "required": ["type", "repository"],
  33766. "additionalProperties": false
  33767. },
  33768. "ReferenceSource": {
  33769. "anyOf": [
  33770. {
  33771. "$ref": "#/components/schemas/ReferenceLocalSource"
  33772. },
  33773. {
  33774. "$ref": "#/components/schemas/ReferenceGitSource"
  33775. }
  33776. ]
  33777. },
  33778. "ReferenceInfo": {
  33779. "type": "object",
  33780. "properties": {
  33781. "name": {
  33782. "type": "string"
  33783. },
  33784. "path": {
  33785. "type": "string"
  33786. },
  33787. "description": {
  33788. "type": "string"
  33789. },
  33790. "hidden": {
  33791. "type": "boolean"
  33792. },
  33793. "source": {
  33794. "$ref": "#/components/schemas/ReferenceSource"
  33795. }
  33796. },
  33797. "required": ["name", "path", "source"],
  33798. "additionalProperties": false
  33799. },
  33800. "ProjectCopyCopy": {
  33801. "type": "object",
  33802. "properties": {
  33803. "directory": {
  33804. "type": "string"
  33805. }
  33806. },
  33807. "required": ["directory"],
  33808. "additionalProperties": false
  33809. },
  33810. "EventModels-devRefreshed": {
  33811. "type": "object",
  33812. "properties": {
  33813. "id": {
  33814. "type": "string",
  33815. "pattern": "^evt_"
  33816. },
  33817. "type": {
  33818. "type": "string",
  33819. "enum": ["models-dev.refreshed"]
  33820. },
  33821. "properties": {
  33822. "type": "object",
  33823. "properties": {}
  33824. }
  33825. },
  33826. "required": ["id", "type", "properties"],
  33827. "additionalProperties": false
  33828. },
  33829. "EventIntegrationUpdated": {
  33830. "type": "object",
  33831. "properties": {
  33832. "id": {
  33833. "type": "string",
  33834. "pattern": "^evt_"
  33835. },
  33836. "type": {
  33837. "type": "string",
  33838. "enum": ["integration.updated"]
  33839. },
  33840. "properties": {
  33841. "type": "object",
  33842. "properties": {}
  33843. }
  33844. },
  33845. "required": ["id", "type", "properties"],
  33846. "additionalProperties": false
  33847. },
  33848. "EventIntegrationConnectionUpdated": {
  33849. "type": "object",
  33850. "properties": {
  33851. "id": {
  33852. "type": "string",
  33853. "pattern": "^evt_"
  33854. },
  33855. "type": {
  33856. "type": "string",
  33857. "enum": ["integration.connection.updated"]
  33858. },
  33859. "properties": {
  33860. "type": "object",
  33861. "properties": {
  33862. "integrationID": {
  33863. "type": "string"
  33864. }
  33865. },
  33866. "required": ["integrationID"],
  33867. "additionalProperties": false
  33868. }
  33869. },
  33870. "required": ["id", "type", "properties"],
  33871. "additionalProperties": false
  33872. },
  33873. "EventCatalogUpdated": {
  33874. "type": "object",
  33875. "properties": {
  33876. "id": {
  33877. "type": "string",
  33878. "pattern": "^evt_"
  33879. },
  33880. "type": {
  33881. "type": "string",
  33882. "enum": ["catalog.updated"]
  33883. },
  33884. "properties": {
  33885. "type": "object",
  33886. "properties": {}
  33887. }
  33888. },
  33889. "required": ["id", "type", "properties"],
  33890. "additionalProperties": false
  33891. },
  33892. "EventSessionCreated": {
  33893. "type": "object",
  33894. "properties": {
  33895. "id": {
  33896. "type": "string",
  33897. "pattern": "^evt_"
  33898. },
  33899. "type": {
  33900. "type": "string",
  33901. "enum": ["session.created"]
  33902. },
  33903. "properties": {
  33904. "type": "object",
  33905. "properties": {
  33906. "sessionID": {
  33907. "type": "string",
  33908. "pattern": "^ses"
  33909. },
  33910. "info": {
  33911. "$ref": "#/components/schemas/Session"
  33912. }
  33913. },
  33914. "required": ["sessionID", "info"],
  33915. "additionalProperties": false
  33916. }
  33917. },
  33918. "required": ["id", "type", "properties"],
  33919. "additionalProperties": false
  33920. },
  33921. "EventSessionUpdated": {
  33922. "type": "object",
  33923. "properties": {
  33924. "id": {
  33925. "type": "string",
  33926. "pattern": "^evt_"
  33927. },
  33928. "type": {
  33929. "type": "string",
  33930. "enum": ["session.updated"]
  33931. },
  33932. "properties": {
  33933. "type": "object",
  33934. "properties": {
  33935. "sessionID": {
  33936. "type": "string",
  33937. "pattern": "^ses"
  33938. },
  33939. "info": {
  33940. "$ref": "#/components/schemas/Session"
  33941. }
  33942. },
  33943. "required": ["sessionID", "info"],
  33944. "additionalProperties": false
  33945. }
  33946. },
  33947. "required": ["id", "type", "properties"],
  33948. "additionalProperties": false
  33949. },
  33950. "EventSessionDeleted": {
  33951. "type": "object",
  33952. "properties": {
  33953. "id": {
  33954. "type": "string",
  33955. "pattern": "^evt_"
  33956. },
  33957. "type": {
  33958. "type": "string",
  33959. "enum": ["session.deleted"]
  33960. },
  33961. "properties": {
  33962. "type": "object",
  33963. "properties": {
  33964. "sessionID": {
  33965. "type": "string",
  33966. "pattern": "^ses"
  33967. },
  33968. "info": {
  33969. "$ref": "#/components/schemas/Session"
  33970. }
  33971. },
  33972. "required": ["sessionID", "info"],
  33973. "additionalProperties": false
  33974. }
  33975. },
  33976. "required": ["id", "type", "properties"],
  33977. "additionalProperties": false
  33978. },
  33979. "EventMessageUpdated": {
  33980. "type": "object",
  33981. "properties": {
  33982. "id": {
  33983. "type": "string",
  33984. "pattern": "^evt_"
  33985. },
  33986. "type": {
  33987. "type": "string",
  33988. "enum": ["message.updated"]
  33989. },
  33990. "properties": {
  33991. "type": "object",
  33992. "properties": {
  33993. "sessionID": {
  33994. "type": "string",
  33995. "pattern": "^ses"
  33996. },
  33997. "info": {
  33998. "$ref": "#/components/schemas/Message"
  33999. }
  34000. },
  34001. "required": ["sessionID", "info"],
  34002. "additionalProperties": false
  34003. }
  34004. },
  34005. "required": ["id", "type", "properties"],
  34006. "additionalProperties": false
  34007. },
  34008. "EventMessageRemoved": {
  34009. "type": "object",
  34010. "properties": {
  34011. "id": {
  34012. "type": "string",
  34013. "pattern": "^evt_"
  34014. },
  34015. "type": {
  34016. "type": "string",
  34017. "enum": ["message.removed"]
  34018. },
  34019. "properties": {
  34020. "type": "object",
  34021. "properties": {
  34022. "sessionID": {
  34023. "type": "string",
  34024. "pattern": "^ses"
  34025. },
  34026. "messageID": {
  34027. "type": "string",
  34028. "pattern": "^msg"
  34029. }
  34030. },
  34031. "required": ["sessionID", "messageID"],
  34032. "additionalProperties": false
  34033. }
  34034. },
  34035. "required": ["id", "type", "properties"],
  34036. "additionalProperties": false
  34037. },
  34038. "EventMessagePartUpdated": {
  34039. "type": "object",
  34040. "properties": {
  34041. "id": {
  34042. "type": "string",
  34043. "pattern": "^evt_"
  34044. },
  34045. "type": {
  34046. "type": "string",
  34047. "enum": ["message.part.updated"]
  34048. },
  34049. "properties": {
  34050. "type": "object",
  34051. "properties": {
  34052. "sessionID": {
  34053. "type": "string",
  34054. "pattern": "^ses"
  34055. },
  34056. "part": {
  34057. "$ref": "#/components/schemas/Part"
  34058. },
  34059. "time": {
  34060. "type": "number"
  34061. }
  34062. },
  34063. "required": ["sessionID", "part", "time"],
  34064. "additionalProperties": false
  34065. }
  34066. },
  34067. "required": ["id", "type", "properties"],
  34068. "additionalProperties": false
  34069. },
  34070. "EventMessagePartRemoved": {
  34071. "type": "object",
  34072. "properties": {
  34073. "id": {
  34074. "type": "string",
  34075. "pattern": "^evt_"
  34076. },
  34077. "type": {
  34078. "type": "string",
  34079. "enum": ["message.part.removed"]
  34080. },
  34081. "properties": {
  34082. "type": "object",
  34083. "properties": {
  34084. "sessionID": {
  34085. "type": "string",
  34086. "pattern": "^ses"
  34087. },
  34088. "messageID": {
  34089. "type": "string",
  34090. "pattern": "^msg"
  34091. },
  34092. "partID": {
  34093. "type": "string",
  34094. "pattern": "^prt"
  34095. }
  34096. },
  34097. "required": ["sessionID", "messageID", "partID"],
  34098. "additionalProperties": false
  34099. }
  34100. },
  34101. "required": ["id", "type", "properties"],
  34102. "additionalProperties": false
  34103. },
  34104. "EventSessionNextAgentSwitched": {
  34105. "type": "object",
  34106. "properties": {
  34107. "id": {
  34108. "type": "string",
  34109. "pattern": "^evt_"
  34110. },
  34111. "type": {
  34112. "type": "string",
  34113. "enum": ["session.next.agent.switched"]
  34114. },
  34115. "properties": {
  34116. "type": "object",
  34117. "properties": {
  34118. "timestamp": {
  34119. "type": "number"
  34120. },
  34121. "sessionID": {
  34122. "type": "string",
  34123. "pattern": "^ses"
  34124. },
  34125. "messageID": {
  34126. "type": "string",
  34127. "pattern": "^msg_"
  34128. },
  34129. "agent": {
  34130. "type": "string"
  34131. }
  34132. },
  34133. "required": ["timestamp", "sessionID", "messageID", "agent"],
  34134. "additionalProperties": false
  34135. }
  34136. },
  34137. "required": ["id", "type", "properties"],
  34138. "additionalProperties": false
  34139. },
  34140. "EventSessionNextModelSwitched": {
  34141. "type": "object",
  34142. "properties": {
  34143. "id": {
  34144. "type": "string",
  34145. "pattern": "^evt_"
  34146. },
  34147. "type": {
  34148. "type": "string",
  34149. "enum": ["session.next.model.switched"]
  34150. },
  34151. "properties": {
  34152. "type": "object",
  34153. "properties": {
  34154. "timestamp": {
  34155. "type": "number"
  34156. },
  34157. "sessionID": {
  34158. "type": "string",
  34159. "pattern": "^ses"
  34160. },
  34161. "messageID": {
  34162. "type": "string",
  34163. "pattern": "^msg_"
  34164. },
  34165. "model": {
  34166. "$ref": "#/components/schemas/ModelRef"
  34167. }
  34168. },
  34169. "required": ["timestamp", "sessionID", "messageID", "model"],
  34170. "additionalProperties": false
  34171. }
  34172. },
  34173. "required": ["id", "type", "properties"],
  34174. "additionalProperties": false
  34175. },
  34176. "EventSessionNextMoved": {
  34177. "type": "object",
  34178. "properties": {
  34179. "id": {
  34180. "type": "string",
  34181. "pattern": "^evt_"
  34182. },
  34183. "type": {
  34184. "type": "string",
  34185. "enum": ["session.next.moved"]
  34186. },
  34187. "properties": {
  34188. "type": "object",
  34189. "properties": {
  34190. "timestamp": {
  34191. "type": "number"
  34192. },
  34193. "sessionID": {
  34194. "type": "string",
  34195. "pattern": "^ses"
  34196. },
  34197. "location": {
  34198. "$ref": "#/components/schemas/LocationRef"
  34199. },
  34200. "subdirectory": {
  34201. "type": "string"
  34202. }
  34203. },
  34204. "required": ["timestamp", "sessionID", "location"],
  34205. "additionalProperties": false
  34206. }
  34207. },
  34208. "required": ["id", "type", "properties"],
  34209. "additionalProperties": false
  34210. },
  34211. "EventSessionNextPrompted": {
  34212. "type": "object",
  34213. "properties": {
  34214. "id": {
  34215. "type": "string",
  34216. "pattern": "^evt_"
  34217. },
  34218. "type": {
  34219. "type": "string",
  34220. "enum": ["session.next.prompted"]
  34221. },
  34222. "properties": {
  34223. "type": "object",
  34224. "properties": {
  34225. "timestamp": {
  34226. "type": "number"
  34227. },
  34228. "sessionID": {
  34229. "type": "string",
  34230. "pattern": "^ses"
  34231. },
  34232. "messageID": {
  34233. "type": "string",
  34234. "pattern": "^msg_"
  34235. },
  34236. "prompt": {
  34237. "$ref": "#/components/schemas/Prompt"
  34238. },
  34239. "delivery": {
  34240. "type": "string",
  34241. "enum": ["steer", "queue"]
  34242. }
  34243. },
  34244. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34245. "additionalProperties": false
  34246. }
  34247. },
  34248. "required": ["id", "type", "properties"],
  34249. "additionalProperties": false
  34250. },
  34251. "EventSessionNextPromptAdmitted": {
  34252. "type": "object",
  34253. "properties": {
  34254. "id": {
  34255. "type": "string",
  34256. "pattern": "^evt_"
  34257. },
  34258. "type": {
  34259. "type": "string",
  34260. "enum": ["session.next.prompt.admitted"]
  34261. },
  34262. "properties": {
  34263. "type": "object",
  34264. "properties": {
  34265. "timestamp": {
  34266. "type": "number"
  34267. },
  34268. "sessionID": {
  34269. "type": "string",
  34270. "pattern": "^ses"
  34271. },
  34272. "messageID": {
  34273. "type": "string",
  34274. "pattern": "^msg_"
  34275. },
  34276. "prompt": {
  34277. "$ref": "#/components/schemas/Prompt"
  34278. },
  34279. "delivery": {
  34280. "type": "string",
  34281. "enum": ["steer", "queue"]
  34282. }
  34283. },
  34284. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34285. "additionalProperties": false
  34286. }
  34287. },
  34288. "required": ["id", "type", "properties"],
  34289. "additionalProperties": false
  34290. },
  34291. "EventSessionNextContextUpdated": {
  34292. "type": "object",
  34293. "properties": {
  34294. "id": {
  34295. "type": "string",
  34296. "pattern": "^evt_"
  34297. },
  34298. "type": {
  34299. "type": "string",
  34300. "enum": ["session.next.context.updated"]
  34301. },
  34302. "properties": {
  34303. "type": "object",
  34304. "properties": {
  34305. "timestamp": {
  34306. "type": "number"
  34307. },
  34308. "sessionID": {
  34309. "type": "string",
  34310. "pattern": "^ses"
  34311. },
  34312. "messageID": {
  34313. "type": "string",
  34314. "pattern": "^msg_"
  34315. },
  34316. "text": {
  34317. "type": "string"
  34318. }
  34319. },
  34320. "required": ["timestamp", "sessionID", "messageID", "text"],
  34321. "additionalProperties": false
  34322. }
  34323. },
  34324. "required": ["id", "type", "properties"],
  34325. "additionalProperties": false
  34326. },
  34327. "EventSessionNextSynthetic": {
  34328. "type": "object",
  34329. "properties": {
  34330. "id": {
  34331. "type": "string",
  34332. "pattern": "^evt_"
  34333. },
  34334. "type": {
  34335. "type": "string",
  34336. "enum": ["session.next.synthetic"]
  34337. },
  34338. "properties": {
  34339. "type": "object",
  34340. "properties": {
  34341. "timestamp": {
  34342. "type": "number"
  34343. },
  34344. "sessionID": {
  34345. "type": "string",
  34346. "pattern": "^ses"
  34347. },
  34348. "messageID": {
  34349. "type": "string",
  34350. "pattern": "^msg_"
  34351. },
  34352. "text": {
  34353. "type": "string"
  34354. }
  34355. },
  34356. "required": ["timestamp", "sessionID", "messageID", "text"],
  34357. "additionalProperties": false
  34358. }
  34359. },
  34360. "required": ["id", "type", "properties"],
  34361. "additionalProperties": false
  34362. },
  34363. "EventSessionNextShellStarted": {
  34364. "type": "object",
  34365. "properties": {
  34366. "id": {
  34367. "type": "string",
  34368. "pattern": "^evt_"
  34369. },
  34370. "type": {
  34371. "type": "string",
  34372. "enum": ["session.next.shell.started"]
  34373. },
  34374. "properties": {
  34375. "type": "object",
  34376. "properties": {
  34377. "timestamp": {
  34378. "type": "number"
  34379. },
  34380. "sessionID": {
  34381. "type": "string",
  34382. "pattern": "^ses"
  34383. },
  34384. "messageID": {
  34385. "type": "string",
  34386. "pattern": "^msg_"
  34387. },
  34388. "callID": {
  34389. "type": "string"
  34390. },
  34391. "command": {
  34392. "type": "string"
  34393. }
  34394. },
  34395. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  34396. "additionalProperties": false
  34397. }
  34398. },
  34399. "required": ["id", "type", "properties"],
  34400. "additionalProperties": false
  34401. },
  34402. "EventSessionNextShellEnded": {
  34403. "type": "object",
  34404. "properties": {
  34405. "id": {
  34406. "type": "string",
  34407. "pattern": "^evt_"
  34408. },
  34409. "type": {
  34410. "type": "string",
  34411. "enum": ["session.next.shell.ended"]
  34412. },
  34413. "properties": {
  34414. "type": "object",
  34415. "properties": {
  34416. "timestamp": {
  34417. "type": "number"
  34418. },
  34419. "sessionID": {
  34420. "type": "string",
  34421. "pattern": "^ses"
  34422. },
  34423. "callID": {
  34424. "type": "string"
  34425. },
  34426. "output": {
  34427. "type": "string"
  34428. }
  34429. },
  34430. "required": ["timestamp", "sessionID", "callID", "output"],
  34431. "additionalProperties": false
  34432. }
  34433. },
  34434. "required": ["id", "type", "properties"],
  34435. "additionalProperties": false
  34436. },
  34437. "EventSessionNextStepStarted": {
  34438. "type": "object",
  34439. "properties": {
  34440. "id": {
  34441. "type": "string",
  34442. "pattern": "^evt_"
  34443. },
  34444. "type": {
  34445. "type": "string",
  34446. "enum": ["session.next.step.started"]
  34447. },
  34448. "properties": {
  34449. "type": "object",
  34450. "properties": {
  34451. "timestamp": {
  34452. "type": "number"
  34453. },
  34454. "sessionID": {
  34455. "type": "string",
  34456. "pattern": "^ses"
  34457. },
  34458. "assistantMessageID": {
  34459. "type": "string",
  34460. "pattern": "^msg_"
  34461. },
  34462. "agent": {
  34463. "type": "string"
  34464. },
  34465. "model": {
  34466. "$ref": "#/components/schemas/ModelRef"
  34467. },
  34468. "snapshot": {
  34469. "type": "string"
  34470. }
  34471. },
  34472. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  34473. "additionalProperties": false
  34474. }
  34475. },
  34476. "required": ["id", "type", "properties"],
  34477. "additionalProperties": false
  34478. },
  34479. "EventSessionNextStepEnded": {
  34480. "type": "object",
  34481. "properties": {
  34482. "id": {
  34483. "type": "string",
  34484. "pattern": "^evt_"
  34485. },
  34486. "type": {
  34487. "type": "string",
  34488. "enum": ["session.next.step.ended"]
  34489. },
  34490. "properties": {
  34491. "type": "object",
  34492. "properties": {
  34493. "timestamp": {
  34494. "type": "number"
  34495. },
  34496. "sessionID": {
  34497. "type": "string",
  34498. "pattern": "^ses"
  34499. },
  34500. "assistantMessageID": {
  34501. "type": "string",
  34502. "pattern": "^msg_"
  34503. },
  34504. "finish": {
  34505. "type": "string"
  34506. },
  34507. "cost": {
  34508. "type": "number"
  34509. },
  34510. "tokens": {
  34511. "type": "object",
  34512. "properties": {
  34513. "input": {
  34514. "type": "number"
  34515. },
  34516. "output": {
  34517. "type": "number"
  34518. },
  34519. "reasoning": {
  34520. "type": "number"
  34521. },
  34522. "cache": {
  34523. "type": "object",
  34524. "properties": {
  34525. "read": {
  34526. "type": "number"
  34527. },
  34528. "write": {
  34529. "type": "number"
  34530. }
  34531. },
  34532. "required": ["read", "write"],
  34533. "additionalProperties": false
  34534. }
  34535. },
  34536. "required": ["input", "output", "reasoning", "cache"],
  34537. "additionalProperties": false
  34538. },
  34539. "snapshot": {
  34540. "type": "string"
  34541. },
  34542. "files": {
  34543. "type": "array",
  34544. "items": {
  34545. "type": "string"
  34546. }
  34547. }
  34548. },
  34549. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  34550. "additionalProperties": false
  34551. }
  34552. },
  34553. "required": ["id", "type", "properties"],
  34554. "additionalProperties": false
  34555. },
  34556. "EventSessionNextStepFailed": {
  34557. "type": "object",
  34558. "properties": {
  34559. "id": {
  34560. "type": "string",
  34561. "pattern": "^evt_"
  34562. },
  34563. "type": {
  34564. "type": "string",
  34565. "enum": ["session.next.step.failed"]
  34566. },
  34567. "properties": {
  34568. "type": "object",
  34569. "properties": {
  34570. "timestamp": {
  34571. "type": "number"
  34572. },
  34573. "sessionID": {
  34574. "type": "string",
  34575. "pattern": "^ses"
  34576. },
  34577. "assistantMessageID": {
  34578. "type": "string",
  34579. "pattern": "^msg_"
  34580. },
  34581. "error": {
  34582. "$ref": "#/components/schemas/SessionErrorUnknown"
  34583. }
  34584. },
  34585. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  34586. "additionalProperties": false
  34587. }
  34588. },
  34589. "required": ["id", "type", "properties"],
  34590. "additionalProperties": false
  34591. },
  34592. "EventSessionNextTextStarted": {
  34593. "type": "object",
  34594. "properties": {
  34595. "id": {
  34596. "type": "string",
  34597. "pattern": "^evt_"
  34598. },
  34599. "type": {
  34600. "type": "string",
  34601. "enum": ["session.next.text.started"]
  34602. },
  34603. "properties": {
  34604. "type": "object",
  34605. "properties": {
  34606. "timestamp": {
  34607. "type": "number"
  34608. },
  34609. "sessionID": {
  34610. "type": "string",
  34611. "pattern": "^ses"
  34612. },
  34613. "assistantMessageID": {
  34614. "type": "string",
  34615. "pattern": "^msg_"
  34616. },
  34617. "textID": {
  34618. "type": "string"
  34619. }
  34620. },
  34621. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  34622. "additionalProperties": false
  34623. }
  34624. },
  34625. "required": ["id", "type", "properties"],
  34626. "additionalProperties": false
  34627. },
  34628. "EventSessionNextTextDelta": {
  34629. "type": "object",
  34630. "properties": {
  34631. "id": {
  34632. "type": "string",
  34633. "pattern": "^evt_"
  34634. },
  34635. "type": {
  34636. "type": "string",
  34637. "enum": ["session.next.text.delta"]
  34638. },
  34639. "properties": {
  34640. "type": "object",
  34641. "properties": {
  34642. "timestamp": {
  34643. "type": "number"
  34644. },
  34645. "sessionID": {
  34646. "type": "string",
  34647. "pattern": "^ses"
  34648. },
  34649. "assistantMessageID": {
  34650. "type": "string",
  34651. "pattern": "^msg_"
  34652. },
  34653. "textID": {
  34654. "type": "string"
  34655. },
  34656. "delta": {
  34657. "type": "string"
  34658. }
  34659. },
  34660. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  34661. "additionalProperties": false
  34662. }
  34663. },
  34664. "required": ["id", "type", "properties"],
  34665. "additionalProperties": false
  34666. },
  34667. "EventSessionNextTextEnded": {
  34668. "type": "object",
  34669. "properties": {
  34670. "id": {
  34671. "type": "string",
  34672. "pattern": "^evt_"
  34673. },
  34674. "type": {
  34675. "type": "string",
  34676. "enum": ["session.next.text.ended"]
  34677. },
  34678. "properties": {
  34679. "type": "object",
  34680. "properties": {
  34681. "timestamp": {
  34682. "type": "number"
  34683. },
  34684. "sessionID": {
  34685. "type": "string",
  34686. "pattern": "^ses"
  34687. },
  34688. "assistantMessageID": {
  34689. "type": "string",
  34690. "pattern": "^msg_"
  34691. },
  34692. "textID": {
  34693. "type": "string"
  34694. },
  34695. "text": {
  34696. "type": "string"
  34697. }
  34698. },
  34699. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  34700. "additionalProperties": false
  34701. }
  34702. },
  34703. "required": ["id", "type", "properties"],
  34704. "additionalProperties": false
  34705. },
  34706. "EventSessionNextReasoningStarted": {
  34707. "type": "object",
  34708. "properties": {
  34709. "id": {
  34710. "type": "string",
  34711. "pattern": "^evt_"
  34712. },
  34713. "type": {
  34714. "type": "string",
  34715. "enum": ["session.next.reasoning.started"]
  34716. },
  34717. "properties": {
  34718. "type": "object",
  34719. "properties": {
  34720. "timestamp": {
  34721. "type": "number"
  34722. },
  34723. "sessionID": {
  34724. "type": "string",
  34725. "pattern": "^ses"
  34726. },
  34727. "assistantMessageID": {
  34728. "type": "string",
  34729. "pattern": "^msg_"
  34730. },
  34731. "reasoningID": {
  34732. "type": "string"
  34733. },
  34734. "providerMetadata": {
  34735. "$ref": "#/components/schemas/LLMProviderMetadata"
  34736. }
  34737. },
  34738. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  34739. "additionalProperties": false
  34740. }
  34741. },
  34742. "required": ["id", "type", "properties"],
  34743. "additionalProperties": false
  34744. },
  34745. "EventSessionNextReasoningDelta": {
  34746. "type": "object",
  34747. "properties": {
  34748. "id": {
  34749. "type": "string",
  34750. "pattern": "^evt_"
  34751. },
  34752. "type": {
  34753. "type": "string",
  34754. "enum": ["session.next.reasoning.delta"]
  34755. },
  34756. "properties": {
  34757. "type": "object",
  34758. "properties": {
  34759. "timestamp": {
  34760. "type": "number"
  34761. },
  34762. "sessionID": {
  34763. "type": "string",
  34764. "pattern": "^ses"
  34765. },
  34766. "assistantMessageID": {
  34767. "type": "string",
  34768. "pattern": "^msg_"
  34769. },
  34770. "reasoningID": {
  34771. "type": "string"
  34772. },
  34773. "delta": {
  34774. "type": "string"
  34775. }
  34776. },
  34777. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  34778. "additionalProperties": false
  34779. }
  34780. },
  34781. "required": ["id", "type", "properties"],
  34782. "additionalProperties": false
  34783. },
  34784. "EventSessionNextReasoningEnded": {
  34785. "type": "object",
  34786. "properties": {
  34787. "id": {
  34788. "type": "string",
  34789. "pattern": "^evt_"
  34790. },
  34791. "type": {
  34792. "type": "string",
  34793. "enum": ["session.next.reasoning.ended"]
  34794. },
  34795. "properties": {
  34796. "type": "object",
  34797. "properties": {
  34798. "timestamp": {
  34799. "type": "number"
  34800. },
  34801. "sessionID": {
  34802. "type": "string",
  34803. "pattern": "^ses"
  34804. },
  34805. "assistantMessageID": {
  34806. "type": "string",
  34807. "pattern": "^msg_"
  34808. },
  34809. "reasoningID": {
  34810. "type": "string"
  34811. },
  34812. "text": {
  34813. "type": "string"
  34814. },
  34815. "providerMetadata": {
  34816. "$ref": "#/components/schemas/LLMProviderMetadata"
  34817. }
  34818. },
  34819. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  34820. "additionalProperties": false
  34821. }
  34822. },
  34823. "required": ["id", "type", "properties"],
  34824. "additionalProperties": false
  34825. },
  34826. "EventSessionNextToolInputStarted": {
  34827. "type": "object",
  34828. "properties": {
  34829. "id": {
  34830. "type": "string",
  34831. "pattern": "^evt_"
  34832. },
  34833. "type": {
  34834. "type": "string",
  34835. "enum": ["session.next.tool.input.started"]
  34836. },
  34837. "properties": {
  34838. "type": "object",
  34839. "properties": {
  34840. "timestamp": {
  34841. "type": "number"
  34842. },
  34843. "sessionID": {
  34844. "type": "string",
  34845. "pattern": "^ses"
  34846. },
  34847. "assistantMessageID": {
  34848. "type": "string",
  34849. "pattern": "^msg_"
  34850. },
  34851. "callID": {
  34852. "type": "string"
  34853. },
  34854. "name": {
  34855. "type": "string"
  34856. }
  34857. },
  34858. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  34859. "additionalProperties": false
  34860. }
  34861. },
  34862. "required": ["id", "type", "properties"],
  34863. "additionalProperties": false
  34864. },
  34865. "EventSessionNextToolInputDelta": {
  34866. "type": "object",
  34867. "properties": {
  34868. "id": {
  34869. "type": "string",
  34870. "pattern": "^evt_"
  34871. },
  34872. "type": {
  34873. "type": "string",
  34874. "enum": ["session.next.tool.input.delta"]
  34875. },
  34876. "properties": {
  34877. "type": "object",
  34878. "properties": {
  34879. "timestamp": {
  34880. "type": "number"
  34881. },
  34882. "sessionID": {
  34883. "type": "string",
  34884. "pattern": "^ses"
  34885. },
  34886. "assistantMessageID": {
  34887. "type": "string",
  34888. "pattern": "^msg_"
  34889. },
  34890. "callID": {
  34891. "type": "string"
  34892. },
  34893. "delta": {
  34894. "type": "string"
  34895. }
  34896. },
  34897. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  34898. "additionalProperties": false
  34899. }
  34900. },
  34901. "required": ["id", "type", "properties"],
  34902. "additionalProperties": false
  34903. },
  34904. "EventSessionNextToolInputEnded": {
  34905. "type": "object",
  34906. "properties": {
  34907. "id": {
  34908. "type": "string",
  34909. "pattern": "^evt_"
  34910. },
  34911. "type": {
  34912. "type": "string",
  34913. "enum": ["session.next.tool.input.ended"]
  34914. },
  34915. "properties": {
  34916. "type": "object",
  34917. "properties": {
  34918. "timestamp": {
  34919. "type": "number"
  34920. },
  34921. "sessionID": {
  34922. "type": "string",
  34923. "pattern": "^ses"
  34924. },
  34925. "assistantMessageID": {
  34926. "type": "string",
  34927. "pattern": "^msg_"
  34928. },
  34929. "callID": {
  34930. "type": "string"
  34931. },
  34932. "text": {
  34933. "type": "string"
  34934. }
  34935. },
  34936. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  34937. "additionalProperties": false
  34938. }
  34939. },
  34940. "required": ["id", "type", "properties"],
  34941. "additionalProperties": false
  34942. },
  34943. "EventSessionNextToolCalled": {
  34944. "type": "object",
  34945. "properties": {
  34946. "id": {
  34947. "type": "string",
  34948. "pattern": "^evt_"
  34949. },
  34950. "type": {
  34951. "type": "string",
  34952. "enum": ["session.next.tool.called"]
  34953. },
  34954. "properties": {
  34955. "type": "object",
  34956. "properties": {
  34957. "timestamp": {
  34958. "type": "number"
  34959. },
  34960. "sessionID": {
  34961. "type": "string",
  34962. "pattern": "^ses"
  34963. },
  34964. "assistantMessageID": {
  34965. "type": "string",
  34966. "pattern": "^msg_"
  34967. },
  34968. "callID": {
  34969. "type": "string"
  34970. },
  34971. "tool": {
  34972. "type": "string"
  34973. },
  34974. "input": {
  34975. "type": "object"
  34976. },
  34977. "provider": {
  34978. "type": "object",
  34979. "properties": {
  34980. "executed": {
  34981. "type": "boolean"
  34982. },
  34983. "metadata": {
  34984. "$ref": "#/components/schemas/LLMProviderMetadata"
  34985. }
  34986. },
  34987. "required": ["executed"],
  34988. "additionalProperties": false
  34989. }
  34990. },
  34991. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  34992. "additionalProperties": false
  34993. }
  34994. },
  34995. "required": ["id", "type", "properties"],
  34996. "additionalProperties": false
  34997. },
  34998. "EventSessionNextToolProgress": {
  34999. "type": "object",
  35000. "properties": {
  35001. "id": {
  35002. "type": "string",
  35003. "pattern": "^evt_"
  35004. },
  35005. "type": {
  35006. "type": "string",
  35007. "enum": ["session.next.tool.progress"]
  35008. },
  35009. "properties": {
  35010. "type": "object",
  35011. "properties": {
  35012. "timestamp": {
  35013. "type": "number"
  35014. },
  35015. "sessionID": {
  35016. "type": "string",
  35017. "pattern": "^ses"
  35018. },
  35019. "assistantMessageID": {
  35020. "type": "string",
  35021. "pattern": "^msg_"
  35022. },
  35023. "callID": {
  35024. "type": "string"
  35025. },
  35026. "structured": {
  35027. "type": "object"
  35028. },
  35029. "content": {
  35030. "type": "array",
  35031. "items": {
  35032. "$ref": "#/components/schemas/LLMToolContent"
  35033. }
  35034. }
  35035. },
  35036. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  35037. "additionalProperties": false
  35038. }
  35039. },
  35040. "required": ["id", "type", "properties"],
  35041. "additionalProperties": false
  35042. },
  35043. "EventSessionNextToolSuccess": {
  35044. "type": "object",
  35045. "properties": {
  35046. "id": {
  35047. "type": "string",
  35048. "pattern": "^evt_"
  35049. },
  35050. "type": {
  35051. "type": "string",
  35052. "enum": ["session.next.tool.success"]
  35053. },
  35054. "properties": {
  35055. "type": "object",
  35056. "properties": {
  35057. "timestamp": {
  35058. "type": "number"
  35059. },
  35060. "sessionID": {
  35061. "type": "string",
  35062. "pattern": "^ses"
  35063. },
  35064. "assistantMessageID": {
  35065. "type": "string",
  35066. "pattern": "^msg_"
  35067. },
  35068. "callID": {
  35069. "type": "string"
  35070. },
  35071. "structured": {
  35072. "type": "object"
  35073. },
  35074. "content": {
  35075. "type": "array",
  35076. "items": {
  35077. "$ref": "#/components/schemas/LLMToolContent"
  35078. }
  35079. },
  35080. "outputPaths": {
  35081. "type": "array",
  35082. "items": {
  35083. "type": "string"
  35084. }
  35085. },
  35086. "result": {},
  35087. "provider": {
  35088. "type": "object",
  35089. "properties": {
  35090. "executed": {
  35091. "type": "boolean"
  35092. },
  35093. "metadata": {
  35094. "$ref": "#/components/schemas/LLMProviderMetadata"
  35095. }
  35096. },
  35097. "required": ["executed"],
  35098. "additionalProperties": false
  35099. }
  35100. },
  35101. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  35102. "additionalProperties": false
  35103. }
  35104. },
  35105. "required": ["id", "type", "properties"],
  35106. "additionalProperties": false
  35107. },
  35108. "EventSessionNextToolFailed": {
  35109. "type": "object",
  35110. "properties": {
  35111. "id": {
  35112. "type": "string",
  35113. "pattern": "^evt_"
  35114. },
  35115. "type": {
  35116. "type": "string",
  35117. "enum": ["session.next.tool.failed"]
  35118. },
  35119. "properties": {
  35120. "type": "object",
  35121. "properties": {
  35122. "timestamp": {
  35123. "type": "number"
  35124. },
  35125. "sessionID": {
  35126. "type": "string",
  35127. "pattern": "^ses"
  35128. },
  35129. "assistantMessageID": {
  35130. "type": "string",
  35131. "pattern": "^msg_"
  35132. },
  35133. "callID": {
  35134. "type": "string"
  35135. },
  35136. "error": {
  35137. "$ref": "#/components/schemas/SessionErrorUnknown"
  35138. },
  35139. "result": {},
  35140. "provider": {
  35141. "type": "object",
  35142. "properties": {
  35143. "executed": {
  35144. "type": "boolean"
  35145. },
  35146. "metadata": {
  35147. "$ref": "#/components/schemas/LLMProviderMetadata"
  35148. }
  35149. },
  35150. "required": ["executed"],
  35151. "additionalProperties": false
  35152. }
  35153. },
  35154. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  35155. "additionalProperties": false
  35156. }
  35157. },
  35158. "required": ["id", "type", "properties"],
  35159. "additionalProperties": false
  35160. },
  35161. "EventSessionNextRetried": {
  35162. "type": "object",
  35163. "properties": {
  35164. "id": {
  35165. "type": "string",
  35166. "pattern": "^evt_"
  35167. },
  35168. "type": {
  35169. "type": "string",
  35170. "enum": ["session.next.retried"]
  35171. },
  35172. "properties": {
  35173. "type": "object",
  35174. "properties": {
  35175. "timestamp": {
  35176. "type": "number"
  35177. },
  35178. "sessionID": {
  35179. "type": "string",
  35180. "pattern": "^ses"
  35181. },
  35182. "attempt": {
  35183. "type": "number"
  35184. },
  35185. "error": {
  35186. "$ref": "#/components/schemas/SessionNextRetry_error"
  35187. }
  35188. },
  35189. "required": ["timestamp", "sessionID", "attempt", "error"],
  35190. "additionalProperties": false
  35191. }
  35192. },
  35193. "required": ["id", "type", "properties"],
  35194. "additionalProperties": false
  35195. },
  35196. "EventSessionNextCompactionStarted": {
  35197. "type": "object",
  35198. "properties": {
  35199. "id": {
  35200. "type": "string",
  35201. "pattern": "^evt_"
  35202. },
  35203. "type": {
  35204. "type": "string",
  35205. "enum": ["session.next.compaction.started"]
  35206. },
  35207. "properties": {
  35208. "type": "object",
  35209. "properties": {
  35210. "timestamp": {
  35211. "type": "number"
  35212. },
  35213. "sessionID": {
  35214. "type": "string",
  35215. "pattern": "^ses"
  35216. },
  35217. "messageID": {
  35218. "type": "string",
  35219. "pattern": "^msg_"
  35220. },
  35221. "reason": {
  35222. "type": "string",
  35223. "enum": ["auto", "manual"]
  35224. }
  35225. },
  35226. "required": ["timestamp", "sessionID", "messageID", "reason"],
  35227. "additionalProperties": false
  35228. }
  35229. },
  35230. "required": ["id", "type", "properties"],
  35231. "additionalProperties": false
  35232. },
  35233. "EventSessionNextCompactionDelta": {
  35234. "type": "object",
  35235. "properties": {
  35236. "id": {
  35237. "type": "string",
  35238. "pattern": "^evt_"
  35239. },
  35240. "type": {
  35241. "type": "string",
  35242. "enum": ["session.next.compaction.delta"]
  35243. },
  35244. "properties": {
  35245. "type": "object",
  35246. "properties": {
  35247. "timestamp": {
  35248. "type": "number"
  35249. },
  35250. "sessionID": {
  35251. "type": "string",
  35252. "pattern": "^ses"
  35253. },
  35254. "messageID": {
  35255. "type": "string",
  35256. "pattern": "^msg_"
  35257. },
  35258. "text": {
  35259. "type": "string"
  35260. }
  35261. },
  35262. "required": ["timestamp", "sessionID", "messageID", "text"],
  35263. "additionalProperties": false
  35264. }
  35265. },
  35266. "required": ["id", "type", "properties"],
  35267. "additionalProperties": false
  35268. },
  35269. "EventSessionNextCompactionEnded": {
  35270. "type": "object",
  35271. "properties": {
  35272. "id": {
  35273. "type": "string",
  35274. "pattern": "^evt_"
  35275. },
  35276. "type": {
  35277. "type": "string",
  35278. "enum": ["session.next.compaction.ended"]
  35279. },
  35280. "properties": {
  35281. "type": "object",
  35282. "properties": {
  35283. "timestamp": {
  35284. "type": "number"
  35285. },
  35286. "sessionID": {
  35287. "type": "string",
  35288. "pattern": "^ses"
  35289. },
  35290. "messageID": {
  35291. "type": "string",
  35292. "pattern": "^msg_"
  35293. },
  35294. "reason": {
  35295. "type": "string",
  35296. "enum": ["auto", "manual"]
  35297. },
  35298. "text": {
  35299. "type": "string"
  35300. },
  35301. "recent": {
  35302. "type": "string"
  35303. }
  35304. },
  35305. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  35306. "additionalProperties": false
  35307. }
  35308. },
  35309. "required": ["id", "type", "properties"],
  35310. "additionalProperties": false
  35311. },
  35312. "EventSessionNextRevertStaged": {
  35313. "type": "object",
  35314. "properties": {
  35315. "id": {
  35316. "type": "string",
  35317. "pattern": "^evt_"
  35318. },
  35319. "type": {
  35320. "type": "string",
  35321. "enum": ["session.next.revert.staged"]
  35322. },
  35323. "properties": {
  35324. "type": "object",
  35325. "properties": {
  35326. "timestamp": {
  35327. "type": "number"
  35328. },
  35329. "sessionID": {
  35330. "type": "string",
  35331. "pattern": "^ses"
  35332. },
  35333. "revert": {
  35334. "$ref": "#/components/schemas/RevertState"
  35335. }
  35336. },
  35337. "required": ["timestamp", "sessionID", "revert"],
  35338. "additionalProperties": false
  35339. }
  35340. },
  35341. "required": ["id", "type", "properties"],
  35342. "additionalProperties": false
  35343. },
  35344. "EventSessionNextRevertCleared": {
  35345. "type": "object",
  35346. "properties": {
  35347. "id": {
  35348. "type": "string",
  35349. "pattern": "^evt_"
  35350. },
  35351. "type": {
  35352. "type": "string",
  35353. "enum": ["session.next.revert.cleared"]
  35354. },
  35355. "properties": {
  35356. "type": "object",
  35357. "properties": {
  35358. "timestamp": {
  35359. "type": "number"
  35360. },
  35361. "sessionID": {
  35362. "type": "string",
  35363. "pattern": "^ses"
  35364. }
  35365. },
  35366. "required": ["timestamp", "sessionID"],
  35367. "additionalProperties": false
  35368. }
  35369. },
  35370. "required": ["id", "type", "properties"],
  35371. "additionalProperties": false
  35372. },
  35373. "EventSessionNextRevertCommitted": {
  35374. "type": "object",
  35375. "properties": {
  35376. "id": {
  35377. "type": "string",
  35378. "pattern": "^evt_"
  35379. },
  35380. "type": {
  35381. "type": "string",
  35382. "enum": ["session.next.revert.committed"]
  35383. },
  35384. "properties": {
  35385. "type": "object",
  35386. "properties": {
  35387. "timestamp": {
  35388. "type": "number"
  35389. },
  35390. "sessionID": {
  35391. "type": "string",
  35392. "pattern": "^ses"
  35393. },
  35394. "messageID": {
  35395. "type": "string",
  35396. "pattern": "^msg_"
  35397. }
  35398. },
  35399. "required": ["timestamp", "sessionID", "messageID"],
  35400. "additionalProperties": false
  35401. }
  35402. },
  35403. "required": ["id", "type", "properties"],
  35404. "additionalProperties": false
  35405. },
  35406. "EventMessagePartDelta": {
  35407. "type": "object",
  35408. "properties": {
  35409. "id": {
  35410. "type": "string",
  35411. "pattern": "^evt_"
  35412. },
  35413. "type": {
  35414. "type": "string",
  35415. "enum": ["message.part.delta"]
  35416. },
  35417. "properties": {
  35418. "type": "object",
  35419. "properties": {
  35420. "sessionID": {
  35421. "type": "string",
  35422. "pattern": "^ses"
  35423. },
  35424. "messageID": {
  35425. "type": "string",
  35426. "pattern": "^msg"
  35427. },
  35428. "partID": {
  35429. "type": "string",
  35430. "pattern": "^prt"
  35431. },
  35432. "field": {
  35433. "type": "string"
  35434. },
  35435. "delta": {
  35436. "type": "string"
  35437. }
  35438. },
  35439. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  35440. "additionalProperties": false
  35441. }
  35442. },
  35443. "required": ["id", "type", "properties"],
  35444. "additionalProperties": false
  35445. },
  35446. "EventSessionDiff": {
  35447. "type": "object",
  35448. "properties": {
  35449. "id": {
  35450. "type": "string",
  35451. "pattern": "^evt_"
  35452. },
  35453. "type": {
  35454. "type": "string",
  35455. "enum": ["session.diff"]
  35456. },
  35457. "properties": {
  35458. "type": "object",
  35459. "properties": {
  35460. "sessionID": {
  35461. "type": "string",
  35462. "pattern": "^ses"
  35463. },
  35464. "diff": {
  35465. "type": "array",
  35466. "items": {
  35467. "$ref": "#/components/schemas/SnapshotFileDiff"
  35468. }
  35469. }
  35470. },
  35471. "required": ["sessionID", "diff"],
  35472. "additionalProperties": false
  35473. }
  35474. },
  35475. "required": ["id", "type", "properties"],
  35476. "additionalProperties": false
  35477. },
  35478. "EventSessionError": {
  35479. "type": "object",
  35480. "properties": {
  35481. "id": {
  35482. "type": "string",
  35483. "pattern": "^evt_"
  35484. },
  35485. "type": {
  35486. "type": "string",
  35487. "enum": ["session.error"]
  35488. },
  35489. "properties": {
  35490. "type": "object",
  35491. "properties": {
  35492. "sessionID": {
  35493. "type": "string",
  35494. "pattern": "^ses"
  35495. },
  35496. "error": {
  35497. "anyOf": [
  35498. {
  35499. "$ref": "#/components/schemas/ProviderAuthError"
  35500. },
  35501. {
  35502. "$ref": "#/components/schemas/UnknownError"
  35503. },
  35504. {
  35505. "$ref": "#/components/schemas/MessageOutputLengthError"
  35506. },
  35507. {
  35508. "$ref": "#/components/schemas/MessageAbortedError"
  35509. },
  35510. {
  35511. "$ref": "#/components/schemas/StructuredOutputError"
  35512. },
  35513. {
  35514. "$ref": "#/components/schemas/ContextOverflowError"
  35515. },
  35516. {
  35517. "$ref": "#/components/schemas/ContentFilterError"
  35518. },
  35519. {
  35520. "$ref": "#/components/schemas/APIError"
  35521. }
  35522. ]
  35523. }
  35524. },
  35525. "additionalProperties": false
  35526. }
  35527. },
  35528. "required": ["id", "type", "properties"],
  35529. "additionalProperties": false
  35530. },
  35531. "EventInstallationUpdated": {
  35532. "type": "object",
  35533. "properties": {
  35534. "id": {
  35535. "type": "string",
  35536. "pattern": "^evt_"
  35537. },
  35538. "type": {
  35539. "type": "string",
  35540. "enum": ["installation.updated"]
  35541. },
  35542. "properties": {
  35543. "type": "object",
  35544. "properties": {
  35545. "version": {
  35546. "type": "string"
  35547. }
  35548. },
  35549. "required": ["version"],
  35550. "additionalProperties": false
  35551. }
  35552. },
  35553. "required": ["id", "type", "properties"],
  35554. "additionalProperties": false
  35555. },
  35556. "EventInstallationUpdate-available": {
  35557. "type": "object",
  35558. "properties": {
  35559. "id": {
  35560. "type": "string",
  35561. "pattern": "^evt_"
  35562. },
  35563. "type": {
  35564. "type": "string",
  35565. "enum": ["installation.update-available"]
  35566. },
  35567. "properties": {
  35568. "type": "object",
  35569. "properties": {
  35570. "version": {
  35571. "type": "string"
  35572. }
  35573. },
  35574. "required": ["version"],
  35575. "additionalProperties": false
  35576. }
  35577. },
  35578. "required": ["id", "type", "properties"],
  35579. "additionalProperties": false
  35580. },
  35581. "EventFileEdited": {
  35582. "type": "object",
  35583. "properties": {
  35584. "id": {
  35585. "type": "string",
  35586. "pattern": "^evt_"
  35587. },
  35588. "type": {
  35589. "type": "string",
  35590. "enum": ["file.edited"]
  35591. },
  35592. "properties": {
  35593. "type": "object",
  35594. "properties": {
  35595. "file": {
  35596. "type": "string"
  35597. }
  35598. },
  35599. "required": ["file"],
  35600. "additionalProperties": false
  35601. }
  35602. },
  35603. "required": ["id", "type", "properties"],
  35604. "additionalProperties": false
  35605. },
  35606. "EventReferenceUpdated": {
  35607. "type": "object",
  35608. "properties": {
  35609. "id": {
  35610. "type": "string",
  35611. "pattern": "^evt_"
  35612. },
  35613. "type": {
  35614. "type": "string",
  35615. "enum": ["reference.updated"]
  35616. },
  35617. "properties": {
  35618. "type": "object",
  35619. "properties": {}
  35620. }
  35621. },
  35622. "required": ["id", "type", "properties"],
  35623. "additionalProperties": false
  35624. },
  35625. "EventPermissionV2Asked": {
  35626. "type": "object",
  35627. "properties": {
  35628. "id": {
  35629. "type": "string",
  35630. "pattern": "^evt_"
  35631. },
  35632. "type": {
  35633. "type": "string",
  35634. "enum": ["permission.v2.asked"]
  35635. },
  35636. "properties": {
  35637. "type": "object",
  35638. "properties": {
  35639. "id": {
  35640. "type": "string",
  35641. "pattern": "^per"
  35642. },
  35643. "sessionID": {
  35644. "type": "string",
  35645. "pattern": "^ses"
  35646. },
  35647. "action": {
  35648. "type": "string"
  35649. },
  35650. "resources": {
  35651. "type": "array",
  35652. "items": {
  35653. "type": "string"
  35654. }
  35655. },
  35656. "save": {
  35657. "type": "array",
  35658. "items": {
  35659. "type": "string"
  35660. }
  35661. },
  35662. "metadata": {
  35663. "type": "object"
  35664. },
  35665. "source": {
  35666. "$ref": "#/components/schemas/PermissionV2Source"
  35667. }
  35668. },
  35669. "required": ["id", "sessionID", "action", "resources"],
  35670. "additionalProperties": false
  35671. }
  35672. },
  35673. "required": ["id", "type", "properties"],
  35674. "additionalProperties": false
  35675. },
  35676. "EventPermissionV2Replied": {
  35677. "type": "object",
  35678. "properties": {
  35679. "id": {
  35680. "type": "string",
  35681. "pattern": "^evt_"
  35682. },
  35683. "type": {
  35684. "type": "string",
  35685. "enum": ["permission.v2.replied"]
  35686. },
  35687. "properties": {
  35688. "type": "object",
  35689. "properties": {
  35690. "sessionID": {
  35691. "type": "string",
  35692. "pattern": "^ses"
  35693. },
  35694. "requestID": {
  35695. "type": "string",
  35696. "pattern": "^per"
  35697. },
  35698. "reply": {
  35699. "$ref": "#/components/schemas/PermissionV2Reply"
  35700. }
  35701. },
  35702. "required": ["sessionID", "requestID", "reply"],
  35703. "additionalProperties": false
  35704. }
  35705. },
  35706. "required": ["id", "type", "properties"],
  35707. "additionalProperties": false
  35708. },
  35709. "EventPluginAdded": {
  35710. "type": "object",
  35711. "properties": {
  35712. "id": {
  35713. "type": "string",
  35714. "pattern": "^evt_"
  35715. },
  35716. "type": {
  35717. "type": "string",
  35718. "enum": ["plugin.added"]
  35719. },
  35720. "properties": {
  35721. "type": "object",
  35722. "properties": {
  35723. "id": {
  35724. "type": "string"
  35725. }
  35726. },
  35727. "required": ["id"],
  35728. "additionalProperties": false
  35729. }
  35730. },
  35731. "required": ["id", "type", "properties"],
  35732. "additionalProperties": false
  35733. },
  35734. "EventProjectDirectoriesUpdated": {
  35735. "type": "object",
  35736. "properties": {
  35737. "id": {
  35738. "type": "string",
  35739. "pattern": "^evt_"
  35740. },
  35741. "type": {
  35742. "type": "string",
  35743. "enum": ["project.directories.updated"]
  35744. },
  35745. "properties": {
  35746. "type": "object",
  35747. "properties": {
  35748. "projectID": {
  35749. "type": "string"
  35750. }
  35751. },
  35752. "required": ["projectID"],
  35753. "additionalProperties": false
  35754. }
  35755. },
  35756. "required": ["id", "type", "properties"],
  35757. "additionalProperties": false
  35758. },
  35759. "EventFileWatcherUpdated": {
  35760. "type": "object",
  35761. "properties": {
  35762. "id": {
  35763. "type": "string",
  35764. "pattern": "^evt_"
  35765. },
  35766. "type": {
  35767. "type": "string",
  35768. "enum": ["file.watcher.updated"]
  35769. },
  35770. "properties": {
  35771. "type": "object",
  35772. "properties": {
  35773. "file": {
  35774. "type": "string"
  35775. },
  35776. "event": {
  35777. "type": "string",
  35778. "enum": ["add", "change", "unlink"]
  35779. }
  35780. },
  35781. "required": ["file", "event"],
  35782. "additionalProperties": false
  35783. }
  35784. },
  35785. "required": ["id", "type", "properties"],
  35786. "additionalProperties": false
  35787. },
  35788. "EventPtyCreated": {
  35789. "type": "object",
  35790. "properties": {
  35791. "id": {
  35792. "type": "string",
  35793. "pattern": "^evt_"
  35794. },
  35795. "type": {
  35796. "type": "string",
  35797. "enum": ["pty.created"]
  35798. },
  35799. "properties": {
  35800. "type": "object",
  35801. "properties": {
  35802. "info": {
  35803. "$ref": "#/components/schemas/Pty"
  35804. }
  35805. },
  35806. "required": ["info"],
  35807. "additionalProperties": false
  35808. }
  35809. },
  35810. "required": ["id", "type", "properties"],
  35811. "additionalProperties": false
  35812. },
  35813. "EventPtyUpdated": {
  35814. "type": "object",
  35815. "properties": {
  35816. "id": {
  35817. "type": "string",
  35818. "pattern": "^evt_"
  35819. },
  35820. "type": {
  35821. "type": "string",
  35822. "enum": ["pty.updated"]
  35823. },
  35824. "properties": {
  35825. "type": "object",
  35826. "properties": {
  35827. "info": {
  35828. "$ref": "#/components/schemas/Pty"
  35829. }
  35830. },
  35831. "required": ["info"],
  35832. "additionalProperties": false
  35833. }
  35834. },
  35835. "required": ["id", "type", "properties"],
  35836. "additionalProperties": false
  35837. },
  35838. "EventPtyExited": {
  35839. "type": "object",
  35840. "properties": {
  35841. "id": {
  35842. "type": "string",
  35843. "pattern": "^evt_"
  35844. },
  35845. "type": {
  35846. "type": "string",
  35847. "enum": ["pty.exited"]
  35848. },
  35849. "properties": {
  35850. "type": "object",
  35851. "properties": {
  35852. "id": {
  35853. "type": "string",
  35854. "pattern": "^pty"
  35855. },
  35856. "exitCode": {
  35857. "type": "integer",
  35858. "minimum": 0
  35859. }
  35860. },
  35861. "required": ["id", "exitCode"],
  35862. "additionalProperties": false
  35863. }
  35864. },
  35865. "required": ["id", "type", "properties"],
  35866. "additionalProperties": false
  35867. },
  35868. "EventPtyDeleted": {
  35869. "type": "object",
  35870. "properties": {
  35871. "id": {
  35872. "type": "string",
  35873. "pattern": "^evt_"
  35874. },
  35875. "type": {
  35876. "type": "string",
  35877. "enum": ["pty.deleted"]
  35878. },
  35879. "properties": {
  35880. "type": "object",
  35881. "properties": {
  35882. "id": {
  35883. "type": "string",
  35884. "pattern": "^pty"
  35885. }
  35886. },
  35887. "required": ["id"],
  35888. "additionalProperties": false
  35889. }
  35890. },
  35891. "required": ["id", "type", "properties"],
  35892. "additionalProperties": false
  35893. },
  35894. "EventQuestionV2Asked": {
  35895. "type": "object",
  35896. "properties": {
  35897. "id": {
  35898. "type": "string",
  35899. "pattern": "^evt_"
  35900. },
  35901. "type": {
  35902. "type": "string",
  35903. "enum": ["question.v2.asked"]
  35904. },
  35905. "properties": {
  35906. "type": "object",
  35907. "properties": {
  35908. "id": {
  35909. "type": "string",
  35910. "pattern": "^que"
  35911. },
  35912. "sessionID": {
  35913. "type": "string",
  35914. "pattern": "^ses"
  35915. },
  35916. "questions": {
  35917. "type": "array",
  35918. "items": {
  35919. "$ref": "#/components/schemas/QuestionV2Info"
  35920. },
  35921. "description": "Questions to ask"
  35922. },
  35923. "tool": {
  35924. "$ref": "#/components/schemas/QuestionV2Tool"
  35925. }
  35926. },
  35927. "required": ["id", "sessionID", "questions"],
  35928. "additionalProperties": false
  35929. }
  35930. },
  35931. "required": ["id", "type", "properties"],
  35932. "additionalProperties": false
  35933. },
  35934. "EventQuestionV2Replied": {
  35935. "type": "object",
  35936. "properties": {
  35937. "id": {
  35938. "type": "string",
  35939. "pattern": "^evt_"
  35940. },
  35941. "type": {
  35942. "type": "string",
  35943. "enum": ["question.v2.replied"]
  35944. },
  35945. "properties": {
  35946. "type": "object",
  35947. "properties": {
  35948. "sessionID": {
  35949. "type": "string",
  35950. "pattern": "^ses"
  35951. },
  35952. "requestID": {
  35953. "type": "string",
  35954. "pattern": "^que"
  35955. },
  35956. "answers": {
  35957. "type": "array",
  35958. "items": {
  35959. "$ref": "#/components/schemas/QuestionV2Answer"
  35960. }
  35961. }
  35962. },
  35963. "required": ["sessionID", "requestID", "answers"],
  35964. "additionalProperties": false
  35965. }
  35966. },
  35967. "required": ["id", "type", "properties"],
  35968. "additionalProperties": false
  35969. },
  35970. "EventQuestionV2Rejected": {
  35971. "type": "object",
  35972. "properties": {
  35973. "id": {
  35974. "type": "string",
  35975. "pattern": "^evt_"
  35976. },
  35977. "type": {
  35978. "type": "string",
  35979. "enum": ["question.v2.rejected"]
  35980. },
  35981. "properties": {
  35982. "type": "object",
  35983. "properties": {
  35984. "sessionID": {
  35985. "type": "string",
  35986. "pattern": "^ses"
  35987. },
  35988. "requestID": {
  35989. "type": "string",
  35990. "pattern": "^que"
  35991. }
  35992. },
  35993. "required": ["sessionID", "requestID"],
  35994. "additionalProperties": false
  35995. }
  35996. },
  35997. "required": ["id", "type", "properties"],
  35998. "additionalProperties": false
  35999. },
  36000. "EventTodoUpdated": {
  36001. "type": "object",
  36002. "properties": {
  36003. "id": {
  36004. "type": "string",
  36005. "pattern": "^evt_"
  36006. },
  36007. "type": {
  36008. "type": "string",
  36009. "enum": ["todo.updated"]
  36010. },
  36011. "properties": {
  36012. "type": "object",
  36013. "properties": {
  36014. "sessionID": {
  36015. "type": "string",
  36016. "pattern": "^ses"
  36017. },
  36018. "todos": {
  36019. "type": "array",
  36020. "items": {
  36021. "$ref": "#/components/schemas/Todo"
  36022. }
  36023. }
  36024. },
  36025. "required": ["sessionID", "todos"],
  36026. "additionalProperties": false
  36027. }
  36028. },
  36029. "required": ["id", "type", "properties"],
  36030. "additionalProperties": false
  36031. },
  36032. "EventLspUpdated": {
  36033. "type": "object",
  36034. "properties": {
  36035. "id": {
  36036. "type": "string",
  36037. "pattern": "^evt_"
  36038. },
  36039. "type": {
  36040. "type": "string",
  36041. "enum": ["lsp.updated"]
  36042. },
  36043. "properties": {
  36044. "type": "object",
  36045. "properties": {}
  36046. }
  36047. },
  36048. "required": ["id", "type", "properties"],
  36049. "additionalProperties": false
  36050. },
  36051. "EventPermissionAsked": {
  36052. "type": "object",
  36053. "properties": {
  36054. "id": {
  36055. "type": "string",
  36056. "pattern": "^evt_"
  36057. },
  36058. "type": {
  36059. "type": "string",
  36060. "enum": ["permission.asked"]
  36061. },
  36062. "properties": {
  36063. "type": "object",
  36064. "properties": {
  36065. "id": {
  36066. "type": "string",
  36067. "pattern": "^per"
  36068. },
  36069. "sessionID": {
  36070. "type": "string",
  36071. "pattern": "^ses"
  36072. },
  36073. "permission": {
  36074. "type": "string"
  36075. },
  36076. "patterns": {
  36077. "type": "array",
  36078. "items": {
  36079. "type": "string"
  36080. }
  36081. },
  36082. "metadata": {
  36083. "type": "object"
  36084. },
  36085. "always": {
  36086. "type": "array",
  36087. "items": {
  36088. "type": "string"
  36089. }
  36090. },
  36091. "tool": {
  36092. "type": "object",
  36093. "properties": {
  36094. "messageID": {
  36095. "type": "string"
  36096. },
  36097. "callID": {
  36098. "type": "string"
  36099. }
  36100. },
  36101. "required": ["messageID", "callID"],
  36102. "additionalProperties": false
  36103. }
  36104. },
  36105. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  36106. "additionalProperties": false
  36107. }
  36108. },
  36109. "required": ["id", "type", "properties"],
  36110. "additionalProperties": false
  36111. },
  36112. "EventPermissionReplied": {
  36113. "type": "object",
  36114. "properties": {
  36115. "id": {
  36116. "type": "string",
  36117. "pattern": "^evt_"
  36118. },
  36119. "type": {
  36120. "type": "string",
  36121. "enum": ["permission.replied"]
  36122. },
  36123. "properties": {
  36124. "type": "object",
  36125. "properties": {
  36126. "sessionID": {
  36127. "type": "string",
  36128. "pattern": "^ses"
  36129. },
  36130. "requestID": {
  36131. "type": "string",
  36132. "pattern": "^per"
  36133. },
  36134. "reply": {
  36135. "type": "string",
  36136. "enum": ["once", "always", "reject"]
  36137. }
  36138. },
  36139. "required": ["sessionID", "requestID", "reply"],
  36140. "additionalProperties": false
  36141. }
  36142. },
  36143. "required": ["id", "type", "properties"],
  36144. "additionalProperties": false
  36145. },
  36146. "EventMcpToolsChanged": {
  36147. "type": "object",
  36148. "properties": {
  36149. "id": {
  36150. "type": "string",
  36151. "pattern": "^evt_"
  36152. },
  36153. "type": {
  36154. "type": "string",
  36155. "enum": ["mcp.tools.changed"]
  36156. },
  36157. "properties": {
  36158. "type": "object",
  36159. "properties": {
  36160. "server": {
  36161. "type": "string"
  36162. }
  36163. },
  36164. "required": ["server"],
  36165. "additionalProperties": false
  36166. }
  36167. },
  36168. "required": ["id", "type", "properties"],
  36169. "additionalProperties": false
  36170. },
  36171. "EventMcpBrowserOpenFailed": {
  36172. "type": "object",
  36173. "properties": {
  36174. "id": {
  36175. "type": "string",
  36176. "pattern": "^evt_"
  36177. },
  36178. "type": {
  36179. "type": "string",
  36180. "enum": ["mcp.browser.open.failed"]
  36181. },
  36182. "properties": {
  36183. "type": "object",
  36184. "properties": {
  36185. "mcpName": {
  36186. "type": "string"
  36187. },
  36188. "url": {
  36189. "type": "string"
  36190. }
  36191. },
  36192. "required": ["mcpName", "url"],
  36193. "additionalProperties": false
  36194. }
  36195. },
  36196. "required": ["id", "type", "properties"],
  36197. "additionalProperties": false
  36198. },
  36199. "EventCommandExecuted": {
  36200. "type": "object",
  36201. "properties": {
  36202. "id": {
  36203. "type": "string",
  36204. "pattern": "^evt_"
  36205. },
  36206. "type": {
  36207. "type": "string",
  36208. "enum": ["command.executed"]
  36209. },
  36210. "properties": {
  36211. "type": "object",
  36212. "properties": {
  36213. "name": {
  36214. "type": "string"
  36215. },
  36216. "sessionID": {
  36217. "type": "string",
  36218. "pattern": "^ses"
  36219. },
  36220. "arguments": {
  36221. "type": "string"
  36222. },
  36223. "messageID": {
  36224. "type": "string",
  36225. "pattern": "^msg"
  36226. }
  36227. },
  36228. "required": ["name", "sessionID", "arguments", "messageID"],
  36229. "additionalProperties": false
  36230. }
  36231. },
  36232. "required": ["id", "type", "properties"],
  36233. "additionalProperties": false
  36234. },
  36235. "EventProjectUpdated": {
  36236. "type": "object",
  36237. "properties": {
  36238. "id": {
  36239. "type": "string",
  36240. "pattern": "^evt_"
  36241. },
  36242. "type": {
  36243. "type": "string",
  36244. "enum": ["project.updated"]
  36245. },
  36246. "properties": {
  36247. "type": "object",
  36248. "properties": {
  36249. "id": {
  36250. "type": "string"
  36251. },
  36252. "worktree": {
  36253. "type": "string"
  36254. },
  36255. "vcs": {
  36256. "$ref": "#/components/schemas/ProjectVcs"
  36257. },
  36258. "name": {
  36259. "type": "string"
  36260. },
  36261. "icon": {
  36262. "$ref": "#/components/schemas/ProjectIcon"
  36263. },
  36264. "commands": {
  36265. "$ref": "#/components/schemas/ProjectCommands"
  36266. },
  36267. "time": {
  36268. "$ref": "#/components/schemas/ProjectTime"
  36269. },
  36270. "sandboxes": {
  36271. "type": "array",
  36272. "items": {
  36273. "type": "string"
  36274. }
  36275. }
  36276. },
  36277. "required": ["id", "worktree", "time", "sandboxes"],
  36278. "additionalProperties": false
  36279. }
  36280. },
  36281. "required": ["id", "type", "properties"],
  36282. "additionalProperties": false
  36283. },
  36284. "EventSessionStatus": {
  36285. "type": "object",
  36286. "properties": {
  36287. "id": {
  36288. "type": "string",
  36289. "pattern": "^evt_"
  36290. },
  36291. "type": {
  36292. "type": "string",
  36293. "enum": ["session.status"]
  36294. },
  36295. "properties": {
  36296. "type": "object",
  36297. "properties": {
  36298. "sessionID": {
  36299. "type": "string",
  36300. "pattern": "^ses"
  36301. },
  36302. "status": {
  36303. "$ref": "#/components/schemas/SessionStatus"
  36304. }
  36305. },
  36306. "required": ["sessionID", "status"],
  36307. "additionalProperties": false
  36308. }
  36309. },
  36310. "required": ["id", "type", "properties"],
  36311. "additionalProperties": false
  36312. },
  36313. "EventSessionIdle": {
  36314. "type": "object",
  36315. "properties": {
  36316. "id": {
  36317. "type": "string",
  36318. "pattern": "^evt_"
  36319. },
  36320. "type": {
  36321. "type": "string",
  36322. "enum": ["session.idle"]
  36323. },
  36324. "properties": {
  36325. "type": "object",
  36326. "properties": {
  36327. "sessionID": {
  36328. "type": "string",
  36329. "pattern": "^ses"
  36330. }
  36331. },
  36332. "required": ["sessionID"],
  36333. "additionalProperties": false
  36334. }
  36335. },
  36336. "required": ["id", "type", "properties"],
  36337. "additionalProperties": false
  36338. },
  36339. "EventQuestionAsked": {
  36340. "type": "object",
  36341. "properties": {
  36342. "id": {
  36343. "type": "string",
  36344. "pattern": "^evt_"
  36345. },
  36346. "type": {
  36347. "type": "string",
  36348. "enum": ["question.asked"]
  36349. },
  36350. "properties": {
  36351. "type": "object",
  36352. "properties": {
  36353. "id": {
  36354. "type": "string",
  36355. "pattern": "^que"
  36356. },
  36357. "sessionID": {
  36358. "type": "string",
  36359. "pattern": "^ses"
  36360. },
  36361. "questions": {
  36362. "type": "array",
  36363. "items": {
  36364. "$ref": "#/components/schemas/QuestionInfo"
  36365. },
  36366. "description": "Questions to ask"
  36367. },
  36368. "tool": {
  36369. "$ref": "#/components/schemas/QuestionTool"
  36370. }
  36371. },
  36372. "required": ["id", "sessionID", "questions"],
  36373. "additionalProperties": false
  36374. }
  36375. },
  36376. "required": ["id", "type", "properties"],
  36377. "additionalProperties": false
  36378. },
  36379. "EventQuestionReplied": {
  36380. "type": "object",
  36381. "properties": {
  36382. "id": {
  36383. "type": "string",
  36384. "pattern": "^evt_"
  36385. },
  36386. "type": {
  36387. "type": "string",
  36388. "enum": ["question.replied"]
  36389. },
  36390. "properties": {
  36391. "type": "object",
  36392. "properties": {
  36393. "sessionID": {
  36394. "type": "string",
  36395. "pattern": "^ses"
  36396. },
  36397. "requestID": {
  36398. "type": "string",
  36399. "pattern": "^que"
  36400. },
  36401. "answers": {
  36402. "type": "array",
  36403. "items": {
  36404. "$ref": "#/components/schemas/QuestionAnswer"
  36405. }
  36406. }
  36407. },
  36408. "required": ["sessionID", "requestID", "answers"],
  36409. "additionalProperties": false
  36410. }
  36411. },
  36412. "required": ["id", "type", "properties"],
  36413. "additionalProperties": false
  36414. },
  36415. "EventQuestionRejected": {
  36416. "type": "object",
  36417. "properties": {
  36418. "id": {
  36419. "type": "string",
  36420. "pattern": "^evt_"
  36421. },
  36422. "type": {
  36423. "type": "string",
  36424. "enum": ["question.rejected"]
  36425. },
  36426. "properties": {
  36427. "type": "object",
  36428. "properties": {
  36429. "sessionID": {
  36430. "type": "string",
  36431. "pattern": "^ses"
  36432. },
  36433. "requestID": {
  36434. "type": "string",
  36435. "pattern": "^que"
  36436. }
  36437. },
  36438. "required": ["sessionID", "requestID"],
  36439. "additionalProperties": false
  36440. }
  36441. },
  36442. "required": ["id", "type", "properties"],
  36443. "additionalProperties": false
  36444. },
  36445. "EventSessionCompacted": {
  36446. "type": "object",
  36447. "properties": {
  36448. "id": {
  36449. "type": "string",
  36450. "pattern": "^evt_"
  36451. },
  36452. "type": {
  36453. "type": "string",
  36454. "enum": ["session.compacted"]
  36455. },
  36456. "properties": {
  36457. "type": "object",
  36458. "properties": {
  36459. "sessionID": {
  36460. "type": "string",
  36461. "pattern": "^ses"
  36462. }
  36463. },
  36464. "required": ["sessionID"],
  36465. "additionalProperties": false
  36466. }
  36467. },
  36468. "required": ["id", "type", "properties"],
  36469. "additionalProperties": false
  36470. },
  36471. "EventVcsBranchUpdated": {
  36472. "type": "object",
  36473. "properties": {
  36474. "id": {
  36475. "type": "string",
  36476. "pattern": "^evt_"
  36477. },
  36478. "type": {
  36479. "type": "string",
  36480. "enum": ["vcs.branch.updated"]
  36481. },
  36482. "properties": {
  36483. "type": "object",
  36484. "properties": {
  36485. "branch": {
  36486. "type": "string"
  36487. }
  36488. },
  36489. "additionalProperties": false
  36490. }
  36491. },
  36492. "required": ["id", "type", "properties"],
  36493. "additionalProperties": false
  36494. },
  36495. "EventWorkspaceReady": {
  36496. "type": "object",
  36497. "properties": {
  36498. "id": {
  36499. "type": "string",
  36500. "pattern": "^evt_"
  36501. },
  36502. "type": {
  36503. "type": "string",
  36504. "enum": ["workspace.ready"]
  36505. },
  36506. "properties": {
  36507. "type": "object",
  36508. "properties": {
  36509. "name": {
  36510. "type": "string"
  36511. }
  36512. },
  36513. "required": ["name"],
  36514. "additionalProperties": false
  36515. }
  36516. },
  36517. "required": ["id", "type", "properties"],
  36518. "additionalProperties": false
  36519. },
  36520. "EventWorkspaceFailed": {
  36521. "type": "object",
  36522. "properties": {
  36523. "id": {
  36524. "type": "string",
  36525. "pattern": "^evt_"
  36526. },
  36527. "type": {
  36528. "type": "string",
  36529. "enum": ["workspace.failed"]
  36530. },
  36531. "properties": {
  36532. "type": "object",
  36533. "properties": {
  36534. "message": {
  36535. "type": "string"
  36536. }
  36537. },
  36538. "required": ["message"],
  36539. "additionalProperties": false
  36540. }
  36541. },
  36542. "required": ["id", "type", "properties"],
  36543. "additionalProperties": false
  36544. },
  36545. "EventWorkspaceStatus": {
  36546. "type": "object",
  36547. "properties": {
  36548. "id": {
  36549. "type": "string",
  36550. "pattern": "^evt_"
  36551. },
  36552. "type": {
  36553. "type": "string",
  36554. "enum": ["workspace.status"]
  36555. },
  36556. "properties": {
  36557. "type": "object",
  36558. "properties": {
  36559. "workspaceID": {
  36560. "type": "string",
  36561. "pattern": "^wrk"
  36562. },
  36563. "status": {
  36564. "type": "string",
  36565. "enum": ["connected", "connecting", "disconnected", "error"]
  36566. }
  36567. },
  36568. "required": ["workspaceID", "status"],
  36569. "additionalProperties": false
  36570. }
  36571. },
  36572. "required": ["id", "type", "properties"],
  36573. "additionalProperties": false
  36574. },
  36575. "EventWorktreeReady": {
  36576. "type": "object",
  36577. "properties": {
  36578. "id": {
  36579. "type": "string",
  36580. "pattern": "^evt_"
  36581. },
  36582. "type": {
  36583. "type": "string",
  36584. "enum": ["worktree.ready"]
  36585. },
  36586. "properties": {
  36587. "type": "object",
  36588. "properties": {
  36589. "name": {
  36590. "type": "string"
  36591. },
  36592. "branch": {
  36593. "type": "string"
  36594. }
  36595. },
  36596. "required": ["name"],
  36597. "additionalProperties": false
  36598. }
  36599. },
  36600. "required": ["id", "type", "properties"],
  36601. "additionalProperties": false
  36602. },
  36603. "EventWorktreeFailed": {
  36604. "type": "object",
  36605. "properties": {
  36606. "id": {
  36607. "type": "string",
  36608. "pattern": "^evt_"
  36609. },
  36610. "type": {
  36611. "type": "string",
  36612. "enum": ["worktree.failed"]
  36613. },
  36614. "properties": {
  36615. "type": "object",
  36616. "properties": {
  36617. "message": {
  36618. "type": "string"
  36619. }
  36620. },
  36621. "required": ["message"],
  36622. "additionalProperties": false
  36623. }
  36624. },
  36625. "required": ["id", "type", "properties"],
  36626. "additionalProperties": false
  36627. },
  36628. "EventServerConnected": {
  36629. "type": "object",
  36630. "properties": {
  36631. "id": {
  36632. "type": "string",
  36633. "pattern": "^evt_"
  36634. },
  36635. "type": {
  36636. "type": "string",
  36637. "enum": ["server.connected"]
  36638. },
  36639. "properties": {
  36640. "type": "object",
  36641. "properties": {}
  36642. }
  36643. },
  36644. "required": ["id", "type", "properties"],
  36645. "additionalProperties": false
  36646. },
  36647. "EventGlobalDisposed": {
  36648. "type": "object",
  36649. "properties": {
  36650. "id": {
  36651. "type": "string",
  36652. "pattern": "^evt_"
  36653. },
  36654. "type": {
  36655. "type": "string",
  36656. "enum": ["global.disposed"]
  36657. },
  36658. "properties": {
  36659. "type": "object",
  36660. "properties": {}
  36661. }
  36662. },
  36663. "required": ["id", "type", "properties"],
  36664. "additionalProperties": false
  36665. },
  36666. "CredentialOAuth": {
  36667. "type": "object",
  36668. "properties": {
  36669. "type": {
  36670. "type": "string",
  36671. "enum": ["oauth"]
  36672. },
  36673. "methodID": {
  36674. "type": "string"
  36675. },
  36676. "refresh": {
  36677. "type": "string"
  36678. },
  36679. "access": {
  36680. "type": "string"
  36681. },
  36682. "expires": {
  36683. "type": "integer",
  36684. "minimum": 0
  36685. },
  36686. "metadata": {
  36687. "type": "object"
  36688. }
  36689. },
  36690. "required": ["type", "methodID", "refresh", "access", "expires"],
  36691. "additionalProperties": false
  36692. },
  36693. "CredentialKey": {
  36694. "type": "object",
  36695. "properties": {
  36696. "type": {
  36697. "type": "string",
  36698. "enum": ["key"]
  36699. },
  36700. "key": {
  36701. "type": "string"
  36702. },
  36703. "metadata": {
  36704. "type": "object"
  36705. }
  36706. },
  36707. "required": ["type", "key"],
  36708. "additionalProperties": false
  36709. },
  36710. "SkillV2DirectorySource": {
  36711. "type": "object",
  36712. "properties": {
  36713. "type": {
  36714. "type": "string",
  36715. "enum": ["directory"]
  36716. },
  36717. "path": {
  36718. "type": "string"
  36719. }
  36720. },
  36721. "required": ["type", "path"],
  36722. "additionalProperties": false
  36723. },
  36724. "SkillV2UrlSource": {
  36725. "type": "object",
  36726. "properties": {
  36727. "type": {
  36728. "type": "string",
  36729. "enum": ["url"]
  36730. },
  36731. "url": {
  36732. "type": "string"
  36733. }
  36734. },
  36735. "required": ["type", "url"],
  36736. "additionalProperties": false
  36737. },
  36738. "SkillV2EmbeddedSource": {
  36739. "type": "object",
  36740. "properties": {
  36741. "type": {
  36742. "type": "string",
  36743. "enum": ["embedded"]
  36744. },
  36745. "skill": {
  36746. "$ref": "#/components/schemas/SkillV2Info"
  36747. }
  36748. },
  36749. "required": ["type", "skill"],
  36750. "additionalProperties": false
  36751. },
  36752. "BadRequestError": {
  36753. "type": "object",
  36754. "required": ["name", "data"],
  36755. "properties": {
  36756. "name": {
  36757. "type": "string",
  36758. "enum": ["BadRequest"]
  36759. },
  36760. "data": {
  36761. "type": "object",
  36762. "required": ["message"],
  36763. "properties": {
  36764. "message": {
  36765. "type": "string"
  36766. },
  36767. "kind": {
  36768. "type": "string",
  36769. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  36770. }
  36771. }
  36772. }
  36773. }
  36774. }
  36775. }
  36776. },
  36777. "security": [],
  36778. "tags": [
  36779. {
  36780. "name": "control",
  36781. "description": "Control plane routes."
  36782. },
  36783. {
  36784. "name": "controlPlane",
  36785. "description": "Control-plane orchestration routes."
  36786. },
  36787. {
  36788. "name": "global",
  36789. "description": "Global server routes."
  36790. },
  36791. {
  36792. "name": "event",
  36793. "description": "Instance event stream route."
  36794. },
  36795. {
  36796. "name": "config",
  36797. "description": "Experimental HttpApi config routes."
  36798. },
  36799. {
  36800. "name": "experimental",
  36801. "description": "Experimental HttpApi read-only routes."
  36802. },
  36803. {
  36804. "name": "file",
  36805. "description": "Experimental HttpApi file routes."
  36806. },
  36807. {
  36808. "name": "instance",
  36809. "description": "Experimental HttpApi instance read routes."
  36810. },
  36811. {
  36812. "name": "mcp",
  36813. "description": "Experimental HttpApi MCP routes."
  36814. },
  36815. {
  36816. "name": "project",
  36817. "description": "Experimental HttpApi project routes."
  36818. },
  36819. {
  36820. "name": "projectCopy",
  36821. "description": "Project copy naming routes."
  36822. },
  36823. {
  36824. "name": "pty",
  36825. "description": "Experimental HttpApi PTY routes."
  36826. },
  36827. {
  36828. "name": "question",
  36829. "description": "Question routes."
  36830. },
  36831. {
  36832. "name": "permission",
  36833. "description": "Experimental HttpApi permission routes."
  36834. },
  36835. {
  36836. "name": "provider",
  36837. "description": "Experimental HttpApi provider routes."
  36838. },
  36839. {
  36840. "name": "session",
  36841. "description": "Experimental HttpApi session routes."
  36842. },
  36843. {
  36844. "name": "sync",
  36845. "description": "Experimental HttpApi sync routes."
  36846. },
  36847. {
  36848. "name": "tui",
  36849. "description": "Experimental HttpApi TUI routes."
  36850. },
  36851. {
  36852. "name": "workspace",
  36853. "description": "Experimental HttpApi workspace routes."
  36854. },
  36855. {
  36856. "name": "opencode HttpApi",
  36857. "description": "Experimental HttpApi surface for selected instance routes."
  36858. },
  36859. {
  36860. "name": "opencode HttpApi",
  36861. "description": "Experimental HttpApi surface for selected instance routes."
  36862. },
  36863. {
  36864. "name": "opencode HttpApi",
  36865. "description": "Experimental HttpApi surface for selected instance routes."
  36866. },
  36867. {
  36868. "name": "sessions",
  36869. "description": "Experimental session routes."
  36870. },
  36871. {
  36872. "name": "messages",
  36873. "description": "Experimental message routes."
  36874. },
  36875. {
  36876. "name": "models",
  36877. "description": "Experimental model routes."
  36878. },
  36879. {
  36880. "name": "providers",
  36881. "description": "Experimental provider routes."
  36882. },
  36883. {
  36884. "name": "integrations",
  36885. "description": "Integration discovery and authentication routes."
  36886. },
  36887. {
  36888. "name": "opencode HttpApi",
  36889. "description": "Experimental HttpApi surface for selected instance routes."
  36890. },
  36891. {
  36892. "name": "permissions",
  36893. "description": "Experimental permission routes."
  36894. },
  36895. {
  36896. "name": "filesystem",
  36897. "description": "Experimental location-scoped filesystem routes."
  36898. },
  36899. {
  36900. "name": "commands",
  36901. "description": "Experimental command routes."
  36902. },
  36903. {
  36904. "name": "skills",
  36905. "description": "Experimental skill routes."
  36906. },
  36907. {
  36908. "name": "events",
  36909. "description": "Experimental event stream route."
  36910. },
  36911. {
  36912. "name": "pty",
  36913. "description": "Experimental location-scoped PTY routes."
  36914. },
  36915. {
  36916. "name": "session questions",
  36917. "description": "Experimental session question routes."
  36918. },
  36919. {
  36920. "name": "reference",
  36921. "description": "Location-scoped project references."
  36922. },
  36923. {
  36924. "name": "projectCopy",
  36925. "description": "Project copy management routes."
  36926. },
  36927. {
  36928. "name": "pty",
  36929. "description": "PTY websocket route."
  36930. }
  36931. ]
  36932. }