openapi.json 1.0 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/capabilities": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.capabilities.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Experimental capabilities",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ExperimentalCapabilities"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. }
  856. },
  857. "description": "Get experimental features enabled on the OpenCode server.",
  858. "summary": "Get experimental capabilities",
  859. "x-codeSamples": [
  860. {
  861. "lang": "js",
  862. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.capabilities.get({\n ...\n})"
  863. }
  864. ]
  865. }
  866. },
  867. "/experimental/console": {
  868. "get": {
  869. "tags": ["experimental"],
  870. "operationId": "experimental.console.get",
  871. "parameters": [
  872. {
  873. "name": "directory",
  874. "in": "query",
  875. "schema": {
  876. "type": "string"
  877. },
  878. "required": false
  879. },
  880. {
  881. "name": "workspace",
  882. "in": "query",
  883. "schema": {
  884. "type": "string"
  885. },
  886. "required": false
  887. }
  888. ],
  889. "responses": {
  890. "200": {
  891. "description": "Active Console provider metadata",
  892. "content": {
  893. "application/json": {
  894. "schema": {
  895. "$ref": "#/components/schemas/ConsoleState"
  896. }
  897. }
  898. }
  899. },
  900. "400": {
  901. "description": "Bad request",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "$ref": "#/components/schemas/BadRequestError"
  906. }
  907. }
  908. }
  909. },
  910. "500": {
  911. "description": "InternalServerError",
  912. "content": {
  913. "application/json": {
  914. "schema": {
  915. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  916. }
  917. }
  918. }
  919. }
  920. },
  921. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  922. "summary": "Get active Console provider metadata",
  923. "x-codeSamples": [
  924. {
  925. "lang": "js",
  926. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  927. }
  928. ]
  929. }
  930. },
  931. "/experimental/console/orgs": {
  932. "get": {
  933. "tags": ["experimental"],
  934. "operationId": "experimental.console.listOrgs",
  935. "parameters": [
  936. {
  937. "name": "directory",
  938. "in": "query",
  939. "schema": {
  940. "type": "string"
  941. },
  942. "required": false
  943. },
  944. {
  945. "name": "workspace",
  946. "in": "query",
  947. "schema": {
  948. "type": "string"
  949. },
  950. "required": false
  951. }
  952. ],
  953. "responses": {
  954. "200": {
  955. "description": "Switchable Console orgs",
  956. "content": {
  957. "application/json": {
  958. "schema": {
  959. "type": "object",
  960. "properties": {
  961. "orgs": {
  962. "type": "array",
  963. "items": {
  964. "type": "object",
  965. "properties": {
  966. "accountID": {
  967. "type": "string"
  968. },
  969. "accountEmail": {
  970. "type": "string"
  971. },
  972. "accountUrl": {
  973. "type": "string"
  974. },
  975. "orgID": {
  976. "type": "string"
  977. },
  978. "orgName": {
  979. "type": "string"
  980. },
  981. "active": {
  982. "type": "boolean"
  983. }
  984. },
  985. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  986. "additionalProperties": false
  987. }
  988. }
  989. },
  990. "required": ["orgs"],
  991. "additionalProperties": false,
  992. "description": "Switchable Console orgs"
  993. }
  994. }
  995. }
  996. },
  997. "400": {
  998. "description": "Bad request",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "$ref": "#/components/schemas/BadRequestError"
  1003. }
  1004. }
  1005. }
  1006. },
  1007. "500": {
  1008. "description": "InternalServerError",
  1009. "content": {
  1010. "application/json": {
  1011. "schema": {
  1012. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  1013. }
  1014. }
  1015. }
  1016. }
  1017. },
  1018. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  1019. "summary": "List switchable Console orgs",
  1020. "x-codeSamples": [
  1021. {
  1022. "lang": "js",
  1023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  1024. }
  1025. ]
  1026. }
  1027. },
  1028. "/experimental/console/switch": {
  1029. "post": {
  1030. "tags": ["experimental"],
  1031. "operationId": "experimental.console.switchOrg",
  1032. "parameters": [
  1033. {
  1034. "name": "directory",
  1035. "in": "query",
  1036. "schema": {
  1037. "type": "string"
  1038. },
  1039. "required": false
  1040. },
  1041. {
  1042. "name": "workspace",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. }
  1049. ],
  1050. "responses": {
  1051. "200": {
  1052. "description": "Switch success",
  1053. "content": {
  1054. "application/json": {
  1055. "schema": {
  1056. "type": "boolean",
  1057. "description": "Switch success"
  1058. }
  1059. }
  1060. }
  1061. }
  1062. },
  1063. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1064. "summary": "Switch active Console org",
  1065. "requestBody": {
  1066. "content": {
  1067. "application/json": {
  1068. "schema": {
  1069. "type": "object",
  1070. "properties": {
  1071. "accountID": {
  1072. "type": "string"
  1073. },
  1074. "orgID": {
  1075. "type": "string"
  1076. }
  1077. },
  1078. "required": ["accountID", "orgID"],
  1079. "additionalProperties": false
  1080. }
  1081. }
  1082. }
  1083. },
  1084. "x-codeSamples": [
  1085. {
  1086. "lang": "js",
  1087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1088. }
  1089. ]
  1090. }
  1091. },
  1092. "/experimental/tool": {
  1093. "get": {
  1094. "tags": ["experimental"],
  1095. "operationId": "tool.list",
  1096. "parameters": [
  1097. {
  1098. "name": "directory",
  1099. "in": "query",
  1100. "schema": {
  1101. "type": "string"
  1102. },
  1103. "required": false
  1104. },
  1105. {
  1106. "name": "workspace",
  1107. "in": "query",
  1108. "schema": {
  1109. "type": "string"
  1110. },
  1111. "required": false
  1112. },
  1113. {
  1114. "name": "provider",
  1115. "in": "query",
  1116. "schema": {
  1117. "type": "string"
  1118. },
  1119. "required": true
  1120. },
  1121. {
  1122. "name": "model",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": true
  1128. }
  1129. ],
  1130. "responses": {
  1131. "200": {
  1132. "description": "Tools",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/ToolList"
  1137. }
  1138. }
  1139. }
  1140. },
  1141. "400": {
  1142. "description": "BadRequest | InvalidRequestError",
  1143. "content": {
  1144. "application/json": {
  1145. "schema": {
  1146. "anyOf": [
  1147. {
  1148. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1149. },
  1150. {
  1151. "$ref": "#/components/schemas/InvalidRequestError"
  1152. }
  1153. ]
  1154. }
  1155. }
  1156. }
  1157. }
  1158. },
  1159. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1160. "summary": "List tools",
  1161. "x-codeSamples": [
  1162. {
  1163. "lang": "js",
  1164. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1165. }
  1166. ]
  1167. }
  1168. },
  1169. "/experimental/tool/ids": {
  1170. "get": {
  1171. "tags": ["experimental"],
  1172. "operationId": "tool.ids",
  1173. "parameters": [
  1174. {
  1175. "name": "directory",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. },
  1182. {
  1183. "name": "workspace",
  1184. "in": "query",
  1185. "schema": {
  1186. "type": "string"
  1187. },
  1188. "required": false
  1189. }
  1190. ],
  1191. "responses": {
  1192. "200": {
  1193. "description": "Tool IDs",
  1194. "content": {
  1195. "application/json": {
  1196. "schema": {
  1197. "$ref": "#/components/schemas/ToolIDs"
  1198. }
  1199. }
  1200. }
  1201. },
  1202. "400": {
  1203. "description": "BadRequest | InvalidRequestError",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "anyOf": [
  1208. {
  1209. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1210. },
  1211. {
  1212. "$ref": "#/components/schemas/InvalidRequestError"
  1213. }
  1214. ]
  1215. }
  1216. }
  1217. }
  1218. }
  1219. },
  1220. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1221. "summary": "List tool IDs",
  1222. "x-codeSamples": [
  1223. {
  1224. "lang": "js",
  1225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1226. }
  1227. ]
  1228. }
  1229. },
  1230. "/experimental/worktree": {
  1231. "get": {
  1232. "tags": ["experimental"],
  1233. "operationId": "worktree.list",
  1234. "parameters": [
  1235. {
  1236. "name": "directory",
  1237. "in": "query",
  1238. "schema": {
  1239. "type": "string"
  1240. },
  1241. "required": false
  1242. },
  1243. {
  1244. "name": "workspace",
  1245. "in": "query",
  1246. "schema": {
  1247. "type": "string"
  1248. },
  1249. "required": false
  1250. }
  1251. ],
  1252. "responses": {
  1253. "200": {
  1254. "description": "List of worktree directories",
  1255. "content": {
  1256. "application/json": {
  1257. "schema": {
  1258. "type": "array",
  1259. "items": {
  1260. "type": "string"
  1261. },
  1262. "description": "List of worktree directories"
  1263. }
  1264. }
  1265. }
  1266. },
  1267. "400": {
  1268. "description": "WorktreeError | InvalidRequestError",
  1269. "content": {
  1270. "application/json": {
  1271. "schema": {
  1272. "anyOf": [
  1273. {
  1274. "$ref": "#/components/schemas/WorktreeError"
  1275. },
  1276. {
  1277. "$ref": "#/components/schemas/InvalidRequestError"
  1278. }
  1279. ]
  1280. }
  1281. }
  1282. }
  1283. }
  1284. },
  1285. "description": "List all sandbox worktrees for the current project.",
  1286. "summary": "List worktrees",
  1287. "x-codeSamples": [
  1288. {
  1289. "lang": "js",
  1290. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1291. }
  1292. ]
  1293. },
  1294. "post": {
  1295. "tags": ["experimental"],
  1296. "operationId": "worktree.create",
  1297. "parameters": [
  1298. {
  1299. "name": "directory",
  1300. "in": "query",
  1301. "schema": {
  1302. "type": "string"
  1303. },
  1304. "required": false
  1305. },
  1306. {
  1307. "name": "workspace",
  1308. "in": "query",
  1309. "schema": {
  1310. "type": "string"
  1311. },
  1312. "required": false
  1313. }
  1314. ],
  1315. "responses": {
  1316. "200": {
  1317. "description": "Worktree created",
  1318. "content": {
  1319. "application/json": {
  1320. "schema": {
  1321. "$ref": "#/components/schemas/Worktree"
  1322. }
  1323. }
  1324. }
  1325. },
  1326. "400": {
  1327. "description": "WorktreeError | InvalidRequestError",
  1328. "content": {
  1329. "application/json": {
  1330. "schema": {
  1331. "anyOf": [
  1332. {
  1333. "$ref": "#/components/schemas/WorktreeError"
  1334. },
  1335. {
  1336. "$ref": "#/components/schemas/InvalidRequestError"
  1337. }
  1338. ]
  1339. }
  1340. }
  1341. }
  1342. }
  1343. },
  1344. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1345. "summary": "Create worktree",
  1346. "requestBody": {
  1347. "content": {
  1348. "application/json": {
  1349. "schema": {
  1350. "$ref": "#/components/schemas/WorktreeCreateInput"
  1351. }
  1352. }
  1353. }
  1354. },
  1355. "x-codeSamples": [
  1356. {
  1357. "lang": "js",
  1358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1359. }
  1360. ]
  1361. },
  1362. "delete": {
  1363. "tags": ["experimental"],
  1364. "operationId": "worktree.remove",
  1365. "parameters": [
  1366. {
  1367. "name": "directory",
  1368. "in": "query",
  1369. "schema": {
  1370. "type": "string"
  1371. },
  1372. "required": false
  1373. },
  1374. {
  1375. "name": "workspace",
  1376. "in": "query",
  1377. "schema": {
  1378. "type": "string"
  1379. },
  1380. "required": false
  1381. }
  1382. ],
  1383. "responses": {
  1384. "200": {
  1385. "description": "Worktree removed",
  1386. "content": {
  1387. "application/json": {
  1388. "schema": {
  1389. "type": "boolean",
  1390. "description": "Worktree removed"
  1391. }
  1392. }
  1393. }
  1394. },
  1395. "400": {
  1396. "description": "WorktreeError | InvalidRequestError",
  1397. "content": {
  1398. "application/json": {
  1399. "schema": {
  1400. "anyOf": [
  1401. {
  1402. "$ref": "#/components/schemas/WorktreeError"
  1403. },
  1404. {
  1405. "$ref": "#/components/schemas/InvalidRequestError"
  1406. }
  1407. ]
  1408. }
  1409. }
  1410. }
  1411. }
  1412. },
  1413. "description": "Remove a git worktree and delete its branch.",
  1414. "summary": "Remove worktree",
  1415. "requestBody": {
  1416. "content": {
  1417. "application/json": {
  1418. "schema": {
  1419. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1420. }
  1421. }
  1422. }
  1423. },
  1424. "x-codeSamples": [
  1425. {
  1426. "lang": "js",
  1427. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1428. }
  1429. ]
  1430. }
  1431. },
  1432. "/experimental/worktree/reset": {
  1433. "post": {
  1434. "tags": ["experimental"],
  1435. "operationId": "worktree.reset",
  1436. "parameters": [
  1437. {
  1438. "name": "directory",
  1439. "in": "query",
  1440. "schema": {
  1441. "type": "string"
  1442. },
  1443. "required": false
  1444. },
  1445. {
  1446. "name": "workspace",
  1447. "in": "query",
  1448. "schema": {
  1449. "type": "string"
  1450. },
  1451. "required": false
  1452. }
  1453. ],
  1454. "responses": {
  1455. "200": {
  1456. "description": "Worktree reset",
  1457. "content": {
  1458. "application/json": {
  1459. "schema": {
  1460. "type": "boolean",
  1461. "description": "Worktree reset"
  1462. }
  1463. }
  1464. }
  1465. },
  1466. "400": {
  1467. "description": "WorktreeError | InvalidRequestError",
  1468. "content": {
  1469. "application/json": {
  1470. "schema": {
  1471. "anyOf": [
  1472. {
  1473. "$ref": "#/components/schemas/WorktreeError"
  1474. },
  1475. {
  1476. "$ref": "#/components/schemas/InvalidRequestError"
  1477. }
  1478. ]
  1479. }
  1480. }
  1481. }
  1482. }
  1483. },
  1484. "description": "Reset a worktree branch to the primary default branch.",
  1485. "summary": "Reset worktree",
  1486. "requestBody": {
  1487. "content": {
  1488. "application/json": {
  1489. "schema": {
  1490. "$ref": "#/components/schemas/WorktreeResetInput"
  1491. }
  1492. }
  1493. }
  1494. },
  1495. "x-codeSamples": [
  1496. {
  1497. "lang": "js",
  1498. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1499. }
  1500. ]
  1501. }
  1502. },
  1503. "/experimental/session": {
  1504. "get": {
  1505. "tags": ["experimental"],
  1506. "operationId": "experimental.session.list",
  1507. "parameters": [
  1508. {
  1509. "name": "directory",
  1510. "in": "query",
  1511. "schema": {
  1512. "type": "string"
  1513. },
  1514. "required": false
  1515. },
  1516. {
  1517. "name": "workspace",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "roots",
  1526. "in": "query",
  1527. "schema": {
  1528. "anyOf": [
  1529. {
  1530. "type": "boolean"
  1531. },
  1532. {
  1533. "type": "string",
  1534. "enum": ["true", "false"]
  1535. }
  1536. ]
  1537. },
  1538. "required": false
  1539. },
  1540. {
  1541. "name": "start",
  1542. "in": "query",
  1543. "schema": {
  1544. "type": "number"
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "cursor",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "number"
  1553. },
  1554. "required": false
  1555. },
  1556. {
  1557. "name": "search",
  1558. "in": "query",
  1559. "schema": {
  1560. "type": "string"
  1561. },
  1562. "required": false
  1563. },
  1564. {
  1565. "name": "limit",
  1566. "in": "query",
  1567. "schema": {
  1568. "type": "number"
  1569. },
  1570. "required": false
  1571. },
  1572. {
  1573. "name": "archived",
  1574. "in": "query",
  1575. "schema": {
  1576. "anyOf": [
  1577. {
  1578. "type": "boolean"
  1579. },
  1580. {
  1581. "type": "string",
  1582. "enum": ["true", "false"]
  1583. }
  1584. ]
  1585. },
  1586. "required": false
  1587. }
  1588. ],
  1589. "responses": {
  1590. "200": {
  1591. "description": "List of sessions",
  1592. "content": {
  1593. "application/json": {
  1594. "schema": {
  1595. "type": "array",
  1596. "items": {
  1597. "$ref": "#/components/schemas/GlobalSession"
  1598. },
  1599. "description": "List of sessions"
  1600. }
  1601. }
  1602. }
  1603. },
  1604. "400": {
  1605. "description": "Bad request",
  1606. "content": {
  1607. "application/json": {
  1608. "schema": {
  1609. "$ref": "#/components/schemas/BadRequestError"
  1610. }
  1611. }
  1612. }
  1613. }
  1614. },
  1615. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1616. "summary": "List sessions",
  1617. "x-codeSamples": [
  1618. {
  1619. "lang": "js",
  1620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1621. }
  1622. ]
  1623. }
  1624. },
  1625. "/experimental/session/{sessionID}/background": {
  1626. "post": {
  1627. "tags": ["experimental"],
  1628. "operationId": "experimental.session.background",
  1629. "parameters": [
  1630. {
  1631. "name": "sessionID",
  1632. "in": "path",
  1633. "schema": {
  1634. "type": "string",
  1635. "pattern": "^ses"
  1636. },
  1637. "required": true
  1638. },
  1639. {
  1640. "name": "directory",
  1641. "in": "query",
  1642. "schema": {
  1643. "type": "string"
  1644. },
  1645. "required": false
  1646. },
  1647. {
  1648. "name": "workspace",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. }
  1655. ],
  1656. "responses": {
  1657. "200": {
  1658. "description": "Backgrounded subagents",
  1659. "content": {
  1660. "application/json": {
  1661. "schema": {
  1662. "type": "boolean",
  1663. "description": "Backgrounded subagents"
  1664. }
  1665. }
  1666. }
  1667. },
  1668. "400": {
  1669. "description": "BadRequest | InvalidRequestError",
  1670. "content": {
  1671. "application/json": {
  1672. "schema": {
  1673. "anyOf": [
  1674. {
  1675. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1676. },
  1677. {
  1678. "$ref": "#/components/schemas/InvalidRequestError"
  1679. }
  1680. ]
  1681. }
  1682. }
  1683. }
  1684. }
  1685. },
  1686. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1687. "summary": "Background subagents",
  1688. "x-codeSamples": [
  1689. {
  1690. "lang": "js",
  1691. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1692. }
  1693. ]
  1694. }
  1695. },
  1696. "/experimental/resource": {
  1697. "get": {
  1698. "tags": ["experimental"],
  1699. "operationId": "experimental.resource.list",
  1700. "parameters": [
  1701. {
  1702. "name": "directory",
  1703. "in": "query",
  1704. "schema": {
  1705. "type": "string"
  1706. },
  1707. "required": false
  1708. },
  1709. {
  1710. "name": "workspace",
  1711. "in": "query",
  1712. "schema": {
  1713. "type": "string"
  1714. },
  1715. "required": false
  1716. }
  1717. ],
  1718. "responses": {
  1719. "200": {
  1720. "description": "MCP resources",
  1721. "content": {
  1722. "application/json": {
  1723. "schema": {
  1724. "type": "object",
  1725. "additionalProperties": {
  1726. "$ref": "#/components/schemas/McpResource"
  1727. },
  1728. "description": "MCP resources"
  1729. }
  1730. }
  1731. }
  1732. },
  1733. "400": {
  1734. "description": "Bad request",
  1735. "content": {
  1736. "application/json": {
  1737. "schema": {
  1738. "$ref": "#/components/schemas/BadRequestError"
  1739. }
  1740. }
  1741. }
  1742. }
  1743. },
  1744. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1745. "summary": "Get MCP resources",
  1746. "x-codeSamples": [
  1747. {
  1748. "lang": "js",
  1749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1750. }
  1751. ]
  1752. }
  1753. },
  1754. "/find": {
  1755. "get": {
  1756. "tags": ["file"],
  1757. "operationId": "find.text",
  1758. "parameters": [
  1759. {
  1760. "name": "directory",
  1761. "in": "query",
  1762. "schema": {
  1763. "type": "string"
  1764. },
  1765. "required": false
  1766. },
  1767. {
  1768. "name": "workspace",
  1769. "in": "query",
  1770. "schema": {
  1771. "type": "string"
  1772. },
  1773. "required": false
  1774. },
  1775. {
  1776. "name": "pattern",
  1777. "in": "query",
  1778. "schema": {
  1779. "type": "string"
  1780. },
  1781. "required": true
  1782. }
  1783. ],
  1784. "responses": {
  1785. "200": {
  1786. "description": "Matches",
  1787. "content": {
  1788. "application/json": {
  1789. "schema": {
  1790. "type": "array",
  1791. "items": {
  1792. "type": "object",
  1793. "properties": {
  1794. "path": {
  1795. "type": "object",
  1796. "properties": {
  1797. "text": {
  1798. "type": "string"
  1799. }
  1800. },
  1801. "required": ["text"],
  1802. "additionalProperties": false
  1803. },
  1804. "lines": {
  1805. "type": "object",
  1806. "properties": {
  1807. "text": {
  1808. "type": "string"
  1809. }
  1810. },
  1811. "required": ["text"],
  1812. "additionalProperties": false
  1813. },
  1814. "line_number": {
  1815. "type": "integer",
  1816. "minimum": 0
  1817. },
  1818. "absolute_offset": {
  1819. "type": "integer",
  1820. "minimum": 0
  1821. },
  1822. "submatches": {
  1823. "type": "array",
  1824. "items": {
  1825. "type": "object",
  1826. "properties": {
  1827. "match": {
  1828. "type": "object",
  1829. "properties": {
  1830. "text": {
  1831. "type": "string"
  1832. }
  1833. },
  1834. "required": ["text"],
  1835. "additionalProperties": false
  1836. },
  1837. "start": {
  1838. "type": "integer",
  1839. "minimum": 0
  1840. },
  1841. "end": {
  1842. "type": "integer",
  1843. "minimum": 0
  1844. }
  1845. },
  1846. "required": ["match", "start", "end"],
  1847. "additionalProperties": false
  1848. }
  1849. }
  1850. },
  1851. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1852. "additionalProperties": false
  1853. },
  1854. "description": "Matches"
  1855. }
  1856. }
  1857. }
  1858. },
  1859. "400": {
  1860. "description": "Bad request",
  1861. "content": {
  1862. "application/json": {
  1863. "schema": {
  1864. "$ref": "#/components/schemas/BadRequestError"
  1865. }
  1866. }
  1867. }
  1868. }
  1869. },
  1870. "description": "Search for text patterns across files in the project using ripgrep.",
  1871. "summary": "Find text",
  1872. "x-codeSamples": [
  1873. {
  1874. "lang": "js",
  1875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1876. }
  1877. ]
  1878. }
  1879. },
  1880. "/find/file": {
  1881. "get": {
  1882. "tags": ["file"],
  1883. "operationId": "find.files",
  1884. "parameters": [
  1885. {
  1886. "name": "directory",
  1887. "in": "query",
  1888. "schema": {
  1889. "type": "string"
  1890. },
  1891. "required": false
  1892. },
  1893. {
  1894. "name": "workspace",
  1895. "in": "query",
  1896. "schema": {
  1897. "type": "string"
  1898. },
  1899. "required": false
  1900. },
  1901. {
  1902. "name": "query",
  1903. "in": "query",
  1904. "schema": {
  1905. "type": "string"
  1906. },
  1907. "required": true
  1908. },
  1909. {
  1910. "name": "dirs",
  1911. "in": "query",
  1912. "schema": {
  1913. "type": "string",
  1914. "enum": ["true", "false"]
  1915. },
  1916. "required": false
  1917. },
  1918. {
  1919. "name": "type",
  1920. "in": "query",
  1921. "schema": {
  1922. "type": "string",
  1923. "enum": ["file", "directory"]
  1924. },
  1925. "required": false
  1926. },
  1927. {
  1928. "name": "limit",
  1929. "in": "query",
  1930. "schema": {
  1931. "type": "integer",
  1932. "minimum": 1,
  1933. "maximum": 200
  1934. },
  1935. "required": false
  1936. }
  1937. ],
  1938. "responses": {
  1939. "200": {
  1940. "description": "File paths",
  1941. "content": {
  1942. "application/json": {
  1943. "schema": {
  1944. "type": "array",
  1945. "items": {
  1946. "type": "string"
  1947. },
  1948. "description": "File paths"
  1949. }
  1950. }
  1951. }
  1952. },
  1953. "400": {
  1954. "description": "Bad request",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "$ref": "#/components/schemas/BadRequestError"
  1959. }
  1960. }
  1961. }
  1962. }
  1963. },
  1964. "description": "Search for files or directories by name or pattern in the project directory.",
  1965. "summary": "Find files",
  1966. "x-codeSamples": [
  1967. {
  1968. "lang": "js",
  1969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1970. }
  1971. ]
  1972. }
  1973. },
  1974. "/find/symbol": {
  1975. "get": {
  1976. "tags": ["file"],
  1977. "operationId": "find.symbols",
  1978. "parameters": [
  1979. {
  1980. "name": "directory",
  1981. "in": "query",
  1982. "schema": {
  1983. "type": "string"
  1984. },
  1985. "required": false
  1986. },
  1987. {
  1988. "name": "workspace",
  1989. "in": "query",
  1990. "schema": {
  1991. "type": "string"
  1992. },
  1993. "required": false
  1994. },
  1995. {
  1996. "name": "query",
  1997. "in": "query",
  1998. "schema": {
  1999. "type": "string"
  2000. },
  2001. "required": true
  2002. }
  2003. ],
  2004. "responses": {
  2005. "200": {
  2006. "description": "Symbols",
  2007. "content": {
  2008. "application/json": {
  2009. "schema": {
  2010. "type": "array",
  2011. "items": {
  2012. "$ref": "#/components/schemas/Symbol"
  2013. },
  2014. "description": "Symbols"
  2015. }
  2016. }
  2017. }
  2018. },
  2019. "400": {
  2020. "description": "Bad request",
  2021. "content": {
  2022. "application/json": {
  2023. "schema": {
  2024. "$ref": "#/components/schemas/BadRequestError"
  2025. }
  2026. }
  2027. }
  2028. }
  2029. },
  2030. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  2031. "summary": "Find symbols",
  2032. "x-codeSamples": [
  2033. {
  2034. "lang": "js",
  2035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  2036. }
  2037. ]
  2038. }
  2039. },
  2040. "/file": {
  2041. "get": {
  2042. "tags": ["file"],
  2043. "operationId": "file.list",
  2044. "parameters": [
  2045. {
  2046. "name": "directory",
  2047. "in": "query",
  2048. "schema": {
  2049. "type": "string"
  2050. },
  2051. "required": false
  2052. },
  2053. {
  2054. "name": "workspace",
  2055. "in": "query",
  2056. "schema": {
  2057. "type": "string"
  2058. },
  2059. "required": false
  2060. },
  2061. {
  2062. "name": "path",
  2063. "in": "query",
  2064. "schema": {
  2065. "type": "string"
  2066. },
  2067. "required": true
  2068. }
  2069. ],
  2070. "responses": {
  2071. "200": {
  2072. "description": "Files and directories",
  2073. "content": {
  2074. "application/json": {
  2075. "schema": {
  2076. "type": "array",
  2077. "items": {
  2078. "$ref": "#/components/schemas/FileNode"
  2079. },
  2080. "description": "Files and directories"
  2081. }
  2082. }
  2083. }
  2084. },
  2085. "400": {
  2086. "description": "Bad request",
  2087. "content": {
  2088. "application/json": {
  2089. "schema": {
  2090. "$ref": "#/components/schemas/BadRequestError"
  2091. }
  2092. }
  2093. }
  2094. }
  2095. },
  2096. "description": "List files and directories in a specified path.",
  2097. "summary": "List files",
  2098. "x-codeSamples": [
  2099. {
  2100. "lang": "js",
  2101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2102. }
  2103. ]
  2104. }
  2105. },
  2106. "/file/content": {
  2107. "get": {
  2108. "tags": ["file"],
  2109. "operationId": "file.read",
  2110. "parameters": [
  2111. {
  2112. "name": "directory",
  2113. "in": "query",
  2114. "schema": {
  2115. "type": "string"
  2116. },
  2117. "required": false
  2118. },
  2119. {
  2120. "name": "workspace",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "path",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": true
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File content",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "$ref": "#/components/schemas/FileContent"
  2143. }
  2144. }
  2145. }
  2146. },
  2147. "400": {
  2148. "description": "Bad request",
  2149. "content": {
  2150. "application/json": {
  2151. "schema": {
  2152. "$ref": "#/components/schemas/BadRequestError"
  2153. }
  2154. }
  2155. }
  2156. }
  2157. },
  2158. "description": "Read the content of a specified file.",
  2159. "summary": "Read file",
  2160. "x-codeSamples": [
  2161. {
  2162. "lang": "js",
  2163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2164. }
  2165. ]
  2166. }
  2167. },
  2168. "/file/status": {
  2169. "get": {
  2170. "tags": ["file"],
  2171. "operationId": "file.status",
  2172. "parameters": [
  2173. {
  2174. "name": "directory",
  2175. "in": "query",
  2176. "schema": {
  2177. "type": "string"
  2178. },
  2179. "required": false
  2180. },
  2181. {
  2182. "name": "workspace",
  2183. "in": "query",
  2184. "schema": {
  2185. "type": "string"
  2186. },
  2187. "required": false
  2188. }
  2189. ],
  2190. "responses": {
  2191. "200": {
  2192. "description": "File status",
  2193. "content": {
  2194. "application/json": {
  2195. "schema": {
  2196. "type": "array",
  2197. "items": {
  2198. "$ref": "#/components/schemas/File"
  2199. },
  2200. "description": "File status"
  2201. }
  2202. }
  2203. }
  2204. },
  2205. "400": {
  2206. "description": "Bad request",
  2207. "content": {
  2208. "application/json": {
  2209. "schema": {
  2210. "$ref": "#/components/schemas/BadRequestError"
  2211. }
  2212. }
  2213. }
  2214. }
  2215. },
  2216. "description": "Get the git status of all files in the project.",
  2217. "summary": "Get file status",
  2218. "x-codeSamples": [
  2219. {
  2220. "lang": "js",
  2221. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2222. }
  2223. ]
  2224. }
  2225. },
  2226. "/instance/dispose": {
  2227. "post": {
  2228. "tags": ["instance"],
  2229. "operationId": "instance.dispose",
  2230. "parameters": [
  2231. {
  2232. "name": "directory",
  2233. "in": "query",
  2234. "schema": {
  2235. "type": "string"
  2236. },
  2237. "required": false
  2238. },
  2239. {
  2240. "name": "workspace",
  2241. "in": "query",
  2242. "schema": {
  2243. "type": "string"
  2244. },
  2245. "required": false
  2246. }
  2247. ],
  2248. "responses": {
  2249. "200": {
  2250. "description": "Instance disposed",
  2251. "content": {
  2252. "application/json": {
  2253. "schema": {
  2254. "type": "boolean",
  2255. "description": "Instance disposed"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2272. "summary": "Dispose instance",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/path": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "path.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "Path",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/Path"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2326. "summary": "Get paths",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.get",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS info",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "$ref": "#/components/schemas/VcsInfo"
  2364. }
  2365. }
  2366. }
  2367. },
  2368. "400": {
  2369. "description": "Bad request",
  2370. "content": {
  2371. "application/json": {
  2372. "schema": {
  2373. "$ref": "#/components/schemas/BadRequestError"
  2374. }
  2375. }
  2376. }
  2377. }
  2378. },
  2379. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2380. "summary": "Get VCS info",
  2381. "x-codeSamples": [
  2382. {
  2383. "lang": "js",
  2384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2385. }
  2386. ]
  2387. }
  2388. },
  2389. "/vcs/status": {
  2390. "get": {
  2391. "tags": ["instance"],
  2392. "operationId": "vcs.status",
  2393. "parameters": [
  2394. {
  2395. "name": "directory",
  2396. "in": "query",
  2397. "schema": {
  2398. "type": "string"
  2399. },
  2400. "required": false
  2401. },
  2402. {
  2403. "name": "workspace",
  2404. "in": "query",
  2405. "schema": {
  2406. "type": "string"
  2407. },
  2408. "required": false
  2409. }
  2410. ],
  2411. "responses": {
  2412. "200": {
  2413. "description": "VCS status",
  2414. "content": {
  2415. "application/json": {
  2416. "schema": {
  2417. "type": "array",
  2418. "items": {
  2419. "$ref": "#/components/schemas/VcsFileStatus"
  2420. },
  2421. "description": "VCS status"
  2422. }
  2423. }
  2424. }
  2425. },
  2426. "400": {
  2427. "description": "Bad request",
  2428. "content": {
  2429. "application/json": {
  2430. "schema": {
  2431. "$ref": "#/components/schemas/BadRequestError"
  2432. }
  2433. }
  2434. }
  2435. }
  2436. },
  2437. "description": "Retrieve changed files in the current working tree without patches.",
  2438. "summary": "Get VCS status",
  2439. "x-codeSamples": [
  2440. {
  2441. "lang": "js",
  2442. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2443. }
  2444. ]
  2445. }
  2446. },
  2447. "/vcs/diff": {
  2448. "get": {
  2449. "tags": ["instance"],
  2450. "operationId": "vcs.diff",
  2451. "parameters": [
  2452. {
  2453. "name": "directory",
  2454. "in": "query",
  2455. "schema": {
  2456. "type": "string"
  2457. },
  2458. "required": false
  2459. },
  2460. {
  2461. "name": "workspace",
  2462. "in": "query",
  2463. "schema": {
  2464. "type": "string"
  2465. },
  2466. "required": false
  2467. },
  2468. {
  2469. "name": "mode",
  2470. "in": "query",
  2471. "schema": {
  2472. "type": "string",
  2473. "enum": ["git", "branch"]
  2474. },
  2475. "required": true
  2476. },
  2477. {
  2478. "name": "context",
  2479. "in": "query",
  2480. "schema": {
  2481. "type": "integer",
  2482. "minimum": 0
  2483. },
  2484. "required": false
  2485. }
  2486. ],
  2487. "responses": {
  2488. "200": {
  2489. "description": "VCS diff",
  2490. "content": {
  2491. "application/json": {
  2492. "schema": {
  2493. "type": "array",
  2494. "items": {
  2495. "$ref": "#/components/schemas/VcsFileDiff"
  2496. },
  2497. "description": "VCS diff"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2514. "summary": "Get VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/diff/raw": {
  2524. "get": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.diff.raw",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "Raw VCS diff",
  2548. "content": {
  2549. "text/x-diff; charset=utf-8": {
  2550. "schema": {
  2551. "type": "string"
  2552. }
  2553. }
  2554. }
  2555. },
  2556. "400": {
  2557. "description": "Bad request",
  2558. "content": {
  2559. "application/json": {
  2560. "schema": {
  2561. "$ref": "#/components/schemas/BadRequestError"
  2562. }
  2563. }
  2564. }
  2565. }
  2566. },
  2567. "description": "Retrieve a raw patch for current uncommitted changes.",
  2568. "summary": "Get raw VCS diff",
  2569. "x-codeSamples": [
  2570. {
  2571. "lang": "js",
  2572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2573. }
  2574. ]
  2575. }
  2576. },
  2577. "/vcs/apply": {
  2578. "post": {
  2579. "tags": ["instance"],
  2580. "operationId": "vcs.apply",
  2581. "parameters": [
  2582. {
  2583. "name": "directory",
  2584. "in": "query",
  2585. "schema": {
  2586. "type": "string"
  2587. },
  2588. "required": false
  2589. },
  2590. {
  2591. "name": "workspace",
  2592. "in": "query",
  2593. "schema": {
  2594. "type": "string"
  2595. },
  2596. "required": false
  2597. }
  2598. ],
  2599. "responses": {
  2600. "200": {
  2601. "description": "VCS patch applied",
  2602. "content": {
  2603. "application/json": {
  2604. "schema": {
  2605. "type": "object",
  2606. "properties": {
  2607. "applied": {
  2608. "type": "boolean"
  2609. }
  2610. },
  2611. "required": ["applied"],
  2612. "additionalProperties": false,
  2613. "description": "VCS patch applied"
  2614. }
  2615. }
  2616. }
  2617. },
  2618. "400": {
  2619. "description": "VcsApplyError | InvalidRequestError",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "anyOf": [
  2624. {
  2625. "$ref": "#/components/schemas/VcsApplyError"
  2626. },
  2627. {
  2628. "$ref": "#/components/schemas/InvalidRequestError"
  2629. }
  2630. ]
  2631. }
  2632. }
  2633. }
  2634. }
  2635. },
  2636. "description": "Apply a raw patch to the current working tree.",
  2637. "summary": "Apply VCS patch",
  2638. "requestBody": {
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "type": "object",
  2643. "properties": {
  2644. "patch": {
  2645. "type": "string"
  2646. }
  2647. },
  2648. "required": ["patch"],
  2649. "additionalProperties": false
  2650. }
  2651. }
  2652. }
  2653. },
  2654. "x-codeSamples": [
  2655. {
  2656. "lang": "js",
  2657. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2658. }
  2659. ]
  2660. }
  2661. },
  2662. "/command": {
  2663. "get": {
  2664. "tags": ["instance"],
  2665. "operationId": "command.list",
  2666. "parameters": [
  2667. {
  2668. "name": "directory",
  2669. "in": "query",
  2670. "schema": {
  2671. "type": "string"
  2672. },
  2673. "required": false
  2674. },
  2675. {
  2676. "name": "workspace",
  2677. "in": "query",
  2678. "schema": {
  2679. "type": "string"
  2680. },
  2681. "required": false
  2682. }
  2683. ],
  2684. "responses": {
  2685. "200": {
  2686. "description": "List of commands",
  2687. "content": {
  2688. "application/json": {
  2689. "schema": {
  2690. "type": "array",
  2691. "items": {
  2692. "$ref": "#/components/schemas/Command"
  2693. },
  2694. "description": "List of commands"
  2695. }
  2696. }
  2697. }
  2698. },
  2699. "400": {
  2700. "description": "Bad request",
  2701. "content": {
  2702. "application/json": {
  2703. "schema": {
  2704. "$ref": "#/components/schemas/BadRequestError"
  2705. }
  2706. }
  2707. }
  2708. }
  2709. },
  2710. "description": "Get a list of all available commands in the OpenCode system.",
  2711. "summary": "List commands",
  2712. "x-codeSamples": [
  2713. {
  2714. "lang": "js",
  2715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2716. }
  2717. ]
  2718. }
  2719. },
  2720. "/agent": {
  2721. "get": {
  2722. "tags": ["instance"],
  2723. "operationId": "app.agents",
  2724. "parameters": [
  2725. {
  2726. "name": "directory",
  2727. "in": "query",
  2728. "schema": {
  2729. "type": "string"
  2730. },
  2731. "required": false
  2732. },
  2733. {
  2734. "name": "workspace",
  2735. "in": "query",
  2736. "schema": {
  2737. "type": "string"
  2738. },
  2739. "required": false
  2740. }
  2741. ],
  2742. "responses": {
  2743. "200": {
  2744. "description": "List of agents",
  2745. "content": {
  2746. "application/json": {
  2747. "schema": {
  2748. "type": "array",
  2749. "items": {
  2750. "$ref": "#/components/schemas/Agent"
  2751. },
  2752. "description": "List of agents"
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "400": {
  2758. "description": "Bad request",
  2759. "content": {
  2760. "application/json": {
  2761. "schema": {
  2762. "$ref": "#/components/schemas/BadRequestError"
  2763. }
  2764. }
  2765. }
  2766. }
  2767. },
  2768. "description": "Get a list of all available AI agents in the OpenCode system.",
  2769. "summary": "List agents",
  2770. "x-codeSamples": [
  2771. {
  2772. "lang": "js",
  2773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2774. }
  2775. ]
  2776. }
  2777. },
  2778. "/skill": {
  2779. "get": {
  2780. "tags": ["instance"],
  2781. "operationId": "app.skills",
  2782. "parameters": [
  2783. {
  2784. "name": "directory",
  2785. "in": "query",
  2786. "schema": {
  2787. "type": "string"
  2788. },
  2789. "required": false
  2790. },
  2791. {
  2792. "name": "workspace",
  2793. "in": "query",
  2794. "schema": {
  2795. "type": "string"
  2796. },
  2797. "required": false
  2798. }
  2799. ],
  2800. "responses": {
  2801. "200": {
  2802. "description": "List of skills",
  2803. "content": {
  2804. "application/json": {
  2805. "schema": {
  2806. "type": "array",
  2807. "items": {
  2808. "type": "object",
  2809. "properties": {
  2810. "name": {
  2811. "type": "string"
  2812. },
  2813. "description": {
  2814. "type": "string"
  2815. },
  2816. "location": {
  2817. "type": "string"
  2818. },
  2819. "content": {
  2820. "type": "string"
  2821. }
  2822. },
  2823. "required": ["name", "location", "content"],
  2824. "additionalProperties": false
  2825. },
  2826. "description": "List of skills"
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "400": {
  2832. "description": "Bad request",
  2833. "content": {
  2834. "application/json": {
  2835. "schema": {
  2836. "$ref": "#/components/schemas/BadRequestError"
  2837. }
  2838. }
  2839. }
  2840. }
  2841. },
  2842. "description": "Get a list of all available skills in the OpenCode system.",
  2843. "summary": "List skills",
  2844. "x-codeSamples": [
  2845. {
  2846. "lang": "js",
  2847. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2848. }
  2849. ]
  2850. }
  2851. },
  2852. "/lsp": {
  2853. "get": {
  2854. "tags": ["instance"],
  2855. "operationId": "lsp.status",
  2856. "parameters": [
  2857. {
  2858. "name": "directory",
  2859. "in": "query",
  2860. "schema": {
  2861. "type": "string"
  2862. },
  2863. "required": false
  2864. },
  2865. {
  2866. "name": "workspace",
  2867. "in": "query",
  2868. "schema": {
  2869. "type": "string"
  2870. },
  2871. "required": false
  2872. }
  2873. ],
  2874. "responses": {
  2875. "200": {
  2876. "description": "LSP server status",
  2877. "content": {
  2878. "application/json": {
  2879. "schema": {
  2880. "type": "array",
  2881. "items": {
  2882. "$ref": "#/components/schemas/LSPStatus"
  2883. },
  2884. "description": "LSP server status"
  2885. }
  2886. }
  2887. }
  2888. },
  2889. "400": {
  2890. "description": "Bad request",
  2891. "content": {
  2892. "application/json": {
  2893. "schema": {
  2894. "$ref": "#/components/schemas/BadRequestError"
  2895. }
  2896. }
  2897. }
  2898. }
  2899. },
  2900. "description": "Get LSP server status",
  2901. "summary": "Get LSP status",
  2902. "x-codeSamples": [
  2903. {
  2904. "lang": "js",
  2905. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2906. }
  2907. ]
  2908. }
  2909. },
  2910. "/formatter": {
  2911. "get": {
  2912. "tags": ["instance"],
  2913. "operationId": "formatter.status",
  2914. "parameters": [
  2915. {
  2916. "name": "directory",
  2917. "in": "query",
  2918. "schema": {
  2919. "type": "string"
  2920. },
  2921. "required": false
  2922. },
  2923. {
  2924. "name": "workspace",
  2925. "in": "query",
  2926. "schema": {
  2927. "type": "string"
  2928. },
  2929. "required": false
  2930. }
  2931. ],
  2932. "responses": {
  2933. "200": {
  2934. "description": "Formatter status",
  2935. "content": {
  2936. "application/json": {
  2937. "schema": {
  2938. "type": "array",
  2939. "items": {
  2940. "$ref": "#/components/schemas/FormatterStatus"
  2941. },
  2942. "description": "Formatter status"
  2943. }
  2944. }
  2945. }
  2946. },
  2947. "400": {
  2948. "description": "Bad request",
  2949. "content": {
  2950. "application/json": {
  2951. "schema": {
  2952. "$ref": "#/components/schemas/BadRequestError"
  2953. }
  2954. }
  2955. }
  2956. }
  2957. },
  2958. "description": "Get formatter status",
  2959. "summary": "Get formatter status",
  2960. "x-codeSamples": [
  2961. {
  2962. "lang": "js",
  2963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2964. }
  2965. ]
  2966. }
  2967. },
  2968. "/mcp": {
  2969. "get": {
  2970. "tags": ["mcp"],
  2971. "operationId": "mcp.status",
  2972. "parameters": [
  2973. {
  2974. "name": "directory",
  2975. "in": "query",
  2976. "schema": {
  2977. "type": "string"
  2978. },
  2979. "required": false
  2980. },
  2981. {
  2982. "name": "workspace",
  2983. "in": "query",
  2984. "schema": {
  2985. "type": "string"
  2986. },
  2987. "required": false
  2988. }
  2989. ],
  2990. "responses": {
  2991. "200": {
  2992. "description": "MCP server status",
  2993. "content": {
  2994. "application/json": {
  2995. "schema": {
  2996. "type": "object",
  2997. "additionalProperties": {
  2998. "$ref": "#/components/schemas/MCPStatus"
  2999. },
  3000. "description": "MCP server status"
  3001. }
  3002. }
  3003. }
  3004. },
  3005. "400": {
  3006. "description": "Bad request",
  3007. "content": {
  3008. "application/json": {
  3009. "schema": {
  3010. "$ref": "#/components/schemas/BadRequestError"
  3011. }
  3012. }
  3013. }
  3014. }
  3015. },
  3016. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  3017. "summary": "Get MCP status",
  3018. "x-codeSamples": [
  3019. {
  3020. "lang": "js",
  3021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  3022. }
  3023. ]
  3024. },
  3025. "post": {
  3026. "tags": ["mcp"],
  3027. "operationId": "mcp.add",
  3028. "parameters": [
  3029. {
  3030. "name": "directory",
  3031. "in": "query",
  3032. "schema": {
  3033. "type": "string"
  3034. },
  3035. "required": false
  3036. },
  3037. {
  3038. "name": "workspace",
  3039. "in": "query",
  3040. "schema": {
  3041. "type": "string"
  3042. },
  3043. "required": false
  3044. }
  3045. ],
  3046. "responses": {
  3047. "200": {
  3048. "description": "MCP server added successfully",
  3049. "content": {
  3050. "application/json": {
  3051. "schema": {
  3052. "type": "object",
  3053. "additionalProperties": {
  3054. "$ref": "#/components/schemas/MCPStatus"
  3055. },
  3056. "description": "MCP server added successfully"
  3057. }
  3058. }
  3059. }
  3060. },
  3061. "400": {
  3062. "description": "BadRequest | InvalidRequestError",
  3063. "content": {
  3064. "application/json": {
  3065. "schema": {
  3066. "anyOf": [
  3067. {
  3068. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3069. },
  3070. {
  3071. "$ref": "#/components/schemas/InvalidRequestError"
  3072. }
  3073. ]
  3074. }
  3075. }
  3076. }
  3077. }
  3078. },
  3079. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3080. "summary": "Add MCP server",
  3081. "requestBody": {
  3082. "content": {
  3083. "application/json": {
  3084. "schema": {
  3085. "type": "object",
  3086. "properties": {
  3087. "name": {
  3088. "type": "string"
  3089. },
  3090. "config": {
  3091. "anyOf": [
  3092. {
  3093. "$ref": "#/components/schemas/McpLocalConfig"
  3094. },
  3095. {
  3096. "$ref": "#/components/schemas/McpRemoteConfig"
  3097. }
  3098. ]
  3099. }
  3100. },
  3101. "required": ["name", "config"],
  3102. "additionalProperties": false
  3103. }
  3104. }
  3105. }
  3106. },
  3107. "x-codeSamples": [
  3108. {
  3109. "lang": "js",
  3110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3111. }
  3112. ]
  3113. }
  3114. },
  3115. "/mcp/{name}/auth": {
  3116. "post": {
  3117. "tags": ["mcp"],
  3118. "operationId": "mcp.auth.start",
  3119. "parameters": [
  3120. {
  3121. "name": "name",
  3122. "in": "path",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": true
  3127. },
  3128. {
  3129. "name": "directory",
  3130. "in": "query",
  3131. "schema": {
  3132. "type": "string"
  3133. },
  3134. "required": false
  3135. },
  3136. {
  3137. "name": "workspace",
  3138. "in": "query",
  3139. "schema": {
  3140. "type": "string"
  3141. },
  3142. "required": false
  3143. }
  3144. ],
  3145. "responses": {
  3146. "200": {
  3147. "description": "OAuth flow started",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "type": "object",
  3152. "properties": {
  3153. "authorizationUrl": {
  3154. "type": "string"
  3155. },
  3156. "oauthState": {
  3157. "type": "string"
  3158. }
  3159. },
  3160. "required": ["authorizationUrl", "oauthState"],
  3161. "additionalProperties": false,
  3162. "description": "OAuth flow started"
  3163. }
  3164. }
  3165. }
  3166. },
  3167. "400": {
  3168. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3169. "content": {
  3170. "application/json": {
  3171. "schema": {
  3172. "anyOf": [
  3173. {
  3174. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3175. },
  3176. {
  3177. "$ref": "#/components/schemas/InvalidRequestError"
  3178. }
  3179. ]
  3180. }
  3181. }
  3182. }
  3183. },
  3184. "404": {
  3185. "description": "McpServerNotFoundError",
  3186. "content": {
  3187. "application/json": {
  3188. "schema": {
  3189. "$ref": "#/components/schemas/McpServerNotFoundError"
  3190. }
  3191. }
  3192. }
  3193. }
  3194. },
  3195. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3196. "summary": "Start MCP OAuth",
  3197. "x-codeSamples": [
  3198. {
  3199. "lang": "js",
  3200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3201. }
  3202. ]
  3203. },
  3204. "delete": {
  3205. "tags": ["mcp"],
  3206. "operationId": "mcp.auth.remove",
  3207. "parameters": [
  3208. {
  3209. "name": "name",
  3210. "in": "path",
  3211. "schema": {
  3212. "type": "string"
  3213. },
  3214. "required": true
  3215. },
  3216. {
  3217. "name": "directory",
  3218. "in": "query",
  3219. "schema": {
  3220. "type": "string"
  3221. },
  3222. "required": false
  3223. },
  3224. {
  3225. "name": "workspace",
  3226. "in": "query",
  3227. "schema": {
  3228. "type": "string"
  3229. },
  3230. "required": false
  3231. }
  3232. ],
  3233. "responses": {
  3234. "200": {
  3235. "description": "OAuth credentials removed",
  3236. "content": {
  3237. "application/json": {
  3238. "schema": {
  3239. "type": "object",
  3240. "properties": {
  3241. "success": {
  3242. "type": "boolean",
  3243. "enum": [true]
  3244. }
  3245. },
  3246. "required": ["success"],
  3247. "additionalProperties": false,
  3248. "description": "OAuth credentials removed"
  3249. }
  3250. }
  3251. }
  3252. },
  3253. "400": {
  3254. "description": "Bad request",
  3255. "content": {
  3256. "application/json": {
  3257. "schema": {
  3258. "$ref": "#/components/schemas/BadRequestError"
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "404": {
  3264. "description": "McpServerNotFoundError",
  3265. "content": {
  3266. "application/json": {
  3267. "schema": {
  3268. "$ref": "#/components/schemas/McpServerNotFoundError"
  3269. }
  3270. }
  3271. }
  3272. }
  3273. },
  3274. "description": "Remove OAuth credentials for an MCP server.",
  3275. "summary": "Remove MCP OAuth",
  3276. "x-codeSamples": [
  3277. {
  3278. "lang": "js",
  3279. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3280. }
  3281. ]
  3282. }
  3283. },
  3284. "/mcp/{name}/auth/callback": {
  3285. "post": {
  3286. "tags": ["mcp"],
  3287. "operationId": "mcp.auth.callback",
  3288. "parameters": [
  3289. {
  3290. "name": "name",
  3291. "in": "path",
  3292. "schema": {
  3293. "type": "string"
  3294. },
  3295. "required": true
  3296. },
  3297. {
  3298. "name": "directory",
  3299. "in": "query",
  3300. "schema": {
  3301. "type": "string"
  3302. },
  3303. "required": false
  3304. },
  3305. {
  3306. "name": "workspace",
  3307. "in": "query",
  3308. "schema": {
  3309. "type": "string"
  3310. },
  3311. "required": false
  3312. }
  3313. ],
  3314. "responses": {
  3315. "200": {
  3316. "description": "OAuth authentication completed",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/MCPStatus"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "400": {
  3326. "description": "BadRequest | InvalidRequestError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "anyOf": [
  3331. {
  3332. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3333. },
  3334. {
  3335. "$ref": "#/components/schemas/InvalidRequestError"
  3336. }
  3337. ]
  3338. }
  3339. }
  3340. }
  3341. },
  3342. "404": {
  3343. "description": "McpServerNotFoundError",
  3344. "content": {
  3345. "application/json": {
  3346. "schema": {
  3347. "$ref": "#/components/schemas/McpServerNotFoundError"
  3348. }
  3349. }
  3350. }
  3351. }
  3352. },
  3353. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3354. "summary": "Complete MCP OAuth",
  3355. "requestBody": {
  3356. "content": {
  3357. "application/json": {
  3358. "schema": {
  3359. "type": "object",
  3360. "properties": {
  3361. "code": {
  3362. "type": "string"
  3363. }
  3364. },
  3365. "required": ["code"],
  3366. "additionalProperties": false
  3367. }
  3368. }
  3369. }
  3370. },
  3371. "x-codeSamples": [
  3372. {
  3373. "lang": "js",
  3374. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3375. }
  3376. ]
  3377. }
  3378. },
  3379. "/mcp/{name}/auth/authenticate": {
  3380. "post": {
  3381. "tags": ["mcp"],
  3382. "operationId": "mcp.auth.authenticate",
  3383. "parameters": [
  3384. {
  3385. "name": "name",
  3386. "in": "path",
  3387. "schema": {
  3388. "type": "string"
  3389. },
  3390. "required": true
  3391. },
  3392. {
  3393. "name": "directory",
  3394. "in": "query",
  3395. "schema": {
  3396. "type": "string"
  3397. },
  3398. "required": false
  3399. },
  3400. {
  3401. "name": "workspace",
  3402. "in": "query",
  3403. "schema": {
  3404. "type": "string"
  3405. },
  3406. "required": false
  3407. }
  3408. ],
  3409. "responses": {
  3410. "200": {
  3411. "description": "OAuth authentication completed",
  3412. "content": {
  3413. "application/json": {
  3414. "schema": {
  3415. "$ref": "#/components/schemas/MCPStatus"
  3416. }
  3417. }
  3418. }
  3419. },
  3420. "400": {
  3421. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3422. "content": {
  3423. "application/json": {
  3424. "schema": {
  3425. "anyOf": [
  3426. {
  3427. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3428. },
  3429. {
  3430. "$ref": "#/components/schemas/InvalidRequestError"
  3431. }
  3432. ]
  3433. }
  3434. }
  3435. }
  3436. },
  3437. "404": {
  3438. "description": "McpServerNotFoundError",
  3439. "content": {
  3440. "application/json": {
  3441. "schema": {
  3442. "$ref": "#/components/schemas/McpServerNotFoundError"
  3443. }
  3444. }
  3445. }
  3446. }
  3447. },
  3448. "description": "Start OAuth flow and wait for callback (opens browser).",
  3449. "summary": "Authenticate MCP OAuth",
  3450. "x-codeSamples": [
  3451. {
  3452. "lang": "js",
  3453. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3454. }
  3455. ]
  3456. }
  3457. },
  3458. "/mcp/{name}/connect": {
  3459. "post": {
  3460. "tags": ["mcp"],
  3461. "operationId": "mcp.connect",
  3462. "parameters": [
  3463. {
  3464. "name": "name",
  3465. "in": "path",
  3466. "schema": {
  3467. "type": "string"
  3468. },
  3469. "required": true
  3470. },
  3471. {
  3472. "name": "directory",
  3473. "in": "query",
  3474. "schema": {
  3475. "type": "string"
  3476. },
  3477. "required": false
  3478. },
  3479. {
  3480. "name": "workspace",
  3481. "in": "query",
  3482. "schema": {
  3483. "type": "string"
  3484. },
  3485. "required": false
  3486. }
  3487. ],
  3488. "responses": {
  3489. "200": {
  3490. "description": "MCP server connected successfully",
  3491. "content": {
  3492. "application/json": {
  3493. "schema": {
  3494. "type": "boolean",
  3495. "description": "MCP server connected successfully"
  3496. }
  3497. }
  3498. }
  3499. },
  3500. "400": {
  3501. "description": "Bad request",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "$ref": "#/components/schemas/BadRequestError"
  3506. }
  3507. }
  3508. }
  3509. },
  3510. "404": {
  3511. "description": "McpServerNotFoundError",
  3512. "content": {
  3513. "application/json": {
  3514. "schema": {
  3515. "$ref": "#/components/schemas/McpServerNotFoundError"
  3516. }
  3517. }
  3518. }
  3519. }
  3520. },
  3521. "description": "Connect an MCP server.",
  3522. "x-codeSamples": [
  3523. {
  3524. "lang": "js",
  3525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3526. }
  3527. ]
  3528. }
  3529. },
  3530. "/mcp/{name}/disconnect": {
  3531. "post": {
  3532. "tags": ["mcp"],
  3533. "operationId": "mcp.disconnect",
  3534. "parameters": [
  3535. {
  3536. "name": "name",
  3537. "in": "path",
  3538. "schema": {
  3539. "type": "string"
  3540. },
  3541. "required": true
  3542. },
  3543. {
  3544. "name": "directory",
  3545. "in": "query",
  3546. "schema": {
  3547. "type": "string"
  3548. },
  3549. "required": false
  3550. },
  3551. {
  3552. "name": "workspace",
  3553. "in": "query",
  3554. "schema": {
  3555. "type": "string"
  3556. },
  3557. "required": false
  3558. }
  3559. ],
  3560. "responses": {
  3561. "200": {
  3562. "description": "MCP server disconnected successfully",
  3563. "content": {
  3564. "application/json": {
  3565. "schema": {
  3566. "type": "boolean",
  3567. "description": "MCP server disconnected successfully"
  3568. }
  3569. }
  3570. }
  3571. },
  3572. "400": {
  3573. "description": "Bad request",
  3574. "content": {
  3575. "application/json": {
  3576. "schema": {
  3577. "$ref": "#/components/schemas/BadRequestError"
  3578. }
  3579. }
  3580. }
  3581. },
  3582. "404": {
  3583. "description": "McpServerNotFoundError",
  3584. "content": {
  3585. "application/json": {
  3586. "schema": {
  3587. "$ref": "#/components/schemas/McpServerNotFoundError"
  3588. }
  3589. }
  3590. }
  3591. }
  3592. },
  3593. "description": "Disconnect an MCP server.",
  3594. "x-codeSamples": [
  3595. {
  3596. "lang": "js",
  3597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3598. }
  3599. ]
  3600. }
  3601. },
  3602. "/project": {
  3603. "get": {
  3604. "tags": ["project"],
  3605. "operationId": "project.list",
  3606. "parameters": [
  3607. {
  3608. "name": "directory",
  3609. "in": "query",
  3610. "schema": {
  3611. "type": "string"
  3612. },
  3613. "required": false
  3614. },
  3615. {
  3616. "name": "workspace",
  3617. "in": "query",
  3618. "schema": {
  3619. "type": "string"
  3620. },
  3621. "required": false
  3622. }
  3623. ],
  3624. "responses": {
  3625. "200": {
  3626. "description": "List of projects",
  3627. "content": {
  3628. "application/json": {
  3629. "schema": {
  3630. "type": "array",
  3631. "items": {
  3632. "$ref": "#/components/schemas/Project"
  3633. },
  3634. "description": "List of projects"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Get a list of projects that have been opened with OpenCode.",
  3651. "summary": "List all projects",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/current": {
  3661. "get": {
  3662. "tags": ["project"],
  3663. "operationId": "project.current",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Current project information",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Retrieve the currently active project that OpenCode is working with.",
  3705. "summary": "Get current project",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/git/init": {
  3715. "post": {
  3716. "tags": ["project"],
  3717. "operationId": "project.initGit",
  3718. "parameters": [
  3719. {
  3720. "name": "directory",
  3721. "in": "query",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": false
  3726. },
  3727. {
  3728. "name": "workspace",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. }
  3735. ],
  3736. "responses": {
  3737. "200": {
  3738. "description": "Project information after git initialization",
  3739. "content": {
  3740. "application/json": {
  3741. "schema": {
  3742. "$ref": "#/components/schemas/Project"
  3743. }
  3744. }
  3745. }
  3746. },
  3747. "400": {
  3748. "description": "Bad request",
  3749. "content": {
  3750. "application/json": {
  3751. "schema": {
  3752. "$ref": "#/components/schemas/BadRequestError"
  3753. }
  3754. }
  3755. }
  3756. }
  3757. },
  3758. "description": "Create a git repository for the current project and return the refreshed project info.",
  3759. "summary": "Initialize git repository",
  3760. "x-codeSamples": [
  3761. {
  3762. "lang": "js",
  3763. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3764. }
  3765. ]
  3766. }
  3767. },
  3768. "/project/{projectID}": {
  3769. "patch": {
  3770. "tags": ["project"],
  3771. "operationId": "project.update",
  3772. "parameters": [
  3773. {
  3774. "name": "projectID",
  3775. "in": "path",
  3776. "schema": {
  3777. "type": "string"
  3778. },
  3779. "required": true
  3780. },
  3781. {
  3782. "name": "directory",
  3783. "in": "query",
  3784. "schema": {
  3785. "type": "string"
  3786. },
  3787. "required": false
  3788. },
  3789. {
  3790. "name": "workspace",
  3791. "in": "query",
  3792. "schema": {
  3793. "type": "string"
  3794. },
  3795. "required": false
  3796. }
  3797. ],
  3798. "responses": {
  3799. "200": {
  3800. "description": "Updated project information",
  3801. "content": {
  3802. "application/json": {
  3803. "schema": {
  3804. "$ref": "#/components/schemas/Project"
  3805. }
  3806. }
  3807. }
  3808. },
  3809. "400": {
  3810. "description": "BadRequest | InvalidRequestError",
  3811. "content": {
  3812. "application/json": {
  3813. "schema": {
  3814. "anyOf": [
  3815. {
  3816. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3817. },
  3818. {
  3819. "$ref": "#/components/schemas/InvalidRequestError"
  3820. }
  3821. ]
  3822. }
  3823. }
  3824. }
  3825. },
  3826. "404": {
  3827. "description": "ProjectNotFoundError",
  3828. "content": {
  3829. "application/json": {
  3830. "schema": {
  3831. "$ref": "#/components/schemas/ProjectNotFoundError"
  3832. }
  3833. }
  3834. }
  3835. }
  3836. },
  3837. "description": "Update project properties such as name, icon, and commands.",
  3838. "summary": "Update project",
  3839. "requestBody": {
  3840. "content": {
  3841. "application/json": {
  3842. "schema": {
  3843. "type": "object",
  3844. "properties": {
  3845. "name": {
  3846. "type": "string"
  3847. },
  3848. "icon": {
  3849. "$ref": "#/components/schemas/ProjectIcon"
  3850. },
  3851. "commands": {
  3852. "$ref": "#/components/schemas/ProjectCommands"
  3853. }
  3854. },
  3855. "additionalProperties": false
  3856. }
  3857. }
  3858. }
  3859. },
  3860. "x-codeSamples": [
  3861. {
  3862. "lang": "js",
  3863. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3864. }
  3865. ]
  3866. }
  3867. },
  3868. "/project/{projectID}/directories": {
  3869. "get": {
  3870. "tags": ["project"],
  3871. "operationId": "project.directories",
  3872. "parameters": [
  3873. {
  3874. "name": "projectID",
  3875. "in": "path",
  3876. "schema": {
  3877. "type": "string"
  3878. },
  3879. "required": true
  3880. },
  3881. {
  3882. "name": "directory",
  3883. "in": "query",
  3884. "schema": {
  3885. "type": "string"
  3886. },
  3887. "required": false
  3888. },
  3889. {
  3890. "name": "workspace",
  3891. "in": "query",
  3892. "schema": {
  3893. "type": "string"
  3894. },
  3895. "required": false
  3896. }
  3897. ],
  3898. "responses": {
  3899. "200": {
  3900. "description": "Project directories",
  3901. "content": {
  3902. "application/json": {
  3903. "schema": {
  3904. "$ref": "#/components/schemas/ProjectDirectories"
  3905. }
  3906. }
  3907. }
  3908. },
  3909. "400": {
  3910. "description": "Bad request",
  3911. "content": {
  3912. "application/json": {
  3913. "schema": {
  3914. "$ref": "#/components/schemas/BadRequestError"
  3915. }
  3916. }
  3917. }
  3918. }
  3919. },
  3920. "description": "List known local absolute directories for a project.",
  3921. "summary": "List project directories",
  3922. "x-codeSamples": [
  3923. {
  3924. "lang": "js",
  3925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3926. }
  3927. ]
  3928. }
  3929. },
  3930. "/experimental/project/{projectID}/copy/generate-name": {
  3931. "post": {
  3932. "tags": ["projectCopy"],
  3933. "operationId": "experimental.projectCopy.generateName",
  3934. "parameters": [
  3935. {
  3936. "name": "projectID",
  3937. "in": "path",
  3938. "schema": {
  3939. "type": "string"
  3940. },
  3941. "required": true
  3942. },
  3943. {
  3944. "name": "directory",
  3945. "in": "query",
  3946. "schema": {
  3947. "type": "string"
  3948. },
  3949. "required": false
  3950. },
  3951. {
  3952. "name": "workspace",
  3953. "in": "query",
  3954. "schema": {
  3955. "type": "string"
  3956. },
  3957. "required": false
  3958. }
  3959. ],
  3960. "responses": {
  3961. "200": {
  3962. "description": "Success",
  3963. "content": {
  3964. "application/json": {
  3965. "schema": {
  3966. "type": "object",
  3967. "properties": {
  3968. "name": {
  3969. "type": "string"
  3970. }
  3971. },
  3972. "required": ["name"],
  3973. "additionalProperties": false
  3974. }
  3975. }
  3976. }
  3977. },
  3978. "400": {
  3979. "description": "Bad request",
  3980. "content": {
  3981. "application/json": {
  3982. "schema": {
  3983. "$ref": "#/components/schemas/BadRequestError"
  3984. }
  3985. }
  3986. }
  3987. }
  3988. },
  3989. "description": "Generate a short name for a project copy from task context.",
  3990. "summary": "Generate project copy name",
  3991. "requestBody": {
  3992. "content": {
  3993. "application/json": {
  3994. "schema": {
  3995. "type": "object",
  3996. "properties": {
  3997. "context": {
  3998. "type": "string"
  3999. }
  4000. },
  4001. "additionalProperties": false
  4002. }
  4003. }
  4004. }
  4005. },
  4006. "x-codeSamples": [
  4007. {
  4008. "lang": "js",
  4009. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"
  4010. }
  4011. ]
  4012. }
  4013. },
  4014. "/pty/shells": {
  4015. "get": {
  4016. "tags": ["pty"],
  4017. "operationId": "pty.shells",
  4018. "parameters": [
  4019. {
  4020. "name": "directory",
  4021. "in": "query",
  4022. "schema": {
  4023. "type": "string"
  4024. },
  4025. "required": false
  4026. },
  4027. {
  4028. "name": "workspace",
  4029. "in": "query",
  4030. "schema": {
  4031. "type": "string"
  4032. },
  4033. "required": false
  4034. }
  4035. ],
  4036. "responses": {
  4037. "200": {
  4038. "description": "List of shells",
  4039. "content": {
  4040. "application/json": {
  4041. "schema": {
  4042. "type": "array",
  4043. "items": {
  4044. "type": "object",
  4045. "properties": {
  4046. "path": {
  4047. "type": "string"
  4048. },
  4049. "name": {
  4050. "type": "string"
  4051. },
  4052. "acceptable": {
  4053. "type": "boolean"
  4054. }
  4055. },
  4056. "required": ["path", "name", "acceptable"],
  4057. "additionalProperties": false
  4058. },
  4059. "description": "List of shells"
  4060. }
  4061. }
  4062. }
  4063. },
  4064. "400": {
  4065. "description": "Bad request",
  4066. "content": {
  4067. "application/json": {
  4068. "schema": {
  4069. "$ref": "#/components/schemas/BadRequestError"
  4070. }
  4071. }
  4072. }
  4073. }
  4074. },
  4075. "description": "Get a list of available shells on the system.",
  4076. "summary": "List available shells",
  4077. "x-codeSamples": [
  4078. {
  4079. "lang": "js",
  4080. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4081. }
  4082. ]
  4083. }
  4084. },
  4085. "/pty": {
  4086. "get": {
  4087. "tags": ["pty"],
  4088. "operationId": "pty.list",
  4089. "parameters": [
  4090. {
  4091. "name": "directory",
  4092. "in": "query",
  4093. "schema": {
  4094. "type": "string"
  4095. },
  4096. "required": false
  4097. },
  4098. {
  4099. "name": "workspace",
  4100. "in": "query",
  4101. "schema": {
  4102. "type": "string"
  4103. },
  4104. "required": false
  4105. }
  4106. ],
  4107. "responses": {
  4108. "200": {
  4109. "description": "List of sessions",
  4110. "content": {
  4111. "application/json": {
  4112. "schema": {
  4113. "type": "array",
  4114. "items": {
  4115. "$ref": "#/components/schemas/Pty"
  4116. },
  4117. "description": "List of sessions"
  4118. }
  4119. }
  4120. }
  4121. },
  4122. "400": {
  4123. "description": "Bad request",
  4124. "content": {
  4125. "application/json": {
  4126. "schema": {
  4127. "$ref": "#/components/schemas/BadRequestError"
  4128. }
  4129. }
  4130. }
  4131. }
  4132. },
  4133. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4134. "summary": "List PTY sessions",
  4135. "x-codeSamples": [
  4136. {
  4137. "lang": "js",
  4138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4139. }
  4140. ]
  4141. },
  4142. "post": {
  4143. "tags": ["pty"],
  4144. "operationId": "pty.create",
  4145. "parameters": [
  4146. {
  4147. "name": "directory",
  4148. "in": "query",
  4149. "schema": {
  4150. "type": "string"
  4151. },
  4152. "required": false
  4153. },
  4154. {
  4155. "name": "workspace",
  4156. "in": "query",
  4157. "schema": {
  4158. "type": "string"
  4159. },
  4160. "required": false
  4161. }
  4162. ],
  4163. "responses": {
  4164. "200": {
  4165. "description": "Created session",
  4166. "content": {
  4167. "application/json": {
  4168. "schema": {
  4169. "$ref": "#/components/schemas/Pty"
  4170. }
  4171. }
  4172. }
  4173. },
  4174. "400": {
  4175. "description": "BadRequest | InvalidRequestError",
  4176. "content": {
  4177. "application/json": {
  4178. "schema": {
  4179. "anyOf": [
  4180. {
  4181. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4182. },
  4183. {
  4184. "$ref": "#/components/schemas/InvalidRequestError"
  4185. }
  4186. ]
  4187. }
  4188. }
  4189. }
  4190. }
  4191. },
  4192. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4193. "summary": "Create PTY session",
  4194. "requestBody": {
  4195. "content": {
  4196. "application/json": {
  4197. "schema": {
  4198. "type": "object",
  4199. "properties": {
  4200. "command": {
  4201. "type": "string"
  4202. },
  4203. "args": {
  4204. "type": "array",
  4205. "items": {
  4206. "type": "string"
  4207. }
  4208. },
  4209. "cwd": {
  4210. "type": "string"
  4211. },
  4212. "title": {
  4213. "type": "string"
  4214. },
  4215. "env": {
  4216. "type": "object",
  4217. "additionalProperties": {
  4218. "type": "string"
  4219. }
  4220. }
  4221. },
  4222. "additionalProperties": false
  4223. }
  4224. }
  4225. }
  4226. },
  4227. "x-codeSamples": [
  4228. {
  4229. "lang": "js",
  4230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4231. }
  4232. ]
  4233. }
  4234. },
  4235. "/pty/{ptyID}": {
  4236. "get": {
  4237. "tags": ["pty"],
  4238. "operationId": "pty.get",
  4239. "parameters": [
  4240. {
  4241. "name": "ptyID",
  4242. "in": "path",
  4243. "schema": {
  4244. "type": "string",
  4245. "pattern": "^pty"
  4246. },
  4247. "required": true
  4248. },
  4249. {
  4250. "name": "directory",
  4251. "in": "query",
  4252. "schema": {
  4253. "type": "string"
  4254. },
  4255. "required": false
  4256. },
  4257. {
  4258. "name": "workspace",
  4259. "in": "query",
  4260. "schema": {
  4261. "type": "string"
  4262. },
  4263. "required": false
  4264. }
  4265. ],
  4266. "responses": {
  4267. "200": {
  4268. "description": "Session info",
  4269. "content": {
  4270. "application/json": {
  4271. "schema": {
  4272. "$ref": "#/components/schemas/Pty"
  4273. }
  4274. }
  4275. }
  4276. },
  4277. "400": {
  4278. "description": "Bad request",
  4279. "content": {
  4280. "application/json": {
  4281. "schema": {
  4282. "$ref": "#/components/schemas/BadRequestError"
  4283. }
  4284. }
  4285. }
  4286. },
  4287. "404": {
  4288. "description": "PtyNotFoundError",
  4289. "content": {
  4290. "application/json": {
  4291. "schema": {
  4292. "$ref": "#/components/schemas/PtyNotFoundError"
  4293. }
  4294. }
  4295. }
  4296. }
  4297. },
  4298. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4299. "summary": "Get PTY session",
  4300. "x-codeSamples": [
  4301. {
  4302. "lang": "js",
  4303. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4304. }
  4305. ]
  4306. },
  4307. "put": {
  4308. "tags": ["pty"],
  4309. "operationId": "pty.update",
  4310. "parameters": [
  4311. {
  4312. "name": "ptyID",
  4313. "in": "path",
  4314. "schema": {
  4315. "type": "string",
  4316. "pattern": "^pty"
  4317. },
  4318. "required": true
  4319. },
  4320. {
  4321. "name": "directory",
  4322. "in": "query",
  4323. "schema": {
  4324. "type": "string"
  4325. },
  4326. "required": false
  4327. },
  4328. {
  4329. "name": "workspace",
  4330. "in": "query",
  4331. "schema": {
  4332. "type": "string"
  4333. },
  4334. "required": false
  4335. }
  4336. ],
  4337. "responses": {
  4338. "200": {
  4339. "description": "Updated session",
  4340. "content": {
  4341. "application/json": {
  4342. "schema": {
  4343. "$ref": "#/components/schemas/Pty"
  4344. }
  4345. }
  4346. }
  4347. },
  4348. "400": {
  4349. "description": "BadRequest | InvalidRequestError",
  4350. "content": {
  4351. "application/json": {
  4352. "schema": {
  4353. "anyOf": [
  4354. {
  4355. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4356. },
  4357. {
  4358. "$ref": "#/components/schemas/InvalidRequestError"
  4359. }
  4360. ]
  4361. }
  4362. }
  4363. }
  4364. },
  4365. "404": {
  4366. "description": "PtyNotFoundError",
  4367. "content": {
  4368. "application/json": {
  4369. "schema": {
  4370. "$ref": "#/components/schemas/PtyNotFoundError"
  4371. }
  4372. }
  4373. }
  4374. }
  4375. },
  4376. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4377. "summary": "Update PTY session",
  4378. "requestBody": {
  4379. "content": {
  4380. "application/json": {
  4381. "schema": {
  4382. "type": "object",
  4383. "properties": {
  4384. "title": {
  4385. "type": "string"
  4386. },
  4387. "size": {
  4388. "type": "object",
  4389. "properties": {
  4390. "rows": {
  4391. "type": "integer",
  4392. "exclusiveMinimum": 0
  4393. },
  4394. "cols": {
  4395. "type": "integer",
  4396. "exclusiveMinimum": 0
  4397. }
  4398. },
  4399. "required": ["rows", "cols"],
  4400. "additionalProperties": false
  4401. }
  4402. },
  4403. "additionalProperties": false
  4404. }
  4405. }
  4406. }
  4407. },
  4408. "x-codeSamples": [
  4409. {
  4410. "lang": "js",
  4411. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4412. }
  4413. ]
  4414. },
  4415. "delete": {
  4416. "tags": ["pty"],
  4417. "operationId": "pty.remove",
  4418. "parameters": [
  4419. {
  4420. "name": "ptyID",
  4421. "in": "path",
  4422. "schema": {
  4423. "type": "string",
  4424. "pattern": "^pty"
  4425. },
  4426. "required": true
  4427. },
  4428. {
  4429. "name": "directory",
  4430. "in": "query",
  4431. "schema": {
  4432. "type": "string"
  4433. },
  4434. "required": false
  4435. },
  4436. {
  4437. "name": "workspace",
  4438. "in": "query",
  4439. "schema": {
  4440. "type": "string"
  4441. },
  4442. "required": false
  4443. }
  4444. ],
  4445. "responses": {
  4446. "200": {
  4447. "description": "Session removed",
  4448. "content": {
  4449. "application/json": {
  4450. "schema": {
  4451. "type": "boolean",
  4452. "description": "Session removed"
  4453. }
  4454. }
  4455. }
  4456. },
  4457. "400": {
  4458. "description": "Bad request",
  4459. "content": {
  4460. "application/json": {
  4461. "schema": {
  4462. "$ref": "#/components/schemas/BadRequestError"
  4463. }
  4464. }
  4465. }
  4466. },
  4467. "404": {
  4468. "description": "PtyNotFoundError",
  4469. "content": {
  4470. "application/json": {
  4471. "schema": {
  4472. "$ref": "#/components/schemas/PtyNotFoundError"
  4473. }
  4474. }
  4475. }
  4476. }
  4477. },
  4478. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4479. "summary": "Remove PTY session",
  4480. "x-codeSamples": [
  4481. {
  4482. "lang": "js",
  4483. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4484. }
  4485. ]
  4486. }
  4487. },
  4488. "/pty/{ptyID}/connect-token": {
  4489. "post": {
  4490. "tags": ["pty"],
  4491. "operationId": "pty.connectToken",
  4492. "parameters": [
  4493. {
  4494. "name": "ptyID",
  4495. "in": "path",
  4496. "schema": {
  4497. "type": "string",
  4498. "pattern": "^pty"
  4499. },
  4500. "required": true
  4501. },
  4502. {
  4503. "name": "directory",
  4504. "in": "query",
  4505. "schema": {
  4506. "type": "string"
  4507. },
  4508. "required": false
  4509. },
  4510. {
  4511. "name": "workspace",
  4512. "in": "query",
  4513. "schema": {
  4514. "type": "string"
  4515. },
  4516. "required": false
  4517. }
  4518. ],
  4519. "responses": {
  4520. "200": {
  4521. "description": "WebSocket connect token",
  4522. "content": {
  4523. "application/json": {
  4524. "schema": {
  4525. "$ref": "#/components/schemas/PtyTicketConnectToken"
  4526. }
  4527. }
  4528. }
  4529. },
  4530. "400": {
  4531. "description": "Bad request",
  4532. "content": {
  4533. "application/json": {
  4534. "schema": {
  4535. "$ref": "#/components/schemas/BadRequestError"
  4536. }
  4537. }
  4538. }
  4539. },
  4540. "403": {
  4541. "description": "PtyForbiddenError",
  4542. "content": {
  4543. "application/json": {
  4544. "schema": {
  4545. "$ref": "#/components/schemas/PtyForbiddenError"
  4546. }
  4547. }
  4548. }
  4549. },
  4550. "404": {
  4551. "description": "PtyNotFoundError",
  4552. "content": {
  4553. "application/json": {
  4554. "schema": {
  4555. "$ref": "#/components/schemas/PtyNotFoundError"
  4556. }
  4557. }
  4558. }
  4559. }
  4560. },
  4561. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4562. "summary": "Create PTY WebSocket token",
  4563. "x-codeSamples": [
  4564. {
  4565. "lang": "js",
  4566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4567. }
  4568. ]
  4569. }
  4570. },
  4571. "/question": {
  4572. "get": {
  4573. "tags": ["question"],
  4574. "operationId": "question.list",
  4575. "parameters": [
  4576. {
  4577. "name": "directory",
  4578. "in": "query",
  4579. "schema": {
  4580. "type": "string"
  4581. },
  4582. "required": false
  4583. },
  4584. {
  4585. "name": "workspace",
  4586. "in": "query",
  4587. "schema": {
  4588. "type": "string"
  4589. },
  4590. "required": false
  4591. }
  4592. ],
  4593. "responses": {
  4594. "200": {
  4595. "description": "List of pending questions",
  4596. "content": {
  4597. "application/json": {
  4598. "schema": {
  4599. "type": "array",
  4600. "items": {
  4601. "$ref": "#/components/schemas/QuestionRequest"
  4602. },
  4603. "description": "List of pending questions"
  4604. }
  4605. }
  4606. }
  4607. },
  4608. "400": {
  4609. "description": "Bad request",
  4610. "content": {
  4611. "application/json": {
  4612. "schema": {
  4613. "$ref": "#/components/schemas/BadRequestError"
  4614. }
  4615. }
  4616. }
  4617. }
  4618. },
  4619. "description": "Get all pending question requests across all sessions.",
  4620. "summary": "List pending questions",
  4621. "x-codeSamples": [
  4622. {
  4623. "lang": "js",
  4624. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4625. }
  4626. ]
  4627. }
  4628. },
  4629. "/question/{requestID}/reply": {
  4630. "post": {
  4631. "tags": ["question"],
  4632. "operationId": "question.reply",
  4633. "parameters": [
  4634. {
  4635. "name": "requestID",
  4636. "in": "path",
  4637. "schema": {
  4638. "type": "string",
  4639. "pattern": "^que"
  4640. },
  4641. "required": true
  4642. },
  4643. {
  4644. "name": "directory",
  4645. "in": "query",
  4646. "schema": {
  4647. "type": "string"
  4648. },
  4649. "required": false
  4650. },
  4651. {
  4652. "name": "workspace",
  4653. "in": "query",
  4654. "schema": {
  4655. "type": "string"
  4656. },
  4657. "required": false
  4658. }
  4659. ],
  4660. "responses": {
  4661. "200": {
  4662. "description": "Question answered successfully",
  4663. "content": {
  4664. "application/json": {
  4665. "schema": {
  4666. "type": "boolean",
  4667. "description": "Question answered successfully"
  4668. }
  4669. }
  4670. }
  4671. },
  4672. "400": {
  4673. "description": "BadRequest | InvalidRequestError",
  4674. "content": {
  4675. "application/json": {
  4676. "schema": {
  4677. "anyOf": [
  4678. {
  4679. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4680. },
  4681. {
  4682. "$ref": "#/components/schemas/InvalidRequestError"
  4683. }
  4684. ]
  4685. }
  4686. }
  4687. }
  4688. },
  4689. "404": {
  4690. "description": "QuestionNotFoundError",
  4691. "content": {
  4692. "application/json": {
  4693. "schema": {
  4694. "$ref": "#/components/schemas/QuestionNotFoundError"
  4695. }
  4696. }
  4697. }
  4698. }
  4699. },
  4700. "description": "Provide answers to a question request from the AI assistant.",
  4701. "summary": "Reply to question request",
  4702. "requestBody": {
  4703. "content": {
  4704. "application/json": {
  4705. "schema": {
  4706. "type": "object",
  4707. "properties": {
  4708. "answers": {
  4709. "type": "array",
  4710. "items": {
  4711. "$ref": "#/components/schemas/QuestionAnswer"
  4712. },
  4713. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4714. }
  4715. },
  4716. "required": ["answers"],
  4717. "additionalProperties": false
  4718. }
  4719. }
  4720. }
  4721. },
  4722. "x-codeSamples": [
  4723. {
  4724. "lang": "js",
  4725. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4726. }
  4727. ]
  4728. }
  4729. },
  4730. "/question/{requestID}/reject": {
  4731. "post": {
  4732. "tags": ["question"],
  4733. "operationId": "question.reject",
  4734. "parameters": [
  4735. {
  4736. "name": "requestID",
  4737. "in": "path",
  4738. "schema": {
  4739. "type": "string",
  4740. "pattern": "^que"
  4741. },
  4742. "required": true
  4743. },
  4744. {
  4745. "name": "directory",
  4746. "in": "query",
  4747. "schema": {
  4748. "type": "string"
  4749. },
  4750. "required": false
  4751. },
  4752. {
  4753. "name": "workspace",
  4754. "in": "query",
  4755. "schema": {
  4756. "type": "string"
  4757. },
  4758. "required": false
  4759. }
  4760. ],
  4761. "responses": {
  4762. "200": {
  4763. "description": "Question rejected successfully",
  4764. "content": {
  4765. "application/json": {
  4766. "schema": {
  4767. "type": "boolean",
  4768. "description": "Question rejected successfully"
  4769. }
  4770. }
  4771. }
  4772. },
  4773. "400": {
  4774. "description": "BadRequest | InvalidRequestError",
  4775. "content": {
  4776. "application/json": {
  4777. "schema": {
  4778. "anyOf": [
  4779. {
  4780. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4781. },
  4782. {
  4783. "$ref": "#/components/schemas/InvalidRequestError"
  4784. }
  4785. ]
  4786. }
  4787. }
  4788. }
  4789. },
  4790. "404": {
  4791. "description": "QuestionNotFoundError",
  4792. "content": {
  4793. "application/json": {
  4794. "schema": {
  4795. "$ref": "#/components/schemas/QuestionNotFoundError"
  4796. }
  4797. }
  4798. }
  4799. }
  4800. },
  4801. "description": "Reject a question request from the AI assistant.",
  4802. "summary": "Reject question request",
  4803. "x-codeSamples": [
  4804. {
  4805. "lang": "js",
  4806. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4807. }
  4808. ]
  4809. }
  4810. },
  4811. "/permission": {
  4812. "get": {
  4813. "tags": ["permission"],
  4814. "operationId": "permission.list",
  4815. "parameters": [
  4816. {
  4817. "name": "directory",
  4818. "in": "query",
  4819. "schema": {
  4820. "type": "string"
  4821. },
  4822. "required": false
  4823. },
  4824. {
  4825. "name": "workspace",
  4826. "in": "query",
  4827. "schema": {
  4828. "type": "string"
  4829. },
  4830. "required": false
  4831. }
  4832. ],
  4833. "responses": {
  4834. "200": {
  4835. "description": "List of pending permissions",
  4836. "content": {
  4837. "application/json": {
  4838. "schema": {
  4839. "type": "array",
  4840. "items": {
  4841. "$ref": "#/components/schemas/PermissionRequest"
  4842. },
  4843. "description": "List of pending permissions"
  4844. }
  4845. }
  4846. }
  4847. },
  4848. "400": {
  4849. "description": "Bad request",
  4850. "content": {
  4851. "application/json": {
  4852. "schema": {
  4853. "$ref": "#/components/schemas/BadRequestError"
  4854. }
  4855. }
  4856. }
  4857. }
  4858. },
  4859. "description": "Get all pending permission requests across all sessions.",
  4860. "summary": "List pending permissions",
  4861. "x-codeSamples": [
  4862. {
  4863. "lang": "js",
  4864. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4865. }
  4866. ]
  4867. }
  4868. },
  4869. "/permission/{requestID}/reply": {
  4870. "post": {
  4871. "tags": ["permission"],
  4872. "operationId": "permission.reply",
  4873. "parameters": [
  4874. {
  4875. "name": "requestID",
  4876. "in": "path",
  4877. "schema": {
  4878. "type": "string",
  4879. "pattern": "^per"
  4880. },
  4881. "required": true
  4882. },
  4883. {
  4884. "name": "directory",
  4885. "in": "query",
  4886. "schema": {
  4887. "type": "string"
  4888. },
  4889. "required": false
  4890. },
  4891. {
  4892. "name": "workspace",
  4893. "in": "query",
  4894. "schema": {
  4895. "type": "string"
  4896. },
  4897. "required": false
  4898. }
  4899. ],
  4900. "responses": {
  4901. "200": {
  4902. "description": "Permission processed successfully",
  4903. "content": {
  4904. "application/json": {
  4905. "schema": {
  4906. "type": "boolean",
  4907. "description": "Permission processed successfully"
  4908. }
  4909. }
  4910. }
  4911. },
  4912. "400": {
  4913. "description": "BadRequest | InvalidRequestError",
  4914. "content": {
  4915. "application/json": {
  4916. "schema": {
  4917. "anyOf": [
  4918. {
  4919. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4920. },
  4921. {
  4922. "$ref": "#/components/schemas/InvalidRequestError"
  4923. }
  4924. ]
  4925. }
  4926. }
  4927. }
  4928. },
  4929. "404": {
  4930. "description": "PermissionNotFoundError",
  4931. "content": {
  4932. "application/json": {
  4933. "schema": {
  4934. "$ref": "#/components/schemas/PermissionNotFoundError"
  4935. }
  4936. }
  4937. }
  4938. }
  4939. },
  4940. "description": "Approve or deny a permission request from the AI assistant.",
  4941. "summary": "Respond to permission request",
  4942. "requestBody": {
  4943. "content": {
  4944. "application/json": {
  4945. "schema": {
  4946. "type": "object",
  4947. "properties": {
  4948. "reply": {
  4949. "type": "string",
  4950. "enum": ["once", "always", "reject"]
  4951. },
  4952. "message": {
  4953. "type": "string"
  4954. }
  4955. },
  4956. "required": ["reply"],
  4957. "additionalProperties": false
  4958. }
  4959. }
  4960. }
  4961. },
  4962. "x-codeSamples": [
  4963. {
  4964. "lang": "js",
  4965. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4966. }
  4967. ]
  4968. }
  4969. },
  4970. "/provider": {
  4971. "get": {
  4972. "tags": ["provider"],
  4973. "operationId": "provider.list",
  4974. "parameters": [
  4975. {
  4976. "name": "directory",
  4977. "in": "query",
  4978. "schema": {
  4979. "type": "string"
  4980. },
  4981. "required": false
  4982. },
  4983. {
  4984. "name": "workspace",
  4985. "in": "query",
  4986. "schema": {
  4987. "type": "string"
  4988. },
  4989. "required": false
  4990. }
  4991. ],
  4992. "responses": {
  4993. "200": {
  4994. "description": "List of providers",
  4995. "content": {
  4996. "application/json": {
  4997. "schema": {
  4998. "type": "object",
  4999. "properties": {
  5000. "all": {
  5001. "type": "array",
  5002. "items": {
  5003. "$ref": "#/components/schemas/Provider"
  5004. }
  5005. },
  5006. "default": {
  5007. "type": "object",
  5008. "additionalProperties": {
  5009. "type": "string"
  5010. }
  5011. },
  5012. "connected": {
  5013. "type": "array",
  5014. "items": {
  5015. "type": "string"
  5016. }
  5017. }
  5018. },
  5019. "required": ["all", "default", "connected"],
  5020. "additionalProperties": false,
  5021. "description": "List of providers"
  5022. }
  5023. }
  5024. }
  5025. },
  5026. "400": {
  5027. "description": "Bad request",
  5028. "content": {
  5029. "application/json": {
  5030. "schema": {
  5031. "$ref": "#/components/schemas/BadRequestError"
  5032. }
  5033. }
  5034. }
  5035. }
  5036. },
  5037. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5038. "summary": "List providers",
  5039. "x-codeSamples": [
  5040. {
  5041. "lang": "js",
  5042. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5043. }
  5044. ]
  5045. }
  5046. },
  5047. "/provider/auth": {
  5048. "get": {
  5049. "tags": ["provider"],
  5050. "operationId": "provider.auth",
  5051. "parameters": [
  5052. {
  5053. "name": "directory",
  5054. "in": "query",
  5055. "schema": {
  5056. "type": "string"
  5057. },
  5058. "required": false
  5059. },
  5060. {
  5061. "name": "workspace",
  5062. "in": "query",
  5063. "schema": {
  5064. "type": "string"
  5065. },
  5066. "required": false
  5067. }
  5068. ],
  5069. "responses": {
  5070. "200": {
  5071. "description": "Provider auth methods",
  5072. "content": {
  5073. "application/json": {
  5074. "schema": {
  5075. "type": "object",
  5076. "additionalProperties": {
  5077. "type": "array",
  5078. "items": {
  5079. "$ref": "#/components/schemas/ProviderAuthMethod"
  5080. }
  5081. },
  5082. "description": "Provider auth methods"
  5083. }
  5084. }
  5085. }
  5086. },
  5087. "400": {
  5088. "description": "Bad request",
  5089. "content": {
  5090. "application/json": {
  5091. "schema": {
  5092. "$ref": "#/components/schemas/BadRequestError"
  5093. }
  5094. }
  5095. }
  5096. }
  5097. },
  5098. "description": "Retrieve available authentication methods for all AI providers.",
  5099. "summary": "Get provider auth methods",
  5100. "x-codeSamples": [
  5101. {
  5102. "lang": "js",
  5103. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5104. }
  5105. ]
  5106. }
  5107. },
  5108. "/provider/{providerID}/oauth/authorize": {
  5109. "post": {
  5110. "tags": ["provider"],
  5111. "operationId": "provider.oauth.authorize",
  5112. "parameters": [
  5113. {
  5114. "name": "providerID",
  5115. "in": "path",
  5116. "schema": {
  5117. "type": "string"
  5118. },
  5119. "required": true
  5120. },
  5121. {
  5122. "name": "directory",
  5123. "in": "query",
  5124. "schema": {
  5125. "type": "string"
  5126. },
  5127. "required": false
  5128. },
  5129. {
  5130. "name": "workspace",
  5131. "in": "query",
  5132. "schema": {
  5133. "type": "string"
  5134. },
  5135. "required": false
  5136. }
  5137. ],
  5138. "responses": {
  5139. "200": {
  5140. "description": "Authorization URL and method",
  5141. "content": {
  5142. "application/json": {
  5143. "schema": {
  5144. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5145. }
  5146. }
  5147. }
  5148. },
  5149. "400": {
  5150. "description": "ProviderAuthError | InvalidRequestError",
  5151. "content": {
  5152. "application/json": {
  5153. "schema": {
  5154. "anyOf": [
  5155. {
  5156. "$ref": "#/components/schemas/ProviderAuthError1"
  5157. },
  5158. {
  5159. "$ref": "#/components/schemas/InvalidRequestError"
  5160. }
  5161. ]
  5162. }
  5163. }
  5164. }
  5165. }
  5166. },
  5167. "description": "Start the OAuth authorization flow for a provider.",
  5168. "summary": "Start OAuth authorization",
  5169. "requestBody": {
  5170. "content": {
  5171. "application/json": {
  5172. "schema": {
  5173. "type": "object",
  5174. "properties": {
  5175. "method": {
  5176. "type": "number",
  5177. "description": "Auth method index"
  5178. },
  5179. "inputs": {
  5180. "type": "object",
  5181. "additionalProperties": {
  5182. "type": "string"
  5183. }
  5184. }
  5185. },
  5186. "required": ["method"],
  5187. "additionalProperties": false
  5188. }
  5189. }
  5190. }
  5191. },
  5192. "x-codeSamples": [
  5193. {
  5194. "lang": "js",
  5195. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5196. }
  5197. ]
  5198. }
  5199. },
  5200. "/provider/{providerID}/oauth/callback": {
  5201. "post": {
  5202. "tags": ["provider"],
  5203. "operationId": "provider.oauth.callback",
  5204. "parameters": [
  5205. {
  5206. "name": "providerID",
  5207. "in": "path",
  5208. "schema": {
  5209. "type": "string"
  5210. },
  5211. "required": true
  5212. },
  5213. {
  5214. "name": "directory",
  5215. "in": "query",
  5216. "schema": {
  5217. "type": "string"
  5218. },
  5219. "required": false
  5220. },
  5221. {
  5222. "name": "workspace",
  5223. "in": "query",
  5224. "schema": {
  5225. "type": "string"
  5226. },
  5227. "required": false
  5228. }
  5229. ],
  5230. "responses": {
  5231. "200": {
  5232. "description": "OAuth callback processed successfully",
  5233. "content": {
  5234. "application/json": {
  5235. "schema": {
  5236. "type": "boolean",
  5237. "description": "OAuth callback processed successfully"
  5238. }
  5239. }
  5240. }
  5241. },
  5242. "400": {
  5243. "description": "ProviderAuthError | InvalidRequestError",
  5244. "content": {
  5245. "application/json": {
  5246. "schema": {
  5247. "anyOf": [
  5248. {
  5249. "$ref": "#/components/schemas/ProviderAuthError1"
  5250. },
  5251. {
  5252. "$ref": "#/components/schemas/InvalidRequestError"
  5253. }
  5254. ]
  5255. }
  5256. }
  5257. }
  5258. }
  5259. },
  5260. "description": "Handle the OAuth callback from a provider after user authorization.",
  5261. "summary": "Handle OAuth callback",
  5262. "requestBody": {
  5263. "content": {
  5264. "application/json": {
  5265. "schema": {
  5266. "type": "object",
  5267. "properties": {
  5268. "method": {
  5269. "type": "number",
  5270. "description": "Auth method index"
  5271. },
  5272. "code": {
  5273. "type": "string"
  5274. }
  5275. },
  5276. "required": ["method"],
  5277. "additionalProperties": false
  5278. }
  5279. }
  5280. }
  5281. },
  5282. "x-codeSamples": [
  5283. {
  5284. "lang": "js",
  5285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5286. }
  5287. ]
  5288. }
  5289. },
  5290. "/session": {
  5291. "get": {
  5292. "tags": ["session"],
  5293. "operationId": "session.list",
  5294. "parameters": [
  5295. {
  5296. "name": "directory",
  5297. "in": "query",
  5298. "schema": {
  5299. "type": "string"
  5300. },
  5301. "required": false
  5302. },
  5303. {
  5304. "name": "workspace",
  5305. "in": "query",
  5306. "schema": {
  5307. "type": "string"
  5308. },
  5309. "required": false
  5310. },
  5311. {
  5312. "name": "scope",
  5313. "in": "query",
  5314. "schema": {
  5315. "type": "string",
  5316. "enum": ["project"]
  5317. },
  5318. "required": false
  5319. },
  5320. {
  5321. "name": "path",
  5322. "in": "query",
  5323. "schema": {
  5324. "type": "string"
  5325. },
  5326. "required": false
  5327. },
  5328. {
  5329. "name": "roots",
  5330. "in": "query",
  5331. "schema": {
  5332. "anyOf": [
  5333. {
  5334. "type": "boolean"
  5335. },
  5336. {
  5337. "type": "string",
  5338. "enum": ["true", "false"]
  5339. }
  5340. ]
  5341. },
  5342. "required": false
  5343. },
  5344. {
  5345. "name": "start",
  5346. "in": "query",
  5347. "schema": {
  5348. "type": "number"
  5349. },
  5350. "required": false
  5351. },
  5352. {
  5353. "name": "search",
  5354. "in": "query",
  5355. "schema": {
  5356. "type": "string"
  5357. },
  5358. "required": false
  5359. },
  5360. {
  5361. "name": "limit",
  5362. "in": "query",
  5363. "schema": {
  5364. "type": "number"
  5365. },
  5366. "required": false
  5367. }
  5368. ],
  5369. "responses": {
  5370. "200": {
  5371. "description": "List of sessions",
  5372. "content": {
  5373. "application/json": {
  5374. "schema": {
  5375. "type": "array",
  5376. "items": {
  5377. "$ref": "#/components/schemas/Session"
  5378. },
  5379. "description": "List of sessions"
  5380. }
  5381. }
  5382. }
  5383. },
  5384. "400": {
  5385. "description": "Bad request",
  5386. "content": {
  5387. "application/json": {
  5388. "schema": {
  5389. "$ref": "#/components/schemas/BadRequestError"
  5390. }
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5396. "summary": "List sessions",
  5397. "x-codeSamples": [
  5398. {
  5399. "lang": "js",
  5400. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5401. }
  5402. ]
  5403. },
  5404. "post": {
  5405. "tags": ["session"],
  5406. "operationId": "session.create",
  5407. "parameters": [
  5408. {
  5409. "name": "directory",
  5410. "in": "query",
  5411. "schema": {
  5412. "type": "string"
  5413. },
  5414. "required": false
  5415. },
  5416. {
  5417. "name": "workspace",
  5418. "in": "query",
  5419. "schema": {
  5420. "type": "string"
  5421. },
  5422. "required": false
  5423. }
  5424. ],
  5425. "responses": {
  5426. "200": {
  5427. "description": "Successfully created session",
  5428. "content": {
  5429. "application/json": {
  5430. "schema": {
  5431. "$ref": "#/components/schemas/Session"
  5432. }
  5433. }
  5434. }
  5435. },
  5436. "400": {
  5437. "description": "BadRequest | InvalidRequestError",
  5438. "content": {
  5439. "application/json": {
  5440. "schema": {
  5441. "anyOf": [
  5442. {
  5443. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5444. },
  5445. {
  5446. "$ref": "#/components/schemas/InvalidRequestError"
  5447. }
  5448. ]
  5449. }
  5450. }
  5451. }
  5452. }
  5453. },
  5454. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5455. "summary": "Create session",
  5456. "requestBody": {
  5457. "content": {
  5458. "application/json": {
  5459. "schema": {
  5460. "type": "object",
  5461. "properties": {
  5462. "parentID": {
  5463. "type": "string",
  5464. "pattern": "^ses"
  5465. },
  5466. "title": {
  5467. "type": "string"
  5468. },
  5469. "agent": {
  5470. "type": "string"
  5471. },
  5472. "model": {
  5473. "type": "object",
  5474. "properties": {
  5475. "id": {
  5476. "type": "string"
  5477. },
  5478. "providerID": {
  5479. "type": "string"
  5480. },
  5481. "variant": {
  5482. "type": "string"
  5483. }
  5484. },
  5485. "required": ["id", "providerID"],
  5486. "additionalProperties": false
  5487. },
  5488. "metadata": {
  5489. "type": "object"
  5490. },
  5491. "permission": {
  5492. "$ref": "#/components/schemas/PermissionRuleset"
  5493. },
  5494. "workspaceID": {
  5495. "type": "string",
  5496. "pattern": "^wrk"
  5497. }
  5498. },
  5499. "additionalProperties": false
  5500. }
  5501. }
  5502. }
  5503. },
  5504. "x-codeSamples": [
  5505. {
  5506. "lang": "js",
  5507. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5508. }
  5509. ]
  5510. }
  5511. },
  5512. "/session/status": {
  5513. "get": {
  5514. "tags": ["session"],
  5515. "operationId": "session.status",
  5516. "parameters": [
  5517. {
  5518. "name": "directory",
  5519. "in": "query",
  5520. "schema": {
  5521. "type": "string"
  5522. },
  5523. "required": false
  5524. },
  5525. {
  5526. "name": "workspace",
  5527. "in": "query",
  5528. "schema": {
  5529. "type": "string"
  5530. },
  5531. "required": false
  5532. }
  5533. ],
  5534. "responses": {
  5535. "200": {
  5536. "description": "Get session status",
  5537. "content": {
  5538. "application/json": {
  5539. "schema": {
  5540. "type": "object",
  5541. "additionalProperties": {
  5542. "$ref": "#/components/schemas/SessionStatus"
  5543. },
  5544. "description": "Get session status"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "BadRequest | InvalidRequestError",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "anyOf": [
  5555. {
  5556. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5557. },
  5558. {
  5559. "$ref": "#/components/schemas/InvalidRequestError"
  5560. }
  5561. ]
  5562. }
  5563. }
  5564. }
  5565. }
  5566. },
  5567. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5568. "summary": "Get session status",
  5569. "x-codeSamples": [
  5570. {
  5571. "lang": "js",
  5572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5573. }
  5574. ]
  5575. }
  5576. },
  5577. "/session/{sessionID}": {
  5578. "get": {
  5579. "tags": ["session"],
  5580. "operationId": "session.get",
  5581. "parameters": [
  5582. {
  5583. "name": "sessionID",
  5584. "in": "path",
  5585. "schema": {
  5586. "type": "string",
  5587. "pattern": "^ses"
  5588. },
  5589. "required": true
  5590. },
  5591. {
  5592. "name": "directory",
  5593. "in": "query",
  5594. "schema": {
  5595. "type": "string"
  5596. },
  5597. "required": false
  5598. },
  5599. {
  5600. "name": "workspace",
  5601. "in": "query",
  5602. "schema": {
  5603. "type": "string"
  5604. },
  5605. "required": false
  5606. }
  5607. ],
  5608. "responses": {
  5609. "200": {
  5610. "description": "Get session",
  5611. "content": {
  5612. "application/json": {
  5613. "schema": {
  5614. "$ref": "#/components/schemas/Session"
  5615. }
  5616. }
  5617. }
  5618. },
  5619. "400": {
  5620. "description": "BadRequest | InvalidRequestError",
  5621. "content": {
  5622. "application/json": {
  5623. "schema": {
  5624. "anyOf": [
  5625. {
  5626. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5627. },
  5628. {
  5629. "$ref": "#/components/schemas/InvalidRequestError"
  5630. }
  5631. ]
  5632. }
  5633. }
  5634. }
  5635. },
  5636. "404": {
  5637. "description": "NotFoundError",
  5638. "content": {
  5639. "application/json": {
  5640. "schema": {
  5641. "$ref": "#/components/schemas/NotFoundError"
  5642. }
  5643. }
  5644. }
  5645. }
  5646. },
  5647. "description": "Retrieve detailed information about a specific OpenCode session.",
  5648. "summary": "Get session",
  5649. "x-codeSamples": [
  5650. {
  5651. "lang": "js",
  5652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5653. }
  5654. ]
  5655. },
  5656. "delete": {
  5657. "tags": ["session"],
  5658. "operationId": "session.delete",
  5659. "parameters": [
  5660. {
  5661. "name": "sessionID",
  5662. "in": "path",
  5663. "schema": {
  5664. "type": "string",
  5665. "pattern": "^ses"
  5666. },
  5667. "required": true
  5668. },
  5669. {
  5670. "name": "directory",
  5671. "in": "query",
  5672. "schema": {
  5673. "type": "string"
  5674. },
  5675. "required": false
  5676. },
  5677. {
  5678. "name": "workspace",
  5679. "in": "query",
  5680. "schema": {
  5681. "type": "string"
  5682. },
  5683. "required": false
  5684. }
  5685. ],
  5686. "responses": {
  5687. "200": {
  5688. "description": "Successfully deleted session",
  5689. "content": {
  5690. "application/json": {
  5691. "schema": {
  5692. "type": "boolean",
  5693. "description": "Successfully deleted session"
  5694. }
  5695. }
  5696. }
  5697. },
  5698. "400": {
  5699. "description": "BadRequest | InvalidRequestError",
  5700. "content": {
  5701. "application/json": {
  5702. "schema": {
  5703. "anyOf": [
  5704. {
  5705. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5706. },
  5707. {
  5708. "$ref": "#/components/schemas/InvalidRequestError"
  5709. }
  5710. ]
  5711. }
  5712. }
  5713. }
  5714. },
  5715. "404": {
  5716. "description": "NotFoundError",
  5717. "content": {
  5718. "application/json": {
  5719. "schema": {
  5720. "$ref": "#/components/schemas/NotFoundError"
  5721. }
  5722. }
  5723. }
  5724. }
  5725. },
  5726. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5727. "summary": "Delete session",
  5728. "x-codeSamples": [
  5729. {
  5730. "lang": "js",
  5731. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5732. }
  5733. ]
  5734. },
  5735. "patch": {
  5736. "tags": ["session"],
  5737. "operationId": "session.update",
  5738. "parameters": [
  5739. {
  5740. "name": "sessionID",
  5741. "in": "path",
  5742. "schema": {
  5743. "type": "string",
  5744. "pattern": "^ses"
  5745. },
  5746. "required": true
  5747. },
  5748. {
  5749. "name": "directory",
  5750. "in": "query",
  5751. "schema": {
  5752. "type": "string"
  5753. },
  5754. "required": false
  5755. },
  5756. {
  5757. "name": "workspace",
  5758. "in": "query",
  5759. "schema": {
  5760. "type": "string"
  5761. },
  5762. "required": false
  5763. }
  5764. ],
  5765. "responses": {
  5766. "200": {
  5767. "description": "Successfully updated session",
  5768. "content": {
  5769. "application/json": {
  5770. "schema": {
  5771. "$ref": "#/components/schemas/Session"
  5772. }
  5773. }
  5774. }
  5775. },
  5776. "400": {
  5777. "description": "BadRequest | InvalidRequestError",
  5778. "content": {
  5779. "application/json": {
  5780. "schema": {
  5781. "anyOf": [
  5782. {
  5783. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5784. },
  5785. {
  5786. "$ref": "#/components/schemas/InvalidRequestError"
  5787. }
  5788. ]
  5789. }
  5790. }
  5791. }
  5792. },
  5793. "404": {
  5794. "description": "NotFoundError",
  5795. "content": {
  5796. "application/json": {
  5797. "schema": {
  5798. "$ref": "#/components/schemas/NotFoundError"
  5799. }
  5800. }
  5801. }
  5802. }
  5803. },
  5804. "description": "Update properties of an existing session, such as title or other metadata.",
  5805. "summary": "Update session",
  5806. "requestBody": {
  5807. "content": {
  5808. "application/json": {
  5809. "schema": {
  5810. "type": "object",
  5811. "properties": {
  5812. "title": {
  5813. "type": "string"
  5814. },
  5815. "metadata": {
  5816. "type": "object"
  5817. },
  5818. "permission": {
  5819. "$ref": "#/components/schemas/PermissionRuleset"
  5820. },
  5821. "time": {
  5822. "type": "object",
  5823. "properties": {
  5824. "archived": {
  5825. "type": "number"
  5826. }
  5827. },
  5828. "additionalProperties": false
  5829. }
  5830. },
  5831. "additionalProperties": false
  5832. }
  5833. }
  5834. }
  5835. },
  5836. "x-codeSamples": [
  5837. {
  5838. "lang": "js",
  5839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5840. }
  5841. ]
  5842. }
  5843. },
  5844. "/session/{sessionID}/children": {
  5845. "get": {
  5846. "tags": ["session"],
  5847. "operationId": "session.children",
  5848. "parameters": [
  5849. {
  5850. "name": "sessionID",
  5851. "in": "path",
  5852. "schema": {
  5853. "type": "string",
  5854. "pattern": "^ses"
  5855. },
  5856. "required": true
  5857. },
  5858. {
  5859. "name": "directory",
  5860. "in": "query",
  5861. "schema": {
  5862. "type": "string"
  5863. },
  5864. "required": false
  5865. },
  5866. {
  5867. "name": "workspace",
  5868. "in": "query",
  5869. "schema": {
  5870. "type": "string"
  5871. },
  5872. "required": false
  5873. }
  5874. ],
  5875. "responses": {
  5876. "200": {
  5877. "description": "List of children",
  5878. "content": {
  5879. "application/json": {
  5880. "schema": {
  5881. "type": "array",
  5882. "items": {
  5883. "$ref": "#/components/schemas/Session"
  5884. },
  5885. "description": "List of children"
  5886. }
  5887. }
  5888. }
  5889. },
  5890. "400": {
  5891. "description": "BadRequest | InvalidRequestError",
  5892. "content": {
  5893. "application/json": {
  5894. "schema": {
  5895. "anyOf": [
  5896. {
  5897. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5898. },
  5899. {
  5900. "$ref": "#/components/schemas/InvalidRequestError"
  5901. }
  5902. ]
  5903. }
  5904. }
  5905. }
  5906. },
  5907. "404": {
  5908. "description": "NotFoundError",
  5909. "content": {
  5910. "application/json": {
  5911. "schema": {
  5912. "$ref": "#/components/schemas/NotFoundError"
  5913. }
  5914. }
  5915. }
  5916. }
  5917. },
  5918. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5919. "summary": "Get session children",
  5920. "x-codeSamples": [
  5921. {
  5922. "lang": "js",
  5923. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5924. }
  5925. ]
  5926. }
  5927. },
  5928. "/session/{sessionID}/todo": {
  5929. "get": {
  5930. "tags": ["session"],
  5931. "operationId": "session.todo",
  5932. "parameters": [
  5933. {
  5934. "name": "sessionID",
  5935. "in": "path",
  5936. "schema": {
  5937. "type": "string",
  5938. "pattern": "^ses"
  5939. },
  5940. "required": true
  5941. },
  5942. {
  5943. "name": "directory",
  5944. "in": "query",
  5945. "schema": {
  5946. "type": "string"
  5947. },
  5948. "required": false
  5949. },
  5950. {
  5951. "name": "workspace",
  5952. "in": "query",
  5953. "schema": {
  5954. "type": "string"
  5955. },
  5956. "required": false
  5957. }
  5958. ],
  5959. "responses": {
  5960. "200": {
  5961. "description": "Todo list",
  5962. "content": {
  5963. "application/json": {
  5964. "schema": {
  5965. "type": "array",
  5966. "items": {
  5967. "$ref": "#/components/schemas/Todo"
  5968. },
  5969. "description": "Todo list"
  5970. }
  5971. }
  5972. }
  5973. },
  5974. "400": {
  5975. "description": "BadRequest | InvalidRequestError",
  5976. "content": {
  5977. "application/json": {
  5978. "schema": {
  5979. "anyOf": [
  5980. {
  5981. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5982. },
  5983. {
  5984. "$ref": "#/components/schemas/InvalidRequestError"
  5985. }
  5986. ]
  5987. }
  5988. }
  5989. }
  5990. },
  5991. "404": {
  5992. "description": "NotFoundError",
  5993. "content": {
  5994. "application/json": {
  5995. "schema": {
  5996. "$ref": "#/components/schemas/NotFoundError"
  5997. }
  5998. }
  5999. }
  6000. }
  6001. },
  6002. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6003. "summary": "Get session todos",
  6004. "x-codeSamples": [
  6005. {
  6006. "lang": "js",
  6007. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6008. }
  6009. ]
  6010. }
  6011. },
  6012. "/session/{sessionID}/diff": {
  6013. "get": {
  6014. "tags": ["session"],
  6015. "operationId": "session.diff",
  6016. "parameters": [
  6017. {
  6018. "name": "sessionID",
  6019. "in": "path",
  6020. "schema": {
  6021. "type": "string",
  6022. "pattern": "^ses"
  6023. },
  6024. "required": true
  6025. },
  6026. {
  6027. "name": "directory",
  6028. "in": "query",
  6029. "schema": {
  6030. "type": "string"
  6031. },
  6032. "required": false
  6033. },
  6034. {
  6035. "name": "workspace",
  6036. "in": "query",
  6037. "schema": {
  6038. "type": "string"
  6039. },
  6040. "required": false
  6041. },
  6042. {
  6043. "name": "messageID",
  6044. "in": "query",
  6045. "schema": {
  6046. "type": "string",
  6047. "pattern": "^msg"
  6048. },
  6049. "required": false
  6050. }
  6051. ],
  6052. "responses": {
  6053. "200": {
  6054. "description": "Successfully retrieved diff",
  6055. "content": {
  6056. "application/json": {
  6057. "schema": {
  6058. "type": "array",
  6059. "items": {
  6060. "$ref": "#/components/schemas/SnapshotFileDiff"
  6061. },
  6062. "description": "Successfully retrieved diff"
  6063. }
  6064. }
  6065. }
  6066. },
  6067. "400": {
  6068. "description": "Bad request",
  6069. "content": {
  6070. "application/json": {
  6071. "schema": {
  6072. "$ref": "#/components/schemas/BadRequestError"
  6073. }
  6074. }
  6075. }
  6076. }
  6077. },
  6078. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6079. "summary": "Get message diff",
  6080. "x-codeSamples": [
  6081. {
  6082. "lang": "js",
  6083. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6084. }
  6085. ]
  6086. }
  6087. },
  6088. "/session/{sessionID}/message": {
  6089. "get": {
  6090. "tags": ["session"],
  6091. "operationId": "session.messages",
  6092. "parameters": [
  6093. {
  6094. "name": "sessionID",
  6095. "in": "path",
  6096. "schema": {
  6097. "type": "string",
  6098. "pattern": "^ses"
  6099. },
  6100. "required": true
  6101. },
  6102. {
  6103. "name": "directory",
  6104. "in": "query",
  6105. "schema": {
  6106. "type": "string"
  6107. },
  6108. "required": false
  6109. },
  6110. {
  6111. "name": "workspace",
  6112. "in": "query",
  6113. "schema": {
  6114. "type": "string"
  6115. },
  6116. "required": false
  6117. },
  6118. {
  6119. "name": "limit",
  6120. "in": "query",
  6121. "schema": {
  6122. "type": "integer",
  6123. "minimum": 0,
  6124. "maximum": 9007199254740991
  6125. },
  6126. "required": false
  6127. },
  6128. {
  6129. "name": "before",
  6130. "in": "query",
  6131. "schema": {
  6132. "type": "string"
  6133. },
  6134. "required": false
  6135. }
  6136. ],
  6137. "responses": {
  6138. "200": {
  6139. "description": "List of messages",
  6140. "content": {
  6141. "application/json": {
  6142. "schema": {
  6143. "type": "array",
  6144. "items": {
  6145. "type": "object",
  6146. "properties": {
  6147. "info": {
  6148. "$ref": "#/components/schemas/Message"
  6149. },
  6150. "parts": {
  6151. "type": "array",
  6152. "items": {
  6153. "$ref": "#/components/schemas/Part"
  6154. }
  6155. }
  6156. },
  6157. "required": ["info", "parts"],
  6158. "additionalProperties": false
  6159. },
  6160. "description": "List of messages"
  6161. }
  6162. }
  6163. }
  6164. },
  6165. "400": {
  6166. "description": "BadRequest | InvalidRequestError",
  6167. "content": {
  6168. "application/json": {
  6169. "schema": {
  6170. "anyOf": [
  6171. {
  6172. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6173. },
  6174. {
  6175. "$ref": "#/components/schemas/InvalidRequestError"
  6176. }
  6177. ]
  6178. }
  6179. }
  6180. }
  6181. },
  6182. "404": {
  6183. "description": "NotFoundError",
  6184. "content": {
  6185. "application/json": {
  6186. "schema": {
  6187. "$ref": "#/components/schemas/NotFoundError"
  6188. }
  6189. }
  6190. }
  6191. }
  6192. },
  6193. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6194. "summary": "Get session messages",
  6195. "x-codeSamples": [
  6196. {
  6197. "lang": "js",
  6198. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6199. }
  6200. ]
  6201. },
  6202. "post": {
  6203. "tags": ["session"],
  6204. "operationId": "session.prompt",
  6205. "parameters": [
  6206. {
  6207. "name": "sessionID",
  6208. "in": "path",
  6209. "schema": {
  6210. "type": "string",
  6211. "pattern": "^ses"
  6212. },
  6213. "required": true
  6214. },
  6215. {
  6216. "name": "directory",
  6217. "in": "query",
  6218. "schema": {
  6219. "type": "string"
  6220. },
  6221. "required": false
  6222. },
  6223. {
  6224. "name": "workspace",
  6225. "in": "query",
  6226. "schema": {
  6227. "type": "string"
  6228. },
  6229. "required": false
  6230. }
  6231. ],
  6232. "responses": {
  6233. "200": {
  6234. "description": "Created message",
  6235. "content": {
  6236. "application/json": {
  6237. "schema": {
  6238. "type": "object",
  6239. "required": ["info", "parts"],
  6240. "properties": {
  6241. "info": {
  6242. "$ref": "#/components/schemas/AssistantMessage"
  6243. },
  6244. "parts": {
  6245. "type": "array",
  6246. "items": {
  6247. "$ref": "#/components/schemas/Part"
  6248. }
  6249. }
  6250. }
  6251. }
  6252. }
  6253. }
  6254. },
  6255. "400": {
  6256. "description": "BadRequest | InvalidRequestError",
  6257. "content": {
  6258. "application/json": {
  6259. "schema": {
  6260. "anyOf": [
  6261. {
  6262. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6263. },
  6264. {
  6265. "$ref": "#/components/schemas/InvalidRequestError"
  6266. }
  6267. ]
  6268. }
  6269. }
  6270. }
  6271. },
  6272. "404": {
  6273. "description": "NotFoundError",
  6274. "content": {
  6275. "application/json": {
  6276. "schema": {
  6277. "$ref": "#/components/schemas/NotFoundError"
  6278. }
  6279. }
  6280. }
  6281. }
  6282. },
  6283. "description": "Create and send a new message to a session, streaming the AI response.",
  6284. "summary": "Send message",
  6285. "requestBody": {
  6286. "content": {
  6287. "application/json": {
  6288. "schema": {
  6289. "type": "object",
  6290. "properties": {
  6291. "messageID": {
  6292. "type": "string",
  6293. "pattern": "^msg"
  6294. },
  6295. "model": {
  6296. "type": "object",
  6297. "properties": {
  6298. "providerID": {
  6299. "type": "string"
  6300. },
  6301. "modelID": {
  6302. "type": "string"
  6303. }
  6304. },
  6305. "required": ["providerID", "modelID"],
  6306. "additionalProperties": false
  6307. },
  6308. "agent": {
  6309. "type": "string"
  6310. },
  6311. "noReply": {
  6312. "type": "boolean"
  6313. },
  6314. "tools": {
  6315. "type": "object",
  6316. "additionalProperties": {
  6317. "type": "boolean"
  6318. }
  6319. },
  6320. "format": {
  6321. "$ref": "#/components/schemas/OutputFormat"
  6322. },
  6323. "system": {
  6324. "type": "string"
  6325. },
  6326. "variant": {
  6327. "type": "string"
  6328. },
  6329. "parts": {
  6330. "type": "array",
  6331. "items": {
  6332. "anyOf": [
  6333. {
  6334. "$ref": "#/components/schemas/TextPartInput"
  6335. },
  6336. {
  6337. "$ref": "#/components/schemas/FilePartInput"
  6338. },
  6339. {
  6340. "$ref": "#/components/schemas/AgentPartInput"
  6341. },
  6342. {
  6343. "$ref": "#/components/schemas/SubtaskPartInput"
  6344. }
  6345. ]
  6346. }
  6347. }
  6348. },
  6349. "required": ["parts"],
  6350. "additionalProperties": false
  6351. }
  6352. }
  6353. }
  6354. },
  6355. "x-codeSamples": [
  6356. {
  6357. "lang": "js",
  6358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6359. }
  6360. ]
  6361. }
  6362. },
  6363. "/session/{sessionID}/message/{messageID}": {
  6364. "get": {
  6365. "tags": ["session"],
  6366. "operationId": "session.message",
  6367. "parameters": [
  6368. {
  6369. "name": "sessionID",
  6370. "in": "path",
  6371. "schema": {
  6372. "type": "string",
  6373. "pattern": "^ses"
  6374. },
  6375. "required": true
  6376. },
  6377. {
  6378. "name": "messageID",
  6379. "in": "path",
  6380. "schema": {
  6381. "type": "string",
  6382. "pattern": "^msg"
  6383. },
  6384. "required": true
  6385. },
  6386. {
  6387. "name": "directory",
  6388. "in": "query",
  6389. "schema": {
  6390. "type": "string"
  6391. },
  6392. "required": false
  6393. },
  6394. {
  6395. "name": "workspace",
  6396. "in": "query",
  6397. "schema": {
  6398. "type": "string"
  6399. },
  6400. "required": false
  6401. }
  6402. ],
  6403. "responses": {
  6404. "200": {
  6405. "description": "Message",
  6406. "content": {
  6407. "application/json": {
  6408. "schema": {
  6409. "type": "object",
  6410. "properties": {
  6411. "info": {
  6412. "$ref": "#/components/schemas/Message"
  6413. },
  6414. "parts": {
  6415. "type": "array",
  6416. "items": {
  6417. "$ref": "#/components/schemas/Part"
  6418. }
  6419. }
  6420. },
  6421. "required": ["info", "parts"],
  6422. "additionalProperties": false,
  6423. "description": "Message"
  6424. }
  6425. }
  6426. }
  6427. },
  6428. "400": {
  6429. "description": "BadRequest | InvalidRequestError",
  6430. "content": {
  6431. "application/json": {
  6432. "schema": {
  6433. "anyOf": [
  6434. {
  6435. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6436. },
  6437. {
  6438. "$ref": "#/components/schemas/InvalidRequestError"
  6439. }
  6440. ]
  6441. }
  6442. }
  6443. }
  6444. },
  6445. "404": {
  6446. "description": "NotFoundError",
  6447. "content": {
  6448. "application/json": {
  6449. "schema": {
  6450. "$ref": "#/components/schemas/NotFoundError"
  6451. }
  6452. }
  6453. }
  6454. }
  6455. },
  6456. "description": "Retrieve a specific message from a session by its message ID.",
  6457. "summary": "Get message",
  6458. "x-codeSamples": [
  6459. {
  6460. "lang": "js",
  6461. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6462. }
  6463. ]
  6464. },
  6465. "delete": {
  6466. "tags": ["session"],
  6467. "operationId": "session.deleteMessage",
  6468. "parameters": [
  6469. {
  6470. "name": "sessionID",
  6471. "in": "path",
  6472. "schema": {
  6473. "type": "string",
  6474. "pattern": "^ses"
  6475. },
  6476. "required": true
  6477. },
  6478. {
  6479. "name": "messageID",
  6480. "in": "path",
  6481. "schema": {
  6482. "type": "string",
  6483. "pattern": "^msg"
  6484. },
  6485. "required": true
  6486. },
  6487. {
  6488. "name": "directory",
  6489. "in": "query",
  6490. "schema": {
  6491. "type": "string"
  6492. },
  6493. "required": false
  6494. },
  6495. {
  6496. "name": "workspace",
  6497. "in": "query",
  6498. "schema": {
  6499. "type": "string"
  6500. },
  6501. "required": false
  6502. }
  6503. ],
  6504. "responses": {
  6505. "200": {
  6506. "description": "Successfully deleted message",
  6507. "content": {
  6508. "application/json": {
  6509. "schema": {
  6510. "type": "boolean",
  6511. "description": "Successfully deleted message"
  6512. }
  6513. }
  6514. }
  6515. },
  6516. "400": {
  6517. "description": "BadRequest | InvalidRequestError",
  6518. "content": {
  6519. "application/json": {
  6520. "schema": {
  6521. "anyOf": [
  6522. {
  6523. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6524. },
  6525. {
  6526. "$ref": "#/components/schemas/InvalidRequestError"
  6527. }
  6528. ]
  6529. }
  6530. }
  6531. }
  6532. },
  6533. "404": {
  6534. "description": "NotFoundError",
  6535. "content": {
  6536. "application/json": {
  6537. "schema": {
  6538. "$ref": "#/components/schemas/NotFoundError"
  6539. }
  6540. }
  6541. }
  6542. },
  6543. "409": {
  6544. "description": "SessionBusyError",
  6545. "content": {
  6546. "application/json": {
  6547. "schema": {
  6548. "$ref": "#/components/schemas/SessionBusyError"
  6549. }
  6550. }
  6551. }
  6552. }
  6553. },
  6554. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6555. "summary": "Delete message",
  6556. "x-codeSamples": [
  6557. {
  6558. "lang": "js",
  6559. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6560. }
  6561. ]
  6562. }
  6563. },
  6564. "/session/{sessionID}/fork": {
  6565. "post": {
  6566. "tags": ["session"],
  6567. "operationId": "session.fork",
  6568. "parameters": [
  6569. {
  6570. "name": "sessionID",
  6571. "in": "path",
  6572. "schema": {
  6573. "type": "string",
  6574. "pattern": "^ses"
  6575. },
  6576. "required": true
  6577. },
  6578. {
  6579. "name": "directory",
  6580. "in": "query",
  6581. "schema": {
  6582. "type": "string"
  6583. },
  6584. "required": false
  6585. },
  6586. {
  6587. "name": "workspace",
  6588. "in": "query",
  6589. "schema": {
  6590. "type": "string"
  6591. },
  6592. "required": false
  6593. }
  6594. ],
  6595. "responses": {
  6596. "200": {
  6597. "description": "200",
  6598. "content": {
  6599. "application/json": {
  6600. "schema": {
  6601. "$ref": "#/components/schemas/Session"
  6602. }
  6603. }
  6604. }
  6605. },
  6606. "400": {
  6607. "description": "BadRequest | InvalidRequestError",
  6608. "content": {
  6609. "application/json": {
  6610. "schema": {
  6611. "anyOf": [
  6612. {
  6613. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6614. },
  6615. {
  6616. "$ref": "#/components/schemas/InvalidRequestError"
  6617. }
  6618. ]
  6619. }
  6620. }
  6621. }
  6622. },
  6623. "404": {
  6624. "description": "NotFoundError",
  6625. "content": {
  6626. "application/json": {
  6627. "schema": {
  6628. "$ref": "#/components/schemas/NotFoundError"
  6629. }
  6630. }
  6631. }
  6632. }
  6633. },
  6634. "description": "Create a new session by forking an existing session at a specific message point.",
  6635. "summary": "Fork session",
  6636. "requestBody": {
  6637. "content": {
  6638. "application/json": {
  6639. "schema": {
  6640. "type": "object",
  6641. "properties": {
  6642. "messageID": {
  6643. "type": "string",
  6644. "pattern": "^msg"
  6645. }
  6646. },
  6647. "additionalProperties": false
  6648. }
  6649. }
  6650. }
  6651. },
  6652. "x-codeSamples": [
  6653. {
  6654. "lang": "js",
  6655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6656. }
  6657. ]
  6658. }
  6659. },
  6660. "/session/{sessionID}/abort": {
  6661. "post": {
  6662. "tags": ["session"],
  6663. "operationId": "session.abort",
  6664. "parameters": [
  6665. {
  6666. "name": "sessionID",
  6667. "in": "path",
  6668. "schema": {
  6669. "type": "string",
  6670. "pattern": "^ses"
  6671. },
  6672. "required": true
  6673. },
  6674. {
  6675. "name": "directory",
  6676. "in": "query",
  6677. "schema": {
  6678. "type": "string"
  6679. },
  6680. "required": false
  6681. },
  6682. {
  6683. "name": "workspace",
  6684. "in": "query",
  6685. "schema": {
  6686. "type": "string"
  6687. },
  6688. "required": false
  6689. }
  6690. ],
  6691. "responses": {
  6692. "200": {
  6693. "description": "Aborted session",
  6694. "content": {
  6695. "application/json": {
  6696. "schema": {
  6697. "type": "boolean",
  6698. "description": "Aborted session"
  6699. }
  6700. }
  6701. }
  6702. },
  6703. "400": {
  6704. "description": "BadRequest | InvalidRequestError",
  6705. "content": {
  6706. "application/json": {
  6707. "schema": {
  6708. "anyOf": [
  6709. {
  6710. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6711. },
  6712. {
  6713. "$ref": "#/components/schemas/InvalidRequestError"
  6714. }
  6715. ]
  6716. }
  6717. }
  6718. }
  6719. }
  6720. },
  6721. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6722. "summary": "Abort session",
  6723. "x-codeSamples": [
  6724. {
  6725. "lang": "js",
  6726. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6727. }
  6728. ]
  6729. }
  6730. },
  6731. "/session/{sessionID}/init": {
  6732. "post": {
  6733. "tags": ["session"],
  6734. "operationId": "session.init",
  6735. "parameters": [
  6736. {
  6737. "name": "sessionID",
  6738. "in": "path",
  6739. "schema": {
  6740. "type": "string",
  6741. "pattern": "^ses"
  6742. },
  6743. "required": true
  6744. },
  6745. {
  6746. "name": "directory",
  6747. "in": "query",
  6748. "schema": {
  6749. "type": "string"
  6750. },
  6751. "required": false
  6752. },
  6753. {
  6754. "name": "workspace",
  6755. "in": "query",
  6756. "schema": {
  6757. "type": "string"
  6758. },
  6759. "required": false
  6760. }
  6761. ],
  6762. "responses": {
  6763. "200": {
  6764. "description": "200",
  6765. "content": {
  6766. "application/json": {
  6767. "schema": {
  6768. "type": "boolean",
  6769. "description": "200"
  6770. }
  6771. }
  6772. }
  6773. },
  6774. "400": {
  6775. "description": "BadRequest | InvalidRequestError",
  6776. "content": {
  6777. "application/json": {
  6778. "schema": {
  6779. "anyOf": [
  6780. {
  6781. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6782. },
  6783. {
  6784. "$ref": "#/components/schemas/InvalidRequestError"
  6785. }
  6786. ]
  6787. }
  6788. }
  6789. }
  6790. },
  6791. "404": {
  6792. "description": "NotFoundError",
  6793. "content": {
  6794. "application/json": {
  6795. "schema": {
  6796. "$ref": "#/components/schemas/NotFoundError"
  6797. }
  6798. }
  6799. }
  6800. }
  6801. },
  6802. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6803. "summary": "Initialize session",
  6804. "requestBody": {
  6805. "content": {
  6806. "application/json": {
  6807. "schema": {
  6808. "type": "object",
  6809. "properties": {
  6810. "modelID": {
  6811. "type": "string"
  6812. },
  6813. "providerID": {
  6814. "type": "string"
  6815. },
  6816. "messageID": {
  6817. "type": "string",
  6818. "pattern": "^msg"
  6819. }
  6820. },
  6821. "required": ["modelID", "providerID", "messageID"],
  6822. "additionalProperties": false
  6823. }
  6824. }
  6825. }
  6826. },
  6827. "x-codeSamples": [
  6828. {
  6829. "lang": "js",
  6830. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6831. }
  6832. ]
  6833. }
  6834. },
  6835. "/session/{sessionID}/share": {
  6836. "post": {
  6837. "tags": ["session"],
  6838. "operationId": "session.share",
  6839. "parameters": [
  6840. {
  6841. "name": "sessionID",
  6842. "in": "path",
  6843. "schema": {
  6844. "type": "string",
  6845. "pattern": "^ses"
  6846. },
  6847. "required": true
  6848. },
  6849. {
  6850. "name": "directory",
  6851. "in": "query",
  6852. "schema": {
  6853. "type": "string"
  6854. },
  6855. "required": false
  6856. },
  6857. {
  6858. "name": "workspace",
  6859. "in": "query",
  6860. "schema": {
  6861. "type": "string"
  6862. },
  6863. "required": false
  6864. }
  6865. ],
  6866. "responses": {
  6867. "200": {
  6868. "description": "Successfully shared session",
  6869. "content": {
  6870. "application/json": {
  6871. "schema": {
  6872. "$ref": "#/components/schemas/Session"
  6873. }
  6874. }
  6875. }
  6876. },
  6877. "400": {
  6878. "description": "Bad request",
  6879. "content": {
  6880. "application/json": {
  6881. "schema": {
  6882. "$ref": "#/components/schemas/BadRequestError"
  6883. }
  6884. }
  6885. }
  6886. },
  6887. "404": {
  6888. "description": "NotFoundError",
  6889. "content": {
  6890. "application/json": {
  6891. "schema": {
  6892. "$ref": "#/components/schemas/NotFoundError"
  6893. }
  6894. }
  6895. }
  6896. },
  6897. "500": {
  6898. "description": "InternalServerError",
  6899. "content": {
  6900. "application/json": {
  6901. "schema": {
  6902. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6903. }
  6904. }
  6905. }
  6906. }
  6907. },
  6908. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6909. "summary": "Share session",
  6910. "x-codeSamples": [
  6911. {
  6912. "lang": "js",
  6913. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6914. }
  6915. ]
  6916. },
  6917. "delete": {
  6918. "tags": ["session"],
  6919. "operationId": "session.unshare",
  6920. "parameters": [
  6921. {
  6922. "name": "sessionID",
  6923. "in": "path",
  6924. "schema": {
  6925. "type": "string",
  6926. "pattern": "^ses"
  6927. },
  6928. "required": true
  6929. },
  6930. {
  6931. "name": "directory",
  6932. "in": "query",
  6933. "schema": {
  6934. "type": "string"
  6935. },
  6936. "required": false
  6937. },
  6938. {
  6939. "name": "workspace",
  6940. "in": "query",
  6941. "schema": {
  6942. "type": "string"
  6943. },
  6944. "required": false
  6945. }
  6946. ],
  6947. "responses": {
  6948. "200": {
  6949. "description": "Successfully unshared session",
  6950. "content": {
  6951. "application/json": {
  6952. "schema": {
  6953. "$ref": "#/components/schemas/Session"
  6954. }
  6955. }
  6956. }
  6957. },
  6958. "400": {
  6959. "description": "Bad request",
  6960. "content": {
  6961. "application/json": {
  6962. "schema": {
  6963. "$ref": "#/components/schemas/BadRequestError"
  6964. }
  6965. }
  6966. }
  6967. },
  6968. "404": {
  6969. "description": "NotFoundError",
  6970. "content": {
  6971. "application/json": {
  6972. "schema": {
  6973. "$ref": "#/components/schemas/NotFoundError"
  6974. }
  6975. }
  6976. }
  6977. },
  6978. "500": {
  6979. "description": "InternalServerError",
  6980. "content": {
  6981. "application/json": {
  6982. "schema": {
  6983. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6984. }
  6985. }
  6986. }
  6987. }
  6988. },
  6989. "description": "Remove the shareable link for a session, making it private again.",
  6990. "summary": "Unshare session",
  6991. "x-codeSamples": [
  6992. {
  6993. "lang": "js",
  6994. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6995. }
  6996. ]
  6997. }
  6998. },
  6999. "/session/{sessionID}/summarize": {
  7000. "post": {
  7001. "tags": ["session"],
  7002. "operationId": "session.summarize",
  7003. "parameters": [
  7004. {
  7005. "name": "sessionID",
  7006. "in": "path",
  7007. "schema": {
  7008. "type": "string",
  7009. "pattern": "^ses"
  7010. },
  7011. "required": true
  7012. },
  7013. {
  7014. "name": "directory",
  7015. "in": "query",
  7016. "schema": {
  7017. "type": "string"
  7018. },
  7019. "required": false
  7020. },
  7021. {
  7022. "name": "workspace",
  7023. "in": "query",
  7024. "schema": {
  7025. "type": "string"
  7026. },
  7027. "required": false
  7028. }
  7029. ],
  7030. "responses": {
  7031. "200": {
  7032. "description": "Summarized session",
  7033. "content": {
  7034. "application/json": {
  7035. "schema": {
  7036. "type": "boolean",
  7037. "description": "Summarized session"
  7038. }
  7039. }
  7040. }
  7041. },
  7042. "400": {
  7043. "description": "BadRequest | InvalidRequestError",
  7044. "content": {
  7045. "application/json": {
  7046. "schema": {
  7047. "anyOf": [
  7048. {
  7049. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7050. },
  7051. {
  7052. "$ref": "#/components/schemas/InvalidRequestError"
  7053. }
  7054. ]
  7055. }
  7056. }
  7057. }
  7058. },
  7059. "404": {
  7060. "description": "NotFoundError",
  7061. "content": {
  7062. "application/json": {
  7063. "schema": {
  7064. "$ref": "#/components/schemas/NotFoundError"
  7065. }
  7066. }
  7067. }
  7068. }
  7069. },
  7070. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7071. "summary": "Summarize session",
  7072. "requestBody": {
  7073. "content": {
  7074. "application/json": {
  7075. "schema": {
  7076. "type": "object",
  7077. "properties": {
  7078. "providerID": {
  7079. "type": "string"
  7080. },
  7081. "modelID": {
  7082. "type": "string"
  7083. },
  7084. "auto": {
  7085. "type": "boolean"
  7086. }
  7087. },
  7088. "required": ["providerID", "modelID"],
  7089. "additionalProperties": false
  7090. }
  7091. }
  7092. }
  7093. },
  7094. "x-codeSamples": [
  7095. {
  7096. "lang": "js",
  7097. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7098. }
  7099. ]
  7100. }
  7101. },
  7102. "/session/{sessionID}/prompt_async": {
  7103. "post": {
  7104. "tags": ["session"],
  7105. "operationId": "session.prompt_async",
  7106. "parameters": [
  7107. {
  7108. "name": "sessionID",
  7109. "in": "path",
  7110. "schema": {
  7111. "type": "string",
  7112. "pattern": "^ses"
  7113. },
  7114. "required": true
  7115. },
  7116. {
  7117. "name": "directory",
  7118. "in": "query",
  7119. "schema": {
  7120. "type": "string"
  7121. },
  7122. "required": false
  7123. },
  7124. {
  7125. "name": "workspace",
  7126. "in": "query",
  7127. "schema": {
  7128. "type": "string"
  7129. },
  7130. "required": false
  7131. }
  7132. ],
  7133. "responses": {
  7134. "204": {
  7135. "description": "Prompt accepted"
  7136. },
  7137. "400": {
  7138. "description": "BadRequest | InvalidRequestError",
  7139. "content": {
  7140. "application/json": {
  7141. "schema": {
  7142. "anyOf": [
  7143. {
  7144. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7145. },
  7146. {
  7147. "$ref": "#/components/schemas/InvalidRequestError"
  7148. }
  7149. ]
  7150. }
  7151. }
  7152. }
  7153. },
  7154. "404": {
  7155. "description": "NotFoundError",
  7156. "content": {
  7157. "application/json": {
  7158. "schema": {
  7159. "$ref": "#/components/schemas/NotFoundError"
  7160. }
  7161. }
  7162. }
  7163. }
  7164. },
  7165. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7166. "summary": "Send async message",
  7167. "requestBody": {
  7168. "content": {
  7169. "application/json": {
  7170. "schema": {
  7171. "type": "object",
  7172. "properties": {
  7173. "messageID": {
  7174. "type": "string",
  7175. "pattern": "^msg"
  7176. },
  7177. "model": {
  7178. "type": "object",
  7179. "properties": {
  7180. "providerID": {
  7181. "type": "string"
  7182. },
  7183. "modelID": {
  7184. "type": "string"
  7185. }
  7186. },
  7187. "required": ["providerID", "modelID"],
  7188. "additionalProperties": false
  7189. },
  7190. "agent": {
  7191. "type": "string"
  7192. },
  7193. "noReply": {
  7194. "type": "boolean"
  7195. },
  7196. "tools": {
  7197. "type": "object",
  7198. "additionalProperties": {
  7199. "type": "boolean"
  7200. }
  7201. },
  7202. "format": {
  7203. "$ref": "#/components/schemas/OutputFormat"
  7204. },
  7205. "system": {
  7206. "type": "string"
  7207. },
  7208. "variant": {
  7209. "type": "string"
  7210. },
  7211. "parts": {
  7212. "type": "array",
  7213. "items": {
  7214. "anyOf": [
  7215. {
  7216. "$ref": "#/components/schemas/TextPartInput"
  7217. },
  7218. {
  7219. "$ref": "#/components/schemas/FilePartInput"
  7220. },
  7221. {
  7222. "$ref": "#/components/schemas/AgentPartInput"
  7223. },
  7224. {
  7225. "$ref": "#/components/schemas/SubtaskPartInput"
  7226. }
  7227. ]
  7228. }
  7229. }
  7230. },
  7231. "required": ["parts"],
  7232. "additionalProperties": false
  7233. }
  7234. }
  7235. }
  7236. },
  7237. "x-codeSamples": [
  7238. {
  7239. "lang": "js",
  7240. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7241. }
  7242. ]
  7243. }
  7244. },
  7245. "/session/{sessionID}/command": {
  7246. "post": {
  7247. "tags": ["session"],
  7248. "operationId": "session.command",
  7249. "parameters": [
  7250. {
  7251. "name": "sessionID",
  7252. "in": "path",
  7253. "schema": {
  7254. "type": "string",
  7255. "pattern": "^ses"
  7256. },
  7257. "required": true
  7258. },
  7259. {
  7260. "name": "directory",
  7261. "in": "query",
  7262. "schema": {
  7263. "type": "string"
  7264. },
  7265. "required": false
  7266. },
  7267. {
  7268. "name": "workspace",
  7269. "in": "query",
  7270. "schema": {
  7271. "type": "string"
  7272. },
  7273. "required": false
  7274. }
  7275. ],
  7276. "responses": {
  7277. "200": {
  7278. "description": "Created message",
  7279. "content": {
  7280. "application/json": {
  7281. "schema": {
  7282. "type": "object",
  7283. "required": ["info", "parts"],
  7284. "properties": {
  7285. "info": {
  7286. "$ref": "#/components/schemas/AssistantMessage"
  7287. },
  7288. "parts": {
  7289. "type": "array",
  7290. "items": {
  7291. "$ref": "#/components/schemas/Part"
  7292. }
  7293. }
  7294. }
  7295. }
  7296. }
  7297. }
  7298. },
  7299. "400": {
  7300. "description": "BadRequest | InvalidRequestError",
  7301. "content": {
  7302. "application/json": {
  7303. "schema": {
  7304. "anyOf": [
  7305. {
  7306. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7307. },
  7308. {
  7309. "$ref": "#/components/schemas/InvalidRequestError"
  7310. }
  7311. ]
  7312. }
  7313. }
  7314. }
  7315. },
  7316. "404": {
  7317. "description": "NotFoundError",
  7318. "content": {
  7319. "application/json": {
  7320. "schema": {
  7321. "$ref": "#/components/schemas/NotFoundError"
  7322. }
  7323. }
  7324. }
  7325. }
  7326. },
  7327. "description": "Send a new command to a session for execution by the AI assistant.",
  7328. "summary": "Send command",
  7329. "requestBody": {
  7330. "content": {
  7331. "application/json": {
  7332. "schema": {
  7333. "type": "object",
  7334. "properties": {
  7335. "messageID": {
  7336. "type": "string",
  7337. "pattern": "^msg"
  7338. },
  7339. "agent": {
  7340. "type": "string"
  7341. },
  7342. "model": {
  7343. "type": "string"
  7344. },
  7345. "arguments": {
  7346. "type": "string"
  7347. },
  7348. "command": {
  7349. "type": "string"
  7350. },
  7351. "variant": {
  7352. "type": "string"
  7353. },
  7354. "parts": {
  7355. "type": "array",
  7356. "items": {
  7357. "type": "object",
  7358. "properties": {
  7359. "id": {
  7360. "type": "string",
  7361. "pattern": "^prt"
  7362. },
  7363. "type": {
  7364. "type": "string",
  7365. "enum": ["file"]
  7366. },
  7367. "mime": {
  7368. "type": "string"
  7369. },
  7370. "filename": {
  7371. "type": "string"
  7372. },
  7373. "url": {
  7374. "type": "string"
  7375. },
  7376. "source": {
  7377. "$ref": "#/components/schemas/FilePartSource"
  7378. }
  7379. },
  7380. "required": ["type", "mime", "url"],
  7381. "additionalProperties": false
  7382. }
  7383. }
  7384. },
  7385. "required": ["arguments", "command"],
  7386. "additionalProperties": false
  7387. }
  7388. }
  7389. }
  7390. },
  7391. "x-codeSamples": [
  7392. {
  7393. "lang": "js",
  7394. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7395. }
  7396. ]
  7397. }
  7398. },
  7399. "/session/{sessionID}/shell": {
  7400. "post": {
  7401. "tags": ["session"],
  7402. "operationId": "session.shell",
  7403. "parameters": [
  7404. {
  7405. "name": "sessionID",
  7406. "in": "path",
  7407. "schema": {
  7408. "type": "string",
  7409. "pattern": "^ses"
  7410. },
  7411. "required": true
  7412. },
  7413. {
  7414. "name": "directory",
  7415. "in": "query",
  7416. "schema": {
  7417. "type": "string"
  7418. },
  7419. "required": false
  7420. },
  7421. {
  7422. "name": "workspace",
  7423. "in": "query",
  7424. "schema": {
  7425. "type": "string"
  7426. },
  7427. "required": false
  7428. }
  7429. ],
  7430. "responses": {
  7431. "200": {
  7432. "description": "Created message",
  7433. "content": {
  7434. "application/json": {
  7435. "schema": {
  7436. "type": "object",
  7437. "properties": {
  7438. "info": {
  7439. "$ref": "#/components/schemas/Message"
  7440. },
  7441. "parts": {
  7442. "type": "array",
  7443. "items": {
  7444. "$ref": "#/components/schemas/Part"
  7445. }
  7446. }
  7447. },
  7448. "required": ["info", "parts"],
  7449. "additionalProperties": false,
  7450. "description": "Created message"
  7451. }
  7452. }
  7453. }
  7454. },
  7455. "400": {
  7456. "description": "BadRequest | InvalidRequestError",
  7457. "content": {
  7458. "application/json": {
  7459. "schema": {
  7460. "anyOf": [
  7461. {
  7462. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7463. },
  7464. {
  7465. "$ref": "#/components/schemas/InvalidRequestError"
  7466. }
  7467. ]
  7468. }
  7469. }
  7470. }
  7471. },
  7472. "404": {
  7473. "description": "NotFoundError",
  7474. "content": {
  7475. "application/json": {
  7476. "schema": {
  7477. "$ref": "#/components/schemas/NotFoundError"
  7478. }
  7479. }
  7480. }
  7481. },
  7482. "409": {
  7483. "description": "SessionBusyError",
  7484. "content": {
  7485. "application/json": {
  7486. "schema": {
  7487. "$ref": "#/components/schemas/SessionBusyError"
  7488. }
  7489. }
  7490. }
  7491. }
  7492. },
  7493. "description": "Execute a shell command within the session context and return the AI's response.",
  7494. "summary": "Run shell command",
  7495. "requestBody": {
  7496. "content": {
  7497. "application/json": {
  7498. "schema": {
  7499. "type": "object",
  7500. "properties": {
  7501. "messageID": {
  7502. "type": "string",
  7503. "pattern": "^msg"
  7504. },
  7505. "agent": {
  7506. "type": "string"
  7507. },
  7508. "model": {
  7509. "type": "object",
  7510. "properties": {
  7511. "providerID": {
  7512. "type": "string"
  7513. },
  7514. "modelID": {
  7515. "type": "string"
  7516. }
  7517. },
  7518. "required": ["providerID", "modelID"],
  7519. "additionalProperties": false
  7520. },
  7521. "command": {
  7522. "type": "string"
  7523. }
  7524. },
  7525. "required": ["agent", "command"],
  7526. "additionalProperties": false
  7527. }
  7528. }
  7529. }
  7530. },
  7531. "x-codeSamples": [
  7532. {
  7533. "lang": "js",
  7534. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7535. }
  7536. ]
  7537. }
  7538. },
  7539. "/session/{sessionID}/revert": {
  7540. "post": {
  7541. "tags": ["session"],
  7542. "operationId": "session.revert",
  7543. "parameters": [
  7544. {
  7545. "name": "sessionID",
  7546. "in": "path",
  7547. "schema": {
  7548. "type": "string",
  7549. "pattern": "^ses"
  7550. },
  7551. "required": true
  7552. },
  7553. {
  7554. "name": "directory",
  7555. "in": "query",
  7556. "schema": {
  7557. "type": "string"
  7558. },
  7559. "required": false
  7560. },
  7561. {
  7562. "name": "workspace",
  7563. "in": "query",
  7564. "schema": {
  7565. "type": "string"
  7566. },
  7567. "required": false
  7568. }
  7569. ],
  7570. "responses": {
  7571. "200": {
  7572. "description": "Updated session",
  7573. "content": {
  7574. "application/json": {
  7575. "schema": {
  7576. "$ref": "#/components/schemas/Session"
  7577. }
  7578. }
  7579. }
  7580. },
  7581. "400": {
  7582. "description": "BadRequest | InvalidRequestError",
  7583. "content": {
  7584. "application/json": {
  7585. "schema": {
  7586. "anyOf": [
  7587. {
  7588. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7589. },
  7590. {
  7591. "$ref": "#/components/schemas/InvalidRequestError"
  7592. }
  7593. ]
  7594. }
  7595. }
  7596. }
  7597. },
  7598. "404": {
  7599. "description": "NotFoundError",
  7600. "content": {
  7601. "application/json": {
  7602. "schema": {
  7603. "$ref": "#/components/schemas/NotFoundError"
  7604. }
  7605. }
  7606. }
  7607. },
  7608. "409": {
  7609. "description": "SessionBusyError",
  7610. "content": {
  7611. "application/json": {
  7612. "schema": {
  7613. "$ref": "#/components/schemas/SessionBusyError"
  7614. }
  7615. }
  7616. }
  7617. }
  7618. },
  7619. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7620. "summary": "Revert message",
  7621. "requestBody": {
  7622. "content": {
  7623. "application/json": {
  7624. "schema": {
  7625. "type": "object",
  7626. "properties": {
  7627. "messageID": {
  7628. "type": "string",
  7629. "pattern": "^msg"
  7630. },
  7631. "partID": {
  7632. "type": "string",
  7633. "pattern": "^prt"
  7634. }
  7635. },
  7636. "required": ["messageID"],
  7637. "additionalProperties": false
  7638. }
  7639. }
  7640. }
  7641. },
  7642. "x-codeSamples": [
  7643. {
  7644. "lang": "js",
  7645. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7646. }
  7647. ]
  7648. }
  7649. },
  7650. "/session/{sessionID}/unrevert": {
  7651. "post": {
  7652. "tags": ["session"],
  7653. "operationId": "session.unrevert",
  7654. "parameters": [
  7655. {
  7656. "name": "sessionID",
  7657. "in": "path",
  7658. "schema": {
  7659. "type": "string",
  7660. "pattern": "^ses"
  7661. },
  7662. "required": true
  7663. },
  7664. {
  7665. "name": "directory",
  7666. "in": "query",
  7667. "schema": {
  7668. "type": "string"
  7669. },
  7670. "required": false
  7671. },
  7672. {
  7673. "name": "workspace",
  7674. "in": "query",
  7675. "schema": {
  7676. "type": "string"
  7677. },
  7678. "required": false
  7679. }
  7680. ],
  7681. "responses": {
  7682. "200": {
  7683. "description": "Updated session",
  7684. "content": {
  7685. "application/json": {
  7686. "schema": {
  7687. "$ref": "#/components/schemas/Session"
  7688. }
  7689. }
  7690. }
  7691. },
  7692. "400": {
  7693. "description": "BadRequest | InvalidRequestError",
  7694. "content": {
  7695. "application/json": {
  7696. "schema": {
  7697. "anyOf": [
  7698. {
  7699. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7700. },
  7701. {
  7702. "$ref": "#/components/schemas/InvalidRequestError"
  7703. }
  7704. ]
  7705. }
  7706. }
  7707. }
  7708. },
  7709. "404": {
  7710. "description": "NotFoundError",
  7711. "content": {
  7712. "application/json": {
  7713. "schema": {
  7714. "$ref": "#/components/schemas/NotFoundError"
  7715. }
  7716. }
  7717. }
  7718. },
  7719. "409": {
  7720. "description": "SessionBusyError",
  7721. "content": {
  7722. "application/json": {
  7723. "schema": {
  7724. "$ref": "#/components/schemas/SessionBusyError"
  7725. }
  7726. }
  7727. }
  7728. }
  7729. },
  7730. "description": "Restore all previously reverted messages in a session.",
  7731. "summary": "Restore reverted messages",
  7732. "x-codeSamples": [
  7733. {
  7734. "lang": "js",
  7735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7736. }
  7737. ]
  7738. }
  7739. },
  7740. "/session/{sessionID}/permissions/{permissionID}": {
  7741. "post": {
  7742. "tags": ["session"],
  7743. "operationId": "permission.respond",
  7744. "parameters": [
  7745. {
  7746. "name": "sessionID",
  7747. "in": "path",
  7748. "schema": {
  7749. "type": "string",
  7750. "pattern": "^ses"
  7751. },
  7752. "required": true
  7753. },
  7754. {
  7755. "name": "permissionID",
  7756. "in": "path",
  7757. "schema": {
  7758. "type": "string",
  7759. "pattern": "^per"
  7760. },
  7761. "required": true
  7762. },
  7763. {
  7764. "name": "directory",
  7765. "in": "query",
  7766. "schema": {
  7767. "type": "string"
  7768. },
  7769. "required": false
  7770. },
  7771. {
  7772. "name": "workspace",
  7773. "in": "query",
  7774. "schema": {
  7775. "type": "string"
  7776. },
  7777. "required": false
  7778. }
  7779. ],
  7780. "responses": {
  7781. "200": {
  7782. "description": "Permission processed successfully",
  7783. "content": {
  7784. "application/json": {
  7785. "schema": {
  7786. "type": "boolean",
  7787. "description": "Permission processed successfully"
  7788. }
  7789. }
  7790. }
  7791. },
  7792. "400": {
  7793. "description": "BadRequest | InvalidRequestError",
  7794. "content": {
  7795. "application/json": {
  7796. "schema": {
  7797. "anyOf": [
  7798. {
  7799. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7800. },
  7801. {
  7802. "$ref": "#/components/schemas/InvalidRequestError"
  7803. }
  7804. ]
  7805. }
  7806. }
  7807. }
  7808. },
  7809. "404": {
  7810. "description": "NotFoundError | PermissionNotFoundError",
  7811. "content": {
  7812. "application/json": {
  7813. "schema": {
  7814. "anyOf": [
  7815. {
  7816. "$ref": "#/components/schemas/NotFoundError"
  7817. },
  7818. {
  7819. "$ref": "#/components/schemas/PermissionNotFoundError"
  7820. }
  7821. ]
  7822. }
  7823. }
  7824. }
  7825. }
  7826. },
  7827. "description": "Approve or deny a permission request from the AI assistant.",
  7828. "summary": "Respond to permission",
  7829. "deprecated": true,
  7830. "requestBody": {
  7831. "content": {
  7832. "application/json": {
  7833. "schema": {
  7834. "type": "object",
  7835. "properties": {
  7836. "response": {
  7837. "type": "string",
  7838. "enum": ["once", "always", "reject"]
  7839. }
  7840. },
  7841. "required": ["response"],
  7842. "additionalProperties": false
  7843. }
  7844. }
  7845. }
  7846. },
  7847. "x-codeSamples": [
  7848. {
  7849. "lang": "js",
  7850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7851. }
  7852. ]
  7853. }
  7854. },
  7855. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7856. "delete": {
  7857. "tags": ["session"],
  7858. "operationId": "part.delete",
  7859. "parameters": [
  7860. {
  7861. "name": "sessionID",
  7862. "in": "path",
  7863. "schema": {
  7864. "type": "string",
  7865. "pattern": "^ses"
  7866. },
  7867. "required": true
  7868. },
  7869. {
  7870. "name": "messageID",
  7871. "in": "path",
  7872. "schema": {
  7873. "type": "string",
  7874. "pattern": "^msg"
  7875. },
  7876. "required": true
  7877. },
  7878. {
  7879. "name": "partID",
  7880. "in": "path",
  7881. "schema": {
  7882. "type": "string",
  7883. "pattern": "^prt"
  7884. },
  7885. "required": true
  7886. },
  7887. {
  7888. "name": "directory",
  7889. "in": "query",
  7890. "schema": {
  7891. "type": "string"
  7892. },
  7893. "required": false
  7894. },
  7895. {
  7896. "name": "workspace",
  7897. "in": "query",
  7898. "schema": {
  7899. "type": "string"
  7900. },
  7901. "required": false
  7902. }
  7903. ],
  7904. "responses": {
  7905. "200": {
  7906. "description": "Successfully deleted part",
  7907. "content": {
  7908. "application/json": {
  7909. "schema": {
  7910. "type": "boolean",
  7911. "description": "Successfully deleted part"
  7912. }
  7913. }
  7914. }
  7915. },
  7916. "400": {
  7917. "description": "BadRequest | InvalidRequestError",
  7918. "content": {
  7919. "application/json": {
  7920. "schema": {
  7921. "anyOf": [
  7922. {
  7923. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7924. },
  7925. {
  7926. "$ref": "#/components/schemas/InvalidRequestError"
  7927. }
  7928. ]
  7929. }
  7930. }
  7931. }
  7932. },
  7933. "404": {
  7934. "description": "NotFoundError",
  7935. "content": {
  7936. "application/json": {
  7937. "schema": {
  7938. "$ref": "#/components/schemas/NotFoundError"
  7939. }
  7940. }
  7941. }
  7942. }
  7943. },
  7944. "description": "Delete a part from a message.",
  7945. "x-codeSamples": [
  7946. {
  7947. "lang": "js",
  7948. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7949. }
  7950. ]
  7951. },
  7952. "patch": {
  7953. "tags": ["session"],
  7954. "operationId": "part.update",
  7955. "parameters": [
  7956. {
  7957. "name": "sessionID",
  7958. "in": "path",
  7959. "schema": {
  7960. "type": "string",
  7961. "pattern": "^ses"
  7962. },
  7963. "required": true
  7964. },
  7965. {
  7966. "name": "messageID",
  7967. "in": "path",
  7968. "schema": {
  7969. "type": "string",
  7970. "pattern": "^msg"
  7971. },
  7972. "required": true
  7973. },
  7974. {
  7975. "name": "partID",
  7976. "in": "path",
  7977. "schema": {
  7978. "type": "string",
  7979. "pattern": "^prt"
  7980. },
  7981. "required": true
  7982. },
  7983. {
  7984. "name": "directory",
  7985. "in": "query",
  7986. "schema": {
  7987. "type": "string"
  7988. },
  7989. "required": false
  7990. },
  7991. {
  7992. "name": "workspace",
  7993. "in": "query",
  7994. "schema": {
  7995. "type": "string"
  7996. },
  7997. "required": false
  7998. }
  7999. ],
  8000. "responses": {
  8001. "200": {
  8002. "description": "Successfully updated part",
  8003. "content": {
  8004. "application/json": {
  8005. "schema": {
  8006. "$ref": "#/components/schemas/Part"
  8007. }
  8008. }
  8009. }
  8010. },
  8011. "400": {
  8012. "description": "BadRequest | InvalidRequestError",
  8013. "content": {
  8014. "application/json": {
  8015. "schema": {
  8016. "anyOf": [
  8017. {
  8018. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8019. },
  8020. {
  8021. "$ref": "#/components/schemas/InvalidRequestError"
  8022. }
  8023. ]
  8024. }
  8025. }
  8026. }
  8027. },
  8028. "404": {
  8029. "description": "NotFoundError",
  8030. "content": {
  8031. "application/json": {
  8032. "schema": {
  8033. "$ref": "#/components/schemas/NotFoundError"
  8034. }
  8035. }
  8036. }
  8037. }
  8038. },
  8039. "description": "Update a part in a message.",
  8040. "requestBody": {
  8041. "content": {
  8042. "application/json": {
  8043. "schema": {
  8044. "$ref": "#/components/schemas/Part"
  8045. }
  8046. }
  8047. }
  8048. },
  8049. "x-codeSamples": [
  8050. {
  8051. "lang": "js",
  8052. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8053. }
  8054. ]
  8055. }
  8056. },
  8057. "/sync/start": {
  8058. "post": {
  8059. "tags": ["sync"],
  8060. "operationId": "sync.start",
  8061. "parameters": [
  8062. {
  8063. "name": "directory",
  8064. "in": "query",
  8065. "schema": {
  8066. "type": "string"
  8067. },
  8068. "required": false
  8069. },
  8070. {
  8071. "name": "workspace",
  8072. "in": "query",
  8073. "schema": {
  8074. "type": "string"
  8075. },
  8076. "required": false
  8077. }
  8078. ],
  8079. "responses": {
  8080. "200": {
  8081. "description": "Workspace sync started",
  8082. "content": {
  8083. "application/json": {
  8084. "schema": {
  8085. "type": "boolean",
  8086. "description": "Workspace sync started"
  8087. }
  8088. }
  8089. }
  8090. },
  8091. "400": {
  8092. "description": "Bad request",
  8093. "content": {
  8094. "application/json": {
  8095. "schema": {
  8096. "$ref": "#/components/schemas/BadRequestError"
  8097. }
  8098. }
  8099. }
  8100. }
  8101. },
  8102. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8103. "summary": "Start workspace sync",
  8104. "x-codeSamples": [
  8105. {
  8106. "lang": "js",
  8107. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8108. }
  8109. ]
  8110. }
  8111. },
  8112. "/sync/replay": {
  8113. "post": {
  8114. "tags": ["sync"],
  8115. "operationId": "sync.replay",
  8116. "parameters": [
  8117. {
  8118. "name": "directory",
  8119. "in": "query",
  8120. "schema": {
  8121. "type": "string"
  8122. },
  8123. "required": false
  8124. },
  8125. {
  8126. "name": "workspace",
  8127. "in": "query",
  8128. "schema": {
  8129. "type": "string"
  8130. },
  8131. "required": false
  8132. }
  8133. ],
  8134. "responses": {
  8135. "200": {
  8136. "description": "Replayed sync events",
  8137. "content": {
  8138. "application/json": {
  8139. "schema": {
  8140. "type": "object",
  8141. "properties": {
  8142. "sessionID": {
  8143. "type": "string"
  8144. }
  8145. },
  8146. "required": ["sessionID"],
  8147. "additionalProperties": false,
  8148. "description": "Replayed sync events"
  8149. }
  8150. }
  8151. }
  8152. },
  8153. "400": {
  8154. "description": "BadRequest | InvalidRequestError",
  8155. "content": {
  8156. "application/json": {
  8157. "schema": {
  8158. "anyOf": [
  8159. {
  8160. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8161. },
  8162. {
  8163. "$ref": "#/components/schemas/InvalidRequestError"
  8164. }
  8165. ]
  8166. }
  8167. }
  8168. }
  8169. }
  8170. },
  8171. "description": "Validate and replay a complete sync event history.",
  8172. "summary": "Replay sync events",
  8173. "requestBody": {
  8174. "content": {
  8175. "application/json": {
  8176. "schema": {
  8177. "type": "object",
  8178. "properties": {
  8179. "directory": {
  8180. "type": "string"
  8181. },
  8182. "events": {
  8183. "type": "array",
  8184. "minItems": 1,
  8185. "items": {
  8186. "type": "object",
  8187. "properties": {
  8188. "id": {
  8189. "type": "string",
  8190. "pattern": "^evt_"
  8191. },
  8192. "aggregateID": {
  8193. "type": "string"
  8194. },
  8195. "seq": {
  8196. "type": "integer",
  8197. "minimum": 0
  8198. },
  8199. "type": {
  8200. "type": "string"
  8201. },
  8202. "data": {
  8203. "type": "object"
  8204. }
  8205. },
  8206. "required": ["id", "aggregateID", "seq", "type", "data"],
  8207. "additionalProperties": false
  8208. }
  8209. }
  8210. },
  8211. "required": ["directory", "events"],
  8212. "additionalProperties": false
  8213. }
  8214. }
  8215. }
  8216. },
  8217. "x-codeSamples": [
  8218. {
  8219. "lang": "js",
  8220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8221. }
  8222. ]
  8223. }
  8224. },
  8225. "/sync/steal": {
  8226. "post": {
  8227. "tags": ["sync"],
  8228. "operationId": "sync.steal",
  8229. "parameters": [
  8230. {
  8231. "name": "directory",
  8232. "in": "query",
  8233. "schema": {
  8234. "type": "string"
  8235. },
  8236. "required": false
  8237. },
  8238. {
  8239. "name": "workspace",
  8240. "in": "query",
  8241. "schema": {
  8242. "type": "string"
  8243. },
  8244. "required": false
  8245. }
  8246. ],
  8247. "responses": {
  8248. "200": {
  8249. "description": "Session stolen into workspace",
  8250. "content": {
  8251. "application/json": {
  8252. "schema": {
  8253. "type": "object",
  8254. "properties": {
  8255. "sessionID": {
  8256. "type": "string",
  8257. "pattern": "^ses"
  8258. }
  8259. },
  8260. "required": ["sessionID"],
  8261. "additionalProperties": false,
  8262. "description": "Session stolen into workspace"
  8263. }
  8264. }
  8265. }
  8266. },
  8267. "400": {
  8268. "description": "BadRequest | InvalidRequestError",
  8269. "content": {
  8270. "application/json": {
  8271. "schema": {
  8272. "anyOf": [
  8273. {
  8274. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8275. },
  8276. {
  8277. "$ref": "#/components/schemas/InvalidRequestError"
  8278. }
  8279. ]
  8280. }
  8281. }
  8282. }
  8283. }
  8284. },
  8285. "description": "Update a session to belong to the current workspace through the sync event system.",
  8286. "summary": "Steal session into workspace",
  8287. "requestBody": {
  8288. "content": {
  8289. "application/json": {
  8290. "schema": {
  8291. "type": "object",
  8292. "properties": {
  8293. "sessionID": {
  8294. "type": "string",
  8295. "pattern": "^ses"
  8296. }
  8297. },
  8298. "required": ["sessionID"],
  8299. "additionalProperties": false
  8300. }
  8301. }
  8302. }
  8303. },
  8304. "x-codeSamples": [
  8305. {
  8306. "lang": "js",
  8307. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8308. }
  8309. ]
  8310. }
  8311. },
  8312. "/sync/history": {
  8313. "post": {
  8314. "tags": ["sync"],
  8315. "operationId": "sync.history.list",
  8316. "parameters": [
  8317. {
  8318. "name": "directory",
  8319. "in": "query",
  8320. "schema": {
  8321. "type": "string"
  8322. },
  8323. "required": false
  8324. },
  8325. {
  8326. "name": "workspace",
  8327. "in": "query",
  8328. "schema": {
  8329. "type": "string"
  8330. },
  8331. "required": false
  8332. }
  8333. ],
  8334. "responses": {
  8335. "200": {
  8336. "description": "Sync events",
  8337. "content": {
  8338. "application/json": {
  8339. "schema": {
  8340. "type": "array",
  8341. "items": {
  8342. "type": "object",
  8343. "properties": {
  8344. "id": {
  8345. "type": "string",
  8346. "pattern": "^evt_"
  8347. },
  8348. "aggregate_id": {
  8349. "type": "string"
  8350. },
  8351. "seq": {
  8352. "type": "integer",
  8353. "minimum": 0
  8354. },
  8355. "type": {
  8356. "type": "string"
  8357. },
  8358. "data": {
  8359. "type": "object"
  8360. }
  8361. },
  8362. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8363. "additionalProperties": false
  8364. },
  8365. "description": "Sync events"
  8366. }
  8367. }
  8368. }
  8369. },
  8370. "400": {
  8371. "description": "BadRequest | InvalidRequestError",
  8372. "content": {
  8373. "application/json": {
  8374. "schema": {
  8375. "anyOf": [
  8376. {
  8377. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8378. },
  8379. {
  8380. "$ref": "#/components/schemas/InvalidRequestError"
  8381. }
  8382. ]
  8383. }
  8384. }
  8385. }
  8386. }
  8387. },
  8388. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  8389. "summary": "List sync events",
  8390. "requestBody": {
  8391. "content": {
  8392. "application/json": {
  8393. "schema": {
  8394. "type": "object",
  8395. "additionalProperties": {
  8396. "type": "integer",
  8397. "minimum": 0
  8398. }
  8399. }
  8400. }
  8401. }
  8402. },
  8403. "x-codeSamples": [
  8404. {
  8405. "lang": "js",
  8406. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8407. }
  8408. ]
  8409. }
  8410. },
  8411. "/tui/append-prompt": {
  8412. "post": {
  8413. "tags": ["tui"],
  8414. "operationId": "tui.appendPrompt",
  8415. "parameters": [
  8416. {
  8417. "name": "directory",
  8418. "in": "query",
  8419. "schema": {
  8420. "type": "string"
  8421. },
  8422. "required": false
  8423. },
  8424. {
  8425. "name": "workspace",
  8426. "in": "query",
  8427. "schema": {
  8428. "type": "string"
  8429. },
  8430. "required": false
  8431. }
  8432. ],
  8433. "responses": {
  8434. "200": {
  8435. "description": "Prompt processed successfully",
  8436. "content": {
  8437. "application/json": {
  8438. "schema": {
  8439. "type": "boolean",
  8440. "description": "Prompt processed successfully"
  8441. }
  8442. }
  8443. }
  8444. },
  8445. "400": {
  8446. "description": "BadRequest | InvalidRequestError",
  8447. "content": {
  8448. "application/json": {
  8449. "schema": {
  8450. "anyOf": [
  8451. {
  8452. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8453. },
  8454. {
  8455. "$ref": "#/components/schemas/InvalidRequestError"
  8456. }
  8457. ]
  8458. }
  8459. }
  8460. }
  8461. }
  8462. },
  8463. "description": "Append prompt to the TUI.",
  8464. "summary": "Append TUI prompt",
  8465. "requestBody": {
  8466. "content": {
  8467. "application/json": {
  8468. "schema": {
  8469. "type": "object",
  8470. "properties": {
  8471. "text": {
  8472. "type": "string"
  8473. }
  8474. },
  8475. "required": ["text"],
  8476. "additionalProperties": false
  8477. }
  8478. }
  8479. }
  8480. },
  8481. "x-codeSamples": [
  8482. {
  8483. "lang": "js",
  8484. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8485. }
  8486. ]
  8487. }
  8488. },
  8489. "/tui/open-help": {
  8490. "post": {
  8491. "tags": ["tui"],
  8492. "operationId": "tui.openHelp",
  8493. "parameters": [
  8494. {
  8495. "name": "directory",
  8496. "in": "query",
  8497. "schema": {
  8498. "type": "string"
  8499. },
  8500. "required": false
  8501. },
  8502. {
  8503. "name": "workspace",
  8504. "in": "query",
  8505. "schema": {
  8506. "type": "string"
  8507. },
  8508. "required": false
  8509. }
  8510. ],
  8511. "responses": {
  8512. "200": {
  8513. "description": "Help dialog opened successfully",
  8514. "content": {
  8515. "application/json": {
  8516. "schema": {
  8517. "type": "boolean",
  8518. "description": "Help dialog opened successfully"
  8519. }
  8520. }
  8521. }
  8522. },
  8523. "400": {
  8524. "description": "Bad request",
  8525. "content": {
  8526. "application/json": {
  8527. "schema": {
  8528. "$ref": "#/components/schemas/BadRequestError"
  8529. }
  8530. }
  8531. }
  8532. }
  8533. },
  8534. "description": "Open the help dialog in the TUI to display user assistance information.",
  8535. "summary": "Open help dialog",
  8536. "x-codeSamples": [
  8537. {
  8538. "lang": "js",
  8539. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8540. }
  8541. ]
  8542. }
  8543. },
  8544. "/tui/open-sessions": {
  8545. "post": {
  8546. "tags": ["tui"],
  8547. "operationId": "tui.openSessions",
  8548. "parameters": [
  8549. {
  8550. "name": "directory",
  8551. "in": "query",
  8552. "schema": {
  8553. "type": "string"
  8554. },
  8555. "required": false
  8556. },
  8557. {
  8558. "name": "workspace",
  8559. "in": "query",
  8560. "schema": {
  8561. "type": "string"
  8562. },
  8563. "required": false
  8564. }
  8565. ],
  8566. "responses": {
  8567. "200": {
  8568. "description": "Session dialog opened successfully",
  8569. "content": {
  8570. "application/json": {
  8571. "schema": {
  8572. "type": "boolean",
  8573. "description": "Session dialog opened successfully"
  8574. }
  8575. }
  8576. }
  8577. },
  8578. "400": {
  8579. "description": "Bad request",
  8580. "content": {
  8581. "application/json": {
  8582. "schema": {
  8583. "$ref": "#/components/schemas/BadRequestError"
  8584. }
  8585. }
  8586. }
  8587. }
  8588. },
  8589. "description": "Open the session dialog.",
  8590. "summary": "Open sessions dialog",
  8591. "x-codeSamples": [
  8592. {
  8593. "lang": "js",
  8594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8595. }
  8596. ]
  8597. }
  8598. },
  8599. "/tui/open-themes": {
  8600. "post": {
  8601. "tags": ["tui"],
  8602. "operationId": "tui.openThemes",
  8603. "parameters": [
  8604. {
  8605. "name": "directory",
  8606. "in": "query",
  8607. "schema": {
  8608. "type": "string"
  8609. },
  8610. "required": false
  8611. },
  8612. {
  8613. "name": "workspace",
  8614. "in": "query",
  8615. "schema": {
  8616. "type": "string"
  8617. },
  8618. "required": false
  8619. }
  8620. ],
  8621. "responses": {
  8622. "200": {
  8623. "description": "Theme dialog opened successfully",
  8624. "content": {
  8625. "application/json": {
  8626. "schema": {
  8627. "type": "boolean",
  8628. "description": "Theme dialog opened successfully"
  8629. }
  8630. }
  8631. }
  8632. },
  8633. "400": {
  8634. "description": "Bad request",
  8635. "content": {
  8636. "application/json": {
  8637. "schema": {
  8638. "$ref": "#/components/schemas/BadRequestError"
  8639. }
  8640. }
  8641. }
  8642. }
  8643. },
  8644. "description": "Open the theme dialog.",
  8645. "summary": "Open themes dialog",
  8646. "x-codeSamples": [
  8647. {
  8648. "lang": "js",
  8649. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8650. }
  8651. ]
  8652. }
  8653. },
  8654. "/tui/open-models": {
  8655. "post": {
  8656. "tags": ["tui"],
  8657. "operationId": "tui.openModels",
  8658. "parameters": [
  8659. {
  8660. "name": "directory",
  8661. "in": "query",
  8662. "schema": {
  8663. "type": "string"
  8664. },
  8665. "required": false
  8666. },
  8667. {
  8668. "name": "workspace",
  8669. "in": "query",
  8670. "schema": {
  8671. "type": "string"
  8672. },
  8673. "required": false
  8674. }
  8675. ],
  8676. "responses": {
  8677. "200": {
  8678. "description": "Model dialog opened successfully",
  8679. "content": {
  8680. "application/json": {
  8681. "schema": {
  8682. "type": "boolean",
  8683. "description": "Model dialog opened successfully"
  8684. }
  8685. }
  8686. }
  8687. },
  8688. "400": {
  8689. "description": "Bad request",
  8690. "content": {
  8691. "application/json": {
  8692. "schema": {
  8693. "$ref": "#/components/schemas/BadRequestError"
  8694. }
  8695. }
  8696. }
  8697. }
  8698. },
  8699. "description": "Open the model dialog.",
  8700. "summary": "Open models dialog",
  8701. "x-codeSamples": [
  8702. {
  8703. "lang": "js",
  8704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8705. }
  8706. ]
  8707. }
  8708. },
  8709. "/tui/submit-prompt": {
  8710. "post": {
  8711. "tags": ["tui"],
  8712. "operationId": "tui.submitPrompt",
  8713. "parameters": [
  8714. {
  8715. "name": "directory",
  8716. "in": "query",
  8717. "schema": {
  8718. "type": "string"
  8719. },
  8720. "required": false
  8721. },
  8722. {
  8723. "name": "workspace",
  8724. "in": "query",
  8725. "schema": {
  8726. "type": "string"
  8727. },
  8728. "required": false
  8729. }
  8730. ],
  8731. "responses": {
  8732. "200": {
  8733. "description": "Prompt submitted successfully",
  8734. "content": {
  8735. "application/json": {
  8736. "schema": {
  8737. "type": "boolean",
  8738. "description": "Prompt submitted successfully"
  8739. }
  8740. }
  8741. }
  8742. },
  8743. "400": {
  8744. "description": "Bad request",
  8745. "content": {
  8746. "application/json": {
  8747. "schema": {
  8748. "$ref": "#/components/schemas/BadRequestError"
  8749. }
  8750. }
  8751. }
  8752. }
  8753. },
  8754. "description": "Submit the prompt.",
  8755. "summary": "Submit TUI prompt",
  8756. "x-codeSamples": [
  8757. {
  8758. "lang": "js",
  8759. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8760. }
  8761. ]
  8762. }
  8763. },
  8764. "/tui/clear-prompt": {
  8765. "post": {
  8766. "tags": ["tui"],
  8767. "operationId": "tui.clearPrompt",
  8768. "parameters": [
  8769. {
  8770. "name": "directory",
  8771. "in": "query",
  8772. "schema": {
  8773. "type": "string"
  8774. },
  8775. "required": false
  8776. },
  8777. {
  8778. "name": "workspace",
  8779. "in": "query",
  8780. "schema": {
  8781. "type": "string"
  8782. },
  8783. "required": false
  8784. }
  8785. ],
  8786. "responses": {
  8787. "200": {
  8788. "description": "Prompt cleared successfully",
  8789. "content": {
  8790. "application/json": {
  8791. "schema": {
  8792. "type": "boolean",
  8793. "description": "Prompt cleared successfully"
  8794. }
  8795. }
  8796. }
  8797. },
  8798. "400": {
  8799. "description": "Bad request",
  8800. "content": {
  8801. "application/json": {
  8802. "schema": {
  8803. "$ref": "#/components/schemas/BadRequestError"
  8804. }
  8805. }
  8806. }
  8807. }
  8808. },
  8809. "description": "Clear the prompt.",
  8810. "summary": "Clear TUI prompt",
  8811. "x-codeSamples": [
  8812. {
  8813. "lang": "js",
  8814. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8815. }
  8816. ]
  8817. }
  8818. },
  8819. "/tui/execute-command": {
  8820. "post": {
  8821. "tags": ["tui"],
  8822. "operationId": "tui.executeCommand",
  8823. "parameters": [
  8824. {
  8825. "name": "directory",
  8826. "in": "query",
  8827. "schema": {
  8828. "type": "string"
  8829. },
  8830. "required": false
  8831. },
  8832. {
  8833. "name": "workspace",
  8834. "in": "query",
  8835. "schema": {
  8836. "type": "string"
  8837. },
  8838. "required": false
  8839. }
  8840. ],
  8841. "responses": {
  8842. "200": {
  8843. "description": "Command executed successfully",
  8844. "content": {
  8845. "application/json": {
  8846. "schema": {
  8847. "type": "boolean",
  8848. "description": "Command executed successfully"
  8849. }
  8850. }
  8851. }
  8852. },
  8853. "400": {
  8854. "description": "BadRequest | InvalidRequestError",
  8855. "content": {
  8856. "application/json": {
  8857. "schema": {
  8858. "anyOf": [
  8859. {
  8860. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8861. },
  8862. {
  8863. "$ref": "#/components/schemas/InvalidRequestError"
  8864. }
  8865. ]
  8866. }
  8867. }
  8868. }
  8869. }
  8870. },
  8871. "description": "Execute a TUI command.",
  8872. "summary": "Execute TUI command",
  8873. "requestBody": {
  8874. "content": {
  8875. "application/json": {
  8876. "schema": {
  8877. "type": "object",
  8878. "properties": {
  8879. "command": {
  8880. "type": "string"
  8881. }
  8882. },
  8883. "required": ["command"],
  8884. "additionalProperties": false
  8885. }
  8886. }
  8887. }
  8888. },
  8889. "x-codeSamples": [
  8890. {
  8891. "lang": "js",
  8892. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8893. }
  8894. ]
  8895. }
  8896. },
  8897. "/tui/show-toast": {
  8898. "post": {
  8899. "tags": ["tui"],
  8900. "operationId": "tui.showToast",
  8901. "parameters": [
  8902. {
  8903. "name": "directory",
  8904. "in": "query",
  8905. "schema": {
  8906. "type": "string"
  8907. },
  8908. "required": false
  8909. },
  8910. {
  8911. "name": "workspace",
  8912. "in": "query",
  8913. "schema": {
  8914. "type": "string"
  8915. },
  8916. "required": false
  8917. }
  8918. ],
  8919. "responses": {
  8920. "200": {
  8921. "description": "Toast notification shown successfully",
  8922. "content": {
  8923. "application/json": {
  8924. "schema": {
  8925. "type": "boolean",
  8926. "description": "Toast notification shown successfully"
  8927. }
  8928. }
  8929. }
  8930. },
  8931. "400": {
  8932. "description": "Bad request",
  8933. "content": {
  8934. "application/json": {
  8935. "schema": {
  8936. "$ref": "#/components/schemas/BadRequestError"
  8937. }
  8938. }
  8939. }
  8940. }
  8941. },
  8942. "description": "Show a toast notification in the TUI.",
  8943. "summary": "Show TUI toast",
  8944. "requestBody": {
  8945. "content": {
  8946. "application/json": {
  8947. "schema": {
  8948. "type": "object",
  8949. "properties": {
  8950. "title": {
  8951. "type": "string"
  8952. },
  8953. "message": {
  8954. "type": "string"
  8955. },
  8956. "variant": {
  8957. "type": "string",
  8958. "enum": ["info", "success", "warning", "error"]
  8959. },
  8960. "duration": {
  8961. "type": "integer",
  8962. "exclusiveMinimum": 0
  8963. }
  8964. },
  8965. "required": ["message", "variant"],
  8966. "additionalProperties": false
  8967. }
  8968. }
  8969. }
  8970. },
  8971. "x-codeSamples": [
  8972. {
  8973. "lang": "js",
  8974. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8975. }
  8976. ]
  8977. }
  8978. },
  8979. "/tui/publish": {
  8980. "post": {
  8981. "tags": ["tui"],
  8982. "operationId": "tui.publish",
  8983. "parameters": [
  8984. {
  8985. "name": "directory",
  8986. "in": "query",
  8987. "schema": {
  8988. "type": "string"
  8989. },
  8990. "required": false
  8991. },
  8992. {
  8993. "name": "workspace",
  8994. "in": "query",
  8995. "schema": {
  8996. "type": "string"
  8997. },
  8998. "required": false
  8999. }
  9000. ],
  9001. "responses": {
  9002. "200": {
  9003. "description": "Event published successfully",
  9004. "content": {
  9005. "application/json": {
  9006. "schema": {
  9007. "type": "boolean",
  9008. "description": "Event published successfully"
  9009. }
  9010. }
  9011. }
  9012. },
  9013. "400": {
  9014. "description": "BadRequest | InvalidRequestError",
  9015. "content": {
  9016. "application/json": {
  9017. "schema": {
  9018. "anyOf": [
  9019. {
  9020. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9021. },
  9022. {
  9023. "$ref": "#/components/schemas/InvalidRequestError"
  9024. }
  9025. ]
  9026. }
  9027. }
  9028. }
  9029. }
  9030. },
  9031. "description": "Publish a TUI event.",
  9032. "summary": "Publish TUI event",
  9033. "requestBody": {
  9034. "content": {
  9035. "application/json": {
  9036. "schema": {
  9037. "anyOf": [
  9038. {
  9039. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9040. },
  9041. {
  9042. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9043. },
  9044. {
  9045. "$ref": "#/components/schemas/EventTuiToastShow"
  9046. },
  9047. {
  9048. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9049. }
  9050. ]
  9051. }
  9052. }
  9053. }
  9054. },
  9055. "x-codeSamples": [
  9056. {
  9057. "lang": "js",
  9058. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9059. }
  9060. ]
  9061. }
  9062. },
  9063. "/tui/select-session": {
  9064. "post": {
  9065. "tags": ["tui"],
  9066. "operationId": "tui.selectSession",
  9067. "parameters": [
  9068. {
  9069. "name": "directory",
  9070. "in": "query",
  9071. "schema": {
  9072. "type": "string"
  9073. },
  9074. "required": false
  9075. },
  9076. {
  9077. "name": "workspace",
  9078. "in": "query",
  9079. "schema": {
  9080. "type": "string"
  9081. },
  9082. "required": false
  9083. }
  9084. ],
  9085. "responses": {
  9086. "200": {
  9087. "description": "Session selected successfully",
  9088. "content": {
  9089. "application/json": {
  9090. "schema": {
  9091. "type": "boolean",
  9092. "description": "Session selected successfully"
  9093. }
  9094. }
  9095. }
  9096. },
  9097. "400": {
  9098. "description": "BadRequest | InvalidRequestError",
  9099. "content": {
  9100. "application/json": {
  9101. "schema": {
  9102. "anyOf": [
  9103. {
  9104. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9105. },
  9106. {
  9107. "$ref": "#/components/schemas/InvalidRequestError"
  9108. }
  9109. ]
  9110. }
  9111. }
  9112. }
  9113. },
  9114. "404": {
  9115. "description": "NotFoundError",
  9116. "content": {
  9117. "application/json": {
  9118. "schema": {
  9119. "$ref": "#/components/schemas/NotFoundError"
  9120. }
  9121. }
  9122. }
  9123. }
  9124. },
  9125. "description": "Navigate the TUI to display the specified session.",
  9126. "summary": "Select session",
  9127. "requestBody": {
  9128. "content": {
  9129. "application/json": {
  9130. "schema": {
  9131. "type": "object",
  9132. "properties": {
  9133. "sessionID": {
  9134. "type": "string",
  9135. "pattern": "^ses",
  9136. "description": "Session ID to navigate to"
  9137. }
  9138. },
  9139. "required": ["sessionID"],
  9140. "additionalProperties": false
  9141. }
  9142. }
  9143. }
  9144. },
  9145. "x-codeSamples": [
  9146. {
  9147. "lang": "js",
  9148. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9149. }
  9150. ]
  9151. }
  9152. },
  9153. "/tui/control/next": {
  9154. "get": {
  9155. "tags": ["tui"],
  9156. "operationId": "tui.control.next",
  9157. "parameters": [
  9158. {
  9159. "name": "directory",
  9160. "in": "query",
  9161. "schema": {
  9162. "type": "string"
  9163. },
  9164. "required": false
  9165. },
  9166. {
  9167. "name": "workspace",
  9168. "in": "query",
  9169. "schema": {
  9170. "type": "string"
  9171. },
  9172. "required": false
  9173. }
  9174. ],
  9175. "responses": {
  9176. "200": {
  9177. "description": "Next TUI request",
  9178. "content": {
  9179. "application/json": {
  9180. "schema": {
  9181. "type": "object",
  9182. "properties": {
  9183. "path": {
  9184. "type": "string"
  9185. },
  9186. "body": {}
  9187. },
  9188. "required": ["path", "body"],
  9189. "additionalProperties": false,
  9190. "description": "Next TUI request"
  9191. }
  9192. }
  9193. }
  9194. },
  9195. "400": {
  9196. "description": "Bad request",
  9197. "content": {
  9198. "application/json": {
  9199. "schema": {
  9200. "$ref": "#/components/schemas/BadRequestError"
  9201. }
  9202. }
  9203. }
  9204. }
  9205. },
  9206. "description": "Retrieve the next TUI request from the queue for processing.",
  9207. "summary": "Get next TUI request",
  9208. "x-codeSamples": [
  9209. {
  9210. "lang": "js",
  9211. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9212. }
  9213. ]
  9214. }
  9215. },
  9216. "/tui/control/response": {
  9217. "post": {
  9218. "tags": ["tui"],
  9219. "operationId": "tui.control.response",
  9220. "parameters": [
  9221. {
  9222. "name": "directory",
  9223. "in": "query",
  9224. "schema": {
  9225. "type": "string"
  9226. },
  9227. "required": false
  9228. },
  9229. {
  9230. "name": "workspace",
  9231. "in": "query",
  9232. "schema": {
  9233. "type": "string"
  9234. },
  9235. "required": false
  9236. }
  9237. ],
  9238. "responses": {
  9239. "200": {
  9240. "description": "Response submitted successfully",
  9241. "content": {
  9242. "application/json": {
  9243. "schema": {
  9244. "type": "boolean",
  9245. "description": "Response submitted successfully"
  9246. }
  9247. }
  9248. }
  9249. },
  9250. "400": {
  9251. "description": "Bad request",
  9252. "content": {
  9253. "application/json": {
  9254. "schema": {
  9255. "$ref": "#/components/schemas/BadRequestError"
  9256. }
  9257. }
  9258. }
  9259. }
  9260. },
  9261. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9262. "summary": "Submit TUI response",
  9263. "requestBody": {
  9264. "content": {
  9265. "application/json": {
  9266. "schema": {}
  9267. }
  9268. }
  9269. },
  9270. "x-codeSamples": [
  9271. {
  9272. "lang": "js",
  9273. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9274. }
  9275. ]
  9276. }
  9277. },
  9278. "/experimental/workspace/adapter": {
  9279. "get": {
  9280. "tags": ["workspace"],
  9281. "operationId": "experimental.workspace.adapter.list",
  9282. "parameters": [
  9283. {
  9284. "name": "directory",
  9285. "in": "query",
  9286. "schema": {
  9287. "type": "string"
  9288. },
  9289. "required": false
  9290. },
  9291. {
  9292. "name": "workspace",
  9293. "in": "query",
  9294. "schema": {
  9295. "type": "string"
  9296. },
  9297. "required": false
  9298. }
  9299. ],
  9300. "responses": {
  9301. "200": {
  9302. "description": "Workspace adapters",
  9303. "content": {
  9304. "application/json": {
  9305. "schema": {
  9306. "type": "array",
  9307. "items": {
  9308. "type": "object",
  9309. "properties": {
  9310. "type": {
  9311. "type": "string"
  9312. },
  9313. "name": {
  9314. "type": "string"
  9315. },
  9316. "description": {
  9317. "type": "string"
  9318. }
  9319. },
  9320. "required": ["type", "name", "description"],
  9321. "additionalProperties": false
  9322. },
  9323. "description": "Workspace adapters"
  9324. }
  9325. }
  9326. }
  9327. },
  9328. "400": {
  9329. "description": "Bad request",
  9330. "content": {
  9331. "application/json": {
  9332. "schema": {
  9333. "$ref": "#/components/schemas/BadRequestError"
  9334. }
  9335. }
  9336. }
  9337. }
  9338. },
  9339. "description": "List all available workspace adapters for the current project.",
  9340. "summary": "List workspace adapters",
  9341. "x-codeSamples": [
  9342. {
  9343. "lang": "js",
  9344. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9345. }
  9346. ]
  9347. }
  9348. },
  9349. "/experimental/workspace": {
  9350. "get": {
  9351. "tags": ["workspace"],
  9352. "operationId": "experimental.workspace.list",
  9353. "parameters": [
  9354. {
  9355. "name": "directory",
  9356. "in": "query",
  9357. "schema": {
  9358. "type": "string"
  9359. },
  9360. "required": false
  9361. },
  9362. {
  9363. "name": "workspace",
  9364. "in": "query",
  9365. "schema": {
  9366. "type": "string"
  9367. },
  9368. "required": false
  9369. }
  9370. ],
  9371. "responses": {
  9372. "200": {
  9373. "description": "Workspaces",
  9374. "content": {
  9375. "application/json": {
  9376. "schema": {
  9377. "type": "array",
  9378. "items": {
  9379. "$ref": "#/components/schemas/Workspace"
  9380. },
  9381. "description": "Workspaces"
  9382. }
  9383. }
  9384. }
  9385. },
  9386. "400": {
  9387. "description": "Bad request",
  9388. "content": {
  9389. "application/json": {
  9390. "schema": {
  9391. "$ref": "#/components/schemas/BadRequestError"
  9392. }
  9393. }
  9394. }
  9395. }
  9396. },
  9397. "description": "List all workspaces.",
  9398. "summary": "List workspaces",
  9399. "x-codeSamples": [
  9400. {
  9401. "lang": "js",
  9402. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9403. }
  9404. ]
  9405. },
  9406. "post": {
  9407. "tags": ["workspace"],
  9408. "operationId": "experimental.workspace.create",
  9409. "parameters": [
  9410. {
  9411. "name": "directory",
  9412. "in": "query",
  9413. "schema": {
  9414. "type": "string"
  9415. },
  9416. "required": false
  9417. },
  9418. {
  9419. "name": "workspace",
  9420. "in": "query",
  9421. "schema": {
  9422. "type": "string"
  9423. },
  9424. "required": false
  9425. }
  9426. ],
  9427. "responses": {
  9428. "200": {
  9429. "description": "Workspace created",
  9430. "content": {
  9431. "application/json": {
  9432. "schema": {
  9433. "$ref": "#/components/schemas/Workspace"
  9434. }
  9435. }
  9436. }
  9437. },
  9438. "400": {
  9439. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9440. "content": {
  9441. "application/json": {
  9442. "schema": {
  9443. "anyOf": [
  9444. {
  9445. "$ref": "#/components/schemas/WorkspaceCreateError"
  9446. },
  9447. {
  9448. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9449. },
  9450. {
  9451. "$ref": "#/components/schemas/InvalidRequestError"
  9452. }
  9453. ]
  9454. }
  9455. }
  9456. }
  9457. }
  9458. },
  9459. "description": "Create a workspace for the current project.",
  9460. "summary": "Create workspace",
  9461. "requestBody": {
  9462. "content": {
  9463. "application/json": {
  9464. "schema": {
  9465. "type": "object",
  9466. "properties": {
  9467. "id": {
  9468. "type": "string",
  9469. "pattern": "^wrk"
  9470. },
  9471. "type": {
  9472. "type": "string"
  9473. },
  9474. "branch": {
  9475. "anyOf": [
  9476. {
  9477. "type": "string"
  9478. },
  9479. {
  9480. "type": "null"
  9481. }
  9482. ]
  9483. },
  9484. "extra": {
  9485. "anyOf": [
  9486. {},
  9487. {
  9488. "type": "null"
  9489. }
  9490. ]
  9491. }
  9492. },
  9493. "required": ["type"],
  9494. "additionalProperties": false
  9495. }
  9496. }
  9497. }
  9498. },
  9499. "x-codeSamples": [
  9500. {
  9501. "lang": "js",
  9502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9503. }
  9504. ]
  9505. }
  9506. },
  9507. "/experimental/workspace/sync-list": {
  9508. "post": {
  9509. "tags": ["workspace"],
  9510. "operationId": "experimental.workspace.syncList",
  9511. "parameters": [
  9512. {
  9513. "name": "directory",
  9514. "in": "query",
  9515. "schema": {
  9516. "type": "string"
  9517. },
  9518. "required": false
  9519. },
  9520. {
  9521. "name": "workspace",
  9522. "in": "query",
  9523. "schema": {
  9524. "type": "string"
  9525. },
  9526. "required": false
  9527. }
  9528. ],
  9529. "responses": {
  9530. "204": {
  9531. "description": "Workspace list synced"
  9532. },
  9533. "400": {
  9534. "description": "Bad request",
  9535. "content": {
  9536. "application/json": {
  9537. "schema": {
  9538. "$ref": "#/components/schemas/BadRequestError"
  9539. }
  9540. }
  9541. }
  9542. }
  9543. },
  9544. "description": "Register missing workspaces returned by workspace adapters.",
  9545. "summary": "Sync workspace list",
  9546. "x-codeSamples": [
  9547. {
  9548. "lang": "js",
  9549. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9550. }
  9551. ]
  9552. }
  9553. },
  9554. "/experimental/workspace/status": {
  9555. "get": {
  9556. "tags": ["workspace"],
  9557. "operationId": "experimental.workspace.status",
  9558. "parameters": [
  9559. {
  9560. "name": "directory",
  9561. "in": "query",
  9562. "schema": {
  9563. "type": "string"
  9564. },
  9565. "required": false
  9566. },
  9567. {
  9568. "name": "workspace",
  9569. "in": "query",
  9570. "schema": {
  9571. "type": "string"
  9572. },
  9573. "required": false
  9574. }
  9575. ],
  9576. "responses": {
  9577. "200": {
  9578. "description": "Workspace status",
  9579. "content": {
  9580. "application/json": {
  9581. "schema": {
  9582. "type": "array",
  9583. "items": {
  9584. "$ref": "#/components/schemas/WorkspaceEventConnectionStatus"
  9585. },
  9586. "description": "Workspace status"
  9587. }
  9588. }
  9589. }
  9590. },
  9591. "400": {
  9592. "description": "Bad request",
  9593. "content": {
  9594. "application/json": {
  9595. "schema": {
  9596. "$ref": "#/components/schemas/BadRequestError"
  9597. }
  9598. }
  9599. }
  9600. }
  9601. },
  9602. "description": "Get connection status for workspaces in the current project.",
  9603. "summary": "Workspace status",
  9604. "x-codeSamples": [
  9605. {
  9606. "lang": "js",
  9607. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9608. }
  9609. ]
  9610. }
  9611. },
  9612. "/experimental/workspace/{id}": {
  9613. "delete": {
  9614. "tags": ["workspace"],
  9615. "operationId": "experimental.workspace.remove",
  9616. "parameters": [
  9617. {
  9618. "name": "id",
  9619. "in": "path",
  9620. "schema": {
  9621. "type": "string",
  9622. "pattern": "^wrk"
  9623. },
  9624. "required": true
  9625. },
  9626. {
  9627. "name": "directory",
  9628. "in": "query",
  9629. "schema": {
  9630. "type": "string"
  9631. },
  9632. "required": false
  9633. },
  9634. {
  9635. "name": "workspace",
  9636. "in": "query",
  9637. "schema": {
  9638. "type": "string"
  9639. },
  9640. "required": false
  9641. }
  9642. ],
  9643. "responses": {
  9644. "200": {
  9645. "description": "Workspace removed",
  9646. "content": {
  9647. "application/json": {
  9648. "schema": {
  9649. "$ref": "#/components/schemas/Workspace"
  9650. }
  9651. }
  9652. }
  9653. },
  9654. "400": {
  9655. "description": "BadRequest | InvalidRequestError",
  9656. "content": {
  9657. "application/json": {
  9658. "schema": {
  9659. "anyOf": [
  9660. {
  9661. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9662. },
  9663. {
  9664. "$ref": "#/components/schemas/InvalidRequestError"
  9665. }
  9666. ]
  9667. }
  9668. }
  9669. }
  9670. }
  9671. },
  9672. "description": "Remove an existing workspace.",
  9673. "summary": "Remove workspace",
  9674. "x-codeSamples": [
  9675. {
  9676. "lang": "js",
  9677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9678. }
  9679. ]
  9680. }
  9681. },
  9682. "/experimental/workspace/warp": {
  9683. "post": {
  9684. "tags": ["workspace"],
  9685. "operationId": "experimental.workspace.warp",
  9686. "parameters": [
  9687. {
  9688. "name": "directory",
  9689. "in": "query",
  9690. "schema": {
  9691. "type": "string"
  9692. },
  9693. "required": false
  9694. },
  9695. {
  9696. "name": "workspace",
  9697. "in": "query",
  9698. "schema": {
  9699. "type": "string"
  9700. },
  9701. "required": false
  9702. }
  9703. ],
  9704. "responses": {
  9705. "204": {
  9706. "description": "Session warped"
  9707. },
  9708. "400": {
  9709. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9710. "content": {
  9711. "application/json": {
  9712. "schema": {
  9713. "anyOf": [
  9714. {
  9715. "$ref": "#/components/schemas/WorkspaceWarpError"
  9716. },
  9717. {
  9718. "$ref": "#/components/schemas/VcsApplyError"
  9719. },
  9720. {
  9721. "$ref": "#/components/schemas/InvalidRequestError"
  9722. }
  9723. ]
  9724. }
  9725. }
  9726. }
  9727. },
  9728. "404": {
  9729. "description": "NotFoundError",
  9730. "content": {
  9731. "application/json": {
  9732. "schema": {
  9733. "$ref": "#/components/schemas/NotFoundError"
  9734. }
  9735. }
  9736. }
  9737. }
  9738. },
  9739. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9740. "summary": "Warp session into workspace",
  9741. "requestBody": {
  9742. "content": {
  9743. "application/json": {
  9744. "schema": {
  9745. "type": "object",
  9746. "properties": {
  9747. "id": {
  9748. "anyOf": [
  9749. {
  9750. "type": "string",
  9751. "pattern": "^wrk"
  9752. },
  9753. {
  9754. "type": "null"
  9755. }
  9756. ]
  9757. },
  9758. "sessionID": {
  9759. "type": "string",
  9760. "pattern": "^ses"
  9761. },
  9762. "copyChanges": {
  9763. "type": "boolean"
  9764. }
  9765. },
  9766. "required": ["id", "sessionID"],
  9767. "additionalProperties": false
  9768. }
  9769. }
  9770. }
  9771. },
  9772. "x-codeSamples": [
  9773. {
  9774. "lang": "js",
  9775. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9776. }
  9777. ]
  9778. }
  9779. },
  9780. "/api/health": {
  9781. "get": {
  9782. "tags": ["opencode HttpApi"],
  9783. "operationId": "v2.health.get",
  9784. "parameters": [],
  9785. "security": [],
  9786. "responses": {
  9787. "200": {
  9788. "description": "Success",
  9789. "content": {
  9790. "application/json": {
  9791. "schema": {
  9792. "type": "object",
  9793. "properties": {
  9794. "healthy": {
  9795. "type": "boolean",
  9796. "enum": [true]
  9797. }
  9798. },
  9799. "required": ["healthy"],
  9800. "additionalProperties": false
  9801. }
  9802. }
  9803. }
  9804. },
  9805. "400": {
  9806. "description": "InvalidRequestError",
  9807. "content": {
  9808. "application/json": {
  9809. "schema": {
  9810. "$ref": "#/components/schemas/InvalidRequestError"
  9811. }
  9812. }
  9813. }
  9814. },
  9815. "401": {
  9816. "description": "UnauthorizedError",
  9817. "content": {
  9818. "application/json": {
  9819. "schema": {
  9820. "$ref": "#/components/schemas/UnauthorizedError"
  9821. }
  9822. }
  9823. }
  9824. }
  9825. },
  9826. "description": "Check whether the API server is ready to accept requests.",
  9827. "summary": "Check server health",
  9828. "x-codeSamples": [
  9829. {
  9830. "lang": "js",
  9831. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9832. }
  9833. ]
  9834. }
  9835. },
  9836. "/api/location": {
  9837. "get": {
  9838. "tags": ["opencode HttpApi"],
  9839. "operationId": "v2.location.get",
  9840. "parameters": [
  9841. {
  9842. "name": "location",
  9843. "in": "query",
  9844. "schema": {
  9845. "type": "object",
  9846. "properties": {
  9847. "directory": {
  9848. "type": "string"
  9849. },
  9850. "workspace": {
  9851. "type": "string"
  9852. }
  9853. },
  9854. "additionalProperties": false
  9855. },
  9856. "required": false,
  9857. "style": "deepObject",
  9858. "explode": true
  9859. }
  9860. ],
  9861. "security": [],
  9862. "responses": {
  9863. "200": {
  9864. "description": "Location.Info",
  9865. "content": {
  9866. "application/json": {
  9867. "schema": {
  9868. "$ref": "#/components/schemas/LocationInfo"
  9869. }
  9870. }
  9871. }
  9872. },
  9873. "400": {
  9874. "description": "InvalidRequestError",
  9875. "content": {
  9876. "application/json": {
  9877. "schema": {
  9878. "$ref": "#/components/schemas/InvalidRequestError"
  9879. }
  9880. }
  9881. }
  9882. },
  9883. "401": {
  9884. "description": "UnauthorizedError",
  9885. "content": {
  9886. "application/json": {
  9887. "schema": {
  9888. "$ref": "#/components/schemas/UnauthorizedError"
  9889. }
  9890. }
  9891. }
  9892. }
  9893. },
  9894. "description": "Resolve the requested location or the server default location.",
  9895. "summary": "Get location",
  9896. "x-codeSamples": [
  9897. {
  9898. "lang": "js",
  9899. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  9900. }
  9901. ]
  9902. }
  9903. },
  9904. "/api/agent": {
  9905. "get": {
  9906. "tags": ["opencode HttpApi"],
  9907. "operationId": "v2.agent.list",
  9908. "parameters": [
  9909. {
  9910. "name": "location",
  9911. "in": "query",
  9912. "schema": {
  9913. "type": "object",
  9914. "properties": {
  9915. "directory": {
  9916. "type": "string"
  9917. },
  9918. "workspace": {
  9919. "type": "string"
  9920. }
  9921. },
  9922. "additionalProperties": false
  9923. },
  9924. "required": false,
  9925. "style": "deepObject",
  9926. "explode": true
  9927. }
  9928. ],
  9929. "security": [],
  9930. "responses": {
  9931. "200": {
  9932. "description": "Success",
  9933. "content": {
  9934. "application/json": {
  9935. "schema": {
  9936. "type": "object",
  9937. "properties": {
  9938. "location": {
  9939. "$ref": "#/components/schemas/LocationInfo"
  9940. },
  9941. "data": {
  9942. "type": "array",
  9943. "items": {
  9944. "$ref": "#/components/schemas/AgentV2Info"
  9945. }
  9946. }
  9947. },
  9948. "required": ["location", "data"],
  9949. "additionalProperties": false
  9950. }
  9951. }
  9952. }
  9953. },
  9954. "400": {
  9955. "description": "InvalidRequestError",
  9956. "content": {
  9957. "application/json": {
  9958. "schema": {
  9959. "$ref": "#/components/schemas/InvalidRequestError"
  9960. }
  9961. }
  9962. }
  9963. },
  9964. "401": {
  9965. "description": "UnauthorizedError",
  9966. "content": {
  9967. "application/json": {
  9968. "schema": {
  9969. "$ref": "#/components/schemas/UnauthorizedError"
  9970. }
  9971. }
  9972. }
  9973. }
  9974. },
  9975. "description": "Retrieve currently registered agents.",
  9976. "summary": "List agents",
  9977. "x-codeSamples": [
  9978. {
  9979. "lang": "js",
  9980. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  9981. }
  9982. ]
  9983. }
  9984. },
  9985. "/api/session": {
  9986. "get": {
  9987. "tags": ["sessions"],
  9988. "operationId": "v2.session.list",
  9989. "parameters": [
  9990. {
  9991. "name": "workspace",
  9992. "in": "query",
  9993. "schema": {
  9994. "type": "string",
  9995. "pattern": "^wrk"
  9996. },
  9997. "required": false
  9998. },
  9999. {
  10000. "name": "limit",
  10001. "in": "query",
  10002. "schema": {
  10003. "type": "number"
  10004. },
  10005. "required": false
  10006. },
  10007. {
  10008. "name": "order",
  10009. "in": "query",
  10010. "schema": {
  10011. "type": "string",
  10012. "enum": ["asc", "desc"]
  10013. },
  10014. "required": false
  10015. },
  10016. {
  10017. "name": "search",
  10018. "in": "query",
  10019. "schema": {
  10020. "type": "string"
  10021. },
  10022. "required": false
  10023. },
  10024. {
  10025. "name": "directory",
  10026. "in": "query",
  10027. "schema": {
  10028. "type": "string"
  10029. },
  10030. "required": false
  10031. },
  10032. {
  10033. "name": "project",
  10034. "in": "query",
  10035. "schema": {
  10036. "type": "string"
  10037. },
  10038. "required": false
  10039. },
  10040. {
  10041. "name": "subpath",
  10042. "in": "query",
  10043. "schema": {
  10044. "type": "string"
  10045. },
  10046. "required": false
  10047. },
  10048. {
  10049. "name": "cursor",
  10050. "in": "query",
  10051. "schema": {
  10052. "type": "string",
  10053. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10054. },
  10055. "required": false
  10056. }
  10057. ],
  10058. "security": [],
  10059. "responses": {
  10060. "200": {
  10061. "description": "SessionsResponse",
  10062. "content": {
  10063. "application/json": {
  10064. "schema": {
  10065. "$ref": "#/components/schemas/SessionsResponse"
  10066. }
  10067. }
  10068. }
  10069. },
  10070. "400": {
  10071. "description": "InvalidCursorError | InvalidRequestError",
  10072. "content": {
  10073. "application/json": {
  10074. "schema": {
  10075. "anyOf": [
  10076. {
  10077. "$ref": "#/components/schemas/InvalidCursorError"
  10078. },
  10079. {
  10080. "$ref": "#/components/schemas/InvalidRequestError"
  10081. },
  10082. {
  10083. "$ref": "#/components/schemas/InvalidRequestError"
  10084. }
  10085. ]
  10086. }
  10087. }
  10088. }
  10089. },
  10090. "401": {
  10091. "description": "UnauthorizedError",
  10092. "content": {
  10093. "application/json": {
  10094. "schema": {
  10095. "$ref": "#/components/schemas/UnauthorizedError"
  10096. }
  10097. }
  10098. }
  10099. }
  10100. },
  10101. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  10102. "summary": "List sessions",
  10103. "x-codeSamples": [
  10104. {
  10105. "lang": "js",
  10106. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10107. }
  10108. ]
  10109. },
  10110. "post": {
  10111. "tags": ["sessions"],
  10112. "operationId": "v2.session.create",
  10113. "parameters": [],
  10114. "security": [],
  10115. "responses": {
  10116. "200": {
  10117. "description": "Success",
  10118. "content": {
  10119. "application/json": {
  10120. "schema": {
  10121. "type": "object",
  10122. "properties": {
  10123. "data": {
  10124. "$ref": "#/components/schemas/SessionV2Info"
  10125. }
  10126. },
  10127. "required": ["data"],
  10128. "additionalProperties": false
  10129. }
  10130. }
  10131. }
  10132. },
  10133. "400": {
  10134. "description": "InvalidRequestError",
  10135. "content": {
  10136. "application/json": {
  10137. "schema": {
  10138. "$ref": "#/components/schemas/InvalidRequestError"
  10139. }
  10140. }
  10141. }
  10142. },
  10143. "401": {
  10144. "description": "UnauthorizedError",
  10145. "content": {
  10146. "application/json": {
  10147. "schema": {
  10148. "$ref": "#/components/schemas/UnauthorizedError"
  10149. }
  10150. }
  10151. }
  10152. }
  10153. },
  10154. "description": "Create a session at the requested location.",
  10155. "summary": "Create session",
  10156. "requestBody": {
  10157. "content": {
  10158. "application/json": {
  10159. "schema": {
  10160. "type": "object",
  10161. "properties": {
  10162. "id": {
  10163. "type": "string",
  10164. "pattern": "^ses"
  10165. },
  10166. "agent": {
  10167. "type": "string"
  10168. },
  10169. "model": {
  10170. "$ref": "#/components/schemas/ModelRef"
  10171. },
  10172. "location": {
  10173. "$ref": "#/components/schemas/LocationRef"
  10174. }
  10175. },
  10176. "additionalProperties": false
  10177. }
  10178. }
  10179. },
  10180. "required": true
  10181. },
  10182. "x-codeSamples": [
  10183. {
  10184. "lang": "js",
  10185. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10186. }
  10187. ]
  10188. }
  10189. },
  10190. "/api/session/active": {
  10191. "get": {
  10192. "tags": ["sessions"],
  10193. "operationId": "v2.session.active",
  10194. "parameters": [],
  10195. "security": [],
  10196. "responses": {
  10197. "200": {
  10198. "description": "Success",
  10199. "content": {
  10200. "application/json": {
  10201. "schema": {
  10202. "type": "object",
  10203. "properties": {
  10204. "data": {
  10205. "type": "object",
  10206. "patternProperties": {
  10207. "^ses": {
  10208. "$ref": "#/components/schemas/SessionActive"
  10209. }
  10210. }
  10211. }
  10212. },
  10213. "required": ["data"],
  10214. "additionalProperties": false
  10215. }
  10216. }
  10217. }
  10218. },
  10219. "400": {
  10220. "description": "InvalidRequestError",
  10221. "content": {
  10222. "application/json": {
  10223. "schema": {
  10224. "$ref": "#/components/schemas/InvalidRequestError"
  10225. }
  10226. }
  10227. }
  10228. },
  10229. "401": {
  10230. "description": "UnauthorizedError",
  10231. "content": {
  10232. "application/json": {
  10233. "schema": {
  10234. "$ref": "#/components/schemas/UnauthorizedError"
  10235. }
  10236. }
  10237. }
  10238. }
  10239. },
  10240. "description": "Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.",
  10241. "summary": "List active sessions",
  10242. "x-codeSamples": [
  10243. {
  10244. "lang": "js",
  10245. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.active({\n ...\n})"
  10246. }
  10247. ]
  10248. }
  10249. },
  10250. "/api/session/{sessionID}": {
  10251. "get": {
  10252. "tags": ["sessions"],
  10253. "operationId": "v2.session.get",
  10254. "parameters": [
  10255. {
  10256. "name": "sessionID",
  10257. "in": "path",
  10258. "schema": {
  10259. "type": "string",
  10260. "pattern": "^ses"
  10261. },
  10262. "required": true
  10263. }
  10264. ],
  10265. "security": [],
  10266. "responses": {
  10267. "200": {
  10268. "description": "Success",
  10269. "content": {
  10270. "application/json": {
  10271. "schema": {
  10272. "type": "object",
  10273. "properties": {
  10274. "data": {
  10275. "$ref": "#/components/schemas/SessionV2Info"
  10276. }
  10277. },
  10278. "required": ["data"],
  10279. "additionalProperties": false
  10280. }
  10281. }
  10282. }
  10283. },
  10284. "400": {
  10285. "description": "InvalidRequestError",
  10286. "content": {
  10287. "application/json": {
  10288. "schema": {
  10289. "$ref": "#/components/schemas/InvalidRequestError"
  10290. }
  10291. }
  10292. }
  10293. },
  10294. "401": {
  10295. "description": "UnauthorizedError",
  10296. "content": {
  10297. "application/json": {
  10298. "schema": {
  10299. "$ref": "#/components/schemas/UnauthorizedError"
  10300. }
  10301. }
  10302. }
  10303. },
  10304. "404": {
  10305. "description": "SessionNotFoundError",
  10306. "content": {
  10307. "application/json": {
  10308. "schema": {
  10309. "anyOf": [
  10310. {
  10311. "$ref": "#/components/schemas/SessionNotFoundError"
  10312. },
  10313. {
  10314. "$ref": "#/components/schemas/SessionNotFoundError"
  10315. }
  10316. ]
  10317. }
  10318. }
  10319. }
  10320. }
  10321. },
  10322. "description": "Retrieve a session by ID.",
  10323. "summary": "Get session",
  10324. "x-codeSamples": [
  10325. {
  10326. "lang": "js",
  10327. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10328. }
  10329. ]
  10330. }
  10331. },
  10332. "/api/session/{sessionID}/agent": {
  10333. "post": {
  10334. "tags": ["sessions"],
  10335. "operationId": "v2.session.switchAgent",
  10336. "parameters": [
  10337. {
  10338. "name": "sessionID",
  10339. "in": "path",
  10340. "schema": {
  10341. "type": "string",
  10342. "pattern": "^ses"
  10343. },
  10344. "required": true
  10345. }
  10346. ],
  10347. "security": [],
  10348. "responses": {
  10349. "204": {
  10350. "description": "<No Content>"
  10351. },
  10352. "400": {
  10353. "description": "InvalidRequestError",
  10354. "content": {
  10355. "application/json": {
  10356. "schema": {
  10357. "$ref": "#/components/schemas/InvalidRequestError"
  10358. }
  10359. }
  10360. }
  10361. },
  10362. "401": {
  10363. "description": "UnauthorizedError",
  10364. "content": {
  10365. "application/json": {
  10366. "schema": {
  10367. "$ref": "#/components/schemas/UnauthorizedError"
  10368. }
  10369. }
  10370. }
  10371. },
  10372. "404": {
  10373. "description": "SessionNotFoundError",
  10374. "content": {
  10375. "application/json": {
  10376. "schema": {
  10377. "anyOf": [
  10378. {
  10379. "$ref": "#/components/schemas/SessionNotFoundError"
  10380. },
  10381. {
  10382. "$ref": "#/components/schemas/SessionNotFoundError"
  10383. }
  10384. ]
  10385. }
  10386. }
  10387. }
  10388. }
  10389. },
  10390. "description": "Switch the agent used by subsequent provider turns.",
  10391. "summary": "Switch session agent",
  10392. "requestBody": {
  10393. "content": {
  10394. "application/json": {
  10395. "schema": {
  10396. "type": "object",
  10397. "properties": {
  10398. "agent": {
  10399. "type": "string"
  10400. }
  10401. },
  10402. "required": ["agent"],
  10403. "additionalProperties": false
  10404. }
  10405. }
  10406. },
  10407. "required": true
  10408. },
  10409. "x-codeSamples": [
  10410. {
  10411. "lang": "js",
  10412. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchAgent({\n ...\n})"
  10413. }
  10414. ]
  10415. }
  10416. },
  10417. "/api/session/{sessionID}/model": {
  10418. "post": {
  10419. "tags": ["sessions"],
  10420. "operationId": "v2.session.switchModel",
  10421. "parameters": [
  10422. {
  10423. "name": "sessionID",
  10424. "in": "path",
  10425. "schema": {
  10426. "type": "string",
  10427. "pattern": "^ses"
  10428. },
  10429. "required": true
  10430. }
  10431. ],
  10432. "security": [],
  10433. "responses": {
  10434. "204": {
  10435. "description": "<No Content>"
  10436. },
  10437. "400": {
  10438. "description": "InvalidRequestError",
  10439. "content": {
  10440. "application/json": {
  10441. "schema": {
  10442. "$ref": "#/components/schemas/InvalidRequestError"
  10443. }
  10444. }
  10445. }
  10446. },
  10447. "401": {
  10448. "description": "UnauthorizedError",
  10449. "content": {
  10450. "application/json": {
  10451. "schema": {
  10452. "$ref": "#/components/schemas/UnauthorizedError"
  10453. }
  10454. }
  10455. }
  10456. },
  10457. "404": {
  10458. "description": "SessionNotFoundError",
  10459. "content": {
  10460. "application/json": {
  10461. "schema": {
  10462. "anyOf": [
  10463. {
  10464. "$ref": "#/components/schemas/SessionNotFoundError"
  10465. },
  10466. {
  10467. "$ref": "#/components/schemas/SessionNotFoundError"
  10468. }
  10469. ]
  10470. }
  10471. }
  10472. }
  10473. }
  10474. },
  10475. "description": "Switch the model used by subsequent provider turns.",
  10476. "summary": "Switch session model",
  10477. "requestBody": {
  10478. "content": {
  10479. "application/json": {
  10480. "schema": {
  10481. "type": "object",
  10482. "properties": {
  10483. "model": {
  10484. "$ref": "#/components/schemas/ModelRef"
  10485. }
  10486. },
  10487. "required": ["model"],
  10488. "additionalProperties": false
  10489. }
  10490. }
  10491. },
  10492. "required": true
  10493. },
  10494. "x-codeSamples": [
  10495. {
  10496. "lang": "js",
  10497. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchModel({\n ...\n})"
  10498. }
  10499. ]
  10500. }
  10501. },
  10502. "/api/session/{sessionID}/prompt": {
  10503. "post": {
  10504. "tags": ["sessions"],
  10505. "operationId": "v2.session.prompt",
  10506. "parameters": [
  10507. {
  10508. "name": "sessionID",
  10509. "in": "path",
  10510. "schema": {
  10511. "type": "string",
  10512. "pattern": "^ses"
  10513. },
  10514. "required": true
  10515. }
  10516. ],
  10517. "security": [],
  10518. "responses": {
  10519. "200": {
  10520. "description": "Success",
  10521. "content": {
  10522. "application/json": {
  10523. "schema": {
  10524. "type": "object",
  10525. "properties": {
  10526. "data": {
  10527. "$ref": "#/components/schemas/SessionInputAdmitted"
  10528. }
  10529. },
  10530. "required": ["data"],
  10531. "additionalProperties": false
  10532. }
  10533. }
  10534. }
  10535. },
  10536. "400": {
  10537. "description": "InvalidRequestError",
  10538. "content": {
  10539. "application/json": {
  10540. "schema": {
  10541. "$ref": "#/components/schemas/InvalidRequestError"
  10542. }
  10543. }
  10544. }
  10545. },
  10546. "401": {
  10547. "description": "UnauthorizedError",
  10548. "content": {
  10549. "application/json": {
  10550. "schema": {
  10551. "$ref": "#/components/schemas/UnauthorizedError"
  10552. }
  10553. }
  10554. }
  10555. },
  10556. "404": {
  10557. "description": "SessionNotFoundError",
  10558. "content": {
  10559. "application/json": {
  10560. "schema": {
  10561. "anyOf": [
  10562. {
  10563. "$ref": "#/components/schemas/SessionNotFoundError"
  10564. },
  10565. {
  10566. "$ref": "#/components/schemas/SessionNotFoundError"
  10567. }
  10568. ]
  10569. }
  10570. }
  10571. }
  10572. },
  10573. "409": {
  10574. "description": "ConflictError",
  10575. "content": {
  10576. "application/json": {
  10577. "schema": {
  10578. "$ref": "#/components/schemas/ConflictError"
  10579. }
  10580. }
  10581. }
  10582. }
  10583. },
  10584. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10585. "summary": "Send message",
  10586. "requestBody": {
  10587. "content": {
  10588. "application/json": {
  10589. "schema": {
  10590. "type": "object",
  10591. "properties": {
  10592. "id": {
  10593. "type": "string",
  10594. "pattern": "^msg_"
  10595. },
  10596. "prompt": {
  10597. "$ref": "#/components/schemas/PromptInput"
  10598. },
  10599. "delivery": {
  10600. "type": "string",
  10601. "enum": ["steer", "queue"]
  10602. },
  10603. "resume": {
  10604. "type": "boolean"
  10605. }
  10606. },
  10607. "required": ["prompt"],
  10608. "additionalProperties": false
  10609. }
  10610. }
  10611. },
  10612. "required": true
  10613. },
  10614. "x-codeSamples": [
  10615. {
  10616. "lang": "js",
  10617. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10618. }
  10619. ]
  10620. }
  10621. },
  10622. "/api/session/{sessionID}/compact": {
  10623. "post": {
  10624. "tags": ["sessions"],
  10625. "operationId": "v2.session.compact",
  10626. "parameters": [
  10627. {
  10628. "name": "sessionID",
  10629. "in": "path",
  10630. "schema": {
  10631. "type": "string",
  10632. "pattern": "^ses"
  10633. },
  10634. "required": true
  10635. }
  10636. ],
  10637. "security": [],
  10638. "responses": {
  10639. "204": {
  10640. "description": "<No Content>"
  10641. },
  10642. "400": {
  10643. "description": "InvalidRequestError",
  10644. "content": {
  10645. "application/json": {
  10646. "schema": {
  10647. "$ref": "#/components/schemas/InvalidRequestError"
  10648. }
  10649. }
  10650. }
  10651. },
  10652. "401": {
  10653. "description": "UnauthorizedError",
  10654. "content": {
  10655. "application/json": {
  10656. "schema": {
  10657. "$ref": "#/components/schemas/UnauthorizedError"
  10658. }
  10659. }
  10660. }
  10661. },
  10662. "404": {
  10663. "description": "SessionNotFoundError",
  10664. "content": {
  10665. "application/json": {
  10666. "schema": {
  10667. "anyOf": [
  10668. {
  10669. "$ref": "#/components/schemas/SessionNotFoundError"
  10670. },
  10671. {
  10672. "$ref": "#/components/schemas/SessionNotFoundError"
  10673. }
  10674. ]
  10675. }
  10676. }
  10677. }
  10678. },
  10679. "503": {
  10680. "description": "ServiceUnavailableError",
  10681. "content": {
  10682. "application/json": {
  10683. "schema": {
  10684. "$ref": "#/components/schemas/ServiceUnavailableError"
  10685. }
  10686. }
  10687. }
  10688. }
  10689. },
  10690. "description": "Compact a session conversation.",
  10691. "summary": "Compact session",
  10692. "x-codeSamples": [
  10693. {
  10694. "lang": "js",
  10695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10696. }
  10697. ]
  10698. }
  10699. },
  10700. "/api/session/{sessionID}/wait": {
  10701. "post": {
  10702. "tags": ["sessions"],
  10703. "operationId": "v2.session.wait",
  10704. "parameters": [
  10705. {
  10706. "name": "sessionID",
  10707. "in": "path",
  10708. "schema": {
  10709. "type": "string",
  10710. "pattern": "^ses"
  10711. },
  10712. "required": true
  10713. }
  10714. ],
  10715. "security": [],
  10716. "responses": {
  10717. "204": {
  10718. "description": "<No Content>"
  10719. },
  10720. "400": {
  10721. "description": "InvalidRequestError",
  10722. "content": {
  10723. "application/json": {
  10724. "schema": {
  10725. "$ref": "#/components/schemas/InvalidRequestError"
  10726. }
  10727. }
  10728. }
  10729. },
  10730. "401": {
  10731. "description": "UnauthorizedError",
  10732. "content": {
  10733. "application/json": {
  10734. "schema": {
  10735. "$ref": "#/components/schemas/UnauthorizedError"
  10736. }
  10737. }
  10738. }
  10739. },
  10740. "404": {
  10741. "description": "SessionNotFoundError",
  10742. "content": {
  10743. "application/json": {
  10744. "schema": {
  10745. "anyOf": [
  10746. {
  10747. "$ref": "#/components/schemas/SessionNotFoundError"
  10748. },
  10749. {
  10750. "$ref": "#/components/schemas/SessionNotFoundError"
  10751. }
  10752. ]
  10753. }
  10754. }
  10755. }
  10756. },
  10757. "503": {
  10758. "description": "ServiceUnavailableError",
  10759. "content": {
  10760. "application/json": {
  10761. "schema": {
  10762. "$ref": "#/components/schemas/ServiceUnavailableError"
  10763. }
  10764. }
  10765. }
  10766. }
  10767. },
  10768. "description": "Wait for a session agent loop to become idle.",
  10769. "summary": "Wait for session",
  10770. "x-codeSamples": [
  10771. {
  10772. "lang": "js",
  10773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10774. }
  10775. ]
  10776. }
  10777. },
  10778. "/api/session/{sessionID}/revert/stage": {
  10779. "post": {
  10780. "tags": ["sessions"],
  10781. "operationId": "v2.session.revert.stage",
  10782. "parameters": [
  10783. {
  10784. "name": "sessionID",
  10785. "in": "path",
  10786. "schema": {
  10787. "type": "string",
  10788. "pattern": "^ses"
  10789. },
  10790. "required": true
  10791. }
  10792. ],
  10793. "security": [],
  10794. "responses": {
  10795. "200": {
  10796. "description": "Success",
  10797. "content": {
  10798. "application/json": {
  10799. "schema": {
  10800. "type": "object",
  10801. "properties": {
  10802. "data": {
  10803. "$ref": "#/components/schemas/RevertState"
  10804. }
  10805. },
  10806. "required": ["data"],
  10807. "additionalProperties": false
  10808. }
  10809. }
  10810. }
  10811. },
  10812. "400": {
  10813. "description": "InvalidRequestError",
  10814. "content": {
  10815. "application/json": {
  10816. "schema": {
  10817. "$ref": "#/components/schemas/InvalidRequestError"
  10818. }
  10819. }
  10820. }
  10821. },
  10822. "401": {
  10823. "description": "UnauthorizedError",
  10824. "content": {
  10825. "application/json": {
  10826. "schema": {
  10827. "$ref": "#/components/schemas/UnauthorizedError"
  10828. }
  10829. }
  10830. }
  10831. },
  10832. "404": {
  10833. "description": "MessageNotFoundError | SessionNotFoundError",
  10834. "content": {
  10835. "application/json": {
  10836. "schema": {
  10837. "anyOf": [
  10838. {
  10839. "$ref": "#/components/schemas/MessageNotFoundError"
  10840. },
  10841. {
  10842. "$ref": "#/components/schemas/SessionNotFoundError"
  10843. },
  10844. {
  10845. "$ref": "#/components/schemas/SessionNotFoundError"
  10846. }
  10847. ]
  10848. }
  10849. }
  10850. }
  10851. },
  10852. "500": {
  10853. "description": "UnknownError",
  10854. "content": {
  10855. "application/json": {
  10856. "schema": {
  10857. "$ref": "#/components/schemas/UnknownError1"
  10858. }
  10859. }
  10860. }
  10861. }
  10862. },
  10863. "description": "Stage or move a reversible session boundary and optionally apply its file changes.",
  10864. "summary": "Stage session revert",
  10865. "requestBody": {
  10866. "content": {
  10867. "application/json": {
  10868. "schema": {
  10869. "type": "object",
  10870. "properties": {
  10871. "messageID": {
  10872. "type": "string",
  10873. "pattern": "^msg_"
  10874. },
  10875. "files": {
  10876. "type": "boolean"
  10877. }
  10878. },
  10879. "required": ["messageID"],
  10880. "additionalProperties": false
  10881. }
  10882. }
  10883. },
  10884. "required": true
  10885. },
  10886. "x-codeSamples": [
  10887. {
  10888. "lang": "js",
  10889. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.stage({\n ...\n})"
  10890. }
  10891. ]
  10892. }
  10893. },
  10894. "/api/session/{sessionID}/revert/clear": {
  10895. "post": {
  10896. "tags": ["sessions"],
  10897. "operationId": "v2.session.revert.clear",
  10898. "parameters": [
  10899. {
  10900. "name": "sessionID",
  10901. "in": "path",
  10902. "schema": {
  10903. "type": "string",
  10904. "pattern": "^ses"
  10905. },
  10906. "required": true
  10907. }
  10908. ],
  10909. "security": [],
  10910. "responses": {
  10911. "204": {
  10912. "description": "<No Content>"
  10913. },
  10914. "400": {
  10915. "description": "InvalidRequestError",
  10916. "content": {
  10917. "application/json": {
  10918. "schema": {
  10919. "$ref": "#/components/schemas/InvalidRequestError"
  10920. }
  10921. }
  10922. }
  10923. },
  10924. "401": {
  10925. "description": "UnauthorizedError",
  10926. "content": {
  10927. "application/json": {
  10928. "schema": {
  10929. "$ref": "#/components/schemas/UnauthorizedError"
  10930. }
  10931. }
  10932. }
  10933. },
  10934. "404": {
  10935. "description": "SessionNotFoundError",
  10936. "content": {
  10937. "application/json": {
  10938. "schema": {
  10939. "anyOf": [
  10940. {
  10941. "$ref": "#/components/schemas/SessionNotFoundError"
  10942. },
  10943. {
  10944. "$ref": "#/components/schemas/SessionNotFoundError"
  10945. }
  10946. ]
  10947. }
  10948. }
  10949. }
  10950. },
  10951. "500": {
  10952. "description": "UnknownError",
  10953. "content": {
  10954. "application/json": {
  10955. "schema": {
  10956. "$ref": "#/components/schemas/UnknownError1"
  10957. }
  10958. }
  10959. }
  10960. }
  10961. },
  10962. "summary": "Clear staged revert",
  10963. "x-codeSamples": [
  10964. {
  10965. "lang": "js",
  10966. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.clear({\n ...\n})"
  10967. }
  10968. ]
  10969. }
  10970. },
  10971. "/api/session/{sessionID}/revert/commit": {
  10972. "post": {
  10973. "tags": ["sessions"],
  10974. "operationId": "v2.session.revert.commit",
  10975. "parameters": [
  10976. {
  10977. "name": "sessionID",
  10978. "in": "path",
  10979. "schema": {
  10980. "type": "string",
  10981. "pattern": "^ses"
  10982. },
  10983. "required": true
  10984. }
  10985. ],
  10986. "security": [],
  10987. "responses": {
  10988. "204": {
  10989. "description": "<No Content>"
  10990. },
  10991. "400": {
  10992. "description": "InvalidRequestError",
  10993. "content": {
  10994. "application/json": {
  10995. "schema": {
  10996. "$ref": "#/components/schemas/InvalidRequestError"
  10997. }
  10998. }
  10999. }
  11000. },
  11001. "401": {
  11002. "description": "UnauthorizedError",
  11003. "content": {
  11004. "application/json": {
  11005. "schema": {
  11006. "$ref": "#/components/schemas/UnauthorizedError"
  11007. }
  11008. }
  11009. }
  11010. },
  11011. "404": {
  11012. "description": "SessionNotFoundError",
  11013. "content": {
  11014. "application/json": {
  11015. "schema": {
  11016. "anyOf": [
  11017. {
  11018. "$ref": "#/components/schemas/SessionNotFoundError"
  11019. },
  11020. {
  11021. "$ref": "#/components/schemas/SessionNotFoundError"
  11022. }
  11023. ]
  11024. }
  11025. }
  11026. }
  11027. }
  11028. },
  11029. "summary": "Commit staged revert",
  11030. "x-codeSamples": [
  11031. {
  11032. "lang": "js",
  11033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.commit({\n ...\n})"
  11034. }
  11035. ]
  11036. }
  11037. },
  11038. "/api/session/{sessionID}/context": {
  11039. "get": {
  11040. "tags": ["sessions"],
  11041. "operationId": "v2.session.context",
  11042. "parameters": [
  11043. {
  11044. "name": "sessionID",
  11045. "in": "path",
  11046. "schema": {
  11047. "type": "string",
  11048. "pattern": "^ses"
  11049. },
  11050. "required": true
  11051. }
  11052. ],
  11053. "security": [],
  11054. "responses": {
  11055. "200": {
  11056. "description": "Success",
  11057. "content": {
  11058. "application/json": {
  11059. "schema": {
  11060. "type": "object",
  11061. "properties": {
  11062. "data": {
  11063. "type": "array",
  11064. "items": {
  11065. "$ref": "#/components/schemas/SessionMessage"
  11066. }
  11067. }
  11068. },
  11069. "required": ["data"],
  11070. "additionalProperties": false
  11071. }
  11072. }
  11073. }
  11074. },
  11075. "400": {
  11076. "description": "InvalidRequestError",
  11077. "content": {
  11078. "application/json": {
  11079. "schema": {
  11080. "$ref": "#/components/schemas/InvalidRequestError"
  11081. }
  11082. }
  11083. }
  11084. },
  11085. "401": {
  11086. "description": "UnauthorizedError",
  11087. "content": {
  11088. "application/json": {
  11089. "schema": {
  11090. "$ref": "#/components/schemas/UnauthorizedError"
  11091. }
  11092. }
  11093. }
  11094. },
  11095. "404": {
  11096. "description": "SessionNotFoundError",
  11097. "content": {
  11098. "application/json": {
  11099. "schema": {
  11100. "anyOf": [
  11101. {
  11102. "$ref": "#/components/schemas/SessionNotFoundError"
  11103. },
  11104. {
  11105. "$ref": "#/components/schemas/SessionNotFoundError"
  11106. }
  11107. ]
  11108. }
  11109. }
  11110. }
  11111. },
  11112. "500": {
  11113. "description": "UnknownError",
  11114. "content": {
  11115. "application/json": {
  11116. "schema": {
  11117. "$ref": "#/components/schemas/UnknownError1"
  11118. }
  11119. }
  11120. }
  11121. }
  11122. },
  11123. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  11124. "summary": "Get session context",
  11125. "x-codeSamples": [
  11126. {
  11127. "lang": "js",
  11128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  11129. }
  11130. ]
  11131. }
  11132. },
  11133. "/api/session/{sessionID}/history": {
  11134. "get": {
  11135. "tags": ["sessions"],
  11136. "operationId": "v2.session.history",
  11137. "parameters": [
  11138. {
  11139. "name": "sessionID",
  11140. "in": "path",
  11141. "schema": {
  11142. "type": "string",
  11143. "pattern": "^ses"
  11144. },
  11145. "required": true
  11146. },
  11147. {
  11148. "name": "limit",
  11149. "in": "query",
  11150. "schema": {
  11151. "type": "string"
  11152. },
  11153. "required": false
  11154. },
  11155. {
  11156. "name": "after",
  11157. "in": "query",
  11158. "schema": {
  11159. "type": "string"
  11160. },
  11161. "required": false
  11162. }
  11163. ],
  11164. "security": [],
  11165. "responses": {
  11166. "200": {
  11167. "description": "SessionHistory",
  11168. "content": {
  11169. "application/json": {
  11170. "schema": {
  11171. "$ref": "#/components/schemas/SessionHistory"
  11172. }
  11173. }
  11174. }
  11175. },
  11176. "400": {
  11177. "description": "InvalidRequestError",
  11178. "content": {
  11179. "application/json": {
  11180. "schema": {
  11181. "$ref": "#/components/schemas/InvalidRequestError"
  11182. }
  11183. }
  11184. }
  11185. },
  11186. "401": {
  11187. "description": "UnauthorizedError",
  11188. "content": {
  11189. "application/json": {
  11190. "schema": {
  11191. "$ref": "#/components/schemas/UnauthorizedError"
  11192. }
  11193. }
  11194. }
  11195. },
  11196. "404": {
  11197. "description": "SessionNotFoundError",
  11198. "content": {
  11199. "application/json": {
  11200. "schema": {
  11201. "anyOf": [
  11202. {
  11203. "$ref": "#/components/schemas/SessionNotFoundError"
  11204. },
  11205. {
  11206. "$ref": "#/components/schemas/SessionNotFoundError"
  11207. }
  11208. ]
  11209. }
  11210. }
  11211. }
  11212. }
  11213. },
  11214. "description": "Read one finite page of public durable Session events after an exclusive aggregate sequence. Newly committed events may appear on later pages.",
  11215. "summary": "Get session history",
  11216. "x-codeSamples": [
  11217. {
  11218. "lang": "js",
  11219. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.history({\n ...\n})"
  11220. }
  11221. ]
  11222. }
  11223. },
  11224. "/api/session/{sessionID}/event": {
  11225. "get": {
  11226. "tags": ["sessions"],
  11227. "operationId": "v2.session.events",
  11228. "parameters": [
  11229. {
  11230. "name": "sessionID",
  11231. "in": "path",
  11232. "schema": {
  11233. "type": "string",
  11234. "pattern": "^ses"
  11235. },
  11236. "required": true
  11237. },
  11238. {
  11239. "name": "after",
  11240. "in": "query",
  11241. "schema": {
  11242. "type": "string"
  11243. },
  11244. "required": false
  11245. }
  11246. ],
  11247. "security": [],
  11248. "responses": {
  11249. "200": {
  11250. "description": "Success",
  11251. "content": {
  11252. "text/event-stream": {
  11253. "schema": {
  11254. "type": "object",
  11255. "properties": {
  11256. "id": {
  11257. "type": "string"
  11258. },
  11259. "event": {
  11260. "type": "string"
  11261. },
  11262. "data": {
  11263. "$ref": "#/components/schemas/SessionDurableEventStream"
  11264. }
  11265. },
  11266. "required": ["id", "event", "data"],
  11267. "additionalProperties": false
  11268. },
  11269. "x-effect-stream": {
  11270. "encoding": "sse",
  11271. "causeSchema": {
  11272. "type": "array",
  11273. "items": {
  11274. "anyOf": [
  11275. {
  11276. "type": "object",
  11277. "properties": {
  11278. "_tag": {
  11279. "type": "string",
  11280. "enum": ["Fail"]
  11281. },
  11282. "error": {
  11283. "not": {}
  11284. }
  11285. },
  11286. "required": ["_tag", "error"],
  11287. "additionalProperties": false
  11288. },
  11289. {
  11290. "type": "object",
  11291. "properties": {
  11292. "_tag": {
  11293. "type": "string",
  11294. "enum": ["Die"]
  11295. },
  11296. "defect": {}
  11297. },
  11298. "required": ["_tag", "defect"],
  11299. "additionalProperties": false
  11300. },
  11301. {
  11302. "type": "object",
  11303. "properties": {
  11304. "_tag": {
  11305. "type": "string",
  11306. "enum": ["Interrupt"]
  11307. },
  11308. "fiberId": {
  11309. "anyOf": [
  11310. {
  11311. "type": "number"
  11312. },
  11313. {
  11314. "type": "null"
  11315. }
  11316. ]
  11317. }
  11318. },
  11319. "required": ["_tag", "fiberId"],
  11320. "additionalProperties": false
  11321. }
  11322. ]
  11323. }
  11324. },
  11325. "errorSchema": {
  11326. "not": {}
  11327. },
  11328. "failureEvent": "effect/httpapi/stream/failure"
  11329. }
  11330. }
  11331. }
  11332. },
  11333. "400": {
  11334. "description": "InvalidRequestError",
  11335. "content": {
  11336. "application/json": {
  11337. "schema": {
  11338. "$ref": "#/components/schemas/InvalidRequestError"
  11339. }
  11340. }
  11341. }
  11342. },
  11343. "401": {
  11344. "description": "UnauthorizedError",
  11345. "content": {
  11346. "application/json": {
  11347. "schema": {
  11348. "$ref": "#/components/schemas/UnauthorizedError"
  11349. }
  11350. }
  11351. }
  11352. },
  11353. "404": {
  11354. "description": "SessionNotFoundError",
  11355. "content": {
  11356. "application/json": {
  11357. "schema": {
  11358. "anyOf": [
  11359. {
  11360. "$ref": "#/components/schemas/SessionNotFoundError"
  11361. },
  11362. {
  11363. "$ref": "#/components/schemas/SessionNotFoundError"
  11364. }
  11365. ]
  11366. }
  11367. }
  11368. }
  11369. }
  11370. },
  11371. "description": "Replay durable events after an aggregate sequence, then continue with new durable events.",
  11372. "summary": "Subscribe to session events",
  11373. "x-codeSamples": [
  11374. {
  11375. "lang": "js",
  11376. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.events({\n ...\n})"
  11377. }
  11378. ]
  11379. }
  11380. },
  11381. "/api/session/{sessionID}/interrupt": {
  11382. "post": {
  11383. "tags": ["sessions"],
  11384. "operationId": "v2.session.interrupt",
  11385. "parameters": [
  11386. {
  11387. "name": "sessionID",
  11388. "in": "path",
  11389. "schema": {
  11390. "type": "string",
  11391. "pattern": "^ses"
  11392. },
  11393. "required": true
  11394. }
  11395. ],
  11396. "security": [],
  11397. "responses": {
  11398. "204": {
  11399. "description": "<No Content>"
  11400. },
  11401. "400": {
  11402. "description": "InvalidRequestError",
  11403. "content": {
  11404. "application/json": {
  11405. "schema": {
  11406. "$ref": "#/components/schemas/InvalidRequestError"
  11407. }
  11408. }
  11409. }
  11410. },
  11411. "401": {
  11412. "description": "UnauthorizedError",
  11413. "content": {
  11414. "application/json": {
  11415. "schema": {
  11416. "$ref": "#/components/schemas/UnauthorizedError"
  11417. }
  11418. }
  11419. }
  11420. },
  11421. "404": {
  11422. "description": "SessionNotFoundError",
  11423. "content": {
  11424. "application/json": {
  11425. "schema": {
  11426. "anyOf": [
  11427. {
  11428. "$ref": "#/components/schemas/SessionNotFoundError"
  11429. },
  11430. {
  11431. "$ref": "#/components/schemas/SessionNotFoundError"
  11432. }
  11433. ]
  11434. }
  11435. }
  11436. }
  11437. }
  11438. },
  11439. "description": "Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op.",
  11440. "summary": "Interrupt session execution",
  11441. "x-codeSamples": [
  11442. {
  11443. "lang": "js",
  11444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.interrupt({\n ...\n})"
  11445. }
  11446. ]
  11447. }
  11448. },
  11449. "/api/session/{sessionID}/message/{messageID}": {
  11450. "get": {
  11451. "tags": ["sessions"],
  11452. "operationId": "v2.session.message",
  11453. "parameters": [
  11454. {
  11455. "name": "sessionID",
  11456. "in": "path",
  11457. "schema": {
  11458. "type": "string",
  11459. "pattern": "^ses"
  11460. },
  11461. "required": true
  11462. },
  11463. {
  11464. "name": "messageID",
  11465. "in": "path",
  11466. "schema": {
  11467. "type": "string",
  11468. "pattern": "^msg_"
  11469. },
  11470. "required": true
  11471. }
  11472. ],
  11473. "security": [],
  11474. "responses": {
  11475. "200": {
  11476. "description": "Success",
  11477. "content": {
  11478. "application/json": {
  11479. "schema": {
  11480. "type": "object",
  11481. "properties": {
  11482. "data": {
  11483. "$ref": "#/components/schemas/SessionMessage"
  11484. }
  11485. },
  11486. "required": ["data"],
  11487. "additionalProperties": false
  11488. }
  11489. }
  11490. }
  11491. },
  11492. "400": {
  11493. "description": "InvalidRequestError",
  11494. "content": {
  11495. "application/json": {
  11496. "schema": {
  11497. "$ref": "#/components/schemas/InvalidRequestError"
  11498. }
  11499. }
  11500. }
  11501. },
  11502. "401": {
  11503. "description": "UnauthorizedError",
  11504. "content": {
  11505. "application/json": {
  11506. "schema": {
  11507. "$ref": "#/components/schemas/UnauthorizedError"
  11508. }
  11509. }
  11510. }
  11511. },
  11512. "404": {
  11513. "description": "SessionNotFoundError | MessageNotFoundError",
  11514. "content": {
  11515. "application/json": {
  11516. "schema": {
  11517. "anyOf": [
  11518. {
  11519. "$ref": "#/components/schemas/MessageNotFoundError"
  11520. },
  11521. {
  11522. "$ref": "#/components/schemas/SessionNotFoundError"
  11523. },
  11524. {
  11525. "$ref": "#/components/schemas/SessionNotFoundError"
  11526. }
  11527. ]
  11528. }
  11529. }
  11530. }
  11531. }
  11532. },
  11533. "description": "Retrieve one projected message owned by the Session.",
  11534. "summary": "Get session message",
  11535. "x-codeSamples": [
  11536. {
  11537. "lang": "js",
  11538. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.message({\n ...\n})"
  11539. }
  11540. ]
  11541. }
  11542. },
  11543. "/api/session/{sessionID}/message": {
  11544. "get": {
  11545. "tags": ["messages"],
  11546. "operationId": "v2.session.messages",
  11547. "parameters": [
  11548. {
  11549. "name": "sessionID",
  11550. "in": "path",
  11551. "schema": {
  11552. "type": "string",
  11553. "pattern": "^ses"
  11554. },
  11555. "required": true
  11556. },
  11557. {
  11558. "name": "limit",
  11559. "in": "query",
  11560. "schema": {
  11561. "type": "number"
  11562. },
  11563. "required": false
  11564. },
  11565. {
  11566. "name": "order",
  11567. "in": "query",
  11568. "schema": {
  11569. "type": "string",
  11570. "enum": ["asc", "desc"]
  11571. },
  11572. "required": false
  11573. },
  11574. {
  11575. "name": "cursor",
  11576. "in": "query",
  11577. "schema": {
  11578. "type": "string",
  11579. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  11580. },
  11581. "required": false
  11582. }
  11583. ],
  11584. "security": [],
  11585. "responses": {
  11586. "200": {
  11587. "description": "SessionMessagesResponse",
  11588. "content": {
  11589. "application/json": {
  11590. "schema": {
  11591. "$ref": "#/components/schemas/SessionMessagesResponse"
  11592. }
  11593. }
  11594. }
  11595. },
  11596. "400": {
  11597. "description": "InvalidCursorError | InvalidRequestError",
  11598. "content": {
  11599. "application/json": {
  11600. "schema": {
  11601. "anyOf": [
  11602. {
  11603. "$ref": "#/components/schemas/InvalidCursorError"
  11604. },
  11605. {
  11606. "$ref": "#/components/schemas/InvalidRequestError"
  11607. }
  11608. ]
  11609. }
  11610. }
  11611. }
  11612. },
  11613. "401": {
  11614. "description": "UnauthorizedError",
  11615. "content": {
  11616. "application/json": {
  11617. "schema": {
  11618. "$ref": "#/components/schemas/UnauthorizedError"
  11619. }
  11620. }
  11621. }
  11622. },
  11623. "404": {
  11624. "description": "SessionNotFoundError",
  11625. "content": {
  11626. "application/json": {
  11627. "schema": {
  11628. "anyOf": [
  11629. {
  11630. "$ref": "#/components/schemas/SessionNotFoundError"
  11631. },
  11632. {
  11633. "$ref": "#/components/schemas/SessionNotFoundError"
  11634. }
  11635. ]
  11636. }
  11637. }
  11638. }
  11639. },
  11640. "500": {
  11641. "description": "UnknownError",
  11642. "content": {
  11643. "application/json": {
  11644. "schema": {
  11645. "$ref": "#/components/schemas/UnknownError1"
  11646. }
  11647. }
  11648. }
  11649. }
  11650. },
  11651. "description": "Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  11652. "summary": "Get session messages",
  11653. "x-codeSamples": [
  11654. {
  11655. "lang": "js",
  11656. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  11657. }
  11658. ]
  11659. }
  11660. },
  11661. "/api/model": {
  11662. "get": {
  11663. "tags": ["models"],
  11664. "operationId": "v2.model.list",
  11665. "parameters": [
  11666. {
  11667. "name": "location",
  11668. "in": "query",
  11669. "schema": {
  11670. "type": "object",
  11671. "properties": {
  11672. "directory": {
  11673. "type": "string"
  11674. },
  11675. "workspace": {
  11676. "type": "string"
  11677. }
  11678. },
  11679. "additionalProperties": false
  11680. },
  11681. "required": false,
  11682. "style": "deepObject",
  11683. "explode": true
  11684. }
  11685. ],
  11686. "security": [],
  11687. "responses": {
  11688. "200": {
  11689. "description": "Success",
  11690. "content": {
  11691. "application/json": {
  11692. "schema": {
  11693. "type": "object",
  11694. "properties": {
  11695. "location": {
  11696. "$ref": "#/components/schemas/LocationInfo"
  11697. },
  11698. "data": {
  11699. "type": "array",
  11700. "items": {
  11701. "$ref": "#/components/schemas/ModelV2Info"
  11702. }
  11703. }
  11704. },
  11705. "required": ["location", "data"],
  11706. "additionalProperties": false
  11707. }
  11708. }
  11709. }
  11710. },
  11711. "400": {
  11712. "description": "InvalidRequestError",
  11713. "content": {
  11714. "application/json": {
  11715. "schema": {
  11716. "$ref": "#/components/schemas/InvalidRequestError"
  11717. }
  11718. }
  11719. }
  11720. },
  11721. "401": {
  11722. "description": "UnauthorizedError",
  11723. "content": {
  11724. "application/json": {
  11725. "schema": {
  11726. "$ref": "#/components/schemas/UnauthorizedError"
  11727. }
  11728. }
  11729. }
  11730. },
  11731. "503": {
  11732. "description": "ServiceUnavailableError",
  11733. "content": {
  11734. "application/json": {
  11735. "schema": {
  11736. "$ref": "#/components/schemas/ServiceUnavailableError"
  11737. }
  11738. }
  11739. }
  11740. }
  11741. },
  11742. "description": "Retrieve available models ordered by release date.",
  11743. "summary": "List models",
  11744. "x-codeSamples": [
  11745. {
  11746. "lang": "js",
  11747. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  11748. }
  11749. ]
  11750. }
  11751. },
  11752. "/api/provider": {
  11753. "get": {
  11754. "tags": ["providers"],
  11755. "operationId": "v2.provider.list",
  11756. "parameters": [
  11757. {
  11758. "name": "location",
  11759. "in": "query",
  11760. "schema": {
  11761. "type": "object",
  11762. "properties": {
  11763. "directory": {
  11764. "type": "string"
  11765. },
  11766. "workspace": {
  11767. "type": "string"
  11768. }
  11769. },
  11770. "additionalProperties": false
  11771. },
  11772. "required": false,
  11773. "style": "deepObject",
  11774. "explode": true
  11775. }
  11776. ],
  11777. "security": [],
  11778. "responses": {
  11779. "200": {
  11780. "description": "Success",
  11781. "content": {
  11782. "application/json": {
  11783. "schema": {
  11784. "type": "object",
  11785. "properties": {
  11786. "location": {
  11787. "$ref": "#/components/schemas/LocationInfo"
  11788. },
  11789. "data": {
  11790. "type": "array",
  11791. "items": {
  11792. "$ref": "#/components/schemas/ProviderV2Info"
  11793. }
  11794. }
  11795. },
  11796. "required": ["location", "data"],
  11797. "additionalProperties": false
  11798. }
  11799. }
  11800. }
  11801. },
  11802. "400": {
  11803. "description": "InvalidRequestError",
  11804. "content": {
  11805. "application/json": {
  11806. "schema": {
  11807. "$ref": "#/components/schemas/InvalidRequestError"
  11808. }
  11809. }
  11810. }
  11811. },
  11812. "401": {
  11813. "description": "UnauthorizedError",
  11814. "content": {
  11815. "application/json": {
  11816. "schema": {
  11817. "$ref": "#/components/schemas/UnauthorizedError"
  11818. }
  11819. }
  11820. }
  11821. },
  11822. "503": {
  11823. "description": "ServiceUnavailableError",
  11824. "content": {
  11825. "application/json": {
  11826. "schema": {
  11827. "$ref": "#/components/schemas/ServiceUnavailableError"
  11828. }
  11829. }
  11830. }
  11831. }
  11832. },
  11833. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11834. "summary": "List providers",
  11835. "x-codeSamples": [
  11836. {
  11837. "lang": "js",
  11838. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11839. }
  11840. ]
  11841. }
  11842. },
  11843. "/api/provider/{providerID}": {
  11844. "get": {
  11845. "tags": ["providers"],
  11846. "operationId": "v2.provider.get",
  11847. "parameters": [
  11848. {
  11849. "name": "providerID",
  11850. "in": "path",
  11851. "schema": {
  11852. "type": "string"
  11853. },
  11854. "required": true
  11855. },
  11856. {
  11857. "name": "location",
  11858. "in": "query",
  11859. "schema": {
  11860. "type": "object",
  11861. "properties": {
  11862. "directory": {
  11863. "type": "string"
  11864. },
  11865. "workspace": {
  11866. "type": "string"
  11867. }
  11868. },
  11869. "additionalProperties": false
  11870. },
  11871. "required": false,
  11872. "style": "deepObject",
  11873. "explode": true
  11874. }
  11875. ],
  11876. "security": [],
  11877. "responses": {
  11878. "200": {
  11879. "description": "Success",
  11880. "content": {
  11881. "application/json": {
  11882. "schema": {
  11883. "type": "object",
  11884. "properties": {
  11885. "location": {
  11886. "$ref": "#/components/schemas/LocationInfo"
  11887. },
  11888. "data": {
  11889. "$ref": "#/components/schemas/ProviderV2Info"
  11890. }
  11891. },
  11892. "required": ["location", "data"],
  11893. "additionalProperties": false
  11894. }
  11895. }
  11896. }
  11897. },
  11898. "400": {
  11899. "description": "InvalidRequestError",
  11900. "content": {
  11901. "application/json": {
  11902. "schema": {
  11903. "$ref": "#/components/schemas/InvalidRequestError"
  11904. }
  11905. }
  11906. }
  11907. },
  11908. "401": {
  11909. "description": "UnauthorizedError",
  11910. "content": {
  11911. "application/json": {
  11912. "schema": {
  11913. "$ref": "#/components/schemas/UnauthorizedError"
  11914. }
  11915. }
  11916. }
  11917. },
  11918. "404": {
  11919. "description": "ProviderNotFoundError",
  11920. "content": {
  11921. "application/json": {
  11922. "schema": {
  11923. "$ref": "#/components/schemas/ProviderNotFoundError"
  11924. }
  11925. }
  11926. }
  11927. },
  11928. "503": {
  11929. "description": "ServiceUnavailableError",
  11930. "content": {
  11931. "application/json": {
  11932. "schema": {
  11933. "$ref": "#/components/schemas/ServiceUnavailableError"
  11934. }
  11935. }
  11936. }
  11937. }
  11938. },
  11939. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11940. "summary": "Get provider",
  11941. "x-codeSamples": [
  11942. {
  11943. "lang": "js",
  11944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11945. }
  11946. ]
  11947. }
  11948. },
  11949. "/api/integration": {
  11950. "get": {
  11951. "tags": ["integrations"],
  11952. "operationId": "v2.integration.list",
  11953. "parameters": [
  11954. {
  11955. "name": "location",
  11956. "in": "query",
  11957. "schema": {
  11958. "type": "object",
  11959. "properties": {
  11960. "directory": {
  11961. "type": "string"
  11962. },
  11963. "workspace": {
  11964. "type": "string"
  11965. }
  11966. },
  11967. "additionalProperties": false
  11968. },
  11969. "required": false,
  11970. "style": "deepObject",
  11971. "explode": true
  11972. }
  11973. ],
  11974. "security": [],
  11975. "responses": {
  11976. "200": {
  11977. "description": "Success",
  11978. "content": {
  11979. "application/json": {
  11980. "schema": {
  11981. "type": "object",
  11982. "properties": {
  11983. "location": {
  11984. "$ref": "#/components/schemas/LocationInfo"
  11985. },
  11986. "data": {
  11987. "type": "array",
  11988. "items": {
  11989. "$ref": "#/components/schemas/IntegrationInfo"
  11990. }
  11991. }
  11992. },
  11993. "required": ["location", "data"],
  11994. "additionalProperties": false
  11995. }
  11996. }
  11997. }
  11998. },
  11999. "400": {
  12000. "description": "InvalidRequestError",
  12001. "content": {
  12002. "application/json": {
  12003. "schema": {
  12004. "$ref": "#/components/schemas/InvalidRequestError"
  12005. }
  12006. }
  12007. }
  12008. },
  12009. "401": {
  12010. "description": "UnauthorizedError",
  12011. "content": {
  12012. "application/json": {
  12013. "schema": {
  12014. "$ref": "#/components/schemas/UnauthorizedError"
  12015. }
  12016. }
  12017. }
  12018. }
  12019. },
  12020. "description": "Retrieve available integrations and their authentication methods.",
  12021. "summary": "List integrations",
  12022. "x-codeSamples": [
  12023. {
  12024. "lang": "js",
  12025. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  12026. }
  12027. ]
  12028. }
  12029. },
  12030. "/api/integration/{integrationID}": {
  12031. "get": {
  12032. "tags": ["integrations"],
  12033. "operationId": "v2.integration.get",
  12034. "parameters": [
  12035. {
  12036. "name": "integrationID",
  12037. "in": "path",
  12038. "schema": {
  12039. "type": "string"
  12040. },
  12041. "required": true
  12042. },
  12043. {
  12044. "name": "location",
  12045. "in": "query",
  12046. "schema": {
  12047. "type": "object",
  12048. "properties": {
  12049. "directory": {
  12050. "type": "string"
  12051. },
  12052. "workspace": {
  12053. "type": "string"
  12054. }
  12055. },
  12056. "additionalProperties": false
  12057. },
  12058. "required": false,
  12059. "style": "deepObject",
  12060. "explode": true
  12061. }
  12062. ],
  12063. "security": [],
  12064. "responses": {
  12065. "200": {
  12066. "description": "Success",
  12067. "content": {
  12068. "application/json": {
  12069. "schema": {
  12070. "type": "object",
  12071. "properties": {
  12072. "location": {
  12073. "$ref": "#/components/schemas/LocationInfo"
  12074. },
  12075. "data": {
  12076. "$ref": "#/components/schemas/IntegrationInfo"
  12077. }
  12078. },
  12079. "required": ["location", "data"],
  12080. "additionalProperties": false
  12081. }
  12082. }
  12083. }
  12084. },
  12085. "400": {
  12086. "description": "InvalidRequestError",
  12087. "content": {
  12088. "application/json": {
  12089. "schema": {
  12090. "$ref": "#/components/schemas/InvalidRequestError"
  12091. }
  12092. }
  12093. }
  12094. },
  12095. "401": {
  12096. "description": "UnauthorizedError",
  12097. "content": {
  12098. "application/json": {
  12099. "schema": {
  12100. "$ref": "#/components/schemas/UnauthorizedError"
  12101. }
  12102. }
  12103. }
  12104. }
  12105. },
  12106. "description": "Retrieve one integration and its authentication methods.",
  12107. "summary": "Get integration",
  12108. "x-codeSamples": [
  12109. {
  12110. "lang": "js",
  12111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  12112. }
  12113. ]
  12114. }
  12115. },
  12116. "/api/integration/{integrationID}/connect/key": {
  12117. "post": {
  12118. "tags": ["integrations"],
  12119. "operationId": "v2.integration.connect.key",
  12120. "parameters": [
  12121. {
  12122. "name": "integrationID",
  12123. "in": "path",
  12124. "schema": {
  12125. "type": "string"
  12126. },
  12127. "required": true
  12128. },
  12129. {
  12130. "name": "location",
  12131. "in": "query",
  12132. "schema": {
  12133. "type": "object",
  12134. "properties": {
  12135. "directory": {
  12136. "type": "string"
  12137. },
  12138. "workspace": {
  12139. "type": "string"
  12140. }
  12141. },
  12142. "additionalProperties": false
  12143. },
  12144. "required": false,
  12145. "style": "deepObject",
  12146. "explode": true
  12147. }
  12148. ],
  12149. "security": [],
  12150. "responses": {
  12151. "204": {
  12152. "description": "<No Content>"
  12153. },
  12154. "400": {
  12155. "description": "InvalidRequestError",
  12156. "content": {
  12157. "application/json": {
  12158. "schema": {
  12159. "anyOf": [
  12160. {
  12161. "$ref": "#/components/schemas/InvalidRequestError"
  12162. },
  12163. {
  12164. "$ref": "#/components/schemas/InvalidRequestError"
  12165. }
  12166. ]
  12167. }
  12168. }
  12169. }
  12170. },
  12171. "401": {
  12172. "description": "UnauthorizedError",
  12173. "content": {
  12174. "application/json": {
  12175. "schema": {
  12176. "$ref": "#/components/schemas/UnauthorizedError"
  12177. }
  12178. }
  12179. }
  12180. }
  12181. },
  12182. "description": "Run a key authentication method and store the resulting credential.",
  12183. "summary": "Connect with key",
  12184. "requestBody": {
  12185. "content": {
  12186. "application/json": {
  12187. "schema": {
  12188. "type": "object",
  12189. "properties": {
  12190. "key": {
  12191. "type": "string"
  12192. },
  12193. "label": {
  12194. "type": "string"
  12195. }
  12196. },
  12197. "required": ["key"],
  12198. "additionalProperties": false
  12199. }
  12200. }
  12201. },
  12202. "required": true
  12203. },
  12204. "x-codeSamples": [
  12205. {
  12206. "lang": "js",
  12207. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  12208. }
  12209. ]
  12210. }
  12211. },
  12212. "/api/integration/{integrationID}/connect/oauth": {
  12213. "post": {
  12214. "tags": ["integrations"],
  12215. "operationId": "v2.integration.connect.oauth",
  12216. "parameters": [
  12217. {
  12218. "name": "integrationID",
  12219. "in": "path",
  12220. "schema": {
  12221. "type": "string"
  12222. },
  12223. "required": true
  12224. },
  12225. {
  12226. "name": "location",
  12227. "in": "query",
  12228. "schema": {
  12229. "type": "object",
  12230. "properties": {
  12231. "directory": {
  12232. "type": "string"
  12233. },
  12234. "workspace": {
  12235. "type": "string"
  12236. }
  12237. },
  12238. "additionalProperties": false
  12239. },
  12240. "required": false,
  12241. "style": "deepObject",
  12242. "explode": true
  12243. }
  12244. ],
  12245. "security": [],
  12246. "responses": {
  12247. "200": {
  12248. "description": "Success",
  12249. "content": {
  12250. "application/json": {
  12251. "schema": {
  12252. "type": "object",
  12253. "properties": {
  12254. "location": {
  12255. "$ref": "#/components/schemas/LocationInfo"
  12256. },
  12257. "data": {
  12258. "$ref": "#/components/schemas/IntegrationAttempt"
  12259. }
  12260. },
  12261. "required": ["location", "data"],
  12262. "additionalProperties": false
  12263. }
  12264. }
  12265. }
  12266. },
  12267. "400": {
  12268. "description": "InvalidRequestError",
  12269. "content": {
  12270. "application/json": {
  12271. "schema": {
  12272. "anyOf": [
  12273. {
  12274. "$ref": "#/components/schemas/InvalidRequestError"
  12275. },
  12276. {
  12277. "$ref": "#/components/schemas/InvalidRequestError"
  12278. }
  12279. ]
  12280. }
  12281. }
  12282. }
  12283. },
  12284. "401": {
  12285. "description": "UnauthorizedError",
  12286. "content": {
  12287. "application/json": {
  12288. "schema": {
  12289. "$ref": "#/components/schemas/UnauthorizedError"
  12290. }
  12291. }
  12292. }
  12293. }
  12294. },
  12295. "description": "Start an OAuth attempt and return the authorization details.",
  12296. "summary": "Begin OAuth connection",
  12297. "requestBody": {
  12298. "content": {
  12299. "application/json": {
  12300. "schema": {
  12301. "type": "object",
  12302. "properties": {
  12303. "methodID": {
  12304. "type": "string"
  12305. },
  12306. "inputs": {
  12307. "type": "object",
  12308. "additionalProperties": {
  12309. "type": "string"
  12310. }
  12311. },
  12312. "label": {
  12313. "type": "string"
  12314. }
  12315. },
  12316. "required": ["methodID", "inputs"],
  12317. "additionalProperties": false
  12318. }
  12319. }
  12320. },
  12321. "required": true
  12322. },
  12323. "x-codeSamples": [
  12324. {
  12325. "lang": "js",
  12326. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  12327. }
  12328. ]
  12329. }
  12330. },
  12331. "/api/integration/attempt/{attemptID}": {
  12332. "get": {
  12333. "tags": ["integrations"],
  12334. "operationId": "v2.integration.attempt.status",
  12335. "parameters": [
  12336. {
  12337. "name": "attemptID",
  12338. "in": "path",
  12339. "schema": {
  12340. "type": "string"
  12341. },
  12342. "required": true
  12343. },
  12344. {
  12345. "name": "location",
  12346. "in": "query",
  12347. "schema": {
  12348. "type": "object",
  12349. "properties": {
  12350. "directory": {
  12351. "type": "string"
  12352. },
  12353. "workspace": {
  12354. "type": "string"
  12355. }
  12356. },
  12357. "additionalProperties": false
  12358. },
  12359. "required": false,
  12360. "style": "deepObject",
  12361. "explode": true
  12362. }
  12363. ],
  12364. "security": [],
  12365. "responses": {
  12366. "200": {
  12367. "description": "Success",
  12368. "content": {
  12369. "application/json": {
  12370. "schema": {
  12371. "type": "object",
  12372. "properties": {
  12373. "location": {
  12374. "$ref": "#/components/schemas/LocationInfo"
  12375. },
  12376. "data": {
  12377. "$ref": "#/components/schemas/IntegrationAttemptStatus"
  12378. }
  12379. },
  12380. "required": ["location", "data"],
  12381. "additionalProperties": false
  12382. }
  12383. }
  12384. }
  12385. },
  12386. "400": {
  12387. "description": "InvalidRequestError",
  12388. "content": {
  12389. "application/json": {
  12390. "schema": {
  12391. "$ref": "#/components/schemas/InvalidRequestError"
  12392. }
  12393. }
  12394. }
  12395. },
  12396. "401": {
  12397. "description": "UnauthorizedError",
  12398. "content": {
  12399. "application/json": {
  12400. "schema": {
  12401. "$ref": "#/components/schemas/UnauthorizedError"
  12402. }
  12403. }
  12404. }
  12405. }
  12406. },
  12407. "description": "Poll the current status of an OAuth attempt.",
  12408. "summary": "Get OAuth attempt status",
  12409. "x-codeSamples": [
  12410. {
  12411. "lang": "js",
  12412. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  12413. }
  12414. ]
  12415. },
  12416. "delete": {
  12417. "tags": ["integrations"],
  12418. "operationId": "v2.integration.attempt.cancel",
  12419. "parameters": [
  12420. {
  12421. "name": "attemptID",
  12422. "in": "path",
  12423. "schema": {
  12424. "type": "string"
  12425. },
  12426. "required": true
  12427. },
  12428. {
  12429. "name": "location",
  12430. "in": "query",
  12431. "schema": {
  12432. "type": "object",
  12433. "properties": {
  12434. "directory": {
  12435. "type": "string"
  12436. },
  12437. "workspace": {
  12438. "type": "string"
  12439. }
  12440. },
  12441. "additionalProperties": false
  12442. },
  12443. "required": false,
  12444. "style": "deepObject",
  12445. "explode": true
  12446. }
  12447. ],
  12448. "security": [],
  12449. "responses": {
  12450. "204": {
  12451. "description": "<No Content>"
  12452. },
  12453. "400": {
  12454. "description": "InvalidRequestError",
  12455. "content": {
  12456. "application/json": {
  12457. "schema": {
  12458. "$ref": "#/components/schemas/InvalidRequestError"
  12459. }
  12460. }
  12461. }
  12462. },
  12463. "401": {
  12464. "description": "UnauthorizedError",
  12465. "content": {
  12466. "application/json": {
  12467. "schema": {
  12468. "$ref": "#/components/schemas/UnauthorizedError"
  12469. }
  12470. }
  12471. }
  12472. }
  12473. },
  12474. "description": "Cancel an OAuth attempt and release its resources.",
  12475. "summary": "Cancel OAuth connection",
  12476. "x-codeSamples": [
  12477. {
  12478. "lang": "js",
  12479. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  12480. }
  12481. ]
  12482. }
  12483. },
  12484. "/api/integration/attempt/{attemptID}/complete": {
  12485. "post": {
  12486. "tags": ["integrations"],
  12487. "operationId": "v2.integration.attempt.complete",
  12488. "parameters": [
  12489. {
  12490. "name": "attemptID",
  12491. "in": "path",
  12492. "schema": {
  12493. "type": "string"
  12494. },
  12495. "required": true
  12496. },
  12497. {
  12498. "name": "location",
  12499. "in": "query",
  12500. "schema": {
  12501. "type": "object",
  12502. "properties": {
  12503. "directory": {
  12504. "type": "string"
  12505. },
  12506. "workspace": {
  12507. "type": "string"
  12508. }
  12509. },
  12510. "additionalProperties": false
  12511. },
  12512. "required": false,
  12513. "style": "deepObject",
  12514. "explode": true
  12515. }
  12516. ],
  12517. "security": [],
  12518. "responses": {
  12519. "204": {
  12520. "description": "<No Content>"
  12521. },
  12522. "400": {
  12523. "description": "InvalidRequestError",
  12524. "content": {
  12525. "application/json": {
  12526. "schema": {
  12527. "anyOf": [
  12528. {
  12529. "$ref": "#/components/schemas/InvalidRequestError"
  12530. },
  12531. {
  12532. "$ref": "#/components/schemas/InvalidRequestError"
  12533. }
  12534. ]
  12535. }
  12536. }
  12537. }
  12538. },
  12539. "401": {
  12540. "description": "UnauthorizedError",
  12541. "content": {
  12542. "application/json": {
  12543. "schema": {
  12544. "$ref": "#/components/schemas/UnauthorizedError"
  12545. }
  12546. }
  12547. }
  12548. }
  12549. },
  12550. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12551. "summary": "Complete OAuth connection",
  12552. "requestBody": {
  12553. "content": {
  12554. "application/json": {
  12555. "schema": {
  12556. "type": "object",
  12557. "properties": {
  12558. "code": {
  12559. "type": "string"
  12560. }
  12561. },
  12562. "additionalProperties": false
  12563. }
  12564. }
  12565. },
  12566. "required": true
  12567. },
  12568. "x-codeSamples": [
  12569. {
  12570. "lang": "js",
  12571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  12572. }
  12573. ]
  12574. }
  12575. },
  12576. "/api/credential/{credentialID}": {
  12577. "patch": {
  12578. "tags": ["opencode HttpApi"],
  12579. "operationId": "v2.credential.update",
  12580. "parameters": [
  12581. {
  12582. "name": "credentialID",
  12583. "in": "path",
  12584. "schema": {
  12585. "type": "string"
  12586. },
  12587. "required": true
  12588. },
  12589. {
  12590. "name": "location",
  12591. "in": "query",
  12592. "schema": {
  12593. "type": "object",
  12594. "properties": {
  12595. "directory": {
  12596. "type": "string"
  12597. },
  12598. "workspace": {
  12599. "type": "string"
  12600. }
  12601. },
  12602. "additionalProperties": false
  12603. },
  12604. "required": false,
  12605. "style": "deepObject",
  12606. "explode": true
  12607. }
  12608. ],
  12609. "security": [],
  12610. "responses": {
  12611. "204": {
  12612. "description": "<No Content>"
  12613. },
  12614. "400": {
  12615. "description": "InvalidRequestError",
  12616. "content": {
  12617. "application/json": {
  12618. "schema": {
  12619. "$ref": "#/components/schemas/InvalidRequestError"
  12620. }
  12621. }
  12622. }
  12623. },
  12624. "401": {
  12625. "description": "UnauthorizedError",
  12626. "content": {
  12627. "application/json": {
  12628. "schema": {
  12629. "$ref": "#/components/schemas/UnauthorizedError"
  12630. }
  12631. }
  12632. }
  12633. }
  12634. },
  12635. "description": "Update a stored credential label.",
  12636. "summary": "Update credential",
  12637. "requestBody": {
  12638. "content": {
  12639. "application/json": {
  12640. "schema": {
  12641. "type": "object",
  12642. "properties": {
  12643. "label": {
  12644. "type": "string"
  12645. }
  12646. },
  12647. "required": ["label"],
  12648. "additionalProperties": false
  12649. }
  12650. }
  12651. },
  12652. "required": true
  12653. },
  12654. "x-codeSamples": [
  12655. {
  12656. "lang": "js",
  12657. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12658. }
  12659. ]
  12660. },
  12661. "delete": {
  12662. "tags": ["opencode HttpApi"],
  12663. "operationId": "v2.credential.remove",
  12664. "parameters": [
  12665. {
  12666. "name": "credentialID",
  12667. "in": "path",
  12668. "schema": {
  12669. "type": "string"
  12670. },
  12671. "required": true
  12672. },
  12673. {
  12674. "name": "location",
  12675. "in": "query",
  12676. "schema": {
  12677. "type": "object",
  12678. "properties": {
  12679. "directory": {
  12680. "type": "string"
  12681. },
  12682. "workspace": {
  12683. "type": "string"
  12684. }
  12685. },
  12686. "additionalProperties": false
  12687. },
  12688. "required": false,
  12689. "style": "deepObject",
  12690. "explode": true
  12691. }
  12692. ],
  12693. "security": [],
  12694. "responses": {
  12695. "204": {
  12696. "description": "<No Content>"
  12697. },
  12698. "400": {
  12699. "description": "InvalidRequestError",
  12700. "content": {
  12701. "application/json": {
  12702. "schema": {
  12703. "$ref": "#/components/schemas/InvalidRequestError"
  12704. }
  12705. }
  12706. }
  12707. },
  12708. "401": {
  12709. "description": "UnauthorizedError",
  12710. "content": {
  12711. "application/json": {
  12712. "schema": {
  12713. "$ref": "#/components/schemas/UnauthorizedError"
  12714. }
  12715. }
  12716. }
  12717. }
  12718. },
  12719. "description": "Remove a stored integration credential.",
  12720. "summary": "Remove credential",
  12721. "x-codeSamples": [
  12722. {
  12723. "lang": "js",
  12724. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12725. }
  12726. ]
  12727. }
  12728. },
  12729. "/api/permission/request": {
  12730. "get": {
  12731. "tags": ["permissions"],
  12732. "operationId": "v2.permission.request.list",
  12733. "parameters": [
  12734. {
  12735. "name": "location",
  12736. "in": "query",
  12737. "schema": {
  12738. "type": "object",
  12739. "properties": {
  12740. "directory": {
  12741. "type": "string"
  12742. },
  12743. "workspace": {
  12744. "type": "string"
  12745. }
  12746. },
  12747. "additionalProperties": false
  12748. },
  12749. "required": false,
  12750. "style": "deepObject",
  12751. "explode": true
  12752. }
  12753. ],
  12754. "security": [],
  12755. "responses": {
  12756. "200": {
  12757. "description": "Success",
  12758. "content": {
  12759. "application/json": {
  12760. "schema": {
  12761. "type": "object",
  12762. "properties": {
  12763. "location": {
  12764. "$ref": "#/components/schemas/LocationInfo"
  12765. },
  12766. "data": {
  12767. "type": "array",
  12768. "items": {
  12769. "$ref": "#/components/schemas/PermissionV2Request"
  12770. }
  12771. }
  12772. },
  12773. "required": ["location", "data"],
  12774. "additionalProperties": false
  12775. }
  12776. }
  12777. }
  12778. },
  12779. "400": {
  12780. "description": "InvalidRequestError",
  12781. "content": {
  12782. "application/json": {
  12783. "schema": {
  12784. "$ref": "#/components/schemas/InvalidRequestError"
  12785. }
  12786. }
  12787. }
  12788. },
  12789. "401": {
  12790. "description": "UnauthorizedError",
  12791. "content": {
  12792. "application/json": {
  12793. "schema": {
  12794. "$ref": "#/components/schemas/UnauthorizedError"
  12795. }
  12796. }
  12797. }
  12798. }
  12799. },
  12800. "description": "Retrieve pending permission requests for a location.",
  12801. "summary": "List pending permission requests",
  12802. "x-codeSamples": [
  12803. {
  12804. "lang": "js",
  12805. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12806. }
  12807. ]
  12808. }
  12809. },
  12810. "/api/permission/saved": {
  12811. "get": {
  12812. "tags": ["permissions"],
  12813. "operationId": "v2.permission.saved.list",
  12814. "parameters": [
  12815. {
  12816. "name": "projectID",
  12817. "in": "query",
  12818. "schema": {
  12819. "type": "string"
  12820. },
  12821. "required": false
  12822. }
  12823. ],
  12824. "security": [],
  12825. "responses": {
  12826. "200": {
  12827. "description": "Success",
  12828. "content": {
  12829. "application/json": {
  12830. "schema": {
  12831. "type": "object",
  12832. "properties": {
  12833. "data": {
  12834. "type": "array",
  12835. "items": {
  12836. "$ref": "#/components/schemas/PermissionSavedInfo"
  12837. }
  12838. }
  12839. },
  12840. "required": ["data"],
  12841. "additionalProperties": false
  12842. }
  12843. }
  12844. }
  12845. },
  12846. "400": {
  12847. "description": "InvalidRequestError",
  12848. "content": {
  12849. "application/json": {
  12850. "schema": {
  12851. "$ref": "#/components/schemas/InvalidRequestError"
  12852. }
  12853. }
  12854. }
  12855. },
  12856. "401": {
  12857. "description": "UnauthorizedError",
  12858. "content": {
  12859. "application/json": {
  12860. "schema": {
  12861. "$ref": "#/components/schemas/UnauthorizedError"
  12862. }
  12863. }
  12864. }
  12865. }
  12866. },
  12867. "description": "Retrieve saved permissions, optionally filtered by project.",
  12868. "summary": "List saved permissions",
  12869. "x-codeSamples": [
  12870. {
  12871. "lang": "js",
  12872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12873. }
  12874. ]
  12875. }
  12876. },
  12877. "/api/permission/saved/{id}": {
  12878. "delete": {
  12879. "tags": ["permissions"],
  12880. "operationId": "v2.permission.saved.remove",
  12881. "parameters": [
  12882. {
  12883. "name": "id",
  12884. "in": "path",
  12885. "schema": {
  12886. "type": "string"
  12887. },
  12888. "required": true
  12889. }
  12890. ],
  12891. "security": [],
  12892. "responses": {
  12893. "204": {
  12894. "description": "<No Content>"
  12895. },
  12896. "400": {
  12897. "description": "InvalidRequestError",
  12898. "content": {
  12899. "application/json": {
  12900. "schema": {
  12901. "$ref": "#/components/schemas/InvalidRequestError"
  12902. }
  12903. }
  12904. }
  12905. },
  12906. "401": {
  12907. "description": "UnauthorizedError",
  12908. "content": {
  12909. "application/json": {
  12910. "schema": {
  12911. "$ref": "#/components/schemas/UnauthorizedError"
  12912. }
  12913. }
  12914. }
  12915. }
  12916. },
  12917. "description": "Remove a saved permission by ID.",
  12918. "summary": "Remove saved permission",
  12919. "x-codeSamples": [
  12920. {
  12921. "lang": "js",
  12922. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12923. }
  12924. ]
  12925. }
  12926. },
  12927. "/api/session/{sessionID}/permission": {
  12928. "post": {
  12929. "tags": ["permissions"],
  12930. "operationId": "v2.session.permission.create",
  12931. "parameters": [
  12932. {
  12933. "name": "sessionID",
  12934. "in": "path",
  12935. "schema": {
  12936. "type": "string",
  12937. "pattern": "^ses"
  12938. },
  12939. "required": true
  12940. }
  12941. ],
  12942. "security": [],
  12943. "responses": {
  12944. "200": {
  12945. "description": "Success",
  12946. "content": {
  12947. "application/json": {
  12948. "schema": {
  12949. "type": "object",
  12950. "properties": {
  12951. "data": {
  12952. "type": "object",
  12953. "properties": {
  12954. "id": {
  12955. "type": "string",
  12956. "pattern": "^per"
  12957. },
  12958. "effect": {
  12959. "$ref": "#/components/schemas/PermissionV2Effect"
  12960. }
  12961. },
  12962. "required": ["id", "effect"],
  12963. "additionalProperties": false
  12964. }
  12965. },
  12966. "required": ["data"],
  12967. "additionalProperties": false
  12968. }
  12969. }
  12970. }
  12971. },
  12972. "400": {
  12973. "description": "InvalidRequestError",
  12974. "content": {
  12975. "application/json": {
  12976. "schema": {
  12977. "$ref": "#/components/schemas/InvalidRequestError"
  12978. }
  12979. }
  12980. }
  12981. },
  12982. "401": {
  12983. "description": "UnauthorizedError",
  12984. "content": {
  12985. "application/json": {
  12986. "schema": {
  12987. "$ref": "#/components/schemas/UnauthorizedError"
  12988. }
  12989. }
  12990. }
  12991. },
  12992. "404": {
  12993. "description": "SessionNotFoundError",
  12994. "content": {
  12995. "application/json": {
  12996. "schema": {
  12997. "anyOf": [
  12998. {
  12999. "$ref": "#/components/schemas/SessionNotFoundError"
  13000. },
  13001. {
  13002. "$ref": "#/components/schemas/SessionNotFoundError"
  13003. }
  13004. ]
  13005. }
  13006. }
  13007. }
  13008. }
  13009. },
  13010. "description": "Evaluate and, when approval is required, create a permission request for a session.",
  13011. "summary": "Create permission request",
  13012. "requestBody": {
  13013. "content": {
  13014. "application/json": {
  13015. "schema": {
  13016. "type": "object",
  13017. "properties": {
  13018. "id": {
  13019. "type": "string",
  13020. "pattern": "^per"
  13021. },
  13022. "action": {
  13023. "type": "string"
  13024. },
  13025. "resources": {
  13026. "type": "array",
  13027. "items": {
  13028. "type": "string"
  13029. }
  13030. },
  13031. "save": {
  13032. "type": "array",
  13033. "items": {
  13034. "type": "string"
  13035. }
  13036. },
  13037. "metadata": {
  13038. "type": "object"
  13039. },
  13040. "source": {
  13041. "$ref": "#/components/schemas/PermissionV2Source"
  13042. },
  13043. "agent": {
  13044. "type": "string"
  13045. }
  13046. },
  13047. "required": ["action", "resources"],
  13048. "additionalProperties": false
  13049. }
  13050. }
  13051. },
  13052. "required": true
  13053. },
  13054. "x-codeSamples": [
  13055. {
  13056. "lang": "js",
  13057. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.create({\n ...\n})"
  13058. }
  13059. ]
  13060. },
  13061. "get": {
  13062. "tags": ["permissions"],
  13063. "operationId": "v2.session.permission.list",
  13064. "parameters": [
  13065. {
  13066. "name": "sessionID",
  13067. "in": "path",
  13068. "schema": {
  13069. "type": "string",
  13070. "pattern": "^ses"
  13071. },
  13072. "required": true
  13073. }
  13074. ],
  13075. "security": [],
  13076. "responses": {
  13077. "200": {
  13078. "description": "Success",
  13079. "content": {
  13080. "application/json": {
  13081. "schema": {
  13082. "type": "object",
  13083. "properties": {
  13084. "data": {
  13085. "type": "array",
  13086. "items": {
  13087. "$ref": "#/components/schemas/PermissionV2Request"
  13088. }
  13089. }
  13090. },
  13091. "required": ["data"],
  13092. "additionalProperties": false
  13093. }
  13094. }
  13095. }
  13096. },
  13097. "400": {
  13098. "description": "InvalidRequestError",
  13099. "content": {
  13100. "application/json": {
  13101. "schema": {
  13102. "$ref": "#/components/schemas/InvalidRequestError"
  13103. }
  13104. }
  13105. }
  13106. },
  13107. "401": {
  13108. "description": "UnauthorizedError",
  13109. "content": {
  13110. "application/json": {
  13111. "schema": {
  13112. "$ref": "#/components/schemas/UnauthorizedError"
  13113. }
  13114. }
  13115. }
  13116. },
  13117. "404": {
  13118. "description": "SessionNotFoundError",
  13119. "content": {
  13120. "application/json": {
  13121. "schema": {
  13122. "anyOf": [
  13123. {
  13124. "$ref": "#/components/schemas/SessionNotFoundError"
  13125. },
  13126. {
  13127. "$ref": "#/components/schemas/SessionNotFoundError"
  13128. }
  13129. ]
  13130. }
  13131. }
  13132. }
  13133. }
  13134. },
  13135. "description": "Retrieve pending permission requests owned by a session.",
  13136. "summary": "List session permission requests",
  13137. "x-codeSamples": [
  13138. {
  13139. "lang": "js",
  13140. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  13141. }
  13142. ]
  13143. }
  13144. },
  13145. "/api/session/{sessionID}/permission/{requestID}": {
  13146. "get": {
  13147. "tags": ["permissions"],
  13148. "operationId": "v2.session.permission.get",
  13149. "parameters": [
  13150. {
  13151. "name": "sessionID",
  13152. "in": "path",
  13153. "schema": {
  13154. "type": "string",
  13155. "pattern": "^ses"
  13156. },
  13157. "required": true
  13158. },
  13159. {
  13160. "name": "requestID",
  13161. "in": "path",
  13162. "schema": {
  13163. "type": "string",
  13164. "pattern": "^per"
  13165. },
  13166. "required": true
  13167. }
  13168. ],
  13169. "security": [],
  13170. "responses": {
  13171. "200": {
  13172. "description": "Success",
  13173. "content": {
  13174. "application/json": {
  13175. "schema": {
  13176. "type": "object",
  13177. "properties": {
  13178. "data": {
  13179. "$ref": "#/components/schemas/PermissionV2Request"
  13180. }
  13181. },
  13182. "required": ["data"],
  13183. "additionalProperties": false
  13184. }
  13185. }
  13186. }
  13187. },
  13188. "400": {
  13189. "description": "InvalidRequestError",
  13190. "content": {
  13191. "application/json": {
  13192. "schema": {
  13193. "$ref": "#/components/schemas/InvalidRequestError"
  13194. }
  13195. }
  13196. }
  13197. },
  13198. "401": {
  13199. "description": "UnauthorizedError",
  13200. "content": {
  13201. "application/json": {
  13202. "schema": {
  13203. "$ref": "#/components/schemas/UnauthorizedError"
  13204. }
  13205. }
  13206. }
  13207. },
  13208. "404": {
  13209. "description": "SessionNotFoundError | PermissionNotFoundError",
  13210. "content": {
  13211. "application/json": {
  13212. "schema": {
  13213. "anyOf": [
  13214. {
  13215. "$ref": "#/components/schemas/PermissionNotFoundError"
  13216. },
  13217. {
  13218. "$ref": "#/components/schemas/SessionNotFoundError"
  13219. },
  13220. {
  13221. "$ref": "#/components/schemas/SessionNotFoundError"
  13222. }
  13223. ]
  13224. }
  13225. }
  13226. }
  13227. }
  13228. },
  13229. "description": "Retrieve a pending permission request owned by a session.",
  13230. "summary": "Get permission request",
  13231. "x-codeSamples": [
  13232. {
  13233. "lang": "js",
  13234. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.get({\n ...\n})"
  13235. }
  13236. ]
  13237. }
  13238. },
  13239. "/api/session/{sessionID}/permission/{requestID}/reply": {
  13240. "post": {
  13241. "tags": ["permissions"],
  13242. "operationId": "v2.session.permission.reply",
  13243. "parameters": [
  13244. {
  13245. "name": "sessionID",
  13246. "in": "path",
  13247. "schema": {
  13248. "type": "string",
  13249. "pattern": "^ses"
  13250. },
  13251. "required": true
  13252. },
  13253. {
  13254. "name": "requestID",
  13255. "in": "path",
  13256. "schema": {
  13257. "type": "string",
  13258. "pattern": "^per"
  13259. },
  13260. "required": true
  13261. }
  13262. ],
  13263. "security": [],
  13264. "responses": {
  13265. "204": {
  13266. "description": "<No Content>"
  13267. },
  13268. "400": {
  13269. "description": "InvalidRequestError",
  13270. "content": {
  13271. "application/json": {
  13272. "schema": {
  13273. "$ref": "#/components/schemas/InvalidRequestError"
  13274. }
  13275. }
  13276. }
  13277. },
  13278. "401": {
  13279. "description": "UnauthorizedError",
  13280. "content": {
  13281. "application/json": {
  13282. "schema": {
  13283. "$ref": "#/components/schemas/UnauthorizedError"
  13284. }
  13285. }
  13286. }
  13287. },
  13288. "404": {
  13289. "description": "SessionNotFoundError | PermissionNotFoundError",
  13290. "content": {
  13291. "application/json": {
  13292. "schema": {
  13293. "anyOf": [
  13294. {
  13295. "$ref": "#/components/schemas/PermissionNotFoundError"
  13296. },
  13297. {
  13298. "$ref": "#/components/schemas/SessionNotFoundError"
  13299. },
  13300. {
  13301. "$ref": "#/components/schemas/SessionNotFoundError"
  13302. }
  13303. ]
  13304. }
  13305. }
  13306. }
  13307. }
  13308. },
  13309. "description": "Respond to a pending permission request owned by a session.",
  13310. "summary": "Reply to pending permission request",
  13311. "requestBody": {
  13312. "content": {
  13313. "application/json": {
  13314. "schema": {
  13315. "type": "object",
  13316. "properties": {
  13317. "reply": {
  13318. "$ref": "#/components/schemas/PermissionV2Reply"
  13319. },
  13320. "message": {
  13321. "type": "string"
  13322. }
  13323. },
  13324. "required": ["reply"],
  13325. "additionalProperties": false
  13326. }
  13327. }
  13328. },
  13329. "required": true
  13330. },
  13331. "x-codeSamples": [
  13332. {
  13333. "lang": "js",
  13334. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  13335. }
  13336. ]
  13337. }
  13338. },
  13339. "/api/fs/read/*": {
  13340. "get": {
  13341. "tags": ["filesystem"],
  13342. "operationId": "v2.fs.read",
  13343. "parameters": [
  13344. {
  13345. "name": "location",
  13346. "in": "query",
  13347. "schema": {
  13348. "type": "object",
  13349. "properties": {
  13350. "directory": {
  13351. "type": "string"
  13352. },
  13353. "workspace": {
  13354. "type": "string"
  13355. }
  13356. },
  13357. "additionalProperties": false
  13358. },
  13359. "required": false,
  13360. "style": "deepObject",
  13361. "explode": true
  13362. }
  13363. ],
  13364. "security": [],
  13365. "responses": {
  13366. "200": {
  13367. "description": "Success",
  13368. "content": {
  13369. "application/octet-stream": {
  13370. "schema": {
  13371. "type": "string",
  13372. "format": "binary"
  13373. }
  13374. }
  13375. }
  13376. },
  13377. "400": {
  13378. "description": "InvalidRequestError",
  13379. "content": {
  13380. "application/json": {
  13381. "schema": {
  13382. "$ref": "#/components/schemas/InvalidRequestError"
  13383. }
  13384. }
  13385. }
  13386. },
  13387. "401": {
  13388. "description": "UnauthorizedError",
  13389. "content": {
  13390. "application/json": {
  13391. "schema": {
  13392. "$ref": "#/components/schemas/UnauthorizedError"
  13393. }
  13394. }
  13395. }
  13396. }
  13397. },
  13398. "description": "Serve one file relative to the requested location.",
  13399. "summary": "Read file",
  13400. "x-codeSamples": [
  13401. {
  13402. "lang": "js",
  13403. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  13404. }
  13405. ]
  13406. }
  13407. },
  13408. "/api/fs/list": {
  13409. "get": {
  13410. "tags": ["filesystem"],
  13411. "operationId": "v2.fs.list",
  13412. "parameters": [
  13413. {
  13414. "name": "location",
  13415. "in": "query",
  13416. "schema": {
  13417. "type": "object",
  13418. "properties": {
  13419. "directory": {
  13420. "type": "string"
  13421. },
  13422. "workspace": {
  13423. "type": "string"
  13424. }
  13425. },
  13426. "additionalProperties": false
  13427. },
  13428. "required": false,
  13429. "style": "deepObject",
  13430. "explode": true
  13431. },
  13432. {
  13433. "name": "path",
  13434. "in": "query",
  13435. "schema": {
  13436. "type": "string"
  13437. },
  13438. "required": false
  13439. }
  13440. ],
  13441. "security": [],
  13442. "responses": {
  13443. "200": {
  13444. "description": "Success",
  13445. "content": {
  13446. "application/json": {
  13447. "schema": {
  13448. "type": "object",
  13449. "properties": {
  13450. "location": {
  13451. "$ref": "#/components/schemas/LocationInfo"
  13452. },
  13453. "data": {
  13454. "type": "array",
  13455. "items": {
  13456. "$ref": "#/components/schemas/FileSystemEntry"
  13457. }
  13458. }
  13459. },
  13460. "required": ["location", "data"],
  13461. "additionalProperties": false
  13462. }
  13463. }
  13464. }
  13465. },
  13466. "400": {
  13467. "description": "InvalidRequestError",
  13468. "content": {
  13469. "application/json": {
  13470. "schema": {
  13471. "$ref": "#/components/schemas/InvalidRequestError"
  13472. }
  13473. }
  13474. }
  13475. },
  13476. "401": {
  13477. "description": "UnauthorizedError",
  13478. "content": {
  13479. "application/json": {
  13480. "schema": {
  13481. "$ref": "#/components/schemas/UnauthorizedError"
  13482. }
  13483. }
  13484. }
  13485. }
  13486. },
  13487. "description": "List direct children of one directory relative to the requested location.",
  13488. "summary": "List directory",
  13489. "x-codeSamples": [
  13490. {
  13491. "lang": "js",
  13492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  13493. }
  13494. ]
  13495. }
  13496. },
  13497. "/api/fs/find": {
  13498. "get": {
  13499. "tags": ["filesystem"],
  13500. "operationId": "v2.fs.find",
  13501. "parameters": [
  13502. {
  13503. "name": "location",
  13504. "in": "query",
  13505. "schema": {
  13506. "type": "object",
  13507. "properties": {
  13508. "directory": {
  13509. "type": "string"
  13510. },
  13511. "workspace": {
  13512. "type": "string"
  13513. }
  13514. },
  13515. "additionalProperties": false
  13516. },
  13517. "required": false,
  13518. "style": "deepObject",
  13519. "explode": true
  13520. },
  13521. {
  13522. "name": "query",
  13523. "in": "query",
  13524. "schema": {
  13525. "type": "string"
  13526. },
  13527. "required": true
  13528. },
  13529. {
  13530. "name": "type",
  13531. "in": "query",
  13532. "schema": {
  13533. "type": "string",
  13534. "enum": ["file", "directory"]
  13535. },
  13536. "required": false
  13537. },
  13538. {
  13539. "name": "limit",
  13540. "in": "query",
  13541. "schema": {
  13542. "type": "string"
  13543. },
  13544. "required": false
  13545. }
  13546. ],
  13547. "security": [],
  13548. "responses": {
  13549. "200": {
  13550. "description": "Success",
  13551. "content": {
  13552. "application/json": {
  13553. "schema": {
  13554. "type": "object",
  13555. "properties": {
  13556. "location": {
  13557. "$ref": "#/components/schemas/LocationInfo"
  13558. },
  13559. "data": {
  13560. "type": "array",
  13561. "items": {
  13562. "$ref": "#/components/schemas/FileSystemEntry"
  13563. }
  13564. }
  13565. },
  13566. "required": ["location", "data"],
  13567. "additionalProperties": false
  13568. }
  13569. }
  13570. }
  13571. },
  13572. "400": {
  13573. "description": "InvalidRequestError",
  13574. "content": {
  13575. "application/json": {
  13576. "schema": {
  13577. "$ref": "#/components/schemas/InvalidRequestError"
  13578. }
  13579. }
  13580. }
  13581. },
  13582. "401": {
  13583. "description": "UnauthorizedError",
  13584. "content": {
  13585. "application/json": {
  13586. "schema": {
  13587. "$ref": "#/components/schemas/UnauthorizedError"
  13588. }
  13589. }
  13590. }
  13591. }
  13592. },
  13593. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  13594. "summary": "Find files",
  13595. "x-codeSamples": [
  13596. {
  13597. "lang": "js",
  13598. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  13599. }
  13600. ]
  13601. }
  13602. },
  13603. "/api/command": {
  13604. "get": {
  13605. "tags": ["commands"],
  13606. "operationId": "v2.command.list",
  13607. "parameters": [
  13608. {
  13609. "name": "location",
  13610. "in": "query",
  13611. "schema": {
  13612. "type": "object",
  13613. "properties": {
  13614. "directory": {
  13615. "type": "string"
  13616. },
  13617. "workspace": {
  13618. "type": "string"
  13619. }
  13620. },
  13621. "additionalProperties": false
  13622. },
  13623. "required": false,
  13624. "style": "deepObject",
  13625. "explode": true
  13626. }
  13627. ],
  13628. "security": [],
  13629. "responses": {
  13630. "200": {
  13631. "description": "Success",
  13632. "content": {
  13633. "application/json": {
  13634. "schema": {
  13635. "type": "object",
  13636. "properties": {
  13637. "location": {
  13638. "$ref": "#/components/schemas/LocationInfo"
  13639. },
  13640. "data": {
  13641. "type": "array",
  13642. "items": {
  13643. "$ref": "#/components/schemas/CommandV2Info"
  13644. }
  13645. }
  13646. },
  13647. "required": ["location", "data"],
  13648. "additionalProperties": false
  13649. }
  13650. }
  13651. }
  13652. },
  13653. "400": {
  13654. "description": "InvalidRequestError",
  13655. "content": {
  13656. "application/json": {
  13657. "schema": {
  13658. "$ref": "#/components/schemas/InvalidRequestError"
  13659. }
  13660. }
  13661. }
  13662. },
  13663. "401": {
  13664. "description": "UnauthorizedError",
  13665. "content": {
  13666. "application/json": {
  13667. "schema": {
  13668. "$ref": "#/components/schemas/UnauthorizedError"
  13669. }
  13670. }
  13671. }
  13672. }
  13673. },
  13674. "description": "Retrieve currently registered commands.",
  13675. "summary": "List commands",
  13676. "x-codeSamples": [
  13677. {
  13678. "lang": "js",
  13679. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  13680. }
  13681. ]
  13682. }
  13683. },
  13684. "/api/skill": {
  13685. "get": {
  13686. "tags": ["skills"],
  13687. "operationId": "v2.skill.list",
  13688. "parameters": [
  13689. {
  13690. "name": "location",
  13691. "in": "query",
  13692. "schema": {
  13693. "type": "object",
  13694. "properties": {
  13695. "directory": {
  13696. "type": "string"
  13697. },
  13698. "workspace": {
  13699. "type": "string"
  13700. }
  13701. },
  13702. "additionalProperties": false
  13703. },
  13704. "required": false,
  13705. "style": "deepObject",
  13706. "explode": true
  13707. }
  13708. ],
  13709. "security": [],
  13710. "responses": {
  13711. "200": {
  13712. "description": "Success",
  13713. "content": {
  13714. "application/json": {
  13715. "schema": {
  13716. "type": "object",
  13717. "properties": {
  13718. "location": {
  13719. "$ref": "#/components/schemas/LocationInfo"
  13720. },
  13721. "data": {
  13722. "type": "array",
  13723. "items": {
  13724. "$ref": "#/components/schemas/SkillV2Info"
  13725. }
  13726. }
  13727. },
  13728. "required": ["location", "data"],
  13729. "additionalProperties": false
  13730. }
  13731. }
  13732. }
  13733. },
  13734. "400": {
  13735. "description": "InvalidRequestError",
  13736. "content": {
  13737. "application/json": {
  13738. "schema": {
  13739. "$ref": "#/components/schemas/InvalidRequestError"
  13740. }
  13741. }
  13742. }
  13743. },
  13744. "401": {
  13745. "description": "UnauthorizedError",
  13746. "content": {
  13747. "application/json": {
  13748. "schema": {
  13749. "$ref": "#/components/schemas/UnauthorizedError"
  13750. }
  13751. }
  13752. }
  13753. }
  13754. },
  13755. "description": "Retrieve currently registered skills.",
  13756. "summary": "List skills",
  13757. "x-codeSamples": [
  13758. {
  13759. "lang": "js",
  13760. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  13761. }
  13762. ]
  13763. }
  13764. },
  13765. "/api/event": {
  13766. "get": {
  13767. "tags": ["events"],
  13768. "operationId": "v2.event.subscribe",
  13769. "parameters": [],
  13770. "security": [],
  13771. "responses": {
  13772. "200": {
  13773. "description": "Event stream",
  13774. "content": {
  13775. "text/event-stream": {
  13776. "schema": {
  13777. "$ref": "#/components/schemas/V2Event"
  13778. }
  13779. }
  13780. }
  13781. },
  13782. "400": {
  13783. "description": "InvalidRequestError",
  13784. "content": {
  13785. "application/json": {
  13786. "schema": {
  13787. "$ref": "#/components/schemas/InvalidRequestError"
  13788. }
  13789. }
  13790. }
  13791. },
  13792. "401": {
  13793. "description": "UnauthorizedError",
  13794. "content": {
  13795. "application/json": {
  13796. "schema": {
  13797. "$ref": "#/components/schemas/UnauthorizedError"
  13798. }
  13799. }
  13800. }
  13801. }
  13802. },
  13803. "description": "Subscribe to native event payloads for the server.",
  13804. "summary": "Subscribe to events",
  13805. "x-codeSamples": [
  13806. {
  13807. "lang": "js",
  13808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13809. }
  13810. ]
  13811. }
  13812. },
  13813. "/api/pty": {
  13814. "get": {
  13815. "tags": ["pty"],
  13816. "operationId": "v2.pty.list",
  13817. "parameters": [
  13818. {
  13819. "name": "location",
  13820. "in": "query",
  13821. "schema": {
  13822. "type": "object",
  13823. "properties": {
  13824. "directory": {
  13825. "type": "string"
  13826. },
  13827. "workspace": {
  13828. "type": "string"
  13829. }
  13830. },
  13831. "additionalProperties": false
  13832. },
  13833. "required": false,
  13834. "style": "deepObject",
  13835. "explode": true
  13836. }
  13837. ],
  13838. "security": [],
  13839. "responses": {
  13840. "200": {
  13841. "description": "Success",
  13842. "content": {
  13843. "application/json": {
  13844. "schema": {
  13845. "type": "object",
  13846. "properties": {
  13847. "location": {
  13848. "$ref": "#/components/schemas/LocationInfo"
  13849. },
  13850. "data": {
  13851. "type": "array",
  13852. "items": {
  13853. "$ref": "#/components/schemas/Pty"
  13854. }
  13855. }
  13856. },
  13857. "required": ["location", "data"],
  13858. "additionalProperties": false
  13859. }
  13860. }
  13861. }
  13862. },
  13863. "400": {
  13864. "description": "InvalidRequestError",
  13865. "content": {
  13866. "application/json": {
  13867. "schema": {
  13868. "$ref": "#/components/schemas/InvalidRequestError"
  13869. }
  13870. }
  13871. }
  13872. },
  13873. "401": {
  13874. "description": "UnauthorizedError",
  13875. "content": {
  13876. "application/json": {
  13877. "schema": {
  13878. "$ref": "#/components/schemas/UnauthorizedError"
  13879. }
  13880. }
  13881. }
  13882. }
  13883. },
  13884. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13885. "summary": "List PTY sessions",
  13886. "x-codeSamples": [
  13887. {
  13888. "lang": "js",
  13889. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13890. }
  13891. ]
  13892. },
  13893. "post": {
  13894. "tags": ["pty"],
  13895. "operationId": "v2.pty.create",
  13896. "parameters": [
  13897. {
  13898. "name": "location",
  13899. "in": "query",
  13900. "schema": {
  13901. "type": "object",
  13902. "properties": {
  13903. "directory": {
  13904. "type": "string"
  13905. },
  13906. "workspace": {
  13907. "type": "string"
  13908. }
  13909. },
  13910. "additionalProperties": false
  13911. },
  13912. "required": false,
  13913. "style": "deepObject",
  13914. "explode": true
  13915. }
  13916. ],
  13917. "security": [],
  13918. "responses": {
  13919. "200": {
  13920. "description": "Success",
  13921. "content": {
  13922. "application/json": {
  13923. "schema": {
  13924. "type": "object",
  13925. "properties": {
  13926. "location": {
  13927. "$ref": "#/components/schemas/LocationInfo"
  13928. },
  13929. "data": {
  13930. "$ref": "#/components/schemas/Pty"
  13931. }
  13932. },
  13933. "required": ["location", "data"],
  13934. "additionalProperties": false
  13935. }
  13936. }
  13937. }
  13938. },
  13939. "400": {
  13940. "description": "InvalidRequestError",
  13941. "content": {
  13942. "application/json": {
  13943. "schema": {
  13944. "$ref": "#/components/schemas/InvalidRequestError"
  13945. }
  13946. }
  13947. }
  13948. },
  13949. "401": {
  13950. "description": "UnauthorizedError",
  13951. "content": {
  13952. "application/json": {
  13953. "schema": {
  13954. "$ref": "#/components/schemas/UnauthorizedError"
  13955. }
  13956. }
  13957. }
  13958. }
  13959. },
  13960. "description": "Create a pseudo-terminal session for a location.",
  13961. "summary": "Create PTY session",
  13962. "requestBody": {
  13963. "content": {
  13964. "application/json": {
  13965. "schema": {
  13966. "type": "object",
  13967. "properties": {
  13968. "command": {
  13969. "type": "string"
  13970. },
  13971. "args": {
  13972. "type": "array",
  13973. "items": {
  13974. "type": "string"
  13975. }
  13976. },
  13977. "cwd": {
  13978. "type": "string"
  13979. },
  13980. "title": {
  13981. "type": "string"
  13982. },
  13983. "env": {
  13984. "type": "object",
  13985. "additionalProperties": {
  13986. "type": "string"
  13987. }
  13988. }
  13989. },
  13990. "additionalProperties": false
  13991. }
  13992. }
  13993. },
  13994. "required": true
  13995. },
  13996. "x-codeSamples": [
  13997. {
  13998. "lang": "js",
  13999. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  14000. }
  14001. ]
  14002. }
  14003. },
  14004. "/api/pty/{ptyID}": {
  14005. "get": {
  14006. "tags": ["pty"],
  14007. "operationId": "v2.pty.get",
  14008. "parameters": [
  14009. {
  14010. "name": "ptyID",
  14011. "in": "path",
  14012. "schema": {
  14013. "type": "string",
  14014. "pattern": "^pty"
  14015. },
  14016. "required": true
  14017. },
  14018. {
  14019. "name": "location",
  14020. "in": "query",
  14021. "schema": {
  14022. "type": "object",
  14023. "properties": {
  14024. "directory": {
  14025. "type": "string"
  14026. },
  14027. "workspace": {
  14028. "type": "string"
  14029. }
  14030. },
  14031. "additionalProperties": false
  14032. },
  14033. "required": false,
  14034. "style": "deepObject",
  14035. "explode": true
  14036. }
  14037. ],
  14038. "security": [],
  14039. "responses": {
  14040. "200": {
  14041. "description": "Success",
  14042. "content": {
  14043. "application/json": {
  14044. "schema": {
  14045. "type": "object",
  14046. "properties": {
  14047. "location": {
  14048. "$ref": "#/components/schemas/LocationInfo"
  14049. },
  14050. "data": {
  14051. "$ref": "#/components/schemas/Pty"
  14052. }
  14053. },
  14054. "required": ["location", "data"],
  14055. "additionalProperties": false
  14056. }
  14057. }
  14058. }
  14059. },
  14060. "400": {
  14061. "description": "InvalidRequestError",
  14062. "content": {
  14063. "application/json": {
  14064. "schema": {
  14065. "$ref": "#/components/schemas/InvalidRequestError"
  14066. }
  14067. }
  14068. }
  14069. },
  14070. "401": {
  14071. "description": "UnauthorizedError",
  14072. "content": {
  14073. "application/json": {
  14074. "schema": {
  14075. "$ref": "#/components/schemas/UnauthorizedError"
  14076. }
  14077. }
  14078. }
  14079. },
  14080. "404": {
  14081. "description": "PtyNotFoundError",
  14082. "content": {
  14083. "application/json": {
  14084. "schema": {
  14085. "$ref": "#/components/schemas/PtyNotFoundError"
  14086. }
  14087. }
  14088. }
  14089. }
  14090. },
  14091. "description": "Get one PTY session, including its exit code once exited.",
  14092. "summary": "Get PTY session",
  14093. "x-codeSamples": [
  14094. {
  14095. "lang": "js",
  14096. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  14097. }
  14098. ]
  14099. },
  14100. "put": {
  14101. "tags": ["pty"],
  14102. "operationId": "v2.pty.update",
  14103. "parameters": [
  14104. {
  14105. "name": "ptyID",
  14106. "in": "path",
  14107. "schema": {
  14108. "type": "string",
  14109. "pattern": "^pty"
  14110. },
  14111. "required": true
  14112. },
  14113. {
  14114. "name": "location",
  14115. "in": "query",
  14116. "schema": {
  14117. "type": "object",
  14118. "properties": {
  14119. "directory": {
  14120. "type": "string"
  14121. },
  14122. "workspace": {
  14123. "type": "string"
  14124. }
  14125. },
  14126. "additionalProperties": false
  14127. },
  14128. "required": false,
  14129. "style": "deepObject",
  14130. "explode": true
  14131. }
  14132. ],
  14133. "security": [],
  14134. "responses": {
  14135. "200": {
  14136. "description": "Success",
  14137. "content": {
  14138. "application/json": {
  14139. "schema": {
  14140. "type": "object",
  14141. "properties": {
  14142. "location": {
  14143. "$ref": "#/components/schemas/LocationInfo"
  14144. },
  14145. "data": {
  14146. "$ref": "#/components/schemas/Pty"
  14147. }
  14148. },
  14149. "required": ["location", "data"],
  14150. "additionalProperties": false
  14151. }
  14152. }
  14153. }
  14154. },
  14155. "400": {
  14156. "description": "InvalidRequestError",
  14157. "content": {
  14158. "application/json": {
  14159. "schema": {
  14160. "$ref": "#/components/schemas/InvalidRequestError"
  14161. }
  14162. }
  14163. }
  14164. },
  14165. "401": {
  14166. "description": "UnauthorizedError",
  14167. "content": {
  14168. "application/json": {
  14169. "schema": {
  14170. "$ref": "#/components/schemas/UnauthorizedError"
  14171. }
  14172. }
  14173. }
  14174. },
  14175. "404": {
  14176. "description": "PtyNotFoundError",
  14177. "content": {
  14178. "application/json": {
  14179. "schema": {
  14180. "$ref": "#/components/schemas/PtyNotFoundError"
  14181. }
  14182. }
  14183. }
  14184. }
  14185. },
  14186. "description": "Update the title or viewport size of one PTY session.",
  14187. "summary": "Update PTY session",
  14188. "requestBody": {
  14189. "content": {
  14190. "application/json": {
  14191. "schema": {
  14192. "type": "object",
  14193. "properties": {
  14194. "title": {
  14195. "type": "string"
  14196. },
  14197. "size": {
  14198. "type": "object",
  14199. "properties": {
  14200. "rows": {
  14201. "type": "integer",
  14202. "exclusiveMinimum": 0
  14203. },
  14204. "cols": {
  14205. "type": "integer",
  14206. "exclusiveMinimum": 0
  14207. }
  14208. },
  14209. "required": ["rows", "cols"],
  14210. "additionalProperties": false
  14211. }
  14212. },
  14213. "additionalProperties": false
  14214. }
  14215. }
  14216. },
  14217. "required": true
  14218. },
  14219. "x-codeSamples": [
  14220. {
  14221. "lang": "js",
  14222. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  14223. }
  14224. ]
  14225. },
  14226. "delete": {
  14227. "tags": ["pty"],
  14228. "operationId": "v2.pty.remove",
  14229. "parameters": [
  14230. {
  14231. "name": "ptyID",
  14232. "in": "path",
  14233. "schema": {
  14234. "type": "string",
  14235. "pattern": "^pty"
  14236. },
  14237. "required": true
  14238. },
  14239. {
  14240. "name": "location",
  14241. "in": "query",
  14242. "schema": {
  14243. "type": "object",
  14244. "properties": {
  14245. "directory": {
  14246. "type": "string"
  14247. },
  14248. "workspace": {
  14249. "type": "string"
  14250. }
  14251. },
  14252. "additionalProperties": false
  14253. },
  14254. "required": false,
  14255. "style": "deepObject",
  14256. "explode": true
  14257. }
  14258. ],
  14259. "security": [],
  14260. "responses": {
  14261. "204": {
  14262. "description": "<No Content>"
  14263. },
  14264. "400": {
  14265. "description": "InvalidRequestError",
  14266. "content": {
  14267. "application/json": {
  14268. "schema": {
  14269. "$ref": "#/components/schemas/InvalidRequestError"
  14270. }
  14271. }
  14272. }
  14273. },
  14274. "401": {
  14275. "description": "UnauthorizedError",
  14276. "content": {
  14277. "application/json": {
  14278. "schema": {
  14279. "$ref": "#/components/schemas/UnauthorizedError"
  14280. }
  14281. }
  14282. }
  14283. },
  14284. "404": {
  14285. "description": "PtyNotFoundError",
  14286. "content": {
  14287. "application/json": {
  14288. "schema": {
  14289. "$ref": "#/components/schemas/PtyNotFoundError"
  14290. }
  14291. }
  14292. }
  14293. }
  14294. },
  14295. "description": "Terminate and remove one PTY session.",
  14296. "summary": "Remove PTY session",
  14297. "x-codeSamples": [
  14298. {
  14299. "lang": "js",
  14300. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  14301. }
  14302. ]
  14303. }
  14304. },
  14305. "/api/pty/{ptyID}/connect-token": {
  14306. "post": {
  14307. "tags": ["pty"],
  14308. "operationId": "v2.pty.connectToken",
  14309. "parameters": [
  14310. {
  14311. "name": "ptyID",
  14312. "in": "path",
  14313. "schema": {
  14314. "type": "string",
  14315. "pattern": "^pty"
  14316. },
  14317. "required": true
  14318. },
  14319. {
  14320. "name": "location",
  14321. "in": "query",
  14322. "schema": {
  14323. "type": "object",
  14324. "properties": {
  14325. "directory": {
  14326. "type": "string"
  14327. },
  14328. "workspace": {
  14329. "type": "string"
  14330. }
  14331. },
  14332. "additionalProperties": false
  14333. },
  14334. "required": false,
  14335. "style": "deepObject",
  14336. "explode": true
  14337. }
  14338. ],
  14339. "security": [],
  14340. "responses": {
  14341. "200": {
  14342. "description": "Success",
  14343. "content": {
  14344. "application/json": {
  14345. "schema": {
  14346. "type": "object",
  14347. "properties": {
  14348. "location": {
  14349. "$ref": "#/components/schemas/LocationInfo"
  14350. },
  14351. "data": {
  14352. "$ref": "#/components/schemas/PtyTicketConnectToken"
  14353. }
  14354. },
  14355. "required": ["location", "data"],
  14356. "additionalProperties": false
  14357. }
  14358. }
  14359. }
  14360. },
  14361. "400": {
  14362. "description": "InvalidRequestError",
  14363. "content": {
  14364. "application/json": {
  14365. "schema": {
  14366. "$ref": "#/components/schemas/InvalidRequestError"
  14367. }
  14368. }
  14369. }
  14370. },
  14371. "401": {
  14372. "description": "UnauthorizedError",
  14373. "content": {
  14374. "application/json": {
  14375. "schema": {
  14376. "$ref": "#/components/schemas/UnauthorizedError"
  14377. }
  14378. }
  14379. }
  14380. },
  14381. "403": {
  14382. "description": "ForbiddenError",
  14383. "content": {
  14384. "application/json": {
  14385. "schema": {
  14386. "$ref": "#/components/schemas/ForbiddenError"
  14387. }
  14388. }
  14389. }
  14390. },
  14391. "404": {
  14392. "description": "PtyNotFoundError",
  14393. "content": {
  14394. "application/json": {
  14395. "schema": {
  14396. "$ref": "#/components/schemas/PtyNotFoundError"
  14397. }
  14398. }
  14399. }
  14400. }
  14401. },
  14402. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  14403. "summary": "Create PTY WebSocket token",
  14404. "x-codeSamples": [
  14405. {
  14406. "lang": "js",
  14407. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  14408. }
  14409. ]
  14410. }
  14411. },
  14412. "/api/pty/{ptyID}/connect": {
  14413. "get": {
  14414. "tags": ["pty"],
  14415. "operationId": "v2.pty.connect",
  14416. "parameters": [
  14417. {
  14418. "name": "ptyID",
  14419. "in": "path",
  14420. "schema": {
  14421. "type": "string",
  14422. "pattern": "^pty"
  14423. },
  14424. "required": true
  14425. },
  14426. {
  14427. "in": "query",
  14428. "name": "location[directory]",
  14429. "schema": {
  14430. "type": "string"
  14431. }
  14432. },
  14433. {
  14434. "in": "query",
  14435. "name": "location[workspace]",
  14436. "schema": {
  14437. "type": "string"
  14438. }
  14439. },
  14440. {
  14441. "in": "query",
  14442. "name": "cursor",
  14443. "schema": {
  14444. "type": "string"
  14445. }
  14446. },
  14447. {
  14448. "in": "query",
  14449. "name": "ticket",
  14450. "schema": {
  14451. "type": "string"
  14452. }
  14453. }
  14454. ],
  14455. "security": [],
  14456. "responses": {
  14457. "200": {
  14458. "description": "Success",
  14459. "content": {
  14460. "application/json": {
  14461. "schema": {
  14462. "type": "boolean"
  14463. }
  14464. }
  14465. }
  14466. },
  14467. "400": {
  14468. "description": "InvalidRequestError",
  14469. "content": {
  14470. "application/json": {
  14471. "schema": {
  14472. "$ref": "#/components/schemas/InvalidRequestError"
  14473. }
  14474. }
  14475. }
  14476. },
  14477. "401": {
  14478. "description": "UnauthorizedError",
  14479. "content": {
  14480. "application/json": {
  14481. "schema": {
  14482. "$ref": "#/components/schemas/UnauthorizedError"
  14483. }
  14484. }
  14485. }
  14486. },
  14487. "403": {
  14488. "description": "ForbiddenError",
  14489. "content": {
  14490. "application/json": {
  14491. "schema": {
  14492. "$ref": "#/components/schemas/ForbiddenError"
  14493. }
  14494. }
  14495. }
  14496. },
  14497. "404": {
  14498. "description": "PtyNotFoundError",
  14499. "content": {
  14500. "application/json": {
  14501. "schema": {
  14502. "$ref": "#/components/schemas/PtyNotFoundError"
  14503. }
  14504. }
  14505. }
  14506. }
  14507. },
  14508. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  14509. "summary": "Connect to PTY session",
  14510. "x-codeSamples": [
  14511. {
  14512. "lang": "js",
  14513. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  14514. }
  14515. ]
  14516. }
  14517. },
  14518. "/api/question/request": {
  14519. "get": {
  14520. "tags": ["session questions"],
  14521. "operationId": "v2.question.request.list",
  14522. "parameters": [
  14523. {
  14524. "name": "location",
  14525. "in": "query",
  14526. "schema": {
  14527. "type": "object",
  14528. "properties": {
  14529. "directory": {
  14530. "type": "string"
  14531. },
  14532. "workspace": {
  14533. "type": "string"
  14534. }
  14535. },
  14536. "additionalProperties": false
  14537. },
  14538. "required": false,
  14539. "style": "deepObject",
  14540. "explode": true
  14541. }
  14542. ],
  14543. "security": [],
  14544. "responses": {
  14545. "200": {
  14546. "description": "Success",
  14547. "content": {
  14548. "application/json": {
  14549. "schema": {
  14550. "type": "object",
  14551. "properties": {
  14552. "location": {
  14553. "$ref": "#/components/schemas/LocationInfo"
  14554. },
  14555. "data": {
  14556. "type": "array",
  14557. "items": {
  14558. "$ref": "#/components/schemas/QuestionV2Request"
  14559. }
  14560. }
  14561. },
  14562. "required": ["location", "data"],
  14563. "additionalProperties": false
  14564. }
  14565. }
  14566. }
  14567. },
  14568. "400": {
  14569. "description": "InvalidRequestError",
  14570. "content": {
  14571. "application/json": {
  14572. "schema": {
  14573. "$ref": "#/components/schemas/InvalidRequestError"
  14574. }
  14575. }
  14576. }
  14577. },
  14578. "401": {
  14579. "description": "UnauthorizedError",
  14580. "content": {
  14581. "application/json": {
  14582. "schema": {
  14583. "$ref": "#/components/schemas/UnauthorizedError"
  14584. }
  14585. }
  14586. }
  14587. }
  14588. },
  14589. "description": "Retrieve pending question requests for a location.",
  14590. "summary": "List pending question requests",
  14591. "x-codeSamples": [
  14592. {
  14593. "lang": "js",
  14594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  14595. }
  14596. ]
  14597. }
  14598. },
  14599. "/api/session/{sessionID}/question": {
  14600. "get": {
  14601. "tags": ["session questions"],
  14602. "operationId": "v2.session.question.list",
  14603. "parameters": [
  14604. {
  14605. "name": "sessionID",
  14606. "in": "path",
  14607. "schema": {
  14608. "type": "string",
  14609. "pattern": "^ses"
  14610. },
  14611. "required": true
  14612. }
  14613. ],
  14614. "security": [],
  14615. "responses": {
  14616. "200": {
  14617. "description": "Success",
  14618. "content": {
  14619. "application/json": {
  14620. "schema": {
  14621. "type": "object",
  14622. "properties": {
  14623. "data": {
  14624. "type": "array",
  14625. "items": {
  14626. "$ref": "#/components/schemas/QuestionV2Request"
  14627. }
  14628. }
  14629. },
  14630. "required": ["data"],
  14631. "additionalProperties": false
  14632. }
  14633. }
  14634. }
  14635. },
  14636. "400": {
  14637. "description": "InvalidRequestError",
  14638. "content": {
  14639. "application/json": {
  14640. "schema": {
  14641. "$ref": "#/components/schemas/InvalidRequestError"
  14642. }
  14643. }
  14644. }
  14645. },
  14646. "401": {
  14647. "description": "UnauthorizedError",
  14648. "content": {
  14649. "application/json": {
  14650. "schema": {
  14651. "$ref": "#/components/schemas/UnauthorizedError"
  14652. }
  14653. }
  14654. }
  14655. },
  14656. "404": {
  14657. "description": "SessionNotFoundError",
  14658. "content": {
  14659. "application/json": {
  14660. "schema": {
  14661. "anyOf": [
  14662. {
  14663. "$ref": "#/components/schemas/SessionNotFoundError"
  14664. },
  14665. {
  14666. "$ref": "#/components/schemas/SessionNotFoundError"
  14667. }
  14668. ]
  14669. }
  14670. }
  14671. }
  14672. }
  14673. },
  14674. "description": "Retrieve pending question requests owned by a session.",
  14675. "summary": "List session question requests",
  14676. "x-codeSamples": [
  14677. {
  14678. "lang": "js",
  14679. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14680. }
  14681. ]
  14682. }
  14683. },
  14684. "/api/session/{sessionID}/question/{requestID}/reply": {
  14685. "post": {
  14686. "tags": ["session questions"],
  14687. "operationId": "v2.session.question.reply",
  14688. "parameters": [
  14689. {
  14690. "name": "sessionID",
  14691. "in": "path",
  14692. "schema": {
  14693. "type": "string",
  14694. "pattern": "^ses"
  14695. },
  14696. "required": true
  14697. },
  14698. {
  14699. "name": "requestID",
  14700. "in": "path",
  14701. "schema": {
  14702. "type": "string",
  14703. "pattern": "^que"
  14704. },
  14705. "required": true
  14706. }
  14707. ],
  14708. "security": [],
  14709. "responses": {
  14710. "204": {
  14711. "description": "<No Content>"
  14712. },
  14713. "400": {
  14714. "description": "InvalidRequestError",
  14715. "content": {
  14716. "application/json": {
  14717. "schema": {
  14718. "$ref": "#/components/schemas/InvalidRequestError"
  14719. }
  14720. }
  14721. }
  14722. },
  14723. "401": {
  14724. "description": "UnauthorizedError",
  14725. "content": {
  14726. "application/json": {
  14727. "schema": {
  14728. "$ref": "#/components/schemas/UnauthorizedError"
  14729. }
  14730. }
  14731. }
  14732. },
  14733. "404": {
  14734. "description": "SessionNotFoundError | QuestionNotFoundError",
  14735. "content": {
  14736. "application/json": {
  14737. "schema": {
  14738. "anyOf": [
  14739. {
  14740. "$ref": "#/components/schemas/QuestionNotFoundError"
  14741. },
  14742. {
  14743. "$ref": "#/components/schemas/SessionNotFoundError"
  14744. },
  14745. {
  14746. "$ref": "#/components/schemas/SessionNotFoundError"
  14747. }
  14748. ]
  14749. }
  14750. }
  14751. }
  14752. }
  14753. },
  14754. "description": "Answer a pending question request owned by a session.",
  14755. "summary": "Reply to pending question request",
  14756. "requestBody": {
  14757. "content": {
  14758. "application/json": {
  14759. "schema": {
  14760. "$ref": "#/components/schemas/QuestionV2Reply"
  14761. }
  14762. }
  14763. },
  14764. "required": true
  14765. },
  14766. "x-codeSamples": [
  14767. {
  14768. "lang": "js",
  14769. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14770. }
  14771. ]
  14772. }
  14773. },
  14774. "/api/session/{sessionID}/question/{requestID}/reject": {
  14775. "post": {
  14776. "tags": ["session questions"],
  14777. "operationId": "v2.session.question.reject",
  14778. "parameters": [
  14779. {
  14780. "name": "sessionID",
  14781. "in": "path",
  14782. "schema": {
  14783. "type": "string",
  14784. "pattern": "^ses"
  14785. },
  14786. "required": true
  14787. },
  14788. {
  14789. "name": "requestID",
  14790. "in": "path",
  14791. "schema": {
  14792. "type": "string",
  14793. "pattern": "^que"
  14794. },
  14795. "required": true
  14796. }
  14797. ],
  14798. "security": [],
  14799. "responses": {
  14800. "204": {
  14801. "description": "<No Content>"
  14802. },
  14803. "400": {
  14804. "description": "InvalidRequestError",
  14805. "content": {
  14806. "application/json": {
  14807. "schema": {
  14808. "$ref": "#/components/schemas/InvalidRequestError"
  14809. }
  14810. }
  14811. }
  14812. },
  14813. "401": {
  14814. "description": "UnauthorizedError",
  14815. "content": {
  14816. "application/json": {
  14817. "schema": {
  14818. "$ref": "#/components/schemas/UnauthorizedError"
  14819. }
  14820. }
  14821. }
  14822. },
  14823. "404": {
  14824. "description": "SessionNotFoundError | QuestionNotFoundError",
  14825. "content": {
  14826. "application/json": {
  14827. "schema": {
  14828. "anyOf": [
  14829. {
  14830. "$ref": "#/components/schemas/QuestionNotFoundError"
  14831. },
  14832. {
  14833. "$ref": "#/components/schemas/SessionNotFoundError"
  14834. },
  14835. {
  14836. "$ref": "#/components/schemas/SessionNotFoundError"
  14837. }
  14838. ]
  14839. }
  14840. }
  14841. }
  14842. }
  14843. },
  14844. "description": "Reject a pending question request owned by a session.",
  14845. "summary": "Reject pending question request",
  14846. "x-codeSamples": [
  14847. {
  14848. "lang": "js",
  14849. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14850. }
  14851. ]
  14852. }
  14853. },
  14854. "/api/reference": {
  14855. "get": {
  14856. "tags": ["reference"],
  14857. "operationId": "v2.reference.list",
  14858. "parameters": [
  14859. {
  14860. "name": "location",
  14861. "in": "query",
  14862. "schema": {
  14863. "type": "object",
  14864. "properties": {
  14865. "directory": {
  14866. "type": "string"
  14867. },
  14868. "workspace": {
  14869. "type": "string"
  14870. }
  14871. },
  14872. "additionalProperties": false
  14873. },
  14874. "required": false,
  14875. "style": "deepObject",
  14876. "explode": true
  14877. }
  14878. ],
  14879. "security": [],
  14880. "responses": {
  14881. "200": {
  14882. "description": "Success",
  14883. "content": {
  14884. "application/json": {
  14885. "schema": {
  14886. "type": "object",
  14887. "properties": {
  14888. "location": {
  14889. "$ref": "#/components/schemas/LocationInfo"
  14890. },
  14891. "data": {
  14892. "type": "array",
  14893. "items": {
  14894. "$ref": "#/components/schemas/ReferenceInfo"
  14895. }
  14896. }
  14897. },
  14898. "required": ["location", "data"],
  14899. "additionalProperties": false
  14900. }
  14901. }
  14902. }
  14903. },
  14904. "400": {
  14905. "description": "InvalidRequestError",
  14906. "content": {
  14907. "application/json": {
  14908. "schema": {
  14909. "$ref": "#/components/schemas/InvalidRequestError"
  14910. }
  14911. }
  14912. }
  14913. },
  14914. "401": {
  14915. "description": "UnauthorizedError",
  14916. "content": {
  14917. "application/json": {
  14918. "schema": {
  14919. "$ref": "#/components/schemas/UnauthorizedError"
  14920. }
  14921. }
  14922. }
  14923. }
  14924. },
  14925. "description": "List references available in the requested location.",
  14926. "summary": "List references",
  14927. "x-codeSamples": [
  14928. {
  14929. "lang": "js",
  14930. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14931. }
  14932. ]
  14933. }
  14934. },
  14935. "/experimental/project/{projectID}/copy": {
  14936. "post": {
  14937. "tags": ["projectCopy"],
  14938. "operationId": "v2.projectCopy.create",
  14939. "parameters": [
  14940. {
  14941. "name": "projectID",
  14942. "in": "path",
  14943. "schema": {
  14944. "type": "string"
  14945. },
  14946. "required": true
  14947. },
  14948. {
  14949. "name": "location",
  14950. "in": "query",
  14951. "schema": {
  14952. "type": "object",
  14953. "properties": {
  14954. "directory": {
  14955. "type": "string"
  14956. },
  14957. "workspace": {
  14958. "type": "string"
  14959. }
  14960. },
  14961. "additionalProperties": false
  14962. },
  14963. "required": false,
  14964. "style": "deepObject",
  14965. "explode": true
  14966. }
  14967. ],
  14968. "responses": {
  14969. "200": {
  14970. "description": "ProjectCopy.Copy",
  14971. "content": {
  14972. "application/json": {
  14973. "schema": {
  14974. "$ref": "#/components/schemas/ProjectCopyCopy"
  14975. }
  14976. }
  14977. }
  14978. },
  14979. "400": {
  14980. "description": "ProjectCopyError | InvalidRequestError",
  14981. "content": {
  14982. "application/json": {
  14983. "schema": {
  14984. "anyOf": [
  14985. {
  14986. "$ref": "#/components/schemas/ProjectCopyError"
  14987. },
  14988. {
  14989. "$ref": "#/components/schemas/InvalidRequestError"
  14990. }
  14991. ]
  14992. }
  14993. }
  14994. }
  14995. }
  14996. },
  14997. "requestBody": {
  14998. "content": {
  14999. "application/json": {
  15000. "schema": {
  15001. "type": "object",
  15002. "properties": {
  15003. "strategy": {
  15004. "type": "string"
  15005. },
  15006. "directory": {
  15007. "type": "string"
  15008. },
  15009. "name": {
  15010. "type": "string"
  15011. }
  15012. },
  15013. "required": ["strategy", "directory"],
  15014. "additionalProperties": false
  15015. }
  15016. }
  15017. }
  15018. },
  15019. "x-codeSamples": [
  15020. {
  15021. "lang": "js",
  15022. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  15023. }
  15024. ]
  15025. },
  15026. "delete": {
  15027. "tags": ["projectCopy"],
  15028. "operationId": "v2.projectCopy.remove",
  15029. "parameters": [
  15030. {
  15031. "name": "projectID",
  15032. "in": "path",
  15033. "schema": {
  15034. "type": "string"
  15035. },
  15036. "required": true
  15037. },
  15038. {
  15039. "name": "location",
  15040. "in": "query",
  15041. "schema": {
  15042. "type": "object",
  15043. "properties": {
  15044. "directory": {
  15045. "type": "string"
  15046. },
  15047. "workspace": {
  15048. "type": "string"
  15049. }
  15050. },
  15051. "additionalProperties": false
  15052. },
  15053. "required": false,
  15054. "style": "deepObject",
  15055. "explode": true
  15056. }
  15057. ],
  15058. "responses": {
  15059. "204": {
  15060. "description": "<No Content>"
  15061. },
  15062. "400": {
  15063. "description": "ProjectCopyError | InvalidRequestError",
  15064. "content": {
  15065. "application/json": {
  15066. "schema": {
  15067. "anyOf": [
  15068. {
  15069. "$ref": "#/components/schemas/ProjectCopyError"
  15070. },
  15071. {
  15072. "$ref": "#/components/schemas/InvalidRequestError"
  15073. }
  15074. ]
  15075. }
  15076. }
  15077. }
  15078. }
  15079. },
  15080. "requestBody": {
  15081. "content": {
  15082. "application/json": {
  15083. "schema": {
  15084. "type": "object",
  15085. "properties": {
  15086. "directory": {
  15087. "type": "string"
  15088. },
  15089. "force": {
  15090. "type": "boolean"
  15091. }
  15092. },
  15093. "required": ["directory", "force"],
  15094. "additionalProperties": false
  15095. }
  15096. }
  15097. }
  15098. },
  15099. "x-codeSamples": [
  15100. {
  15101. "lang": "js",
  15102. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  15103. }
  15104. ]
  15105. }
  15106. },
  15107. "/experimental/project/{projectID}/copy/refresh": {
  15108. "post": {
  15109. "tags": ["projectCopy"],
  15110. "operationId": "v2.projectCopy.refresh",
  15111. "parameters": [
  15112. {
  15113. "name": "projectID",
  15114. "in": "path",
  15115. "schema": {
  15116. "type": "string"
  15117. },
  15118. "required": true
  15119. },
  15120. {
  15121. "name": "location",
  15122. "in": "query",
  15123. "schema": {
  15124. "type": "object",
  15125. "properties": {
  15126. "directory": {
  15127. "type": "string"
  15128. },
  15129. "workspace": {
  15130. "type": "string"
  15131. }
  15132. },
  15133. "additionalProperties": false
  15134. },
  15135. "required": false,
  15136. "style": "deepObject",
  15137. "explode": true
  15138. }
  15139. ],
  15140. "responses": {
  15141. "204": {
  15142. "description": "<No Content>"
  15143. },
  15144. "400": {
  15145. "description": "ProjectCopyError | InvalidRequestError",
  15146. "content": {
  15147. "application/json": {
  15148. "schema": {
  15149. "anyOf": [
  15150. {
  15151. "$ref": "#/components/schemas/ProjectCopyError"
  15152. },
  15153. {
  15154. "$ref": "#/components/schemas/InvalidRequestError"
  15155. }
  15156. ]
  15157. }
  15158. }
  15159. }
  15160. }
  15161. },
  15162. "x-codeSamples": [
  15163. {
  15164. "lang": "js",
  15165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  15166. }
  15167. ]
  15168. }
  15169. },
  15170. "/pty/{ptyID}/connect": {
  15171. "get": {
  15172. "tags": ["pty"],
  15173. "operationId": "pty.connect",
  15174. "parameters": [
  15175. {
  15176. "name": "ptyID",
  15177. "in": "path",
  15178. "schema": {
  15179. "type": "string",
  15180. "pattern": "^pty"
  15181. },
  15182. "required": true
  15183. },
  15184. {
  15185. "in": "query",
  15186. "name": "directory",
  15187. "schema": {
  15188. "type": "string"
  15189. }
  15190. },
  15191. {
  15192. "in": "query",
  15193. "name": "workspace",
  15194. "schema": {
  15195. "type": "string"
  15196. }
  15197. },
  15198. {
  15199. "in": "query",
  15200. "name": "cursor",
  15201. "schema": {
  15202. "type": "string"
  15203. }
  15204. },
  15205. {
  15206. "in": "query",
  15207. "name": "ticket",
  15208. "schema": {
  15209. "type": "string"
  15210. }
  15211. }
  15212. ],
  15213. "responses": {
  15214. "200": {
  15215. "description": "Connected session",
  15216. "content": {
  15217. "application/json": {
  15218. "schema": {
  15219. "type": "boolean",
  15220. "description": "Connected session"
  15221. }
  15222. }
  15223. }
  15224. },
  15225. "403": {
  15226. "description": "Forbidden",
  15227. "content": {
  15228. "application/json": {
  15229. "schema": {
  15230. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  15231. }
  15232. }
  15233. }
  15234. },
  15235. "404": {
  15236. "description": "Not found",
  15237. "content": {
  15238. "application/json": {
  15239. "schema": {
  15240. "$ref": "#/components/schemas/NotFoundError"
  15241. }
  15242. }
  15243. }
  15244. }
  15245. },
  15246. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  15247. "summary": "Connect to PTY session",
  15248. "x-codeSamples": [
  15249. {
  15250. "lang": "js",
  15251. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  15252. }
  15253. ]
  15254. }
  15255. }
  15256. },
  15257. "components": {
  15258. "schemas": {
  15259. "Event": {
  15260. "anyOf": [
  15261. {
  15262. "$ref": "#/components/schemas/EventModels-devRefreshed"
  15263. },
  15264. {
  15265. "$ref": "#/components/schemas/EventIntegrationUpdated"
  15266. },
  15267. {
  15268. "$ref": "#/components/schemas/EventIntegrationConnectionUpdated"
  15269. },
  15270. {
  15271. "$ref": "#/components/schemas/EventCatalogUpdated"
  15272. },
  15273. {
  15274. "$ref": "#/components/schemas/EventSessionCreated"
  15275. },
  15276. {
  15277. "$ref": "#/components/schemas/EventSessionUpdated"
  15278. },
  15279. {
  15280. "$ref": "#/components/schemas/EventSessionDeleted"
  15281. },
  15282. {
  15283. "$ref": "#/components/schemas/EventMessageUpdated"
  15284. },
  15285. {
  15286. "$ref": "#/components/schemas/EventMessageRemoved"
  15287. },
  15288. {
  15289. "$ref": "#/components/schemas/EventMessagePartUpdated"
  15290. },
  15291. {
  15292. "$ref": "#/components/schemas/EventMessagePartRemoved"
  15293. },
  15294. {
  15295. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  15296. },
  15297. {
  15298. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  15299. },
  15300. {
  15301. "$ref": "#/components/schemas/EventSessionNextMoved"
  15302. },
  15303. {
  15304. "$ref": "#/components/schemas/EventSessionNextPrompted"
  15305. },
  15306. {
  15307. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  15308. },
  15309. {
  15310. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  15311. },
  15312. {
  15313. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  15314. },
  15315. {
  15316. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  15317. },
  15318. {
  15319. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  15320. },
  15321. {
  15322. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  15323. },
  15324. {
  15325. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  15326. },
  15327. {
  15328. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  15329. },
  15330. {
  15331. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  15332. },
  15333. {
  15334. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  15335. },
  15336. {
  15337. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  15338. },
  15339. {
  15340. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  15341. },
  15342. {
  15343. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  15344. },
  15345. {
  15346. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  15347. },
  15348. {
  15349. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  15350. },
  15351. {
  15352. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  15353. },
  15354. {
  15355. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  15356. },
  15357. {
  15358. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  15359. },
  15360. {
  15361. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  15362. },
  15363. {
  15364. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  15365. },
  15366. {
  15367. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  15368. },
  15369. {
  15370. "$ref": "#/components/schemas/EventSessionNextRetried"
  15371. },
  15372. {
  15373. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  15374. },
  15375. {
  15376. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  15377. },
  15378. {
  15379. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  15380. },
  15381. {
  15382. "$ref": "#/components/schemas/EventSessionNextRevertStaged"
  15383. },
  15384. {
  15385. "$ref": "#/components/schemas/EventSessionNextRevertCleared"
  15386. },
  15387. {
  15388. "$ref": "#/components/schemas/EventSessionNextRevertCommitted"
  15389. },
  15390. {
  15391. "$ref": "#/components/schemas/EventMessagePartDelta"
  15392. },
  15393. {
  15394. "$ref": "#/components/schemas/EventSessionDiff"
  15395. },
  15396. {
  15397. "$ref": "#/components/schemas/EventSessionError"
  15398. },
  15399. {
  15400. "$ref": "#/components/schemas/EventInstallationUpdated"
  15401. },
  15402. {
  15403. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  15404. },
  15405. {
  15406. "$ref": "#/components/schemas/EventFileEdited"
  15407. },
  15408. {
  15409. "$ref": "#/components/schemas/EventReferenceUpdated"
  15410. },
  15411. {
  15412. "$ref": "#/components/schemas/EventPermissionV2Asked"
  15413. },
  15414. {
  15415. "$ref": "#/components/schemas/EventPermissionV2Replied"
  15416. },
  15417. {
  15418. "$ref": "#/components/schemas/EventPluginAdded"
  15419. },
  15420. {
  15421. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  15422. },
  15423. {
  15424. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  15425. },
  15426. {
  15427. "$ref": "#/components/schemas/EventPtyCreated"
  15428. },
  15429. {
  15430. "$ref": "#/components/schemas/EventPtyUpdated"
  15431. },
  15432. {
  15433. "$ref": "#/components/schemas/EventPtyExited"
  15434. },
  15435. {
  15436. "$ref": "#/components/schemas/EventPtyDeleted"
  15437. },
  15438. {
  15439. "$ref": "#/components/schemas/EventQuestionV2Asked"
  15440. },
  15441. {
  15442. "$ref": "#/components/schemas/EventQuestionV2Replied"
  15443. },
  15444. {
  15445. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  15446. },
  15447. {
  15448. "$ref": "#/components/schemas/EventTodoUpdated"
  15449. },
  15450. {
  15451. "$ref": "#/components/schemas/EventLspUpdated"
  15452. },
  15453. {
  15454. "$ref": "#/components/schemas/EventPermissionAsked"
  15455. },
  15456. {
  15457. "$ref": "#/components/schemas/EventPermissionReplied"
  15458. },
  15459. {
  15460. "$ref": "#/components/schemas/Event.tui.prompt.append"
  15461. },
  15462. {
  15463. "$ref": "#/components/schemas/Event.tui.command.execute"
  15464. },
  15465. {
  15466. "$ref": "#/components/schemas/Event.tui.toast.show"
  15467. },
  15468. {
  15469. "$ref": "#/components/schemas/Event.tui.session.select"
  15470. },
  15471. {
  15472. "$ref": "#/components/schemas/EventMcpToolsChanged"
  15473. },
  15474. {
  15475. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  15476. },
  15477. {
  15478. "$ref": "#/components/schemas/EventCommandExecuted"
  15479. },
  15480. {
  15481. "$ref": "#/components/schemas/EventProjectUpdated"
  15482. },
  15483. {
  15484. "$ref": "#/components/schemas/EventSessionStatus"
  15485. },
  15486. {
  15487. "$ref": "#/components/schemas/EventSessionIdle"
  15488. },
  15489. {
  15490. "$ref": "#/components/schemas/EventQuestionAsked"
  15491. },
  15492. {
  15493. "$ref": "#/components/schemas/EventQuestionReplied"
  15494. },
  15495. {
  15496. "$ref": "#/components/schemas/EventQuestionRejected"
  15497. },
  15498. {
  15499. "$ref": "#/components/schemas/EventSessionCompacted"
  15500. },
  15501. {
  15502. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  15503. },
  15504. {
  15505. "$ref": "#/components/schemas/EventWorkspaceReady"
  15506. },
  15507. {
  15508. "$ref": "#/components/schemas/EventWorkspaceFailed"
  15509. },
  15510. {
  15511. "$ref": "#/components/schemas/EventWorkspaceStatus"
  15512. },
  15513. {
  15514. "$ref": "#/components/schemas/EventWorktreeReady"
  15515. },
  15516. {
  15517. "$ref": "#/components/schemas/EventWorktreeFailed"
  15518. },
  15519. {
  15520. "$ref": "#/components/schemas/EventServerConnected"
  15521. },
  15522. {
  15523. "$ref": "#/components/schemas/EventGlobalDisposed"
  15524. },
  15525. {
  15526. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15527. }
  15528. ]
  15529. },
  15530. "QuestionReplied": {
  15531. "type": "object",
  15532. "properties": {
  15533. "sessionID": {
  15534. "type": "string",
  15535. "pattern": "^ses"
  15536. },
  15537. "requestID": {
  15538. "type": "string",
  15539. "pattern": "^que"
  15540. },
  15541. "answers": {
  15542. "type": "array",
  15543. "items": {
  15544. "$ref": "#/components/schemas/QuestionAnswer"
  15545. }
  15546. }
  15547. },
  15548. "required": ["sessionID", "requestID", "answers"],
  15549. "additionalProperties": false
  15550. },
  15551. "QuestionRejected": {
  15552. "type": "object",
  15553. "properties": {
  15554. "sessionID": {
  15555. "type": "string",
  15556. "pattern": "^ses"
  15557. },
  15558. "requestID": {
  15559. "type": "string",
  15560. "pattern": "^que"
  15561. }
  15562. },
  15563. "required": ["sessionID", "requestID"],
  15564. "additionalProperties": false
  15565. },
  15566. "OAuth": {
  15567. "type": "object",
  15568. "properties": {
  15569. "type": {
  15570. "type": "string",
  15571. "enum": ["oauth"]
  15572. },
  15573. "refresh": {
  15574. "type": "string"
  15575. },
  15576. "access": {
  15577. "type": "string"
  15578. },
  15579. "expires": {
  15580. "type": "integer",
  15581. "minimum": 0
  15582. },
  15583. "accountId": {
  15584. "type": "string"
  15585. },
  15586. "enterpriseUrl": {
  15587. "type": "string"
  15588. }
  15589. },
  15590. "required": ["type", "refresh", "access", "expires"],
  15591. "additionalProperties": false
  15592. },
  15593. "ApiAuth": {
  15594. "type": "object",
  15595. "properties": {
  15596. "type": {
  15597. "type": "string",
  15598. "enum": ["api"]
  15599. },
  15600. "key": {
  15601. "type": "string"
  15602. },
  15603. "metadata": {
  15604. "type": "object",
  15605. "additionalProperties": {
  15606. "type": "string"
  15607. }
  15608. }
  15609. },
  15610. "required": ["type", "key"],
  15611. "additionalProperties": false
  15612. },
  15613. "WellKnownAuth": {
  15614. "type": "object",
  15615. "properties": {
  15616. "type": {
  15617. "type": "string",
  15618. "enum": ["wellknown"]
  15619. },
  15620. "key": {
  15621. "type": "string"
  15622. },
  15623. "token": {
  15624. "type": "string"
  15625. }
  15626. },
  15627. "required": ["type", "key", "token"],
  15628. "additionalProperties": false
  15629. },
  15630. "Auth": {
  15631. "anyOf": [
  15632. {
  15633. "$ref": "#/components/schemas/OAuth"
  15634. },
  15635. {
  15636. "$ref": "#/components/schemas/ApiAuth"
  15637. },
  15638. {
  15639. "$ref": "#/components/schemas/WellKnownAuth"
  15640. }
  15641. ]
  15642. },
  15643. "effect_HttpApiError_BadRequest": {
  15644. "type": "object",
  15645. "properties": {
  15646. "_tag": {
  15647. "type": "string",
  15648. "enum": ["BadRequest"]
  15649. }
  15650. },
  15651. "required": ["_tag"],
  15652. "additionalProperties": false
  15653. },
  15654. "InvalidRequestError": {
  15655. "type": "object",
  15656. "properties": {
  15657. "_tag": {
  15658. "type": "string",
  15659. "enum": ["InvalidRequestError"]
  15660. },
  15661. "message": {
  15662. "type": "string"
  15663. },
  15664. "kind": {
  15665. "type": "string"
  15666. },
  15667. "field": {
  15668. "type": "string"
  15669. }
  15670. },
  15671. "required": ["_tag", "message"],
  15672. "additionalProperties": false
  15673. },
  15674. "MoveSessionError": {
  15675. "type": "object",
  15676. "properties": {
  15677. "name": {
  15678. "type": "string",
  15679. "enum": ["MoveSessionError"]
  15680. },
  15681. "data": {
  15682. "type": "object",
  15683. "properties": {
  15684. "message": {
  15685. "type": "string"
  15686. }
  15687. },
  15688. "required": ["message"],
  15689. "additionalProperties": false
  15690. }
  15691. },
  15692. "required": ["name", "data"],
  15693. "additionalProperties": false
  15694. },
  15695. "SnapshotFileDiff": {
  15696. "type": "object",
  15697. "properties": {
  15698. "file": {
  15699. "type": "string"
  15700. },
  15701. "patch": {
  15702. "type": "string"
  15703. },
  15704. "additions": {
  15705. "type": "number"
  15706. },
  15707. "deletions": {
  15708. "type": "number"
  15709. },
  15710. "status": {
  15711. "type": "string",
  15712. "enum": ["added", "deleted", "modified"]
  15713. }
  15714. },
  15715. "required": ["additions", "deletions"],
  15716. "additionalProperties": false
  15717. },
  15718. "PermissionAction": {
  15719. "type": "string",
  15720. "enum": ["allow", "deny", "ask"]
  15721. },
  15722. "PermissionRule": {
  15723. "type": "object",
  15724. "properties": {
  15725. "permission": {
  15726. "type": "string"
  15727. },
  15728. "pattern": {
  15729. "type": "string"
  15730. },
  15731. "action": {
  15732. "$ref": "#/components/schemas/PermissionAction"
  15733. }
  15734. },
  15735. "required": ["permission", "pattern", "action"],
  15736. "additionalProperties": false
  15737. },
  15738. "PermissionRuleset": {
  15739. "type": "array",
  15740. "items": {
  15741. "$ref": "#/components/schemas/PermissionRule"
  15742. }
  15743. },
  15744. "Session": {
  15745. "type": "object",
  15746. "properties": {
  15747. "id": {
  15748. "type": "string",
  15749. "pattern": "^ses"
  15750. },
  15751. "slug": {
  15752. "type": "string"
  15753. },
  15754. "projectID": {
  15755. "type": "string"
  15756. },
  15757. "workspaceID": {
  15758. "type": "string",
  15759. "pattern": "^wrk"
  15760. },
  15761. "directory": {
  15762. "type": "string"
  15763. },
  15764. "path": {
  15765. "type": "string"
  15766. },
  15767. "parentID": {
  15768. "type": "string",
  15769. "pattern": "^ses"
  15770. },
  15771. "summary": {
  15772. "type": "object",
  15773. "properties": {
  15774. "additions": {
  15775. "type": "number"
  15776. },
  15777. "deletions": {
  15778. "type": "number"
  15779. },
  15780. "files": {
  15781. "type": "number"
  15782. },
  15783. "diffs": {
  15784. "type": "array",
  15785. "items": {
  15786. "$ref": "#/components/schemas/SnapshotFileDiff"
  15787. }
  15788. }
  15789. },
  15790. "required": ["additions", "deletions", "files"],
  15791. "additionalProperties": false
  15792. },
  15793. "cost": {
  15794. "type": "number"
  15795. },
  15796. "tokens": {
  15797. "type": "object",
  15798. "properties": {
  15799. "input": {
  15800. "type": "number"
  15801. },
  15802. "output": {
  15803. "type": "number"
  15804. },
  15805. "reasoning": {
  15806. "type": "number"
  15807. },
  15808. "cache": {
  15809. "type": "object",
  15810. "properties": {
  15811. "read": {
  15812. "type": "number"
  15813. },
  15814. "write": {
  15815. "type": "number"
  15816. }
  15817. },
  15818. "required": ["read", "write"],
  15819. "additionalProperties": false
  15820. }
  15821. },
  15822. "required": ["input", "output", "reasoning", "cache"],
  15823. "additionalProperties": false
  15824. },
  15825. "share": {
  15826. "type": "object",
  15827. "properties": {
  15828. "url": {
  15829. "type": "string"
  15830. }
  15831. },
  15832. "required": ["url"],
  15833. "additionalProperties": false
  15834. },
  15835. "title": {
  15836. "type": "string"
  15837. },
  15838. "agent": {
  15839. "type": "string"
  15840. },
  15841. "model": {
  15842. "type": "object",
  15843. "properties": {
  15844. "id": {
  15845. "type": "string"
  15846. },
  15847. "providerID": {
  15848. "type": "string"
  15849. },
  15850. "variant": {
  15851. "type": "string"
  15852. }
  15853. },
  15854. "required": ["id", "providerID"],
  15855. "additionalProperties": false
  15856. },
  15857. "version": {
  15858. "type": "string"
  15859. },
  15860. "metadata": {
  15861. "type": "object"
  15862. },
  15863. "time": {
  15864. "type": "object",
  15865. "properties": {
  15866. "created": {
  15867. "type": "integer",
  15868. "minimum": 0
  15869. },
  15870. "updated": {
  15871. "type": "integer",
  15872. "minimum": 0
  15873. },
  15874. "compacting": {
  15875. "type": "integer",
  15876. "minimum": 0
  15877. },
  15878. "archived": {
  15879. "type": "number"
  15880. }
  15881. },
  15882. "required": ["created", "updated"],
  15883. "additionalProperties": false
  15884. },
  15885. "permission": {
  15886. "$ref": "#/components/schemas/PermissionRuleset"
  15887. },
  15888. "revert": {
  15889. "type": "object",
  15890. "properties": {
  15891. "messageID": {
  15892. "type": "string",
  15893. "pattern": "^msg"
  15894. },
  15895. "partID": {
  15896. "type": "string",
  15897. "pattern": "^prt"
  15898. },
  15899. "snapshot": {
  15900. "type": "string"
  15901. },
  15902. "diff": {
  15903. "type": "string"
  15904. }
  15905. },
  15906. "required": ["messageID"],
  15907. "additionalProperties": false
  15908. }
  15909. },
  15910. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15911. "additionalProperties": false
  15912. },
  15913. "OutputFormatText": {
  15914. "type": "object",
  15915. "properties": {
  15916. "type": {
  15917. "type": "string",
  15918. "enum": ["text"]
  15919. }
  15920. },
  15921. "required": ["type"],
  15922. "additionalProperties": false
  15923. },
  15924. "JSONSchema": {
  15925. "type": "object"
  15926. },
  15927. "OutputFormatJsonSchema": {
  15928. "type": "object",
  15929. "properties": {
  15930. "type": {
  15931. "type": "string",
  15932. "enum": ["json_schema"]
  15933. },
  15934. "schema": {
  15935. "$ref": "#/components/schemas/JSONSchema"
  15936. },
  15937. "retryCount": {
  15938. "type": "integer",
  15939. "minimum": 0
  15940. }
  15941. },
  15942. "required": ["type", "schema"],
  15943. "additionalProperties": false
  15944. },
  15945. "OutputFormat": {
  15946. "anyOf": [
  15947. {
  15948. "$ref": "#/components/schemas/OutputFormatText"
  15949. },
  15950. {
  15951. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15952. }
  15953. ]
  15954. },
  15955. "UserMessage": {
  15956. "type": "object",
  15957. "properties": {
  15958. "id": {
  15959. "type": "string",
  15960. "pattern": "^msg"
  15961. },
  15962. "sessionID": {
  15963. "type": "string",
  15964. "pattern": "^ses"
  15965. },
  15966. "role": {
  15967. "type": "string",
  15968. "enum": ["user"]
  15969. },
  15970. "time": {
  15971. "type": "object",
  15972. "properties": {
  15973. "created": {
  15974. "type": "number",
  15975. "minimum": 0
  15976. }
  15977. },
  15978. "required": ["created"],
  15979. "additionalProperties": false
  15980. },
  15981. "format": {
  15982. "$ref": "#/components/schemas/OutputFormat"
  15983. },
  15984. "summary": {
  15985. "type": "object",
  15986. "properties": {
  15987. "title": {
  15988. "type": "string"
  15989. },
  15990. "body": {
  15991. "type": "string"
  15992. },
  15993. "diffs": {
  15994. "type": "array",
  15995. "items": {
  15996. "$ref": "#/components/schemas/SnapshotFileDiff"
  15997. }
  15998. }
  15999. },
  16000. "required": ["diffs"],
  16001. "additionalProperties": false
  16002. },
  16003. "agent": {
  16004. "type": "string"
  16005. },
  16006. "model": {
  16007. "type": "object",
  16008. "properties": {
  16009. "providerID": {
  16010. "type": "string"
  16011. },
  16012. "modelID": {
  16013. "type": "string"
  16014. },
  16015. "variant": {
  16016. "type": "string"
  16017. }
  16018. },
  16019. "required": ["providerID", "modelID"],
  16020. "additionalProperties": false
  16021. },
  16022. "system": {
  16023. "type": "string"
  16024. },
  16025. "tools": {
  16026. "type": "object",
  16027. "additionalProperties": {
  16028. "type": "boolean"
  16029. }
  16030. }
  16031. },
  16032. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  16033. "additionalProperties": false
  16034. },
  16035. "ProviderAuthError": {
  16036. "type": "object",
  16037. "properties": {
  16038. "name": {
  16039. "type": "string",
  16040. "enum": ["ProviderAuthError"]
  16041. },
  16042. "data": {
  16043. "type": "object",
  16044. "properties": {
  16045. "providerID": {
  16046. "type": "string"
  16047. },
  16048. "message": {
  16049. "type": "string"
  16050. }
  16051. },
  16052. "required": ["providerID", "message"],
  16053. "additionalProperties": false
  16054. }
  16055. },
  16056. "required": ["name", "data"],
  16057. "additionalProperties": false
  16058. },
  16059. "UnknownError": {
  16060. "type": "object",
  16061. "properties": {
  16062. "name": {
  16063. "type": "string",
  16064. "enum": ["UnknownError"]
  16065. },
  16066. "data": {
  16067. "type": "object",
  16068. "properties": {
  16069. "message": {
  16070. "type": "string"
  16071. },
  16072. "ref": {
  16073. "type": "string"
  16074. }
  16075. },
  16076. "required": ["message"],
  16077. "additionalProperties": false
  16078. }
  16079. },
  16080. "required": ["name", "data"],
  16081. "additionalProperties": false
  16082. },
  16083. "MessageOutputLengthError": {
  16084. "type": "object",
  16085. "properties": {
  16086. "name": {
  16087. "type": "string",
  16088. "enum": ["MessageOutputLengthError"]
  16089. },
  16090. "data": {
  16091. "type": "object",
  16092. "properties": {}
  16093. }
  16094. },
  16095. "required": ["name", "data"],
  16096. "additionalProperties": false
  16097. },
  16098. "MessageAbortedError": {
  16099. "type": "object",
  16100. "properties": {
  16101. "name": {
  16102. "type": "string",
  16103. "enum": ["MessageAbortedError"]
  16104. },
  16105. "data": {
  16106. "type": "object",
  16107. "properties": {
  16108. "message": {
  16109. "type": "string"
  16110. }
  16111. },
  16112. "required": ["message"],
  16113. "additionalProperties": false
  16114. }
  16115. },
  16116. "required": ["name", "data"],
  16117. "additionalProperties": false
  16118. },
  16119. "StructuredOutputError": {
  16120. "type": "object",
  16121. "properties": {
  16122. "name": {
  16123. "type": "string",
  16124. "enum": ["StructuredOutputError"]
  16125. },
  16126. "data": {
  16127. "type": "object",
  16128. "properties": {
  16129. "message": {
  16130. "type": "string"
  16131. },
  16132. "retries": {
  16133. "type": "integer",
  16134. "minimum": 0
  16135. }
  16136. },
  16137. "required": ["message", "retries"],
  16138. "additionalProperties": false
  16139. }
  16140. },
  16141. "required": ["name", "data"],
  16142. "additionalProperties": false
  16143. },
  16144. "ContextOverflowError": {
  16145. "type": "object",
  16146. "properties": {
  16147. "name": {
  16148. "type": "string",
  16149. "enum": ["ContextOverflowError"]
  16150. },
  16151. "data": {
  16152. "type": "object",
  16153. "properties": {
  16154. "message": {
  16155. "type": "string"
  16156. },
  16157. "responseBody": {
  16158. "type": "string"
  16159. }
  16160. },
  16161. "required": ["message"],
  16162. "additionalProperties": false
  16163. }
  16164. },
  16165. "required": ["name", "data"],
  16166. "additionalProperties": false
  16167. },
  16168. "ContentFilterError": {
  16169. "type": "object",
  16170. "properties": {
  16171. "name": {
  16172. "type": "string",
  16173. "enum": ["ContentFilterError"]
  16174. },
  16175. "data": {
  16176. "type": "object",
  16177. "properties": {
  16178. "message": {
  16179. "type": "string"
  16180. }
  16181. },
  16182. "required": ["message"],
  16183. "additionalProperties": false
  16184. }
  16185. },
  16186. "required": ["name", "data"],
  16187. "additionalProperties": false
  16188. },
  16189. "APIError": {
  16190. "type": "object",
  16191. "properties": {
  16192. "name": {
  16193. "type": "string",
  16194. "enum": ["APIError"]
  16195. },
  16196. "data": {
  16197. "type": "object",
  16198. "properties": {
  16199. "message": {
  16200. "type": "string"
  16201. },
  16202. "statusCode": {
  16203. "type": "integer",
  16204. "minimum": 0
  16205. },
  16206. "isRetryable": {
  16207. "type": "boolean"
  16208. },
  16209. "responseHeaders": {
  16210. "type": "object",
  16211. "additionalProperties": {
  16212. "type": "string"
  16213. }
  16214. },
  16215. "responseBody": {
  16216. "type": "string"
  16217. },
  16218. "metadata": {
  16219. "type": "object",
  16220. "additionalProperties": {
  16221. "type": "string"
  16222. }
  16223. }
  16224. },
  16225. "required": ["message", "isRetryable"],
  16226. "additionalProperties": false
  16227. }
  16228. },
  16229. "required": ["name", "data"],
  16230. "additionalProperties": false
  16231. },
  16232. "AssistantMessage": {
  16233. "type": "object",
  16234. "properties": {
  16235. "id": {
  16236. "type": "string",
  16237. "pattern": "^msg"
  16238. },
  16239. "sessionID": {
  16240. "type": "string",
  16241. "pattern": "^ses"
  16242. },
  16243. "role": {
  16244. "type": "string",
  16245. "enum": ["assistant"]
  16246. },
  16247. "time": {
  16248. "type": "object",
  16249. "properties": {
  16250. "created": {
  16251. "type": "integer",
  16252. "minimum": 0
  16253. },
  16254. "completed": {
  16255. "type": "integer",
  16256. "minimum": 0
  16257. }
  16258. },
  16259. "required": ["created"],
  16260. "additionalProperties": false
  16261. },
  16262. "error": {
  16263. "anyOf": [
  16264. {
  16265. "$ref": "#/components/schemas/ProviderAuthError"
  16266. },
  16267. {
  16268. "$ref": "#/components/schemas/UnknownError"
  16269. },
  16270. {
  16271. "$ref": "#/components/schemas/MessageOutputLengthError"
  16272. },
  16273. {
  16274. "$ref": "#/components/schemas/MessageAbortedError"
  16275. },
  16276. {
  16277. "$ref": "#/components/schemas/StructuredOutputError"
  16278. },
  16279. {
  16280. "$ref": "#/components/schemas/ContextOverflowError"
  16281. },
  16282. {
  16283. "$ref": "#/components/schemas/ContentFilterError"
  16284. },
  16285. {
  16286. "$ref": "#/components/schemas/APIError"
  16287. }
  16288. ]
  16289. },
  16290. "parentID": {
  16291. "type": "string",
  16292. "pattern": "^msg"
  16293. },
  16294. "modelID": {
  16295. "type": "string"
  16296. },
  16297. "providerID": {
  16298. "type": "string"
  16299. },
  16300. "mode": {
  16301. "type": "string"
  16302. },
  16303. "agent": {
  16304. "type": "string"
  16305. },
  16306. "path": {
  16307. "type": "object",
  16308. "properties": {
  16309. "cwd": {
  16310. "type": "string"
  16311. },
  16312. "root": {
  16313. "type": "string"
  16314. }
  16315. },
  16316. "required": ["cwd", "root"],
  16317. "additionalProperties": false
  16318. },
  16319. "summary": {
  16320. "type": "boolean"
  16321. },
  16322. "cost": {
  16323. "type": "number"
  16324. },
  16325. "tokens": {
  16326. "type": "object",
  16327. "properties": {
  16328. "total": {
  16329. "type": "number"
  16330. },
  16331. "input": {
  16332. "type": "number"
  16333. },
  16334. "output": {
  16335. "type": "number"
  16336. },
  16337. "reasoning": {
  16338. "type": "number"
  16339. },
  16340. "cache": {
  16341. "type": "object",
  16342. "properties": {
  16343. "read": {
  16344. "type": "number"
  16345. },
  16346. "write": {
  16347. "type": "number"
  16348. }
  16349. },
  16350. "required": ["read", "write"],
  16351. "additionalProperties": false
  16352. }
  16353. },
  16354. "required": ["input", "output", "reasoning", "cache"],
  16355. "additionalProperties": false
  16356. },
  16357. "structured": {},
  16358. "variant": {
  16359. "type": "string"
  16360. },
  16361. "finish": {
  16362. "type": "string"
  16363. }
  16364. },
  16365. "required": [
  16366. "id",
  16367. "sessionID",
  16368. "role",
  16369. "time",
  16370. "parentID",
  16371. "modelID",
  16372. "providerID",
  16373. "mode",
  16374. "agent",
  16375. "path",
  16376. "cost",
  16377. "tokens"
  16378. ],
  16379. "additionalProperties": false
  16380. },
  16381. "Message": {
  16382. "anyOf": [
  16383. {
  16384. "$ref": "#/components/schemas/UserMessage"
  16385. },
  16386. {
  16387. "$ref": "#/components/schemas/AssistantMessage"
  16388. }
  16389. ]
  16390. },
  16391. "TextPart": {
  16392. "type": "object",
  16393. "properties": {
  16394. "id": {
  16395. "type": "string",
  16396. "pattern": "^prt"
  16397. },
  16398. "sessionID": {
  16399. "type": "string",
  16400. "pattern": "^ses"
  16401. },
  16402. "messageID": {
  16403. "type": "string",
  16404. "pattern": "^msg"
  16405. },
  16406. "type": {
  16407. "type": "string",
  16408. "enum": ["text"]
  16409. },
  16410. "text": {
  16411. "type": "string"
  16412. },
  16413. "synthetic": {
  16414. "type": "boolean"
  16415. },
  16416. "ignored": {
  16417. "type": "boolean"
  16418. },
  16419. "time": {
  16420. "type": "object",
  16421. "properties": {
  16422. "start": {
  16423. "type": "integer",
  16424. "minimum": 0
  16425. },
  16426. "end": {
  16427. "type": "integer",
  16428. "minimum": 0
  16429. }
  16430. },
  16431. "required": ["start"],
  16432. "additionalProperties": false
  16433. },
  16434. "metadata": {
  16435. "type": "object"
  16436. }
  16437. },
  16438. "required": ["id", "sessionID", "messageID", "type", "text"],
  16439. "additionalProperties": false
  16440. },
  16441. "SubtaskPart": {
  16442. "type": "object",
  16443. "properties": {
  16444. "id": {
  16445. "type": "string",
  16446. "pattern": "^prt"
  16447. },
  16448. "sessionID": {
  16449. "type": "string",
  16450. "pattern": "^ses"
  16451. },
  16452. "messageID": {
  16453. "type": "string",
  16454. "pattern": "^msg"
  16455. },
  16456. "type": {
  16457. "type": "string",
  16458. "enum": ["subtask"]
  16459. },
  16460. "prompt": {
  16461. "type": "string"
  16462. },
  16463. "description": {
  16464. "type": "string"
  16465. },
  16466. "agent": {
  16467. "type": "string"
  16468. },
  16469. "model": {
  16470. "type": "object",
  16471. "properties": {
  16472. "providerID": {
  16473. "type": "string"
  16474. },
  16475. "modelID": {
  16476. "type": "string"
  16477. }
  16478. },
  16479. "required": ["providerID", "modelID"],
  16480. "additionalProperties": false
  16481. },
  16482. "command": {
  16483. "type": "string"
  16484. }
  16485. },
  16486. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  16487. "additionalProperties": false
  16488. },
  16489. "ReasoningPart": {
  16490. "type": "object",
  16491. "properties": {
  16492. "id": {
  16493. "type": "string",
  16494. "pattern": "^prt"
  16495. },
  16496. "sessionID": {
  16497. "type": "string",
  16498. "pattern": "^ses"
  16499. },
  16500. "messageID": {
  16501. "type": "string",
  16502. "pattern": "^msg"
  16503. },
  16504. "type": {
  16505. "type": "string",
  16506. "enum": ["reasoning"]
  16507. },
  16508. "text": {
  16509. "type": "string"
  16510. },
  16511. "metadata": {
  16512. "type": "object"
  16513. },
  16514. "time": {
  16515. "type": "object",
  16516. "properties": {
  16517. "start": {
  16518. "type": "integer",
  16519. "minimum": 0
  16520. },
  16521. "end": {
  16522. "type": "integer",
  16523. "minimum": 0
  16524. }
  16525. },
  16526. "required": ["start"],
  16527. "additionalProperties": false
  16528. }
  16529. },
  16530. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  16531. "additionalProperties": false
  16532. },
  16533. "FilePartSourceText": {
  16534. "type": "object",
  16535. "properties": {
  16536. "value": {
  16537. "type": "string"
  16538. },
  16539. "start": {
  16540. "type": "number"
  16541. },
  16542. "end": {
  16543. "type": "number"
  16544. }
  16545. },
  16546. "required": ["value", "start", "end"],
  16547. "additionalProperties": false
  16548. },
  16549. "FileSource": {
  16550. "type": "object",
  16551. "properties": {
  16552. "text": {
  16553. "$ref": "#/components/schemas/FilePartSourceText"
  16554. },
  16555. "type": {
  16556. "type": "string",
  16557. "enum": ["file"]
  16558. },
  16559. "path": {
  16560. "type": "string"
  16561. }
  16562. },
  16563. "required": ["text", "type", "path"],
  16564. "additionalProperties": false
  16565. },
  16566. "Range": {
  16567. "type": "object",
  16568. "properties": {
  16569. "start": {
  16570. "type": "object",
  16571. "properties": {
  16572. "line": {
  16573. "type": "integer",
  16574. "minimum": 0
  16575. },
  16576. "character": {
  16577. "type": "integer",
  16578. "minimum": 0
  16579. }
  16580. },
  16581. "required": ["line", "character"],
  16582. "additionalProperties": false
  16583. },
  16584. "end": {
  16585. "type": "object",
  16586. "properties": {
  16587. "line": {
  16588. "type": "integer",
  16589. "minimum": 0
  16590. },
  16591. "character": {
  16592. "type": "integer",
  16593. "minimum": 0
  16594. }
  16595. },
  16596. "required": ["line", "character"],
  16597. "additionalProperties": false
  16598. }
  16599. },
  16600. "required": ["start", "end"],
  16601. "additionalProperties": false
  16602. },
  16603. "SymbolSource": {
  16604. "type": "object",
  16605. "properties": {
  16606. "text": {
  16607. "$ref": "#/components/schemas/FilePartSourceText"
  16608. },
  16609. "type": {
  16610. "type": "string",
  16611. "enum": ["symbol"]
  16612. },
  16613. "path": {
  16614. "type": "string"
  16615. },
  16616. "range": {
  16617. "$ref": "#/components/schemas/Range"
  16618. },
  16619. "name": {
  16620. "type": "string"
  16621. },
  16622. "kind": {
  16623. "type": "integer",
  16624. "minimum": 0
  16625. }
  16626. },
  16627. "required": ["text", "type", "path", "range", "name", "kind"],
  16628. "additionalProperties": false
  16629. },
  16630. "ResourceSource": {
  16631. "type": "object",
  16632. "properties": {
  16633. "text": {
  16634. "$ref": "#/components/schemas/FilePartSourceText"
  16635. },
  16636. "type": {
  16637. "type": "string",
  16638. "enum": ["resource"]
  16639. },
  16640. "clientName": {
  16641. "type": "string"
  16642. },
  16643. "uri": {
  16644. "type": "string"
  16645. }
  16646. },
  16647. "required": ["text", "type", "clientName", "uri"],
  16648. "additionalProperties": false
  16649. },
  16650. "FilePartSource": {
  16651. "anyOf": [
  16652. {
  16653. "$ref": "#/components/schemas/FileSource"
  16654. },
  16655. {
  16656. "$ref": "#/components/schemas/SymbolSource"
  16657. },
  16658. {
  16659. "$ref": "#/components/schemas/ResourceSource"
  16660. }
  16661. ]
  16662. },
  16663. "FilePart": {
  16664. "type": "object",
  16665. "properties": {
  16666. "id": {
  16667. "type": "string",
  16668. "pattern": "^prt"
  16669. },
  16670. "sessionID": {
  16671. "type": "string",
  16672. "pattern": "^ses"
  16673. },
  16674. "messageID": {
  16675. "type": "string",
  16676. "pattern": "^msg"
  16677. },
  16678. "type": {
  16679. "type": "string",
  16680. "enum": ["file"]
  16681. },
  16682. "mime": {
  16683. "type": "string"
  16684. },
  16685. "filename": {
  16686. "type": "string"
  16687. },
  16688. "url": {
  16689. "type": "string"
  16690. },
  16691. "source": {
  16692. "$ref": "#/components/schemas/FilePartSource"
  16693. }
  16694. },
  16695. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16696. "additionalProperties": false
  16697. },
  16698. "ToolStatePending": {
  16699. "type": "object",
  16700. "properties": {
  16701. "status": {
  16702. "type": "string",
  16703. "enum": ["pending"]
  16704. },
  16705. "input": {
  16706. "type": "object"
  16707. },
  16708. "raw": {
  16709. "type": "string"
  16710. }
  16711. },
  16712. "required": ["status", "input", "raw"],
  16713. "additionalProperties": false
  16714. },
  16715. "ToolStateRunning": {
  16716. "type": "object",
  16717. "properties": {
  16718. "status": {
  16719. "type": "string",
  16720. "enum": ["running"]
  16721. },
  16722. "input": {
  16723. "type": "object"
  16724. },
  16725. "title": {
  16726. "type": "string"
  16727. },
  16728. "metadata": {
  16729. "type": "object"
  16730. },
  16731. "time": {
  16732. "type": "object",
  16733. "properties": {
  16734. "start": {
  16735. "type": "integer",
  16736. "minimum": 0
  16737. }
  16738. },
  16739. "required": ["start"],
  16740. "additionalProperties": false
  16741. }
  16742. },
  16743. "required": ["status", "input", "time"],
  16744. "additionalProperties": false
  16745. },
  16746. "ToolStateCompleted": {
  16747. "type": "object",
  16748. "properties": {
  16749. "status": {
  16750. "type": "string",
  16751. "enum": ["completed"]
  16752. },
  16753. "input": {
  16754. "type": "object"
  16755. },
  16756. "output": {
  16757. "type": "string"
  16758. },
  16759. "title": {
  16760. "type": "string"
  16761. },
  16762. "metadata": {
  16763. "type": "object"
  16764. },
  16765. "time": {
  16766. "type": "object",
  16767. "properties": {
  16768. "start": {
  16769. "type": "integer",
  16770. "minimum": 0
  16771. },
  16772. "end": {
  16773. "type": "integer",
  16774. "minimum": 0
  16775. },
  16776. "compacted": {
  16777. "type": "integer",
  16778. "minimum": 0
  16779. }
  16780. },
  16781. "required": ["start", "end"],
  16782. "additionalProperties": false
  16783. },
  16784. "attachments": {
  16785. "type": "array",
  16786. "items": {
  16787. "$ref": "#/components/schemas/FilePart"
  16788. }
  16789. }
  16790. },
  16791. "required": ["status", "input", "output", "title", "metadata", "time"],
  16792. "additionalProperties": false
  16793. },
  16794. "ToolStateError": {
  16795. "type": "object",
  16796. "properties": {
  16797. "status": {
  16798. "type": "string",
  16799. "enum": ["error"]
  16800. },
  16801. "input": {
  16802. "type": "object"
  16803. },
  16804. "error": {
  16805. "type": "string"
  16806. },
  16807. "metadata": {
  16808. "type": "object"
  16809. },
  16810. "time": {
  16811. "type": "object",
  16812. "properties": {
  16813. "start": {
  16814. "type": "integer",
  16815. "minimum": 0
  16816. },
  16817. "end": {
  16818. "type": "integer",
  16819. "minimum": 0
  16820. }
  16821. },
  16822. "required": ["start", "end"],
  16823. "additionalProperties": false
  16824. }
  16825. },
  16826. "required": ["status", "input", "error", "time"],
  16827. "additionalProperties": false
  16828. },
  16829. "ToolState": {
  16830. "anyOf": [
  16831. {
  16832. "$ref": "#/components/schemas/ToolStatePending"
  16833. },
  16834. {
  16835. "$ref": "#/components/schemas/ToolStateRunning"
  16836. },
  16837. {
  16838. "$ref": "#/components/schemas/ToolStateCompleted"
  16839. },
  16840. {
  16841. "$ref": "#/components/schemas/ToolStateError"
  16842. }
  16843. ]
  16844. },
  16845. "ToolPart": {
  16846. "type": "object",
  16847. "properties": {
  16848. "id": {
  16849. "type": "string",
  16850. "pattern": "^prt"
  16851. },
  16852. "sessionID": {
  16853. "type": "string",
  16854. "pattern": "^ses"
  16855. },
  16856. "messageID": {
  16857. "type": "string",
  16858. "pattern": "^msg"
  16859. },
  16860. "type": {
  16861. "type": "string",
  16862. "enum": ["tool"]
  16863. },
  16864. "callID": {
  16865. "type": "string"
  16866. },
  16867. "tool": {
  16868. "type": "string"
  16869. },
  16870. "state": {
  16871. "$ref": "#/components/schemas/ToolState"
  16872. },
  16873. "metadata": {
  16874. "type": "object"
  16875. }
  16876. },
  16877. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16878. "additionalProperties": false
  16879. },
  16880. "StepStartPart": {
  16881. "type": "object",
  16882. "properties": {
  16883. "id": {
  16884. "type": "string",
  16885. "pattern": "^prt"
  16886. },
  16887. "sessionID": {
  16888. "type": "string",
  16889. "pattern": "^ses"
  16890. },
  16891. "messageID": {
  16892. "type": "string",
  16893. "pattern": "^msg"
  16894. },
  16895. "type": {
  16896. "type": "string",
  16897. "enum": ["step-start"]
  16898. },
  16899. "snapshot": {
  16900. "type": "string"
  16901. }
  16902. },
  16903. "required": ["id", "sessionID", "messageID", "type"],
  16904. "additionalProperties": false
  16905. },
  16906. "StepFinishPart": {
  16907. "type": "object",
  16908. "properties": {
  16909. "id": {
  16910. "type": "string",
  16911. "pattern": "^prt"
  16912. },
  16913. "sessionID": {
  16914. "type": "string",
  16915. "pattern": "^ses"
  16916. },
  16917. "messageID": {
  16918. "type": "string",
  16919. "pattern": "^msg"
  16920. },
  16921. "type": {
  16922. "type": "string",
  16923. "enum": ["step-finish"]
  16924. },
  16925. "reason": {
  16926. "type": "string"
  16927. },
  16928. "snapshot": {
  16929. "type": "string"
  16930. },
  16931. "cost": {
  16932. "type": "number"
  16933. },
  16934. "tokens": {
  16935. "type": "object",
  16936. "properties": {
  16937. "total": {
  16938. "type": "number"
  16939. },
  16940. "input": {
  16941. "type": "number"
  16942. },
  16943. "output": {
  16944. "type": "number"
  16945. },
  16946. "reasoning": {
  16947. "type": "number"
  16948. },
  16949. "cache": {
  16950. "type": "object",
  16951. "properties": {
  16952. "read": {
  16953. "type": "number"
  16954. },
  16955. "write": {
  16956. "type": "number"
  16957. }
  16958. },
  16959. "required": ["read", "write"],
  16960. "additionalProperties": false
  16961. }
  16962. },
  16963. "required": ["input", "output", "reasoning", "cache"],
  16964. "additionalProperties": false
  16965. }
  16966. },
  16967. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16968. "additionalProperties": false
  16969. },
  16970. "SnapshotPart": {
  16971. "type": "object",
  16972. "properties": {
  16973. "id": {
  16974. "type": "string",
  16975. "pattern": "^prt"
  16976. },
  16977. "sessionID": {
  16978. "type": "string",
  16979. "pattern": "^ses"
  16980. },
  16981. "messageID": {
  16982. "type": "string",
  16983. "pattern": "^msg"
  16984. },
  16985. "type": {
  16986. "type": "string",
  16987. "enum": ["snapshot"]
  16988. },
  16989. "snapshot": {
  16990. "type": "string"
  16991. }
  16992. },
  16993. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16994. "additionalProperties": false
  16995. },
  16996. "PatchPart": {
  16997. "type": "object",
  16998. "properties": {
  16999. "id": {
  17000. "type": "string",
  17001. "pattern": "^prt"
  17002. },
  17003. "sessionID": {
  17004. "type": "string",
  17005. "pattern": "^ses"
  17006. },
  17007. "messageID": {
  17008. "type": "string",
  17009. "pattern": "^msg"
  17010. },
  17011. "type": {
  17012. "type": "string",
  17013. "enum": ["patch"]
  17014. },
  17015. "hash": {
  17016. "type": "string"
  17017. },
  17018. "files": {
  17019. "type": "array",
  17020. "items": {
  17021. "type": "string"
  17022. }
  17023. }
  17024. },
  17025. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  17026. "additionalProperties": false
  17027. },
  17028. "AgentPart": {
  17029. "type": "object",
  17030. "properties": {
  17031. "id": {
  17032. "type": "string",
  17033. "pattern": "^prt"
  17034. },
  17035. "sessionID": {
  17036. "type": "string",
  17037. "pattern": "^ses"
  17038. },
  17039. "messageID": {
  17040. "type": "string",
  17041. "pattern": "^msg"
  17042. },
  17043. "type": {
  17044. "type": "string",
  17045. "enum": ["agent"]
  17046. },
  17047. "name": {
  17048. "type": "string"
  17049. },
  17050. "source": {
  17051. "type": "object",
  17052. "properties": {
  17053. "value": {
  17054. "type": "string"
  17055. },
  17056. "start": {
  17057. "type": "integer",
  17058. "minimum": 0
  17059. },
  17060. "end": {
  17061. "type": "integer",
  17062. "minimum": 0
  17063. }
  17064. },
  17065. "required": ["value", "start", "end"],
  17066. "additionalProperties": false
  17067. }
  17068. },
  17069. "required": ["id", "sessionID", "messageID", "type", "name"],
  17070. "additionalProperties": false
  17071. },
  17072. "RetryPart": {
  17073. "type": "object",
  17074. "properties": {
  17075. "id": {
  17076. "type": "string",
  17077. "pattern": "^prt"
  17078. },
  17079. "sessionID": {
  17080. "type": "string",
  17081. "pattern": "^ses"
  17082. },
  17083. "messageID": {
  17084. "type": "string",
  17085. "pattern": "^msg"
  17086. },
  17087. "type": {
  17088. "type": "string",
  17089. "enum": ["retry"]
  17090. },
  17091. "attempt": {
  17092. "type": "integer",
  17093. "minimum": 0
  17094. },
  17095. "error": {
  17096. "$ref": "#/components/schemas/APIError"
  17097. },
  17098. "time": {
  17099. "type": "object",
  17100. "properties": {
  17101. "created": {
  17102. "type": "integer",
  17103. "minimum": 0
  17104. }
  17105. },
  17106. "required": ["created"],
  17107. "additionalProperties": false
  17108. }
  17109. },
  17110. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  17111. "additionalProperties": false
  17112. },
  17113. "CompactionPart": {
  17114. "type": "object",
  17115. "properties": {
  17116. "id": {
  17117. "type": "string",
  17118. "pattern": "^prt"
  17119. },
  17120. "sessionID": {
  17121. "type": "string",
  17122. "pattern": "^ses"
  17123. },
  17124. "messageID": {
  17125. "type": "string",
  17126. "pattern": "^msg"
  17127. },
  17128. "type": {
  17129. "type": "string",
  17130. "enum": ["compaction"]
  17131. },
  17132. "auto": {
  17133. "type": "boolean"
  17134. },
  17135. "overflow": {
  17136. "type": "boolean"
  17137. },
  17138. "tail_start_id": {
  17139. "type": "string",
  17140. "pattern": "^msg"
  17141. }
  17142. },
  17143. "required": ["id", "sessionID", "messageID", "type", "auto"],
  17144. "additionalProperties": false
  17145. },
  17146. "Part": {
  17147. "anyOf": [
  17148. {
  17149. "$ref": "#/components/schemas/TextPart"
  17150. },
  17151. {
  17152. "$ref": "#/components/schemas/SubtaskPart"
  17153. },
  17154. {
  17155. "$ref": "#/components/schemas/ReasoningPart"
  17156. },
  17157. {
  17158. "$ref": "#/components/schemas/FilePart"
  17159. },
  17160. {
  17161. "$ref": "#/components/schemas/ToolPart"
  17162. },
  17163. {
  17164. "$ref": "#/components/schemas/StepStartPart"
  17165. },
  17166. {
  17167. "$ref": "#/components/schemas/StepFinishPart"
  17168. },
  17169. {
  17170. "$ref": "#/components/schemas/SnapshotPart"
  17171. },
  17172. {
  17173. "$ref": "#/components/schemas/PatchPart"
  17174. },
  17175. {
  17176. "$ref": "#/components/schemas/AgentPart"
  17177. },
  17178. {
  17179. "$ref": "#/components/schemas/RetryPart"
  17180. },
  17181. {
  17182. "$ref": "#/components/schemas/CompactionPart"
  17183. }
  17184. ]
  17185. },
  17186. "Prompt": {
  17187. "type": "object",
  17188. "properties": {
  17189. "text": {
  17190. "type": "string"
  17191. },
  17192. "files": {
  17193. "type": "array",
  17194. "items": {
  17195. "$ref": "#/components/schemas/PromptFileAttachment"
  17196. }
  17197. },
  17198. "agents": {
  17199. "type": "array",
  17200. "items": {
  17201. "$ref": "#/components/schemas/PromptAgentAttachment"
  17202. }
  17203. }
  17204. },
  17205. "required": ["text"],
  17206. "additionalProperties": false
  17207. },
  17208. "Pty": {
  17209. "type": "object",
  17210. "properties": {
  17211. "id": {
  17212. "type": "string",
  17213. "pattern": "^pty"
  17214. },
  17215. "title": {
  17216. "type": "string"
  17217. },
  17218. "command": {
  17219. "type": "string"
  17220. },
  17221. "args": {
  17222. "type": "array",
  17223. "items": {
  17224. "type": "string"
  17225. }
  17226. },
  17227. "cwd": {
  17228. "type": "string"
  17229. },
  17230. "status": {
  17231. "type": "string",
  17232. "enum": ["running", "exited"]
  17233. },
  17234. "pid": {
  17235. "type": "integer",
  17236. "minimum": 0
  17237. },
  17238. "exitCode": {
  17239. "type": "integer",
  17240. "minimum": 0
  17241. }
  17242. },
  17243. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  17244. "additionalProperties": false
  17245. },
  17246. "Todo": {
  17247. "type": "object",
  17248. "properties": {
  17249. "content": {
  17250. "type": "string",
  17251. "description": "Brief description of the task"
  17252. },
  17253. "status": {
  17254. "type": "string",
  17255. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  17256. },
  17257. "priority": {
  17258. "type": "string",
  17259. "description": "Priority level of the task: high, medium, low"
  17260. }
  17261. },
  17262. "required": ["content", "status", "priority"],
  17263. "additionalProperties": false
  17264. },
  17265. "SessionStatus": {
  17266. "anyOf": [
  17267. {
  17268. "type": "object",
  17269. "properties": {
  17270. "type": {
  17271. "type": "string",
  17272. "enum": ["idle"]
  17273. }
  17274. },
  17275. "required": ["type"],
  17276. "additionalProperties": false
  17277. },
  17278. {
  17279. "type": "object",
  17280. "properties": {
  17281. "type": {
  17282. "type": "string",
  17283. "enum": ["retry"]
  17284. },
  17285. "attempt": {
  17286. "type": "integer",
  17287. "minimum": 0
  17288. },
  17289. "message": {
  17290. "type": "string"
  17291. },
  17292. "action": {
  17293. "type": "object",
  17294. "properties": {
  17295. "reason": {
  17296. "type": "string"
  17297. },
  17298. "provider": {
  17299. "type": "string"
  17300. },
  17301. "title": {
  17302. "type": "string"
  17303. },
  17304. "message": {
  17305. "type": "string"
  17306. },
  17307. "label": {
  17308. "type": "string"
  17309. },
  17310. "link": {
  17311. "type": "string"
  17312. }
  17313. },
  17314. "required": ["reason", "provider", "title", "message", "label"],
  17315. "additionalProperties": false
  17316. },
  17317. "next": {
  17318. "type": "integer",
  17319. "minimum": 0
  17320. }
  17321. },
  17322. "required": ["type", "attempt", "message", "next"],
  17323. "additionalProperties": false
  17324. },
  17325. {
  17326. "type": "object",
  17327. "properties": {
  17328. "type": {
  17329. "type": "string",
  17330. "enum": ["busy"]
  17331. }
  17332. },
  17333. "required": ["type"],
  17334. "additionalProperties": false
  17335. }
  17336. ]
  17337. },
  17338. "QuestionOption": {
  17339. "type": "object",
  17340. "properties": {
  17341. "label": {
  17342. "type": "string",
  17343. "description": "Display text (1-5 words, concise)"
  17344. },
  17345. "description": {
  17346. "type": "string",
  17347. "description": "Explanation of choice"
  17348. }
  17349. },
  17350. "required": ["label", "description"],
  17351. "additionalProperties": false
  17352. },
  17353. "QuestionInfo": {
  17354. "type": "object",
  17355. "properties": {
  17356. "question": {
  17357. "type": "string",
  17358. "description": "Complete question"
  17359. },
  17360. "header": {
  17361. "type": "string",
  17362. "description": "Very short label (max 30 chars)"
  17363. },
  17364. "options": {
  17365. "type": "array",
  17366. "items": {
  17367. "$ref": "#/components/schemas/QuestionOption"
  17368. },
  17369. "description": "Available choices"
  17370. },
  17371. "multiple": {
  17372. "type": "boolean"
  17373. },
  17374. "custom": {
  17375. "type": "boolean"
  17376. }
  17377. },
  17378. "required": ["question", "header", "options"],
  17379. "additionalProperties": false
  17380. },
  17381. "QuestionTool": {
  17382. "type": "object",
  17383. "properties": {
  17384. "messageID": {
  17385. "type": "string",
  17386. "pattern": "^msg"
  17387. },
  17388. "callID": {
  17389. "type": "string"
  17390. }
  17391. },
  17392. "required": ["messageID", "callID"],
  17393. "additionalProperties": false
  17394. },
  17395. "QuestionAnswer": {
  17396. "type": "array",
  17397. "items": {
  17398. "type": "string"
  17399. }
  17400. },
  17401. "GlobalEvent": {
  17402. "type": "object",
  17403. "properties": {
  17404. "directory": {
  17405. "type": "string"
  17406. },
  17407. "project": {
  17408. "type": "string"
  17409. },
  17410. "workspace": {
  17411. "type": "string"
  17412. },
  17413. "payload": {
  17414. "anyOf": [
  17415. {
  17416. "type": "object",
  17417. "properties": {
  17418. "id": {
  17419. "type": "string",
  17420. "pattern": "^evt_"
  17421. },
  17422. "type": {
  17423. "type": "string",
  17424. "enum": ["models-dev.refreshed"]
  17425. },
  17426. "properties": {
  17427. "type": "object",
  17428. "properties": {}
  17429. }
  17430. },
  17431. "required": ["id", "type", "properties"],
  17432. "additionalProperties": false
  17433. },
  17434. {
  17435. "type": "object",
  17436. "properties": {
  17437. "id": {
  17438. "type": "string",
  17439. "pattern": "^evt_"
  17440. },
  17441. "type": {
  17442. "type": "string",
  17443. "enum": ["integration.updated"]
  17444. },
  17445. "properties": {
  17446. "type": "object",
  17447. "properties": {}
  17448. }
  17449. },
  17450. "required": ["id", "type", "properties"],
  17451. "additionalProperties": false
  17452. },
  17453. {
  17454. "type": "object",
  17455. "properties": {
  17456. "id": {
  17457. "type": "string",
  17458. "pattern": "^evt_"
  17459. },
  17460. "type": {
  17461. "type": "string",
  17462. "enum": ["integration.connection.updated"]
  17463. },
  17464. "properties": {
  17465. "type": "object",
  17466. "properties": {
  17467. "integrationID": {
  17468. "type": "string"
  17469. }
  17470. },
  17471. "required": ["integrationID"],
  17472. "additionalProperties": false
  17473. }
  17474. },
  17475. "required": ["id", "type", "properties"],
  17476. "additionalProperties": false
  17477. },
  17478. {
  17479. "type": "object",
  17480. "properties": {
  17481. "id": {
  17482. "type": "string",
  17483. "pattern": "^evt_"
  17484. },
  17485. "type": {
  17486. "type": "string",
  17487. "enum": ["catalog.updated"]
  17488. },
  17489. "properties": {
  17490. "type": "object",
  17491. "properties": {}
  17492. }
  17493. },
  17494. "required": ["id", "type", "properties"],
  17495. "additionalProperties": false
  17496. },
  17497. {
  17498. "type": "object",
  17499. "properties": {
  17500. "id": {
  17501. "type": "string",
  17502. "pattern": "^evt_"
  17503. },
  17504. "type": {
  17505. "type": "string",
  17506. "enum": ["session.created"]
  17507. },
  17508. "properties": {
  17509. "type": "object",
  17510. "properties": {
  17511. "sessionID": {
  17512. "type": "string",
  17513. "pattern": "^ses"
  17514. },
  17515. "info": {
  17516. "$ref": "#/components/schemas/Session"
  17517. }
  17518. },
  17519. "required": ["sessionID", "info"],
  17520. "additionalProperties": false
  17521. }
  17522. },
  17523. "required": ["id", "type", "properties"],
  17524. "additionalProperties": false
  17525. },
  17526. {
  17527. "type": "object",
  17528. "properties": {
  17529. "id": {
  17530. "type": "string",
  17531. "pattern": "^evt_"
  17532. },
  17533. "type": {
  17534. "type": "string",
  17535. "enum": ["session.updated"]
  17536. },
  17537. "properties": {
  17538. "type": "object",
  17539. "properties": {
  17540. "sessionID": {
  17541. "type": "string",
  17542. "pattern": "^ses"
  17543. },
  17544. "info": {
  17545. "$ref": "#/components/schemas/Session"
  17546. }
  17547. },
  17548. "required": ["sessionID", "info"],
  17549. "additionalProperties": false
  17550. }
  17551. },
  17552. "required": ["id", "type", "properties"],
  17553. "additionalProperties": false
  17554. },
  17555. {
  17556. "type": "object",
  17557. "properties": {
  17558. "id": {
  17559. "type": "string",
  17560. "pattern": "^evt_"
  17561. },
  17562. "type": {
  17563. "type": "string",
  17564. "enum": ["session.deleted"]
  17565. },
  17566. "properties": {
  17567. "type": "object",
  17568. "properties": {
  17569. "sessionID": {
  17570. "type": "string",
  17571. "pattern": "^ses"
  17572. },
  17573. "info": {
  17574. "$ref": "#/components/schemas/Session"
  17575. }
  17576. },
  17577. "required": ["sessionID", "info"],
  17578. "additionalProperties": false
  17579. }
  17580. },
  17581. "required": ["id", "type", "properties"],
  17582. "additionalProperties": false
  17583. },
  17584. {
  17585. "type": "object",
  17586. "properties": {
  17587. "id": {
  17588. "type": "string",
  17589. "pattern": "^evt_"
  17590. },
  17591. "type": {
  17592. "type": "string",
  17593. "enum": ["message.updated"]
  17594. },
  17595. "properties": {
  17596. "type": "object",
  17597. "properties": {
  17598. "sessionID": {
  17599. "type": "string",
  17600. "pattern": "^ses"
  17601. },
  17602. "info": {
  17603. "$ref": "#/components/schemas/Message"
  17604. }
  17605. },
  17606. "required": ["sessionID", "info"],
  17607. "additionalProperties": false
  17608. }
  17609. },
  17610. "required": ["id", "type", "properties"],
  17611. "additionalProperties": false
  17612. },
  17613. {
  17614. "type": "object",
  17615. "properties": {
  17616. "id": {
  17617. "type": "string",
  17618. "pattern": "^evt_"
  17619. },
  17620. "type": {
  17621. "type": "string",
  17622. "enum": ["message.removed"]
  17623. },
  17624. "properties": {
  17625. "type": "object",
  17626. "properties": {
  17627. "sessionID": {
  17628. "type": "string",
  17629. "pattern": "^ses"
  17630. },
  17631. "messageID": {
  17632. "type": "string",
  17633. "pattern": "^msg"
  17634. }
  17635. },
  17636. "required": ["sessionID", "messageID"],
  17637. "additionalProperties": false
  17638. }
  17639. },
  17640. "required": ["id", "type", "properties"],
  17641. "additionalProperties": false
  17642. },
  17643. {
  17644. "type": "object",
  17645. "properties": {
  17646. "id": {
  17647. "type": "string",
  17648. "pattern": "^evt_"
  17649. },
  17650. "type": {
  17651. "type": "string",
  17652. "enum": ["message.part.updated"]
  17653. },
  17654. "properties": {
  17655. "type": "object",
  17656. "properties": {
  17657. "sessionID": {
  17658. "type": "string",
  17659. "pattern": "^ses"
  17660. },
  17661. "part": {
  17662. "$ref": "#/components/schemas/Part"
  17663. },
  17664. "time": {
  17665. "type": "number"
  17666. }
  17667. },
  17668. "required": ["sessionID", "part", "time"],
  17669. "additionalProperties": false
  17670. }
  17671. },
  17672. "required": ["id", "type", "properties"],
  17673. "additionalProperties": false
  17674. },
  17675. {
  17676. "type": "object",
  17677. "properties": {
  17678. "id": {
  17679. "type": "string",
  17680. "pattern": "^evt_"
  17681. },
  17682. "type": {
  17683. "type": "string",
  17684. "enum": ["message.part.removed"]
  17685. },
  17686. "properties": {
  17687. "type": "object",
  17688. "properties": {
  17689. "sessionID": {
  17690. "type": "string",
  17691. "pattern": "^ses"
  17692. },
  17693. "messageID": {
  17694. "type": "string",
  17695. "pattern": "^msg"
  17696. },
  17697. "partID": {
  17698. "type": "string",
  17699. "pattern": "^prt"
  17700. }
  17701. },
  17702. "required": ["sessionID", "messageID", "partID"],
  17703. "additionalProperties": false
  17704. }
  17705. },
  17706. "required": ["id", "type", "properties"],
  17707. "additionalProperties": false
  17708. },
  17709. {
  17710. "type": "object",
  17711. "properties": {
  17712. "id": {
  17713. "type": "string",
  17714. "pattern": "^evt_"
  17715. },
  17716. "type": {
  17717. "type": "string",
  17718. "enum": ["session.next.agent.switched"]
  17719. },
  17720. "properties": {
  17721. "type": "object",
  17722. "properties": {
  17723. "timestamp": {
  17724. "type": "number"
  17725. },
  17726. "sessionID": {
  17727. "type": "string",
  17728. "pattern": "^ses"
  17729. },
  17730. "messageID": {
  17731. "type": "string",
  17732. "pattern": "^msg_"
  17733. },
  17734. "agent": {
  17735. "type": "string"
  17736. }
  17737. },
  17738. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17739. "additionalProperties": false
  17740. }
  17741. },
  17742. "required": ["id", "type", "properties"],
  17743. "additionalProperties": false
  17744. },
  17745. {
  17746. "type": "object",
  17747. "properties": {
  17748. "id": {
  17749. "type": "string",
  17750. "pattern": "^evt_"
  17751. },
  17752. "type": {
  17753. "type": "string",
  17754. "enum": ["session.next.model.switched"]
  17755. },
  17756. "properties": {
  17757. "type": "object",
  17758. "properties": {
  17759. "timestamp": {
  17760. "type": "number"
  17761. },
  17762. "sessionID": {
  17763. "type": "string",
  17764. "pattern": "^ses"
  17765. },
  17766. "messageID": {
  17767. "type": "string",
  17768. "pattern": "^msg_"
  17769. },
  17770. "model": {
  17771. "$ref": "#/components/schemas/ModelRef"
  17772. }
  17773. },
  17774. "required": ["timestamp", "sessionID", "messageID", "model"],
  17775. "additionalProperties": false
  17776. }
  17777. },
  17778. "required": ["id", "type", "properties"],
  17779. "additionalProperties": false
  17780. },
  17781. {
  17782. "type": "object",
  17783. "properties": {
  17784. "id": {
  17785. "type": "string",
  17786. "pattern": "^evt_"
  17787. },
  17788. "type": {
  17789. "type": "string",
  17790. "enum": ["session.next.moved"]
  17791. },
  17792. "properties": {
  17793. "type": "object",
  17794. "properties": {
  17795. "timestamp": {
  17796. "type": "number"
  17797. },
  17798. "sessionID": {
  17799. "type": "string",
  17800. "pattern": "^ses"
  17801. },
  17802. "location": {
  17803. "$ref": "#/components/schemas/LocationRef"
  17804. },
  17805. "subdirectory": {
  17806. "type": "string"
  17807. }
  17808. },
  17809. "required": ["timestamp", "sessionID", "location"],
  17810. "additionalProperties": false
  17811. }
  17812. },
  17813. "required": ["id", "type", "properties"],
  17814. "additionalProperties": false
  17815. },
  17816. {
  17817. "type": "object",
  17818. "properties": {
  17819. "id": {
  17820. "type": "string",
  17821. "pattern": "^evt_"
  17822. },
  17823. "type": {
  17824. "type": "string",
  17825. "enum": ["session.next.prompted"]
  17826. },
  17827. "properties": {
  17828. "type": "object",
  17829. "properties": {
  17830. "timestamp": {
  17831. "type": "number"
  17832. },
  17833. "sessionID": {
  17834. "type": "string",
  17835. "pattern": "^ses"
  17836. },
  17837. "messageID": {
  17838. "type": "string",
  17839. "pattern": "^msg_"
  17840. },
  17841. "prompt": {
  17842. "$ref": "#/components/schemas/Prompt"
  17843. },
  17844. "delivery": {
  17845. "type": "string",
  17846. "enum": ["steer", "queue"]
  17847. }
  17848. },
  17849. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17850. "additionalProperties": false
  17851. }
  17852. },
  17853. "required": ["id", "type", "properties"],
  17854. "additionalProperties": false
  17855. },
  17856. {
  17857. "type": "object",
  17858. "properties": {
  17859. "id": {
  17860. "type": "string",
  17861. "pattern": "^evt_"
  17862. },
  17863. "type": {
  17864. "type": "string",
  17865. "enum": ["session.next.prompt.admitted"]
  17866. },
  17867. "properties": {
  17868. "type": "object",
  17869. "properties": {
  17870. "timestamp": {
  17871. "type": "number"
  17872. },
  17873. "sessionID": {
  17874. "type": "string",
  17875. "pattern": "^ses"
  17876. },
  17877. "messageID": {
  17878. "type": "string",
  17879. "pattern": "^msg_"
  17880. },
  17881. "prompt": {
  17882. "$ref": "#/components/schemas/Prompt"
  17883. },
  17884. "delivery": {
  17885. "type": "string",
  17886. "enum": ["steer", "queue"]
  17887. }
  17888. },
  17889. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17890. "additionalProperties": false
  17891. }
  17892. },
  17893. "required": ["id", "type", "properties"],
  17894. "additionalProperties": false
  17895. },
  17896. {
  17897. "type": "object",
  17898. "properties": {
  17899. "id": {
  17900. "type": "string",
  17901. "pattern": "^evt_"
  17902. },
  17903. "type": {
  17904. "type": "string",
  17905. "enum": ["session.next.context.updated"]
  17906. },
  17907. "properties": {
  17908. "type": "object",
  17909. "properties": {
  17910. "timestamp": {
  17911. "type": "number"
  17912. },
  17913. "sessionID": {
  17914. "type": "string",
  17915. "pattern": "^ses"
  17916. },
  17917. "messageID": {
  17918. "type": "string",
  17919. "pattern": "^msg_"
  17920. },
  17921. "text": {
  17922. "type": "string"
  17923. }
  17924. },
  17925. "required": ["timestamp", "sessionID", "messageID", "text"],
  17926. "additionalProperties": false
  17927. }
  17928. },
  17929. "required": ["id", "type", "properties"],
  17930. "additionalProperties": false
  17931. },
  17932. {
  17933. "type": "object",
  17934. "properties": {
  17935. "id": {
  17936. "type": "string",
  17937. "pattern": "^evt_"
  17938. },
  17939. "type": {
  17940. "type": "string",
  17941. "enum": ["session.next.synthetic"]
  17942. },
  17943. "properties": {
  17944. "type": "object",
  17945. "properties": {
  17946. "timestamp": {
  17947. "type": "number"
  17948. },
  17949. "sessionID": {
  17950. "type": "string",
  17951. "pattern": "^ses"
  17952. },
  17953. "messageID": {
  17954. "type": "string",
  17955. "pattern": "^msg_"
  17956. },
  17957. "text": {
  17958. "type": "string"
  17959. }
  17960. },
  17961. "required": ["timestamp", "sessionID", "messageID", "text"],
  17962. "additionalProperties": false
  17963. }
  17964. },
  17965. "required": ["id", "type", "properties"],
  17966. "additionalProperties": false
  17967. },
  17968. {
  17969. "type": "object",
  17970. "properties": {
  17971. "id": {
  17972. "type": "string",
  17973. "pattern": "^evt_"
  17974. },
  17975. "type": {
  17976. "type": "string",
  17977. "enum": ["session.next.shell.started"]
  17978. },
  17979. "properties": {
  17980. "type": "object",
  17981. "properties": {
  17982. "timestamp": {
  17983. "type": "number"
  17984. },
  17985. "sessionID": {
  17986. "type": "string",
  17987. "pattern": "^ses"
  17988. },
  17989. "messageID": {
  17990. "type": "string",
  17991. "pattern": "^msg_"
  17992. },
  17993. "callID": {
  17994. "type": "string"
  17995. },
  17996. "command": {
  17997. "type": "string"
  17998. }
  17999. },
  18000. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  18001. "additionalProperties": false
  18002. }
  18003. },
  18004. "required": ["id", "type", "properties"],
  18005. "additionalProperties": false
  18006. },
  18007. {
  18008. "type": "object",
  18009. "properties": {
  18010. "id": {
  18011. "type": "string",
  18012. "pattern": "^evt_"
  18013. },
  18014. "type": {
  18015. "type": "string",
  18016. "enum": ["session.next.shell.ended"]
  18017. },
  18018. "properties": {
  18019. "type": "object",
  18020. "properties": {
  18021. "timestamp": {
  18022. "type": "number"
  18023. },
  18024. "sessionID": {
  18025. "type": "string",
  18026. "pattern": "^ses"
  18027. },
  18028. "callID": {
  18029. "type": "string"
  18030. },
  18031. "output": {
  18032. "type": "string"
  18033. }
  18034. },
  18035. "required": ["timestamp", "sessionID", "callID", "output"],
  18036. "additionalProperties": false
  18037. }
  18038. },
  18039. "required": ["id", "type", "properties"],
  18040. "additionalProperties": false
  18041. },
  18042. {
  18043. "type": "object",
  18044. "properties": {
  18045. "id": {
  18046. "type": "string",
  18047. "pattern": "^evt_"
  18048. },
  18049. "type": {
  18050. "type": "string",
  18051. "enum": ["session.next.step.started"]
  18052. },
  18053. "properties": {
  18054. "type": "object",
  18055. "properties": {
  18056. "timestamp": {
  18057. "type": "number"
  18058. },
  18059. "sessionID": {
  18060. "type": "string",
  18061. "pattern": "^ses"
  18062. },
  18063. "assistantMessageID": {
  18064. "type": "string",
  18065. "pattern": "^msg_"
  18066. },
  18067. "agent": {
  18068. "type": "string"
  18069. },
  18070. "model": {
  18071. "$ref": "#/components/schemas/ModelRef"
  18072. },
  18073. "snapshot": {
  18074. "type": "string"
  18075. }
  18076. },
  18077. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  18078. "additionalProperties": false
  18079. }
  18080. },
  18081. "required": ["id", "type", "properties"],
  18082. "additionalProperties": false
  18083. },
  18084. {
  18085. "type": "object",
  18086. "properties": {
  18087. "id": {
  18088. "type": "string",
  18089. "pattern": "^evt_"
  18090. },
  18091. "type": {
  18092. "type": "string",
  18093. "enum": ["session.next.step.ended"]
  18094. },
  18095. "properties": {
  18096. "type": "object",
  18097. "properties": {
  18098. "timestamp": {
  18099. "type": "number"
  18100. },
  18101. "sessionID": {
  18102. "type": "string",
  18103. "pattern": "^ses"
  18104. },
  18105. "assistantMessageID": {
  18106. "type": "string",
  18107. "pattern": "^msg_"
  18108. },
  18109. "finish": {
  18110. "type": "string"
  18111. },
  18112. "cost": {
  18113. "type": "number"
  18114. },
  18115. "tokens": {
  18116. "type": "object",
  18117. "properties": {
  18118. "input": {
  18119. "type": "number"
  18120. },
  18121. "output": {
  18122. "type": "number"
  18123. },
  18124. "reasoning": {
  18125. "type": "number"
  18126. },
  18127. "cache": {
  18128. "type": "object",
  18129. "properties": {
  18130. "read": {
  18131. "type": "number"
  18132. },
  18133. "write": {
  18134. "type": "number"
  18135. }
  18136. },
  18137. "required": ["read", "write"],
  18138. "additionalProperties": false
  18139. }
  18140. },
  18141. "required": ["input", "output", "reasoning", "cache"],
  18142. "additionalProperties": false
  18143. },
  18144. "snapshot": {
  18145. "type": "string"
  18146. },
  18147. "files": {
  18148. "type": "array",
  18149. "items": {
  18150. "type": "string"
  18151. }
  18152. }
  18153. },
  18154. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  18155. "additionalProperties": false
  18156. }
  18157. },
  18158. "required": ["id", "type", "properties"],
  18159. "additionalProperties": false
  18160. },
  18161. {
  18162. "type": "object",
  18163. "properties": {
  18164. "id": {
  18165. "type": "string",
  18166. "pattern": "^evt_"
  18167. },
  18168. "type": {
  18169. "type": "string",
  18170. "enum": ["session.next.step.failed"]
  18171. },
  18172. "properties": {
  18173. "type": "object",
  18174. "properties": {
  18175. "timestamp": {
  18176. "type": "number"
  18177. },
  18178. "sessionID": {
  18179. "type": "string",
  18180. "pattern": "^ses"
  18181. },
  18182. "assistantMessageID": {
  18183. "type": "string",
  18184. "pattern": "^msg_"
  18185. },
  18186. "error": {
  18187. "$ref": "#/components/schemas/SessionErrorUnknown"
  18188. }
  18189. },
  18190. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  18191. "additionalProperties": false
  18192. }
  18193. },
  18194. "required": ["id", "type", "properties"],
  18195. "additionalProperties": false
  18196. },
  18197. {
  18198. "type": "object",
  18199. "properties": {
  18200. "id": {
  18201. "type": "string",
  18202. "pattern": "^evt_"
  18203. },
  18204. "type": {
  18205. "type": "string",
  18206. "enum": ["session.next.text.started"]
  18207. },
  18208. "properties": {
  18209. "type": "object",
  18210. "properties": {
  18211. "timestamp": {
  18212. "type": "number"
  18213. },
  18214. "sessionID": {
  18215. "type": "string",
  18216. "pattern": "^ses"
  18217. },
  18218. "assistantMessageID": {
  18219. "type": "string",
  18220. "pattern": "^msg_"
  18221. },
  18222. "textID": {
  18223. "type": "string"
  18224. }
  18225. },
  18226. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  18227. "additionalProperties": false
  18228. }
  18229. },
  18230. "required": ["id", "type", "properties"],
  18231. "additionalProperties": false
  18232. },
  18233. {
  18234. "type": "object",
  18235. "properties": {
  18236. "id": {
  18237. "type": "string",
  18238. "pattern": "^evt_"
  18239. },
  18240. "type": {
  18241. "type": "string",
  18242. "enum": ["session.next.text.delta"]
  18243. },
  18244. "properties": {
  18245. "type": "object",
  18246. "properties": {
  18247. "timestamp": {
  18248. "type": "number"
  18249. },
  18250. "sessionID": {
  18251. "type": "string",
  18252. "pattern": "^ses"
  18253. },
  18254. "assistantMessageID": {
  18255. "type": "string",
  18256. "pattern": "^msg_"
  18257. },
  18258. "textID": {
  18259. "type": "string"
  18260. },
  18261. "delta": {
  18262. "type": "string"
  18263. }
  18264. },
  18265. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  18266. "additionalProperties": false
  18267. }
  18268. },
  18269. "required": ["id", "type", "properties"],
  18270. "additionalProperties": false
  18271. },
  18272. {
  18273. "type": "object",
  18274. "properties": {
  18275. "id": {
  18276. "type": "string",
  18277. "pattern": "^evt_"
  18278. },
  18279. "type": {
  18280. "type": "string",
  18281. "enum": ["session.next.text.ended"]
  18282. },
  18283. "properties": {
  18284. "type": "object",
  18285. "properties": {
  18286. "timestamp": {
  18287. "type": "number"
  18288. },
  18289. "sessionID": {
  18290. "type": "string",
  18291. "pattern": "^ses"
  18292. },
  18293. "assistantMessageID": {
  18294. "type": "string",
  18295. "pattern": "^msg_"
  18296. },
  18297. "textID": {
  18298. "type": "string"
  18299. },
  18300. "text": {
  18301. "type": "string"
  18302. }
  18303. },
  18304. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  18305. "additionalProperties": false
  18306. }
  18307. },
  18308. "required": ["id", "type", "properties"],
  18309. "additionalProperties": false
  18310. },
  18311. {
  18312. "type": "object",
  18313. "properties": {
  18314. "id": {
  18315. "type": "string",
  18316. "pattern": "^evt_"
  18317. },
  18318. "type": {
  18319. "type": "string",
  18320. "enum": ["session.next.reasoning.started"]
  18321. },
  18322. "properties": {
  18323. "type": "object",
  18324. "properties": {
  18325. "timestamp": {
  18326. "type": "number"
  18327. },
  18328. "sessionID": {
  18329. "type": "string",
  18330. "pattern": "^ses"
  18331. },
  18332. "assistantMessageID": {
  18333. "type": "string",
  18334. "pattern": "^msg_"
  18335. },
  18336. "reasoningID": {
  18337. "type": "string"
  18338. },
  18339. "providerMetadata": {
  18340. "$ref": "#/components/schemas/LLMProviderMetadata"
  18341. }
  18342. },
  18343. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  18344. "additionalProperties": false
  18345. }
  18346. },
  18347. "required": ["id", "type", "properties"],
  18348. "additionalProperties": false
  18349. },
  18350. {
  18351. "type": "object",
  18352. "properties": {
  18353. "id": {
  18354. "type": "string",
  18355. "pattern": "^evt_"
  18356. },
  18357. "type": {
  18358. "type": "string",
  18359. "enum": ["session.next.reasoning.delta"]
  18360. },
  18361. "properties": {
  18362. "type": "object",
  18363. "properties": {
  18364. "timestamp": {
  18365. "type": "number"
  18366. },
  18367. "sessionID": {
  18368. "type": "string",
  18369. "pattern": "^ses"
  18370. },
  18371. "assistantMessageID": {
  18372. "type": "string",
  18373. "pattern": "^msg_"
  18374. },
  18375. "reasoningID": {
  18376. "type": "string"
  18377. },
  18378. "delta": {
  18379. "type": "string"
  18380. }
  18381. },
  18382. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  18383. "additionalProperties": false
  18384. }
  18385. },
  18386. "required": ["id", "type", "properties"],
  18387. "additionalProperties": false
  18388. },
  18389. {
  18390. "type": "object",
  18391. "properties": {
  18392. "id": {
  18393. "type": "string",
  18394. "pattern": "^evt_"
  18395. },
  18396. "type": {
  18397. "type": "string",
  18398. "enum": ["session.next.reasoning.ended"]
  18399. },
  18400. "properties": {
  18401. "type": "object",
  18402. "properties": {
  18403. "timestamp": {
  18404. "type": "number"
  18405. },
  18406. "sessionID": {
  18407. "type": "string",
  18408. "pattern": "^ses"
  18409. },
  18410. "assistantMessageID": {
  18411. "type": "string",
  18412. "pattern": "^msg_"
  18413. },
  18414. "reasoningID": {
  18415. "type": "string"
  18416. },
  18417. "text": {
  18418. "type": "string"
  18419. },
  18420. "providerMetadata": {
  18421. "$ref": "#/components/schemas/LLMProviderMetadata"
  18422. }
  18423. },
  18424. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  18425. "additionalProperties": false
  18426. }
  18427. },
  18428. "required": ["id", "type", "properties"],
  18429. "additionalProperties": false
  18430. },
  18431. {
  18432. "type": "object",
  18433. "properties": {
  18434. "id": {
  18435. "type": "string",
  18436. "pattern": "^evt_"
  18437. },
  18438. "type": {
  18439. "type": "string",
  18440. "enum": ["session.next.tool.input.started"]
  18441. },
  18442. "properties": {
  18443. "type": "object",
  18444. "properties": {
  18445. "timestamp": {
  18446. "type": "number"
  18447. },
  18448. "sessionID": {
  18449. "type": "string",
  18450. "pattern": "^ses"
  18451. },
  18452. "assistantMessageID": {
  18453. "type": "string",
  18454. "pattern": "^msg_"
  18455. },
  18456. "callID": {
  18457. "type": "string"
  18458. },
  18459. "name": {
  18460. "type": "string"
  18461. }
  18462. },
  18463. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  18464. "additionalProperties": false
  18465. }
  18466. },
  18467. "required": ["id", "type", "properties"],
  18468. "additionalProperties": false
  18469. },
  18470. {
  18471. "type": "object",
  18472. "properties": {
  18473. "id": {
  18474. "type": "string",
  18475. "pattern": "^evt_"
  18476. },
  18477. "type": {
  18478. "type": "string",
  18479. "enum": ["session.next.tool.input.delta"]
  18480. },
  18481. "properties": {
  18482. "type": "object",
  18483. "properties": {
  18484. "timestamp": {
  18485. "type": "number"
  18486. },
  18487. "sessionID": {
  18488. "type": "string",
  18489. "pattern": "^ses"
  18490. },
  18491. "assistantMessageID": {
  18492. "type": "string",
  18493. "pattern": "^msg_"
  18494. },
  18495. "callID": {
  18496. "type": "string"
  18497. },
  18498. "delta": {
  18499. "type": "string"
  18500. }
  18501. },
  18502. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  18503. "additionalProperties": false
  18504. }
  18505. },
  18506. "required": ["id", "type", "properties"],
  18507. "additionalProperties": false
  18508. },
  18509. {
  18510. "type": "object",
  18511. "properties": {
  18512. "id": {
  18513. "type": "string",
  18514. "pattern": "^evt_"
  18515. },
  18516. "type": {
  18517. "type": "string",
  18518. "enum": ["session.next.tool.input.ended"]
  18519. },
  18520. "properties": {
  18521. "type": "object",
  18522. "properties": {
  18523. "timestamp": {
  18524. "type": "number"
  18525. },
  18526. "sessionID": {
  18527. "type": "string",
  18528. "pattern": "^ses"
  18529. },
  18530. "assistantMessageID": {
  18531. "type": "string",
  18532. "pattern": "^msg_"
  18533. },
  18534. "callID": {
  18535. "type": "string"
  18536. },
  18537. "text": {
  18538. "type": "string"
  18539. }
  18540. },
  18541. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  18542. "additionalProperties": false
  18543. }
  18544. },
  18545. "required": ["id", "type", "properties"],
  18546. "additionalProperties": false
  18547. },
  18548. {
  18549. "type": "object",
  18550. "properties": {
  18551. "id": {
  18552. "type": "string",
  18553. "pattern": "^evt_"
  18554. },
  18555. "type": {
  18556. "type": "string",
  18557. "enum": ["session.next.tool.called"]
  18558. },
  18559. "properties": {
  18560. "type": "object",
  18561. "properties": {
  18562. "timestamp": {
  18563. "type": "number"
  18564. },
  18565. "sessionID": {
  18566. "type": "string",
  18567. "pattern": "^ses"
  18568. },
  18569. "assistantMessageID": {
  18570. "type": "string",
  18571. "pattern": "^msg_"
  18572. },
  18573. "callID": {
  18574. "type": "string"
  18575. },
  18576. "tool": {
  18577. "type": "string"
  18578. },
  18579. "input": {
  18580. "type": "object"
  18581. },
  18582. "provider": {
  18583. "type": "object",
  18584. "properties": {
  18585. "executed": {
  18586. "type": "boolean"
  18587. },
  18588. "metadata": {
  18589. "$ref": "#/components/schemas/LLMProviderMetadata"
  18590. }
  18591. },
  18592. "required": ["executed"],
  18593. "additionalProperties": false
  18594. }
  18595. },
  18596. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18597. "additionalProperties": false
  18598. }
  18599. },
  18600. "required": ["id", "type", "properties"],
  18601. "additionalProperties": false
  18602. },
  18603. {
  18604. "type": "object",
  18605. "properties": {
  18606. "id": {
  18607. "type": "string",
  18608. "pattern": "^evt_"
  18609. },
  18610. "type": {
  18611. "type": "string",
  18612. "enum": ["session.next.tool.progress"]
  18613. },
  18614. "properties": {
  18615. "type": "object",
  18616. "properties": {
  18617. "timestamp": {
  18618. "type": "number"
  18619. },
  18620. "sessionID": {
  18621. "type": "string",
  18622. "pattern": "^ses"
  18623. },
  18624. "assistantMessageID": {
  18625. "type": "string",
  18626. "pattern": "^msg_"
  18627. },
  18628. "callID": {
  18629. "type": "string"
  18630. },
  18631. "structured": {
  18632. "type": "object"
  18633. },
  18634. "content": {
  18635. "type": "array",
  18636. "items": {
  18637. "$ref": "#/components/schemas/LLMToolContent"
  18638. }
  18639. }
  18640. },
  18641. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18642. "additionalProperties": false
  18643. }
  18644. },
  18645. "required": ["id", "type", "properties"],
  18646. "additionalProperties": false
  18647. },
  18648. {
  18649. "type": "object",
  18650. "properties": {
  18651. "id": {
  18652. "type": "string",
  18653. "pattern": "^evt_"
  18654. },
  18655. "type": {
  18656. "type": "string",
  18657. "enum": ["session.next.tool.success"]
  18658. },
  18659. "properties": {
  18660. "type": "object",
  18661. "properties": {
  18662. "timestamp": {
  18663. "type": "number"
  18664. },
  18665. "sessionID": {
  18666. "type": "string",
  18667. "pattern": "^ses"
  18668. },
  18669. "assistantMessageID": {
  18670. "type": "string",
  18671. "pattern": "^msg_"
  18672. },
  18673. "callID": {
  18674. "type": "string"
  18675. },
  18676. "structured": {
  18677. "type": "object"
  18678. },
  18679. "content": {
  18680. "type": "array",
  18681. "items": {
  18682. "$ref": "#/components/schemas/LLMToolContent"
  18683. }
  18684. },
  18685. "outputPaths": {
  18686. "type": "array",
  18687. "items": {
  18688. "type": "string"
  18689. }
  18690. },
  18691. "result": {},
  18692. "provider": {
  18693. "type": "object",
  18694. "properties": {
  18695. "executed": {
  18696. "type": "boolean"
  18697. },
  18698. "metadata": {
  18699. "$ref": "#/components/schemas/LLMProviderMetadata"
  18700. }
  18701. },
  18702. "required": ["executed"],
  18703. "additionalProperties": false
  18704. }
  18705. },
  18706. "required": [
  18707. "timestamp",
  18708. "sessionID",
  18709. "assistantMessageID",
  18710. "callID",
  18711. "structured",
  18712. "content",
  18713. "provider"
  18714. ],
  18715. "additionalProperties": false
  18716. }
  18717. },
  18718. "required": ["id", "type", "properties"],
  18719. "additionalProperties": false
  18720. },
  18721. {
  18722. "type": "object",
  18723. "properties": {
  18724. "id": {
  18725. "type": "string",
  18726. "pattern": "^evt_"
  18727. },
  18728. "type": {
  18729. "type": "string",
  18730. "enum": ["session.next.tool.failed"]
  18731. },
  18732. "properties": {
  18733. "type": "object",
  18734. "properties": {
  18735. "timestamp": {
  18736. "type": "number"
  18737. },
  18738. "sessionID": {
  18739. "type": "string",
  18740. "pattern": "^ses"
  18741. },
  18742. "assistantMessageID": {
  18743. "type": "string",
  18744. "pattern": "^msg_"
  18745. },
  18746. "callID": {
  18747. "type": "string"
  18748. },
  18749. "error": {
  18750. "$ref": "#/components/schemas/SessionErrorUnknown"
  18751. },
  18752. "result": {},
  18753. "provider": {
  18754. "type": "object",
  18755. "properties": {
  18756. "executed": {
  18757. "type": "boolean"
  18758. },
  18759. "metadata": {
  18760. "$ref": "#/components/schemas/LLMProviderMetadata"
  18761. }
  18762. },
  18763. "required": ["executed"],
  18764. "additionalProperties": false
  18765. }
  18766. },
  18767. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18768. "additionalProperties": false
  18769. }
  18770. },
  18771. "required": ["id", "type", "properties"],
  18772. "additionalProperties": false
  18773. },
  18774. {
  18775. "type": "object",
  18776. "properties": {
  18777. "id": {
  18778. "type": "string",
  18779. "pattern": "^evt_"
  18780. },
  18781. "type": {
  18782. "type": "string",
  18783. "enum": ["session.next.retried"]
  18784. },
  18785. "properties": {
  18786. "type": "object",
  18787. "properties": {
  18788. "timestamp": {
  18789. "type": "number"
  18790. },
  18791. "sessionID": {
  18792. "type": "string",
  18793. "pattern": "^ses"
  18794. },
  18795. "attempt": {
  18796. "type": "number"
  18797. },
  18798. "error": {
  18799. "$ref": "#/components/schemas/SessionNextRetry_error"
  18800. }
  18801. },
  18802. "required": ["timestamp", "sessionID", "attempt", "error"],
  18803. "additionalProperties": false
  18804. }
  18805. },
  18806. "required": ["id", "type", "properties"],
  18807. "additionalProperties": false
  18808. },
  18809. {
  18810. "type": "object",
  18811. "properties": {
  18812. "id": {
  18813. "type": "string",
  18814. "pattern": "^evt_"
  18815. },
  18816. "type": {
  18817. "type": "string",
  18818. "enum": ["session.next.compaction.started"]
  18819. },
  18820. "properties": {
  18821. "type": "object",
  18822. "properties": {
  18823. "timestamp": {
  18824. "type": "number"
  18825. },
  18826. "sessionID": {
  18827. "type": "string",
  18828. "pattern": "^ses"
  18829. },
  18830. "messageID": {
  18831. "type": "string",
  18832. "pattern": "^msg_"
  18833. },
  18834. "reason": {
  18835. "type": "string",
  18836. "enum": ["auto", "manual"]
  18837. }
  18838. },
  18839. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18840. "additionalProperties": false
  18841. }
  18842. },
  18843. "required": ["id", "type", "properties"],
  18844. "additionalProperties": false
  18845. },
  18846. {
  18847. "type": "object",
  18848. "properties": {
  18849. "id": {
  18850. "type": "string",
  18851. "pattern": "^evt_"
  18852. },
  18853. "type": {
  18854. "type": "string",
  18855. "enum": ["session.next.compaction.delta"]
  18856. },
  18857. "properties": {
  18858. "type": "object",
  18859. "properties": {
  18860. "timestamp": {
  18861. "type": "number"
  18862. },
  18863. "sessionID": {
  18864. "type": "string",
  18865. "pattern": "^ses"
  18866. },
  18867. "messageID": {
  18868. "type": "string",
  18869. "pattern": "^msg_"
  18870. },
  18871. "text": {
  18872. "type": "string"
  18873. }
  18874. },
  18875. "required": ["timestamp", "sessionID", "messageID", "text"],
  18876. "additionalProperties": false
  18877. }
  18878. },
  18879. "required": ["id", "type", "properties"],
  18880. "additionalProperties": false
  18881. },
  18882. {
  18883. "type": "object",
  18884. "properties": {
  18885. "id": {
  18886. "type": "string",
  18887. "pattern": "^evt_"
  18888. },
  18889. "type": {
  18890. "type": "string",
  18891. "enum": ["session.next.compaction.ended"]
  18892. },
  18893. "properties": {
  18894. "type": "object",
  18895. "properties": {
  18896. "timestamp": {
  18897. "type": "number"
  18898. },
  18899. "sessionID": {
  18900. "type": "string",
  18901. "pattern": "^ses"
  18902. },
  18903. "messageID": {
  18904. "type": "string",
  18905. "pattern": "^msg_"
  18906. },
  18907. "reason": {
  18908. "type": "string",
  18909. "enum": ["auto", "manual"]
  18910. },
  18911. "text": {
  18912. "type": "string"
  18913. },
  18914. "recent": {
  18915. "type": "string"
  18916. }
  18917. },
  18918. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18919. "additionalProperties": false
  18920. }
  18921. },
  18922. "required": ["id", "type", "properties"],
  18923. "additionalProperties": false
  18924. },
  18925. {
  18926. "type": "object",
  18927. "properties": {
  18928. "id": {
  18929. "type": "string",
  18930. "pattern": "^evt_"
  18931. },
  18932. "type": {
  18933. "type": "string",
  18934. "enum": ["session.next.revert.staged"]
  18935. },
  18936. "properties": {
  18937. "type": "object",
  18938. "properties": {
  18939. "timestamp": {
  18940. "type": "number"
  18941. },
  18942. "sessionID": {
  18943. "type": "string",
  18944. "pattern": "^ses"
  18945. },
  18946. "revert": {
  18947. "$ref": "#/components/schemas/RevertState"
  18948. }
  18949. },
  18950. "required": ["timestamp", "sessionID", "revert"],
  18951. "additionalProperties": false
  18952. }
  18953. },
  18954. "required": ["id", "type", "properties"],
  18955. "additionalProperties": false
  18956. },
  18957. {
  18958. "type": "object",
  18959. "properties": {
  18960. "id": {
  18961. "type": "string",
  18962. "pattern": "^evt_"
  18963. },
  18964. "type": {
  18965. "type": "string",
  18966. "enum": ["session.next.revert.cleared"]
  18967. },
  18968. "properties": {
  18969. "type": "object",
  18970. "properties": {
  18971. "timestamp": {
  18972. "type": "number"
  18973. },
  18974. "sessionID": {
  18975. "type": "string",
  18976. "pattern": "^ses"
  18977. }
  18978. },
  18979. "required": ["timestamp", "sessionID"],
  18980. "additionalProperties": false
  18981. }
  18982. },
  18983. "required": ["id", "type", "properties"],
  18984. "additionalProperties": false
  18985. },
  18986. {
  18987. "type": "object",
  18988. "properties": {
  18989. "id": {
  18990. "type": "string",
  18991. "pattern": "^evt_"
  18992. },
  18993. "type": {
  18994. "type": "string",
  18995. "enum": ["session.next.revert.committed"]
  18996. },
  18997. "properties": {
  18998. "type": "object",
  18999. "properties": {
  19000. "timestamp": {
  19001. "type": "number"
  19002. },
  19003. "sessionID": {
  19004. "type": "string",
  19005. "pattern": "^ses"
  19006. },
  19007. "messageID": {
  19008. "type": "string",
  19009. "pattern": "^msg_"
  19010. }
  19011. },
  19012. "required": ["timestamp", "sessionID", "messageID"],
  19013. "additionalProperties": false
  19014. }
  19015. },
  19016. "required": ["id", "type", "properties"],
  19017. "additionalProperties": false
  19018. },
  19019. {
  19020. "type": "object",
  19021. "properties": {
  19022. "id": {
  19023. "type": "string",
  19024. "pattern": "^evt_"
  19025. },
  19026. "type": {
  19027. "type": "string",
  19028. "enum": ["message.part.delta"]
  19029. },
  19030. "properties": {
  19031. "type": "object",
  19032. "properties": {
  19033. "sessionID": {
  19034. "type": "string",
  19035. "pattern": "^ses"
  19036. },
  19037. "messageID": {
  19038. "type": "string",
  19039. "pattern": "^msg"
  19040. },
  19041. "partID": {
  19042. "type": "string",
  19043. "pattern": "^prt"
  19044. },
  19045. "field": {
  19046. "type": "string"
  19047. },
  19048. "delta": {
  19049. "type": "string"
  19050. }
  19051. },
  19052. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  19053. "additionalProperties": false
  19054. }
  19055. },
  19056. "required": ["id", "type", "properties"],
  19057. "additionalProperties": false
  19058. },
  19059. {
  19060. "type": "object",
  19061. "properties": {
  19062. "id": {
  19063. "type": "string",
  19064. "pattern": "^evt_"
  19065. },
  19066. "type": {
  19067. "type": "string",
  19068. "enum": ["session.diff"]
  19069. },
  19070. "properties": {
  19071. "type": "object",
  19072. "properties": {
  19073. "sessionID": {
  19074. "type": "string",
  19075. "pattern": "^ses"
  19076. },
  19077. "diff": {
  19078. "type": "array",
  19079. "items": {
  19080. "$ref": "#/components/schemas/SnapshotFileDiff"
  19081. }
  19082. }
  19083. },
  19084. "required": ["sessionID", "diff"],
  19085. "additionalProperties": false
  19086. }
  19087. },
  19088. "required": ["id", "type", "properties"],
  19089. "additionalProperties": false
  19090. },
  19091. {
  19092. "type": "object",
  19093. "properties": {
  19094. "id": {
  19095. "type": "string",
  19096. "pattern": "^evt_"
  19097. },
  19098. "type": {
  19099. "type": "string",
  19100. "enum": ["session.error"]
  19101. },
  19102. "properties": {
  19103. "type": "object",
  19104. "properties": {
  19105. "sessionID": {
  19106. "type": "string",
  19107. "pattern": "^ses"
  19108. },
  19109. "error": {
  19110. "anyOf": [
  19111. {
  19112. "$ref": "#/components/schemas/ProviderAuthError"
  19113. },
  19114. {
  19115. "$ref": "#/components/schemas/UnknownError"
  19116. },
  19117. {
  19118. "$ref": "#/components/schemas/MessageOutputLengthError"
  19119. },
  19120. {
  19121. "$ref": "#/components/schemas/MessageAbortedError"
  19122. },
  19123. {
  19124. "$ref": "#/components/schemas/StructuredOutputError"
  19125. },
  19126. {
  19127. "$ref": "#/components/schemas/ContextOverflowError"
  19128. },
  19129. {
  19130. "$ref": "#/components/schemas/ContentFilterError"
  19131. },
  19132. {
  19133. "$ref": "#/components/schemas/APIError"
  19134. }
  19135. ]
  19136. }
  19137. },
  19138. "additionalProperties": false
  19139. }
  19140. },
  19141. "required": ["id", "type", "properties"],
  19142. "additionalProperties": false
  19143. },
  19144. {
  19145. "type": "object",
  19146. "properties": {
  19147. "id": {
  19148. "type": "string",
  19149. "pattern": "^evt_"
  19150. },
  19151. "type": {
  19152. "type": "string",
  19153. "enum": ["installation.updated"]
  19154. },
  19155. "properties": {
  19156. "type": "object",
  19157. "properties": {
  19158. "version": {
  19159. "type": "string"
  19160. }
  19161. },
  19162. "required": ["version"],
  19163. "additionalProperties": false
  19164. }
  19165. },
  19166. "required": ["id", "type", "properties"],
  19167. "additionalProperties": false
  19168. },
  19169. {
  19170. "type": "object",
  19171. "properties": {
  19172. "id": {
  19173. "type": "string",
  19174. "pattern": "^evt_"
  19175. },
  19176. "type": {
  19177. "type": "string",
  19178. "enum": ["installation.update-available"]
  19179. },
  19180. "properties": {
  19181. "type": "object",
  19182. "properties": {
  19183. "version": {
  19184. "type": "string"
  19185. }
  19186. },
  19187. "required": ["version"],
  19188. "additionalProperties": false
  19189. }
  19190. },
  19191. "required": ["id", "type", "properties"],
  19192. "additionalProperties": false
  19193. },
  19194. {
  19195. "type": "object",
  19196. "properties": {
  19197. "id": {
  19198. "type": "string",
  19199. "pattern": "^evt_"
  19200. },
  19201. "type": {
  19202. "type": "string",
  19203. "enum": ["file.edited"]
  19204. },
  19205. "properties": {
  19206. "type": "object",
  19207. "properties": {
  19208. "file": {
  19209. "type": "string"
  19210. }
  19211. },
  19212. "required": ["file"],
  19213. "additionalProperties": false
  19214. }
  19215. },
  19216. "required": ["id", "type", "properties"],
  19217. "additionalProperties": false
  19218. },
  19219. {
  19220. "type": "object",
  19221. "properties": {
  19222. "id": {
  19223. "type": "string",
  19224. "pattern": "^evt_"
  19225. },
  19226. "type": {
  19227. "type": "string",
  19228. "enum": ["reference.updated"]
  19229. },
  19230. "properties": {
  19231. "type": "object",
  19232. "properties": {}
  19233. }
  19234. },
  19235. "required": ["id", "type", "properties"],
  19236. "additionalProperties": false
  19237. },
  19238. {
  19239. "type": "object",
  19240. "properties": {
  19241. "id": {
  19242. "type": "string",
  19243. "pattern": "^evt_"
  19244. },
  19245. "type": {
  19246. "type": "string",
  19247. "enum": ["permission.v2.asked"]
  19248. },
  19249. "properties": {
  19250. "type": "object",
  19251. "properties": {
  19252. "id": {
  19253. "type": "string",
  19254. "pattern": "^per"
  19255. },
  19256. "sessionID": {
  19257. "type": "string",
  19258. "pattern": "^ses"
  19259. },
  19260. "action": {
  19261. "type": "string"
  19262. },
  19263. "resources": {
  19264. "type": "array",
  19265. "items": {
  19266. "type": "string"
  19267. }
  19268. },
  19269. "save": {
  19270. "type": "array",
  19271. "items": {
  19272. "type": "string"
  19273. }
  19274. },
  19275. "metadata": {
  19276. "type": "object"
  19277. },
  19278. "source": {
  19279. "$ref": "#/components/schemas/PermissionV2Source"
  19280. }
  19281. },
  19282. "required": ["id", "sessionID", "action", "resources"],
  19283. "additionalProperties": false
  19284. }
  19285. },
  19286. "required": ["id", "type", "properties"],
  19287. "additionalProperties": false
  19288. },
  19289. {
  19290. "type": "object",
  19291. "properties": {
  19292. "id": {
  19293. "type": "string",
  19294. "pattern": "^evt_"
  19295. },
  19296. "type": {
  19297. "type": "string",
  19298. "enum": ["permission.v2.replied"]
  19299. },
  19300. "properties": {
  19301. "type": "object",
  19302. "properties": {
  19303. "sessionID": {
  19304. "type": "string",
  19305. "pattern": "^ses"
  19306. },
  19307. "requestID": {
  19308. "type": "string",
  19309. "pattern": "^per"
  19310. },
  19311. "reply": {
  19312. "$ref": "#/components/schemas/PermissionV2Reply"
  19313. }
  19314. },
  19315. "required": ["sessionID", "requestID", "reply"],
  19316. "additionalProperties": false
  19317. }
  19318. },
  19319. "required": ["id", "type", "properties"],
  19320. "additionalProperties": false
  19321. },
  19322. {
  19323. "type": "object",
  19324. "properties": {
  19325. "id": {
  19326. "type": "string",
  19327. "pattern": "^evt_"
  19328. },
  19329. "type": {
  19330. "type": "string",
  19331. "enum": ["plugin.added"]
  19332. },
  19333. "properties": {
  19334. "type": "object",
  19335. "properties": {
  19336. "id": {
  19337. "type": "string"
  19338. }
  19339. },
  19340. "required": ["id"],
  19341. "additionalProperties": false
  19342. }
  19343. },
  19344. "required": ["id", "type", "properties"],
  19345. "additionalProperties": false
  19346. },
  19347. {
  19348. "type": "object",
  19349. "properties": {
  19350. "id": {
  19351. "type": "string",
  19352. "pattern": "^evt_"
  19353. },
  19354. "type": {
  19355. "type": "string",
  19356. "enum": ["project.directories.updated"]
  19357. },
  19358. "properties": {
  19359. "type": "object",
  19360. "properties": {
  19361. "projectID": {
  19362. "type": "string"
  19363. }
  19364. },
  19365. "required": ["projectID"],
  19366. "additionalProperties": false
  19367. }
  19368. },
  19369. "required": ["id", "type", "properties"],
  19370. "additionalProperties": false
  19371. },
  19372. {
  19373. "type": "object",
  19374. "properties": {
  19375. "id": {
  19376. "type": "string",
  19377. "pattern": "^evt_"
  19378. },
  19379. "type": {
  19380. "type": "string",
  19381. "enum": ["file.watcher.updated"]
  19382. },
  19383. "properties": {
  19384. "type": "object",
  19385. "properties": {
  19386. "file": {
  19387. "type": "string"
  19388. },
  19389. "event": {
  19390. "type": "string",
  19391. "enum": ["add", "change", "unlink"]
  19392. }
  19393. },
  19394. "required": ["file", "event"],
  19395. "additionalProperties": false
  19396. }
  19397. },
  19398. "required": ["id", "type", "properties"],
  19399. "additionalProperties": false
  19400. },
  19401. {
  19402. "type": "object",
  19403. "properties": {
  19404. "id": {
  19405. "type": "string",
  19406. "pattern": "^evt_"
  19407. },
  19408. "type": {
  19409. "type": "string",
  19410. "enum": ["pty.created"]
  19411. },
  19412. "properties": {
  19413. "type": "object",
  19414. "properties": {
  19415. "info": {
  19416. "$ref": "#/components/schemas/Pty"
  19417. }
  19418. },
  19419. "required": ["info"],
  19420. "additionalProperties": false
  19421. }
  19422. },
  19423. "required": ["id", "type", "properties"],
  19424. "additionalProperties": false
  19425. },
  19426. {
  19427. "type": "object",
  19428. "properties": {
  19429. "id": {
  19430. "type": "string",
  19431. "pattern": "^evt_"
  19432. },
  19433. "type": {
  19434. "type": "string",
  19435. "enum": ["pty.updated"]
  19436. },
  19437. "properties": {
  19438. "type": "object",
  19439. "properties": {
  19440. "info": {
  19441. "$ref": "#/components/schemas/Pty"
  19442. }
  19443. },
  19444. "required": ["info"],
  19445. "additionalProperties": false
  19446. }
  19447. },
  19448. "required": ["id", "type", "properties"],
  19449. "additionalProperties": false
  19450. },
  19451. {
  19452. "type": "object",
  19453. "properties": {
  19454. "id": {
  19455. "type": "string",
  19456. "pattern": "^evt_"
  19457. },
  19458. "type": {
  19459. "type": "string",
  19460. "enum": ["pty.exited"]
  19461. },
  19462. "properties": {
  19463. "type": "object",
  19464. "properties": {
  19465. "id": {
  19466. "type": "string",
  19467. "pattern": "^pty"
  19468. },
  19469. "exitCode": {
  19470. "type": "integer",
  19471. "minimum": 0
  19472. }
  19473. },
  19474. "required": ["id", "exitCode"],
  19475. "additionalProperties": false
  19476. }
  19477. },
  19478. "required": ["id", "type", "properties"],
  19479. "additionalProperties": false
  19480. },
  19481. {
  19482. "type": "object",
  19483. "properties": {
  19484. "id": {
  19485. "type": "string",
  19486. "pattern": "^evt_"
  19487. },
  19488. "type": {
  19489. "type": "string",
  19490. "enum": ["pty.deleted"]
  19491. },
  19492. "properties": {
  19493. "type": "object",
  19494. "properties": {
  19495. "id": {
  19496. "type": "string",
  19497. "pattern": "^pty"
  19498. }
  19499. },
  19500. "required": ["id"],
  19501. "additionalProperties": false
  19502. }
  19503. },
  19504. "required": ["id", "type", "properties"],
  19505. "additionalProperties": false
  19506. },
  19507. {
  19508. "type": "object",
  19509. "properties": {
  19510. "id": {
  19511. "type": "string",
  19512. "pattern": "^evt_"
  19513. },
  19514. "type": {
  19515. "type": "string",
  19516. "enum": ["question.v2.asked"]
  19517. },
  19518. "properties": {
  19519. "type": "object",
  19520. "properties": {
  19521. "id": {
  19522. "type": "string",
  19523. "pattern": "^que"
  19524. },
  19525. "sessionID": {
  19526. "type": "string",
  19527. "pattern": "^ses"
  19528. },
  19529. "questions": {
  19530. "type": "array",
  19531. "items": {
  19532. "$ref": "#/components/schemas/QuestionV2Info"
  19533. },
  19534. "description": "Questions to ask"
  19535. },
  19536. "tool": {
  19537. "$ref": "#/components/schemas/QuestionV2Tool"
  19538. }
  19539. },
  19540. "required": ["id", "sessionID", "questions"],
  19541. "additionalProperties": false
  19542. }
  19543. },
  19544. "required": ["id", "type", "properties"],
  19545. "additionalProperties": false
  19546. },
  19547. {
  19548. "type": "object",
  19549. "properties": {
  19550. "id": {
  19551. "type": "string",
  19552. "pattern": "^evt_"
  19553. },
  19554. "type": {
  19555. "type": "string",
  19556. "enum": ["question.v2.replied"]
  19557. },
  19558. "properties": {
  19559. "type": "object",
  19560. "properties": {
  19561. "sessionID": {
  19562. "type": "string",
  19563. "pattern": "^ses"
  19564. },
  19565. "requestID": {
  19566. "type": "string",
  19567. "pattern": "^que"
  19568. },
  19569. "answers": {
  19570. "type": "array",
  19571. "items": {
  19572. "$ref": "#/components/schemas/QuestionV2Answer"
  19573. }
  19574. }
  19575. },
  19576. "required": ["sessionID", "requestID", "answers"],
  19577. "additionalProperties": false
  19578. }
  19579. },
  19580. "required": ["id", "type", "properties"],
  19581. "additionalProperties": false
  19582. },
  19583. {
  19584. "type": "object",
  19585. "properties": {
  19586. "id": {
  19587. "type": "string",
  19588. "pattern": "^evt_"
  19589. },
  19590. "type": {
  19591. "type": "string",
  19592. "enum": ["question.v2.rejected"]
  19593. },
  19594. "properties": {
  19595. "type": "object",
  19596. "properties": {
  19597. "sessionID": {
  19598. "type": "string",
  19599. "pattern": "^ses"
  19600. },
  19601. "requestID": {
  19602. "type": "string",
  19603. "pattern": "^que"
  19604. }
  19605. },
  19606. "required": ["sessionID", "requestID"],
  19607. "additionalProperties": false
  19608. }
  19609. },
  19610. "required": ["id", "type", "properties"],
  19611. "additionalProperties": false
  19612. },
  19613. {
  19614. "type": "object",
  19615. "properties": {
  19616. "id": {
  19617. "type": "string",
  19618. "pattern": "^evt_"
  19619. },
  19620. "type": {
  19621. "type": "string",
  19622. "enum": ["todo.updated"]
  19623. },
  19624. "properties": {
  19625. "type": "object",
  19626. "properties": {
  19627. "sessionID": {
  19628. "type": "string",
  19629. "pattern": "^ses"
  19630. },
  19631. "todos": {
  19632. "type": "array",
  19633. "items": {
  19634. "$ref": "#/components/schemas/Todo"
  19635. }
  19636. }
  19637. },
  19638. "required": ["sessionID", "todos"],
  19639. "additionalProperties": false
  19640. }
  19641. },
  19642. "required": ["id", "type", "properties"],
  19643. "additionalProperties": false
  19644. },
  19645. {
  19646. "type": "object",
  19647. "properties": {
  19648. "id": {
  19649. "type": "string",
  19650. "pattern": "^evt_"
  19651. },
  19652. "type": {
  19653. "type": "string",
  19654. "enum": ["lsp.updated"]
  19655. },
  19656. "properties": {
  19657. "type": "object",
  19658. "properties": {}
  19659. }
  19660. },
  19661. "required": ["id", "type", "properties"],
  19662. "additionalProperties": false
  19663. },
  19664. {
  19665. "type": "object",
  19666. "properties": {
  19667. "id": {
  19668. "type": "string",
  19669. "pattern": "^evt_"
  19670. },
  19671. "type": {
  19672. "type": "string",
  19673. "enum": ["permission.asked"]
  19674. },
  19675. "properties": {
  19676. "type": "object",
  19677. "properties": {
  19678. "id": {
  19679. "type": "string",
  19680. "pattern": "^per"
  19681. },
  19682. "sessionID": {
  19683. "type": "string",
  19684. "pattern": "^ses"
  19685. },
  19686. "permission": {
  19687. "type": "string"
  19688. },
  19689. "patterns": {
  19690. "type": "array",
  19691. "items": {
  19692. "type": "string"
  19693. }
  19694. },
  19695. "metadata": {
  19696. "type": "object"
  19697. },
  19698. "always": {
  19699. "type": "array",
  19700. "items": {
  19701. "type": "string"
  19702. }
  19703. },
  19704. "tool": {
  19705. "type": "object",
  19706. "properties": {
  19707. "messageID": {
  19708. "type": "string"
  19709. },
  19710. "callID": {
  19711. "type": "string"
  19712. }
  19713. },
  19714. "required": ["messageID", "callID"],
  19715. "additionalProperties": false
  19716. }
  19717. },
  19718. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19719. "additionalProperties": false
  19720. }
  19721. },
  19722. "required": ["id", "type", "properties"],
  19723. "additionalProperties": false
  19724. },
  19725. {
  19726. "type": "object",
  19727. "properties": {
  19728. "id": {
  19729. "type": "string",
  19730. "pattern": "^evt_"
  19731. },
  19732. "type": {
  19733. "type": "string",
  19734. "enum": ["permission.replied"]
  19735. },
  19736. "properties": {
  19737. "type": "object",
  19738. "properties": {
  19739. "sessionID": {
  19740. "type": "string",
  19741. "pattern": "^ses"
  19742. },
  19743. "requestID": {
  19744. "type": "string",
  19745. "pattern": "^per"
  19746. },
  19747. "reply": {
  19748. "type": "string",
  19749. "enum": ["once", "always", "reject"]
  19750. }
  19751. },
  19752. "required": ["sessionID", "requestID", "reply"],
  19753. "additionalProperties": false
  19754. }
  19755. },
  19756. "required": ["id", "type", "properties"],
  19757. "additionalProperties": false
  19758. },
  19759. {
  19760. "type": "object",
  19761. "properties": {
  19762. "id": {
  19763. "type": "string",
  19764. "pattern": "^evt_"
  19765. },
  19766. "type": {
  19767. "type": "string",
  19768. "enum": ["tui.prompt.append"]
  19769. },
  19770. "properties": {
  19771. "type": "object",
  19772. "properties": {
  19773. "text": {
  19774. "type": "string"
  19775. }
  19776. },
  19777. "required": ["text"],
  19778. "additionalProperties": false
  19779. }
  19780. },
  19781. "required": ["id", "type", "properties"],
  19782. "additionalProperties": false
  19783. },
  19784. {
  19785. "type": "object",
  19786. "properties": {
  19787. "id": {
  19788. "type": "string",
  19789. "pattern": "^evt_"
  19790. },
  19791. "type": {
  19792. "type": "string",
  19793. "enum": ["tui.command.execute"]
  19794. },
  19795. "properties": {
  19796. "type": "object",
  19797. "properties": {
  19798. "command": {
  19799. "anyOf": [
  19800. {
  19801. "type": "string",
  19802. "enum": [
  19803. "session.list",
  19804. "session.new",
  19805. "session.share",
  19806. "session.interrupt",
  19807. "session.compact",
  19808. "session.page.up",
  19809. "session.page.down",
  19810. "session.line.up",
  19811. "session.line.down",
  19812. "session.half.page.up",
  19813. "session.half.page.down",
  19814. "session.first",
  19815. "session.last",
  19816. "prompt.clear",
  19817. "prompt.submit",
  19818. "agent.cycle"
  19819. ]
  19820. },
  19821. {
  19822. "type": "string"
  19823. }
  19824. ]
  19825. }
  19826. },
  19827. "required": ["command"],
  19828. "additionalProperties": false
  19829. }
  19830. },
  19831. "required": ["id", "type", "properties"],
  19832. "additionalProperties": false
  19833. },
  19834. {
  19835. "type": "object",
  19836. "properties": {
  19837. "id": {
  19838. "type": "string",
  19839. "pattern": "^evt_"
  19840. },
  19841. "type": {
  19842. "type": "string",
  19843. "enum": ["tui.toast.show"]
  19844. },
  19845. "properties": {
  19846. "type": "object",
  19847. "properties": {
  19848. "title": {
  19849. "type": "string"
  19850. },
  19851. "message": {
  19852. "type": "string"
  19853. },
  19854. "variant": {
  19855. "type": "string",
  19856. "enum": ["info", "success", "warning", "error"]
  19857. },
  19858. "duration": {
  19859. "type": "integer",
  19860. "exclusiveMinimum": 0
  19861. }
  19862. },
  19863. "required": ["message", "variant"],
  19864. "additionalProperties": false
  19865. }
  19866. },
  19867. "required": ["id", "type", "properties"],
  19868. "additionalProperties": false
  19869. },
  19870. {
  19871. "type": "object",
  19872. "properties": {
  19873. "id": {
  19874. "type": "string",
  19875. "pattern": "^evt_"
  19876. },
  19877. "type": {
  19878. "type": "string",
  19879. "enum": ["tui.session.select"]
  19880. },
  19881. "properties": {
  19882. "type": "object",
  19883. "properties": {
  19884. "sessionID": {
  19885. "type": "string",
  19886. "pattern": "^ses",
  19887. "description": "Session ID to navigate to"
  19888. }
  19889. },
  19890. "required": ["sessionID"],
  19891. "additionalProperties": false
  19892. }
  19893. },
  19894. "required": ["id", "type", "properties"],
  19895. "additionalProperties": false
  19896. },
  19897. {
  19898. "type": "object",
  19899. "properties": {
  19900. "id": {
  19901. "type": "string",
  19902. "pattern": "^evt_"
  19903. },
  19904. "type": {
  19905. "type": "string",
  19906. "enum": ["mcp.tools.changed"]
  19907. },
  19908. "properties": {
  19909. "type": "object",
  19910. "properties": {
  19911. "server": {
  19912. "type": "string"
  19913. }
  19914. },
  19915. "required": ["server"],
  19916. "additionalProperties": false
  19917. }
  19918. },
  19919. "required": ["id", "type", "properties"],
  19920. "additionalProperties": false
  19921. },
  19922. {
  19923. "type": "object",
  19924. "properties": {
  19925. "id": {
  19926. "type": "string",
  19927. "pattern": "^evt_"
  19928. },
  19929. "type": {
  19930. "type": "string",
  19931. "enum": ["mcp.browser.open.failed"]
  19932. },
  19933. "properties": {
  19934. "type": "object",
  19935. "properties": {
  19936. "mcpName": {
  19937. "type": "string"
  19938. },
  19939. "url": {
  19940. "type": "string"
  19941. }
  19942. },
  19943. "required": ["mcpName", "url"],
  19944. "additionalProperties": false
  19945. }
  19946. },
  19947. "required": ["id", "type", "properties"],
  19948. "additionalProperties": false
  19949. },
  19950. {
  19951. "type": "object",
  19952. "properties": {
  19953. "id": {
  19954. "type": "string",
  19955. "pattern": "^evt_"
  19956. },
  19957. "type": {
  19958. "type": "string",
  19959. "enum": ["command.executed"]
  19960. },
  19961. "properties": {
  19962. "type": "object",
  19963. "properties": {
  19964. "name": {
  19965. "type": "string"
  19966. },
  19967. "sessionID": {
  19968. "type": "string",
  19969. "pattern": "^ses"
  19970. },
  19971. "arguments": {
  19972. "type": "string"
  19973. },
  19974. "messageID": {
  19975. "type": "string",
  19976. "pattern": "^msg"
  19977. }
  19978. },
  19979. "required": ["name", "sessionID", "arguments", "messageID"],
  19980. "additionalProperties": false
  19981. }
  19982. },
  19983. "required": ["id", "type", "properties"],
  19984. "additionalProperties": false
  19985. },
  19986. {
  19987. "type": "object",
  19988. "properties": {
  19989. "id": {
  19990. "type": "string",
  19991. "pattern": "^evt_"
  19992. },
  19993. "type": {
  19994. "type": "string",
  19995. "enum": ["project.updated"]
  19996. },
  19997. "properties": {
  19998. "type": "object",
  19999. "properties": {
  20000. "id": {
  20001. "type": "string"
  20002. },
  20003. "worktree": {
  20004. "type": "string"
  20005. },
  20006. "vcs": {
  20007. "$ref": "#/components/schemas/ProjectVcs"
  20008. },
  20009. "name": {
  20010. "type": "string"
  20011. },
  20012. "icon": {
  20013. "$ref": "#/components/schemas/ProjectIcon"
  20014. },
  20015. "commands": {
  20016. "$ref": "#/components/schemas/ProjectCommands"
  20017. },
  20018. "time": {
  20019. "$ref": "#/components/schemas/ProjectTime"
  20020. },
  20021. "sandboxes": {
  20022. "type": "array",
  20023. "items": {
  20024. "type": "string"
  20025. }
  20026. }
  20027. },
  20028. "required": ["id", "worktree", "time", "sandboxes"],
  20029. "additionalProperties": false
  20030. }
  20031. },
  20032. "required": ["id", "type", "properties"],
  20033. "additionalProperties": false
  20034. },
  20035. {
  20036. "type": "object",
  20037. "properties": {
  20038. "id": {
  20039. "type": "string",
  20040. "pattern": "^evt_"
  20041. },
  20042. "type": {
  20043. "type": "string",
  20044. "enum": ["session.status"]
  20045. },
  20046. "properties": {
  20047. "type": "object",
  20048. "properties": {
  20049. "sessionID": {
  20050. "type": "string",
  20051. "pattern": "^ses"
  20052. },
  20053. "status": {
  20054. "$ref": "#/components/schemas/SessionStatus"
  20055. }
  20056. },
  20057. "required": ["sessionID", "status"],
  20058. "additionalProperties": false
  20059. }
  20060. },
  20061. "required": ["id", "type", "properties"],
  20062. "additionalProperties": false
  20063. },
  20064. {
  20065. "type": "object",
  20066. "properties": {
  20067. "id": {
  20068. "type": "string",
  20069. "pattern": "^evt_"
  20070. },
  20071. "type": {
  20072. "type": "string",
  20073. "enum": ["session.idle"]
  20074. },
  20075. "properties": {
  20076. "type": "object",
  20077. "properties": {
  20078. "sessionID": {
  20079. "type": "string",
  20080. "pattern": "^ses"
  20081. }
  20082. },
  20083. "required": ["sessionID"],
  20084. "additionalProperties": false
  20085. }
  20086. },
  20087. "required": ["id", "type", "properties"],
  20088. "additionalProperties": false
  20089. },
  20090. {
  20091. "type": "object",
  20092. "properties": {
  20093. "id": {
  20094. "type": "string",
  20095. "pattern": "^evt_"
  20096. },
  20097. "type": {
  20098. "type": "string",
  20099. "enum": ["question.asked"]
  20100. },
  20101. "properties": {
  20102. "type": "object",
  20103. "properties": {
  20104. "id": {
  20105. "type": "string",
  20106. "pattern": "^que"
  20107. },
  20108. "sessionID": {
  20109. "type": "string",
  20110. "pattern": "^ses"
  20111. },
  20112. "questions": {
  20113. "type": "array",
  20114. "items": {
  20115. "$ref": "#/components/schemas/QuestionInfo"
  20116. },
  20117. "description": "Questions to ask"
  20118. },
  20119. "tool": {
  20120. "$ref": "#/components/schemas/QuestionTool"
  20121. }
  20122. },
  20123. "required": ["id", "sessionID", "questions"],
  20124. "additionalProperties": false
  20125. }
  20126. },
  20127. "required": ["id", "type", "properties"],
  20128. "additionalProperties": false
  20129. },
  20130. {
  20131. "type": "object",
  20132. "properties": {
  20133. "id": {
  20134. "type": "string",
  20135. "pattern": "^evt_"
  20136. },
  20137. "type": {
  20138. "type": "string",
  20139. "enum": ["question.replied"]
  20140. },
  20141. "properties": {
  20142. "type": "object",
  20143. "properties": {
  20144. "sessionID": {
  20145. "type": "string",
  20146. "pattern": "^ses"
  20147. },
  20148. "requestID": {
  20149. "type": "string",
  20150. "pattern": "^que"
  20151. },
  20152. "answers": {
  20153. "type": "array",
  20154. "items": {
  20155. "$ref": "#/components/schemas/QuestionAnswer"
  20156. }
  20157. }
  20158. },
  20159. "required": ["sessionID", "requestID", "answers"],
  20160. "additionalProperties": false
  20161. }
  20162. },
  20163. "required": ["id", "type", "properties"],
  20164. "additionalProperties": false
  20165. },
  20166. {
  20167. "type": "object",
  20168. "properties": {
  20169. "id": {
  20170. "type": "string",
  20171. "pattern": "^evt_"
  20172. },
  20173. "type": {
  20174. "type": "string",
  20175. "enum": ["question.rejected"]
  20176. },
  20177. "properties": {
  20178. "type": "object",
  20179. "properties": {
  20180. "sessionID": {
  20181. "type": "string",
  20182. "pattern": "^ses"
  20183. },
  20184. "requestID": {
  20185. "type": "string",
  20186. "pattern": "^que"
  20187. }
  20188. },
  20189. "required": ["sessionID", "requestID"],
  20190. "additionalProperties": false
  20191. }
  20192. },
  20193. "required": ["id", "type", "properties"],
  20194. "additionalProperties": false
  20195. },
  20196. {
  20197. "type": "object",
  20198. "properties": {
  20199. "id": {
  20200. "type": "string",
  20201. "pattern": "^evt_"
  20202. },
  20203. "type": {
  20204. "type": "string",
  20205. "enum": ["session.compacted"]
  20206. },
  20207. "properties": {
  20208. "type": "object",
  20209. "properties": {
  20210. "sessionID": {
  20211. "type": "string",
  20212. "pattern": "^ses"
  20213. }
  20214. },
  20215. "required": ["sessionID"],
  20216. "additionalProperties": false
  20217. }
  20218. },
  20219. "required": ["id", "type", "properties"],
  20220. "additionalProperties": false
  20221. },
  20222. {
  20223. "type": "object",
  20224. "properties": {
  20225. "id": {
  20226. "type": "string",
  20227. "pattern": "^evt_"
  20228. },
  20229. "type": {
  20230. "type": "string",
  20231. "enum": ["vcs.branch.updated"]
  20232. },
  20233. "properties": {
  20234. "type": "object",
  20235. "properties": {
  20236. "branch": {
  20237. "type": "string"
  20238. }
  20239. },
  20240. "additionalProperties": false
  20241. }
  20242. },
  20243. "required": ["id", "type", "properties"],
  20244. "additionalProperties": false
  20245. },
  20246. {
  20247. "type": "object",
  20248. "properties": {
  20249. "id": {
  20250. "type": "string",
  20251. "pattern": "^evt_"
  20252. },
  20253. "type": {
  20254. "type": "string",
  20255. "enum": ["workspace.ready"]
  20256. },
  20257. "properties": {
  20258. "type": "object",
  20259. "properties": {
  20260. "name": {
  20261. "type": "string"
  20262. }
  20263. },
  20264. "required": ["name"],
  20265. "additionalProperties": false
  20266. }
  20267. },
  20268. "required": ["id", "type", "properties"],
  20269. "additionalProperties": false
  20270. },
  20271. {
  20272. "type": "object",
  20273. "properties": {
  20274. "id": {
  20275. "type": "string",
  20276. "pattern": "^evt_"
  20277. },
  20278. "type": {
  20279. "type": "string",
  20280. "enum": ["workspace.failed"]
  20281. },
  20282. "properties": {
  20283. "type": "object",
  20284. "properties": {
  20285. "message": {
  20286. "type": "string"
  20287. }
  20288. },
  20289. "required": ["message"],
  20290. "additionalProperties": false
  20291. }
  20292. },
  20293. "required": ["id", "type", "properties"],
  20294. "additionalProperties": false
  20295. },
  20296. {
  20297. "type": "object",
  20298. "properties": {
  20299. "id": {
  20300. "type": "string",
  20301. "pattern": "^evt_"
  20302. },
  20303. "type": {
  20304. "type": "string",
  20305. "enum": ["workspace.status"]
  20306. },
  20307. "properties": {
  20308. "type": "object",
  20309. "properties": {
  20310. "workspaceID": {
  20311. "type": "string",
  20312. "pattern": "^wrk"
  20313. },
  20314. "status": {
  20315. "type": "string",
  20316. "enum": ["connected", "connecting", "disconnected", "error"]
  20317. }
  20318. },
  20319. "required": ["workspaceID", "status"],
  20320. "additionalProperties": false
  20321. }
  20322. },
  20323. "required": ["id", "type", "properties"],
  20324. "additionalProperties": false
  20325. },
  20326. {
  20327. "type": "object",
  20328. "properties": {
  20329. "id": {
  20330. "type": "string",
  20331. "pattern": "^evt_"
  20332. },
  20333. "type": {
  20334. "type": "string",
  20335. "enum": ["worktree.ready"]
  20336. },
  20337. "properties": {
  20338. "type": "object",
  20339. "properties": {
  20340. "name": {
  20341. "type": "string"
  20342. },
  20343. "branch": {
  20344. "type": "string"
  20345. }
  20346. },
  20347. "required": ["name"],
  20348. "additionalProperties": false
  20349. }
  20350. },
  20351. "required": ["id", "type", "properties"],
  20352. "additionalProperties": false
  20353. },
  20354. {
  20355. "type": "object",
  20356. "properties": {
  20357. "id": {
  20358. "type": "string",
  20359. "pattern": "^evt_"
  20360. },
  20361. "type": {
  20362. "type": "string",
  20363. "enum": ["worktree.failed"]
  20364. },
  20365. "properties": {
  20366. "type": "object",
  20367. "properties": {
  20368. "message": {
  20369. "type": "string"
  20370. }
  20371. },
  20372. "required": ["message"],
  20373. "additionalProperties": false
  20374. }
  20375. },
  20376. "required": ["id", "type", "properties"],
  20377. "additionalProperties": false
  20378. },
  20379. {
  20380. "type": "object",
  20381. "properties": {
  20382. "id": {
  20383. "type": "string",
  20384. "pattern": "^evt_"
  20385. },
  20386. "type": {
  20387. "type": "string",
  20388. "enum": ["server.connected"]
  20389. },
  20390. "properties": {
  20391. "type": "object",
  20392. "properties": {}
  20393. }
  20394. },
  20395. "required": ["id", "type", "properties"],
  20396. "additionalProperties": false
  20397. },
  20398. {
  20399. "type": "object",
  20400. "properties": {
  20401. "id": {
  20402. "type": "string",
  20403. "pattern": "^evt_"
  20404. },
  20405. "type": {
  20406. "type": "string",
  20407. "enum": ["global.disposed"]
  20408. },
  20409. "properties": {
  20410. "type": "object",
  20411. "properties": {}
  20412. }
  20413. },
  20414. "required": ["id", "type", "properties"],
  20415. "additionalProperties": false
  20416. },
  20417. {
  20418. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  20419. },
  20420. {
  20421. "$ref": "#/components/schemas/SyncEventSessionCreated"
  20422. },
  20423. {
  20424. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  20425. },
  20426. {
  20427. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  20428. },
  20429. {
  20430. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  20431. },
  20432. {
  20433. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  20434. },
  20435. {
  20436. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  20437. },
  20438. {
  20439. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  20440. },
  20441. {
  20442. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  20443. },
  20444. {
  20445. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  20446. },
  20447. {
  20448. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  20449. },
  20450. {
  20451. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  20452. },
  20453. {
  20454. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  20455. },
  20456. {
  20457. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  20458. },
  20459. {
  20460. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  20461. },
  20462. {
  20463. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  20464. },
  20465. {
  20466. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  20467. },
  20468. {
  20469. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  20470. },
  20471. {
  20472. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  20473. },
  20474. {
  20475. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  20476. },
  20477. {
  20478. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  20479. },
  20480. {
  20481. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  20482. },
  20483. {
  20484. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  20485. },
  20486. {
  20487. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  20488. },
  20489. {
  20490. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  20491. },
  20492. {
  20493. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  20494. },
  20495. {
  20496. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  20497. },
  20498. {
  20499. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  20500. },
  20501. {
  20502. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  20503. },
  20504. {
  20505. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  20506. },
  20507. {
  20508. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  20509. },
  20510. {
  20511. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  20512. },
  20513. {
  20514. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  20515. },
  20516. {
  20517. "$ref": "#/components/schemas/SyncEventSessionNextRevertStaged"
  20518. },
  20519. {
  20520. "$ref": "#/components/schemas/SyncEventSessionNextRevertCleared"
  20521. },
  20522. {
  20523. "$ref": "#/components/schemas/SyncEventSessionNextRevertCommitted"
  20524. }
  20525. ]
  20526. }
  20527. },
  20528. "required": ["directory", "payload"],
  20529. "additionalProperties": false
  20530. },
  20531. "LogLevel": {
  20532. "type": "string",
  20533. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  20534. "description": "Log level"
  20535. },
  20536. "ServerConfig": {
  20537. "type": "object",
  20538. "properties": {
  20539. "port": {
  20540. "type": "integer",
  20541. "exclusiveMinimum": 0
  20542. },
  20543. "hostname": {
  20544. "type": "string"
  20545. },
  20546. "mdns": {
  20547. "type": "boolean"
  20548. },
  20549. "mdnsDomain": {
  20550. "type": "string"
  20551. },
  20552. "cors": {
  20553. "type": "array",
  20554. "items": {
  20555. "type": "string"
  20556. }
  20557. }
  20558. },
  20559. "additionalProperties": false,
  20560. "description": "Server configuration for opencode serve and web commands"
  20561. },
  20562. "PermissionActionConfig": {
  20563. "type": "string",
  20564. "enum": ["ask", "allow", "deny"]
  20565. },
  20566. "PermissionObjectConfig": {
  20567. "type": "object",
  20568. "additionalProperties": {
  20569. "$ref": "#/components/schemas/PermissionActionConfig"
  20570. }
  20571. },
  20572. "PermissionRuleConfig": {
  20573. "anyOf": [
  20574. {
  20575. "$ref": "#/components/schemas/PermissionActionConfig"
  20576. },
  20577. {
  20578. "$ref": "#/components/schemas/PermissionObjectConfig"
  20579. }
  20580. ]
  20581. },
  20582. "PermissionConfig": {
  20583. "anyOf": [
  20584. {
  20585. "$ref": "#/components/schemas/PermissionActionConfig"
  20586. },
  20587. {
  20588. "type": "object",
  20589. "properties": {
  20590. "read": {
  20591. "$ref": "#/components/schemas/PermissionRuleConfig"
  20592. },
  20593. "edit": {
  20594. "$ref": "#/components/schemas/PermissionRuleConfig"
  20595. },
  20596. "glob": {
  20597. "$ref": "#/components/schemas/PermissionRuleConfig"
  20598. },
  20599. "grep": {
  20600. "$ref": "#/components/schemas/PermissionRuleConfig"
  20601. },
  20602. "list": {
  20603. "$ref": "#/components/schemas/PermissionRuleConfig"
  20604. },
  20605. "bash": {
  20606. "$ref": "#/components/schemas/PermissionRuleConfig"
  20607. },
  20608. "task": {
  20609. "$ref": "#/components/schemas/PermissionRuleConfig"
  20610. },
  20611. "external_directory": {
  20612. "$ref": "#/components/schemas/PermissionRuleConfig"
  20613. },
  20614. "todowrite": {
  20615. "$ref": "#/components/schemas/PermissionActionConfig"
  20616. },
  20617. "question": {
  20618. "$ref": "#/components/schemas/PermissionActionConfig"
  20619. },
  20620. "webfetch": {
  20621. "$ref": "#/components/schemas/PermissionActionConfig"
  20622. },
  20623. "websearch": {
  20624. "$ref": "#/components/schemas/PermissionActionConfig"
  20625. },
  20626. "lsp": {
  20627. "$ref": "#/components/schemas/PermissionRuleConfig"
  20628. },
  20629. "doom_loop": {
  20630. "$ref": "#/components/schemas/PermissionActionConfig"
  20631. },
  20632. "skill": {
  20633. "$ref": "#/components/schemas/PermissionRuleConfig"
  20634. }
  20635. },
  20636. "additionalProperties": {
  20637. "$ref": "#/components/schemas/PermissionRuleConfig"
  20638. }
  20639. }
  20640. ]
  20641. },
  20642. "AgentConfig": {
  20643. "type": "object",
  20644. "properties": {
  20645. "model": {
  20646. "type": "string"
  20647. },
  20648. "variant": {
  20649. "type": "string"
  20650. },
  20651. "temperature": {
  20652. "type": "number"
  20653. },
  20654. "top_p": {
  20655. "type": "number"
  20656. },
  20657. "prompt": {
  20658. "type": "string"
  20659. },
  20660. "tools": {
  20661. "type": "object",
  20662. "additionalProperties": {
  20663. "type": "boolean"
  20664. }
  20665. },
  20666. "disable": {
  20667. "type": "boolean"
  20668. },
  20669. "description": {
  20670. "type": "string"
  20671. },
  20672. "mode": {
  20673. "type": "string",
  20674. "enum": ["subagent", "primary", "all"]
  20675. },
  20676. "hidden": {
  20677. "type": "boolean"
  20678. },
  20679. "options": {
  20680. "type": "object"
  20681. },
  20682. "color": {
  20683. "anyOf": [
  20684. {
  20685. "type": "string",
  20686. "pattern": "^#[0-9a-fA-F]{6}$"
  20687. },
  20688. {
  20689. "type": "string",
  20690. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20691. }
  20692. ],
  20693. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20694. },
  20695. "steps": {
  20696. "type": "integer",
  20697. "exclusiveMinimum": 0
  20698. },
  20699. "maxSteps": {
  20700. "type": "integer",
  20701. "exclusiveMinimum": 0
  20702. },
  20703. "permission": {
  20704. "$ref": "#/components/schemas/PermissionConfig"
  20705. }
  20706. },
  20707. "additionalProperties": {}
  20708. },
  20709. "ProviderConfig": {
  20710. "type": "object",
  20711. "properties": {
  20712. "api": {
  20713. "type": "string"
  20714. },
  20715. "name": {
  20716. "type": "string"
  20717. },
  20718. "env": {
  20719. "type": "array",
  20720. "items": {
  20721. "type": "string"
  20722. }
  20723. },
  20724. "id": {
  20725. "type": "string"
  20726. },
  20727. "npm": {
  20728. "type": "string"
  20729. },
  20730. "whitelist": {
  20731. "type": "array",
  20732. "items": {
  20733. "type": "string"
  20734. }
  20735. },
  20736. "blacklist": {
  20737. "type": "array",
  20738. "items": {
  20739. "type": "string"
  20740. }
  20741. },
  20742. "options": {
  20743. "type": "object",
  20744. "properties": {
  20745. "apiKey": {
  20746. "type": "string"
  20747. },
  20748. "baseURL": {
  20749. "type": "string"
  20750. },
  20751. "enterpriseUrl": {
  20752. "type": "string"
  20753. },
  20754. "setCacheKey": {
  20755. "type": "boolean"
  20756. },
  20757. "timeout": {
  20758. "anyOf": [
  20759. {
  20760. "type": "integer",
  20761. "exclusiveMinimum": 0
  20762. },
  20763. {
  20764. "type": "boolean",
  20765. "enum": [false]
  20766. }
  20767. ],
  20768. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20769. },
  20770. "headerTimeout": {
  20771. "anyOf": [
  20772. {
  20773. "type": "integer",
  20774. "exclusiveMinimum": 0
  20775. },
  20776. {
  20777. "type": "boolean",
  20778. "enum": [false]
  20779. }
  20780. ],
  20781. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20782. },
  20783. "chunkTimeout": {
  20784. "type": "integer",
  20785. "exclusiveMinimum": 0
  20786. }
  20787. },
  20788. "additionalProperties": {}
  20789. },
  20790. "models": {
  20791. "type": "object",
  20792. "additionalProperties": {
  20793. "type": "object",
  20794. "properties": {
  20795. "id": {
  20796. "type": "string"
  20797. },
  20798. "name": {
  20799. "type": "string"
  20800. },
  20801. "family": {
  20802. "type": "string"
  20803. },
  20804. "release_date": {
  20805. "type": "string"
  20806. },
  20807. "attachment": {
  20808. "type": "boolean"
  20809. },
  20810. "reasoning": {
  20811. "type": "boolean"
  20812. },
  20813. "temperature": {
  20814. "type": "boolean"
  20815. },
  20816. "tool_call": {
  20817. "type": "boolean"
  20818. },
  20819. "interleaved": {
  20820. "anyOf": [
  20821. {
  20822. "type": "boolean",
  20823. "enum": [true]
  20824. },
  20825. {
  20826. "type": "object",
  20827. "properties": {
  20828. "field": {
  20829. "type": "string",
  20830. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20831. }
  20832. },
  20833. "required": ["field"],
  20834. "additionalProperties": false
  20835. }
  20836. ]
  20837. },
  20838. "cost": {
  20839. "type": "object",
  20840. "properties": {
  20841. "input": {
  20842. "type": "number"
  20843. },
  20844. "output": {
  20845. "type": "number"
  20846. },
  20847. "cache_read": {
  20848. "type": "number"
  20849. },
  20850. "cache_write": {
  20851. "type": "number"
  20852. },
  20853. "context_over_200k": {
  20854. "type": "object",
  20855. "properties": {
  20856. "input": {
  20857. "type": "number"
  20858. },
  20859. "output": {
  20860. "type": "number"
  20861. },
  20862. "cache_read": {
  20863. "type": "number"
  20864. },
  20865. "cache_write": {
  20866. "type": "number"
  20867. }
  20868. },
  20869. "required": ["input", "output"],
  20870. "additionalProperties": false
  20871. }
  20872. },
  20873. "required": ["input", "output"],
  20874. "additionalProperties": false
  20875. },
  20876. "limit": {
  20877. "type": "object",
  20878. "properties": {
  20879. "context": {
  20880. "type": "number"
  20881. },
  20882. "input": {
  20883. "type": "number"
  20884. },
  20885. "output": {
  20886. "type": "number"
  20887. }
  20888. },
  20889. "required": ["context", "output"],
  20890. "additionalProperties": false
  20891. },
  20892. "modalities": {
  20893. "type": "object",
  20894. "properties": {
  20895. "input": {
  20896. "type": "array",
  20897. "items": {
  20898. "type": "string",
  20899. "enum": ["text", "audio", "image", "video", "pdf"]
  20900. }
  20901. },
  20902. "output": {
  20903. "type": "array",
  20904. "items": {
  20905. "type": "string",
  20906. "enum": ["text", "audio", "image", "video", "pdf"]
  20907. }
  20908. }
  20909. },
  20910. "additionalProperties": false
  20911. },
  20912. "experimental": {
  20913. "type": "boolean"
  20914. },
  20915. "status": {
  20916. "type": "string",
  20917. "enum": ["alpha", "beta", "deprecated", "active"]
  20918. },
  20919. "provider": {
  20920. "type": "object",
  20921. "properties": {
  20922. "npm": {
  20923. "type": "string"
  20924. },
  20925. "api": {
  20926. "type": "string"
  20927. }
  20928. },
  20929. "additionalProperties": false
  20930. },
  20931. "options": {
  20932. "type": "object"
  20933. },
  20934. "headers": {
  20935. "type": "object",
  20936. "additionalProperties": {
  20937. "type": "string"
  20938. }
  20939. },
  20940. "variants": {
  20941. "type": "object",
  20942. "additionalProperties": {
  20943. "type": "object",
  20944. "properties": {
  20945. "disabled": {
  20946. "type": "boolean"
  20947. }
  20948. },
  20949. "additionalProperties": {}
  20950. },
  20951. "description": "Variant-specific configuration"
  20952. }
  20953. },
  20954. "additionalProperties": false
  20955. }
  20956. }
  20957. },
  20958. "additionalProperties": false
  20959. },
  20960. "McpLocalConfig": {
  20961. "type": "object",
  20962. "properties": {
  20963. "type": {
  20964. "type": "string",
  20965. "enum": ["local"],
  20966. "description": "Type of MCP server connection"
  20967. },
  20968. "command": {
  20969. "type": "array",
  20970. "items": {
  20971. "type": "string"
  20972. },
  20973. "description": "Command and arguments to run the MCP server"
  20974. },
  20975. "cwd": {
  20976. "type": "string"
  20977. },
  20978. "environment": {
  20979. "type": "object",
  20980. "additionalProperties": {
  20981. "type": "string"
  20982. }
  20983. },
  20984. "enabled": {
  20985. "type": "boolean"
  20986. },
  20987. "timeout": {
  20988. "type": "integer",
  20989. "exclusiveMinimum": 0
  20990. }
  20991. },
  20992. "required": ["type", "command"],
  20993. "additionalProperties": false
  20994. },
  20995. "McpOAuthConfig": {
  20996. "type": "object",
  20997. "properties": {
  20998. "clientId": {
  20999. "type": "string"
  21000. },
  21001. "clientSecret": {
  21002. "type": "string"
  21003. },
  21004. "scope": {
  21005. "type": "string"
  21006. },
  21007. "callbackPort": {
  21008. "type": "integer",
  21009. "minimum": 1,
  21010. "maximum": 65535
  21011. },
  21012. "redirectUri": {
  21013. "type": "string"
  21014. }
  21015. },
  21016. "additionalProperties": false
  21017. },
  21018. "McpRemoteConfig": {
  21019. "type": "object",
  21020. "properties": {
  21021. "type": {
  21022. "type": "string",
  21023. "enum": ["remote"],
  21024. "description": "Type of MCP server connection"
  21025. },
  21026. "url": {
  21027. "type": "string",
  21028. "description": "URL of the remote MCP server"
  21029. },
  21030. "enabled": {
  21031. "type": "boolean"
  21032. },
  21033. "headers": {
  21034. "type": "object",
  21035. "additionalProperties": {
  21036. "type": "string"
  21037. }
  21038. },
  21039. "oauth": {
  21040. "anyOf": [
  21041. {
  21042. "$ref": "#/components/schemas/McpOAuthConfig"
  21043. },
  21044. {
  21045. "type": "boolean",
  21046. "enum": [false]
  21047. }
  21048. ],
  21049. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  21050. },
  21051. "timeout": {
  21052. "type": "integer",
  21053. "exclusiveMinimum": 0
  21054. }
  21055. },
  21056. "required": ["type", "url"],
  21057. "additionalProperties": false
  21058. },
  21059. "LayoutConfig": {
  21060. "type": "string",
  21061. "enum": ["auto", "stretch"],
  21062. "description": "@deprecated Always uses stretch layout."
  21063. },
  21064. "ImageAttachmentConfig": {
  21065. "type": "object",
  21066. "properties": {
  21067. "auto_resize": {
  21068. "type": "boolean"
  21069. },
  21070. "max_width": {
  21071. "type": "integer",
  21072. "exclusiveMinimum": 0
  21073. },
  21074. "max_height": {
  21075. "type": "integer",
  21076. "exclusiveMinimum": 0
  21077. },
  21078. "max_base64_bytes": {
  21079. "type": "integer",
  21080. "exclusiveMinimum": 0
  21081. }
  21082. },
  21083. "additionalProperties": false
  21084. },
  21085. "AttachmentConfig": {
  21086. "type": "object",
  21087. "properties": {
  21088. "image": {
  21089. "$ref": "#/components/schemas/ImageAttachmentConfig"
  21090. }
  21091. },
  21092. "additionalProperties": false
  21093. },
  21094. "Config": {
  21095. "type": "object",
  21096. "properties": {
  21097. "$schema": {
  21098. "type": "string"
  21099. },
  21100. "shell": {
  21101. "type": "string"
  21102. },
  21103. "logLevel": {
  21104. "$ref": "#/components/schemas/LogLevel"
  21105. },
  21106. "server": {
  21107. "$ref": "#/components/schemas/ServerConfig"
  21108. },
  21109. "command": {
  21110. "type": "object",
  21111. "additionalProperties": {
  21112. "type": "object",
  21113. "properties": {
  21114. "template": {
  21115. "type": "string"
  21116. },
  21117. "description": {
  21118. "type": "string"
  21119. },
  21120. "agent": {
  21121. "type": "string"
  21122. },
  21123. "model": {
  21124. "type": "string"
  21125. },
  21126. "variant": {
  21127. "type": "string"
  21128. },
  21129. "subtask": {
  21130. "type": "boolean"
  21131. }
  21132. },
  21133. "required": ["template"],
  21134. "additionalProperties": false
  21135. }
  21136. },
  21137. "skills": {
  21138. "type": "object",
  21139. "properties": {
  21140. "paths": {
  21141. "type": "array",
  21142. "items": {
  21143. "type": "string"
  21144. }
  21145. },
  21146. "urls": {
  21147. "type": "array",
  21148. "items": {
  21149. "type": "string"
  21150. }
  21151. }
  21152. },
  21153. "additionalProperties": false
  21154. },
  21155. "references": {
  21156. "type": "object",
  21157. "additionalProperties": {
  21158. "anyOf": [
  21159. {
  21160. "type": "string"
  21161. },
  21162. {
  21163. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21164. },
  21165. {
  21166. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21167. }
  21168. ]
  21169. }
  21170. },
  21171. "reference": {
  21172. "type": "object",
  21173. "additionalProperties": {
  21174. "anyOf": [
  21175. {
  21176. "type": "string"
  21177. },
  21178. {
  21179. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21180. },
  21181. {
  21182. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21183. }
  21184. ]
  21185. }
  21186. },
  21187. "watcher": {
  21188. "type": "object",
  21189. "properties": {
  21190. "ignore": {
  21191. "type": "array",
  21192. "items": {
  21193. "type": "string"
  21194. }
  21195. }
  21196. },
  21197. "additionalProperties": false
  21198. },
  21199. "snapshot": {
  21200. "type": "boolean"
  21201. },
  21202. "plugin": {
  21203. "type": "array",
  21204. "items": {
  21205. "anyOf": [
  21206. {
  21207. "type": "string"
  21208. },
  21209. {
  21210. "type": "array",
  21211. "prefixItems": [
  21212. {
  21213. "type": "string"
  21214. },
  21215. {
  21216. "type": "object"
  21217. }
  21218. ],
  21219. "maxItems": 2,
  21220. "minItems": 2
  21221. }
  21222. ]
  21223. }
  21224. },
  21225. "share": {
  21226. "type": "string",
  21227. "enum": ["manual", "auto", "disabled"]
  21228. },
  21229. "autoshare": {
  21230. "type": "boolean"
  21231. },
  21232. "autoupdate": {
  21233. "anyOf": [
  21234. {
  21235. "type": "boolean"
  21236. },
  21237. {
  21238. "type": "string",
  21239. "enum": ["notify"]
  21240. }
  21241. ],
  21242. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  21243. },
  21244. "disabled_providers": {
  21245. "type": "array",
  21246. "items": {
  21247. "type": "string"
  21248. }
  21249. },
  21250. "enabled_providers": {
  21251. "type": "array",
  21252. "items": {
  21253. "type": "string"
  21254. }
  21255. },
  21256. "model": {
  21257. "type": "string"
  21258. },
  21259. "small_model": {
  21260. "type": "string"
  21261. },
  21262. "default_agent": {
  21263. "type": "string"
  21264. },
  21265. "username": {
  21266. "type": "string"
  21267. },
  21268. "mode": {
  21269. "type": "object",
  21270. "properties": {
  21271. "build": {
  21272. "$ref": "#/components/schemas/AgentConfig"
  21273. },
  21274. "plan": {
  21275. "$ref": "#/components/schemas/AgentConfig"
  21276. }
  21277. },
  21278. "additionalProperties": {
  21279. "$ref": "#/components/schemas/AgentConfig"
  21280. }
  21281. },
  21282. "agent": {
  21283. "type": "object",
  21284. "properties": {
  21285. "plan": {
  21286. "$ref": "#/components/schemas/AgentConfig"
  21287. },
  21288. "build": {
  21289. "$ref": "#/components/schemas/AgentConfig"
  21290. },
  21291. "general": {
  21292. "$ref": "#/components/schemas/AgentConfig"
  21293. },
  21294. "explore": {
  21295. "$ref": "#/components/schemas/AgentConfig"
  21296. },
  21297. "title": {
  21298. "$ref": "#/components/schemas/AgentConfig"
  21299. },
  21300. "summary": {
  21301. "$ref": "#/components/schemas/AgentConfig"
  21302. },
  21303. "compaction": {
  21304. "$ref": "#/components/schemas/AgentConfig"
  21305. }
  21306. },
  21307. "additionalProperties": {
  21308. "$ref": "#/components/schemas/AgentConfig"
  21309. }
  21310. },
  21311. "provider": {
  21312. "type": "object",
  21313. "additionalProperties": {
  21314. "$ref": "#/components/schemas/ProviderConfig"
  21315. }
  21316. },
  21317. "mcp": {
  21318. "type": "object",
  21319. "additionalProperties": {
  21320. "anyOf": [
  21321. {
  21322. "$ref": "#/components/schemas/McpLocalConfig"
  21323. },
  21324. {
  21325. "$ref": "#/components/schemas/McpRemoteConfig"
  21326. },
  21327. {
  21328. "type": "object",
  21329. "properties": {
  21330. "enabled": {
  21331. "type": "boolean"
  21332. }
  21333. },
  21334. "required": ["enabled"],
  21335. "additionalProperties": false
  21336. }
  21337. ]
  21338. }
  21339. },
  21340. "formatter": {
  21341. "anyOf": [
  21342. {
  21343. "type": "boolean"
  21344. },
  21345. {
  21346. "type": "object",
  21347. "additionalProperties": {
  21348. "type": "object",
  21349. "properties": {
  21350. "disabled": {
  21351. "type": "boolean"
  21352. },
  21353. "command": {
  21354. "type": "array",
  21355. "items": {
  21356. "type": "string"
  21357. }
  21358. },
  21359. "environment": {
  21360. "type": "object",
  21361. "additionalProperties": {
  21362. "type": "string"
  21363. }
  21364. },
  21365. "extensions": {
  21366. "type": "array",
  21367. "items": {
  21368. "type": "string"
  21369. }
  21370. }
  21371. },
  21372. "additionalProperties": false
  21373. }
  21374. }
  21375. ],
  21376. "description": "Enable or configure formatters. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."
  21377. },
  21378. "lsp": {
  21379. "anyOf": [
  21380. {
  21381. "type": "boolean"
  21382. },
  21383. {
  21384. "type": "object",
  21385. "additionalProperties": {
  21386. "anyOf": [
  21387. {
  21388. "type": "object",
  21389. "properties": {
  21390. "disabled": {
  21391. "type": "boolean",
  21392. "enum": [true]
  21393. }
  21394. },
  21395. "required": ["disabled"],
  21396. "additionalProperties": false
  21397. },
  21398. {
  21399. "type": "object",
  21400. "properties": {
  21401. "command": {
  21402. "type": "array",
  21403. "items": {
  21404. "type": "string"
  21405. }
  21406. },
  21407. "extensions": {
  21408. "type": "array",
  21409. "items": {
  21410. "type": "string"
  21411. }
  21412. },
  21413. "disabled": {
  21414. "type": "boolean"
  21415. },
  21416. "env": {
  21417. "type": "object",
  21418. "additionalProperties": {
  21419. "type": "string"
  21420. }
  21421. },
  21422. "initialization": {
  21423. "type": "object"
  21424. }
  21425. },
  21426. "required": ["command"],
  21427. "additionalProperties": false
  21428. }
  21429. ]
  21430. }
  21431. }
  21432. ],
  21433. "description": "Enable or configure LSP servers. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."
  21434. },
  21435. "instructions": {
  21436. "type": "array",
  21437. "items": {
  21438. "type": "string"
  21439. }
  21440. },
  21441. "layout": {
  21442. "$ref": "#/components/schemas/LayoutConfig"
  21443. },
  21444. "permission": {
  21445. "$ref": "#/components/schemas/PermissionConfig"
  21446. },
  21447. "tools": {
  21448. "type": "object",
  21449. "additionalProperties": {
  21450. "type": "boolean"
  21451. }
  21452. },
  21453. "attachment": {
  21454. "$ref": "#/components/schemas/AttachmentConfig"
  21455. },
  21456. "enterprise": {
  21457. "type": "object",
  21458. "properties": {
  21459. "url": {
  21460. "type": "string"
  21461. }
  21462. },
  21463. "additionalProperties": false
  21464. },
  21465. "tool_output": {
  21466. "type": "object",
  21467. "properties": {
  21468. "max_lines": {
  21469. "type": "integer",
  21470. "exclusiveMinimum": 0
  21471. },
  21472. "max_bytes": {
  21473. "type": "integer",
  21474. "exclusiveMinimum": 0
  21475. }
  21476. },
  21477. "additionalProperties": false
  21478. },
  21479. "compaction": {
  21480. "type": "object",
  21481. "properties": {
  21482. "auto": {
  21483. "type": "boolean"
  21484. },
  21485. "prune": {
  21486. "type": "boolean"
  21487. },
  21488. "tail_turns": {
  21489. "type": "integer",
  21490. "minimum": 0
  21491. },
  21492. "preserve_recent_tokens": {
  21493. "type": "integer",
  21494. "minimum": 0
  21495. },
  21496. "reserved": {
  21497. "type": "integer",
  21498. "minimum": 0
  21499. }
  21500. },
  21501. "additionalProperties": false
  21502. },
  21503. "experimental": {
  21504. "type": "object",
  21505. "properties": {
  21506. "disable_paste_summary": {
  21507. "type": "boolean"
  21508. },
  21509. "batch_tool": {
  21510. "type": "boolean"
  21511. },
  21512. "openTelemetry": {
  21513. "type": "boolean"
  21514. },
  21515. "primary_tools": {
  21516. "type": "array",
  21517. "items": {
  21518. "type": "string"
  21519. }
  21520. },
  21521. "continue_loop_on_deny": {
  21522. "type": "boolean"
  21523. },
  21524. "mcp_timeout": {
  21525. "type": "integer",
  21526. "exclusiveMinimum": 0
  21527. },
  21528. "policies": {
  21529. "type": "array",
  21530. "items": {
  21531. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  21532. }
  21533. }
  21534. },
  21535. "additionalProperties": false
  21536. }
  21537. },
  21538. "additionalProperties": false
  21539. },
  21540. "Model": {
  21541. "type": "object",
  21542. "properties": {
  21543. "id": {
  21544. "type": "string"
  21545. },
  21546. "providerID": {
  21547. "type": "string"
  21548. },
  21549. "api": {
  21550. "type": "object",
  21551. "properties": {
  21552. "id": {
  21553. "type": "string"
  21554. },
  21555. "url": {
  21556. "type": "string"
  21557. },
  21558. "npm": {
  21559. "type": "string"
  21560. }
  21561. },
  21562. "required": ["id", "url", "npm"],
  21563. "additionalProperties": false
  21564. },
  21565. "name": {
  21566. "type": "string"
  21567. },
  21568. "family": {
  21569. "type": "string"
  21570. },
  21571. "capabilities": {
  21572. "type": "object",
  21573. "properties": {
  21574. "temperature": {
  21575. "type": "boolean"
  21576. },
  21577. "reasoning": {
  21578. "type": "boolean"
  21579. },
  21580. "attachment": {
  21581. "type": "boolean"
  21582. },
  21583. "toolcall": {
  21584. "type": "boolean"
  21585. },
  21586. "input": {
  21587. "type": "object",
  21588. "properties": {
  21589. "text": {
  21590. "type": "boolean"
  21591. },
  21592. "audio": {
  21593. "type": "boolean"
  21594. },
  21595. "image": {
  21596. "type": "boolean"
  21597. },
  21598. "video": {
  21599. "type": "boolean"
  21600. },
  21601. "pdf": {
  21602. "type": "boolean"
  21603. }
  21604. },
  21605. "required": ["text", "audio", "image", "video", "pdf"],
  21606. "additionalProperties": false
  21607. },
  21608. "output": {
  21609. "type": "object",
  21610. "properties": {
  21611. "text": {
  21612. "type": "boolean"
  21613. },
  21614. "audio": {
  21615. "type": "boolean"
  21616. },
  21617. "image": {
  21618. "type": "boolean"
  21619. },
  21620. "video": {
  21621. "type": "boolean"
  21622. },
  21623. "pdf": {
  21624. "type": "boolean"
  21625. }
  21626. },
  21627. "required": ["text", "audio", "image", "video", "pdf"],
  21628. "additionalProperties": false
  21629. },
  21630. "interleaved": {
  21631. "anyOf": [
  21632. {
  21633. "type": "boolean"
  21634. },
  21635. {
  21636. "type": "object",
  21637. "properties": {
  21638. "field": {
  21639. "type": "string",
  21640. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  21641. }
  21642. },
  21643. "required": ["field"],
  21644. "additionalProperties": false
  21645. }
  21646. ]
  21647. }
  21648. },
  21649. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21650. "additionalProperties": false
  21651. },
  21652. "cost": {
  21653. "type": "object",
  21654. "properties": {
  21655. "input": {
  21656. "type": "number"
  21657. },
  21658. "output": {
  21659. "type": "number"
  21660. },
  21661. "cache": {
  21662. "type": "object",
  21663. "properties": {
  21664. "read": {
  21665. "type": "number"
  21666. },
  21667. "write": {
  21668. "type": "number"
  21669. }
  21670. },
  21671. "required": ["read", "write"],
  21672. "additionalProperties": false
  21673. },
  21674. "tiers": {
  21675. "type": "array",
  21676. "items": {
  21677. "type": "object",
  21678. "properties": {
  21679. "input": {
  21680. "type": "number"
  21681. },
  21682. "output": {
  21683. "type": "number"
  21684. },
  21685. "cache": {
  21686. "type": "object",
  21687. "properties": {
  21688. "read": {
  21689. "type": "number"
  21690. },
  21691. "write": {
  21692. "type": "number"
  21693. }
  21694. },
  21695. "required": ["read", "write"],
  21696. "additionalProperties": false
  21697. },
  21698. "tier": {
  21699. "type": "object",
  21700. "properties": {
  21701. "type": {
  21702. "type": "string",
  21703. "enum": ["context"]
  21704. },
  21705. "size": {
  21706. "type": "number"
  21707. }
  21708. },
  21709. "required": ["type", "size"],
  21710. "additionalProperties": false
  21711. }
  21712. },
  21713. "required": ["input", "output", "cache", "tier"],
  21714. "additionalProperties": false
  21715. }
  21716. },
  21717. "experimentalOver200K": {
  21718. "type": "object",
  21719. "properties": {
  21720. "input": {
  21721. "type": "number"
  21722. },
  21723. "output": {
  21724. "type": "number"
  21725. },
  21726. "cache": {
  21727. "type": "object",
  21728. "properties": {
  21729. "read": {
  21730. "type": "number"
  21731. },
  21732. "write": {
  21733. "type": "number"
  21734. }
  21735. },
  21736. "required": ["read", "write"],
  21737. "additionalProperties": false
  21738. }
  21739. },
  21740. "required": ["input", "output", "cache"],
  21741. "additionalProperties": false
  21742. }
  21743. },
  21744. "required": ["input", "output", "cache"],
  21745. "additionalProperties": false
  21746. },
  21747. "limit": {
  21748. "type": "object",
  21749. "properties": {
  21750. "context": {
  21751. "type": "number"
  21752. },
  21753. "input": {
  21754. "type": "number"
  21755. },
  21756. "output": {
  21757. "type": "number"
  21758. }
  21759. },
  21760. "required": ["context", "output"],
  21761. "additionalProperties": false
  21762. },
  21763. "status": {
  21764. "type": "string",
  21765. "enum": ["alpha", "beta", "deprecated", "active"]
  21766. },
  21767. "options": {
  21768. "type": "object"
  21769. },
  21770. "headers": {
  21771. "type": "object",
  21772. "additionalProperties": {
  21773. "type": "string"
  21774. }
  21775. },
  21776. "release_date": {
  21777. "type": "string"
  21778. },
  21779. "variants": {
  21780. "type": "object",
  21781. "additionalProperties": {
  21782. "type": "object"
  21783. }
  21784. }
  21785. },
  21786. "required": [
  21787. "id",
  21788. "providerID",
  21789. "api",
  21790. "name",
  21791. "capabilities",
  21792. "cost",
  21793. "limit",
  21794. "status",
  21795. "options",
  21796. "headers",
  21797. "release_date"
  21798. ],
  21799. "additionalProperties": false
  21800. },
  21801. "Provider": {
  21802. "type": "object",
  21803. "properties": {
  21804. "id": {
  21805. "type": "string"
  21806. },
  21807. "name": {
  21808. "type": "string"
  21809. },
  21810. "source": {
  21811. "type": "string",
  21812. "enum": ["env", "config", "custom", "api"]
  21813. },
  21814. "env": {
  21815. "type": "array",
  21816. "items": {
  21817. "type": "string"
  21818. }
  21819. },
  21820. "key": {
  21821. "type": "string"
  21822. },
  21823. "options": {
  21824. "type": "object"
  21825. },
  21826. "models": {
  21827. "type": "object",
  21828. "additionalProperties": {
  21829. "$ref": "#/components/schemas/Model"
  21830. }
  21831. }
  21832. },
  21833. "required": ["id", "name", "source", "env", "options", "models"],
  21834. "additionalProperties": false
  21835. },
  21836. "ExperimentalCapabilities": {
  21837. "type": "object",
  21838. "properties": {
  21839. "backgroundSubagents": {
  21840. "type": "boolean"
  21841. }
  21842. },
  21843. "required": ["backgroundSubagents"],
  21844. "additionalProperties": false
  21845. },
  21846. "ConsoleState": {
  21847. "type": "object",
  21848. "properties": {
  21849. "consoleManagedProviders": {
  21850. "type": "array",
  21851. "items": {
  21852. "type": "string"
  21853. }
  21854. },
  21855. "activeOrgName": {
  21856. "type": "string"
  21857. },
  21858. "switchableOrgCount": {
  21859. "type": "integer",
  21860. "minimum": 0
  21861. }
  21862. },
  21863. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21864. "additionalProperties": false
  21865. },
  21866. "effect_HttpApiError_InternalServerError": {
  21867. "type": "object",
  21868. "properties": {
  21869. "_tag": {
  21870. "type": "string",
  21871. "enum": ["InternalServerError"]
  21872. }
  21873. },
  21874. "required": ["_tag"],
  21875. "additionalProperties": false
  21876. },
  21877. "ToolListItem": {
  21878. "type": "object",
  21879. "properties": {
  21880. "id": {
  21881. "type": "string"
  21882. },
  21883. "description": {
  21884. "type": "string"
  21885. },
  21886. "parameters": {}
  21887. },
  21888. "required": ["id", "description", "parameters"],
  21889. "additionalProperties": false
  21890. },
  21891. "ToolList": {
  21892. "type": "array",
  21893. "items": {
  21894. "$ref": "#/components/schemas/ToolListItem"
  21895. }
  21896. },
  21897. "ToolIDs": {
  21898. "type": "array",
  21899. "items": {
  21900. "type": "string"
  21901. }
  21902. },
  21903. "WorktreeError": {
  21904. "type": "object",
  21905. "properties": {
  21906. "name": {
  21907. "type": "string",
  21908. "enum": [
  21909. "WorktreeNotGitError",
  21910. "WorktreeNameGenerationFailedError",
  21911. "WorktreeCreateFailedError",
  21912. "WorktreeStartCommandFailedError",
  21913. "WorktreeRemoveFailedError",
  21914. "WorktreeResetFailedError",
  21915. "WorktreeListFailedError"
  21916. ]
  21917. },
  21918. "data": {
  21919. "type": "object",
  21920. "properties": {
  21921. "message": {
  21922. "type": "string"
  21923. }
  21924. },
  21925. "required": ["message"],
  21926. "additionalProperties": false
  21927. }
  21928. },
  21929. "required": ["name", "data"],
  21930. "additionalProperties": false
  21931. },
  21932. "WorktreeCreateInput": {
  21933. "type": "object",
  21934. "properties": {
  21935. "name": {
  21936. "type": "string"
  21937. },
  21938. "startCommand": {
  21939. "type": "string",
  21940. "description": "Additional startup script to run after the project's start command"
  21941. }
  21942. },
  21943. "additionalProperties": false
  21944. },
  21945. "Worktree": {
  21946. "type": "object",
  21947. "properties": {
  21948. "name": {
  21949. "type": "string"
  21950. },
  21951. "branch": {
  21952. "type": "string"
  21953. },
  21954. "directory": {
  21955. "type": "string"
  21956. }
  21957. },
  21958. "required": ["name", "directory"],
  21959. "additionalProperties": false
  21960. },
  21961. "WorktreeRemoveInput": {
  21962. "type": "object",
  21963. "properties": {
  21964. "directory": {
  21965. "type": "string"
  21966. }
  21967. },
  21968. "required": ["directory"],
  21969. "additionalProperties": false
  21970. },
  21971. "WorktreeResetInput": {
  21972. "type": "object",
  21973. "properties": {
  21974. "directory": {
  21975. "type": "string"
  21976. }
  21977. },
  21978. "required": ["directory"],
  21979. "additionalProperties": false
  21980. },
  21981. "ProjectSummary": {
  21982. "type": "object",
  21983. "properties": {
  21984. "id": {
  21985. "type": "string"
  21986. },
  21987. "name": {
  21988. "type": "string"
  21989. },
  21990. "worktree": {
  21991. "type": "string"
  21992. }
  21993. },
  21994. "required": ["id", "worktree"],
  21995. "additionalProperties": false
  21996. },
  21997. "GlobalSession": {
  21998. "type": "object",
  21999. "properties": {
  22000. "id": {
  22001. "type": "string",
  22002. "pattern": "^ses"
  22003. },
  22004. "slug": {
  22005. "type": "string"
  22006. },
  22007. "projectID": {
  22008. "type": "string"
  22009. },
  22010. "workspaceID": {
  22011. "type": "string",
  22012. "pattern": "^wrk"
  22013. },
  22014. "directory": {
  22015. "type": "string"
  22016. },
  22017. "path": {
  22018. "type": "string"
  22019. },
  22020. "parentID": {
  22021. "type": "string",
  22022. "pattern": "^ses"
  22023. },
  22024. "summary": {
  22025. "type": "object",
  22026. "properties": {
  22027. "additions": {
  22028. "type": "number"
  22029. },
  22030. "deletions": {
  22031. "type": "number"
  22032. },
  22033. "files": {
  22034. "type": "number"
  22035. },
  22036. "diffs": {
  22037. "type": "array",
  22038. "items": {
  22039. "$ref": "#/components/schemas/SnapshotFileDiff"
  22040. }
  22041. }
  22042. },
  22043. "required": ["additions", "deletions", "files"],
  22044. "additionalProperties": false
  22045. },
  22046. "cost": {
  22047. "type": "number"
  22048. },
  22049. "tokens": {
  22050. "type": "object",
  22051. "properties": {
  22052. "input": {
  22053. "type": "number"
  22054. },
  22055. "output": {
  22056. "type": "number"
  22057. },
  22058. "reasoning": {
  22059. "type": "number"
  22060. },
  22061. "cache": {
  22062. "type": "object",
  22063. "properties": {
  22064. "read": {
  22065. "type": "number"
  22066. },
  22067. "write": {
  22068. "type": "number"
  22069. }
  22070. },
  22071. "required": ["read", "write"],
  22072. "additionalProperties": false
  22073. }
  22074. },
  22075. "required": ["input", "output", "reasoning", "cache"],
  22076. "additionalProperties": false
  22077. },
  22078. "share": {
  22079. "type": "object",
  22080. "properties": {
  22081. "url": {
  22082. "type": "string"
  22083. }
  22084. },
  22085. "required": ["url"],
  22086. "additionalProperties": false
  22087. },
  22088. "title": {
  22089. "type": "string"
  22090. },
  22091. "agent": {
  22092. "type": "string"
  22093. },
  22094. "model": {
  22095. "type": "object",
  22096. "properties": {
  22097. "id": {
  22098. "type": "string"
  22099. },
  22100. "providerID": {
  22101. "type": "string"
  22102. },
  22103. "variant": {
  22104. "type": "string"
  22105. }
  22106. },
  22107. "required": ["id", "providerID"],
  22108. "additionalProperties": false
  22109. },
  22110. "version": {
  22111. "type": "string"
  22112. },
  22113. "metadata": {
  22114. "type": "object"
  22115. },
  22116. "time": {
  22117. "type": "object",
  22118. "properties": {
  22119. "created": {
  22120. "type": "integer",
  22121. "minimum": 0
  22122. },
  22123. "updated": {
  22124. "type": "integer",
  22125. "minimum": 0
  22126. },
  22127. "compacting": {
  22128. "type": "integer",
  22129. "minimum": 0
  22130. },
  22131. "archived": {
  22132. "type": "number"
  22133. }
  22134. },
  22135. "required": ["created", "updated"],
  22136. "additionalProperties": false
  22137. },
  22138. "permission": {
  22139. "$ref": "#/components/schemas/PermissionRuleset"
  22140. },
  22141. "revert": {
  22142. "type": "object",
  22143. "properties": {
  22144. "messageID": {
  22145. "type": "string",
  22146. "pattern": "^msg"
  22147. },
  22148. "partID": {
  22149. "type": "string",
  22150. "pattern": "^prt"
  22151. },
  22152. "snapshot": {
  22153. "type": "string"
  22154. },
  22155. "diff": {
  22156. "type": "string"
  22157. }
  22158. },
  22159. "required": ["messageID"],
  22160. "additionalProperties": false
  22161. },
  22162. "project": {
  22163. "anyOf": [
  22164. {
  22165. "$ref": "#/components/schemas/ProjectSummary"
  22166. },
  22167. {
  22168. "type": "null"
  22169. }
  22170. ]
  22171. }
  22172. },
  22173. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  22174. "additionalProperties": false
  22175. },
  22176. "McpResource": {
  22177. "type": "object",
  22178. "properties": {
  22179. "name": {
  22180. "type": "string"
  22181. },
  22182. "uri": {
  22183. "type": "string"
  22184. },
  22185. "description": {
  22186. "type": "string"
  22187. },
  22188. "mimeType": {
  22189. "type": "string"
  22190. },
  22191. "client": {
  22192. "type": "string"
  22193. }
  22194. },
  22195. "required": ["name", "uri", "client"],
  22196. "additionalProperties": false
  22197. },
  22198. "Symbol": {
  22199. "type": "object",
  22200. "properties": {
  22201. "name": {
  22202. "type": "string"
  22203. },
  22204. "kind": {
  22205. "type": "integer",
  22206. "minimum": 0
  22207. },
  22208. "location": {
  22209. "type": "object",
  22210. "properties": {
  22211. "uri": {
  22212. "type": "string"
  22213. },
  22214. "range": {
  22215. "$ref": "#/components/schemas/Range"
  22216. }
  22217. },
  22218. "required": ["uri", "range"],
  22219. "additionalProperties": false
  22220. }
  22221. },
  22222. "required": ["name", "kind", "location"],
  22223. "additionalProperties": false
  22224. },
  22225. "FileNode": {
  22226. "type": "object",
  22227. "properties": {
  22228. "name": {
  22229. "type": "string"
  22230. },
  22231. "path": {
  22232. "type": "string"
  22233. },
  22234. "absolute": {
  22235. "type": "string"
  22236. },
  22237. "type": {
  22238. "type": "string",
  22239. "enum": ["file", "directory"]
  22240. },
  22241. "ignored": {
  22242. "type": "boolean"
  22243. }
  22244. },
  22245. "required": ["name", "path", "absolute", "type", "ignored"],
  22246. "additionalProperties": false
  22247. },
  22248. "FileContent": {
  22249. "type": "object",
  22250. "properties": {
  22251. "type": {
  22252. "type": "string",
  22253. "enum": ["text", "binary"]
  22254. },
  22255. "content": {
  22256. "type": "string"
  22257. },
  22258. "diff": {
  22259. "type": "string"
  22260. },
  22261. "patch": {
  22262. "type": "object",
  22263. "properties": {
  22264. "oldFileName": {
  22265. "type": "string"
  22266. },
  22267. "newFileName": {
  22268. "type": "string"
  22269. },
  22270. "oldHeader": {
  22271. "type": "string"
  22272. },
  22273. "newHeader": {
  22274. "type": "string"
  22275. },
  22276. "hunks": {
  22277. "type": "array",
  22278. "items": {
  22279. "type": "object",
  22280. "properties": {
  22281. "oldStart": {
  22282. "type": "integer",
  22283. "minimum": 0
  22284. },
  22285. "oldLines": {
  22286. "type": "integer",
  22287. "minimum": 0
  22288. },
  22289. "newStart": {
  22290. "type": "integer",
  22291. "minimum": 0
  22292. },
  22293. "newLines": {
  22294. "type": "integer",
  22295. "minimum": 0
  22296. },
  22297. "lines": {
  22298. "type": "array",
  22299. "items": {
  22300. "type": "string"
  22301. }
  22302. }
  22303. },
  22304. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  22305. "additionalProperties": false
  22306. }
  22307. },
  22308. "index": {
  22309. "type": "string"
  22310. }
  22311. },
  22312. "required": ["oldFileName", "newFileName", "hunks"],
  22313. "additionalProperties": false
  22314. },
  22315. "encoding": {
  22316. "type": "string",
  22317. "enum": ["base64"]
  22318. },
  22319. "mimeType": {
  22320. "type": "string"
  22321. }
  22322. },
  22323. "required": ["type", "content"],
  22324. "additionalProperties": false
  22325. },
  22326. "File": {
  22327. "type": "object",
  22328. "properties": {
  22329. "path": {
  22330. "type": "string"
  22331. },
  22332. "added": {
  22333. "type": "integer",
  22334. "minimum": 0
  22335. },
  22336. "removed": {
  22337. "type": "integer",
  22338. "minimum": 0
  22339. },
  22340. "status": {
  22341. "type": "string",
  22342. "enum": ["added", "deleted", "modified"]
  22343. }
  22344. },
  22345. "required": ["path", "added", "removed", "status"],
  22346. "additionalProperties": false
  22347. },
  22348. "Path": {
  22349. "type": "object",
  22350. "properties": {
  22351. "home": {
  22352. "type": "string"
  22353. },
  22354. "state": {
  22355. "type": "string"
  22356. },
  22357. "config": {
  22358. "type": "string"
  22359. },
  22360. "worktree": {
  22361. "type": "string"
  22362. },
  22363. "directory": {
  22364. "type": "string"
  22365. }
  22366. },
  22367. "required": ["home", "state", "config", "worktree", "directory"],
  22368. "additionalProperties": false
  22369. },
  22370. "VcsInfo": {
  22371. "type": "object",
  22372. "properties": {
  22373. "branch": {
  22374. "type": "string"
  22375. },
  22376. "default_branch": {
  22377. "type": "string"
  22378. }
  22379. },
  22380. "additionalProperties": false
  22381. },
  22382. "VcsFileStatus": {
  22383. "type": "object",
  22384. "properties": {
  22385. "file": {
  22386. "type": "string"
  22387. },
  22388. "additions": {
  22389. "type": "number"
  22390. },
  22391. "deletions": {
  22392. "type": "number"
  22393. },
  22394. "status": {
  22395. "type": "string",
  22396. "enum": ["added", "deleted", "modified"]
  22397. }
  22398. },
  22399. "required": ["file", "additions", "deletions", "status"],
  22400. "additionalProperties": false
  22401. },
  22402. "VcsFileDiff": {
  22403. "type": "object",
  22404. "properties": {
  22405. "file": {
  22406. "type": "string"
  22407. },
  22408. "patch": {
  22409. "type": "string"
  22410. },
  22411. "additions": {
  22412. "type": "number"
  22413. },
  22414. "deletions": {
  22415. "type": "number"
  22416. },
  22417. "status": {
  22418. "type": "string",
  22419. "enum": ["added", "deleted", "modified"]
  22420. }
  22421. },
  22422. "required": ["file", "additions", "deletions"],
  22423. "additionalProperties": false
  22424. },
  22425. "VcsApplyError": {
  22426. "type": "object",
  22427. "properties": {
  22428. "name": {
  22429. "type": "string",
  22430. "enum": ["VcsApplyError"]
  22431. },
  22432. "data": {
  22433. "type": "object",
  22434. "properties": {
  22435. "message": {
  22436. "type": "string"
  22437. },
  22438. "reason": {
  22439. "type": "string",
  22440. "enum": ["non-git", "not-clean"]
  22441. }
  22442. },
  22443. "required": ["message", "reason"],
  22444. "additionalProperties": false
  22445. }
  22446. },
  22447. "required": ["name", "data"],
  22448. "additionalProperties": false
  22449. },
  22450. "Command": {
  22451. "type": "object",
  22452. "properties": {
  22453. "name": {
  22454. "type": "string"
  22455. },
  22456. "description": {
  22457. "type": "string"
  22458. },
  22459. "agent": {
  22460. "type": "string"
  22461. },
  22462. "model": {
  22463. "type": "string"
  22464. },
  22465. "source": {
  22466. "type": "string",
  22467. "enum": ["command", "mcp", "skill"]
  22468. },
  22469. "template": {
  22470. "type": "string"
  22471. },
  22472. "subtask": {
  22473. "type": "boolean"
  22474. },
  22475. "hints": {
  22476. "type": "array",
  22477. "items": {
  22478. "type": "string"
  22479. }
  22480. }
  22481. },
  22482. "required": ["name", "template", "hints"],
  22483. "additionalProperties": false
  22484. },
  22485. "Agent": {
  22486. "type": "object",
  22487. "properties": {
  22488. "name": {
  22489. "type": "string"
  22490. },
  22491. "description": {
  22492. "type": "string"
  22493. },
  22494. "mode": {
  22495. "type": "string",
  22496. "enum": ["subagent", "primary", "all"]
  22497. },
  22498. "native": {
  22499. "type": "boolean"
  22500. },
  22501. "hidden": {
  22502. "type": "boolean"
  22503. },
  22504. "topP": {
  22505. "type": "number"
  22506. },
  22507. "temperature": {
  22508. "type": "number"
  22509. },
  22510. "color": {
  22511. "type": "string"
  22512. },
  22513. "permission": {
  22514. "$ref": "#/components/schemas/PermissionRuleset"
  22515. },
  22516. "model": {
  22517. "type": "object",
  22518. "properties": {
  22519. "modelID": {
  22520. "type": "string"
  22521. },
  22522. "providerID": {
  22523. "type": "string"
  22524. }
  22525. },
  22526. "required": ["modelID", "providerID"],
  22527. "additionalProperties": false
  22528. },
  22529. "variant": {
  22530. "type": "string"
  22531. },
  22532. "prompt": {
  22533. "type": "string"
  22534. },
  22535. "options": {
  22536. "type": "object"
  22537. },
  22538. "steps": {
  22539. "type": "number"
  22540. }
  22541. },
  22542. "required": ["name", "mode", "permission", "options"],
  22543. "additionalProperties": false
  22544. },
  22545. "LSPStatus": {
  22546. "type": "object",
  22547. "properties": {
  22548. "id": {
  22549. "type": "string"
  22550. },
  22551. "name": {
  22552. "type": "string"
  22553. },
  22554. "root": {
  22555. "type": "string"
  22556. },
  22557. "status": {
  22558. "type": "string",
  22559. "enum": ["connected", "error"]
  22560. }
  22561. },
  22562. "required": ["id", "name", "root", "status"],
  22563. "additionalProperties": false
  22564. },
  22565. "FormatterStatus": {
  22566. "type": "object",
  22567. "properties": {
  22568. "name": {
  22569. "type": "string"
  22570. },
  22571. "extensions": {
  22572. "type": "array",
  22573. "items": {
  22574. "type": "string"
  22575. }
  22576. },
  22577. "enabled": {
  22578. "type": "boolean"
  22579. }
  22580. },
  22581. "required": ["name", "extensions", "enabled"],
  22582. "additionalProperties": false
  22583. },
  22584. "MCPStatusConnected": {
  22585. "type": "object",
  22586. "properties": {
  22587. "status": {
  22588. "type": "string",
  22589. "enum": ["connected"]
  22590. }
  22591. },
  22592. "required": ["status"],
  22593. "additionalProperties": false
  22594. },
  22595. "MCPStatusDisabled": {
  22596. "type": "object",
  22597. "properties": {
  22598. "status": {
  22599. "type": "string",
  22600. "enum": ["disabled"]
  22601. }
  22602. },
  22603. "required": ["status"],
  22604. "additionalProperties": false
  22605. },
  22606. "MCPStatusFailed": {
  22607. "type": "object",
  22608. "properties": {
  22609. "status": {
  22610. "type": "string",
  22611. "enum": ["failed"]
  22612. },
  22613. "error": {
  22614. "type": "string"
  22615. }
  22616. },
  22617. "required": ["status", "error"],
  22618. "additionalProperties": false
  22619. },
  22620. "MCPStatusNeedsAuth": {
  22621. "type": "object",
  22622. "properties": {
  22623. "status": {
  22624. "type": "string",
  22625. "enum": ["needs_auth"]
  22626. }
  22627. },
  22628. "required": ["status"],
  22629. "additionalProperties": false
  22630. },
  22631. "MCPStatusNeedsClientRegistration": {
  22632. "type": "object",
  22633. "properties": {
  22634. "status": {
  22635. "type": "string",
  22636. "enum": ["needs_client_registration"]
  22637. },
  22638. "error": {
  22639. "type": "string"
  22640. }
  22641. },
  22642. "required": ["status", "error"],
  22643. "additionalProperties": false
  22644. },
  22645. "MCPStatus": {
  22646. "anyOf": [
  22647. {
  22648. "$ref": "#/components/schemas/MCPStatusConnected"
  22649. },
  22650. {
  22651. "$ref": "#/components/schemas/MCPStatusDisabled"
  22652. },
  22653. {
  22654. "$ref": "#/components/schemas/MCPStatusFailed"
  22655. },
  22656. {
  22657. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22658. },
  22659. {
  22660. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22661. }
  22662. ]
  22663. },
  22664. "McpUnsupportedOAuthError": {
  22665. "type": "object",
  22666. "properties": {
  22667. "error": {
  22668. "type": "string"
  22669. }
  22670. },
  22671. "required": ["error"],
  22672. "additionalProperties": false
  22673. },
  22674. "McpServerNotFoundError": {
  22675. "type": "object",
  22676. "properties": {
  22677. "_tag": {
  22678. "type": "string",
  22679. "enum": ["McpServerNotFoundError"]
  22680. },
  22681. "name": {
  22682. "type": "string"
  22683. },
  22684. "message": {
  22685. "type": "string"
  22686. }
  22687. },
  22688. "required": ["_tag", "name", "message"],
  22689. "additionalProperties": false
  22690. },
  22691. "Project": {
  22692. "type": "object",
  22693. "properties": {
  22694. "id": {
  22695. "type": "string"
  22696. },
  22697. "worktree": {
  22698. "type": "string"
  22699. },
  22700. "vcs": {
  22701. "$ref": "#/components/schemas/ProjectVcs"
  22702. },
  22703. "name": {
  22704. "type": "string"
  22705. },
  22706. "icon": {
  22707. "$ref": "#/components/schemas/ProjectIcon"
  22708. },
  22709. "commands": {
  22710. "$ref": "#/components/schemas/ProjectCommands"
  22711. },
  22712. "time": {
  22713. "$ref": "#/components/schemas/ProjectTime"
  22714. },
  22715. "sandboxes": {
  22716. "type": "array",
  22717. "items": {
  22718. "type": "string"
  22719. }
  22720. }
  22721. },
  22722. "required": ["id", "worktree", "time", "sandboxes"],
  22723. "additionalProperties": false
  22724. },
  22725. "ProjectNotFoundError": {
  22726. "type": "object",
  22727. "properties": {
  22728. "_tag": {
  22729. "type": "string",
  22730. "enum": ["ProjectNotFoundError"]
  22731. },
  22732. "projectID": {
  22733. "type": "string"
  22734. },
  22735. "message": {
  22736. "type": "string"
  22737. }
  22738. },
  22739. "required": ["_tag", "projectID", "message"],
  22740. "additionalProperties": false
  22741. },
  22742. "PtyNotFoundError": {
  22743. "type": "object",
  22744. "properties": {
  22745. "_tag": {
  22746. "type": "string",
  22747. "enum": ["PtyNotFoundError"]
  22748. },
  22749. "ptyID": {
  22750. "type": "string"
  22751. },
  22752. "message": {
  22753. "type": "string"
  22754. }
  22755. },
  22756. "required": ["_tag", "ptyID", "message"],
  22757. "additionalProperties": false
  22758. },
  22759. "PtyForbiddenError": {
  22760. "type": "object",
  22761. "properties": {
  22762. "_tag": {
  22763. "type": "string",
  22764. "enum": ["PtyForbiddenError"]
  22765. },
  22766. "message": {
  22767. "type": "string"
  22768. }
  22769. },
  22770. "required": ["_tag", "message"],
  22771. "additionalProperties": false
  22772. },
  22773. "QuestionRequest": {
  22774. "type": "object",
  22775. "properties": {
  22776. "id": {
  22777. "type": "string",
  22778. "pattern": "^que"
  22779. },
  22780. "sessionID": {
  22781. "type": "string",
  22782. "pattern": "^ses"
  22783. },
  22784. "questions": {
  22785. "type": "array",
  22786. "items": {
  22787. "$ref": "#/components/schemas/QuestionInfo"
  22788. },
  22789. "description": "Questions to ask"
  22790. },
  22791. "tool": {
  22792. "$ref": "#/components/schemas/QuestionTool"
  22793. }
  22794. },
  22795. "required": ["id", "sessionID", "questions"],
  22796. "additionalProperties": false
  22797. },
  22798. "QuestionNotFoundError": {
  22799. "type": "object",
  22800. "properties": {
  22801. "_tag": {
  22802. "type": "string",
  22803. "enum": ["QuestionNotFoundError"]
  22804. },
  22805. "requestID": {
  22806. "type": "string"
  22807. },
  22808. "message": {
  22809. "type": "string"
  22810. }
  22811. },
  22812. "required": ["_tag", "requestID", "message"],
  22813. "additionalProperties": false
  22814. },
  22815. "PermissionRequest": {
  22816. "type": "object",
  22817. "properties": {
  22818. "id": {
  22819. "type": "string",
  22820. "pattern": "^per"
  22821. },
  22822. "sessionID": {
  22823. "type": "string",
  22824. "pattern": "^ses"
  22825. },
  22826. "permission": {
  22827. "type": "string"
  22828. },
  22829. "patterns": {
  22830. "type": "array",
  22831. "items": {
  22832. "type": "string"
  22833. }
  22834. },
  22835. "metadata": {
  22836. "type": "object"
  22837. },
  22838. "always": {
  22839. "type": "array",
  22840. "items": {
  22841. "type": "string"
  22842. }
  22843. },
  22844. "tool": {
  22845. "type": "object",
  22846. "properties": {
  22847. "messageID": {
  22848. "type": "string"
  22849. },
  22850. "callID": {
  22851. "type": "string"
  22852. }
  22853. },
  22854. "required": ["messageID", "callID"],
  22855. "additionalProperties": false
  22856. }
  22857. },
  22858. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22859. "additionalProperties": false
  22860. },
  22861. "PermissionNotFoundError": {
  22862. "type": "object",
  22863. "properties": {
  22864. "_tag": {
  22865. "type": "string",
  22866. "enum": ["PermissionNotFoundError"]
  22867. },
  22868. "requestID": {
  22869. "type": "string"
  22870. },
  22871. "message": {
  22872. "type": "string"
  22873. }
  22874. },
  22875. "required": ["_tag", "requestID", "message"],
  22876. "additionalProperties": false
  22877. },
  22878. "ProviderAuthMethod": {
  22879. "type": "object",
  22880. "properties": {
  22881. "type": {
  22882. "type": "string",
  22883. "enum": ["oauth", "api"]
  22884. },
  22885. "label": {
  22886. "type": "string"
  22887. },
  22888. "prompts": {
  22889. "type": "array",
  22890. "items": {
  22891. "anyOf": [
  22892. {
  22893. "type": "object",
  22894. "properties": {
  22895. "type": {
  22896. "type": "string",
  22897. "enum": ["text"]
  22898. },
  22899. "key": {
  22900. "type": "string"
  22901. },
  22902. "message": {
  22903. "type": "string"
  22904. },
  22905. "placeholder": {
  22906. "type": "string"
  22907. },
  22908. "when": {
  22909. "type": "object",
  22910. "properties": {
  22911. "key": {
  22912. "type": "string"
  22913. },
  22914. "op": {
  22915. "type": "string",
  22916. "enum": ["eq", "neq"]
  22917. },
  22918. "value": {
  22919. "type": "string"
  22920. }
  22921. },
  22922. "required": ["key", "op", "value"],
  22923. "additionalProperties": false
  22924. }
  22925. },
  22926. "required": ["type", "key", "message"],
  22927. "additionalProperties": false
  22928. },
  22929. {
  22930. "type": "object",
  22931. "properties": {
  22932. "type": {
  22933. "type": "string",
  22934. "enum": ["select"]
  22935. },
  22936. "key": {
  22937. "type": "string"
  22938. },
  22939. "message": {
  22940. "type": "string"
  22941. },
  22942. "options": {
  22943. "type": "array",
  22944. "items": {
  22945. "type": "object",
  22946. "properties": {
  22947. "label": {
  22948. "type": "string"
  22949. },
  22950. "value": {
  22951. "type": "string"
  22952. },
  22953. "hint": {
  22954. "type": "string"
  22955. }
  22956. },
  22957. "required": ["label", "value"],
  22958. "additionalProperties": false
  22959. }
  22960. },
  22961. "when": {
  22962. "type": "object",
  22963. "properties": {
  22964. "key": {
  22965. "type": "string"
  22966. },
  22967. "op": {
  22968. "type": "string",
  22969. "enum": ["eq", "neq"]
  22970. },
  22971. "value": {
  22972. "type": "string"
  22973. }
  22974. },
  22975. "required": ["key", "op", "value"],
  22976. "additionalProperties": false
  22977. }
  22978. },
  22979. "required": ["type", "key", "message", "options"],
  22980. "additionalProperties": false
  22981. }
  22982. ]
  22983. }
  22984. }
  22985. },
  22986. "required": ["type", "label"],
  22987. "additionalProperties": false
  22988. },
  22989. "ProviderAuthAuthorization": {
  22990. "type": "object",
  22991. "properties": {
  22992. "url": {
  22993. "type": "string"
  22994. },
  22995. "method": {
  22996. "type": "string",
  22997. "enum": ["auto", "code"]
  22998. },
  22999. "instructions": {
  23000. "type": "string"
  23001. }
  23002. },
  23003. "required": ["url", "method", "instructions"],
  23004. "additionalProperties": false
  23005. },
  23006. "ProviderAuthError1": {
  23007. "type": "object",
  23008. "properties": {
  23009. "name": {
  23010. "type": "string",
  23011. "enum": [
  23012. "BadRequest",
  23013. "ProviderAuthOauthMissing",
  23014. "ProviderAuthOauthCodeMissing",
  23015. "ProviderAuthOauthCallbackFailed",
  23016. "ProviderAuthValidationFailed"
  23017. ]
  23018. },
  23019. "data": {
  23020. "type": "object",
  23021. "properties": {
  23022. "providerID": {
  23023. "type": "string"
  23024. },
  23025. "field": {
  23026. "type": "string"
  23027. },
  23028. "message": {
  23029. "type": "string"
  23030. },
  23031. "kind": {
  23032. "type": "string"
  23033. }
  23034. },
  23035. "additionalProperties": false
  23036. }
  23037. },
  23038. "required": ["name", "data"],
  23039. "additionalProperties": false
  23040. },
  23041. "NotFoundError": {
  23042. "type": "object",
  23043. "required": ["name", "data"],
  23044. "properties": {
  23045. "name": {
  23046. "type": "string",
  23047. "enum": ["NotFoundError"]
  23048. },
  23049. "data": {
  23050. "type": "object",
  23051. "required": ["message"],
  23052. "properties": {
  23053. "message": {
  23054. "type": "string"
  23055. }
  23056. }
  23057. }
  23058. }
  23059. },
  23060. "TextPartInput": {
  23061. "type": "object",
  23062. "properties": {
  23063. "id": {
  23064. "type": "string",
  23065. "pattern": "^prt"
  23066. },
  23067. "type": {
  23068. "type": "string",
  23069. "enum": ["text"]
  23070. },
  23071. "text": {
  23072. "type": "string"
  23073. },
  23074. "synthetic": {
  23075. "type": "boolean"
  23076. },
  23077. "ignored": {
  23078. "type": "boolean"
  23079. },
  23080. "time": {
  23081. "type": "object",
  23082. "properties": {
  23083. "start": {
  23084. "type": "integer",
  23085. "minimum": 0
  23086. },
  23087. "end": {
  23088. "type": "integer",
  23089. "minimum": 0
  23090. }
  23091. },
  23092. "required": ["start"],
  23093. "additionalProperties": false
  23094. },
  23095. "metadata": {
  23096. "type": "object"
  23097. }
  23098. },
  23099. "required": ["type", "text"],
  23100. "additionalProperties": false
  23101. },
  23102. "FilePartInput": {
  23103. "type": "object",
  23104. "properties": {
  23105. "id": {
  23106. "type": "string",
  23107. "pattern": "^prt"
  23108. },
  23109. "type": {
  23110. "type": "string",
  23111. "enum": ["file"]
  23112. },
  23113. "mime": {
  23114. "type": "string"
  23115. },
  23116. "filename": {
  23117. "type": "string"
  23118. },
  23119. "url": {
  23120. "type": "string"
  23121. },
  23122. "source": {
  23123. "$ref": "#/components/schemas/FilePartSource"
  23124. }
  23125. },
  23126. "required": ["type", "mime", "url"],
  23127. "additionalProperties": false
  23128. },
  23129. "AgentPartInput": {
  23130. "type": "object",
  23131. "properties": {
  23132. "id": {
  23133. "type": "string",
  23134. "pattern": "^prt"
  23135. },
  23136. "type": {
  23137. "type": "string",
  23138. "enum": ["agent"]
  23139. },
  23140. "name": {
  23141. "type": "string"
  23142. },
  23143. "source": {
  23144. "type": "object",
  23145. "properties": {
  23146. "value": {
  23147. "type": "string"
  23148. },
  23149. "start": {
  23150. "type": "integer",
  23151. "minimum": 0
  23152. },
  23153. "end": {
  23154. "type": "integer",
  23155. "minimum": 0
  23156. }
  23157. },
  23158. "required": ["value", "start", "end"],
  23159. "additionalProperties": false
  23160. }
  23161. },
  23162. "required": ["type", "name"],
  23163. "additionalProperties": false
  23164. },
  23165. "SubtaskPartInput": {
  23166. "type": "object",
  23167. "properties": {
  23168. "id": {
  23169. "type": "string",
  23170. "pattern": "^prt"
  23171. },
  23172. "type": {
  23173. "type": "string",
  23174. "enum": ["subtask"]
  23175. },
  23176. "prompt": {
  23177. "type": "string"
  23178. },
  23179. "description": {
  23180. "type": "string"
  23181. },
  23182. "agent": {
  23183. "type": "string"
  23184. },
  23185. "model": {
  23186. "type": "object",
  23187. "properties": {
  23188. "providerID": {
  23189. "type": "string"
  23190. },
  23191. "modelID": {
  23192. "type": "string"
  23193. }
  23194. },
  23195. "required": ["providerID", "modelID"],
  23196. "additionalProperties": false
  23197. },
  23198. "command": {
  23199. "type": "string"
  23200. }
  23201. },
  23202. "required": ["type", "prompt", "description", "agent"],
  23203. "additionalProperties": false
  23204. },
  23205. "SessionBusyError": {
  23206. "type": "object",
  23207. "properties": {
  23208. "_tag": {
  23209. "type": "string",
  23210. "enum": ["SessionBusyError"]
  23211. },
  23212. "sessionID": {
  23213. "type": "string"
  23214. },
  23215. "message": {
  23216. "type": "string"
  23217. }
  23218. },
  23219. "required": ["_tag", "sessionID", "message"],
  23220. "additionalProperties": false
  23221. },
  23222. "EventTuiPromptAppend": {
  23223. "type": "object",
  23224. "properties": {
  23225. "type": {
  23226. "type": "string",
  23227. "enum": ["tui.prompt.append"]
  23228. },
  23229. "properties": {
  23230. "type": "object",
  23231. "properties": {
  23232. "text": {
  23233. "type": "string"
  23234. }
  23235. },
  23236. "required": ["text"],
  23237. "additionalProperties": false
  23238. }
  23239. },
  23240. "required": ["type", "properties"],
  23241. "additionalProperties": false
  23242. },
  23243. "EventTuiCommandExecute": {
  23244. "type": "object",
  23245. "properties": {
  23246. "type": {
  23247. "type": "string",
  23248. "enum": ["tui.command.execute"]
  23249. },
  23250. "properties": {
  23251. "type": "object",
  23252. "properties": {
  23253. "command": {
  23254. "anyOf": [
  23255. {
  23256. "type": "string",
  23257. "enum": [
  23258. "session.list",
  23259. "session.new",
  23260. "session.share",
  23261. "session.interrupt",
  23262. "session.compact",
  23263. "session.page.up",
  23264. "session.page.down",
  23265. "session.line.up",
  23266. "session.line.down",
  23267. "session.half.page.up",
  23268. "session.half.page.down",
  23269. "session.first",
  23270. "session.last",
  23271. "prompt.clear",
  23272. "prompt.submit",
  23273. "agent.cycle"
  23274. ]
  23275. },
  23276. {
  23277. "type": "string"
  23278. }
  23279. ]
  23280. }
  23281. },
  23282. "required": ["command"],
  23283. "additionalProperties": false
  23284. }
  23285. },
  23286. "required": ["type", "properties"],
  23287. "additionalProperties": false
  23288. },
  23289. "EventTuiToastShow": {
  23290. "type": "object",
  23291. "properties": {
  23292. "type": {
  23293. "type": "string",
  23294. "enum": ["tui.toast.show"]
  23295. },
  23296. "properties": {
  23297. "type": "object",
  23298. "properties": {
  23299. "title": {
  23300. "type": "string"
  23301. },
  23302. "message": {
  23303. "type": "string"
  23304. },
  23305. "variant": {
  23306. "type": "string",
  23307. "enum": ["info", "success", "warning", "error"]
  23308. },
  23309. "duration": {
  23310. "type": "integer",
  23311. "exclusiveMinimum": 0
  23312. }
  23313. },
  23314. "required": ["message", "variant"],
  23315. "additionalProperties": false
  23316. }
  23317. },
  23318. "required": ["type", "properties"],
  23319. "additionalProperties": false
  23320. },
  23321. "EventTuiSessionSelect": {
  23322. "type": "object",
  23323. "properties": {
  23324. "type": {
  23325. "type": "string",
  23326. "enum": ["tui.session.select"]
  23327. },
  23328. "properties": {
  23329. "type": "object",
  23330. "properties": {
  23331. "sessionID": {
  23332. "type": "string",
  23333. "pattern": "^ses",
  23334. "description": "Session ID to navigate to"
  23335. }
  23336. },
  23337. "required": ["sessionID"],
  23338. "additionalProperties": false
  23339. }
  23340. },
  23341. "required": ["type", "properties"],
  23342. "additionalProperties": false
  23343. },
  23344. "Workspace": {
  23345. "type": "object",
  23346. "properties": {
  23347. "id": {
  23348. "type": "string",
  23349. "pattern": "^wrk"
  23350. },
  23351. "type": {
  23352. "type": "string"
  23353. },
  23354. "name": {
  23355. "type": "string"
  23356. },
  23357. "branch": {
  23358. "anyOf": [
  23359. {
  23360. "type": "string"
  23361. },
  23362. {
  23363. "type": "null"
  23364. }
  23365. ]
  23366. },
  23367. "directory": {
  23368. "anyOf": [
  23369. {
  23370. "type": "string"
  23371. },
  23372. {
  23373. "type": "null"
  23374. }
  23375. ]
  23376. },
  23377. "extra": {
  23378. "anyOf": [
  23379. {},
  23380. {
  23381. "type": "null"
  23382. }
  23383. ]
  23384. },
  23385. "projectID": {
  23386. "type": "string"
  23387. },
  23388. "timeUsed": {
  23389. "anyOf": [
  23390. {
  23391. "type": "number"
  23392. },
  23393. {
  23394. "type": "string",
  23395. "enum": ["NaN"]
  23396. },
  23397. {
  23398. "type": "string",
  23399. "enum": ["Infinity"]
  23400. },
  23401. {
  23402. "type": "string",
  23403. "enum": ["-Infinity"]
  23404. },
  23405. {
  23406. "type": "string",
  23407. "enum": ["Infinity", "-Infinity", "NaN"]
  23408. }
  23409. ]
  23410. }
  23411. },
  23412. "required": ["id", "type", "name", "projectID", "timeUsed"],
  23413. "additionalProperties": false
  23414. },
  23415. "WorkspaceCreateError": {
  23416. "type": "object",
  23417. "properties": {
  23418. "name": {
  23419. "type": "string",
  23420. "enum": ["WorkspaceCreateError"]
  23421. },
  23422. "data": {
  23423. "type": "object",
  23424. "properties": {
  23425. "message": {
  23426. "type": "string"
  23427. }
  23428. },
  23429. "required": ["message"],
  23430. "additionalProperties": false
  23431. }
  23432. },
  23433. "required": ["name", "data"],
  23434. "additionalProperties": false
  23435. },
  23436. "WorkspaceWarpError": {
  23437. "type": "object",
  23438. "properties": {
  23439. "name": {
  23440. "type": "string",
  23441. "enum": ["WorkspaceWarpError"]
  23442. },
  23443. "data": {
  23444. "type": "object",
  23445. "properties": {
  23446. "message": {
  23447. "type": "string"
  23448. }
  23449. },
  23450. "required": ["message"],
  23451. "additionalProperties": false
  23452. }
  23453. },
  23454. "required": ["name", "data"],
  23455. "additionalProperties": false
  23456. },
  23457. "UnauthorizedError": {
  23458. "type": "object",
  23459. "properties": {
  23460. "_tag": {
  23461. "type": "string",
  23462. "enum": ["UnauthorizedError"]
  23463. },
  23464. "message": {
  23465. "type": "string"
  23466. }
  23467. },
  23468. "required": ["_tag", "message"],
  23469. "additionalProperties": false
  23470. },
  23471. "SessionsResponse": {
  23472. "type": "object",
  23473. "properties": {
  23474. "data": {
  23475. "type": "array",
  23476. "items": {
  23477. "$ref": "#/components/schemas/SessionV2Info"
  23478. }
  23479. },
  23480. "cursor": {
  23481. "type": "object",
  23482. "properties": {
  23483. "previous": {
  23484. "type": "string"
  23485. },
  23486. "next": {
  23487. "type": "string"
  23488. }
  23489. },
  23490. "additionalProperties": false
  23491. }
  23492. },
  23493. "required": ["data", "cursor"],
  23494. "additionalProperties": false
  23495. },
  23496. "InvalidCursorError": {
  23497. "type": "object",
  23498. "properties": {
  23499. "_tag": {
  23500. "type": "string",
  23501. "enum": ["InvalidCursorError"]
  23502. },
  23503. "message": {
  23504. "type": "string"
  23505. }
  23506. },
  23507. "required": ["_tag", "message"],
  23508. "additionalProperties": false
  23509. },
  23510. "SessionActive": {
  23511. "type": "object",
  23512. "properties": {
  23513. "type": {
  23514. "type": "string",
  23515. "enum": ["running"]
  23516. }
  23517. },
  23518. "required": ["type"],
  23519. "additionalProperties": false
  23520. },
  23521. "SessionNotFoundError": {
  23522. "type": "object",
  23523. "properties": {
  23524. "_tag": {
  23525. "type": "string",
  23526. "enum": ["SessionNotFoundError"]
  23527. },
  23528. "sessionID": {
  23529. "type": "string"
  23530. },
  23531. "message": {
  23532. "type": "string"
  23533. }
  23534. },
  23535. "required": ["_tag", "sessionID", "message"],
  23536. "additionalProperties": false
  23537. },
  23538. "PromptInput": {
  23539. "type": "object",
  23540. "properties": {
  23541. "text": {
  23542. "type": "string"
  23543. },
  23544. "files": {
  23545. "type": "array",
  23546. "items": {
  23547. "$ref": "#/components/schemas/PromptInputFileAttachment"
  23548. }
  23549. },
  23550. "agents": {
  23551. "type": "array",
  23552. "items": {
  23553. "$ref": "#/components/schemas/PromptAgentAttachment"
  23554. }
  23555. }
  23556. },
  23557. "required": ["text"],
  23558. "additionalProperties": false
  23559. },
  23560. "ConflictError": {
  23561. "type": "object",
  23562. "properties": {
  23563. "_tag": {
  23564. "type": "string",
  23565. "enum": ["ConflictError"]
  23566. },
  23567. "message": {
  23568. "type": "string"
  23569. },
  23570. "resource": {
  23571. "type": "string"
  23572. }
  23573. },
  23574. "required": ["_tag", "message"],
  23575. "additionalProperties": false
  23576. },
  23577. "ServiceUnavailableError": {
  23578. "type": "object",
  23579. "properties": {
  23580. "_tag": {
  23581. "type": "string",
  23582. "enum": ["ServiceUnavailableError"]
  23583. },
  23584. "message": {
  23585. "type": "string"
  23586. },
  23587. "service": {
  23588. "type": "string"
  23589. }
  23590. },
  23591. "required": ["_tag", "message"],
  23592. "additionalProperties": false
  23593. },
  23594. "MessageNotFoundError": {
  23595. "type": "object",
  23596. "properties": {
  23597. "_tag": {
  23598. "type": "string",
  23599. "enum": ["MessageNotFoundError"]
  23600. },
  23601. "sessionID": {
  23602. "type": "string"
  23603. },
  23604. "messageID": {
  23605. "type": "string"
  23606. },
  23607. "message": {
  23608. "type": "string"
  23609. }
  23610. },
  23611. "required": ["_tag", "sessionID", "messageID", "message"],
  23612. "additionalProperties": false
  23613. },
  23614. "UnknownError1": {
  23615. "type": "object",
  23616. "properties": {
  23617. "_tag": {
  23618. "type": "string",
  23619. "enum": ["UnknownError"]
  23620. },
  23621. "message": {
  23622. "type": "string"
  23623. },
  23624. "ref": {
  23625. "type": "string"
  23626. }
  23627. },
  23628. "required": ["_tag", "message"],
  23629. "additionalProperties": false
  23630. },
  23631. "SessionDurableEvent": {
  23632. "oneOf": [
  23633. {
  23634. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  23635. },
  23636. {
  23637. "$ref": "#/components/schemas/SessionNextModelSwitched"
  23638. },
  23639. {
  23640. "$ref": "#/components/schemas/SessionNextMoved"
  23641. },
  23642. {
  23643. "$ref": "#/components/schemas/SessionNextPrompted"
  23644. },
  23645. {
  23646. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  23647. },
  23648. {
  23649. "$ref": "#/components/schemas/SessionNextContextUpdated"
  23650. },
  23651. {
  23652. "$ref": "#/components/schemas/SessionNextSynthetic"
  23653. },
  23654. {
  23655. "$ref": "#/components/schemas/SessionNextShellStarted"
  23656. },
  23657. {
  23658. "$ref": "#/components/schemas/SessionNextShellEnded"
  23659. },
  23660. {
  23661. "$ref": "#/components/schemas/SessionNextStepStarted"
  23662. },
  23663. {
  23664. "$ref": "#/components/schemas/SessionNextStepEnded"
  23665. },
  23666. {
  23667. "$ref": "#/components/schemas/SessionNextStepFailed"
  23668. },
  23669. {
  23670. "$ref": "#/components/schemas/SessionNextTextStarted"
  23671. },
  23672. {
  23673. "$ref": "#/components/schemas/SessionNextTextEnded"
  23674. },
  23675. {
  23676. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  23677. },
  23678. {
  23679. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  23680. },
  23681. {
  23682. "$ref": "#/components/schemas/SessionNextToolCalled"
  23683. },
  23684. {
  23685. "$ref": "#/components/schemas/SessionNextToolProgress"
  23686. },
  23687. {
  23688. "$ref": "#/components/schemas/SessionNextToolSuccess"
  23689. },
  23690. {
  23691. "$ref": "#/components/schemas/SessionNextToolFailed"
  23692. },
  23693. {
  23694. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  23695. },
  23696. {
  23697. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  23698. },
  23699. {
  23700. "$ref": "#/components/schemas/SessionNextRetried"
  23701. },
  23702. {
  23703. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  23704. },
  23705. {
  23706. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  23707. },
  23708. {
  23709. "$ref": "#/components/schemas/SessionNextRevertStaged"
  23710. },
  23711. {
  23712. "$ref": "#/components/schemas/SessionNextRevertCleared"
  23713. },
  23714. {
  23715. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  23716. }
  23717. ]
  23718. },
  23719. "SessionHistory": {
  23720. "type": "object",
  23721. "properties": {
  23722. "data": {
  23723. "type": "array",
  23724. "items": {
  23725. "$ref": "#/components/schemas/SessionDurableEvent"
  23726. }
  23727. },
  23728. "hasMore": {
  23729. "type": "boolean"
  23730. }
  23731. },
  23732. "required": ["data", "hasMore"],
  23733. "additionalProperties": false
  23734. },
  23735. "SessionDurableEventStream": {
  23736. "type": "string",
  23737. "contentSchema": {
  23738. "$ref": "#/components/schemas/SessionDurableEvent"
  23739. },
  23740. "contentMediaType": "application/json"
  23741. },
  23742. "SessionMessagesResponse": {
  23743. "type": "object",
  23744. "properties": {
  23745. "data": {
  23746. "type": "array",
  23747. "items": {
  23748. "$ref": "#/components/schemas/SessionMessage"
  23749. }
  23750. },
  23751. "cursor": {
  23752. "type": "object",
  23753. "properties": {
  23754. "previous": {
  23755. "type": "string"
  23756. },
  23757. "next": {
  23758. "type": "string"
  23759. }
  23760. },
  23761. "additionalProperties": false
  23762. }
  23763. },
  23764. "required": ["data", "cursor"],
  23765. "additionalProperties": false
  23766. },
  23767. "ProviderNotFoundError": {
  23768. "type": "object",
  23769. "properties": {
  23770. "_tag": {
  23771. "type": "string",
  23772. "enum": ["ProviderNotFoundError"]
  23773. },
  23774. "providerID": {
  23775. "type": "string"
  23776. },
  23777. "message": {
  23778. "type": "string"
  23779. }
  23780. },
  23781. "required": ["_tag", "providerID", "message"],
  23782. "additionalProperties": false
  23783. },
  23784. "OutputFormat1": {
  23785. "anyOf": [
  23786. {
  23787. "type": "object",
  23788. "properties": {
  23789. "type": {
  23790. "type": "string",
  23791. "enum": ["text"]
  23792. }
  23793. },
  23794. "required": ["type"],
  23795. "additionalProperties": false
  23796. },
  23797. {
  23798. "type": "object",
  23799. "properties": {
  23800. "type": {
  23801. "type": "string",
  23802. "enum": ["json_schema"]
  23803. },
  23804. "schema": {
  23805. "$ref": "#/components/schemas/JSONSchema"
  23806. },
  23807. "retryCount": {
  23808. "type": "integer",
  23809. "minimum": 0
  23810. }
  23811. },
  23812. "required": ["type", "schema"],
  23813. "additionalProperties": false
  23814. }
  23815. ]
  23816. },
  23817. "session.status": {
  23818. "type": "object",
  23819. "properties": {
  23820. "id": {
  23821. "type": "string",
  23822. "pattern": "^evt_"
  23823. },
  23824. "metadata": {
  23825. "type": "object"
  23826. },
  23827. "type": {
  23828. "type": "string",
  23829. "enum": ["session.status"]
  23830. },
  23831. "durable": {
  23832. "type": "object",
  23833. "properties": {
  23834. "aggregateID": {
  23835. "type": "string"
  23836. },
  23837. "seq": {
  23838. "type": "integer"
  23839. },
  23840. "version": {
  23841. "type": "integer"
  23842. }
  23843. },
  23844. "required": ["aggregateID", "seq", "version"],
  23845. "additionalProperties": false
  23846. },
  23847. "location": {
  23848. "$ref": "#/components/schemas/LocationRef"
  23849. },
  23850. "data": {
  23851. "type": "object",
  23852. "properties": {
  23853. "sessionID": {
  23854. "type": "string",
  23855. "pattern": "^ses"
  23856. },
  23857. "status": {
  23858. "$ref": "#/components/schemas/SessionStatus"
  23859. }
  23860. },
  23861. "required": ["sessionID", "status"],
  23862. "additionalProperties": false
  23863. }
  23864. },
  23865. "required": ["id", "type", "data"],
  23866. "additionalProperties": false
  23867. },
  23868. "question.replied": {
  23869. "type": "object",
  23870. "properties": {
  23871. "id": {
  23872. "type": "string",
  23873. "pattern": "^evt_"
  23874. },
  23875. "metadata": {
  23876. "type": "object"
  23877. },
  23878. "type": {
  23879. "type": "string",
  23880. "enum": ["question.replied"]
  23881. },
  23882. "durable": {
  23883. "type": "object",
  23884. "properties": {
  23885. "aggregateID": {
  23886. "type": "string"
  23887. },
  23888. "seq": {
  23889. "type": "integer"
  23890. },
  23891. "version": {
  23892. "type": "integer"
  23893. }
  23894. },
  23895. "required": ["aggregateID", "seq", "version"],
  23896. "additionalProperties": false
  23897. },
  23898. "location": {
  23899. "$ref": "#/components/schemas/LocationRef"
  23900. },
  23901. "data": {
  23902. "type": "object",
  23903. "properties": {
  23904. "sessionID": {
  23905. "type": "string",
  23906. "pattern": "^ses"
  23907. },
  23908. "requestID": {
  23909. "type": "string",
  23910. "pattern": "^que"
  23911. },
  23912. "answers": {
  23913. "type": "array",
  23914. "items": {
  23915. "$ref": "#/components/schemas/QuestionAnswer"
  23916. }
  23917. }
  23918. },
  23919. "required": ["sessionID", "requestID", "answers"],
  23920. "additionalProperties": false
  23921. }
  23922. },
  23923. "required": ["id", "type", "data"],
  23924. "additionalProperties": false
  23925. },
  23926. "question.rejected": {
  23927. "type": "object",
  23928. "properties": {
  23929. "id": {
  23930. "type": "string",
  23931. "pattern": "^evt_"
  23932. },
  23933. "metadata": {
  23934. "type": "object"
  23935. },
  23936. "type": {
  23937. "type": "string",
  23938. "enum": ["question.rejected"]
  23939. },
  23940. "durable": {
  23941. "type": "object",
  23942. "properties": {
  23943. "aggregateID": {
  23944. "type": "string"
  23945. },
  23946. "seq": {
  23947. "type": "integer"
  23948. },
  23949. "version": {
  23950. "type": "integer"
  23951. }
  23952. },
  23953. "required": ["aggregateID", "seq", "version"],
  23954. "additionalProperties": false
  23955. },
  23956. "location": {
  23957. "$ref": "#/components/schemas/LocationRef"
  23958. },
  23959. "data": {
  23960. "type": "object",
  23961. "properties": {
  23962. "sessionID": {
  23963. "type": "string",
  23964. "pattern": "^ses"
  23965. },
  23966. "requestID": {
  23967. "type": "string",
  23968. "pattern": "^que"
  23969. }
  23970. },
  23971. "required": ["sessionID", "requestID"],
  23972. "additionalProperties": false
  23973. }
  23974. },
  23975. "required": ["id", "type", "data"],
  23976. "additionalProperties": false
  23977. },
  23978. "V2Event": {
  23979. "anyOf": [
  23980. {
  23981. "$ref": "#/components/schemas/Models-devRefreshed"
  23982. },
  23983. {
  23984. "$ref": "#/components/schemas/IntegrationUpdated"
  23985. },
  23986. {
  23987. "$ref": "#/components/schemas/IntegrationConnectionUpdated"
  23988. },
  23989. {
  23990. "$ref": "#/components/schemas/CatalogUpdated"
  23991. },
  23992. {
  23993. "$ref": "#/components/schemas/SessionCreated"
  23994. },
  23995. {
  23996. "$ref": "#/components/schemas/SessionUpdated"
  23997. },
  23998. {
  23999. "$ref": "#/components/schemas/SessionDeleted"
  24000. },
  24001. {
  24002. "$ref": "#/components/schemas/MessageUpdated"
  24003. },
  24004. {
  24005. "$ref": "#/components/schemas/MessageRemoved"
  24006. },
  24007. {
  24008. "$ref": "#/components/schemas/MessagePartUpdated"
  24009. },
  24010. {
  24011. "$ref": "#/components/schemas/MessagePartRemoved"
  24012. },
  24013. {
  24014. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  24015. },
  24016. {
  24017. "$ref": "#/components/schemas/SessionNextModelSwitched"
  24018. },
  24019. {
  24020. "$ref": "#/components/schemas/SessionNextMoved"
  24021. },
  24022. {
  24023. "$ref": "#/components/schemas/SessionNextPrompted"
  24024. },
  24025. {
  24026. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  24027. },
  24028. {
  24029. "$ref": "#/components/schemas/SessionNextContextUpdated"
  24030. },
  24031. {
  24032. "$ref": "#/components/schemas/SessionNextSynthetic"
  24033. },
  24034. {
  24035. "$ref": "#/components/schemas/SessionNextShellStarted"
  24036. },
  24037. {
  24038. "$ref": "#/components/schemas/SessionNextShellEnded"
  24039. },
  24040. {
  24041. "$ref": "#/components/schemas/SessionNextStepStarted"
  24042. },
  24043. {
  24044. "$ref": "#/components/schemas/SessionNextStepEnded"
  24045. },
  24046. {
  24047. "$ref": "#/components/schemas/SessionNextStepFailed"
  24048. },
  24049. {
  24050. "$ref": "#/components/schemas/SessionNextTextStarted"
  24051. },
  24052. {
  24053. "$ref": "#/components/schemas/SessionNextTextDelta"
  24054. },
  24055. {
  24056. "$ref": "#/components/schemas/SessionNextTextEnded"
  24057. },
  24058. {
  24059. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  24060. },
  24061. {
  24062. "$ref": "#/components/schemas/SessionNextReasoningDelta"
  24063. },
  24064. {
  24065. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  24066. },
  24067. {
  24068. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  24069. },
  24070. {
  24071. "$ref": "#/components/schemas/SessionNextToolInputDelta"
  24072. },
  24073. {
  24074. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  24075. },
  24076. {
  24077. "$ref": "#/components/schemas/SessionNextToolCalled"
  24078. },
  24079. {
  24080. "$ref": "#/components/schemas/SessionNextToolProgress"
  24081. },
  24082. {
  24083. "$ref": "#/components/schemas/SessionNextToolSuccess"
  24084. },
  24085. {
  24086. "$ref": "#/components/schemas/SessionNextToolFailed"
  24087. },
  24088. {
  24089. "$ref": "#/components/schemas/SessionNextRetried"
  24090. },
  24091. {
  24092. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  24093. },
  24094. {
  24095. "$ref": "#/components/schemas/SessionNextCompactionDelta"
  24096. },
  24097. {
  24098. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  24099. },
  24100. {
  24101. "$ref": "#/components/schemas/SessionNextRevertStaged"
  24102. },
  24103. {
  24104. "$ref": "#/components/schemas/SessionNextRevertCleared"
  24105. },
  24106. {
  24107. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  24108. },
  24109. {
  24110. "$ref": "#/components/schemas/MessagePartDelta"
  24111. },
  24112. {
  24113. "$ref": "#/components/schemas/SessionDiff"
  24114. },
  24115. {
  24116. "$ref": "#/components/schemas/SessionError"
  24117. },
  24118. {
  24119. "$ref": "#/components/schemas/InstallationUpdated"
  24120. },
  24121. {
  24122. "$ref": "#/components/schemas/InstallationUpdate-available"
  24123. },
  24124. {
  24125. "$ref": "#/components/schemas/FileEdited"
  24126. },
  24127. {
  24128. "$ref": "#/components/schemas/ReferenceUpdated"
  24129. },
  24130. {
  24131. "$ref": "#/components/schemas/PermissionV2Asked"
  24132. },
  24133. {
  24134. "$ref": "#/components/schemas/PermissionV2Replied"
  24135. },
  24136. {
  24137. "$ref": "#/components/schemas/PluginAdded"
  24138. },
  24139. {
  24140. "$ref": "#/components/schemas/ProjectDirectoriesUpdated"
  24141. },
  24142. {
  24143. "$ref": "#/components/schemas/FileWatcherUpdated"
  24144. },
  24145. {
  24146. "$ref": "#/components/schemas/PtyCreated"
  24147. },
  24148. {
  24149. "$ref": "#/components/schemas/PtyUpdated"
  24150. },
  24151. {
  24152. "$ref": "#/components/schemas/PtyExited"
  24153. },
  24154. {
  24155. "$ref": "#/components/schemas/PtyDeleted"
  24156. },
  24157. {
  24158. "$ref": "#/components/schemas/QuestionV2Asked"
  24159. },
  24160. {
  24161. "$ref": "#/components/schemas/QuestionV2Replied"
  24162. },
  24163. {
  24164. "$ref": "#/components/schemas/QuestionV2Rejected"
  24165. },
  24166. {
  24167. "$ref": "#/components/schemas/TodoUpdated"
  24168. },
  24169. {
  24170. "$ref": "#/components/schemas/LspUpdated"
  24171. },
  24172. {
  24173. "$ref": "#/components/schemas/PermissionAsked"
  24174. },
  24175. {
  24176. "$ref": "#/components/schemas/PermissionReplied"
  24177. },
  24178. {
  24179. "$ref": "#/components/schemas/TuiPromptAppend"
  24180. },
  24181. {
  24182. "$ref": "#/components/schemas/TuiCommandExecute"
  24183. },
  24184. {
  24185. "$ref": "#/components/schemas/TuiToastShow"
  24186. },
  24187. {
  24188. "$ref": "#/components/schemas/TuiSessionSelect"
  24189. },
  24190. {
  24191. "$ref": "#/components/schemas/McpToolsChanged"
  24192. },
  24193. {
  24194. "$ref": "#/components/schemas/McpBrowserOpenFailed"
  24195. },
  24196. {
  24197. "$ref": "#/components/schemas/CommandExecuted"
  24198. },
  24199. {
  24200. "$ref": "#/components/schemas/ProjectUpdated"
  24201. },
  24202. {
  24203. "$ref": "#/components/schemas/session.status"
  24204. },
  24205. {
  24206. "$ref": "#/components/schemas/SessionIdle"
  24207. },
  24208. {
  24209. "$ref": "#/components/schemas/QuestionAsked"
  24210. },
  24211. {
  24212. "$ref": "#/components/schemas/question.replied"
  24213. },
  24214. {
  24215. "$ref": "#/components/schemas/question.rejected"
  24216. },
  24217. {
  24218. "$ref": "#/components/schemas/SessionCompacted"
  24219. },
  24220. {
  24221. "$ref": "#/components/schemas/VcsBranchUpdated"
  24222. },
  24223. {
  24224. "$ref": "#/components/schemas/WorkspaceReady"
  24225. },
  24226. {
  24227. "$ref": "#/components/schemas/WorkspaceFailed"
  24228. },
  24229. {
  24230. "$ref": "#/components/schemas/WorkspaceStatus"
  24231. },
  24232. {
  24233. "$ref": "#/components/schemas/WorktreeReady"
  24234. },
  24235. {
  24236. "$ref": "#/components/schemas/WorktreeFailed"
  24237. },
  24238. {
  24239. "$ref": "#/components/schemas/ServerConnected"
  24240. },
  24241. {
  24242. "$ref": "#/components/schemas/GlobalDisposed"
  24243. }
  24244. ]
  24245. },
  24246. "V2EventStream": {
  24247. "type": "string",
  24248. "contentSchema": {
  24249. "$ref": "#/components/schemas/V2Event"
  24250. },
  24251. "contentMediaType": "application/json"
  24252. },
  24253. "ForbiddenError": {
  24254. "type": "object",
  24255. "properties": {
  24256. "_tag": {
  24257. "type": "string",
  24258. "enum": ["ForbiddenError"]
  24259. },
  24260. "message": {
  24261. "type": "string"
  24262. }
  24263. },
  24264. "required": ["_tag", "message"],
  24265. "additionalProperties": false
  24266. },
  24267. "ProjectCopyError": {
  24268. "type": "object",
  24269. "properties": {
  24270. "name": {
  24271. "type": "string",
  24272. "enum": ["ProjectCopyError"]
  24273. },
  24274. "data": {
  24275. "type": "object",
  24276. "properties": {
  24277. "message": {
  24278. "type": "string"
  24279. },
  24280. "forceRequired": {
  24281. "type": "boolean"
  24282. }
  24283. },
  24284. "required": ["message"],
  24285. "additionalProperties": false
  24286. }
  24287. },
  24288. "required": ["name", "data"],
  24289. "additionalProperties": false
  24290. },
  24291. "effect_HttpApiError_Forbidden": {
  24292. "type": "object",
  24293. "properties": {
  24294. "_tag": {
  24295. "type": "string",
  24296. "enum": ["Forbidden"]
  24297. }
  24298. },
  24299. "required": ["_tag"],
  24300. "additionalProperties": false
  24301. },
  24302. "Event.tui.prompt.append": {
  24303. "type": "object",
  24304. "properties": {
  24305. "id": {
  24306. "type": "string",
  24307. "pattern": "^evt_"
  24308. },
  24309. "type": {
  24310. "type": "string",
  24311. "enum": ["tui.prompt.append"]
  24312. },
  24313. "properties": {
  24314. "type": "object",
  24315. "properties": {
  24316. "text": {
  24317. "type": "string"
  24318. }
  24319. },
  24320. "required": ["text"],
  24321. "additionalProperties": false
  24322. }
  24323. },
  24324. "required": ["id", "type", "properties"],
  24325. "additionalProperties": false
  24326. },
  24327. "Event.tui.command.execute": {
  24328. "type": "object",
  24329. "properties": {
  24330. "id": {
  24331. "type": "string",
  24332. "pattern": "^evt_"
  24333. },
  24334. "type": {
  24335. "type": "string",
  24336. "enum": ["tui.command.execute"]
  24337. },
  24338. "properties": {
  24339. "type": "object",
  24340. "properties": {
  24341. "command": {
  24342. "anyOf": [
  24343. {
  24344. "type": "string",
  24345. "enum": [
  24346. "session.list",
  24347. "session.new",
  24348. "session.share",
  24349. "session.interrupt",
  24350. "session.compact",
  24351. "session.page.up",
  24352. "session.page.down",
  24353. "session.line.up",
  24354. "session.line.down",
  24355. "session.half.page.up",
  24356. "session.half.page.down",
  24357. "session.first",
  24358. "session.last",
  24359. "prompt.clear",
  24360. "prompt.submit",
  24361. "agent.cycle"
  24362. ]
  24363. },
  24364. {
  24365. "type": "string"
  24366. }
  24367. ]
  24368. }
  24369. },
  24370. "required": ["command"],
  24371. "additionalProperties": false
  24372. }
  24373. },
  24374. "required": ["id", "type", "properties"],
  24375. "additionalProperties": false
  24376. },
  24377. "Event.tui.toast.show": {
  24378. "type": "object",
  24379. "properties": {
  24380. "id": {
  24381. "type": "string",
  24382. "pattern": "^evt_"
  24383. },
  24384. "type": {
  24385. "type": "string",
  24386. "enum": ["tui.toast.show"]
  24387. },
  24388. "properties": {
  24389. "type": "object",
  24390. "properties": {
  24391. "title": {
  24392. "type": "string"
  24393. },
  24394. "message": {
  24395. "type": "string"
  24396. },
  24397. "variant": {
  24398. "type": "string",
  24399. "enum": ["info", "success", "warning", "error"]
  24400. },
  24401. "duration": {
  24402. "type": "integer",
  24403. "exclusiveMinimum": 0
  24404. }
  24405. },
  24406. "required": ["message", "variant"],
  24407. "additionalProperties": false
  24408. }
  24409. },
  24410. "required": ["id", "type", "properties"],
  24411. "additionalProperties": false
  24412. },
  24413. "Event.tui.session.select": {
  24414. "type": "object",
  24415. "properties": {
  24416. "id": {
  24417. "type": "string",
  24418. "pattern": "^evt_"
  24419. },
  24420. "type": {
  24421. "type": "string",
  24422. "enum": ["tui.session.select"]
  24423. },
  24424. "properties": {
  24425. "type": "object",
  24426. "properties": {
  24427. "sessionID": {
  24428. "type": "string",
  24429. "pattern": "^ses",
  24430. "description": "Session ID to navigate to"
  24431. }
  24432. },
  24433. "required": ["sessionID"],
  24434. "additionalProperties": false
  24435. }
  24436. },
  24437. "required": ["id", "type", "properties"],
  24438. "additionalProperties": false
  24439. },
  24440. "CredentialValue": {
  24441. "anyOf": [
  24442. {
  24443. "$ref": "#/components/schemas/CredentialOAuth"
  24444. },
  24445. {
  24446. "$ref": "#/components/schemas/CredentialKey"
  24447. }
  24448. ]
  24449. },
  24450. "IntegrationInputs": {
  24451. "type": "object",
  24452. "additionalProperties": {
  24453. "type": "string"
  24454. }
  24455. },
  24456. "IntegrationMethod": {
  24457. "anyOf": [
  24458. {
  24459. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  24460. },
  24461. {
  24462. "$ref": "#/components/schemas/IntegrationKeyMethod"
  24463. },
  24464. {
  24465. "$ref": "#/components/schemas/IntegrationEnvMethod"
  24466. }
  24467. ]
  24468. },
  24469. "IntegrationRef": {
  24470. "type": "object",
  24471. "properties": {
  24472. "id": {
  24473. "type": "string"
  24474. },
  24475. "name": {
  24476. "type": "string"
  24477. }
  24478. },
  24479. "required": ["id", "name"],
  24480. "additionalProperties": false
  24481. },
  24482. "SkillV2Source": {
  24483. "anyOf": [
  24484. {
  24485. "$ref": "#/components/schemas/SkillV2DirectorySource"
  24486. },
  24487. {
  24488. "$ref": "#/components/schemas/SkillV2UrlSource"
  24489. },
  24490. {
  24491. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  24492. }
  24493. ]
  24494. },
  24495. "MoveSessionDestination": {
  24496. "type": "object",
  24497. "properties": {
  24498. "directory": {
  24499. "type": "string"
  24500. }
  24501. },
  24502. "required": ["directory"],
  24503. "additionalProperties": false
  24504. },
  24505. "ModelRef": {
  24506. "type": "object",
  24507. "properties": {
  24508. "id": {
  24509. "type": "string"
  24510. },
  24511. "providerID": {
  24512. "type": "string"
  24513. },
  24514. "variant": {
  24515. "type": "string"
  24516. }
  24517. },
  24518. "required": ["id", "providerID"],
  24519. "additionalProperties": false
  24520. },
  24521. "LocationRef": {
  24522. "type": "object",
  24523. "properties": {
  24524. "directory": {
  24525. "type": "string"
  24526. },
  24527. "workspaceID": {
  24528. "type": "string",
  24529. "pattern": "^wrk"
  24530. }
  24531. },
  24532. "required": ["directory"],
  24533. "additionalProperties": false
  24534. },
  24535. "PromptSource": {
  24536. "type": "object",
  24537. "properties": {
  24538. "start": {
  24539. "type": "number"
  24540. },
  24541. "end": {
  24542. "type": "number"
  24543. },
  24544. "text": {
  24545. "type": "string"
  24546. }
  24547. },
  24548. "required": ["start", "end", "text"],
  24549. "additionalProperties": false
  24550. },
  24551. "PromptFileAttachment": {
  24552. "type": "object",
  24553. "properties": {
  24554. "uri": {
  24555. "type": "string"
  24556. },
  24557. "mime": {
  24558. "type": "string"
  24559. },
  24560. "name": {
  24561. "type": "string"
  24562. },
  24563. "description": {
  24564. "type": "string"
  24565. },
  24566. "source": {
  24567. "$ref": "#/components/schemas/PromptSource"
  24568. }
  24569. },
  24570. "required": ["uri", "mime"],
  24571. "additionalProperties": false
  24572. },
  24573. "PromptAgentAttachment": {
  24574. "type": "object",
  24575. "properties": {
  24576. "name": {
  24577. "type": "string"
  24578. },
  24579. "source": {
  24580. "$ref": "#/components/schemas/PromptSource"
  24581. }
  24582. },
  24583. "required": ["name"],
  24584. "additionalProperties": false
  24585. },
  24586. "SessionErrorUnknown": {
  24587. "type": "object",
  24588. "properties": {
  24589. "type": {
  24590. "type": "string",
  24591. "enum": ["unknown"]
  24592. },
  24593. "message": {
  24594. "type": "string"
  24595. }
  24596. },
  24597. "required": ["type", "message"],
  24598. "additionalProperties": false
  24599. },
  24600. "LLMProviderMetadata": {
  24601. "type": "object",
  24602. "additionalProperties": {
  24603. "type": "object"
  24604. }
  24605. },
  24606. "ToolTextContent": {
  24607. "type": "object",
  24608. "properties": {
  24609. "type": {
  24610. "type": "string",
  24611. "enum": ["text"]
  24612. },
  24613. "text": {
  24614. "type": "string"
  24615. }
  24616. },
  24617. "required": ["type", "text"],
  24618. "additionalProperties": false
  24619. },
  24620. "ToolFileContent": {
  24621. "type": "object",
  24622. "properties": {
  24623. "type": {
  24624. "type": "string",
  24625. "enum": ["file"]
  24626. },
  24627. "uri": {
  24628. "type": "string"
  24629. },
  24630. "mime": {
  24631. "type": "string"
  24632. },
  24633. "name": {
  24634. "type": "string"
  24635. }
  24636. },
  24637. "required": ["type", "uri", "mime"],
  24638. "additionalProperties": false
  24639. },
  24640. "LLMToolContent": {
  24641. "anyOf": [
  24642. {
  24643. "$ref": "#/components/schemas/ToolTextContent"
  24644. },
  24645. {
  24646. "$ref": "#/components/schemas/ToolFileContent"
  24647. }
  24648. ]
  24649. },
  24650. "SessionNextRetry_error": {
  24651. "type": "object",
  24652. "properties": {
  24653. "message": {
  24654. "type": "string"
  24655. },
  24656. "statusCode": {
  24657. "type": "number"
  24658. },
  24659. "isRetryable": {
  24660. "type": "boolean"
  24661. },
  24662. "responseHeaders": {
  24663. "type": "object",
  24664. "additionalProperties": {
  24665. "type": "string"
  24666. }
  24667. },
  24668. "responseBody": {
  24669. "type": "string"
  24670. },
  24671. "metadata": {
  24672. "type": "object",
  24673. "additionalProperties": {
  24674. "type": "string"
  24675. }
  24676. }
  24677. },
  24678. "required": ["message", "isRetryable"],
  24679. "additionalProperties": false
  24680. },
  24681. "FileDiff": {
  24682. "type": "object",
  24683. "properties": {
  24684. "path": {
  24685. "type": "string"
  24686. },
  24687. "status": {
  24688. "type": "string",
  24689. "enum": ["added", "modified", "deleted"]
  24690. },
  24691. "additions": {
  24692. "type": "integer",
  24693. "minimum": 0
  24694. },
  24695. "deletions": {
  24696. "type": "integer",
  24697. "minimum": 0
  24698. },
  24699. "patch": {
  24700. "type": "string"
  24701. }
  24702. },
  24703. "required": ["path", "status", "additions", "deletions", "patch"],
  24704. "additionalProperties": false
  24705. },
  24706. "RevertState": {
  24707. "type": "object",
  24708. "properties": {
  24709. "messageID": {
  24710. "type": "string",
  24711. "pattern": "^msg_"
  24712. },
  24713. "partID": {
  24714. "type": "string"
  24715. },
  24716. "snapshot": {
  24717. "type": "string"
  24718. },
  24719. "diff": {
  24720. "type": "string"
  24721. },
  24722. "files": {
  24723. "type": "array",
  24724. "items": {
  24725. "$ref": "#/components/schemas/FileDiff"
  24726. }
  24727. }
  24728. },
  24729. "required": ["messageID"],
  24730. "additionalProperties": false
  24731. },
  24732. "PermissionV2Source": {
  24733. "type": "object",
  24734. "properties": {
  24735. "type": {
  24736. "type": "string",
  24737. "enum": ["tool"]
  24738. },
  24739. "messageID": {
  24740. "type": "string"
  24741. },
  24742. "callID": {
  24743. "type": "string"
  24744. }
  24745. },
  24746. "required": ["type", "messageID", "callID"],
  24747. "additionalProperties": false
  24748. },
  24749. "PermissionV2Reply": {
  24750. "type": "string",
  24751. "enum": ["once", "always", "reject"]
  24752. },
  24753. "QuestionV2Option": {
  24754. "type": "object",
  24755. "properties": {
  24756. "label": {
  24757. "type": "string",
  24758. "description": "Display text (1-5 words, concise)"
  24759. },
  24760. "description": {
  24761. "type": "string",
  24762. "description": "Explanation of choice"
  24763. }
  24764. },
  24765. "required": ["label", "description"],
  24766. "additionalProperties": false
  24767. },
  24768. "QuestionV2Info": {
  24769. "type": "object",
  24770. "properties": {
  24771. "question": {
  24772. "type": "string",
  24773. "description": "Complete question"
  24774. },
  24775. "header": {
  24776. "type": "string",
  24777. "description": "Very short label (max 30 chars)"
  24778. },
  24779. "options": {
  24780. "type": "array",
  24781. "items": {
  24782. "$ref": "#/components/schemas/QuestionV2Option"
  24783. },
  24784. "description": "Available choices"
  24785. },
  24786. "multiple": {
  24787. "type": "boolean"
  24788. },
  24789. "custom": {
  24790. "type": "boolean"
  24791. }
  24792. },
  24793. "required": ["question", "header", "options"],
  24794. "additionalProperties": false
  24795. },
  24796. "QuestionV2Tool": {
  24797. "type": "object",
  24798. "properties": {
  24799. "messageID": {
  24800. "type": "string"
  24801. },
  24802. "callID": {
  24803. "type": "string"
  24804. }
  24805. },
  24806. "required": ["messageID", "callID"],
  24807. "additionalProperties": false
  24808. },
  24809. "QuestionV2Answer": {
  24810. "type": "array",
  24811. "items": {
  24812. "type": "string"
  24813. }
  24814. },
  24815. "ProjectVcs": {
  24816. "type": "string",
  24817. "enum": ["git"]
  24818. },
  24819. "ProjectIcon": {
  24820. "type": "object",
  24821. "properties": {
  24822. "url": {
  24823. "type": "string"
  24824. },
  24825. "override": {
  24826. "type": "string"
  24827. },
  24828. "color": {
  24829. "type": "string"
  24830. }
  24831. },
  24832. "additionalProperties": false
  24833. },
  24834. "ProjectCommands": {
  24835. "type": "object",
  24836. "properties": {
  24837. "start": {
  24838. "type": "string",
  24839. "description": "Startup script to run when creating a new workspace (worktree)"
  24840. }
  24841. },
  24842. "additionalProperties": false
  24843. },
  24844. "ProjectTime": {
  24845. "type": "object",
  24846. "properties": {
  24847. "created": {
  24848. "type": "integer",
  24849. "minimum": 0
  24850. },
  24851. "updated": {
  24852. "type": "integer",
  24853. "minimum": 0
  24854. },
  24855. "initialized": {
  24856. "type": "integer",
  24857. "minimum": 0
  24858. }
  24859. },
  24860. "required": ["created", "updated"],
  24861. "additionalProperties": false
  24862. },
  24863. "EventServerInstanceDisposed": {
  24864. "type": "object",
  24865. "properties": {
  24866. "id": {
  24867. "type": "string"
  24868. },
  24869. "type": {
  24870. "type": "string",
  24871. "enum": ["server.instance.disposed"]
  24872. },
  24873. "properties": {
  24874. "type": "object",
  24875. "properties": {
  24876. "directory": {
  24877. "type": "string"
  24878. }
  24879. },
  24880. "required": ["directory"],
  24881. "additionalProperties": false
  24882. }
  24883. },
  24884. "required": ["id", "type", "properties"],
  24885. "additionalProperties": false
  24886. },
  24887. "SyncEventSessionCreated": {
  24888. "type": "object",
  24889. "properties": {
  24890. "type": {
  24891. "type": "string",
  24892. "enum": ["sync"]
  24893. },
  24894. "id": {
  24895. "type": "string",
  24896. "pattern": "^evt_"
  24897. },
  24898. "syncEvent": {
  24899. "type": "object",
  24900. "properties": {
  24901. "type": {
  24902. "type": "string",
  24903. "enum": ["session.created.1"]
  24904. },
  24905. "id": {
  24906. "type": "string",
  24907. "pattern": "^evt_"
  24908. },
  24909. "seq": {
  24910. "type": "number"
  24911. },
  24912. "aggregateID": {
  24913. "type": "string"
  24914. },
  24915. "data": {
  24916. "type": "object",
  24917. "properties": {
  24918. "sessionID": {
  24919. "type": "string",
  24920. "pattern": "^ses"
  24921. },
  24922. "info": {
  24923. "$ref": "#/components/schemas/Session"
  24924. }
  24925. },
  24926. "required": ["sessionID", "info"],
  24927. "additionalProperties": false
  24928. }
  24929. },
  24930. "required": ["type", "id", "seq", "aggregateID", "data"],
  24931. "additionalProperties": false
  24932. }
  24933. },
  24934. "required": ["type", "id", "syncEvent"],
  24935. "additionalProperties": false
  24936. },
  24937. "SyncEventSessionUpdated": {
  24938. "type": "object",
  24939. "properties": {
  24940. "type": {
  24941. "type": "string",
  24942. "enum": ["sync"]
  24943. },
  24944. "id": {
  24945. "type": "string",
  24946. "pattern": "^evt_"
  24947. },
  24948. "syncEvent": {
  24949. "type": "object",
  24950. "properties": {
  24951. "type": {
  24952. "type": "string",
  24953. "enum": ["session.updated.1"]
  24954. },
  24955. "id": {
  24956. "type": "string",
  24957. "pattern": "^evt_"
  24958. },
  24959. "seq": {
  24960. "type": "number"
  24961. },
  24962. "aggregateID": {
  24963. "type": "string"
  24964. },
  24965. "data": {
  24966. "type": "object",
  24967. "properties": {
  24968. "sessionID": {
  24969. "type": "string",
  24970. "pattern": "^ses"
  24971. },
  24972. "info": {
  24973. "$ref": "#/components/schemas/Session"
  24974. }
  24975. },
  24976. "required": ["sessionID", "info"],
  24977. "additionalProperties": false
  24978. }
  24979. },
  24980. "required": ["type", "id", "seq", "aggregateID", "data"],
  24981. "additionalProperties": false
  24982. }
  24983. },
  24984. "required": ["type", "id", "syncEvent"],
  24985. "additionalProperties": false
  24986. },
  24987. "SyncEventSessionDeleted": {
  24988. "type": "object",
  24989. "properties": {
  24990. "type": {
  24991. "type": "string",
  24992. "enum": ["sync"]
  24993. },
  24994. "id": {
  24995. "type": "string",
  24996. "pattern": "^evt_"
  24997. },
  24998. "syncEvent": {
  24999. "type": "object",
  25000. "properties": {
  25001. "type": {
  25002. "type": "string",
  25003. "enum": ["session.deleted.1"]
  25004. },
  25005. "id": {
  25006. "type": "string",
  25007. "pattern": "^evt_"
  25008. },
  25009. "seq": {
  25010. "type": "number"
  25011. },
  25012. "aggregateID": {
  25013. "type": "string"
  25014. },
  25015. "data": {
  25016. "type": "object",
  25017. "properties": {
  25018. "sessionID": {
  25019. "type": "string",
  25020. "pattern": "^ses"
  25021. },
  25022. "info": {
  25023. "$ref": "#/components/schemas/Session"
  25024. }
  25025. },
  25026. "required": ["sessionID", "info"],
  25027. "additionalProperties": false
  25028. }
  25029. },
  25030. "required": ["type", "id", "seq", "aggregateID", "data"],
  25031. "additionalProperties": false
  25032. }
  25033. },
  25034. "required": ["type", "id", "syncEvent"],
  25035. "additionalProperties": false
  25036. },
  25037. "SyncEventMessageUpdated": {
  25038. "type": "object",
  25039. "properties": {
  25040. "type": {
  25041. "type": "string",
  25042. "enum": ["sync"]
  25043. },
  25044. "id": {
  25045. "type": "string",
  25046. "pattern": "^evt_"
  25047. },
  25048. "syncEvent": {
  25049. "type": "object",
  25050. "properties": {
  25051. "type": {
  25052. "type": "string",
  25053. "enum": ["message.updated.1"]
  25054. },
  25055. "id": {
  25056. "type": "string",
  25057. "pattern": "^evt_"
  25058. },
  25059. "seq": {
  25060. "type": "number"
  25061. },
  25062. "aggregateID": {
  25063. "type": "string"
  25064. },
  25065. "data": {
  25066. "type": "object",
  25067. "properties": {
  25068. "sessionID": {
  25069. "type": "string",
  25070. "pattern": "^ses"
  25071. },
  25072. "info": {
  25073. "$ref": "#/components/schemas/Message"
  25074. }
  25075. },
  25076. "required": ["sessionID", "info"],
  25077. "additionalProperties": false
  25078. }
  25079. },
  25080. "required": ["type", "id", "seq", "aggregateID", "data"],
  25081. "additionalProperties": false
  25082. }
  25083. },
  25084. "required": ["type", "id", "syncEvent"],
  25085. "additionalProperties": false
  25086. },
  25087. "SyncEventMessageRemoved": {
  25088. "type": "object",
  25089. "properties": {
  25090. "type": {
  25091. "type": "string",
  25092. "enum": ["sync"]
  25093. },
  25094. "id": {
  25095. "type": "string",
  25096. "pattern": "^evt_"
  25097. },
  25098. "syncEvent": {
  25099. "type": "object",
  25100. "properties": {
  25101. "type": {
  25102. "type": "string",
  25103. "enum": ["message.removed.1"]
  25104. },
  25105. "id": {
  25106. "type": "string",
  25107. "pattern": "^evt_"
  25108. },
  25109. "seq": {
  25110. "type": "number"
  25111. },
  25112. "aggregateID": {
  25113. "type": "string"
  25114. },
  25115. "data": {
  25116. "type": "object",
  25117. "properties": {
  25118. "sessionID": {
  25119. "type": "string",
  25120. "pattern": "^ses"
  25121. },
  25122. "messageID": {
  25123. "type": "string",
  25124. "pattern": "^msg"
  25125. }
  25126. },
  25127. "required": ["sessionID", "messageID"],
  25128. "additionalProperties": false
  25129. }
  25130. },
  25131. "required": ["type", "id", "seq", "aggregateID", "data"],
  25132. "additionalProperties": false
  25133. }
  25134. },
  25135. "required": ["type", "id", "syncEvent"],
  25136. "additionalProperties": false
  25137. },
  25138. "SyncEventMessagePartUpdated": {
  25139. "type": "object",
  25140. "properties": {
  25141. "type": {
  25142. "type": "string",
  25143. "enum": ["sync"]
  25144. },
  25145. "id": {
  25146. "type": "string",
  25147. "pattern": "^evt_"
  25148. },
  25149. "syncEvent": {
  25150. "type": "object",
  25151. "properties": {
  25152. "type": {
  25153. "type": "string",
  25154. "enum": ["message.part.updated.1"]
  25155. },
  25156. "id": {
  25157. "type": "string",
  25158. "pattern": "^evt_"
  25159. },
  25160. "seq": {
  25161. "type": "number"
  25162. },
  25163. "aggregateID": {
  25164. "type": "string"
  25165. },
  25166. "data": {
  25167. "type": "object",
  25168. "properties": {
  25169. "sessionID": {
  25170. "type": "string",
  25171. "pattern": "^ses"
  25172. },
  25173. "part": {
  25174. "$ref": "#/components/schemas/Part"
  25175. },
  25176. "time": {
  25177. "type": "number"
  25178. }
  25179. },
  25180. "required": ["sessionID", "part", "time"],
  25181. "additionalProperties": false
  25182. }
  25183. },
  25184. "required": ["type", "id", "seq", "aggregateID", "data"],
  25185. "additionalProperties": false
  25186. }
  25187. },
  25188. "required": ["type", "id", "syncEvent"],
  25189. "additionalProperties": false
  25190. },
  25191. "SyncEventMessagePartRemoved": {
  25192. "type": "object",
  25193. "properties": {
  25194. "type": {
  25195. "type": "string",
  25196. "enum": ["sync"]
  25197. },
  25198. "id": {
  25199. "type": "string",
  25200. "pattern": "^evt_"
  25201. },
  25202. "syncEvent": {
  25203. "type": "object",
  25204. "properties": {
  25205. "type": {
  25206. "type": "string",
  25207. "enum": ["message.part.removed.1"]
  25208. },
  25209. "id": {
  25210. "type": "string",
  25211. "pattern": "^evt_"
  25212. },
  25213. "seq": {
  25214. "type": "number"
  25215. },
  25216. "aggregateID": {
  25217. "type": "string"
  25218. },
  25219. "data": {
  25220. "type": "object",
  25221. "properties": {
  25222. "sessionID": {
  25223. "type": "string",
  25224. "pattern": "^ses"
  25225. },
  25226. "messageID": {
  25227. "type": "string",
  25228. "pattern": "^msg"
  25229. },
  25230. "partID": {
  25231. "type": "string",
  25232. "pattern": "^prt"
  25233. }
  25234. },
  25235. "required": ["sessionID", "messageID", "partID"],
  25236. "additionalProperties": false
  25237. }
  25238. },
  25239. "required": ["type", "id", "seq", "aggregateID", "data"],
  25240. "additionalProperties": false
  25241. }
  25242. },
  25243. "required": ["type", "id", "syncEvent"],
  25244. "additionalProperties": false
  25245. },
  25246. "SyncEventSessionNextAgentSwitched": {
  25247. "type": "object",
  25248. "properties": {
  25249. "type": {
  25250. "type": "string",
  25251. "enum": ["sync"]
  25252. },
  25253. "id": {
  25254. "type": "string",
  25255. "pattern": "^evt_"
  25256. },
  25257. "syncEvent": {
  25258. "type": "object",
  25259. "properties": {
  25260. "type": {
  25261. "type": "string",
  25262. "enum": ["session.next.agent.switched.1"]
  25263. },
  25264. "id": {
  25265. "type": "string",
  25266. "pattern": "^evt_"
  25267. },
  25268. "seq": {
  25269. "type": "number"
  25270. },
  25271. "aggregateID": {
  25272. "type": "string"
  25273. },
  25274. "data": {
  25275. "type": "object",
  25276. "properties": {
  25277. "timestamp": {
  25278. "type": "number"
  25279. },
  25280. "sessionID": {
  25281. "type": "string",
  25282. "pattern": "^ses"
  25283. },
  25284. "messageID": {
  25285. "type": "string",
  25286. "pattern": "^msg_"
  25287. },
  25288. "agent": {
  25289. "type": "string"
  25290. }
  25291. },
  25292. "required": ["timestamp", "sessionID", "messageID", "agent"],
  25293. "additionalProperties": false
  25294. }
  25295. },
  25296. "required": ["type", "id", "seq", "aggregateID", "data"],
  25297. "additionalProperties": false
  25298. }
  25299. },
  25300. "required": ["type", "id", "syncEvent"],
  25301. "additionalProperties": false
  25302. },
  25303. "SyncEventSessionNextModelSwitched": {
  25304. "type": "object",
  25305. "properties": {
  25306. "type": {
  25307. "type": "string",
  25308. "enum": ["sync"]
  25309. },
  25310. "id": {
  25311. "type": "string",
  25312. "pattern": "^evt_"
  25313. },
  25314. "syncEvent": {
  25315. "type": "object",
  25316. "properties": {
  25317. "type": {
  25318. "type": "string",
  25319. "enum": ["session.next.model.switched.1"]
  25320. },
  25321. "id": {
  25322. "type": "string",
  25323. "pattern": "^evt_"
  25324. },
  25325. "seq": {
  25326. "type": "number"
  25327. },
  25328. "aggregateID": {
  25329. "type": "string"
  25330. },
  25331. "data": {
  25332. "type": "object",
  25333. "properties": {
  25334. "timestamp": {
  25335. "type": "number"
  25336. },
  25337. "sessionID": {
  25338. "type": "string",
  25339. "pattern": "^ses"
  25340. },
  25341. "messageID": {
  25342. "type": "string",
  25343. "pattern": "^msg_"
  25344. },
  25345. "model": {
  25346. "$ref": "#/components/schemas/ModelRef"
  25347. }
  25348. },
  25349. "required": ["timestamp", "sessionID", "messageID", "model"],
  25350. "additionalProperties": false
  25351. }
  25352. },
  25353. "required": ["type", "id", "seq", "aggregateID", "data"],
  25354. "additionalProperties": false
  25355. }
  25356. },
  25357. "required": ["type", "id", "syncEvent"],
  25358. "additionalProperties": false
  25359. },
  25360. "SyncEventSessionNextMoved": {
  25361. "type": "object",
  25362. "properties": {
  25363. "type": {
  25364. "type": "string",
  25365. "enum": ["sync"]
  25366. },
  25367. "id": {
  25368. "type": "string",
  25369. "pattern": "^evt_"
  25370. },
  25371. "syncEvent": {
  25372. "type": "object",
  25373. "properties": {
  25374. "type": {
  25375. "type": "string",
  25376. "enum": ["session.next.moved.1"]
  25377. },
  25378. "id": {
  25379. "type": "string",
  25380. "pattern": "^evt_"
  25381. },
  25382. "seq": {
  25383. "type": "number"
  25384. },
  25385. "aggregateID": {
  25386. "type": "string"
  25387. },
  25388. "data": {
  25389. "type": "object",
  25390. "properties": {
  25391. "timestamp": {
  25392. "type": "number"
  25393. },
  25394. "sessionID": {
  25395. "type": "string",
  25396. "pattern": "^ses"
  25397. },
  25398. "location": {
  25399. "$ref": "#/components/schemas/LocationRef"
  25400. },
  25401. "subdirectory": {
  25402. "type": "string"
  25403. }
  25404. },
  25405. "required": ["timestamp", "sessionID", "location"],
  25406. "additionalProperties": false
  25407. }
  25408. },
  25409. "required": ["type", "id", "seq", "aggregateID", "data"],
  25410. "additionalProperties": false
  25411. }
  25412. },
  25413. "required": ["type", "id", "syncEvent"],
  25414. "additionalProperties": false
  25415. },
  25416. "SyncEventSessionNextPrompted": {
  25417. "type": "object",
  25418. "properties": {
  25419. "type": {
  25420. "type": "string",
  25421. "enum": ["sync"]
  25422. },
  25423. "id": {
  25424. "type": "string",
  25425. "pattern": "^evt_"
  25426. },
  25427. "syncEvent": {
  25428. "type": "object",
  25429. "properties": {
  25430. "type": {
  25431. "type": "string",
  25432. "enum": ["session.next.prompted.1"]
  25433. },
  25434. "id": {
  25435. "type": "string",
  25436. "pattern": "^evt_"
  25437. },
  25438. "seq": {
  25439. "type": "number"
  25440. },
  25441. "aggregateID": {
  25442. "type": "string"
  25443. },
  25444. "data": {
  25445. "type": "object",
  25446. "properties": {
  25447. "timestamp": {
  25448. "type": "number"
  25449. },
  25450. "sessionID": {
  25451. "type": "string",
  25452. "pattern": "^ses"
  25453. },
  25454. "messageID": {
  25455. "type": "string",
  25456. "pattern": "^msg_"
  25457. },
  25458. "prompt": {
  25459. "$ref": "#/components/schemas/Prompt"
  25460. },
  25461. "delivery": {
  25462. "type": "string",
  25463. "enum": ["steer", "queue"]
  25464. }
  25465. },
  25466. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25467. "additionalProperties": false
  25468. }
  25469. },
  25470. "required": ["type", "id", "seq", "aggregateID", "data"],
  25471. "additionalProperties": false
  25472. }
  25473. },
  25474. "required": ["type", "id", "syncEvent"],
  25475. "additionalProperties": false
  25476. },
  25477. "SyncEventSessionNextPromptAdmitted": {
  25478. "type": "object",
  25479. "properties": {
  25480. "type": {
  25481. "type": "string",
  25482. "enum": ["sync"]
  25483. },
  25484. "id": {
  25485. "type": "string",
  25486. "pattern": "^evt_"
  25487. },
  25488. "syncEvent": {
  25489. "type": "object",
  25490. "properties": {
  25491. "type": {
  25492. "type": "string",
  25493. "enum": ["session.next.prompt.admitted.1"]
  25494. },
  25495. "id": {
  25496. "type": "string",
  25497. "pattern": "^evt_"
  25498. },
  25499. "seq": {
  25500. "type": "number"
  25501. },
  25502. "aggregateID": {
  25503. "type": "string"
  25504. },
  25505. "data": {
  25506. "type": "object",
  25507. "properties": {
  25508. "timestamp": {
  25509. "type": "number"
  25510. },
  25511. "sessionID": {
  25512. "type": "string",
  25513. "pattern": "^ses"
  25514. },
  25515. "messageID": {
  25516. "type": "string",
  25517. "pattern": "^msg_"
  25518. },
  25519. "prompt": {
  25520. "$ref": "#/components/schemas/Prompt"
  25521. },
  25522. "delivery": {
  25523. "type": "string",
  25524. "enum": ["steer", "queue"]
  25525. }
  25526. },
  25527. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25528. "additionalProperties": false
  25529. }
  25530. },
  25531. "required": ["type", "id", "seq", "aggregateID", "data"],
  25532. "additionalProperties": false
  25533. }
  25534. },
  25535. "required": ["type", "id", "syncEvent"],
  25536. "additionalProperties": false
  25537. },
  25538. "SyncEventSessionNextContextUpdated": {
  25539. "type": "object",
  25540. "properties": {
  25541. "type": {
  25542. "type": "string",
  25543. "enum": ["sync"]
  25544. },
  25545. "id": {
  25546. "type": "string",
  25547. "pattern": "^evt_"
  25548. },
  25549. "syncEvent": {
  25550. "type": "object",
  25551. "properties": {
  25552. "type": {
  25553. "type": "string",
  25554. "enum": ["session.next.context.updated.1"]
  25555. },
  25556. "id": {
  25557. "type": "string",
  25558. "pattern": "^evt_"
  25559. },
  25560. "seq": {
  25561. "type": "number"
  25562. },
  25563. "aggregateID": {
  25564. "type": "string"
  25565. },
  25566. "data": {
  25567. "type": "object",
  25568. "properties": {
  25569. "timestamp": {
  25570. "type": "number"
  25571. },
  25572. "sessionID": {
  25573. "type": "string",
  25574. "pattern": "^ses"
  25575. },
  25576. "messageID": {
  25577. "type": "string",
  25578. "pattern": "^msg_"
  25579. },
  25580. "text": {
  25581. "type": "string"
  25582. }
  25583. },
  25584. "required": ["timestamp", "sessionID", "messageID", "text"],
  25585. "additionalProperties": false
  25586. }
  25587. },
  25588. "required": ["type", "id", "seq", "aggregateID", "data"],
  25589. "additionalProperties": false
  25590. }
  25591. },
  25592. "required": ["type", "id", "syncEvent"],
  25593. "additionalProperties": false
  25594. },
  25595. "SyncEventSessionNextSynthetic": {
  25596. "type": "object",
  25597. "properties": {
  25598. "type": {
  25599. "type": "string",
  25600. "enum": ["sync"]
  25601. },
  25602. "id": {
  25603. "type": "string",
  25604. "pattern": "^evt_"
  25605. },
  25606. "syncEvent": {
  25607. "type": "object",
  25608. "properties": {
  25609. "type": {
  25610. "type": "string",
  25611. "enum": ["session.next.synthetic.1"]
  25612. },
  25613. "id": {
  25614. "type": "string",
  25615. "pattern": "^evt_"
  25616. },
  25617. "seq": {
  25618. "type": "number"
  25619. },
  25620. "aggregateID": {
  25621. "type": "string"
  25622. },
  25623. "data": {
  25624. "type": "object",
  25625. "properties": {
  25626. "timestamp": {
  25627. "type": "number"
  25628. },
  25629. "sessionID": {
  25630. "type": "string",
  25631. "pattern": "^ses"
  25632. },
  25633. "messageID": {
  25634. "type": "string",
  25635. "pattern": "^msg_"
  25636. },
  25637. "text": {
  25638. "type": "string"
  25639. }
  25640. },
  25641. "required": ["timestamp", "sessionID", "messageID", "text"],
  25642. "additionalProperties": false
  25643. }
  25644. },
  25645. "required": ["type", "id", "seq", "aggregateID", "data"],
  25646. "additionalProperties": false
  25647. }
  25648. },
  25649. "required": ["type", "id", "syncEvent"],
  25650. "additionalProperties": false
  25651. },
  25652. "SyncEventSessionNextShellStarted": {
  25653. "type": "object",
  25654. "properties": {
  25655. "type": {
  25656. "type": "string",
  25657. "enum": ["sync"]
  25658. },
  25659. "id": {
  25660. "type": "string",
  25661. "pattern": "^evt_"
  25662. },
  25663. "syncEvent": {
  25664. "type": "object",
  25665. "properties": {
  25666. "type": {
  25667. "type": "string",
  25668. "enum": ["session.next.shell.started.1"]
  25669. },
  25670. "id": {
  25671. "type": "string",
  25672. "pattern": "^evt_"
  25673. },
  25674. "seq": {
  25675. "type": "number"
  25676. },
  25677. "aggregateID": {
  25678. "type": "string"
  25679. },
  25680. "data": {
  25681. "type": "object",
  25682. "properties": {
  25683. "timestamp": {
  25684. "type": "number"
  25685. },
  25686. "sessionID": {
  25687. "type": "string",
  25688. "pattern": "^ses"
  25689. },
  25690. "messageID": {
  25691. "type": "string",
  25692. "pattern": "^msg_"
  25693. },
  25694. "callID": {
  25695. "type": "string"
  25696. },
  25697. "command": {
  25698. "type": "string"
  25699. }
  25700. },
  25701. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25702. "additionalProperties": false
  25703. }
  25704. },
  25705. "required": ["type", "id", "seq", "aggregateID", "data"],
  25706. "additionalProperties": false
  25707. }
  25708. },
  25709. "required": ["type", "id", "syncEvent"],
  25710. "additionalProperties": false
  25711. },
  25712. "SyncEventSessionNextShellEnded": {
  25713. "type": "object",
  25714. "properties": {
  25715. "type": {
  25716. "type": "string",
  25717. "enum": ["sync"]
  25718. },
  25719. "id": {
  25720. "type": "string",
  25721. "pattern": "^evt_"
  25722. },
  25723. "syncEvent": {
  25724. "type": "object",
  25725. "properties": {
  25726. "type": {
  25727. "type": "string",
  25728. "enum": ["session.next.shell.ended.1"]
  25729. },
  25730. "id": {
  25731. "type": "string",
  25732. "pattern": "^evt_"
  25733. },
  25734. "seq": {
  25735. "type": "number"
  25736. },
  25737. "aggregateID": {
  25738. "type": "string"
  25739. },
  25740. "data": {
  25741. "type": "object",
  25742. "properties": {
  25743. "timestamp": {
  25744. "type": "number"
  25745. },
  25746. "sessionID": {
  25747. "type": "string",
  25748. "pattern": "^ses"
  25749. },
  25750. "callID": {
  25751. "type": "string"
  25752. },
  25753. "output": {
  25754. "type": "string"
  25755. }
  25756. },
  25757. "required": ["timestamp", "sessionID", "callID", "output"],
  25758. "additionalProperties": false
  25759. }
  25760. },
  25761. "required": ["type", "id", "seq", "aggregateID", "data"],
  25762. "additionalProperties": false
  25763. }
  25764. },
  25765. "required": ["type", "id", "syncEvent"],
  25766. "additionalProperties": false
  25767. },
  25768. "SyncEventSessionNextStepStarted": {
  25769. "type": "object",
  25770. "properties": {
  25771. "type": {
  25772. "type": "string",
  25773. "enum": ["sync"]
  25774. },
  25775. "id": {
  25776. "type": "string",
  25777. "pattern": "^evt_"
  25778. },
  25779. "syncEvent": {
  25780. "type": "object",
  25781. "properties": {
  25782. "type": {
  25783. "type": "string",
  25784. "enum": ["session.next.step.started.1"]
  25785. },
  25786. "id": {
  25787. "type": "string",
  25788. "pattern": "^evt_"
  25789. },
  25790. "seq": {
  25791. "type": "number"
  25792. },
  25793. "aggregateID": {
  25794. "type": "string"
  25795. },
  25796. "data": {
  25797. "type": "object",
  25798. "properties": {
  25799. "timestamp": {
  25800. "type": "number"
  25801. },
  25802. "sessionID": {
  25803. "type": "string",
  25804. "pattern": "^ses"
  25805. },
  25806. "assistantMessageID": {
  25807. "type": "string",
  25808. "pattern": "^msg_"
  25809. },
  25810. "agent": {
  25811. "type": "string"
  25812. },
  25813. "model": {
  25814. "$ref": "#/components/schemas/ModelRef"
  25815. },
  25816. "snapshot": {
  25817. "type": "string"
  25818. }
  25819. },
  25820. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25821. "additionalProperties": false
  25822. }
  25823. },
  25824. "required": ["type", "id", "seq", "aggregateID", "data"],
  25825. "additionalProperties": false
  25826. }
  25827. },
  25828. "required": ["type", "id", "syncEvent"],
  25829. "additionalProperties": false
  25830. },
  25831. "SyncEventSessionNextStepEnded": {
  25832. "type": "object",
  25833. "properties": {
  25834. "type": {
  25835. "type": "string",
  25836. "enum": ["sync"]
  25837. },
  25838. "id": {
  25839. "type": "string",
  25840. "pattern": "^evt_"
  25841. },
  25842. "syncEvent": {
  25843. "type": "object",
  25844. "properties": {
  25845. "type": {
  25846. "type": "string",
  25847. "enum": ["session.next.step.ended.2"]
  25848. },
  25849. "id": {
  25850. "type": "string",
  25851. "pattern": "^evt_"
  25852. },
  25853. "seq": {
  25854. "type": "number"
  25855. },
  25856. "aggregateID": {
  25857. "type": "string"
  25858. },
  25859. "data": {
  25860. "type": "object",
  25861. "properties": {
  25862. "timestamp": {
  25863. "type": "number"
  25864. },
  25865. "sessionID": {
  25866. "type": "string",
  25867. "pattern": "^ses"
  25868. },
  25869. "assistantMessageID": {
  25870. "type": "string",
  25871. "pattern": "^msg_"
  25872. },
  25873. "finish": {
  25874. "type": "string"
  25875. },
  25876. "cost": {
  25877. "type": "number"
  25878. },
  25879. "tokens": {
  25880. "type": "object",
  25881. "properties": {
  25882. "input": {
  25883. "type": "number"
  25884. },
  25885. "output": {
  25886. "type": "number"
  25887. },
  25888. "reasoning": {
  25889. "type": "number"
  25890. },
  25891. "cache": {
  25892. "type": "object",
  25893. "properties": {
  25894. "read": {
  25895. "type": "number"
  25896. },
  25897. "write": {
  25898. "type": "number"
  25899. }
  25900. },
  25901. "required": ["read", "write"],
  25902. "additionalProperties": false
  25903. }
  25904. },
  25905. "required": ["input", "output", "reasoning", "cache"],
  25906. "additionalProperties": false
  25907. },
  25908. "snapshot": {
  25909. "type": "string"
  25910. },
  25911. "files": {
  25912. "type": "array",
  25913. "items": {
  25914. "type": "string"
  25915. }
  25916. }
  25917. },
  25918. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25919. "additionalProperties": false
  25920. }
  25921. },
  25922. "required": ["type", "id", "seq", "aggregateID", "data"],
  25923. "additionalProperties": false
  25924. }
  25925. },
  25926. "required": ["type", "id", "syncEvent"],
  25927. "additionalProperties": false
  25928. },
  25929. "SyncEventSessionNextStepFailed": {
  25930. "type": "object",
  25931. "properties": {
  25932. "type": {
  25933. "type": "string",
  25934. "enum": ["sync"]
  25935. },
  25936. "id": {
  25937. "type": "string",
  25938. "pattern": "^evt_"
  25939. },
  25940. "syncEvent": {
  25941. "type": "object",
  25942. "properties": {
  25943. "type": {
  25944. "type": "string",
  25945. "enum": ["session.next.step.failed.2"]
  25946. },
  25947. "id": {
  25948. "type": "string",
  25949. "pattern": "^evt_"
  25950. },
  25951. "seq": {
  25952. "type": "number"
  25953. },
  25954. "aggregateID": {
  25955. "type": "string"
  25956. },
  25957. "data": {
  25958. "type": "object",
  25959. "properties": {
  25960. "timestamp": {
  25961. "type": "number"
  25962. },
  25963. "sessionID": {
  25964. "type": "string",
  25965. "pattern": "^ses"
  25966. },
  25967. "assistantMessageID": {
  25968. "type": "string",
  25969. "pattern": "^msg_"
  25970. },
  25971. "error": {
  25972. "$ref": "#/components/schemas/SessionErrorUnknown"
  25973. }
  25974. },
  25975. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25976. "additionalProperties": false
  25977. }
  25978. },
  25979. "required": ["type", "id", "seq", "aggregateID", "data"],
  25980. "additionalProperties": false
  25981. }
  25982. },
  25983. "required": ["type", "id", "syncEvent"],
  25984. "additionalProperties": false
  25985. },
  25986. "SyncEventSessionNextTextStarted": {
  25987. "type": "object",
  25988. "properties": {
  25989. "type": {
  25990. "type": "string",
  25991. "enum": ["sync"]
  25992. },
  25993. "id": {
  25994. "type": "string",
  25995. "pattern": "^evt_"
  25996. },
  25997. "syncEvent": {
  25998. "type": "object",
  25999. "properties": {
  26000. "type": {
  26001. "type": "string",
  26002. "enum": ["session.next.text.started.1"]
  26003. },
  26004. "id": {
  26005. "type": "string",
  26006. "pattern": "^evt_"
  26007. },
  26008. "seq": {
  26009. "type": "number"
  26010. },
  26011. "aggregateID": {
  26012. "type": "string"
  26013. },
  26014. "data": {
  26015. "type": "object",
  26016. "properties": {
  26017. "timestamp": {
  26018. "type": "number"
  26019. },
  26020. "sessionID": {
  26021. "type": "string",
  26022. "pattern": "^ses"
  26023. },
  26024. "assistantMessageID": {
  26025. "type": "string",
  26026. "pattern": "^msg_"
  26027. },
  26028. "textID": {
  26029. "type": "string"
  26030. }
  26031. },
  26032. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  26033. "additionalProperties": false
  26034. }
  26035. },
  26036. "required": ["type", "id", "seq", "aggregateID", "data"],
  26037. "additionalProperties": false
  26038. }
  26039. },
  26040. "required": ["type", "id", "syncEvent"],
  26041. "additionalProperties": false
  26042. },
  26043. "SyncEventSessionNextTextEnded": {
  26044. "type": "object",
  26045. "properties": {
  26046. "type": {
  26047. "type": "string",
  26048. "enum": ["sync"]
  26049. },
  26050. "id": {
  26051. "type": "string",
  26052. "pattern": "^evt_"
  26053. },
  26054. "syncEvent": {
  26055. "type": "object",
  26056. "properties": {
  26057. "type": {
  26058. "type": "string",
  26059. "enum": ["session.next.text.ended.1"]
  26060. },
  26061. "id": {
  26062. "type": "string",
  26063. "pattern": "^evt_"
  26064. },
  26065. "seq": {
  26066. "type": "number"
  26067. },
  26068. "aggregateID": {
  26069. "type": "string"
  26070. },
  26071. "data": {
  26072. "type": "object",
  26073. "properties": {
  26074. "timestamp": {
  26075. "type": "number"
  26076. },
  26077. "sessionID": {
  26078. "type": "string",
  26079. "pattern": "^ses"
  26080. },
  26081. "assistantMessageID": {
  26082. "type": "string",
  26083. "pattern": "^msg_"
  26084. },
  26085. "textID": {
  26086. "type": "string"
  26087. },
  26088. "text": {
  26089. "type": "string"
  26090. }
  26091. },
  26092. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  26093. "additionalProperties": false
  26094. }
  26095. },
  26096. "required": ["type", "id", "seq", "aggregateID", "data"],
  26097. "additionalProperties": false
  26098. }
  26099. },
  26100. "required": ["type", "id", "syncEvent"],
  26101. "additionalProperties": false
  26102. },
  26103. "SyncEventSessionNextReasoningStarted": {
  26104. "type": "object",
  26105. "properties": {
  26106. "type": {
  26107. "type": "string",
  26108. "enum": ["sync"]
  26109. },
  26110. "id": {
  26111. "type": "string",
  26112. "pattern": "^evt_"
  26113. },
  26114. "syncEvent": {
  26115. "type": "object",
  26116. "properties": {
  26117. "type": {
  26118. "type": "string",
  26119. "enum": ["session.next.reasoning.started.1"]
  26120. },
  26121. "id": {
  26122. "type": "string",
  26123. "pattern": "^evt_"
  26124. },
  26125. "seq": {
  26126. "type": "number"
  26127. },
  26128. "aggregateID": {
  26129. "type": "string"
  26130. },
  26131. "data": {
  26132. "type": "object",
  26133. "properties": {
  26134. "timestamp": {
  26135. "type": "number"
  26136. },
  26137. "sessionID": {
  26138. "type": "string",
  26139. "pattern": "^ses"
  26140. },
  26141. "assistantMessageID": {
  26142. "type": "string",
  26143. "pattern": "^msg_"
  26144. },
  26145. "reasoningID": {
  26146. "type": "string"
  26147. },
  26148. "providerMetadata": {
  26149. "$ref": "#/components/schemas/LLMProviderMetadata"
  26150. }
  26151. },
  26152. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  26153. "additionalProperties": false
  26154. }
  26155. },
  26156. "required": ["type", "id", "seq", "aggregateID", "data"],
  26157. "additionalProperties": false
  26158. }
  26159. },
  26160. "required": ["type", "id", "syncEvent"],
  26161. "additionalProperties": false
  26162. },
  26163. "SyncEventSessionNextReasoningEnded": {
  26164. "type": "object",
  26165. "properties": {
  26166. "type": {
  26167. "type": "string",
  26168. "enum": ["sync"]
  26169. },
  26170. "id": {
  26171. "type": "string",
  26172. "pattern": "^evt_"
  26173. },
  26174. "syncEvent": {
  26175. "type": "object",
  26176. "properties": {
  26177. "type": {
  26178. "type": "string",
  26179. "enum": ["session.next.reasoning.ended.1"]
  26180. },
  26181. "id": {
  26182. "type": "string",
  26183. "pattern": "^evt_"
  26184. },
  26185. "seq": {
  26186. "type": "number"
  26187. },
  26188. "aggregateID": {
  26189. "type": "string"
  26190. },
  26191. "data": {
  26192. "type": "object",
  26193. "properties": {
  26194. "timestamp": {
  26195. "type": "number"
  26196. },
  26197. "sessionID": {
  26198. "type": "string",
  26199. "pattern": "^ses"
  26200. },
  26201. "assistantMessageID": {
  26202. "type": "string",
  26203. "pattern": "^msg_"
  26204. },
  26205. "reasoningID": {
  26206. "type": "string"
  26207. },
  26208. "text": {
  26209. "type": "string"
  26210. },
  26211. "providerMetadata": {
  26212. "$ref": "#/components/schemas/LLMProviderMetadata"
  26213. }
  26214. },
  26215. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  26216. "additionalProperties": false
  26217. }
  26218. },
  26219. "required": ["type", "id", "seq", "aggregateID", "data"],
  26220. "additionalProperties": false
  26221. }
  26222. },
  26223. "required": ["type", "id", "syncEvent"],
  26224. "additionalProperties": false
  26225. },
  26226. "SyncEventSessionNextToolInputStarted": {
  26227. "type": "object",
  26228. "properties": {
  26229. "type": {
  26230. "type": "string",
  26231. "enum": ["sync"]
  26232. },
  26233. "id": {
  26234. "type": "string",
  26235. "pattern": "^evt_"
  26236. },
  26237. "syncEvent": {
  26238. "type": "object",
  26239. "properties": {
  26240. "type": {
  26241. "type": "string",
  26242. "enum": ["session.next.tool.input.started.1"]
  26243. },
  26244. "id": {
  26245. "type": "string",
  26246. "pattern": "^evt_"
  26247. },
  26248. "seq": {
  26249. "type": "number"
  26250. },
  26251. "aggregateID": {
  26252. "type": "string"
  26253. },
  26254. "data": {
  26255. "type": "object",
  26256. "properties": {
  26257. "timestamp": {
  26258. "type": "number"
  26259. },
  26260. "sessionID": {
  26261. "type": "string",
  26262. "pattern": "^ses"
  26263. },
  26264. "assistantMessageID": {
  26265. "type": "string",
  26266. "pattern": "^msg_"
  26267. },
  26268. "callID": {
  26269. "type": "string"
  26270. },
  26271. "name": {
  26272. "type": "string"
  26273. }
  26274. },
  26275. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  26276. "additionalProperties": false
  26277. }
  26278. },
  26279. "required": ["type", "id", "seq", "aggregateID", "data"],
  26280. "additionalProperties": false
  26281. }
  26282. },
  26283. "required": ["type", "id", "syncEvent"],
  26284. "additionalProperties": false
  26285. },
  26286. "SyncEventSessionNextToolInputEnded": {
  26287. "type": "object",
  26288. "properties": {
  26289. "type": {
  26290. "type": "string",
  26291. "enum": ["sync"]
  26292. },
  26293. "id": {
  26294. "type": "string",
  26295. "pattern": "^evt_"
  26296. },
  26297. "syncEvent": {
  26298. "type": "object",
  26299. "properties": {
  26300. "type": {
  26301. "type": "string",
  26302. "enum": ["session.next.tool.input.ended.1"]
  26303. },
  26304. "id": {
  26305. "type": "string",
  26306. "pattern": "^evt_"
  26307. },
  26308. "seq": {
  26309. "type": "number"
  26310. },
  26311. "aggregateID": {
  26312. "type": "string"
  26313. },
  26314. "data": {
  26315. "type": "object",
  26316. "properties": {
  26317. "timestamp": {
  26318. "type": "number"
  26319. },
  26320. "sessionID": {
  26321. "type": "string",
  26322. "pattern": "^ses"
  26323. },
  26324. "assistantMessageID": {
  26325. "type": "string",
  26326. "pattern": "^msg_"
  26327. },
  26328. "callID": {
  26329. "type": "string"
  26330. },
  26331. "text": {
  26332. "type": "string"
  26333. }
  26334. },
  26335. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  26336. "additionalProperties": false
  26337. }
  26338. },
  26339. "required": ["type", "id", "seq", "aggregateID", "data"],
  26340. "additionalProperties": false
  26341. }
  26342. },
  26343. "required": ["type", "id", "syncEvent"],
  26344. "additionalProperties": false
  26345. },
  26346. "SyncEventSessionNextToolCalled": {
  26347. "type": "object",
  26348. "properties": {
  26349. "type": {
  26350. "type": "string",
  26351. "enum": ["sync"]
  26352. },
  26353. "id": {
  26354. "type": "string",
  26355. "pattern": "^evt_"
  26356. },
  26357. "syncEvent": {
  26358. "type": "object",
  26359. "properties": {
  26360. "type": {
  26361. "type": "string",
  26362. "enum": ["session.next.tool.called.1"]
  26363. },
  26364. "id": {
  26365. "type": "string",
  26366. "pattern": "^evt_"
  26367. },
  26368. "seq": {
  26369. "type": "number"
  26370. },
  26371. "aggregateID": {
  26372. "type": "string"
  26373. },
  26374. "data": {
  26375. "type": "object",
  26376. "properties": {
  26377. "timestamp": {
  26378. "type": "number"
  26379. },
  26380. "sessionID": {
  26381. "type": "string",
  26382. "pattern": "^ses"
  26383. },
  26384. "assistantMessageID": {
  26385. "type": "string",
  26386. "pattern": "^msg_"
  26387. },
  26388. "callID": {
  26389. "type": "string"
  26390. },
  26391. "tool": {
  26392. "type": "string"
  26393. },
  26394. "input": {
  26395. "type": "object"
  26396. },
  26397. "provider": {
  26398. "type": "object",
  26399. "properties": {
  26400. "executed": {
  26401. "type": "boolean"
  26402. },
  26403. "metadata": {
  26404. "$ref": "#/components/schemas/LLMProviderMetadata"
  26405. }
  26406. },
  26407. "required": ["executed"],
  26408. "additionalProperties": false
  26409. }
  26410. },
  26411. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26412. "additionalProperties": false
  26413. }
  26414. },
  26415. "required": ["type", "id", "seq", "aggregateID", "data"],
  26416. "additionalProperties": false
  26417. }
  26418. },
  26419. "required": ["type", "id", "syncEvent"],
  26420. "additionalProperties": false
  26421. },
  26422. "SyncEventSessionNextToolProgress": {
  26423. "type": "object",
  26424. "properties": {
  26425. "type": {
  26426. "type": "string",
  26427. "enum": ["sync"]
  26428. },
  26429. "id": {
  26430. "type": "string",
  26431. "pattern": "^evt_"
  26432. },
  26433. "syncEvent": {
  26434. "type": "object",
  26435. "properties": {
  26436. "type": {
  26437. "type": "string",
  26438. "enum": ["session.next.tool.progress.1"]
  26439. },
  26440. "id": {
  26441. "type": "string",
  26442. "pattern": "^evt_"
  26443. },
  26444. "seq": {
  26445. "type": "number"
  26446. },
  26447. "aggregateID": {
  26448. "type": "string"
  26449. },
  26450. "data": {
  26451. "type": "object",
  26452. "properties": {
  26453. "timestamp": {
  26454. "type": "number"
  26455. },
  26456. "sessionID": {
  26457. "type": "string",
  26458. "pattern": "^ses"
  26459. },
  26460. "assistantMessageID": {
  26461. "type": "string",
  26462. "pattern": "^msg_"
  26463. },
  26464. "callID": {
  26465. "type": "string"
  26466. },
  26467. "structured": {
  26468. "type": "object"
  26469. },
  26470. "content": {
  26471. "type": "array",
  26472. "items": {
  26473. "$ref": "#/components/schemas/LLMToolContent"
  26474. }
  26475. }
  26476. },
  26477. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26478. "additionalProperties": false
  26479. }
  26480. },
  26481. "required": ["type", "id", "seq", "aggregateID", "data"],
  26482. "additionalProperties": false
  26483. }
  26484. },
  26485. "required": ["type", "id", "syncEvent"],
  26486. "additionalProperties": false
  26487. },
  26488. "SyncEventSessionNextToolSuccess": {
  26489. "type": "object",
  26490. "properties": {
  26491. "type": {
  26492. "type": "string",
  26493. "enum": ["sync"]
  26494. },
  26495. "id": {
  26496. "type": "string",
  26497. "pattern": "^evt_"
  26498. },
  26499. "syncEvent": {
  26500. "type": "object",
  26501. "properties": {
  26502. "type": {
  26503. "type": "string",
  26504. "enum": ["session.next.tool.success.1"]
  26505. },
  26506. "id": {
  26507. "type": "string",
  26508. "pattern": "^evt_"
  26509. },
  26510. "seq": {
  26511. "type": "number"
  26512. },
  26513. "aggregateID": {
  26514. "type": "string"
  26515. },
  26516. "data": {
  26517. "type": "object",
  26518. "properties": {
  26519. "timestamp": {
  26520. "type": "number"
  26521. },
  26522. "sessionID": {
  26523. "type": "string",
  26524. "pattern": "^ses"
  26525. },
  26526. "assistantMessageID": {
  26527. "type": "string",
  26528. "pattern": "^msg_"
  26529. },
  26530. "callID": {
  26531. "type": "string"
  26532. },
  26533. "structured": {
  26534. "type": "object"
  26535. },
  26536. "content": {
  26537. "type": "array",
  26538. "items": {
  26539. "$ref": "#/components/schemas/LLMToolContent"
  26540. }
  26541. },
  26542. "outputPaths": {
  26543. "type": "array",
  26544. "items": {
  26545. "type": "string"
  26546. }
  26547. },
  26548. "result": {},
  26549. "provider": {
  26550. "type": "object",
  26551. "properties": {
  26552. "executed": {
  26553. "type": "boolean"
  26554. },
  26555. "metadata": {
  26556. "$ref": "#/components/schemas/LLMProviderMetadata"
  26557. }
  26558. },
  26559. "required": ["executed"],
  26560. "additionalProperties": false
  26561. }
  26562. },
  26563. "required": [
  26564. "timestamp",
  26565. "sessionID",
  26566. "assistantMessageID",
  26567. "callID",
  26568. "structured",
  26569. "content",
  26570. "provider"
  26571. ],
  26572. "additionalProperties": false
  26573. }
  26574. },
  26575. "required": ["type", "id", "seq", "aggregateID", "data"],
  26576. "additionalProperties": false
  26577. }
  26578. },
  26579. "required": ["type", "id", "syncEvent"],
  26580. "additionalProperties": false
  26581. },
  26582. "SyncEventSessionNextToolFailed": {
  26583. "type": "object",
  26584. "properties": {
  26585. "type": {
  26586. "type": "string",
  26587. "enum": ["sync"]
  26588. },
  26589. "id": {
  26590. "type": "string",
  26591. "pattern": "^evt_"
  26592. },
  26593. "syncEvent": {
  26594. "type": "object",
  26595. "properties": {
  26596. "type": {
  26597. "type": "string",
  26598. "enum": ["session.next.tool.failed.1"]
  26599. },
  26600. "id": {
  26601. "type": "string",
  26602. "pattern": "^evt_"
  26603. },
  26604. "seq": {
  26605. "type": "number"
  26606. },
  26607. "aggregateID": {
  26608. "type": "string"
  26609. },
  26610. "data": {
  26611. "type": "object",
  26612. "properties": {
  26613. "timestamp": {
  26614. "type": "number"
  26615. },
  26616. "sessionID": {
  26617. "type": "string",
  26618. "pattern": "^ses"
  26619. },
  26620. "assistantMessageID": {
  26621. "type": "string",
  26622. "pattern": "^msg_"
  26623. },
  26624. "callID": {
  26625. "type": "string"
  26626. },
  26627. "error": {
  26628. "$ref": "#/components/schemas/SessionErrorUnknown"
  26629. },
  26630. "result": {},
  26631. "provider": {
  26632. "type": "object",
  26633. "properties": {
  26634. "executed": {
  26635. "type": "boolean"
  26636. },
  26637. "metadata": {
  26638. "$ref": "#/components/schemas/LLMProviderMetadata"
  26639. }
  26640. },
  26641. "required": ["executed"],
  26642. "additionalProperties": false
  26643. }
  26644. },
  26645. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26646. "additionalProperties": false
  26647. }
  26648. },
  26649. "required": ["type", "id", "seq", "aggregateID", "data"],
  26650. "additionalProperties": false
  26651. }
  26652. },
  26653. "required": ["type", "id", "syncEvent"],
  26654. "additionalProperties": false
  26655. },
  26656. "SyncEventSessionNextRetried": {
  26657. "type": "object",
  26658. "properties": {
  26659. "type": {
  26660. "type": "string",
  26661. "enum": ["sync"]
  26662. },
  26663. "id": {
  26664. "type": "string",
  26665. "pattern": "^evt_"
  26666. },
  26667. "syncEvent": {
  26668. "type": "object",
  26669. "properties": {
  26670. "type": {
  26671. "type": "string",
  26672. "enum": ["session.next.retried.1"]
  26673. },
  26674. "id": {
  26675. "type": "string",
  26676. "pattern": "^evt_"
  26677. },
  26678. "seq": {
  26679. "type": "number"
  26680. },
  26681. "aggregateID": {
  26682. "type": "string"
  26683. },
  26684. "data": {
  26685. "type": "object",
  26686. "properties": {
  26687. "timestamp": {
  26688. "type": "number"
  26689. },
  26690. "sessionID": {
  26691. "type": "string",
  26692. "pattern": "^ses"
  26693. },
  26694. "attempt": {
  26695. "type": "number"
  26696. },
  26697. "error": {
  26698. "$ref": "#/components/schemas/SessionNextRetry_error"
  26699. }
  26700. },
  26701. "required": ["timestamp", "sessionID", "attempt", "error"],
  26702. "additionalProperties": false
  26703. }
  26704. },
  26705. "required": ["type", "id", "seq", "aggregateID", "data"],
  26706. "additionalProperties": false
  26707. }
  26708. },
  26709. "required": ["type", "id", "syncEvent"],
  26710. "additionalProperties": false
  26711. },
  26712. "SyncEventSessionNextCompactionStarted": {
  26713. "type": "object",
  26714. "properties": {
  26715. "type": {
  26716. "type": "string",
  26717. "enum": ["sync"]
  26718. },
  26719. "id": {
  26720. "type": "string",
  26721. "pattern": "^evt_"
  26722. },
  26723. "syncEvent": {
  26724. "type": "object",
  26725. "properties": {
  26726. "type": {
  26727. "type": "string",
  26728. "enum": ["session.next.compaction.started.1"]
  26729. },
  26730. "id": {
  26731. "type": "string",
  26732. "pattern": "^evt_"
  26733. },
  26734. "seq": {
  26735. "type": "number"
  26736. },
  26737. "aggregateID": {
  26738. "type": "string"
  26739. },
  26740. "data": {
  26741. "type": "object",
  26742. "properties": {
  26743. "timestamp": {
  26744. "type": "number"
  26745. },
  26746. "sessionID": {
  26747. "type": "string",
  26748. "pattern": "^ses"
  26749. },
  26750. "messageID": {
  26751. "type": "string",
  26752. "pattern": "^msg_"
  26753. },
  26754. "reason": {
  26755. "type": "string",
  26756. "enum": ["auto", "manual"]
  26757. }
  26758. },
  26759. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26760. "additionalProperties": false
  26761. }
  26762. },
  26763. "required": ["type", "id", "seq", "aggregateID", "data"],
  26764. "additionalProperties": false
  26765. }
  26766. },
  26767. "required": ["type", "id", "syncEvent"],
  26768. "additionalProperties": false
  26769. },
  26770. "SyncEventSessionNextCompactionEnded": {
  26771. "type": "object",
  26772. "properties": {
  26773. "type": {
  26774. "type": "string",
  26775. "enum": ["sync"]
  26776. },
  26777. "id": {
  26778. "type": "string",
  26779. "pattern": "^evt_"
  26780. },
  26781. "syncEvent": {
  26782. "type": "object",
  26783. "properties": {
  26784. "type": {
  26785. "type": "string",
  26786. "enum": ["session.next.compaction.ended.1"]
  26787. },
  26788. "id": {
  26789. "type": "string",
  26790. "pattern": "^evt_"
  26791. },
  26792. "seq": {
  26793. "type": "number"
  26794. },
  26795. "aggregateID": {
  26796. "type": "string"
  26797. },
  26798. "data": {
  26799. "type": "object",
  26800. "properties": {
  26801. "timestamp": {
  26802. "type": "number"
  26803. },
  26804. "sessionID": {
  26805. "type": "string",
  26806. "pattern": "^ses"
  26807. },
  26808. "messageID": {
  26809. "type": "string",
  26810. "pattern": "^msg_"
  26811. },
  26812. "reason": {
  26813. "type": "string",
  26814. "enum": ["auto", "manual"]
  26815. },
  26816. "text": {
  26817. "type": "string"
  26818. },
  26819. "recent": {
  26820. "type": "string"
  26821. }
  26822. },
  26823. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  26824. "additionalProperties": false
  26825. }
  26826. },
  26827. "required": ["type", "id", "seq", "aggregateID", "data"],
  26828. "additionalProperties": false
  26829. }
  26830. },
  26831. "required": ["type", "id", "syncEvent"],
  26832. "additionalProperties": false
  26833. },
  26834. "SyncEventSessionNextRevertStaged": {
  26835. "type": "object",
  26836. "properties": {
  26837. "type": {
  26838. "type": "string",
  26839. "enum": ["sync"]
  26840. },
  26841. "id": {
  26842. "type": "string",
  26843. "pattern": "^evt_"
  26844. },
  26845. "syncEvent": {
  26846. "type": "object",
  26847. "properties": {
  26848. "type": {
  26849. "type": "string",
  26850. "enum": ["session.next.revert.staged.1"]
  26851. },
  26852. "id": {
  26853. "type": "string",
  26854. "pattern": "^evt_"
  26855. },
  26856. "seq": {
  26857. "type": "number"
  26858. },
  26859. "aggregateID": {
  26860. "type": "string"
  26861. },
  26862. "data": {
  26863. "type": "object",
  26864. "properties": {
  26865. "timestamp": {
  26866. "type": "number"
  26867. },
  26868. "sessionID": {
  26869. "type": "string",
  26870. "pattern": "^ses"
  26871. },
  26872. "revert": {
  26873. "$ref": "#/components/schemas/RevertState"
  26874. }
  26875. },
  26876. "required": ["timestamp", "sessionID", "revert"],
  26877. "additionalProperties": false
  26878. }
  26879. },
  26880. "required": ["type", "id", "seq", "aggregateID", "data"],
  26881. "additionalProperties": false
  26882. }
  26883. },
  26884. "required": ["type", "id", "syncEvent"],
  26885. "additionalProperties": false
  26886. },
  26887. "SyncEventSessionNextRevertCleared": {
  26888. "type": "object",
  26889. "properties": {
  26890. "type": {
  26891. "type": "string",
  26892. "enum": ["sync"]
  26893. },
  26894. "id": {
  26895. "type": "string",
  26896. "pattern": "^evt_"
  26897. },
  26898. "syncEvent": {
  26899. "type": "object",
  26900. "properties": {
  26901. "type": {
  26902. "type": "string",
  26903. "enum": ["session.next.revert.cleared.1"]
  26904. },
  26905. "id": {
  26906. "type": "string",
  26907. "pattern": "^evt_"
  26908. },
  26909. "seq": {
  26910. "type": "number"
  26911. },
  26912. "aggregateID": {
  26913. "type": "string"
  26914. },
  26915. "data": {
  26916. "type": "object",
  26917. "properties": {
  26918. "timestamp": {
  26919. "type": "number"
  26920. },
  26921. "sessionID": {
  26922. "type": "string",
  26923. "pattern": "^ses"
  26924. }
  26925. },
  26926. "required": ["timestamp", "sessionID"],
  26927. "additionalProperties": false
  26928. }
  26929. },
  26930. "required": ["type", "id", "seq", "aggregateID", "data"],
  26931. "additionalProperties": false
  26932. }
  26933. },
  26934. "required": ["type", "id", "syncEvent"],
  26935. "additionalProperties": false
  26936. },
  26937. "SyncEventSessionNextRevertCommitted": {
  26938. "type": "object",
  26939. "properties": {
  26940. "type": {
  26941. "type": "string",
  26942. "enum": ["sync"]
  26943. },
  26944. "id": {
  26945. "type": "string",
  26946. "pattern": "^evt_"
  26947. },
  26948. "syncEvent": {
  26949. "type": "object",
  26950. "properties": {
  26951. "type": {
  26952. "type": "string",
  26953. "enum": ["session.next.revert.committed.1"]
  26954. },
  26955. "id": {
  26956. "type": "string",
  26957. "pattern": "^evt_"
  26958. },
  26959. "seq": {
  26960. "type": "number"
  26961. },
  26962. "aggregateID": {
  26963. "type": "string"
  26964. },
  26965. "data": {
  26966. "type": "object",
  26967. "properties": {
  26968. "timestamp": {
  26969. "type": "number"
  26970. },
  26971. "sessionID": {
  26972. "type": "string",
  26973. "pattern": "^ses"
  26974. },
  26975. "messageID": {
  26976. "type": "string",
  26977. "pattern": "^msg_"
  26978. }
  26979. },
  26980. "required": ["timestamp", "sessionID", "messageID"],
  26981. "additionalProperties": false
  26982. }
  26983. },
  26984. "required": ["type", "id", "seq", "aggregateID", "data"],
  26985. "additionalProperties": false
  26986. }
  26987. },
  26988. "required": ["type", "id", "syncEvent"],
  26989. "additionalProperties": false
  26990. },
  26991. "ConfigV2ReferenceGit": {
  26992. "type": "object",
  26993. "properties": {
  26994. "repository": {
  26995. "type": "string"
  26996. },
  26997. "branch": {
  26998. "type": "string"
  26999. },
  27000. "description": {
  27001. "type": "string"
  27002. },
  27003. "hidden": {
  27004. "type": "boolean"
  27005. }
  27006. },
  27007. "required": ["repository"],
  27008. "additionalProperties": false
  27009. },
  27010. "ConfigV2ReferenceLocal": {
  27011. "type": "object",
  27012. "properties": {
  27013. "path": {
  27014. "type": "string"
  27015. },
  27016. "description": {
  27017. "type": "string"
  27018. },
  27019. "hidden": {
  27020. "type": "boolean"
  27021. }
  27022. },
  27023. "required": ["path"],
  27024. "additionalProperties": false
  27025. },
  27026. "PolicyEffect": {
  27027. "type": "string",
  27028. "enum": ["allow", "deny"]
  27029. },
  27030. "ConfigV2ExperimentalPolicy": {
  27031. "type": "object",
  27032. "properties": {
  27033. "action": {
  27034. "type": "string",
  27035. "enum": ["provider.use"]
  27036. },
  27037. "effect": {
  27038. "$ref": "#/components/schemas/PolicyEffect"
  27039. },
  27040. "resource": {
  27041. "type": "string"
  27042. }
  27043. },
  27044. "required": ["action", "effect", "resource"],
  27045. "additionalProperties": false
  27046. },
  27047. "ProjectDirectories": {
  27048. "type": "array",
  27049. "items": {
  27050. "type": "object",
  27051. "properties": {
  27052. "directory": {
  27053. "type": "string"
  27054. },
  27055. "strategy": {
  27056. "type": "string"
  27057. }
  27058. },
  27059. "required": ["directory"],
  27060. "additionalProperties": false
  27061. }
  27062. },
  27063. "PtyTicketConnectToken": {
  27064. "type": "object",
  27065. "properties": {
  27066. "ticket": {
  27067. "type": "string"
  27068. },
  27069. "expires_in": {
  27070. "type": "integer",
  27071. "exclusiveMinimum": 0
  27072. }
  27073. },
  27074. "required": ["ticket", "expires_in"],
  27075. "additionalProperties": false
  27076. },
  27077. "WorkspaceEventConnectionStatus": {
  27078. "type": "object",
  27079. "properties": {
  27080. "workspaceID": {
  27081. "type": "string",
  27082. "pattern": "^wrk"
  27083. },
  27084. "status": {
  27085. "type": "string",
  27086. "enum": ["connected", "connecting", "disconnected", "error"]
  27087. }
  27088. },
  27089. "required": ["workspaceID", "status"],
  27090. "additionalProperties": false
  27091. },
  27092. "LocationInfo": {
  27093. "type": "object",
  27094. "properties": {
  27095. "directory": {
  27096. "type": "string"
  27097. },
  27098. "workspaceID": {
  27099. "type": "string",
  27100. "pattern": "^wrk"
  27101. },
  27102. "project": {
  27103. "type": "object",
  27104. "properties": {
  27105. "id": {
  27106. "type": "string"
  27107. },
  27108. "directory": {
  27109. "type": "string"
  27110. }
  27111. },
  27112. "required": ["id", "directory"],
  27113. "additionalProperties": false
  27114. }
  27115. },
  27116. "required": ["directory", "project"],
  27117. "additionalProperties": false
  27118. },
  27119. "ProviderRequest": {
  27120. "type": "object",
  27121. "properties": {
  27122. "headers": {
  27123. "type": "object",
  27124. "additionalProperties": {
  27125. "type": "string"
  27126. }
  27127. },
  27128. "body": {
  27129. "type": "object"
  27130. }
  27131. },
  27132. "required": ["headers", "body"],
  27133. "additionalProperties": false
  27134. },
  27135. "AgentColor": {
  27136. "anyOf": [
  27137. {
  27138. "type": "string",
  27139. "pattern": "^#[0-9a-fA-F]{6}$"
  27140. },
  27141. {
  27142. "type": "string",
  27143. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  27144. }
  27145. ]
  27146. },
  27147. "PermissionV2Effect": {
  27148. "type": "string",
  27149. "enum": ["allow", "deny", "ask"]
  27150. },
  27151. "PermissionV2Rule": {
  27152. "type": "object",
  27153. "properties": {
  27154. "action": {
  27155. "type": "string"
  27156. },
  27157. "resource": {
  27158. "type": "string"
  27159. },
  27160. "effect": {
  27161. "$ref": "#/components/schemas/PermissionV2Effect"
  27162. }
  27163. },
  27164. "required": ["action", "resource", "effect"],
  27165. "additionalProperties": false
  27166. },
  27167. "PermissionV2Ruleset": {
  27168. "type": "array",
  27169. "items": {
  27170. "$ref": "#/components/schemas/PermissionV2Rule"
  27171. }
  27172. },
  27173. "AgentV2Info": {
  27174. "type": "object",
  27175. "properties": {
  27176. "id": {
  27177. "type": "string"
  27178. },
  27179. "model": {
  27180. "$ref": "#/components/schemas/ModelRef"
  27181. },
  27182. "request": {
  27183. "$ref": "#/components/schemas/ProviderRequest"
  27184. },
  27185. "system": {
  27186. "type": "string"
  27187. },
  27188. "description": {
  27189. "type": "string"
  27190. },
  27191. "mode": {
  27192. "type": "string",
  27193. "enum": ["subagent", "primary", "all"]
  27194. },
  27195. "hidden": {
  27196. "type": "boolean"
  27197. },
  27198. "color": {
  27199. "$ref": "#/components/schemas/AgentColor"
  27200. },
  27201. "steps": {
  27202. "type": "integer",
  27203. "exclusiveMinimum": 0
  27204. },
  27205. "permissions": {
  27206. "$ref": "#/components/schemas/PermissionV2Ruleset"
  27207. }
  27208. },
  27209. "required": ["id", "request", "mode", "hidden", "permissions"],
  27210. "additionalProperties": false
  27211. },
  27212. "SessionV2Info": {
  27213. "type": "object",
  27214. "properties": {
  27215. "id": {
  27216. "type": "string",
  27217. "pattern": "^ses"
  27218. },
  27219. "parentID": {
  27220. "type": "string",
  27221. "pattern": "^ses"
  27222. },
  27223. "projectID": {
  27224. "type": "string"
  27225. },
  27226. "agent": {
  27227. "type": "string"
  27228. },
  27229. "model": {
  27230. "$ref": "#/components/schemas/ModelRef"
  27231. },
  27232. "cost": {
  27233. "type": "number"
  27234. },
  27235. "tokens": {
  27236. "type": "object",
  27237. "properties": {
  27238. "input": {
  27239. "type": "number"
  27240. },
  27241. "output": {
  27242. "type": "number"
  27243. },
  27244. "reasoning": {
  27245. "type": "number"
  27246. },
  27247. "cache": {
  27248. "type": "object",
  27249. "properties": {
  27250. "read": {
  27251. "type": "number"
  27252. },
  27253. "write": {
  27254. "type": "number"
  27255. }
  27256. },
  27257. "required": ["read", "write"],
  27258. "additionalProperties": false
  27259. }
  27260. },
  27261. "required": ["input", "output", "reasoning", "cache"],
  27262. "additionalProperties": false
  27263. },
  27264. "time": {
  27265. "type": "object",
  27266. "properties": {
  27267. "created": {
  27268. "type": "number"
  27269. },
  27270. "updated": {
  27271. "type": "number"
  27272. },
  27273. "archived": {
  27274. "type": "number"
  27275. }
  27276. },
  27277. "required": ["created", "updated"],
  27278. "additionalProperties": false
  27279. },
  27280. "title": {
  27281. "type": "string"
  27282. },
  27283. "location": {
  27284. "$ref": "#/components/schemas/LocationRef"
  27285. },
  27286. "subpath": {
  27287. "type": "string"
  27288. },
  27289. "revert": {
  27290. "$ref": "#/components/schemas/RevertState"
  27291. }
  27292. },
  27293. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  27294. "additionalProperties": false
  27295. },
  27296. "PromptInputFileAttachment": {
  27297. "type": "object",
  27298. "properties": {
  27299. "uri": {
  27300. "type": "string"
  27301. },
  27302. "name": {
  27303. "type": "string"
  27304. },
  27305. "description": {
  27306. "type": "string"
  27307. },
  27308. "source": {
  27309. "$ref": "#/components/schemas/PromptSource"
  27310. }
  27311. },
  27312. "required": ["uri"],
  27313. "additionalProperties": false
  27314. },
  27315. "SessionInputAdmitted": {
  27316. "type": "object",
  27317. "properties": {
  27318. "admittedSeq": {
  27319. "type": "integer",
  27320. "minimum": 0
  27321. },
  27322. "id": {
  27323. "type": "string",
  27324. "pattern": "^msg_"
  27325. },
  27326. "sessionID": {
  27327. "type": "string",
  27328. "pattern": "^ses"
  27329. },
  27330. "prompt": {
  27331. "$ref": "#/components/schemas/Prompt"
  27332. },
  27333. "delivery": {
  27334. "type": "string",
  27335. "enum": ["steer", "queue"]
  27336. },
  27337. "timeCreated": {
  27338. "type": "number"
  27339. },
  27340. "promotedSeq": {
  27341. "type": "integer",
  27342. "minimum": 0
  27343. }
  27344. },
  27345. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  27346. "additionalProperties": false
  27347. },
  27348. "SessionMessageAgentSwitched": {
  27349. "type": "object",
  27350. "properties": {
  27351. "id": {
  27352. "type": "string",
  27353. "pattern": "^msg_"
  27354. },
  27355. "metadata": {
  27356. "type": "object"
  27357. },
  27358. "time": {
  27359. "type": "object",
  27360. "properties": {
  27361. "created": {
  27362. "type": "number"
  27363. }
  27364. },
  27365. "required": ["created"],
  27366. "additionalProperties": false
  27367. },
  27368. "type": {
  27369. "type": "string",
  27370. "enum": ["agent-switched"]
  27371. },
  27372. "agent": {
  27373. "type": "string"
  27374. }
  27375. },
  27376. "required": ["id", "time", "type", "agent"],
  27377. "additionalProperties": false
  27378. },
  27379. "SessionMessageModelSwitched": {
  27380. "type": "object",
  27381. "properties": {
  27382. "id": {
  27383. "type": "string",
  27384. "pattern": "^msg_"
  27385. },
  27386. "metadata": {
  27387. "type": "object"
  27388. },
  27389. "time": {
  27390. "type": "object",
  27391. "properties": {
  27392. "created": {
  27393. "type": "number"
  27394. }
  27395. },
  27396. "required": ["created"],
  27397. "additionalProperties": false
  27398. },
  27399. "type": {
  27400. "type": "string",
  27401. "enum": ["model-switched"]
  27402. },
  27403. "model": {
  27404. "$ref": "#/components/schemas/ModelRef"
  27405. }
  27406. },
  27407. "required": ["id", "time", "type", "model"],
  27408. "additionalProperties": false
  27409. },
  27410. "SessionMessageUser": {
  27411. "type": "object",
  27412. "properties": {
  27413. "id": {
  27414. "type": "string",
  27415. "pattern": "^msg_"
  27416. },
  27417. "metadata": {
  27418. "type": "object"
  27419. },
  27420. "time": {
  27421. "type": "object",
  27422. "properties": {
  27423. "created": {
  27424. "type": "number"
  27425. }
  27426. },
  27427. "required": ["created"],
  27428. "additionalProperties": false
  27429. },
  27430. "text": {
  27431. "type": "string"
  27432. },
  27433. "files": {
  27434. "type": "array",
  27435. "items": {
  27436. "$ref": "#/components/schemas/PromptFileAttachment"
  27437. }
  27438. },
  27439. "agents": {
  27440. "type": "array",
  27441. "items": {
  27442. "$ref": "#/components/schemas/PromptAgentAttachment"
  27443. }
  27444. },
  27445. "type": {
  27446. "type": "string",
  27447. "enum": ["user"]
  27448. }
  27449. },
  27450. "required": ["id", "time", "text", "type"],
  27451. "additionalProperties": false
  27452. },
  27453. "SessionMessageSynthetic": {
  27454. "type": "object",
  27455. "properties": {
  27456. "id": {
  27457. "type": "string",
  27458. "pattern": "^msg_"
  27459. },
  27460. "metadata": {
  27461. "type": "object"
  27462. },
  27463. "time": {
  27464. "type": "object",
  27465. "properties": {
  27466. "created": {
  27467. "type": "number"
  27468. }
  27469. },
  27470. "required": ["created"],
  27471. "additionalProperties": false
  27472. },
  27473. "sessionID": {
  27474. "type": "string",
  27475. "pattern": "^ses"
  27476. },
  27477. "text": {
  27478. "type": "string"
  27479. },
  27480. "type": {
  27481. "type": "string",
  27482. "enum": ["synthetic"]
  27483. }
  27484. },
  27485. "required": ["id", "time", "sessionID", "text", "type"],
  27486. "additionalProperties": false
  27487. },
  27488. "SessionMessageSystem": {
  27489. "type": "object",
  27490. "properties": {
  27491. "id": {
  27492. "type": "string",
  27493. "pattern": "^msg_"
  27494. },
  27495. "metadata": {
  27496. "type": "object"
  27497. },
  27498. "time": {
  27499. "type": "object",
  27500. "properties": {
  27501. "created": {
  27502. "type": "number"
  27503. }
  27504. },
  27505. "required": ["created"],
  27506. "additionalProperties": false
  27507. },
  27508. "type": {
  27509. "type": "string",
  27510. "enum": ["system"]
  27511. },
  27512. "text": {
  27513. "type": "string"
  27514. }
  27515. },
  27516. "required": ["id", "time", "type", "text"],
  27517. "additionalProperties": false
  27518. },
  27519. "SessionMessageShell": {
  27520. "type": "object",
  27521. "properties": {
  27522. "id": {
  27523. "type": "string",
  27524. "pattern": "^msg_"
  27525. },
  27526. "metadata": {
  27527. "type": "object"
  27528. },
  27529. "time": {
  27530. "type": "object",
  27531. "properties": {
  27532. "created": {
  27533. "type": "number"
  27534. },
  27535. "completed": {
  27536. "type": "number"
  27537. }
  27538. },
  27539. "required": ["created"],
  27540. "additionalProperties": false
  27541. },
  27542. "type": {
  27543. "type": "string",
  27544. "enum": ["shell"]
  27545. },
  27546. "callID": {
  27547. "type": "string"
  27548. },
  27549. "command": {
  27550. "type": "string"
  27551. },
  27552. "output": {
  27553. "type": "string"
  27554. }
  27555. },
  27556. "required": ["id", "time", "type", "callID", "command", "output"],
  27557. "additionalProperties": false
  27558. },
  27559. "SessionMessageAssistantText": {
  27560. "type": "object",
  27561. "properties": {
  27562. "type": {
  27563. "type": "string",
  27564. "enum": ["text"]
  27565. },
  27566. "id": {
  27567. "type": "string"
  27568. },
  27569. "text": {
  27570. "type": "string"
  27571. }
  27572. },
  27573. "required": ["type", "id", "text"],
  27574. "additionalProperties": false
  27575. },
  27576. "SessionMessageAssistantReasoning": {
  27577. "type": "object",
  27578. "properties": {
  27579. "type": {
  27580. "type": "string",
  27581. "enum": ["reasoning"]
  27582. },
  27583. "id": {
  27584. "type": "string"
  27585. },
  27586. "text": {
  27587. "type": "string"
  27588. },
  27589. "providerMetadata": {
  27590. "$ref": "#/components/schemas/LLMProviderMetadata"
  27591. },
  27592. "time": {
  27593. "type": "object",
  27594. "properties": {
  27595. "created": {
  27596. "type": "number"
  27597. },
  27598. "completed": {
  27599. "type": "number"
  27600. }
  27601. },
  27602. "required": ["created"],
  27603. "additionalProperties": false
  27604. }
  27605. },
  27606. "required": ["type", "id", "text"],
  27607. "additionalProperties": false
  27608. },
  27609. "SessionMessageToolStatePending": {
  27610. "type": "object",
  27611. "properties": {
  27612. "status": {
  27613. "type": "string",
  27614. "enum": ["pending"]
  27615. },
  27616. "input": {
  27617. "type": "string"
  27618. }
  27619. },
  27620. "required": ["status", "input"],
  27621. "additionalProperties": false
  27622. },
  27623. "SessionMessageToolStateRunning": {
  27624. "type": "object",
  27625. "properties": {
  27626. "status": {
  27627. "type": "string",
  27628. "enum": ["running"]
  27629. },
  27630. "input": {
  27631. "type": "object"
  27632. },
  27633. "structured": {
  27634. "type": "object"
  27635. },
  27636. "content": {
  27637. "type": "array",
  27638. "items": {
  27639. "$ref": "#/components/schemas/LLMToolContent"
  27640. }
  27641. }
  27642. },
  27643. "required": ["status", "input", "structured", "content"],
  27644. "additionalProperties": false
  27645. },
  27646. "SessionMessageToolStateCompleted": {
  27647. "type": "object",
  27648. "properties": {
  27649. "status": {
  27650. "type": "string",
  27651. "enum": ["completed"]
  27652. },
  27653. "input": {
  27654. "type": "object"
  27655. },
  27656. "attachments": {
  27657. "type": "array",
  27658. "items": {
  27659. "$ref": "#/components/schemas/PromptFileAttachment"
  27660. }
  27661. },
  27662. "content": {
  27663. "type": "array",
  27664. "items": {
  27665. "$ref": "#/components/schemas/LLMToolContent"
  27666. }
  27667. },
  27668. "outputPaths": {
  27669. "type": "array",
  27670. "items": {
  27671. "type": "string"
  27672. }
  27673. },
  27674. "structured": {
  27675. "type": "object"
  27676. },
  27677. "result": {}
  27678. },
  27679. "required": ["status", "input", "content", "structured"],
  27680. "additionalProperties": false
  27681. },
  27682. "SessionMessageToolStateError": {
  27683. "type": "object",
  27684. "properties": {
  27685. "status": {
  27686. "type": "string",
  27687. "enum": ["error"]
  27688. },
  27689. "input": {
  27690. "type": "object"
  27691. },
  27692. "content": {
  27693. "type": "array",
  27694. "items": {
  27695. "$ref": "#/components/schemas/LLMToolContent"
  27696. }
  27697. },
  27698. "structured": {
  27699. "type": "object"
  27700. },
  27701. "error": {
  27702. "$ref": "#/components/schemas/SessionErrorUnknown"
  27703. },
  27704. "result": {}
  27705. },
  27706. "required": ["status", "input", "content", "structured", "error"],
  27707. "additionalProperties": false
  27708. },
  27709. "SessionMessageAssistantTool": {
  27710. "type": "object",
  27711. "properties": {
  27712. "type": {
  27713. "type": "string",
  27714. "enum": ["tool"]
  27715. },
  27716. "id": {
  27717. "type": "string"
  27718. },
  27719. "name": {
  27720. "type": "string"
  27721. },
  27722. "provider": {
  27723. "type": "object",
  27724. "properties": {
  27725. "executed": {
  27726. "type": "boolean"
  27727. },
  27728. "metadata": {
  27729. "$ref": "#/components/schemas/LLMProviderMetadata"
  27730. },
  27731. "resultMetadata": {
  27732. "$ref": "#/components/schemas/LLMProviderMetadata"
  27733. }
  27734. },
  27735. "required": ["executed"],
  27736. "additionalProperties": false
  27737. },
  27738. "state": {
  27739. "anyOf": [
  27740. {
  27741. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  27742. },
  27743. {
  27744. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  27745. },
  27746. {
  27747. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  27748. },
  27749. {
  27750. "$ref": "#/components/schemas/SessionMessageToolStateError"
  27751. }
  27752. ]
  27753. },
  27754. "time": {
  27755. "type": "object",
  27756. "properties": {
  27757. "created": {
  27758. "type": "number"
  27759. },
  27760. "ran": {
  27761. "type": "number"
  27762. },
  27763. "completed": {
  27764. "type": "number"
  27765. },
  27766. "pruned": {
  27767. "type": "number"
  27768. }
  27769. },
  27770. "required": ["created"],
  27771. "additionalProperties": false
  27772. }
  27773. },
  27774. "required": ["type", "id", "name", "state", "time"],
  27775. "additionalProperties": false
  27776. },
  27777. "SessionMessageAssistant": {
  27778. "type": "object",
  27779. "properties": {
  27780. "id": {
  27781. "type": "string",
  27782. "pattern": "^msg_"
  27783. },
  27784. "metadata": {
  27785. "type": "object"
  27786. },
  27787. "time": {
  27788. "type": "object",
  27789. "properties": {
  27790. "created": {
  27791. "type": "number"
  27792. },
  27793. "completed": {
  27794. "type": "number"
  27795. }
  27796. },
  27797. "required": ["created"],
  27798. "additionalProperties": false
  27799. },
  27800. "type": {
  27801. "type": "string",
  27802. "enum": ["assistant"]
  27803. },
  27804. "agent": {
  27805. "type": "string"
  27806. },
  27807. "model": {
  27808. "$ref": "#/components/schemas/ModelRef"
  27809. },
  27810. "content": {
  27811. "type": "array",
  27812. "items": {
  27813. "anyOf": [
  27814. {
  27815. "$ref": "#/components/schemas/SessionMessageAssistantText"
  27816. },
  27817. {
  27818. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  27819. },
  27820. {
  27821. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  27822. }
  27823. ]
  27824. }
  27825. },
  27826. "snapshot": {
  27827. "type": "object",
  27828. "properties": {
  27829. "start": {
  27830. "type": "string"
  27831. },
  27832. "end": {
  27833. "type": "string"
  27834. },
  27835. "files": {
  27836. "type": "array",
  27837. "items": {
  27838. "type": "string"
  27839. }
  27840. }
  27841. },
  27842. "additionalProperties": false
  27843. },
  27844. "finish": {
  27845. "type": "string"
  27846. },
  27847. "cost": {
  27848. "type": "number"
  27849. },
  27850. "tokens": {
  27851. "type": "object",
  27852. "properties": {
  27853. "input": {
  27854. "type": "number"
  27855. },
  27856. "output": {
  27857. "type": "number"
  27858. },
  27859. "reasoning": {
  27860. "type": "number"
  27861. },
  27862. "cache": {
  27863. "type": "object",
  27864. "properties": {
  27865. "read": {
  27866. "type": "number"
  27867. },
  27868. "write": {
  27869. "type": "number"
  27870. }
  27871. },
  27872. "required": ["read", "write"],
  27873. "additionalProperties": false
  27874. }
  27875. },
  27876. "required": ["input", "output", "reasoning", "cache"],
  27877. "additionalProperties": false
  27878. },
  27879. "error": {
  27880. "$ref": "#/components/schemas/SessionErrorUnknown"
  27881. }
  27882. },
  27883. "required": ["id", "time", "type", "agent", "model", "content"],
  27884. "additionalProperties": false
  27885. },
  27886. "SessionMessageCompaction": {
  27887. "type": "object",
  27888. "properties": {
  27889. "type": {
  27890. "type": "string",
  27891. "enum": ["compaction"]
  27892. },
  27893. "reason": {
  27894. "type": "string",
  27895. "enum": ["auto", "manual"]
  27896. },
  27897. "summary": {
  27898. "type": "string"
  27899. },
  27900. "recent": {
  27901. "type": "string"
  27902. },
  27903. "id": {
  27904. "type": "string",
  27905. "pattern": "^msg_"
  27906. },
  27907. "metadata": {
  27908. "type": "object"
  27909. },
  27910. "time": {
  27911. "type": "object",
  27912. "properties": {
  27913. "created": {
  27914. "type": "number"
  27915. }
  27916. },
  27917. "required": ["created"],
  27918. "additionalProperties": false
  27919. }
  27920. },
  27921. "required": ["type", "reason", "summary", "recent", "id", "time"],
  27922. "additionalProperties": false
  27923. },
  27924. "SessionMessage": {
  27925. "anyOf": [
  27926. {
  27927. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  27928. },
  27929. {
  27930. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  27931. },
  27932. {
  27933. "$ref": "#/components/schemas/SessionMessageUser"
  27934. },
  27935. {
  27936. "$ref": "#/components/schemas/SessionMessageSynthetic"
  27937. },
  27938. {
  27939. "$ref": "#/components/schemas/SessionMessageSystem"
  27940. },
  27941. {
  27942. "$ref": "#/components/schemas/SessionMessageShell"
  27943. },
  27944. {
  27945. "$ref": "#/components/schemas/SessionMessageAssistant"
  27946. },
  27947. {
  27948. "$ref": "#/components/schemas/SessionMessageCompaction"
  27949. }
  27950. ]
  27951. },
  27952. "SessionNextAgentSwitched": {
  27953. "type": "object",
  27954. "properties": {
  27955. "id": {
  27956. "type": "string",
  27957. "pattern": "^evt_"
  27958. },
  27959. "metadata": {
  27960. "type": "object"
  27961. },
  27962. "type": {
  27963. "type": "string",
  27964. "enum": ["session.next.agent.switched"]
  27965. },
  27966. "durable": {
  27967. "type": "object",
  27968. "properties": {
  27969. "aggregateID": {
  27970. "type": "string"
  27971. },
  27972. "seq": {
  27973. "type": "integer"
  27974. },
  27975. "version": {
  27976. "type": "integer"
  27977. }
  27978. },
  27979. "required": ["aggregateID", "seq", "version"],
  27980. "additionalProperties": false
  27981. },
  27982. "location": {
  27983. "$ref": "#/components/schemas/LocationRef"
  27984. },
  27985. "data": {
  27986. "type": "object",
  27987. "properties": {
  27988. "timestamp": {
  27989. "type": "number"
  27990. },
  27991. "sessionID": {
  27992. "type": "string",
  27993. "pattern": "^ses"
  27994. },
  27995. "messageID": {
  27996. "type": "string",
  27997. "pattern": "^msg_"
  27998. },
  27999. "agent": {
  28000. "type": "string"
  28001. }
  28002. },
  28003. "required": ["timestamp", "sessionID", "messageID", "agent"],
  28004. "additionalProperties": false
  28005. }
  28006. },
  28007. "required": ["id", "type", "data"],
  28008. "additionalProperties": false
  28009. },
  28010. "SessionNextModelSwitched": {
  28011. "type": "object",
  28012. "properties": {
  28013. "id": {
  28014. "type": "string",
  28015. "pattern": "^evt_"
  28016. },
  28017. "metadata": {
  28018. "type": "object"
  28019. },
  28020. "type": {
  28021. "type": "string",
  28022. "enum": ["session.next.model.switched"]
  28023. },
  28024. "durable": {
  28025. "type": "object",
  28026. "properties": {
  28027. "aggregateID": {
  28028. "type": "string"
  28029. },
  28030. "seq": {
  28031. "type": "integer"
  28032. },
  28033. "version": {
  28034. "type": "integer"
  28035. }
  28036. },
  28037. "required": ["aggregateID", "seq", "version"],
  28038. "additionalProperties": false
  28039. },
  28040. "location": {
  28041. "$ref": "#/components/schemas/LocationRef"
  28042. },
  28043. "data": {
  28044. "type": "object",
  28045. "properties": {
  28046. "timestamp": {
  28047. "type": "number"
  28048. },
  28049. "sessionID": {
  28050. "type": "string",
  28051. "pattern": "^ses"
  28052. },
  28053. "messageID": {
  28054. "type": "string",
  28055. "pattern": "^msg_"
  28056. },
  28057. "model": {
  28058. "$ref": "#/components/schemas/ModelRef"
  28059. }
  28060. },
  28061. "required": ["timestamp", "sessionID", "messageID", "model"],
  28062. "additionalProperties": false
  28063. }
  28064. },
  28065. "required": ["id", "type", "data"],
  28066. "additionalProperties": false
  28067. },
  28068. "SessionNextMoved": {
  28069. "type": "object",
  28070. "properties": {
  28071. "id": {
  28072. "type": "string",
  28073. "pattern": "^evt_"
  28074. },
  28075. "metadata": {
  28076. "type": "object"
  28077. },
  28078. "type": {
  28079. "type": "string",
  28080. "enum": ["session.next.moved"]
  28081. },
  28082. "durable": {
  28083. "type": "object",
  28084. "properties": {
  28085. "aggregateID": {
  28086. "type": "string"
  28087. },
  28088. "seq": {
  28089. "type": "integer"
  28090. },
  28091. "version": {
  28092. "type": "integer"
  28093. }
  28094. },
  28095. "required": ["aggregateID", "seq", "version"],
  28096. "additionalProperties": false
  28097. },
  28098. "location": {
  28099. "$ref": "#/components/schemas/LocationRef"
  28100. },
  28101. "data": {
  28102. "type": "object",
  28103. "properties": {
  28104. "timestamp": {
  28105. "type": "number"
  28106. },
  28107. "sessionID": {
  28108. "type": "string",
  28109. "pattern": "^ses"
  28110. },
  28111. "location": {
  28112. "$ref": "#/components/schemas/LocationRef"
  28113. },
  28114. "subdirectory": {
  28115. "type": "string"
  28116. }
  28117. },
  28118. "required": ["timestamp", "sessionID", "location"],
  28119. "additionalProperties": false
  28120. }
  28121. },
  28122. "required": ["id", "type", "data"],
  28123. "additionalProperties": false
  28124. },
  28125. "SessionNextPrompted": {
  28126. "type": "object",
  28127. "properties": {
  28128. "id": {
  28129. "type": "string",
  28130. "pattern": "^evt_"
  28131. },
  28132. "metadata": {
  28133. "type": "object"
  28134. },
  28135. "type": {
  28136. "type": "string",
  28137. "enum": ["session.next.prompted"]
  28138. },
  28139. "durable": {
  28140. "type": "object",
  28141. "properties": {
  28142. "aggregateID": {
  28143. "type": "string"
  28144. },
  28145. "seq": {
  28146. "type": "integer"
  28147. },
  28148. "version": {
  28149. "type": "integer"
  28150. }
  28151. },
  28152. "required": ["aggregateID", "seq", "version"],
  28153. "additionalProperties": false
  28154. },
  28155. "location": {
  28156. "$ref": "#/components/schemas/LocationRef"
  28157. },
  28158. "data": {
  28159. "type": "object",
  28160. "properties": {
  28161. "timestamp": {
  28162. "type": "number"
  28163. },
  28164. "sessionID": {
  28165. "type": "string",
  28166. "pattern": "^ses"
  28167. },
  28168. "messageID": {
  28169. "type": "string",
  28170. "pattern": "^msg_"
  28171. },
  28172. "prompt": {
  28173. "$ref": "#/components/schemas/Prompt"
  28174. },
  28175. "delivery": {
  28176. "type": "string",
  28177. "enum": ["steer", "queue"]
  28178. }
  28179. },
  28180. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28181. "additionalProperties": false
  28182. }
  28183. },
  28184. "required": ["id", "type", "data"],
  28185. "additionalProperties": false
  28186. },
  28187. "SessionNextPromptAdmitted": {
  28188. "type": "object",
  28189. "properties": {
  28190. "id": {
  28191. "type": "string",
  28192. "pattern": "^evt_"
  28193. },
  28194. "metadata": {
  28195. "type": "object"
  28196. },
  28197. "type": {
  28198. "type": "string",
  28199. "enum": ["session.next.prompt.admitted"]
  28200. },
  28201. "durable": {
  28202. "type": "object",
  28203. "properties": {
  28204. "aggregateID": {
  28205. "type": "string"
  28206. },
  28207. "seq": {
  28208. "type": "integer"
  28209. },
  28210. "version": {
  28211. "type": "integer"
  28212. }
  28213. },
  28214. "required": ["aggregateID", "seq", "version"],
  28215. "additionalProperties": false
  28216. },
  28217. "location": {
  28218. "$ref": "#/components/schemas/LocationRef"
  28219. },
  28220. "data": {
  28221. "type": "object",
  28222. "properties": {
  28223. "timestamp": {
  28224. "type": "number"
  28225. },
  28226. "sessionID": {
  28227. "type": "string",
  28228. "pattern": "^ses"
  28229. },
  28230. "messageID": {
  28231. "type": "string",
  28232. "pattern": "^msg_"
  28233. },
  28234. "prompt": {
  28235. "$ref": "#/components/schemas/Prompt"
  28236. },
  28237. "delivery": {
  28238. "type": "string",
  28239. "enum": ["steer", "queue"]
  28240. }
  28241. },
  28242. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28243. "additionalProperties": false
  28244. }
  28245. },
  28246. "required": ["id", "type", "data"],
  28247. "additionalProperties": false
  28248. },
  28249. "SessionNextContextUpdated": {
  28250. "type": "object",
  28251. "properties": {
  28252. "id": {
  28253. "type": "string",
  28254. "pattern": "^evt_"
  28255. },
  28256. "metadata": {
  28257. "type": "object"
  28258. },
  28259. "type": {
  28260. "type": "string",
  28261. "enum": ["session.next.context.updated"]
  28262. },
  28263. "durable": {
  28264. "type": "object",
  28265. "properties": {
  28266. "aggregateID": {
  28267. "type": "string"
  28268. },
  28269. "seq": {
  28270. "type": "integer"
  28271. },
  28272. "version": {
  28273. "type": "integer"
  28274. }
  28275. },
  28276. "required": ["aggregateID", "seq", "version"],
  28277. "additionalProperties": false
  28278. },
  28279. "location": {
  28280. "$ref": "#/components/schemas/LocationRef"
  28281. },
  28282. "data": {
  28283. "type": "object",
  28284. "properties": {
  28285. "timestamp": {
  28286. "type": "number"
  28287. },
  28288. "sessionID": {
  28289. "type": "string",
  28290. "pattern": "^ses"
  28291. },
  28292. "messageID": {
  28293. "type": "string",
  28294. "pattern": "^msg_"
  28295. },
  28296. "text": {
  28297. "type": "string"
  28298. }
  28299. },
  28300. "required": ["timestamp", "sessionID", "messageID", "text"],
  28301. "additionalProperties": false
  28302. }
  28303. },
  28304. "required": ["id", "type", "data"],
  28305. "additionalProperties": false
  28306. },
  28307. "SessionNextSynthetic": {
  28308. "type": "object",
  28309. "properties": {
  28310. "id": {
  28311. "type": "string",
  28312. "pattern": "^evt_"
  28313. },
  28314. "metadata": {
  28315. "type": "object"
  28316. },
  28317. "type": {
  28318. "type": "string",
  28319. "enum": ["session.next.synthetic"]
  28320. },
  28321. "durable": {
  28322. "type": "object",
  28323. "properties": {
  28324. "aggregateID": {
  28325. "type": "string"
  28326. },
  28327. "seq": {
  28328. "type": "integer"
  28329. },
  28330. "version": {
  28331. "type": "integer"
  28332. }
  28333. },
  28334. "required": ["aggregateID", "seq", "version"],
  28335. "additionalProperties": false
  28336. },
  28337. "location": {
  28338. "$ref": "#/components/schemas/LocationRef"
  28339. },
  28340. "data": {
  28341. "type": "object",
  28342. "properties": {
  28343. "timestamp": {
  28344. "type": "number"
  28345. },
  28346. "sessionID": {
  28347. "type": "string",
  28348. "pattern": "^ses"
  28349. },
  28350. "messageID": {
  28351. "type": "string",
  28352. "pattern": "^msg_"
  28353. },
  28354. "text": {
  28355. "type": "string"
  28356. }
  28357. },
  28358. "required": ["timestamp", "sessionID", "messageID", "text"],
  28359. "additionalProperties": false
  28360. }
  28361. },
  28362. "required": ["id", "type", "data"],
  28363. "additionalProperties": false
  28364. },
  28365. "SessionNextShellStarted": {
  28366. "type": "object",
  28367. "properties": {
  28368. "id": {
  28369. "type": "string",
  28370. "pattern": "^evt_"
  28371. },
  28372. "metadata": {
  28373. "type": "object"
  28374. },
  28375. "type": {
  28376. "type": "string",
  28377. "enum": ["session.next.shell.started"]
  28378. },
  28379. "durable": {
  28380. "type": "object",
  28381. "properties": {
  28382. "aggregateID": {
  28383. "type": "string"
  28384. },
  28385. "seq": {
  28386. "type": "integer"
  28387. },
  28388. "version": {
  28389. "type": "integer"
  28390. }
  28391. },
  28392. "required": ["aggregateID", "seq", "version"],
  28393. "additionalProperties": false
  28394. },
  28395. "location": {
  28396. "$ref": "#/components/schemas/LocationRef"
  28397. },
  28398. "data": {
  28399. "type": "object",
  28400. "properties": {
  28401. "timestamp": {
  28402. "type": "number"
  28403. },
  28404. "sessionID": {
  28405. "type": "string",
  28406. "pattern": "^ses"
  28407. },
  28408. "messageID": {
  28409. "type": "string",
  28410. "pattern": "^msg_"
  28411. },
  28412. "callID": {
  28413. "type": "string"
  28414. },
  28415. "command": {
  28416. "type": "string"
  28417. }
  28418. },
  28419. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28420. "additionalProperties": false
  28421. }
  28422. },
  28423. "required": ["id", "type", "data"],
  28424. "additionalProperties": false
  28425. },
  28426. "SessionNextShellEnded": {
  28427. "type": "object",
  28428. "properties": {
  28429. "id": {
  28430. "type": "string",
  28431. "pattern": "^evt_"
  28432. },
  28433. "metadata": {
  28434. "type": "object"
  28435. },
  28436. "type": {
  28437. "type": "string",
  28438. "enum": ["session.next.shell.ended"]
  28439. },
  28440. "durable": {
  28441. "type": "object",
  28442. "properties": {
  28443. "aggregateID": {
  28444. "type": "string"
  28445. },
  28446. "seq": {
  28447. "type": "integer"
  28448. },
  28449. "version": {
  28450. "type": "integer"
  28451. }
  28452. },
  28453. "required": ["aggregateID", "seq", "version"],
  28454. "additionalProperties": false
  28455. },
  28456. "location": {
  28457. "$ref": "#/components/schemas/LocationRef"
  28458. },
  28459. "data": {
  28460. "type": "object",
  28461. "properties": {
  28462. "timestamp": {
  28463. "type": "number"
  28464. },
  28465. "sessionID": {
  28466. "type": "string",
  28467. "pattern": "^ses"
  28468. },
  28469. "callID": {
  28470. "type": "string"
  28471. },
  28472. "output": {
  28473. "type": "string"
  28474. }
  28475. },
  28476. "required": ["timestamp", "sessionID", "callID", "output"],
  28477. "additionalProperties": false
  28478. }
  28479. },
  28480. "required": ["id", "type", "data"],
  28481. "additionalProperties": false
  28482. },
  28483. "SessionNextStepStarted": {
  28484. "type": "object",
  28485. "properties": {
  28486. "id": {
  28487. "type": "string",
  28488. "pattern": "^evt_"
  28489. },
  28490. "metadata": {
  28491. "type": "object"
  28492. },
  28493. "type": {
  28494. "type": "string",
  28495. "enum": ["session.next.step.started"]
  28496. },
  28497. "durable": {
  28498. "type": "object",
  28499. "properties": {
  28500. "aggregateID": {
  28501. "type": "string"
  28502. },
  28503. "seq": {
  28504. "type": "integer"
  28505. },
  28506. "version": {
  28507. "type": "integer"
  28508. }
  28509. },
  28510. "required": ["aggregateID", "seq", "version"],
  28511. "additionalProperties": false
  28512. },
  28513. "location": {
  28514. "$ref": "#/components/schemas/LocationRef"
  28515. },
  28516. "data": {
  28517. "type": "object",
  28518. "properties": {
  28519. "timestamp": {
  28520. "type": "number"
  28521. },
  28522. "sessionID": {
  28523. "type": "string",
  28524. "pattern": "^ses"
  28525. },
  28526. "assistantMessageID": {
  28527. "type": "string",
  28528. "pattern": "^msg_"
  28529. },
  28530. "agent": {
  28531. "type": "string"
  28532. },
  28533. "model": {
  28534. "$ref": "#/components/schemas/ModelRef"
  28535. },
  28536. "snapshot": {
  28537. "type": "string"
  28538. }
  28539. },
  28540. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28541. "additionalProperties": false
  28542. }
  28543. },
  28544. "required": ["id", "type", "data"],
  28545. "additionalProperties": false
  28546. },
  28547. "SessionNextStepEnded": {
  28548. "type": "object",
  28549. "properties": {
  28550. "id": {
  28551. "type": "string",
  28552. "pattern": "^evt_"
  28553. },
  28554. "metadata": {
  28555. "type": "object"
  28556. },
  28557. "type": {
  28558. "type": "string",
  28559. "enum": ["session.next.step.ended"]
  28560. },
  28561. "durable": {
  28562. "type": "object",
  28563. "properties": {
  28564. "aggregateID": {
  28565. "type": "string"
  28566. },
  28567. "seq": {
  28568. "type": "integer"
  28569. },
  28570. "version": {
  28571. "type": "integer"
  28572. }
  28573. },
  28574. "required": ["aggregateID", "seq", "version"],
  28575. "additionalProperties": false
  28576. },
  28577. "location": {
  28578. "$ref": "#/components/schemas/LocationRef"
  28579. },
  28580. "data": {
  28581. "type": "object",
  28582. "properties": {
  28583. "timestamp": {
  28584. "type": "number"
  28585. },
  28586. "sessionID": {
  28587. "type": "string",
  28588. "pattern": "^ses"
  28589. },
  28590. "assistantMessageID": {
  28591. "type": "string",
  28592. "pattern": "^msg_"
  28593. },
  28594. "finish": {
  28595. "type": "string"
  28596. },
  28597. "cost": {
  28598. "type": "number"
  28599. },
  28600. "tokens": {
  28601. "type": "object",
  28602. "properties": {
  28603. "input": {
  28604. "type": "number"
  28605. },
  28606. "output": {
  28607. "type": "number"
  28608. },
  28609. "reasoning": {
  28610. "type": "number"
  28611. },
  28612. "cache": {
  28613. "type": "object",
  28614. "properties": {
  28615. "read": {
  28616. "type": "number"
  28617. },
  28618. "write": {
  28619. "type": "number"
  28620. }
  28621. },
  28622. "required": ["read", "write"],
  28623. "additionalProperties": false
  28624. }
  28625. },
  28626. "required": ["input", "output", "reasoning", "cache"],
  28627. "additionalProperties": false
  28628. },
  28629. "snapshot": {
  28630. "type": "string"
  28631. },
  28632. "files": {
  28633. "type": "array",
  28634. "items": {
  28635. "type": "string"
  28636. }
  28637. }
  28638. },
  28639. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28640. "additionalProperties": false
  28641. }
  28642. },
  28643. "required": ["id", "type", "data"],
  28644. "additionalProperties": false
  28645. },
  28646. "SessionNextStepFailed": {
  28647. "type": "object",
  28648. "properties": {
  28649. "id": {
  28650. "type": "string",
  28651. "pattern": "^evt_"
  28652. },
  28653. "metadata": {
  28654. "type": "object"
  28655. },
  28656. "type": {
  28657. "type": "string",
  28658. "enum": ["session.next.step.failed"]
  28659. },
  28660. "durable": {
  28661. "type": "object",
  28662. "properties": {
  28663. "aggregateID": {
  28664. "type": "string"
  28665. },
  28666. "seq": {
  28667. "type": "integer"
  28668. },
  28669. "version": {
  28670. "type": "integer"
  28671. }
  28672. },
  28673. "required": ["aggregateID", "seq", "version"],
  28674. "additionalProperties": false
  28675. },
  28676. "location": {
  28677. "$ref": "#/components/schemas/LocationRef"
  28678. },
  28679. "data": {
  28680. "type": "object",
  28681. "properties": {
  28682. "timestamp": {
  28683. "type": "number"
  28684. },
  28685. "sessionID": {
  28686. "type": "string",
  28687. "pattern": "^ses"
  28688. },
  28689. "assistantMessageID": {
  28690. "type": "string",
  28691. "pattern": "^msg_"
  28692. },
  28693. "error": {
  28694. "$ref": "#/components/schemas/SessionErrorUnknown"
  28695. }
  28696. },
  28697. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28698. "additionalProperties": false
  28699. }
  28700. },
  28701. "required": ["id", "type", "data"],
  28702. "additionalProperties": false
  28703. },
  28704. "SessionNextTextStarted": {
  28705. "type": "object",
  28706. "properties": {
  28707. "id": {
  28708. "type": "string",
  28709. "pattern": "^evt_"
  28710. },
  28711. "metadata": {
  28712. "type": "object"
  28713. },
  28714. "type": {
  28715. "type": "string",
  28716. "enum": ["session.next.text.started"]
  28717. },
  28718. "durable": {
  28719. "type": "object",
  28720. "properties": {
  28721. "aggregateID": {
  28722. "type": "string"
  28723. },
  28724. "seq": {
  28725. "type": "integer"
  28726. },
  28727. "version": {
  28728. "type": "integer"
  28729. }
  28730. },
  28731. "required": ["aggregateID", "seq", "version"],
  28732. "additionalProperties": false
  28733. },
  28734. "location": {
  28735. "$ref": "#/components/schemas/LocationRef"
  28736. },
  28737. "data": {
  28738. "type": "object",
  28739. "properties": {
  28740. "timestamp": {
  28741. "type": "number"
  28742. },
  28743. "sessionID": {
  28744. "type": "string",
  28745. "pattern": "^ses"
  28746. },
  28747. "assistantMessageID": {
  28748. "type": "string",
  28749. "pattern": "^msg_"
  28750. },
  28751. "textID": {
  28752. "type": "string"
  28753. }
  28754. },
  28755. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28756. "additionalProperties": false
  28757. }
  28758. },
  28759. "required": ["id", "type", "data"],
  28760. "additionalProperties": false
  28761. },
  28762. "SessionNextTextEnded": {
  28763. "type": "object",
  28764. "properties": {
  28765. "id": {
  28766. "type": "string",
  28767. "pattern": "^evt_"
  28768. },
  28769. "metadata": {
  28770. "type": "object"
  28771. },
  28772. "type": {
  28773. "type": "string",
  28774. "enum": ["session.next.text.ended"]
  28775. },
  28776. "durable": {
  28777. "type": "object",
  28778. "properties": {
  28779. "aggregateID": {
  28780. "type": "string"
  28781. },
  28782. "seq": {
  28783. "type": "integer"
  28784. },
  28785. "version": {
  28786. "type": "integer"
  28787. }
  28788. },
  28789. "required": ["aggregateID", "seq", "version"],
  28790. "additionalProperties": false
  28791. },
  28792. "location": {
  28793. "$ref": "#/components/schemas/LocationRef"
  28794. },
  28795. "data": {
  28796. "type": "object",
  28797. "properties": {
  28798. "timestamp": {
  28799. "type": "number"
  28800. },
  28801. "sessionID": {
  28802. "type": "string",
  28803. "pattern": "^ses"
  28804. },
  28805. "assistantMessageID": {
  28806. "type": "string",
  28807. "pattern": "^msg_"
  28808. },
  28809. "textID": {
  28810. "type": "string"
  28811. },
  28812. "text": {
  28813. "type": "string"
  28814. }
  28815. },
  28816. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28817. "additionalProperties": false
  28818. }
  28819. },
  28820. "required": ["id", "type", "data"],
  28821. "additionalProperties": false
  28822. },
  28823. "SessionNextToolInputStarted": {
  28824. "type": "object",
  28825. "properties": {
  28826. "id": {
  28827. "type": "string",
  28828. "pattern": "^evt_"
  28829. },
  28830. "metadata": {
  28831. "type": "object"
  28832. },
  28833. "type": {
  28834. "type": "string",
  28835. "enum": ["session.next.tool.input.started"]
  28836. },
  28837. "durable": {
  28838. "type": "object",
  28839. "properties": {
  28840. "aggregateID": {
  28841. "type": "string"
  28842. },
  28843. "seq": {
  28844. "type": "integer"
  28845. },
  28846. "version": {
  28847. "type": "integer"
  28848. }
  28849. },
  28850. "required": ["aggregateID", "seq", "version"],
  28851. "additionalProperties": false
  28852. },
  28853. "location": {
  28854. "$ref": "#/components/schemas/LocationRef"
  28855. },
  28856. "data": {
  28857. "type": "object",
  28858. "properties": {
  28859. "timestamp": {
  28860. "type": "number"
  28861. },
  28862. "sessionID": {
  28863. "type": "string",
  28864. "pattern": "^ses"
  28865. },
  28866. "assistantMessageID": {
  28867. "type": "string",
  28868. "pattern": "^msg_"
  28869. },
  28870. "callID": {
  28871. "type": "string"
  28872. },
  28873. "name": {
  28874. "type": "string"
  28875. }
  28876. },
  28877. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28878. "additionalProperties": false
  28879. }
  28880. },
  28881. "required": ["id", "type", "data"],
  28882. "additionalProperties": false
  28883. },
  28884. "SessionNextToolInputEnded": {
  28885. "type": "object",
  28886. "properties": {
  28887. "id": {
  28888. "type": "string",
  28889. "pattern": "^evt_"
  28890. },
  28891. "metadata": {
  28892. "type": "object"
  28893. },
  28894. "type": {
  28895. "type": "string",
  28896. "enum": ["session.next.tool.input.ended"]
  28897. },
  28898. "durable": {
  28899. "type": "object",
  28900. "properties": {
  28901. "aggregateID": {
  28902. "type": "string"
  28903. },
  28904. "seq": {
  28905. "type": "integer"
  28906. },
  28907. "version": {
  28908. "type": "integer"
  28909. }
  28910. },
  28911. "required": ["aggregateID", "seq", "version"],
  28912. "additionalProperties": false
  28913. },
  28914. "location": {
  28915. "$ref": "#/components/schemas/LocationRef"
  28916. },
  28917. "data": {
  28918. "type": "object",
  28919. "properties": {
  28920. "timestamp": {
  28921. "type": "number"
  28922. },
  28923. "sessionID": {
  28924. "type": "string",
  28925. "pattern": "^ses"
  28926. },
  28927. "assistantMessageID": {
  28928. "type": "string",
  28929. "pattern": "^msg_"
  28930. },
  28931. "callID": {
  28932. "type": "string"
  28933. },
  28934. "text": {
  28935. "type": "string"
  28936. }
  28937. },
  28938. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  28939. "additionalProperties": false
  28940. }
  28941. },
  28942. "required": ["id", "type", "data"],
  28943. "additionalProperties": false
  28944. },
  28945. "SessionNextToolCalled": {
  28946. "type": "object",
  28947. "properties": {
  28948. "id": {
  28949. "type": "string",
  28950. "pattern": "^evt_"
  28951. },
  28952. "metadata": {
  28953. "type": "object"
  28954. },
  28955. "type": {
  28956. "type": "string",
  28957. "enum": ["session.next.tool.called"]
  28958. },
  28959. "durable": {
  28960. "type": "object",
  28961. "properties": {
  28962. "aggregateID": {
  28963. "type": "string"
  28964. },
  28965. "seq": {
  28966. "type": "integer"
  28967. },
  28968. "version": {
  28969. "type": "integer"
  28970. }
  28971. },
  28972. "required": ["aggregateID", "seq", "version"],
  28973. "additionalProperties": false
  28974. },
  28975. "location": {
  28976. "$ref": "#/components/schemas/LocationRef"
  28977. },
  28978. "data": {
  28979. "type": "object",
  28980. "properties": {
  28981. "timestamp": {
  28982. "type": "number"
  28983. },
  28984. "sessionID": {
  28985. "type": "string",
  28986. "pattern": "^ses"
  28987. },
  28988. "assistantMessageID": {
  28989. "type": "string",
  28990. "pattern": "^msg_"
  28991. },
  28992. "callID": {
  28993. "type": "string"
  28994. },
  28995. "tool": {
  28996. "type": "string"
  28997. },
  28998. "input": {
  28999. "type": "object"
  29000. },
  29001. "provider": {
  29002. "type": "object",
  29003. "properties": {
  29004. "executed": {
  29005. "type": "boolean"
  29006. },
  29007. "metadata": {
  29008. "$ref": "#/components/schemas/LLMProviderMetadata"
  29009. }
  29010. },
  29011. "required": ["executed"],
  29012. "additionalProperties": false
  29013. }
  29014. },
  29015. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29016. "additionalProperties": false
  29017. }
  29018. },
  29019. "required": ["id", "type", "data"],
  29020. "additionalProperties": false
  29021. },
  29022. "SessionNextToolProgress": {
  29023. "type": "object",
  29024. "properties": {
  29025. "id": {
  29026. "type": "string",
  29027. "pattern": "^evt_"
  29028. },
  29029. "metadata": {
  29030. "type": "object"
  29031. },
  29032. "type": {
  29033. "type": "string",
  29034. "enum": ["session.next.tool.progress"]
  29035. },
  29036. "durable": {
  29037. "type": "object",
  29038. "properties": {
  29039. "aggregateID": {
  29040. "type": "string"
  29041. },
  29042. "seq": {
  29043. "type": "integer"
  29044. },
  29045. "version": {
  29046. "type": "integer"
  29047. }
  29048. },
  29049. "required": ["aggregateID", "seq", "version"],
  29050. "additionalProperties": false
  29051. },
  29052. "location": {
  29053. "$ref": "#/components/schemas/LocationRef"
  29054. },
  29055. "data": {
  29056. "type": "object",
  29057. "properties": {
  29058. "timestamp": {
  29059. "type": "number"
  29060. },
  29061. "sessionID": {
  29062. "type": "string",
  29063. "pattern": "^ses"
  29064. },
  29065. "assistantMessageID": {
  29066. "type": "string",
  29067. "pattern": "^msg_"
  29068. },
  29069. "callID": {
  29070. "type": "string"
  29071. },
  29072. "structured": {
  29073. "type": "object"
  29074. },
  29075. "content": {
  29076. "type": "array",
  29077. "items": {
  29078. "$ref": "#/components/schemas/LLMToolContent"
  29079. }
  29080. }
  29081. },
  29082. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29083. "additionalProperties": false
  29084. }
  29085. },
  29086. "required": ["id", "type", "data"],
  29087. "additionalProperties": false
  29088. },
  29089. "SessionNextToolSuccess": {
  29090. "type": "object",
  29091. "properties": {
  29092. "id": {
  29093. "type": "string",
  29094. "pattern": "^evt_"
  29095. },
  29096. "metadata": {
  29097. "type": "object"
  29098. },
  29099. "type": {
  29100. "type": "string",
  29101. "enum": ["session.next.tool.success"]
  29102. },
  29103. "durable": {
  29104. "type": "object",
  29105. "properties": {
  29106. "aggregateID": {
  29107. "type": "string"
  29108. },
  29109. "seq": {
  29110. "type": "integer"
  29111. },
  29112. "version": {
  29113. "type": "integer"
  29114. }
  29115. },
  29116. "required": ["aggregateID", "seq", "version"],
  29117. "additionalProperties": false
  29118. },
  29119. "location": {
  29120. "$ref": "#/components/schemas/LocationRef"
  29121. },
  29122. "data": {
  29123. "type": "object",
  29124. "properties": {
  29125. "timestamp": {
  29126. "type": "number"
  29127. },
  29128. "sessionID": {
  29129. "type": "string",
  29130. "pattern": "^ses"
  29131. },
  29132. "assistantMessageID": {
  29133. "type": "string",
  29134. "pattern": "^msg_"
  29135. },
  29136. "callID": {
  29137. "type": "string"
  29138. },
  29139. "structured": {
  29140. "type": "object"
  29141. },
  29142. "content": {
  29143. "type": "array",
  29144. "items": {
  29145. "$ref": "#/components/schemas/LLMToolContent"
  29146. }
  29147. },
  29148. "outputPaths": {
  29149. "type": "array",
  29150. "items": {
  29151. "type": "string"
  29152. }
  29153. },
  29154. "result": {},
  29155. "provider": {
  29156. "type": "object",
  29157. "properties": {
  29158. "executed": {
  29159. "type": "boolean"
  29160. },
  29161. "metadata": {
  29162. "$ref": "#/components/schemas/LLMProviderMetadata"
  29163. }
  29164. },
  29165. "required": ["executed"],
  29166. "additionalProperties": false
  29167. }
  29168. },
  29169. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29170. "additionalProperties": false
  29171. }
  29172. },
  29173. "required": ["id", "type", "data"],
  29174. "additionalProperties": false
  29175. },
  29176. "SessionNextToolFailed": {
  29177. "type": "object",
  29178. "properties": {
  29179. "id": {
  29180. "type": "string",
  29181. "pattern": "^evt_"
  29182. },
  29183. "metadata": {
  29184. "type": "object"
  29185. },
  29186. "type": {
  29187. "type": "string",
  29188. "enum": ["session.next.tool.failed"]
  29189. },
  29190. "durable": {
  29191. "type": "object",
  29192. "properties": {
  29193. "aggregateID": {
  29194. "type": "string"
  29195. },
  29196. "seq": {
  29197. "type": "integer"
  29198. },
  29199. "version": {
  29200. "type": "integer"
  29201. }
  29202. },
  29203. "required": ["aggregateID", "seq", "version"],
  29204. "additionalProperties": false
  29205. },
  29206. "location": {
  29207. "$ref": "#/components/schemas/LocationRef"
  29208. },
  29209. "data": {
  29210. "type": "object",
  29211. "properties": {
  29212. "timestamp": {
  29213. "type": "number"
  29214. },
  29215. "sessionID": {
  29216. "type": "string",
  29217. "pattern": "^ses"
  29218. },
  29219. "assistantMessageID": {
  29220. "type": "string",
  29221. "pattern": "^msg_"
  29222. },
  29223. "callID": {
  29224. "type": "string"
  29225. },
  29226. "error": {
  29227. "$ref": "#/components/schemas/SessionErrorUnknown"
  29228. },
  29229. "result": {},
  29230. "provider": {
  29231. "type": "object",
  29232. "properties": {
  29233. "executed": {
  29234. "type": "boolean"
  29235. },
  29236. "metadata": {
  29237. "$ref": "#/components/schemas/LLMProviderMetadata"
  29238. }
  29239. },
  29240. "required": ["executed"],
  29241. "additionalProperties": false
  29242. }
  29243. },
  29244. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29245. "additionalProperties": false
  29246. }
  29247. },
  29248. "required": ["id", "type", "data"],
  29249. "additionalProperties": false
  29250. },
  29251. "SessionNextReasoningStarted": {
  29252. "type": "object",
  29253. "properties": {
  29254. "id": {
  29255. "type": "string",
  29256. "pattern": "^evt_"
  29257. },
  29258. "metadata": {
  29259. "type": "object"
  29260. },
  29261. "type": {
  29262. "type": "string",
  29263. "enum": ["session.next.reasoning.started"]
  29264. },
  29265. "durable": {
  29266. "type": "object",
  29267. "properties": {
  29268. "aggregateID": {
  29269. "type": "string"
  29270. },
  29271. "seq": {
  29272. "type": "integer"
  29273. },
  29274. "version": {
  29275. "type": "integer"
  29276. }
  29277. },
  29278. "required": ["aggregateID", "seq", "version"],
  29279. "additionalProperties": false
  29280. },
  29281. "location": {
  29282. "$ref": "#/components/schemas/LocationRef"
  29283. },
  29284. "data": {
  29285. "type": "object",
  29286. "properties": {
  29287. "timestamp": {
  29288. "type": "number"
  29289. },
  29290. "sessionID": {
  29291. "type": "string",
  29292. "pattern": "^ses"
  29293. },
  29294. "assistantMessageID": {
  29295. "type": "string",
  29296. "pattern": "^msg_"
  29297. },
  29298. "reasoningID": {
  29299. "type": "string"
  29300. },
  29301. "providerMetadata": {
  29302. "$ref": "#/components/schemas/LLMProviderMetadata"
  29303. }
  29304. },
  29305. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29306. "additionalProperties": false
  29307. }
  29308. },
  29309. "required": ["id", "type", "data"],
  29310. "additionalProperties": false
  29311. },
  29312. "SessionNextReasoningEnded": {
  29313. "type": "object",
  29314. "properties": {
  29315. "id": {
  29316. "type": "string",
  29317. "pattern": "^evt_"
  29318. },
  29319. "metadata": {
  29320. "type": "object"
  29321. },
  29322. "type": {
  29323. "type": "string",
  29324. "enum": ["session.next.reasoning.ended"]
  29325. },
  29326. "durable": {
  29327. "type": "object",
  29328. "properties": {
  29329. "aggregateID": {
  29330. "type": "string"
  29331. },
  29332. "seq": {
  29333. "type": "integer"
  29334. },
  29335. "version": {
  29336. "type": "integer"
  29337. }
  29338. },
  29339. "required": ["aggregateID", "seq", "version"],
  29340. "additionalProperties": false
  29341. },
  29342. "location": {
  29343. "$ref": "#/components/schemas/LocationRef"
  29344. },
  29345. "data": {
  29346. "type": "object",
  29347. "properties": {
  29348. "timestamp": {
  29349. "type": "number"
  29350. },
  29351. "sessionID": {
  29352. "type": "string",
  29353. "pattern": "^ses"
  29354. },
  29355. "assistantMessageID": {
  29356. "type": "string",
  29357. "pattern": "^msg_"
  29358. },
  29359. "reasoningID": {
  29360. "type": "string"
  29361. },
  29362. "text": {
  29363. "type": "string"
  29364. },
  29365. "providerMetadata": {
  29366. "$ref": "#/components/schemas/LLMProviderMetadata"
  29367. }
  29368. },
  29369. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29370. "additionalProperties": false
  29371. }
  29372. },
  29373. "required": ["id", "type", "data"],
  29374. "additionalProperties": false
  29375. },
  29376. "SessionNextRetried": {
  29377. "type": "object",
  29378. "properties": {
  29379. "id": {
  29380. "type": "string",
  29381. "pattern": "^evt_"
  29382. },
  29383. "metadata": {
  29384. "type": "object"
  29385. },
  29386. "type": {
  29387. "type": "string",
  29388. "enum": ["session.next.retried"]
  29389. },
  29390. "durable": {
  29391. "type": "object",
  29392. "properties": {
  29393. "aggregateID": {
  29394. "type": "string"
  29395. },
  29396. "seq": {
  29397. "type": "integer"
  29398. },
  29399. "version": {
  29400. "type": "integer"
  29401. }
  29402. },
  29403. "required": ["aggregateID", "seq", "version"],
  29404. "additionalProperties": false
  29405. },
  29406. "location": {
  29407. "$ref": "#/components/schemas/LocationRef"
  29408. },
  29409. "data": {
  29410. "type": "object",
  29411. "properties": {
  29412. "timestamp": {
  29413. "type": "number"
  29414. },
  29415. "sessionID": {
  29416. "type": "string",
  29417. "pattern": "^ses"
  29418. },
  29419. "attempt": {
  29420. "type": "number"
  29421. },
  29422. "error": {
  29423. "$ref": "#/components/schemas/SessionNextRetry_error"
  29424. }
  29425. },
  29426. "required": ["timestamp", "sessionID", "attempt", "error"],
  29427. "additionalProperties": false
  29428. }
  29429. },
  29430. "required": ["id", "type", "data"],
  29431. "additionalProperties": false
  29432. },
  29433. "SessionNextCompactionStarted": {
  29434. "type": "object",
  29435. "properties": {
  29436. "id": {
  29437. "type": "string",
  29438. "pattern": "^evt_"
  29439. },
  29440. "metadata": {
  29441. "type": "object"
  29442. },
  29443. "type": {
  29444. "type": "string",
  29445. "enum": ["session.next.compaction.started"]
  29446. },
  29447. "durable": {
  29448. "type": "object",
  29449. "properties": {
  29450. "aggregateID": {
  29451. "type": "string"
  29452. },
  29453. "seq": {
  29454. "type": "integer"
  29455. },
  29456. "version": {
  29457. "type": "integer"
  29458. }
  29459. },
  29460. "required": ["aggregateID", "seq", "version"],
  29461. "additionalProperties": false
  29462. },
  29463. "location": {
  29464. "$ref": "#/components/schemas/LocationRef"
  29465. },
  29466. "data": {
  29467. "type": "object",
  29468. "properties": {
  29469. "timestamp": {
  29470. "type": "number"
  29471. },
  29472. "sessionID": {
  29473. "type": "string",
  29474. "pattern": "^ses"
  29475. },
  29476. "messageID": {
  29477. "type": "string",
  29478. "pattern": "^msg_"
  29479. },
  29480. "reason": {
  29481. "type": "string",
  29482. "enum": ["auto", "manual"]
  29483. }
  29484. },
  29485. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29486. "additionalProperties": false
  29487. }
  29488. },
  29489. "required": ["id", "type", "data"],
  29490. "additionalProperties": false
  29491. },
  29492. "SessionNextCompactionEnded": {
  29493. "type": "object",
  29494. "properties": {
  29495. "id": {
  29496. "type": "string",
  29497. "pattern": "^evt_"
  29498. },
  29499. "metadata": {
  29500. "type": "object"
  29501. },
  29502. "type": {
  29503. "type": "string",
  29504. "enum": ["session.next.compaction.ended"]
  29505. },
  29506. "durable": {
  29507. "type": "object",
  29508. "properties": {
  29509. "aggregateID": {
  29510. "type": "string"
  29511. },
  29512. "seq": {
  29513. "type": "integer"
  29514. },
  29515. "version": {
  29516. "type": "integer"
  29517. }
  29518. },
  29519. "required": ["aggregateID", "seq", "version"],
  29520. "additionalProperties": false
  29521. },
  29522. "location": {
  29523. "$ref": "#/components/schemas/LocationRef"
  29524. },
  29525. "data": {
  29526. "type": "object",
  29527. "properties": {
  29528. "timestamp": {
  29529. "type": "number"
  29530. },
  29531. "sessionID": {
  29532. "type": "string",
  29533. "pattern": "^ses"
  29534. },
  29535. "messageID": {
  29536. "type": "string",
  29537. "pattern": "^msg_"
  29538. },
  29539. "reason": {
  29540. "type": "string",
  29541. "enum": ["auto", "manual"]
  29542. },
  29543. "text": {
  29544. "type": "string"
  29545. },
  29546. "recent": {
  29547. "type": "string"
  29548. }
  29549. },
  29550. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  29551. "additionalProperties": false
  29552. }
  29553. },
  29554. "required": ["id", "type", "data"],
  29555. "additionalProperties": false
  29556. },
  29557. "SessionNextRevertStaged": {
  29558. "type": "object",
  29559. "properties": {
  29560. "id": {
  29561. "type": "string",
  29562. "pattern": "^evt_"
  29563. },
  29564. "metadata": {
  29565. "type": "object"
  29566. },
  29567. "type": {
  29568. "type": "string",
  29569. "enum": ["session.next.revert.staged"]
  29570. },
  29571. "durable": {
  29572. "type": "object",
  29573. "properties": {
  29574. "aggregateID": {
  29575. "type": "string"
  29576. },
  29577. "seq": {
  29578. "type": "integer"
  29579. },
  29580. "version": {
  29581. "type": "integer"
  29582. }
  29583. },
  29584. "required": ["aggregateID", "seq", "version"],
  29585. "additionalProperties": false
  29586. },
  29587. "location": {
  29588. "$ref": "#/components/schemas/LocationRef"
  29589. },
  29590. "data": {
  29591. "type": "object",
  29592. "properties": {
  29593. "timestamp": {
  29594. "type": "number"
  29595. },
  29596. "sessionID": {
  29597. "type": "string",
  29598. "pattern": "^ses"
  29599. },
  29600. "revert": {
  29601. "$ref": "#/components/schemas/RevertState"
  29602. }
  29603. },
  29604. "required": ["timestamp", "sessionID", "revert"],
  29605. "additionalProperties": false
  29606. }
  29607. },
  29608. "required": ["id", "type", "data"],
  29609. "additionalProperties": false
  29610. },
  29611. "SessionNextRevertCleared": {
  29612. "type": "object",
  29613. "properties": {
  29614. "id": {
  29615. "type": "string",
  29616. "pattern": "^evt_"
  29617. },
  29618. "metadata": {
  29619. "type": "object"
  29620. },
  29621. "type": {
  29622. "type": "string",
  29623. "enum": ["session.next.revert.cleared"]
  29624. },
  29625. "durable": {
  29626. "type": "object",
  29627. "properties": {
  29628. "aggregateID": {
  29629. "type": "string"
  29630. },
  29631. "seq": {
  29632. "type": "integer"
  29633. },
  29634. "version": {
  29635. "type": "integer"
  29636. }
  29637. },
  29638. "required": ["aggregateID", "seq", "version"],
  29639. "additionalProperties": false
  29640. },
  29641. "location": {
  29642. "$ref": "#/components/schemas/LocationRef"
  29643. },
  29644. "data": {
  29645. "type": "object",
  29646. "properties": {
  29647. "timestamp": {
  29648. "type": "number"
  29649. },
  29650. "sessionID": {
  29651. "type": "string",
  29652. "pattern": "^ses"
  29653. }
  29654. },
  29655. "required": ["timestamp", "sessionID"],
  29656. "additionalProperties": false
  29657. }
  29658. },
  29659. "required": ["id", "type", "data"],
  29660. "additionalProperties": false
  29661. },
  29662. "SessionNextRevertCommitted": {
  29663. "type": "object",
  29664. "properties": {
  29665. "id": {
  29666. "type": "string",
  29667. "pattern": "^evt_"
  29668. },
  29669. "metadata": {
  29670. "type": "object"
  29671. },
  29672. "type": {
  29673. "type": "string",
  29674. "enum": ["session.next.revert.committed"]
  29675. },
  29676. "durable": {
  29677. "type": "object",
  29678. "properties": {
  29679. "aggregateID": {
  29680. "type": "string"
  29681. },
  29682. "seq": {
  29683. "type": "integer"
  29684. },
  29685. "version": {
  29686. "type": "integer"
  29687. }
  29688. },
  29689. "required": ["aggregateID", "seq", "version"],
  29690. "additionalProperties": false
  29691. },
  29692. "location": {
  29693. "$ref": "#/components/schemas/LocationRef"
  29694. },
  29695. "data": {
  29696. "type": "object",
  29697. "properties": {
  29698. "timestamp": {
  29699. "type": "number"
  29700. },
  29701. "sessionID": {
  29702. "type": "string",
  29703. "pattern": "^ses"
  29704. },
  29705. "messageID": {
  29706. "type": "string",
  29707. "pattern": "^msg_"
  29708. }
  29709. },
  29710. "required": ["timestamp", "sessionID", "messageID"],
  29711. "additionalProperties": false
  29712. }
  29713. },
  29714. "required": ["id", "type", "data"],
  29715. "additionalProperties": false
  29716. },
  29717. "ModelApi": {
  29718. "anyOf": [
  29719. {
  29720. "type": "object",
  29721. "properties": {
  29722. "id": {
  29723. "type": "string"
  29724. },
  29725. "type": {
  29726. "type": "string",
  29727. "enum": ["aisdk"]
  29728. },
  29729. "package": {
  29730. "type": "string"
  29731. },
  29732. "url": {
  29733. "type": "string"
  29734. },
  29735. "settings": {
  29736. "type": "object"
  29737. }
  29738. },
  29739. "required": ["id", "type", "package"],
  29740. "additionalProperties": false
  29741. },
  29742. {
  29743. "type": "object",
  29744. "properties": {
  29745. "id": {
  29746. "type": "string"
  29747. },
  29748. "type": {
  29749. "type": "string",
  29750. "enum": ["native"]
  29751. },
  29752. "url": {
  29753. "type": "string"
  29754. },
  29755. "settings": {
  29756. "type": "object"
  29757. }
  29758. },
  29759. "required": ["id", "type", "settings"],
  29760. "additionalProperties": false
  29761. }
  29762. ]
  29763. },
  29764. "ModelCapabilities": {
  29765. "type": "object",
  29766. "properties": {
  29767. "tools": {
  29768. "type": "boolean"
  29769. },
  29770. "input": {
  29771. "type": "array",
  29772. "items": {
  29773. "type": "string"
  29774. }
  29775. },
  29776. "output": {
  29777. "type": "array",
  29778. "items": {
  29779. "type": "string"
  29780. }
  29781. }
  29782. },
  29783. "required": ["tools", "input", "output"],
  29784. "additionalProperties": false
  29785. },
  29786. "ModelCost": {
  29787. "type": "object",
  29788. "properties": {
  29789. "tier": {
  29790. "type": "object",
  29791. "properties": {
  29792. "type": {
  29793. "type": "string",
  29794. "enum": ["context"]
  29795. },
  29796. "size": {
  29797. "type": "integer"
  29798. }
  29799. },
  29800. "required": ["type", "size"],
  29801. "additionalProperties": false
  29802. },
  29803. "input": {
  29804. "type": "number"
  29805. },
  29806. "output": {
  29807. "type": "number"
  29808. },
  29809. "cache": {
  29810. "type": "object",
  29811. "properties": {
  29812. "read": {
  29813. "type": "number"
  29814. },
  29815. "write": {
  29816. "type": "number"
  29817. }
  29818. },
  29819. "required": ["read", "write"],
  29820. "additionalProperties": false
  29821. }
  29822. },
  29823. "required": ["input", "output", "cache"],
  29824. "additionalProperties": false
  29825. },
  29826. "ModelV2Info": {
  29827. "type": "object",
  29828. "properties": {
  29829. "id": {
  29830. "type": "string"
  29831. },
  29832. "providerID": {
  29833. "type": "string"
  29834. },
  29835. "family": {
  29836. "type": "string"
  29837. },
  29838. "name": {
  29839. "type": "string"
  29840. },
  29841. "api": {
  29842. "$ref": "#/components/schemas/ModelApi"
  29843. },
  29844. "capabilities": {
  29845. "$ref": "#/components/schemas/ModelCapabilities"
  29846. },
  29847. "request": {
  29848. "type": "object",
  29849. "properties": {
  29850. "headers": {
  29851. "type": "object",
  29852. "additionalProperties": {
  29853. "type": "string"
  29854. }
  29855. },
  29856. "body": {
  29857. "type": "object"
  29858. },
  29859. "variant": {
  29860. "type": "string"
  29861. }
  29862. },
  29863. "required": ["headers", "body"],
  29864. "additionalProperties": false
  29865. },
  29866. "variants": {
  29867. "type": "array",
  29868. "items": {
  29869. "type": "object",
  29870. "properties": {
  29871. "id": {
  29872. "type": "string"
  29873. },
  29874. "headers": {
  29875. "type": "object",
  29876. "additionalProperties": {
  29877. "type": "string"
  29878. }
  29879. },
  29880. "body": {
  29881. "type": "object"
  29882. }
  29883. },
  29884. "required": ["id", "headers", "body"],
  29885. "additionalProperties": false
  29886. }
  29887. },
  29888. "time": {
  29889. "type": "object",
  29890. "properties": {
  29891. "released": {
  29892. "type": "number"
  29893. }
  29894. },
  29895. "required": ["released"],
  29896. "additionalProperties": false
  29897. },
  29898. "cost": {
  29899. "type": "array",
  29900. "items": {
  29901. "$ref": "#/components/schemas/ModelCost"
  29902. }
  29903. },
  29904. "status": {
  29905. "type": "string",
  29906. "enum": ["alpha", "beta", "deprecated", "active"]
  29907. },
  29908. "enabled": {
  29909. "type": "boolean"
  29910. },
  29911. "limit": {
  29912. "type": "object",
  29913. "properties": {
  29914. "context": {
  29915. "type": "integer"
  29916. },
  29917. "input": {
  29918. "type": "integer"
  29919. },
  29920. "output": {
  29921. "type": "integer"
  29922. }
  29923. },
  29924. "required": ["context", "output"],
  29925. "additionalProperties": false
  29926. }
  29927. },
  29928. "required": [
  29929. "id",
  29930. "providerID",
  29931. "name",
  29932. "api",
  29933. "capabilities",
  29934. "request",
  29935. "variants",
  29936. "time",
  29937. "cost",
  29938. "status",
  29939. "enabled",
  29940. "limit"
  29941. ],
  29942. "additionalProperties": false
  29943. },
  29944. "ProviderAISDK": {
  29945. "type": "object",
  29946. "properties": {
  29947. "type": {
  29948. "type": "string",
  29949. "enum": ["aisdk"]
  29950. },
  29951. "package": {
  29952. "type": "string"
  29953. },
  29954. "url": {
  29955. "type": "string"
  29956. },
  29957. "settings": {
  29958. "type": "object"
  29959. }
  29960. },
  29961. "required": ["type", "package"],
  29962. "additionalProperties": false
  29963. },
  29964. "ProviderNative": {
  29965. "type": "object",
  29966. "properties": {
  29967. "type": {
  29968. "type": "string",
  29969. "enum": ["native"]
  29970. },
  29971. "url": {
  29972. "type": "string"
  29973. },
  29974. "settings": {
  29975. "type": "object"
  29976. }
  29977. },
  29978. "required": ["type", "settings"],
  29979. "additionalProperties": false
  29980. },
  29981. "ProviderApi": {
  29982. "anyOf": [
  29983. {
  29984. "$ref": "#/components/schemas/ProviderAISDK"
  29985. },
  29986. {
  29987. "$ref": "#/components/schemas/ProviderNative"
  29988. }
  29989. ]
  29990. },
  29991. "ProviderV2Info": {
  29992. "type": "object",
  29993. "properties": {
  29994. "id": {
  29995. "type": "string"
  29996. },
  29997. "integrationID": {
  29998. "type": "string"
  29999. },
  30000. "name": {
  30001. "type": "string"
  30002. },
  30003. "disabled": {
  30004. "type": "boolean"
  30005. },
  30006. "api": {
  30007. "$ref": "#/components/schemas/ProviderApi"
  30008. },
  30009. "request": {
  30010. "$ref": "#/components/schemas/ProviderRequest"
  30011. }
  30012. },
  30013. "required": ["id", "name", "api", "request"],
  30014. "additionalProperties": false
  30015. },
  30016. "IntegrationWhen": {
  30017. "type": "object",
  30018. "properties": {
  30019. "key": {
  30020. "type": "string"
  30021. },
  30022. "op": {
  30023. "type": "string",
  30024. "enum": ["eq", "neq"]
  30025. },
  30026. "value": {
  30027. "type": "string"
  30028. }
  30029. },
  30030. "required": ["key", "op", "value"],
  30031. "additionalProperties": false
  30032. },
  30033. "IntegrationTextPrompt": {
  30034. "type": "object",
  30035. "properties": {
  30036. "type": {
  30037. "type": "string",
  30038. "enum": ["text"]
  30039. },
  30040. "key": {
  30041. "type": "string"
  30042. },
  30043. "message": {
  30044. "type": "string"
  30045. },
  30046. "placeholder": {
  30047. "type": "string"
  30048. },
  30049. "when": {
  30050. "$ref": "#/components/schemas/IntegrationWhen"
  30051. }
  30052. },
  30053. "required": ["type", "key", "message"],
  30054. "additionalProperties": false
  30055. },
  30056. "IntegrationSelectPrompt": {
  30057. "type": "object",
  30058. "properties": {
  30059. "type": {
  30060. "type": "string",
  30061. "enum": ["select"]
  30062. },
  30063. "key": {
  30064. "type": "string"
  30065. },
  30066. "message": {
  30067. "type": "string"
  30068. },
  30069. "options": {
  30070. "type": "array",
  30071. "items": {
  30072. "type": "object",
  30073. "properties": {
  30074. "label": {
  30075. "type": "string"
  30076. },
  30077. "value": {
  30078. "type": "string"
  30079. },
  30080. "hint": {
  30081. "type": "string"
  30082. }
  30083. },
  30084. "required": ["label", "value"],
  30085. "additionalProperties": false
  30086. }
  30087. },
  30088. "when": {
  30089. "$ref": "#/components/schemas/IntegrationWhen"
  30090. }
  30091. },
  30092. "required": ["type", "key", "message", "options"],
  30093. "additionalProperties": false
  30094. },
  30095. "IntegrationOAuthMethod": {
  30096. "type": "object",
  30097. "properties": {
  30098. "id": {
  30099. "type": "string"
  30100. },
  30101. "type": {
  30102. "type": "string",
  30103. "enum": ["oauth"]
  30104. },
  30105. "label": {
  30106. "type": "string"
  30107. },
  30108. "prompts": {
  30109. "type": "array",
  30110. "items": {
  30111. "anyOf": [
  30112. {
  30113. "$ref": "#/components/schemas/IntegrationTextPrompt"
  30114. },
  30115. {
  30116. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  30117. }
  30118. ]
  30119. }
  30120. }
  30121. },
  30122. "required": ["id", "type", "label"],
  30123. "additionalProperties": false
  30124. },
  30125. "IntegrationKeyMethod": {
  30126. "type": "object",
  30127. "properties": {
  30128. "type": {
  30129. "type": "string",
  30130. "enum": ["key"]
  30131. },
  30132. "label": {
  30133. "type": "string"
  30134. }
  30135. },
  30136. "required": ["type"],
  30137. "additionalProperties": false
  30138. },
  30139. "IntegrationEnvMethod": {
  30140. "type": "object",
  30141. "properties": {
  30142. "type": {
  30143. "type": "string",
  30144. "enum": ["env"]
  30145. },
  30146. "names": {
  30147. "type": "array",
  30148. "items": {
  30149. "type": "string"
  30150. }
  30151. }
  30152. },
  30153. "required": ["type", "names"],
  30154. "additionalProperties": false
  30155. },
  30156. "ConnectionCredentialInfo": {
  30157. "type": "object",
  30158. "properties": {
  30159. "type": {
  30160. "type": "string",
  30161. "enum": ["credential"]
  30162. },
  30163. "id": {
  30164. "type": "string"
  30165. },
  30166. "label": {
  30167. "type": "string"
  30168. }
  30169. },
  30170. "required": ["type", "id", "label"],
  30171. "additionalProperties": false
  30172. },
  30173. "ConnectionEnvInfo": {
  30174. "type": "object",
  30175. "properties": {
  30176. "type": {
  30177. "type": "string",
  30178. "enum": ["env"]
  30179. },
  30180. "name": {
  30181. "type": "string"
  30182. }
  30183. },
  30184. "required": ["type", "name"],
  30185. "additionalProperties": false
  30186. },
  30187. "ConnectionInfo": {
  30188. "anyOf": [
  30189. {
  30190. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  30191. },
  30192. {
  30193. "$ref": "#/components/schemas/ConnectionEnvInfo"
  30194. }
  30195. ]
  30196. },
  30197. "IntegrationInfo": {
  30198. "type": "object",
  30199. "properties": {
  30200. "id": {
  30201. "type": "string"
  30202. },
  30203. "name": {
  30204. "type": "string"
  30205. },
  30206. "methods": {
  30207. "type": "array",
  30208. "items": {
  30209. "$ref": "#/components/schemas/IntegrationMethod"
  30210. }
  30211. },
  30212. "connections": {
  30213. "type": "array",
  30214. "items": {
  30215. "$ref": "#/components/schemas/ConnectionInfo"
  30216. }
  30217. }
  30218. },
  30219. "required": ["id", "name", "methods", "connections"],
  30220. "additionalProperties": false
  30221. },
  30222. "IntegrationAttempt": {
  30223. "type": "object",
  30224. "properties": {
  30225. "attemptID": {
  30226. "type": "string"
  30227. },
  30228. "url": {
  30229. "type": "string"
  30230. },
  30231. "instructions": {
  30232. "type": "string"
  30233. },
  30234. "mode": {
  30235. "type": "string",
  30236. "enum": ["auto", "code"]
  30237. },
  30238. "time": {
  30239. "type": "object",
  30240. "properties": {
  30241. "created": {
  30242. "anyOf": [
  30243. {
  30244. "type": "number"
  30245. },
  30246. {
  30247. "type": "string",
  30248. "enum": ["NaN"]
  30249. },
  30250. {
  30251. "type": "string",
  30252. "enum": ["Infinity"]
  30253. },
  30254. {
  30255. "type": "string",
  30256. "enum": ["-Infinity"]
  30257. },
  30258. {
  30259. "type": "string",
  30260. "enum": ["Infinity", "-Infinity", "NaN"]
  30261. }
  30262. ]
  30263. },
  30264. "expires": {
  30265. "anyOf": [
  30266. {
  30267. "type": "number"
  30268. },
  30269. {
  30270. "type": "string",
  30271. "enum": ["NaN"]
  30272. },
  30273. {
  30274. "type": "string",
  30275. "enum": ["Infinity"]
  30276. },
  30277. {
  30278. "type": "string",
  30279. "enum": ["-Infinity"]
  30280. },
  30281. {
  30282. "type": "string",
  30283. "enum": ["Infinity", "-Infinity", "NaN"]
  30284. }
  30285. ]
  30286. }
  30287. },
  30288. "required": ["created", "expires"],
  30289. "additionalProperties": false
  30290. }
  30291. },
  30292. "required": ["attemptID", "url", "instructions", "mode", "time"],
  30293. "additionalProperties": false
  30294. },
  30295. "IntegrationAttemptStatus": {
  30296. "anyOf": [
  30297. {
  30298. "type": "object",
  30299. "properties": {
  30300. "status": {
  30301. "type": "string",
  30302. "enum": ["pending"]
  30303. },
  30304. "time": {
  30305. "type": "object",
  30306. "properties": {
  30307. "created": {
  30308. "anyOf": [
  30309. {
  30310. "type": "number"
  30311. },
  30312. {
  30313. "type": "string",
  30314. "enum": ["NaN"]
  30315. },
  30316. {
  30317. "type": "string",
  30318. "enum": ["Infinity"]
  30319. },
  30320. {
  30321. "type": "string",
  30322. "enum": ["-Infinity"]
  30323. },
  30324. {
  30325. "type": "string",
  30326. "enum": ["Infinity", "-Infinity", "NaN"]
  30327. }
  30328. ]
  30329. },
  30330. "expires": {
  30331. "anyOf": [
  30332. {
  30333. "type": "number"
  30334. },
  30335. {
  30336. "type": "string",
  30337. "enum": ["NaN"]
  30338. },
  30339. {
  30340. "type": "string",
  30341. "enum": ["Infinity"]
  30342. },
  30343. {
  30344. "type": "string",
  30345. "enum": ["-Infinity"]
  30346. },
  30347. {
  30348. "type": "string",
  30349. "enum": ["Infinity", "-Infinity", "NaN"]
  30350. }
  30351. ]
  30352. }
  30353. },
  30354. "required": ["created", "expires"],
  30355. "additionalProperties": false
  30356. }
  30357. },
  30358. "required": ["status", "time"],
  30359. "additionalProperties": false
  30360. },
  30361. {
  30362. "type": "object",
  30363. "properties": {
  30364. "status": {
  30365. "type": "string",
  30366. "enum": ["complete"]
  30367. },
  30368. "time": {
  30369. "type": "object",
  30370. "properties": {
  30371. "created": {
  30372. "anyOf": [
  30373. {
  30374. "type": "number"
  30375. },
  30376. {
  30377. "type": "string",
  30378. "enum": ["NaN"]
  30379. },
  30380. {
  30381. "type": "string",
  30382. "enum": ["Infinity"]
  30383. },
  30384. {
  30385. "type": "string",
  30386. "enum": ["-Infinity"]
  30387. },
  30388. {
  30389. "type": "string",
  30390. "enum": ["Infinity", "-Infinity", "NaN"]
  30391. }
  30392. ]
  30393. },
  30394. "expires": {
  30395. "anyOf": [
  30396. {
  30397. "type": "number"
  30398. },
  30399. {
  30400. "type": "string",
  30401. "enum": ["NaN"]
  30402. },
  30403. {
  30404. "type": "string",
  30405. "enum": ["Infinity"]
  30406. },
  30407. {
  30408. "type": "string",
  30409. "enum": ["-Infinity"]
  30410. },
  30411. {
  30412. "type": "string",
  30413. "enum": ["Infinity", "-Infinity", "NaN"]
  30414. }
  30415. ]
  30416. }
  30417. },
  30418. "required": ["created", "expires"],
  30419. "additionalProperties": false
  30420. }
  30421. },
  30422. "required": ["status", "time"],
  30423. "additionalProperties": false
  30424. },
  30425. {
  30426. "type": "object",
  30427. "properties": {
  30428. "status": {
  30429. "type": "string",
  30430. "enum": ["failed"]
  30431. },
  30432. "message": {
  30433. "type": "string"
  30434. },
  30435. "time": {
  30436. "type": "object",
  30437. "properties": {
  30438. "created": {
  30439. "anyOf": [
  30440. {
  30441. "type": "number"
  30442. },
  30443. {
  30444. "type": "string",
  30445. "enum": ["NaN"]
  30446. },
  30447. {
  30448. "type": "string",
  30449. "enum": ["Infinity"]
  30450. },
  30451. {
  30452. "type": "string",
  30453. "enum": ["-Infinity"]
  30454. },
  30455. {
  30456. "type": "string",
  30457. "enum": ["Infinity", "-Infinity", "NaN"]
  30458. }
  30459. ]
  30460. },
  30461. "expires": {
  30462. "anyOf": [
  30463. {
  30464. "type": "number"
  30465. },
  30466. {
  30467. "type": "string",
  30468. "enum": ["NaN"]
  30469. },
  30470. {
  30471. "type": "string",
  30472. "enum": ["Infinity"]
  30473. },
  30474. {
  30475. "type": "string",
  30476. "enum": ["-Infinity"]
  30477. },
  30478. {
  30479. "type": "string",
  30480. "enum": ["Infinity", "-Infinity", "NaN"]
  30481. }
  30482. ]
  30483. }
  30484. },
  30485. "required": ["created", "expires"],
  30486. "additionalProperties": false
  30487. }
  30488. },
  30489. "required": ["status", "message", "time"],
  30490. "additionalProperties": false
  30491. },
  30492. {
  30493. "type": "object",
  30494. "properties": {
  30495. "status": {
  30496. "type": "string",
  30497. "enum": ["expired"]
  30498. },
  30499. "time": {
  30500. "type": "object",
  30501. "properties": {
  30502. "created": {
  30503. "anyOf": [
  30504. {
  30505. "type": "number"
  30506. },
  30507. {
  30508. "type": "string",
  30509. "enum": ["NaN"]
  30510. },
  30511. {
  30512. "type": "string",
  30513. "enum": ["Infinity"]
  30514. },
  30515. {
  30516. "type": "string",
  30517. "enum": ["-Infinity"]
  30518. },
  30519. {
  30520. "type": "string",
  30521. "enum": ["Infinity", "-Infinity", "NaN"]
  30522. }
  30523. ]
  30524. },
  30525. "expires": {
  30526. "anyOf": [
  30527. {
  30528. "type": "number"
  30529. },
  30530. {
  30531. "type": "string",
  30532. "enum": ["NaN"]
  30533. },
  30534. {
  30535. "type": "string",
  30536. "enum": ["Infinity"]
  30537. },
  30538. {
  30539. "type": "string",
  30540. "enum": ["-Infinity"]
  30541. },
  30542. {
  30543. "type": "string",
  30544. "enum": ["Infinity", "-Infinity", "NaN"]
  30545. }
  30546. ]
  30547. }
  30548. },
  30549. "required": ["created", "expires"],
  30550. "additionalProperties": false
  30551. }
  30552. },
  30553. "required": ["status", "time"],
  30554. "additionalProperties": false
  30555. }
  30556. ]
  30557. },
  30558. "PermissionV2Request": {
  30559. "type": "object",
  30560. "properties": {
  30561. "id": {
  30562. "type": "string",
  30563. "pattern": "^per"
  30564. },
  30565. "sessionID": {
  30566. "type": "string",
  30567. "pattern": "^ses"
  30568. },
  30569. "action": {
  30570. "type": "string"
  30571. },
  30572. "resources": {
  30573. "type": "array",
  30574. "items": {
  30575. "type": "string"
  30576. }
  30577. },
  30578. "save": {
  30579. "type": "array",
  30580. "items": {
  30581. "type": "string"
  30582. }
  30583. },
  30584. "metadata": {
  30585. "type": "object"
  30586. },
  30587. "source": {
  30588. "$ref": "#/components/schemas/PermissionV2Source"
  30589. }
  30590. },
  30591. "required": ["id", "sessionID", "action", "resources"],
  30592. "additionalProperties": false
  30593. },
  30594. "PermissionSavedInfo": {
  30595. "type": "object",
  30596. "properties": {
  30597. "id": {
  30598. "type": "string"
  30599. },
  30600. "projectID": {
  30601. "type": "string"
  30602. },
  30603. "action": {
  30604. "type": "string"
  30605. },
  30606. "resource": {
  30607. "type": "string"
  30608. }
  30609. },
  30610. "required": ["id", "projectID", "action", "resource"],
  30611. "additionalProperties": false
  30612. },
  30613. "FileSystemEntry": {
  30614. "type": "object",
  30615. "properties": {
  30616. "path": {
  30617. "type": "string"
  30618. },
  30619. "type": {
  30620. "type": "string",
  30621. "enum": ["file", "directory"]
  30622. }
  30623. },
  30624. "required": ["path", "type"],
  30625. "additionalProperties": false
  30626. },
  30627. "CommandV2Info": {
  30628. "type": "object",
  30629. "properties": {
  30630. "name": {
  30631. "type": "string"
  30632. },
  30633. "template": {
  30634. "type": "string"
  30635. },
  30636. "description": {
  30637. "type": "string"
  30638. },
  30639. "agent": {
  30640. "type": "string"
  30641. },
  30642. "model": {
  30643. "$ref": "#/components/schemas/ModelRef"
  30644. },
  30645. "subtask": {
  30646. "type": "boolean"
  30647. }
  30648. },
  30649. "required": ["name", "template"],
  30650. "additionalProperties": false
  30651. },
  30652. "SkillV2Info": {
  30653. "type": "object",
  30654. "properties": {
  30655. "name": {
  30656. "type": "string"
  30657. },
  30658. "description": {
  30659. "type": "string"
  30660. },
  30661. "slash": {
  30662. "type": "boolean"
  30663. },
  30664. "location": {
  30665. "type": "string"
  30666. },
  30667. "content": {
  30668. "type": "string"
  30669. }
  30670. },
  30671. "required": ["name", "location", "content"],
  30672. "additionalProperties": false
  30673. },
  30674. "Models-devRefreshed": {
  30675. "type": "object",
  30676. "properties": {
  30677. "id": {
  30678. "type": "string",
  30679. "pattern": "^evt_"
  30680. },
  30681. "metadata": {
  30682. "type": "object"
  30683. },
  30684. "type": {
  30685. "type": "string",
  30686. "enum": ["models-dev.refreshed"]
  30687. },
  30688. "durable": {
  30689. "type": "object",
  30690. "properties": {
  30691. "aggregateID": {
  30692. "type": "string"
  30693. },
  30694. "seq": {
  30695. "type": "integer"
  30696. },
  30697. "version": {
  30698. "type": "integer"
  30699. }
  30700. },
  30701. "required": ["aggregateID", "seq", "version"],
  30702. "additionalProperties": false
  30703. },
  30704. "location": {
  30705. "$ref": "#/components/schemas/LocationRef"
  30706. },
  30707. "data": {
  30708. "type": "object",
  30709. "properties": {}
  30710. }
  30711. },
  30712. "required": ["id", "type", "data"],
  30713. "additionalProperties": false
  30714. },
  30715. "IntegrationUpdated": {
  30716. "type": "object",
  30717. "properties": {
  30718. "id": {
  30719. "type": "string",
  30720. "pattern": "^evt_"
  30721. },
  30722. "metadata": {
  30723. "type": "object"
  30724. },
  30725. "type": {
  30726. "type": "string",
  30727. "enum": ["integration.updated"]
  30728. },
  30729. "durable": {
  30730. "type": "object",
  30731. "properties": {
  30732. "aggregateID": {
  30733. "type": "string"
  30734. },
  30735. "seq": {
  30736. "type": "integer"
  30737. },
  30738. "version": {
  30739. "type": "integer"
  30740. }
  30741. },
  30742. "required": ["aggregateID", "seq", "version"],
  30743. "additionalProperties": false
  30744. },
  30745. "location": {
  30746. "$ref": "#/components/schemas/LocationRef"
  30747. },
  30748. "data": {
  30749. "type": "object",
  30750. "properties": {}
  30751. }
  30752. },
  30753. "required": ["id", "type", "data"],
  30754. "additionalProperties": false
  30755. },
  30756. "IntegrationConnectionUpdated": {
  30757. "type": "object",
  30758. "properties": {
  30759. "id": {
  30760. "type": "string",
  30761. "pattern": "^evt_"
  30762. },
  30763. "metadata": {
  30764. "type": "object"
  30765. },
  30766. "type": {
  30767. "type": "string",
  30768. "enum": ["integration.connection.updated"]
  30769. },
  30770. "durable": {
  30771. "type": "object",
  30772. "properties": {
  30773. "aggregateID": {
  30774. "type": "string"
  30775. },
  30776. "seq": {
  30777. "type": "integer"
  30778. },
  30779. "version": {
  30780. "type": "integer"
  30781. }
  30782. },
  30783. "required": ["aggregateID", "seq", "version"],
  30784. "additionalProperties": false
  30785. },
  30786. "location": {
  30787. "$ref": "#/components/schemas/LocationRef"
  30788. },
  30789. "data": {
  30790. "type": "object",
  30791. "properties": {
  30792. "integrationID": {
  30793. "type": "string"
  30794. }
  30795. },
  30796. "required": ["integrationID"],
  30797. "additionalProperties": false
  30798. }
  30799. },
  30800. "required": ["id", "type", "data"],
  30801. "additionalProperties": false
  30802. },
  30803. "CatalogUpdated": {
  30804. "type": "object",
  30805. "properties": {
  30806. "id": {
  30807. "type": "string",
  30808. "pattern": "^evt_"
  30809. },
  30810. "metadata": {
  30811. "type": "object"
  30812. },
  30813. "type": {
  30814. "type": "string",
  30815. "enum": ["catalog.updated"]
  30816. },
  30817. "durable": {
  30818. "type": "object",
  30819. "properties": {
  30820. "aggregateID": {
  30821. "type": "string"
  30822. },
  30823. "seq": {
  30824. "type": "integer"
  30825. },
  30826. "version": {
  30827. "type": "integer"
  30828. }
  30829. },
  30830. "required": ["aggregateID", "seq", "version"],
  30831. "additionalProperties": false
  30832. },
  30833. "location": {
  30834. "$ref": "#/components/schemas/LocationRef"
  30835. },
  30836. "data": {
  30837. "type": "object",
  30838. "properties": {}
  30839. }
  30840. },
  30841. "required": ["id", "type", "data"],
  30842. "additionalProperties": false
  30843. },
  30844. "SessionCreated": {
  30845. "type": "object",
  30846. "properties": {
  30847. "id": {
  30848. "type": "string",
  30849. "pattern": "^evt_"
  30850. },
  30851. "metadata": {
  30852. "type": "object"
  30853. },
  30854. "type": {
  30855. "type": "string",
  30856. "enum": ["session.created"]
  30857. },
  30858. "durable": {
  30859. "type": "object",
  30860. "properties": {
  30861. "aggregateID": {
  30862. "type": "string"
  30863. },
  30864. "seq": {
  30865. "type": "integer"
  30866. },
  30867. "version": {
  30868. "type": "integer"
  30869. }
  30870. },
  30871. "required": ["aggregateID", "seq", "version"],
  30872. "additionalProperties": false
  30873. },
  30874. "location": {
  30875. "$ref": "#/components/schemas/LocationRef"
  30876. },
  30877. "data": {
  30878. "type": "object",
  30879. "properties": {
  30880. "sessionID": {
  30881. "type": "string",
  30882. "pattern": "^ses"
  30883. },
  30884. "info": {
  30885. "$ref": "#/components/schemas/Session"
  30886. }
  30887. },
  30888. "required": ["sessionID", "info"],
  30889. "additionalProperties": false
  30890. }
  30891. },
  30892. "required": ["id", "type", "data"],
  30893. "additionalProperties": false
  30894. },
  30895. "SessionUpdated": {
  30896. "type": "object",
  30897. "properties": {
  30898. "id": {
  30899. "type": "string",
  30900. "pattern": "^evt_"
  30901. },
  30902. "metadata": {
  30903. "type": "object"
  30904. },
  30905. "type": {
  30906. "type": "string",
  30907. "enum": ["session.updated"]
  30908. },
  30909. "durable": {
  30910. "type": "object",
  30911. "properties": {
  30912. "aggregateID": {
  30913. "type": "string"
  30914. },
  30915. "seq": {
  30916. "type": "integer"
  30917. },
  30918. "version": {
  30919. "type": "integer"
  30920. }
  30921. },
  30922. "required": ["aggregateID", "seq", "version"],
  30923. "additionalProperties": false
  30924. },
  30925. "location": {
  30926. "$ref": "#/components/schemas/LocationRef"
  30927. },
  30928. "data": {
  30929. "type": "object",
  30930. "properties": {
  30931. "sessionID": {
  30932. "type": "string",
  30933. "pattern": "^ses"
  30934. },
  30935. "info": {
  30936. "$ref": "#/components/schemas/Session"
  30937. }
  30938. },
  30939. "required": ["sessionID", "info"],
  30940. "additionalProperties": false
  30941. }
  30942. },
  30943. "required": ["id", "type", "data"],
  30944. "additionalProperties": false
  30945. },
  30946. "SessionDeleted": {
  30947. "type": "object",
  30948. "properties": {
  30949. "id": {
  30950. "type": "string",
  30951. "pattern": "^evt_"
  30952. },
  30953. "metadata": {
  30954. "type": "object"
  30955. },
  30956. "type": {
  30957. "type": "string",
  30958. "enum": ["session.deleted"]
  30959. },
  30960. "durable": {
  30961. "type": "object",
  30962. "properties": {
  30963. "aggregateID": {
  30964. "type": "string"
  30965. },
  30966. "seq": {
  30967. "type": "integer"
  30968. },
  30969. "version": {
  30970. "type": "integer"
  30971. }
  30972. },
  30973. "required": ["aggregateID", "seq", "version"],
  30974. "additionalProperties": false
  30975. },
  30976. "location": {
  30977. "$ref": "#/components/schemas/LocationRef"
  30978. },
  30979. "data": {
  30980. "type": "object",
  30981. "properties": {
  30982. "sessionID": {
  30983. "type": "string",
  30984. "pattern": "^ses"
  30985. },
  30986. "info": {
  30987. "$ref": "#/components/schemas/Session"
  30988. }
  30989. },
  30990. "required": ["sessionID", "info"],
  30991. "additionalProperties": false
  30992. }
  30993. },
  30994. "required": ["id", "type", "data"],
  30995. "additionalProperties": false
  30996. },
  30997. "MessageUpdated": {
  30998. "type": "object",
  30999. "properties": {
  31000. "id": {
  31001. "type": "string",
  31002. "pattern": "^evt_"
  31003. },
  31004. "metadata": {
  31005. "type": "object"
  31006. },
  31007. "type": {
  31008. "type": "string",
  31009. "enum": ["message.updated"]
  31010. },
  31011. "durable": {
  31012. "type": "object",
  31013. "properties": {
  31014. "aggregateID": {
  31015. "type": "string"
  31016. },
  31017. "seq": {
  31018. "type": "integer"
  31019. },
  31020. "version": {
  31021. "type": "integer"
  31022. }
  31023. },
  31024. "required": ["aggregateID", "seq", "version"],
  31025. "additionalProperties": false
  31026. },
  31027. "location": {
  31028. "$ref": "#/components/schemas/LocationRef"
  31029. },
  31030. "data": {
  31031. "type": "object",
  31032. "properties": {
  31033. "sessionID": {
  31034. "type": "string",
  31035. "pattern": "^ses"
  31036. },
  31037. "info": {
  31038. "$ref": "#/components/schemas/Message"
  31039. }
  31040. },
  31041. "required": ["sessionID", "info"],
  31042. "additionalProperties": false
  31043. }
  31044. },
  31045. "required": ["id", "type", "data"],
  31046. "additionalProperties": false
  31047. },
  31048. "MessageRemoved": {
  31049. "type": "object",
  31050. "properties": {
  31051. "id": {
  31052. "type": "string",
  31053. "pattern": "^evt_"
  31054. },
  31055. "metadata": {
  31056. "type": "object"
  31057. },
  31058. "type": {
  31059. "type": "string",
  31060. "enum": ["message.removed"]
  31061. },
  31062. "durable": {
  31063. "type": "object",
  31064. "properties": {
  31065. "aggregateID": {
  31066. "type": "string"
  31067. },
  31068. "seq": {
  31069. "type": "integer"
  31070. },
  31071. "version": {
  31072. "type": "integer"
  31073. }
  31074. },
  31075. "required": ["aggregateID", "seq", "version"],
  31076. "additionalProperties": false
  31077. },
  31078. "location": {
  31079. "$ref": "#/components/schemas/LocationRef"
  31080. },
  31081. "data": {
  31082. "type": "object",
  31083. "properties": {
  31084. "sessionID": {
  31085. "type": "string",
  31086. "pattern": "^ses"
  31087. },
  31088. "messageID": {
  31089. "type": "string",
  31090. "pattern": "^msg"
  31091. }
  31092. },
  31093. "required": ["sessionID", "messageID"],
  31094. "additionalProperties": false
  31095. }
  31096. },
  31097. "required": ["id", "type", "data"],
  31098. "additionalProperties": false
  31099. },
  31100. "MessagePartUpdated": {
  31101. "type": "object",
  31102. "properties": {
  31103. "id": {
  31104. "type": "string",
  31105. "pattern": "^evt_"
  31106. },
  31107. "metadata": {
  31108. "type": "object"
  31109. },
  31110. "type": {
  31111. "type": "string",
  31112. "enum": ["message.part.updated"]
  31113. },
  31114. "durable": {
  31115. "type": "object",
  31116. "properties": {
  31117. "aggregateID": {
  31118. "type": "string"
  31119. },
  31120. "seq": {
  31121. "type": "integer"
  31122. },
  31123. "version": {
  31124. "type": "integer"
  31125. }
  31126. },
  31127. "required": ["aggregateID", "seq", "version"],
  31128. "additionalProperties": false
  31129. },
  31130. "location": {
  31131. "$ref": "#/components/schemas/LocationRef"
  31132. },
  31133. "data": {
  31134. "type": "object",
  31135. "properties": {
  31136. "sessionID": {
  31137. "type": "string",
  31138. "pattern": "^ses"
  31139. },
  31140. "part": {
  31141. "$ref": "#/components/schemas/Part"
  31142. },
  31143. "time": {
  31144. "type": "number"
  31145. }
  31146. },
  31147. "required": ["sessionID", "part", "time"],
  31148. "additionalProperties": false
  31149. }
  31150. },
  31151. "required": ["id", "type", "data"],
  31152. "additionalProperties": false
  31153. },
  31154. "MessagePartRemoved": {
  31155. "type": "object",
  31156. "properties": {
  31157. "id": {
  31158. "type": "string",
  31159. "pattern": "^evt_"
  31160. },
  31161. "metadata": {
  31162. "type": "object"
  31163. },
  31164. "type": {
  31165. "type": "string",
  31166. "enum": ["message.part.removed"]
  31167. },
  31168. "durable": {
  31169. "type": "object",
  31170. "properties": {
  31171. "aggregateID": {
  31172. "type": "string"
  31173. },
  31174. "seq": {
  31175. "type": "integer"
  31176. },
  31177. "version": {
  31178. "type": "integer"
  31179. }
  31180. },
  31181. "required": ["aggregateID", "seq", "version"],
  31182. "additionalProperties": false
  31183. },
  31184. "location": {
  31185. "$ref": "#/components/schemas/LocationRef"
  31186. },
  31187. "data": {
  31188. "type": "object",
  31189. "properties": {
  31190. "sessionID": {
  31191. "type": "string",
  31192. "pattern": "^ses"
  31193. },
  31194. "messageID": {
  31195. "type": "string",
  31196. "pattern": "^msg"
  31197. },
  31198. "partID": {
  31199. "type": "string",
  31200. "pattern": "^prt"
  31201. }
  31202. },
  31203. "required": ["sessionID", "messageID", "partID"],
  31204. "additionalProperties": false
  31205. }
  31206. },
  31207. "required": ["id", "type", "data"],
  31208. "additionalProperties": false
  31209. },
  31210. "SessionNextTextDelta": {
  31211. "type": "object",
  31212. "properties": {
  31213. "id": {
  31214. "type": "string",
  31215. "pattern": "^evt_"
  31216. },
  31217. "metadata": {
  31218. "type": "object"
  31219. },
  31220. "type": {
  31221. "type": "string",
  31222. "enum": ["session.next.text.delta"]
  31223. },
  31224. "durable": {
  31225. "type": "object",
  31226. "properties": {
  31227. "aggregateID": {
  31228. "type": "string"
  31229. },
  31230. "seq": {
  31231. "type": "integer"
  31232. },
  31233. "version": {
  31234. "type": "integer"
  31235. }
  31236. },
  31237. "required": ["aggregateID", "seq", "version"],
  31238. "additionalProperties": false
  31239. },
  31240. "location": {
  31241. "$ref": "#/components/schemas/LocationRef"
  31242. },
  31243. "data": {
  31244. "type": "object",
  31245. "properties": {
  31246. "timestamp": {
  31247. "type": "number"
  31248. },
  31249. "sessionID": {
  31250. "type": "string",
  31251. "pattern": "^ses"
  31252. },
  31253. "assistantMessageID": {
  31254. "type": "string",
  31255. "pattern": "^msg_"
  31256. },
  31257. "textID": {
  31258. "type": "string"
  31259. },
  31260. "delta": {
  31261. "type": "string"
  31262. }
  31263. },
  31264. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  31265. "additionalProperties": false
  31266. }
  31267. },
  31268. "required": ["id", "type", "data"],
  31269. "additionalProperties": false
  31270. },
  31271. "SessionNextReasoningDelta": {
  31272. "type": "object",
  31273. "properties": {
  31274. "id": {
  31275. "type": "string",
  31276. "pattern": "^evt_"
  31277. },
  31278. "metadata": {
  31279. "type": "object"
  31280. },
  31281. "type": {
  31282. "type": "string",
  31283. "enum": ["session.next.reasoning.delta"]
  31284. },
  31285. "durable": {
  31286. "type": "object",
  31287. "properties": {
  31288. "aggregateID": {
  31289. "type": "string"
  31290. },
  31291. "seq": {
  31292. "type": "integer"
  31293. },
  31294. "version": {
  31295. "type": "integer"
  31296. }
  31297. },
  31298. "required": ["aggregateID", "seq", "version"],
  31299. "additionalProperties": false
  31300. },
  31301. "location": {
  31302. "$ref": "#/components/schemas/LocationRef"
  31303. },
  31304. "data": {
  31305. "type": "object",
  31306. "properties": {
  31307. "timestamp": {
  31308. "type": "number"
  31309. },
  31310. "sessionID": {
  31311. "type": "string",
  31312. "pattern": "^ses"
  31313. },
  31314. "assistantMessageID": {
  31315. "type": "string",
  31316. "pattern": "^msg_"
  31317. },
  31318. "reasoningID": {
  31319. "type": "string"
  31320. },
  31321. "delta": {
  31322. "type": "string"
  31323. }
  31324. },
  31325. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  31326. "additionalProperties": false
  31327. }
  31328. },
  31329. "required": ["id", "type", "data"],
  31330. "additionalProperties": false
  31331. },
  31332. "SessionNextToolInputDelta": {
  31333. "type": "object",
  31334. "properties": {
  31335. "id": {
  31336. "type": "string",
  31337. "pattern": "^evt_"
  31338. },
  31339. "metadata": {
  31340. "type": "object"
  31341. },
  31342. "type": {
  31343. "type": "string",
  31344. "enum": ["session.next.tool.input.delta"]
  31345. },
  31346. "durable": {
  31347. "type": "object",
  31348. "properties": {
  31349. "aggregateID": {
  31350. "type": "string"
  31351. },
  31352. "seq": {
  31353. "type": "integer"
  31354. },
  31355. "version": {
  31356. "type": "integer"
  31357. }
  31358. },
  31359. "required": ["aggregateID", "seq", "version"],
  31360. "additionalProperties": false
  31361. },
  31362. "location": {
  31363. "$ref": "#/components/schemas/LocationRef"
  31364. },
  31365. "data": {
  31366. "type": "object",
  31367. "properties": {
  31368. "timestamp": {
  31369. "type": "number"
  31370. },
  31371. "sessionID": {
  31372. "type": "string",
  31373. "pattern": "^ses"
  31374. },
  31375. "assistantMessageID": {
  31376. "type": "string",
  31377. "pattern": "^msg_"
  31378. },
  31379. "callID": {
  31380. "type": "string"
  31381. },
  31382. "delta": {
  31383. "type": "string"
  31384. }
  31385. },
  31386. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  31387. "additionalProperties": false
  31388. }
  31389. },
  31390. "required": ["id", "type", "data"],
  31391. "additionalProperties": false
  31392. },
  31393. "SessionNextCompactionDelta": {
  31394. "type": "object",
  31395. "properties": {
  31396. "id": {
  31397. "type": "string",
  31398. "pattern": "^evt_"
  31399. },
  31400. "metadata": {
  31401. "type": "object"
  31402. },
  31403. "type": {
  31404. "type": "string",
  31405. "enum": ["session.next.compaction.delta"]
  31406. },
  31407. "durable": {
  31408. "type": "object",
  31409. "properties": {
  31410. "aggregateID": {
  31411. "type": "string"
  31412. },
  31413. "seq": {
  31414. "type": "integer"
  31415. },
  31416. "version": {
  31417. "type": "integer"
  31418. }
  31419. },
  31420. "required": ["aggregateID", "seq", "version"],
  31421. "additionalProperties": false
  31422. },
  31423. "location": {
  31424. "$ref": "#/components/schemas/LocationRef"
  31425. },
  31426. "data": {
  31427. "type": "object",
  31428. "properties": {
  31429. "timestamp": {
  31430. "type": "number"
  31431. },
  31432. "sessionID": {
  31433. "type": "string",
  31434. "pattern": "^ses"
  31435. },
  31436. "messageID": {
  31437. "type": "string",
  31438. "pattern": "^msg_"
  31439. },
  31440. "text": {
  31441. "type": "string"
  31442. }
  31443. },
  31444. "required": ["timestamp", "sessionID", "messageID", "text"],
  31445. "additionalProperties": false
  31446. }
  31447. },
  31448. "required": ["id", "type", "data"],
  31449. "additionalProperties": false
  31450. },
  31451. "MessagePartDelta": {
  31452. "type": "object",
  31453. "properties": {
  31454. "id": {
  31455. "type": "string",
  31456. "pattern": "^evt_"
  31457. },
  31458. "metadata": {
  31459. "type": "object"
  31460. },
  31461. "type": {
  31462. "type": "string",
  31463. "enum": ["message.part.delta"]
  31464. },
  31465. "durable": {
  31466. "type": "object",
  31467. "properties": {
  31468. "aggregateID": {
  31469. "type": "string"
  31470. },
  31471. "seq": {
  31472. "type": "integer"
  31473. },
  31474. "version": {
  31475. "type": "integer"
  31476. }
  31477. },
  31478. "required": ["aggregateID", "seq", "version"],
  31479. "additionalProperties": false
  31480. },
  31481. "location": {
  31482. "$ref": "#/components/schemas/LocationRef"
  31483. },
  31484. "data": {
  31485. "type": "object",
  31486. "properties": {
  31487. "sessionID": {
  31488. "type": "string",
  31489. "pattern": "^ses"
  31490. },
  31491. "messageID": {
  31492. "type": "string",
  31493. "pattern": "^msg"
  31494. },
  31495. "partID": {
  31496. "type": "string",
  31497. "pattern": "^prt"
  31498. },
  31499. "field": {
  31500. "type": "string"
  31501. },
  31502. "delta": {
  31503. "type": "string"
  31504. }
  31505. },
  31506. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  31507. "additionalProperties": false
  31508. }
  31509. },
  31510. "required": ["id", "type", "data"],
  31511. "additionalProperties": false
  31512. },
  31513. "SessionDiff": {
  31514. "type": "object",
  31515. "properties": {
  31516. "id": {
  31517. "type": "string",
  31518. "pattern": "^evt_"
  31519. },
  31520. "metadata": {
  31521. "type": "object"
  31522. },
  31523. "type": {
  31524. "type": "string",
  31525. "enum": ["session.diff"]
  31526. },
  31527. "durable": {
  31528. "type": "object",
  31529. "properties": {
  31530. "aggregateID": {
  31531. "type": "string"
  31532. },
  31533. "seq": {
  31534. "type": "integer"
  31535. },
  31536. "version": {
  31537. "type": "integer"
  31538. }
  31539. },
  31540. "required": ["aggregateID", "seq", "version"],
  31541. "additionalProperties": false
  31542. },
  31543. "location": {
  31544. "$ref": "#/components/schemas/LocationRef"
  31545. },
  31546. "data": {
  31547. "type": "object",
  31548. "properties": {
  31549. "sessionID": {
  31550. "type": "string",
  31551. "pattern": "^ses"
  31552. },
  31553. "diff": {
  31554. "type": "array",
  31555. "items": {
  31556. "$ref": "#/components/schemas/SnapshotFileDiff"
  31557. }
  31558. }
  31559. },
  31560. "required": ["sessionID", "diff"],
  31561. "additionalProperties": false
  31562. }
  31563. },
  31564. "required": ["id", "type", "data"],
  31565. "additionalProperties": false
  31566. },
  31567. "SessionError": {
  31568. "type": "object",
  31569. "properties": {
  31570. "id": {
  31571. "type": "string",
  31572. "pattern": "^evt_"
  31573. },
  31574. "metadata": {
  31575. "type": "object"
  31576. },
  31577. "type": {
  31578. "type": "string",
  31579. "enum": ["session.error"]
  31580. },
  31581. "durable": {
  31582. "type": "object",
  31583. "properties": {
  31584. "aggregateID": {
  31585. "type": "string"
  31586. },
  31587. "seq": {
  31588. "type": "integer"
  31589. },
  31590. "version": {
  31591. "type": "integer"
  31592. }
  31593. },
  31594. "required": ["aggregateID", "seq", "version"],
  31595. "additionalProperties": false
  31596. },
  31597. "location": {
  31598. "$ref": "#/components/schemas/LocationRef"
  31599. },
  31600. "data": {
  31601. "type": "object",
  31602. "properties": {
  31603. "sessionID": {
  31604. "type": "string",
  31605. "pattern": "^ses"
  31606. },
  31607. "error": {
  31608. "anyOf": [
  31609. {
  31610. "$ref": "#/components/schemas/ProviderAuthError"
  31611. },
  31612. {
  31613. "$ref": "#/components/schemas/UnknownError"
  31614. },
  31615. {
  31616. "$ref": "#/components/schemas/MessageOutputLengthError"
  31617. },
  31618. {
  31619. "$ref": "#/components/schemas/MessageAbortedError"
  31620. },
  31621. {
  31622. "$ref": "#/components/schemas/StructuredOutputError"
  31623. },
  31624. {
  31625. "$ref": "#/components/schemas/ContextOverflowError"
  31626. },
  31627. {
  31628. "$ref": "#/components/schemas/ContentFilterError"
  31629. },
  31630. {
  31631. "$ref": "#/components/schemas/APIError"
  31632. }
  31633. ]
  31634. }
  31635. },
  31636. "additionalProperties": false
  31637. }
  31638. },
  31639. "required": ["id", "type", "data"],
  31640. "additionalProperties": false
  31641. },
  31642. "InstallationUpdated": {
  31643. "type": "object",
  31644. "properties": {
  31645. "id": {
  31646. "type": "string",
  31647. "pattern": "^evt_"
  31648. },
  31649. "metadata": {
  31650. "type": "object"
  31651. },
  31652. "type": {
  31653. "type": "string",
  31654. "enum": ["installation.updated"]
  31655. },
  31656. "durable": {
  31657. "type": "object",
  31658. "properties": {
  31659. "aggregateID": {
  31660. "type": "string"
  31661. },
  31662. "seq": {
  31663. "type": "integer"
  31664. },
  31665. "version": {
  31666. "type": "integer"
  31667. }
  31668. },
  31669. "required": ["aggregateID", "seq", "version"],
  31670. "additionalProperties": false
  31671. },
  31672. "location": {
  31673. "$ref": "#/components/schemas/LocationRef"
  31674. },
  31675. "data": {
  31676. "type": "object",
  31677. "properties": {
  31678. "version": {
  31679. "type": "string"
  31680. }
  31681. },
  31682. "required": ["version"],
  31683. "additionalProperties": false
  31684. }
  31685. },
  31686. "required": ["id", "type", "data"],
  31687. "additionalProperties": false
  31688. },
  31689. "InstallationUpdate-available": {
  31690. "type": "object",
  31691. "properties": {
  31692. "id": {
  31693. "type": "string",
  31694. "pattern": "^evt_"
  31695. },
  31696. "metadata": {
  31697. "type": "object"
  31698. },
  31699. "type": {
  31700. "type": "string",
  31701. "enum": ["installation.update-available"]
  31702. },
  31703. "durable": {
  31704. "type": "object",
  31705. "properties": {
  31706. "aggregateID": {
  31707. "type": "string"
  31708. },
  31709. "seq": {
  31710. "type": "integer"
  31711. },
  31712. "version": {
  31713. "type": "integer"
  31714. }
  31715. },
  31716. "required": ["aggregateID", "seq", "version"],
  31717. "additionalProperties": false
  31718. },
  31719. "location": {
  31720. "$ref": "#/components/schemas/LocationRef"
  31721. },
  31722. "data": {
  31723. "type": "object",
  31724. "properties": {
  31725. "version": {
  31726. "type": "string"
  31727. }
  31728. },
  31729. "required": ["version"],
  31730. "additionalProperties": false
  31731. }
  31732. },
  31733. "required": ["id", "type", "data"],
  31734. "additionalProperties": false
  31735. },
  31736. "FileEdited": {
  31737. "type": "object",
  31738. "properties": {
  31739. "id": {
  31740. "type": "string",
  31741. "pattern": "^evt_"
  31742. },
  31743. "metadata": {
  31744. "type": "object"
  31745. },
  31746. "type": {
  31747. "type": "string",
  31748. "enum": ["file.edited"]
  31749. },
  31750. "durable": {
  31751. "type": "object",
  31752. "properties": {
  31753. "aggregateID": {
  31754. "type": "string"
  31755. },
  31756. "seq": {
  31757. "type": "integer"
  31758. },
  31759. "version": {
  31760. "type": "integer"
  31761. }
  31762. },
  31763. "required": ["aggregateID", "seq", "version"],
  31764. "additionalProperties": false
  31765. },
  31766. "location": {
  31767. "$ref": "#/components/schemas/LocationRef"
  31768. },
  31769. "data": {
  31770. "type": "object",
  31771. "properties": {
  31772. "file": {
  31773. "type": "string"
  31774. }
  31775. },
  31776. "required": ["file"],
  31777. "additionalProperties": false
  31778. }
  31779. },
  31780. "required": ["id", "type", "data"],
  31781. "additionalProperties": false
  31782. },
  31783. "ReferenceUpdated": {
  31784. "type": "object",
  31785. "properties": {
  31786. "id": {
  31787. "type": "string",
  31788. "pattern": "^evt_"
  31789. },
  31790. "metadata": {
  31791. "type": "object"
  31792. },
  31793. "type": {
  31794. "type": "string",
  31795. "enum": ["reference.updated"]
  31796. },
  31797. "durable": {
  31798. "type": "object",
  31799. "properties": {
  31800. "aggregateID": {
  31801. "type": "string"
  31802. },
  31803. "seq": {
  31804. "type": "integer"
  31805. },
  31806. "version": {
  31807. "type": "integer"
  31808. }
  31809. },
  31810. "required": ["aggregateID", "seq", "version"],
  31811. "additionalProperties": false
  31812. },
  31813. "location": {
  31814. "$ref": "#/components/schemas/LocationRef"
  31815. },
  31816. "data": {
  31817. "type": "object",
  31818. "properties": {}
  31819. }
  31820. },
  31821. "required": ["id", "type", "data"],
  31822. "additionalProperties": false
  31823. },
  31824. "PermissionV2Asked": {
  31825. "type": "object",
  31826. "properties": {
  31827. "id": {
  31828. "type": "string",
  31829. "pattern": "^evt_"
  31830. },
  31831. "metadata": {
  31832. "type": "object"
  31833. },
  31834. "type": {
  31835. "type": "string",
  31836. "enum": ["permission.v2.asked"]
  31837. },
  31838. "durable": {
  31839. "type": "object",
  31840. "properties": {
  31841. "aggregateID": {
  31842. "type": "string"
  31843. },
  31844. "seq": {
  31845. "type": "integer"
  31846. },
  31847. "version": {
  31848. "type": "integer"
  31849. }
  31850. },
  31851. "required": ["aggregateID", "seq", "version"],
  31852. "additionalProperties": false
  31853. },
  31854. "location": {
  31855. "$ref": "#/components/schemas/LocationRef"
  31856. },
  31857. "data": {
  31858. "type": "object",
  31859. "properties": {
  31860. "id": {
  31861. "type": "string",
  31862. "pattern": "^per"
  31863. },
  31864. "sessionID": {
  31865. "type": "string",
  31866. "pattern": "^ses"
  31867. },
  31868. "action": {
  31869. "type": "string"
  31870. },
  31871. "resources": {
  31872. "type": "array",
  31873. "items": {
  31874. "type": "string"
  31875. }
  31876. },
  31877. "save": {
  31878. "type": "array",
  31879. "items": {
  31880. "type": "string"
  31881. }
  31882. },
  31883. "metadata": {
  31884. "type": "object"
  31885. },
  31886. "source": {
  31887. "$ref": "#/components/schemas/PermissionV2Source"
  31888. }
  31889. },
  31890. "required": ["id", "sessionID", "action", "resources"],
  31891. "additionalProperties": false
  31892. }
  31893. },
  31894. "required": ["id", "type", "data"],
  31895. "additionalProperties": false
  31896. },
  31897. "PermissionV2Replied": {
  31898. "type": "object",
  31899. "properties": {
  31900. "id": {
  31901. "type": "string",
  31902. "pattern": "^evt_"
  31903. },
  31904. "metadata": {
  31905. "type": "object"
  31906. },
  31907. "type": {
  31908. "type": "string",
  31909. "enum": ["permission.v2.replied"]
  31910. },
  31911. "durable": {
  31912. "type": "object",
  31913. "properties": {
  31914. "aggregateID": {
  31915. "type": "string"
  31916. },
  31917. "seq": {
  31918. "type": "integer"
  31919. },
  31920. "version": {
  31921. "type": "integer"
  31922. }
  31923. },
  31924. "required": ["aggregateID", "seq", "version"],
  31925. "additionalProperties": false
  31926. },
  31927. "location": {
  31928. "$ref": "#/components/schemas/LocationRef"
  31929. },
  31930. "data": {
  31931. "type": "object",
  31932. "properties": {
  31933. "sessionID": {
  31934. "type": "string",
  31935. "pattern": "^ses"
  31936. },
  31937. "requestID": {
  31938. "type": "string",
  31939. "pattern": "^per"
  31940. },
  31941. "reply": {
  31942. "$ref": "#/components/schemas/PermissionV2Reply"
  31943. }
  31944. },
  31945. "required": ["sessionID", "requestID", "reply"],
  31946. "additionalProperties": false
  31947. }
  31948. },
  31949. "required": ["id", "type", "data"],
  31950. "additionalProperties": false
  31951. },
  31952. "PluginAdded": {
  31953. "type": "object",
  31954. "properties": {
  31955. "id": {
  31956. "type": "string",
  31957. "pattern": "^evt_"
  31958. },
  31959. "metadata": {
  31960. "type": "object"
  31961. },
  31962. "type": {
  31963. "type": "string",
  31964. "enum": ["plugin.added"]
  31965. },
  31966. "durable": {
  31967. "type": "object",
  31968. "properties": {
  31969. "aggregateID": {
  31970. "type": "string"
  31971. },
  31972. "seq": {
  31973. "type": "integer"
  31974. },
  31975. "version": {
  31976. "type": "integer"
  31977. }
  31978. },
  31979. "required": ["aggregateID", "seq", "version"],
  31980. "additionalProperties": false
  31981. },
  31982. "location": {
  31983. "$ref": "#/components/schemas/LocationRef"
  31984. },
  31985. "data": {
  31986. "type": "object",
  31987. "properties": {
  31988. "id": {
  31989. "type": "string"
  31990. }
  31991. },
  31992. "required": ["id"],
  31993. "additionalProperties": false
  31994. }
  31995. },
  31996. "required": ["id", "type", "data"],
  31997. "additionalProperties": false
  31998. },
  31999. "ProjectDirectoriesUpdated": {
  32000. "type": "object",
  32001. "properties": {
  32002. "id": {
  32003. "type": "string",
  32004. "pattern": "^evt_"
  32005. },
  32006. "metadata": {
  32007. "type": "object"
  32008. },
  32009. "type": {
  32010. "type": "string",
  32011. "enum": ["project.directories.updated"]
  32012. },
  32013. "durable": {
  32014. "type": "object",
  32015. "properties": {
  32016. "aggregateID": {
  32017. "type": "string"
  32018. },
  32019. "seq": {
  32020. "type": "integer"
  32021. },
  32022. "version": {
  32023. "type": "integer"
  32024. }
  32025. },
  32026. "required": ["aggregateID", "seq", "version"],
  32027. "additionalProperties": false
  32028. },
  32029. "location": {
  32030. "$ref": "#/components/schemas/LocationRef"
  32031. },
  32032. "data": {
  32033. "type": "object",
  32034. "properties": {
  32035. "projectID": {
  32036. "type": "string"
  32037. }
  32038. },
  32039. "required": ["projectID"],
  32040. "additionalProperties": false
  32041. }
  32042. },
  32043. "required": ["id", "type", "data"],
  32044. "additionalProperties": false
  32045. },
  32046. "FileWatcherUpdated": {
  32047. "type": "object",
  32048. "properties": {
  32049. "id": {
  32050. "type": "string",
  32051. "pattern": "^evt_"
  32052. },
  32053. "metadata": {
  32054. "type": "object"
  32055. },
  32056. "type": {
  32057. "type": "string",
  32058. "enum": ["file.watcher.updated"]
  32059. },
  32060. "durable": {
  32061. "type": "object",
  32062. "properties": {
  32063. "aggregateID": {
  32064. "type": "string"
  32065. },
  32066. "seq": {
  32067. "type": "integer"
  32068. },
  32069. "version": {
  32070. "type": "integer"
  32071. }
  32072. },
  32073. "required": ["aggregateID", "seq", "version"],
  32074. "additionalProperties": false
  32075. },
  32076. "location": {
  32077. "$ref": "#/components/schemas/LocationRef"
  32078. },
  32079. "data": {
  32080. "type": "object",
  32081. "properties": {
  32082. "file": {
  32083. "type": "string"
  32084. },
  32085. "event": {
  32086. "type": "string",
  32087. "enum": ["add", "change", "unlink"]
  32088. }
  32089. },
  32090. "required": ["file", "event"],
  32091. "additionalProperties": false
  32092. }
  32093. },
  32094. "required": ["id", "type", "data"],
  32095. "additionalProperties": false
  32096. },
  32097. "PtyCreated": {
  32098. "type": "object",
  32099. "properties": {
  32100. "id": {
  32101. "type": "string",
  32102. "pattern": "^evt_"
  32103. },
  32104. "metadata": {
  32105. "type": "object"
  32106. },
  32107. "type": {
  32108. "type": "string",
  32109. "enum": ["pty.created"]
  32110. },
  32111. "durable": {
  32112. "type": "object",
  32113. "properties": {
  32114. "aggregateID": {
  32115. "type": "string"
  32116. },
  32117. "seq": {
  32118. "type": "integer"
  32119. },
  32120. "version": {
  32121. "type": "integer"
  32122. }
  32123. },
  32124. "required": ["aggregateID", "seq", "version"],
  32125. "additionalProperties": false
  32126. },
  32127. "location": {
  32128. "$ref": "#/components/schemas/LocationRef"
  32129. },
  32130. "data": {
  32131. "type": "object",
  32132. "properties": {
  32133. "info": {
  32134. "$ref": "#/components/schemas/Pty"
  32135. }
  32136. },
  32137. "required": ["info"],
  32138. "additionalProperties": false
  32139. }
  32140. },
  32141. "required": ["id", "type", "data"],
  32142. "additionalProperties": false
  32143. },
  32144. "PtyUpdated": {
  32145. "type": "object",
  32146. "properties": {
  32147. "id": {
  32148. "type": "string",
  32149. "pattern": "^evt_"
  32150. },
  32151. "metadata": {
  32152. "type": "object"
  32153. },
  32154. "type": {
  32155. "type": "string",
  32156. "enum": ["pty.updated"]
  32157. },
  32158. "durable": {
  32159. "type": "object",
  32160. "properties": {
  32161. "aggregateID": {
  32162. "type": "string"
  32163. },
  32164. "seq": {
  32165. "type": "integer"
  32166. },
  32167. "version": {
  32168. "type": "integer"
  32169. }
  32170. },
  32171. "required": ["aggregateID", "seq", "version"],
  32172. "additionalProperties": false
  32173. },
  32174. "location": {
  32175. "$ref": "#/components/schemas/LocationRef"
  32176. },
  32177. "data": {
  32178. "type": "object",
  32179. "properties": {
  32180. "info": {
  32181. "$ref": "#/components/schemas/Pty"
  32182. }
  32183. },
  32184. "required": ["info"],
  32185. "additionalProperties": false
  32186. }
  32187. },
  32188. "required": ["id", "type", "data"],
  32189. "additionalProperties": false
  32190. },
  32191. "PtyExited": {
  32192. "type": "object",
  32193. "properties": {
  32194. "id": {
  32195. "type": "string",
  32196. "pattern": "^evt_"
  32197. },
  32198. "metadata": {
  32199. "type": "object"
  32200. },
  32201. "type": {
  32202. "type": "string",
  32203. "enum": ["pty.exited"]
  32204. },
  32205. "durable": {
  32206. "type": "object",
  32207. "properties": {
  32208. "aggregateID": {
  32209. "type": "string"
  32210. },
  32211. "seq": {
  32212. "type": "integer"
  32213. },
  32214. "version": {
  32215. "type": "integer"
  32216. }
  32217. },
  32218. "required": ["aggregateID", "seq", "version"],
  32219. "additionalProperties": false
  32220. },
  32221. "location": {
  32222. "$ref": "#/components/schemas/LocationRef"
  32223. },
  32224. "data": {
  32225. "type": "object",
  32226. "properties": {
  32227. "id": {
  32228. "type": "string",
  32229. "pattern": "^pty"
  32230. },
  32231. "exitCode": {
  32232. "type": "integer",
  32233. "minimum": 0
  32234. }
  32235. },
  32236. "required": ["id", "exitCode"],
  32237. "additionalProperties": false
  32238. }
  32239. },
  32240. "required": ["id", "type", "data"],
  32241. "additionalProperties": false
  32242. },
  32243. "PtyDeleted": {
  32244. "type": "object",
  32245. "properties": {
  32246. "id": {
  32247. "type": "string",
  32248. "pattern": "^evt_"
  32249. },
  32250. "metadata": {
  32251. "type": "object"
  32252. },
  32253. "type": {
  32254. "type": "string",
  32255. "enum": ["pty.deleted"]
  32256. },
  32257. "durable": {
  32258. "type": "object",
  32259. "properties": {
  32260. "aggregateID": {
  32261. "type": "string"
  32262. },
  32263. "seq": {
  32264. "type": "integer"
  32265. },
  32266. "version": {
  32267. "type": "integer"
  32268. }
  32269. },
  32270. "required": ["aggregateID", "seq", "version"],
  32271. "additionalProperties": false
  32272. },
  32273. "location": {
  32274. "$ref": "#/components/schemas/LocationRef"
  32275. },
  32276. "data": {
  32277. "type": "object",
  32278. "properties": {
  32279. "id": {
  32280. "type": "string",
  32281. "pattern": "^pty"
  32282. }
  32283. },
  32284. "required": ["id"],
  32285. "additionalProperties": false
  32286. }
  32287. },
  32288. "required": ["id", "type", "data"],
  32289. "additionalProperties": false
  32290. },
  32291. "QuestionV2Asked": {
  32292. "type": "object",
  32293. "properties": {
  32294. "id": {
  32295. "type": "string",
  32296. "pattern": "^evt_"
  32297. },
  32298. "metadata": {
  32299. "type": "object"
  32300. },
  32301. "type": {
  32302. "type": "string",
  32303. "enum": ["question.v2.asked"]
  32304. },
  32305. "durable": {
  32306. "type": "object",
  32307. "properties": {
  32308. "aggregateID": {
  32309. "type": "string"
  32310. },
  32311. "seq": {
  32312. "type": "integer"
  32313. },
  32314. "version": {
  32315. "type": "integer"
  32316. }
  32317. },
  32318. "required": ["aggregateID", "seq", "version"],
  32319. "additionalProperties": false
  32320. },
  32321. "location": {
  32322. "$ref": "#/components/schemas/LocationRef"
  32323. },
  32324. "data": {
  32325. "type": "object",
  32326. "properties": {
  32327. "id": {
  32328. "type": "string",
  32329. "pattern": "^que"
  32330. },
  32331. "sessionID": {
  32332. "type": "string",
  32333. "pattern": "^ses"
  32334. },
  32335. "questions": {
  32336. "type": "array",
  32337. "items": {
  32338. "$ref": "#/components/schemas/QuestionV2Info"
  32339. },
  32340. "description": "Questions to ask"
  32341. },
  32342. "tool": {
  32343. "$ref": "#/components/schemas/QuestionV2Tool"
  32344. }
  32345. },
  32346. "required": ["id", "sessionID", "questions"],
  32347. "additionalProperties": false
  32348. }
  32349. },
  32350. "required": ["id", "type", "data"],
  32351. "additionalProperties": false
  32352. },
  32353. "QuestionV2Replied": {
  32354. "type": "object",
  32355. "properties": {
  32356. "id": {
  32357. "type": "string",
  32358. "pattern": "^evt_"
  32359. },
  32360. "metadata": {
  32361. "type": "object"
  32362. },
  32363. "type": {
  32364. "type": "string",
  32365. "enum": ["question.v2.replied"]
  32366. },
  32367. "durable": {
  32368. "type": "object",
  32369. "properties": {
  32370. "aggregateID": {
  32371. "type": "string"
  32372. },
  32373. "seq": {
  32374. "type": "integer"
  32375. },
  32376. "version": {
  32377. "type": "integer"
  32378. }
  32379. },
  32380. "required": ["aggregateID", "seq", "version"],
  32381. "additionalProperties": false
  32382. },
  32383. "location": {
  32384. "$ref": "#/components/schemas/LocationRef"
  32385. },
  32386. "data": {
  32387. "type": "object",
  32388. "properties": {
  32389. "sessionID": {
  32390. "type": "string",
  32391. "pattern": "^ses"
  32392. },
  32393. "requestID": {
  32394. "type": "string",
  32395. "pattern": "^que"
  32396. },
  32397. "answers": {
  32398. "type": "array",
  32399. "items": {
  32400. "$ref": "#/components/schemas/QuestionV2Answer"
  32401. }
  32402. }
  32403. },
  32404. "required": ["sessionID", "requestID", "answers"],
  32405. "additionalProperties": false
  32406. }
  32407. },
  32408. "required": ["id", "type", "data"],
  32409. "additionalProperties": false
  32410. },
  32411. "QuestionV2Rejected": {
  32412. "type": "object",
  32413. "properties": {
  32414. "id": {
  32415. "type": "string",
  32416. "pattern": "^evt_"
  32417. },
  32418. "metadata": {
  32419. "type": "object"
  32420. },
  32421. "type": {
  32422. "type": "string",
  32423. "enum": ["question.v2.rejected"]
  32424. },
  32425. "durable": {
  32426. "type": "object",
  32427. "properties": {
  32428. "aggregateID": {
  32429. "type": "string"
  32430. },
  32431. "seq": {
  32432. "type": "integer"
  32433. },
  32434. "version": {
  32435. "type": "integer"
  32436. }
  32437. },
  32438. "required": ["aggregateID", "seq", "version"],
  32439. "additionalProperties": false
  32440. },
  32441. "location": {
  32442. "$ref": "#/components/schemas/LocationRef"
  32443. },
  32444. "data": {
  32445. "type": "object",
  32446. "properties": {
  32447. "sessionID": {
  32448. "type": "string",
  32449. "pattern": "^ses"
  32450. },
  32451. "requestID": {
  32452. "type": "string",
  32453. "pattern": "^que"
  32454. }
  32455. },
  32456. "required": ["sessionID", "requestID"],
  32457. "additionalProperties": false
  32458. }
  32459. },
  32460. "required": ["id", "type", "data"],
  32461. "additionalProperties": false
  32462. },
  32463. "TodoUpdated": {
  32464. "type": "object",
  32465. "properties": {
  32466. "id": {
  32467. "type": "string",
  32468. "pattern": "^evt_"
  32469. },
  32470. "metadata": {
  32471. "type": "object"
  32472. },
  32473. "type": {
  32474. "type": "string",
  32475. "enum": ["todo.updated"]
  32476. },
  32477. "durable": {
  32478. "type": "object",
  32479. "properties": {
  32480. "aggregateID": {
  32481. "type": "string"
  32482. },
  32483. "seq": {
  32484. "type": "integer"
  32485. },
  32486. "version": {
  32487. "type": "integer"
  32488. }
  32489. },
  32490. "required": ["aggregateID", "seq", "version"],
  32491. "additionalProperties": false
  32492. },
  32493. "location": {
  32494. "$ref": "#/components/schemas/LocationRef"
  32495. },
  32496. "data": {
  32497. "type": "object",
  32498. "properties": {
  32499. "sessionID": {
  32500. "type": "string",
  32501. "pattern": "^ses"
  32502. },
  32503. "todos": {
  32504. "type": "array",
  32505. "items": {
  32506. "$ref": "#/components/schemas/Todo"
  32507. }
  32508. }
  32509. },
  32510. "required": ["sessionID", "todos"],
  32511. "additionalProperties": false
  32512. }
  32513. },
  32514. "required": ["id", "type", "data"],
  32515. "additionalProperties": false
  32516. },
  32517. "LspUpdated": {
  32518. "type": "object",
  32519. "properties": {
  32520. "id": {
  32521. "type": "string",
  32522. "pattern": "^evt_"
  32523. },
  32524. "metadata": {
  32525. "type": "object"
  32526. },
  32527. "type": {
  32528. "type": "string",
  32529. "enum": ["lsp.updated"]
  32530. },
  32531. "durable": {
  32532. "type": "object",
  32533. "properties": {
  32534. "aggregateID": {
  32535. "type": "string"
  32536. },
  32537. "seq": {
  32538. "type": "integer"
  32539. },
  32540. "version": {
  32541. "type": "integer"
  32542. }
  32543. },
  32544. "required": ["aggregateID", "seq", "version"],
  32545. "additionalProperties": false
  32546. },
  32547. "location": {
  32548. "$ref": "#/components/schemas/LocationRef"
  32549. },
  32550. "data": {
  32551. "type": "object",
  32552. "properties": {}
  32553. }
  32554. },
  32555. "required": ["id", "type", "data"],
  32556. "additionalProperties": false
  32557. },
  32558. "PermissionAsked": {
  32559. "type": "object",
  32560. "properties": {
  32561. "id": {
  32562. "type": "string",
  32563. "pattern": "^evt_"
  32564. },
  32565. "metadata": {
  32566. "type": "object"
  32567. },
  32568. "type": {
  32569. "type": "string",
  32570. "enum": ["permission.asked"]
  32571. },
  32572. "durable": {
  32573. "type": "object",
  32574. "properties": {
  32575. "aggregateID": {
  32576. "type": "string"
  32577. },
  32578. "seq": {
  32579. "type": "integer"
  32580. },
  32581. "version": {
  32582. "type": "integer"
  32583. }
  32584. },
  32585. "required": ["aggregateID", "seq", "version"],
  32586. "additionalProperties": false
  32587. },
  32588. "location": {
  32589. "$ref": "#/components/schemas/LocationRef"
  32590. },
  32591. "data": {
  32592. "type": "object",
  32593. "properties": {
  32594. "id": {
  32595. "type": "string",
  32596. "pattern": "^per"
  32597. },
  32598. "sessionID": {
  32599. "type": "string",
  32600. "pattern": "^ses"
  32601. },
  32602. "permission": {
  32603. "type": "string"
  32604. },
  32605. "patterns": {
  32606. "type": "array",
  32607. "items": {
  32608. "type": "string"
  32609. }
  32610. },
  32611. "metadata": {
  32612. "type": "object"
  32613. },
  32614. "always": {
  32615. "type": "array",
  32616. "items": {
  32617. "type": "string"
  32618. }
  32619. },
  32620. "tool": {
  32621. "type": "object",
  32622. "properties": {
  32623. "messageID": {
  32624. "type": "string"
  32625. },
  32626. "callID": {
  32627. "type": "string"
  32628. }
  32629. },
  32630. "required": ["messageID", "callID"],
  32631. "additionalProperties": false
  32632. }
  32633. },
  32634. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  32635. "additionalProperties": false
  32636. }
  32637. },
  32638. "required": ["id", "type", "data"],
  32639. "additionalProperties": false
  32640. },
  32641. "PermissionReplied": {
  32642. "type": "object",
  32643. "properties": {
  32644. "id": {
  32645. "type": "string",
  32646. "pattern": "^evt_"
  32647. },
  32648. "metadata": {
  32649. "type": "object"
  32650. },
  32651. "type": {
  32652. "type": "string",
  32653. "enum": ["permission.replied"]
  32654. },
  32655. "durable": {
  32656. "type": "object",
  32657. "properties": {
  32658. "aggregateID": {
  32659. "type": "string"
  32660. },
  32661. "seq": {
  32662. "type": "integer"
  32663. },
  32664. "version": {
  32665. "type": "integer"
  32666. }
  32667. },
  32668. "required": ["aggregateID", "seq", "version"],
  32669. "additionalProperties": false
  32670. },
  32671. "location": {
  32672. "$ref": "#/components/schemas/LocationRef"
  32673. },
  32674. "data": {
  32675. "type": "object",
  32676. "properties": {
  32677. "sessionID": {
  32678. "type": "string",
  32679. "pattern": "^ses"
  32680. },
  32681. "requestID": {
  32682. "type": "string",
  32683. "pattern": "^per"
  32684. },
  32685. "reply": {
  32686. "type": "string",
  32687. "enum": ["once", "always", "reject"]
  32688. }
  32689. },
  32690. "required": ["sessionID", "requestID", "reply"],
  32691. "additionalProperties": false
  32692. }
  32693. },
  32694. "required": ["id", "type", "data"],
  32695. "additionalProperties": false
  32696. },
  32697. "TuiPromptAppend": {
  32698. "type": "object",
  32699. "properties": {
  32700. "id": {
  32701. "type": "string",
  32702. "pattern": "^evt_"
  32703. },
  32704. "metadata": {
  32705. "type": "object"
  32706. },
  32707. "type": {
  32708. "type": "string",
  32709. "enum": ["tui.prompt.append"]
  32710. },
  32711. "durable": {
  32712. "type": "object",
  32713. "properties": {
  32714. "aggregateID": {
  32715. "type": "string"
  32716. },
  32717. "seq": {
  32718. "type": "integer"
  32719. },
  32720. "version": {
  32721. "type": "integer"
  32722. }
  32723. },
  32724. "required": ["aggregateID", "seq", "version"],
  32725. "additionalProperties": false
  32726. },
  32727. "location": {
  32728. "$ref": "#/components/schemas/LocationRef"
  32729. },
  32730. "data": {
  32731. "type": "object",
  32732. "properties": {
  32733. "text": {
  32734. "type": "string"
  32735. }
  32736. },
  32737. "required": ["text"],
  32738. "additionalProperties": false
  32739. }
  32740. },
  32741. "required": ["id", "type", "data"],
  32742. "additionalProperties": false
  32743. },
  32744. "TuiCommandExecute": {
  32745. "type": "object",
  32746. "properties": {
  32747. "id": {
  32748. "type": "string",
  32749. "pattern": "^evt_"
  32750. },
  32751. "metadata": {
  32752. "type": "object"
  32753. },
  32754. "type": {
  32755. "type": "string",
  32756. "enum": ["tui.command.execute"]
  32757. },
  32758. "durable": {
  32759. "type": "object",
  32760. "properties": {
  32761. "aggregateID": {
  32762. "type": "string"
  32763. },
  32764. "seq": {
  32765. "type": "integer"
  32766. },
  32767. "version": {
  32768. "type": "integer"
  32769. }
  32770. },
  32771. "required": ["aggregateID", "seq", "version"],
  32772. "additionalProperties": false
  32773. },
  32774. "location": {
  32775. "$ref": "#/components/schemas/LocationRef"
  32776. },
  32777. "data": {
  32778. "type": "object",
  32779. "properties": {
  32780. "command": {
  32781. "anyOf": [
  32782. {
  32783. "type": "string",
  32784. "enum": [
  32785. "session.list",
  32786. "session.new",
  32787. "session.share",
  32788. "session.interrupt",
  32789. "session.compact",
  32790. "session.page.up",
  32791. "session.page.down",
  32792. "session.line.up",
  32793. "session.line.down",
  32794. "session.half.page.up",
  32795. "session.half.page.down",
  32796. "session.first",
  32797. "session.last",
  32798. "prompt.clear",
  32799. "prompt.submit",
  32800. "agent.cycle"
  32801. ]
  32802. },
  32803. {
  32804. "type": "string"
  32805. }
  32806. ]
  32807. }
  32808. },
  32809. "required": ["command"],
  32810. "additionalProperties": false
  32811. }
  32812. },
  32813. "required": ["id", "type", "data"],
  32814. "additionalProperties": false
  32815. },
  32816. "TuiToastShow": {
  32817. "type": "object",
  32818. "properties": {
  32819. "id": {
  32820. "type": "string",
  32821. "pattern": "^evt_"
  32822. },
  32823. "metadata": {
  32824. "type": "object"
  32825. },
  32826. "type": {
  32827. "type": "string",
  32828. "enum": ["tui.toast.show"]
  32829. },
  32830. "durable": {
  32831. "type": "object",
  32832. "properties": {
  32833. "aggregateID": {
  32834. "type": "string"
  32835. },
  32836. "seq": {
  32837. "type": "integer"
  32838. },
  32839. "version": {
  32840. "type": "integer"
  32841. }
  32842. },
  32843. "required": ["aggregateID", "seq", "version"],
  32844. "additionalProperties": false
  32845. },
  32846. "location": {
  32847. "$ref": "#/components/schemas/LocationRef"
  32848. },
  32849. "data": {
  32850. "type": "object",
  32851. "properties": {
  32852. "title": {
  32853. "type": "string"
  32854. },
  32855. "message": {
  32856. "type": "string"
  32857. },
  32858. "variant": {
  32859. "type": "string",
  32860. "enum": ["info", "success", "warning", "error"]
  32861. },
  32862. "duration": {
  32863. "type": "integer",
  32864. "exclusiveMinimum": 0
  32865. }
  32866. },
  32867. "required": ["message", "variant"],
  32868. "additionalProperties": false
  32869. }
  32870. },
  32871. "required": ["id", "type", "data"],
  32872. "additionalProperties": false
  32873. },
  32874. "TuiSessionSelect": {
  32875. "type": "object",
  32876. "properties": {
  32877. "id": {
  32878. "type": "string",
  32879. "pattern": "^evt_"
  32880. },
  32881. "metadata": {
  32882. "type": "object"
  32883. },
  32884. "type": {
  32885. "type": "string",
  32886. "enum": ["tui.session.select"]
  32887. },
  32888. "durable": {
  32889. "type": "object",
  32890. "properties": {
  32891. "aggregateID": {
  32892. "type": "string"
  32893. },
  32894. "seq": {
  32895. "type": "integer"
  32896. },
  32897. "version": {
  32898. "type": "integer"
  32899. }
  32900. },
  32901. "required": ["aggregateID", "seq", "version"],
  32902. "additionalProperties": false
  32903. },
  32904. "location": {
  32905. "$ref": "#/components/schemas/LocationRef"
  32906. },
  32907. "data": {
  32908. "type": "object",
  32909. "properties": {
  32910. "sessionID": {
  32911. "type": "string",
  32912. "pattern": "^ses",
  32913. "description": "Session ID to navigate to"
  32914. }
  32915. },
  32916. "required": ["sessionID"],
  32917. "additionalProperties": false
  32918. }
  32919. },
  32920. "required": ["id", "type", "data"],
  32921. "additionalProperties": false
  32922. },
  32923. "McpToolsChanged": {
  32924. "type": "object",
  32925. "properties": {
  32926. "id": {
  32927. "type": "string",
  32928. "pattern": "^evt_"
  32929. },
  32930. "metadata": {
  32931. "type": "object"
  32932. },
  32933. "type": {
  32934. "type": "string",
  32935. "enum": ["mcp.tools.changed"]
  32936. },
  32937. "durable": {
  32938. "type": "object",
  32939. "properties": {
  32940. "aggregateID": {
  32941. "type": "string"
  32942. },
  32943. "seq": {
  32944. "type": "integer"
  32945. },
  32946. "version": {
  32947. "type": "integer"
  32948. }
  32949. },
  32950. "required": ["aggregateID", "seq", "version"],
  32951. "additionalProperties": false
  32952. },
  32953. "location": {
  32954. "$ref": "#/components/schemas/LocationRef"
  32955. },
  32956. "data": {
  32957. "type": "object",
  32958. "properties": {
  32959. "server": {
  32960. "type": "string"
  32961. }
  32962. },
  32963. "required": ["server"],
  32964. "additionalProperties": false
  32965. }
  32966. },
  32967. "required": ["id", "type", "data"],
  32968. "additionalProperties": false
  32969. },
  32970. "McpBrowserOpenFailed": {
  32971. "type": "object",
  32972. "properties": {
  32973. "id": {
  32974. "type": "string",
  32975. "pattern": "^evt_"
  32976. },
  32977. "metadata": {
  32978. "type": "object"
  32979. },
  32980. "type": {
  32981. "type": "string",
  32982. "enum": ["mcp.browser.open.failed"]
  32983. },
  32984. "durable": {
  32985. "type": "object",
  32986. "properties": {
  32987. "aggregateID": {
  32988. "type": "string"
  32989. },
  32990. "seq": {
  32991. "type": "integer"
  32992. },
  32993. "version": {
  32994. "type": "integer"
  32995. }
  32996. },
  32997. "required": ["aggregateID", "seq", "version"],
  32998. "additionalProperties": false
  32999. },
  33000. "location": {
  33001. "$ref": "#/components/schemas/LocationRef"
  33002. },
  33003. "data": {
  33004. "type": "object",
  33005. "properties": {
  33006. "mcpName": {
  33007. "type": "string"
  33008. },
  33009. "url": {
  33010. "type": "string"
  33011. }
  33012. },
  33013. "required": ["mcpName", "url"],
  33014. "additionalProperties": false
  33015. }
  33016. },
  33017. "required": ["id", "type", "data"],
  33018. "additionalProperties": false
  33019. },
  33020. "CommandExecuted": {
  33021. "type": "object",
  33022. "properties": {
  33023. "id": {
  33024. "type": "string",
  33025. "pattern": "^evt_"
  33026. },
  33027. "metadata": {
  33028. "type": "object"
  33029. },
  33030. "type": {
  33031. "type": "string",
  33032. "enum": ["command.executed"]
  33033. },
  33034. "durable": {
  33035. "type": "object",
  33036. "properties": {
  33037. "aggregateID": {
  33038. "type": "string"
  33039. },
  33040. "seq": {
  33041. "type": "integer"
  33042. },
  33043. "version": {
  33044. "type": "integer"
  33045. }
  33046. },
  33047. "required": ["aggregateID", "seq", "version"],
  33048. "additionalProperties": false
  33049. },
  33050. "location": {
  33051. "$ref": "#/components/schemas/LocationRef"
  33052. },
  33053. "data": {
  33054. "type": "object",
  33055. "properties": {
  33056. "name": {
  33057. "type": "string"
  33058. },
  33059. "sessionID": {
  33060. "type": "string",
  33061. "pattern": "^ses"
  33062. },
  33063. "arguments": {
  33064. "type": "string"
  33065. },
  33066. "messageID": {
  33067. "type": "string",
  33068. "pattern": "^msg"
  33069. }
  33070. },
  33071. "required": ["name", "sessionID", "arguments", "messageID"],
  33072. "additionalProperties": false
  33073. }
  33074. },
  33075. "required": ["id", "type", "data"],
  33076. "additionalProperties": false
  33077. },
  33078. "ProjectUpdated": {
  33079. "type": "object",
  33080. "properties": {
  33081. "id": {
  33082. "type": "string",
  33083. "pattern": "^evt_"
  33084. },
  33085. "metadata": {
  33086. "type": "object"
  33087. },
  33088. "type": {
  33089. "type": "string",
  33090. "enum": ["project.updated"]
  33091. },
  33092. "durable": {
  33093. "type": "object",
  33094. "properties": {
  33095. "aggregateID": {
  33096. "type": "string"
  33097. },
  33098. "seq": {
  33099. "type": "integer"
  33100. },
  33101. "version": {
  33102. "type": "integer"
  33103. }
  33104. },
  33105. "required": ["aggregateID", "seq", "version"],
  33106. "additionalProperties": false
  33107. },
  33108. "location": {
  33109. "$ref": "#/components/schemas/LocationRef"
  33110. },
  33111. "data": {
  33112. "type": "object",
  33113. "properties": {
  33114. "id": {
  33115. "type": "string"
  33116. },
  33117. "worktree": {
  33118. "type": "string"
  33119. },
  33120. "vcs": {
  33121. "$ref": "#/components/schemas/ProjectVcs"
  33122. },
  33123. "name": {
  33124. "type": "string"
  33125. },
  33126. "icon": {
  33127. "$ref": "#/components/schemas/ProjectIcon"
  33128. },
  33129. "commands": {
  33130. "$ref": "#/components/schemas/ProjectCommands"
  33131. },
  33132. "time": {
  33133. "$ref": "#/components/schemas/ProjectTime"
  33134. },
  33135. "sandboxes": {
  33136. "type": "array",
  33137. "items": {
  33138. "type": "string"
  33139. }
  33140. }
  33141. },
  33142. "required": ["id", "worktree", "time", "sandboxes"],
  33143. "additionalProperties": false
  33144. }
  33145. },
  33146. "required": ["id", "type", "data"],
  33147. "additionalProperties": false
  33148. },
  33149. "SessionIdle": {
  33150. "type": "object",
  33151. "properties": {
  33152. "id": {
  33153. "type": "string",
  33154. "pattern": "^evt_"
  33155. },
  33156. "metadata": {
  33157. "type": "object"
  33158. },
  33159. "type": {
  33160. "type": "string",
  33161. "enum": ["session.idle"]
  33162. },
  33163. "durable": {
  33164. "type": "object",
  33165. "properties": {
  33166. "aggregateID": {
  33167. "type": "string"
  33168. },
  33169. "seq": {
  33170. "type": "integer"
  33171. },
  33172. "version": {
  33173. "type": "integer"
  33174. }
  33175. },
  33176. "required": ["aggregateID", "seq", "version"],
  33177. "additionalProperties": false
  33178. },
  33179. "location": {
  33180. "$ref": "#/components/schemas/LocationRef"
  33181. },
  33182. "data": {
  33183. "type": "object",
  33184. "properties": {
  33185. "sessionID": {
  33186. "type": "string",
  33187. "pattern": "^ses"
  33188. }
  33189. },
  33190. "required": ["sessionID"],
  33191. "additionalProperties": false
  33192. }
  33193. },
  33194. "required": ["id", "type", "data"],
  33195. "additionalProperties": false
  33196. },
  33197. "QuestionAsked": {
  33198. "type": "object",
  33199. "properties": {
  33200. "id": {
  33201. "type": "string",
  33202. "pattern": "^evt_"
  33203. },
  33204. "metadata": {
  33205. "type": "object"
  33206. },
  33207. "type": {
  33208. "type": "string",
  33209. "enum": ["question.asked"]
  33210. },
  33211. "durable": {
  33212. "type": "object",
  33213. "properties": {
  33214. "aggregateID": {
  33215. "type": "string"
  33216. },
  33217. "seq": {
  33218. "type": "integer"
  33219. },
  33220. "version": {
  33221. "type": "integer"
  33222. }
  33223. },
  33224. "required": ["aggregateID", "seq", "version"],
  33225. "additionalProperties": false
  33226. },
  33227. "location": {
  33228. "$ref": "#/components/schemas/LocationRef"
  33229. },
  33230. "data": {
  33231. "type": "object",
  33232. "properties": {
  33233. "id": {
  33234. "type": "string",
  33235. "pattern": "^que"
  33236. },
  33237. "sessionID": {
  33238. "type": "string",
  33239. "pattern": "^ses"
  33240. },
  33241. "questions": {
  33242. "type": "array",
  33243. "items": {
  33244. "$ref": "#/components/schemas/QuestionInfo"
  33245. },
  33246. "description": "Questions to ask"
  33247. },
  33248. "tool": {
  33249. "$ref": "#/components/schemas/QuestionTool"
  33250. }
  33251. },
  33252. "required": ["id", "sessionID", "questions"],
  33253. "additionalProperties": false
  33254. }
  33255. },
  33256. "required": ["id", "type", "data"],
  33257. "additionalProperties": false
  33258. },
  33259. "SessionCompacted": {
  33260. "type": "object",
  33261. "properties": {
  33262. "id": {
  33263. "type": "string",
  33264. "pattern": "^evt_"
  33265. },
  33266. "metadata": {
  33267. "type": "object"
  33268. },
  33269. "type": {
  33270. "type": "string",
  33271. "enum": ["session.compacted"]
  33272. },
  33273. "durable": {
  33274. "type": "object",
  33275. "properties": {
  33276. "aggregateID": {
  33277. "type": "string"
  33278. },
  33279. "seq": {
  33280. "type": "integer"
  33281. },
  33282. "version": {
  33283. "type": "integer"
  33284. }
  33285. },
  33286. "required": ["aggregateID", "seq", "version"],
  33287. "additionalProperties": false
  33288. },
  33289. "location": {
  33290. "$ref": "#/components/schemas/LocationRef"
  33291. },
  33292. "data": {
  33293. "type": "object",
  33294. "properties": {
  33295. "sessionID": {
  33296. "type": "string",
  33297. "pattern": "^ses"
  33298. }
  33299. },
  33300. "required": ["sessionID"],
  33301. "additionalProperties": false
  33302. }
  33303. },
  33304. "required": ["id", "type", "data"],
  33305. "additionalProperties": false
  33306. },
  33307. "VcsBranchUpdated": {
  33308. "type": "object",
  33309. "properties": {
  33310. "id": {
  33311. "type": "string",
  33312. "pattern": "^evt_"
  33313. },
  33314. "metadata": {
  33315. "type": "object"
  33316. },
  33317. "type": {
  33318. "type": "string",
  33319. "enum": ["vcs.branch.updated"]
  33320. },
  33321. "durable": {
  33322. "type": "object",
  33323. "properties": {
  33324. "aggregateID": {
  33325. "type": "string"
  33326. },
  33327. "seq": {
  33328. "type": "integer"
  33329. },
  33330. "version": {
  33331. "type": "integer"
  33332. }
  33333. },
  33334. "required": ["aggregateID", "seq", "version"],
  33335. "additionalProperties": false
  33336. },
  33337. "location": {
  33338. "$ref": "#/components/schemas/LocationRef"
  33339. },
  33340. "data": {
  33341. "type": "object",
  33342. "properties": {
  33343. "branch": {
  33344. "type": "string"
  33345. }
  33346. },
  33347. "additionalProperties": false
  33348. }
  33349. },
  33350. "required": ["id", "type", "data"],
  33351. "additionalProperties": false
  33352. },
  33353. "WorkspaceReady": {
  33354. "type": "object",
  33355. "properties": {
  33356. "id": {
  33357. "type": "string",
  33358. "pattern": "^evt_"
  33359. },
  33360. "metadata": {
  33361. "type": "object"
  33362. },
  33363. "type": {
  33364. "type": "string",
  33365. "enum": ["workspace.ready"]
  33366. },
  33367. "durable": {
  33368. "type": "object",
  33369. "properties": {
  33370. "aggregateID": {
  33371. "type": "string"
  33372. },
  33373. "seq": {
  33374. "type": "integer"
  33375. },
  33376. "version": {
  33377. "type": "integer"
  33378. }
  33379. },
  33380. "required": ["aggregateID", "seq", "version"],
  33381. "additionalProperties": false
  33382. },
  33383. "location": {
  33384. "$ref": "#/components/schemas/LocationRef"
  33385. },
  33386. "data": {
  33387. "type": "object",
  33388. "properties": {
  33389. "name": {
  33390. "type": "string"
  33391. }
  33392. },
  33393. "required": ["name"],
  33394. "additionalProperties": false
  33395. }
  33396. },
  33397. "required": ["id", "type", "data"],
  33398. "additionalProperties": false
  33399. },
  33400. "WorkspaceFailed": {
  33401. "type": "object",
  33402. "properties": {
  33403. "id": {
  33404. "type": "string",
  33405. "pattern": "^evt_"
  33406. },
  33407. "metadata": {
  33408. "type": "object"
  33409. },
  33410. "type": {
  33411. "type": "string",
  33412. "enum": ["workspace.failed"]
  33413. },
  33414. "durable": {
  33415. "type": "object",
  33416. "properties": {
  33417. "aggregateID": {
  33418. "type": "string"
  33419. },
  33420. "seq": {
  33421. "type": "integer"
  33422. },
  33423. "version": {
  33424. "type": "integer"
  33425. }
  33426. },
  33427. "required": ["aggregateID", "seq", "version"],
  33428. "additionalProperties": false
  33429. },
  33430. "location": {
  33431. "$ref": "#/components/schemas/LocationRef"
  33432. },
  33433. "data": {
  33434. "type": "object",
  33435. "properties": {
  33436. "message": {
  33437. "type": "string"
  33438. }
  33439. },
  33440. "required": ["message"],
  33441. "additionalProperties": false
  33442. }
  33443. },
  33444. "required": ["id", "type", "data"],
  33445. "additionalProperties": false
  33446. },
  33447. "WorkspaceStatus": {
  33448. "type": "object",
  33449. "properties": {
  33450. "id": {
  33451. "type": "string",
  33452. "pattern": "^evt_"
  33453. },
  33454. "metadata": {
  33455. "type": "object"
  33456. },
  33457. "type": {
  33458. "type": "string",
  33459. "enum": ["workspace.status"]
  33460. },
  33461. "durable": {
  33462. "type": "object",
  33463. "properties": {
  33464. "aggregateID": {
  33465. "type": "string"
  33466. },
  33467. "seq": {
  33468. "type": "integer"
  33469. },
  33470. "version": {
  33471. "type": "integer"
  33472. }
  33473. },
  33474. "required": ["aggregateID", "seq", "version"],
  33475. "additionalProperties": false
  33476. },
  33477. "location": {
  33478. "$ref": "#/components/schemas/LocationRef"
  33479. },
  33480. "data": {
  33481. "type": "object",
  33482. "properties": {
  33483. "workspaceID": {
  33484. "type": "string",
  33485. "pattern": "^wrk"
  33486. },
  33487. "status": {
  33488. "type": "string",
  33489. "enum": ["connected", "connecting", "disconnected", "error"]
  33490. }
  33491. },
  33492. "required": ["workspaceID", "status"],
  33493. "additionalProperties": false
  33494. }
  33495. },
  33496. "required": ["id", "type", "data"],
  33497. "additionalProperties": false
  33498. },
  33499. "WorktreeReady": {
  33500. "type": "object",
  33501. "properties": {
  33502. "id": {
  33503. "type": "string",
  33504. "pattern": "^evt_"
  33505. },
  33506. "metadata": {
  33507. "type": "object"
  33508. },
  33509. "type": {
  33510. "type": "string",
  33511. "enum": ["worktree.ready"]
  33512. },
  33513. "durable": {
  33514. "type": "object",
  33515. "properties": {
  33516. "aggregateID": {
  33517. "type": "string"
  33518. },
  33519. "seq": {
  33520. "type": "integer"
  33521. },
  33522. "version": {
  33523. "type": "integer"
  33524. }
  33525. },
  33526. "required": ["aggregateID", "seq", "version"],
  33527. "additionalProperties": false
  33528. },
  33529. "location": {
  33530. "$ref": "#/components/schemas/LocationRef"
  33531. },
  33532. "data": {
  33533. "type": "object",
  33534. "properties": {
  33535. "name": {
  33536. "type": "string"
  33537. },
  33538. "branch": {
  33539. "type": "string"
  33540. }
  33541. },
  33542. "required": ["name"],
  33543. "additionalProperties": false
  33544. }
  33545. },
  33546. "required": ["id", "type", "data"],
  33547. "additionalProperties": false
  33548. },
  33549. "WorktreeFailed": {
  33550. "type": "object",
  33551. "properties": {
  33552. "id": {
  33553. "type": "string",
  33554. "pattern": "^evt_"
  33555. },
  33556. "metadata": {
  33557. "type": "object"
  33558. },
  33559. "type": {
  33560. "type": "string",
  33561. "enum": ["worktree.failed"]
  33562. },
  33563. "durable": {
  33564. "type": "object",
  33565. "properties": {
  33566. "aggregateID": {
  33567. "type": "string"
  33568. },
  33569. "seq": {
  33570. "type": "integer"
  33571. },
  33572. "version": {
  33573. "type": "integer"
  33574. }
  33575. },
  33576. "required": ["aggregateID", "seq", "version"],
  33577. "additionalProperties": false
  33578. },
  33579. "location": {
  33580. "$ref": "#/components/schemas/LocationRef"
  33581. },
  33582. "data": {
  33583. "type": "object",
  33584. "properties": {
  33585. "message": {
  33586. "type": "string"
  33587. }
  33588. },
  33589. "required": ["message"],
  33590. "additionalProperties": false
  33591. }
  33592. },
  33593. "required": ["id", "type", "data"],
  33594. "additionalProperties": false
  33595. },
  33596. "ServerConnected": {
  33597. "type": "object",
  33598. "properties": {
  33599. "id": {
  33600. "type": "string",
  33601. "pattern": "^evt_"
  33602. },
  33603. "metadata": {
  33604. "type": "object"
  33605. },
  33606. "type": {
  33607. "type": "string",
  33608. "enum": ["server.connected"]
  33609. },
  33610. "durable": {
  33611. "type": "object",
  33612. "properties": {
  33613. "aggregateID": {
  33614. "type": "string"
  33615. },
  33616. "seq": {
  33617. "type": "integer"
  33618. },
  33619. "version": {
  33620. "type": "integer"
  33621. }
  33622. },
  33623. "required": ["aggregateID", "seq", "version"],
  33624. "additionalProperties": false
  33625. },
  33626. "location": {
  33627. "$ref": "#/components/schemas/LocationRef"
  33628. },
  33629. "data": {
  33630. "type": "object",
  33631. "properties": {}
  33632. }
  33633. },
  33634. "required": ["id", "type", "data"],
  33635. "additionalProperties": false
  33636. },
  33637. "GlobalDisposed": {
  33638. "type": "object",
  33639. "properties": {
  33640. "id": {
  33641. "type": "string",
  33642. "pattern": "^evt_"
  33643. },
  33644. "metadata": {
  33645. "type": "object"
  33646. },
  33647. "type": {
  33648. "type": "string",
  33649. "enum": ["global.disposed"]
  33650. },
  33651. "durable": {
  33652. "type": "object",
  33653. "properties": {
  33654. "aggregateID": {
  33655. "type": "string"
  33656. },
  33657. "seq": {
  33658. "type": "integer"
  33659. },
  33660. "version": {
  33661. "type": "integer"
  33662. }
  33663. },
  33664. "required": ["aggregateID", "seq", "version"],
  33665. "additionalProperties": false
  33666. },
  33667. "location": {
  33668. "$ref": "#/components/schemas/LocationRef"
  33669. },
  33670. "data": {
  33671. "type": "object",
  33672. "properties": {}
  33673. }
  33674. },
  33675. "required": ["id", "type", "data"],
  33676. "additionalProperties": false
  33677. },
  33678. "QuestionV2Request": {
  33679. "type": "object",
  33680. "properties": {
  33681. "id": {
  33682. "type": "string",
  33683. "pattern": "^que"
  33684. },
  33685. "sessionID": {
  33686. "type": "string",
  33687. "pattern": "^ses"
  33688. },
  33689. "questions": {
  33690. "type": "array",
  33691. "items": {
  33692. "$ref": "#/components/schemas/QuestionV2Info"
  33693. },
  33694. "description": "Questions to ask"
  33695. },
  33696. "tool": {
  33697. "$ref": "#/components/schemas/QuestionV2Tool"
  33698. }
  33699. },
  33700. "required": ["id", "sessionID", "questions"],
  33701. "additionalProperties": false
  33702. },
  33703. "QuestionV2Reply": {
  33704. "type": "object",
  33705. "properties": {
  33706. "answers": {
  33707. "type": "array",
  33708. "items": {
  33709. "$ref": "#/components/schemas/QuestionV2Answer"
  33710. },
  33711. "description": "User answers in order of questions (each answer is an array of selected labels)"
  33712. }
  33713. },
  33714. "required": ["answers"],
  33715. "additionalProperties": false
  33716. },
  33717. "ReferenceLocalSource": {
  33718. "type": "object",
  33719. "properties": {
  33720. "type": {
  33721. "type": "string",
  33722. "enum": ["local"]
  33723. },
  33724. "path": {
  33725. "type": "string"
  33726. },
  33727. "description": {
  33728. "type": "string"
  33729. },
  33730. "hidden": {
  33731. "type": "boolean"
  33732. }
  33733. },
  33734. "required": ["type", "path"],
  33735. "additionalProperties": false
  33736. },
  33737. "ReferenceGitSource": {
  33738. "type": "object",
  33739. "properties": {
  33740. "type": {
  33741. "type": "string",
  33742. "enum": ["git"]
  33743. },
  33744. "repository": {
  33745. "type": "string"
  33746. },
  33747. "branch": {
  33748. "type": "string"
  33749. },
  33750. "description": {
  33751. "type": "string"
  33752. },
  33753. "hidden": {
  33754. "type": "boolean"
  33755. }
  33756. },
  33757. "required": ["type", "repository"],
  33758. "additionalProperties": false
  33759. },
  33760. "ReferenceSource": {
  33761. "anyOf": [
  33762. {
  33763. "$ref": "#/components/schemas/ReferenceLocalSource"
  33764. },
  33765. {
  33766. "$ref": "#/components/schemas/ReferenceGitSource"
  33767. }
  33768. ]
  33769. },
  33770. "ReferenceInfo": {
  33771. "type": "object",
  33772. "properties": {
  33773. "name": {
  33774. "type": "string"
  33775. },
  33776. "path": {
  33777. "type": "string"
  33778. },
  33779. "description": {
  33780. "type": "string"
  33781. },
  33782. "hidden": {
  33783. "type": "boolean"
  33784. },
  33785. "source": {
  33786. "$ref": "#/components/schemas/ReferenceSource"
  33787. }
  33788. },
  33789. "required": ["name", "path", "source"],
  33790. "additionalProperties": false
  33791. },
  33792. "ProjectCopyCopy": {
  33793. "type": "object",
  33794. "properties": {
  33795. "directory": {
  33796. "type": "string"
  33797. }
  33798. },
  33799. "required": ["directory"],
  33800. "additionalProperties": false
  33801. },
  33802. "EventModels-devRefreshed": {
  33803. "type": "object",
  33804. "properties": {
  33805. "id": {
  33806. "type": "string",
  33807. "pattern": "^evt_"
  33808. },
  33809. "type": {
  33810. "type": "string",
  33811. "enum": ["models-dev.refreshed"]
  33812. },
  33813. "properties": {
  33814. "type": "object",
  33815. "properties": {}
  33816. }
  33817. },
  33818. "required": ["id", "type", "properties"],
  33819. "additionalProperties": false
  33820. },
  33821. "EventIntegrationUpdated": {
  33822. "type": "object",
  33823. "properties": {
  33824. "id": {
  33825. "type": "string",
  33826. "pattern": "^evt_"
  33827. },
  33828. "type": {
  33829. "type": "string",
  33830. "enum": ["integration.updated"]
  33831. },
  33832. "properties": {
  33833. "type": "object",
  33834. "properties": {}
  33835. }
  33836. },
  33837. "required": ["id", "type", "properties"],
  33838. "additionalProperties": false
  33839. },
  33840. "EventIntegrationConnectionUpdated": {
  33841. "type": "object",
  33842. "properties": {
  33843. "id": {
  33844. "type": "string",
  33845. "pattern": "^evt_"
  33846. },
  33847. "type": {
  33848. "type": "string",
  33849. "enum": ["integration.connection.updated"]
  33850. },
  33851. "properties": {
  33852. "type": "object",
  33853. "properties": {
  33854. "integrationID": {
  33855. "type": "string"
  33856. }
  33857. },
  33858. "required": ["integrationID"],
  33859. "additionalProperties": false
  33860. }
  33861. },
  33862. "required": ["id", "type", "properties"],
  33863. "additionalProperties": false
  33864. },
  33865. "EventCatalogUpdated": {
  33866. "type": "object",
  33867. "properties": {
  33868. "id": {
  33869. "type": "string",
  33870. "pattern": "^evt_"
  33871. },
  33872. "type": {
  33873. "type": "string",
  33874. "enum": ["catalog.updated"]
  33875. },
  33876. "properties": {
  33877. "type": "object",
  33878. "properties": {}
  33879. }
  33880. },
  33881. "required": ["id", "type", "properties"],
  33882. "additionalProperties": false
  33883. },
  33884. "EventSessionCreated": {
  33885. "type": "object",
  33886. "properties": {
  33887. "id": {
  33888. "type": "string",
  33889. "pattern": "^evt_"
  33890. },
  33891. "type": {
  33892. "type": "string",
  33893. "enum": ["session.created"]
  33894. },
  33895. "properties": {
  33896. "type": "object",
  33897. "properties": {
  33898. "sessionID": {
  33899. "type": "string",
  33900. "pattern": "^ses"
  33901. },
  33902. "info": {
  33903. "$ref": "#/components/schemas/Session"
  33904. }
  33905. },
  33906. "required": ["sessionID", "info"],
  33907. "additionalProperties": false
  33908. }
  33909. },
  33910. "required": ["id", "type", "properties"],
  33911. "additionalProperties": false
  33912. },
  33913. "EventSessionUpdated": {
  33914. "type": "object",
  33915. "properties": {
  33916. "id": {
  33917. "type": "string",
  33918. "pattern": "^evt_"
  33919. },
  33920. "type": {
  33921. "type": "string",
  33922. "enum": ["session.updated"]
  33923. },
  33924. "properties": {
  33925. "type": "object",
  33926. "properties": {
  33927. "sessionID": {
  33928. "type": "string",
  33929. "pattern": "^ses"
  33930. },
  33931. "info": {
  33932. "$ref": "#/components/schemas/Session"
  33933. }
  33934. },
  33935. "required": ["sessionID", "info"],
  33936. "additionalProperties": false
  33937. }
  33938. },
  33939. "required": ["id", "type", "properties"],
  33940. "additionalProperties": false
  33941. },
  33942. "EventSessionDeleted": {
  33943. "type": "object",
  33944. "properties": {
  33945. "id": {
  33946. "type": "string",
  33947. "pattern": "^evt_"
  33948. },
  33949. "type": {
  33950. "type": "string",
  33951. "enum": ["session.deleted"]
  33952. },
  33953. "properties": {
  33954. "type": "object",
  33955. "properties": {
  33956. "sessionID": {
  33957. "type": "string",
  33958. "pattern": "^ses"
  33959. },
  33960. "info": {
  33961. "$ref": "#/components/schemas/Session"
  33962. }
  33963. },
  33964. "required": ["sessionID", "info"],
  33965. "additionalProperties": false
  33966. }
  33967. },
  33968. "required": ["id", "type", "properties"],
  33969. "additionalProperties": false
  33970. },
  33971. "EventMessageUpdated": {
  33972. "type": "object",
  33973. "properties": {
  33974. "id": {
  33975. "type": "string",
  33976. "pattern": "^evt_"
  33977. },
  33978. "type": {
  33979. "type": "string",
  33980. "enum": ["message.updated"]
  33981. },
  33982. "properties": {
  33983. "type": "object",
  33984. "properties": {
  33985. "sessionID": {
  33986. "type": "string",
  33987. "pattern": "^ses"
  33988. },
  33989. "info": {
  33990. "$ref": "#/components/schemas/Message"
  33991. }
  33992. },
  33993. "required": ["sessionID", "info"],
  33994. "additionalProperties": false
  33995. }
  33996. },
  33997. "required": ["id", "type", "properties"],
  33998. "additionalProperties": false
  33999. },
  34000. "EventMessageRemoved": {
  34001. "type": "object",
  34002. "properties": {
  34003. "id": {
  34004. "type": "string",
  34005. "pattern": "^evt_"
  34006. },
  34007. "type": {
  34008. "type": "string",
  34009. "enum": ["message.removed"]
  34010. },
  34011. "properties": {
  34012. "type": "object",
  34013. "properties": {
  34014. "sessionID": {
  34015. "type": "string",
  34016. "pattern": "^ses"
  34017. },
  34018. "messageID": {
  34019. "type": "string",
  34020. "pattern": "^msg"
  34021. }
  34022. },
  34023. "required": ["sessionID", "messageID"],
  34024. "additionalProperties": false
  34025. }
  34026. },
  34027. "required": ["id", "type", "properties"],
  34028. "additionalProperties": false
  34029. },
  34030. "EventMessagePartUpdated": {
  34031. "type": "object",
  34032. "properties": {
  34033. "id": {
  34034. "type": "string",
  34035. "pattern": "^evt_"
  34036. },
  34037. "type": {
  34038. "type": "string",
  34039. "enum": ["message.part.updated"]
  34040. },
  34041. "properties": {
  34042. "type": "object",
  34043. "properties": {
  34044. "sessionID": {
  34045. "type": "string",
  34046. "pattern": "^ses"
  34047. },
  34048. "part": {
  34049. "$ref": "#/components/schemas/Part"
  34050. },
  34051. "time": {
  34052. "type": "number"
  34053. }
  34054. },
  34055. "required": ["sessionID", "part", "time"],
  34056. "additionalProperties": false
  34057. }
  34058. },
  34059. "required": ["id", "type", "properties"],
  34060. "additionalProperties": false
  34061. },
  34062. "EventMessagePartRemoved": {
  34063. "type": "object",
  34064. "properties": {
  34065. "id": {
  34066. "type": "string",
  34067. "pattern": "^evt_"
  34068. },
  34069. "type": {
  34070. "type": "string",
  34071. "enum": ["message.part.removed"]
  34072. },
  34073. "properties": {
  34074. "type": "object",
  34075. "properties": {
  34076. "sessionID": {
  34077. "type": "string",
  34078. "pattern": "^ses"
  34079. },
  34080. "messageID": {
  34081. "type": "string",
  34082. "pattern": "^msg"
  34083. },
  34084. "partID": {
  34085. "type": "string",
  34086. "pattern": "^prt"
  34087. }
  34088. },
  34089. "required": ["sessionID", "messageID", "partID"],
  34090. "additionalProperties": false
  34091. }
  34092. },
  34093. "required": ["id", "type", "properties"],
  34094. "additionalProperties": false
  34095. },
  34096. "EventSessionNextAgentSwitched": {
  34097. "type": "object",
  34098. "properties": {
  34099. "id": {
  34100. "type": "string",
  34101. "pattern": "^evt_"
  34102. },
  34103. "type": {
  34104. "type": "string",
  34105. "enum": ["session.next.agent.switched"]
  34106. },
  34107. "properties": {
  34108. "type": "object",
  34109. "properties": {
  34110. "timestamp": {
  34111. "type": "number"
  34112. },
  34113. "sessionID": {
  34114. "type": "string",
  34115. "pattern": "^ses"
  34116. },
  34117. "messageID": {
  34118. "type": "string",
  34119. "pattern": "^msg_"
  34120. },
  34121. "agent": {
  34122. "type": "string"
  34123. }
  34124. },
  34125. "required": ["timestamp", "sessionID", "messageID", "agent"],
  34126. "additionalProperties": false
  34127. }
  34128. },
  34129. "required": ["id", "type", "properties"],
  34130. "additionalProperties": false
  34131. },
  34132. "EventSessionNextModelSwitched": {
  34133. "type": "object",
  34134. "properties": {
  34135. "id": {
  34136. "type": "string",
  34137. "pattern": "^evt_"
  34138. },
  34139. "type": {
  34140. "type": "string",
  34141. "enum": ["session.next.model.switched"]
  34142. },
  34143. "properties": {
  34144. "type": "object",
  34145. "properties": {
  34146. "timestamp": {
  34147. "type": "number"
  34148. },
  34149. "sessionID": {
  34150. "type": "string",
  34151. "pattern": "^ses"
  34152. },
  34153. "messageID": {
  34154. "type": "string",
  34155. "pattern": "^msg_"
  34156. },
  34157. "model": {
  34158. "$ref": "#/components/schemas/ModelRef"
  34159. }
  34160. },
  34161. "required": ["timestamp", "sessionID", "messageID", "model"],
  34162. "additionalProperties": false
  34163. }
  34164. },
  34165. "required": ["id", "type", "properties"],
  34166. "additionalProperties": false
  34167. },
  34168. "EventSessionNextMoved": {
  34169. "type": "object",
  34170. "properties": {
  34171. "id": {
  34172. "type": "string",
  34173. "pattern": "^evt_"
  34174. },
  34175. "type": {
  34176. "type": "string",
  34177. "enum": ["session.next.moved"]
  34178. },
  34179. "properties": {
  34180. "type": "object",
  34181. "properties": {
  34182. "timestamp": {
  34183. "type": "number"
  34184. },
  34185. "sessionID": {
  34186. "type": "string",
  34187. "pattern": "^ses"
  34188. },
  34189. "location": {
  34190. "$ref": "#/components/schemas/LocationRef"
  34191. },
  34192. "subdirectory": {
  34193. "type": "string"
  34194. }
  34195. },
  34196. "required": ["timestamp", "sessionID", "location"],
  34197. "additionalProperties": false
  34198. }
  34199. },
  34200. "required": ["id", "type", "properties"],
  34201. "additionalProperties": false
  34202. },
  34203. "EventSessionNextPrompted": {
  34204. "type": "object",
  34205. "properties": {
  34206. "id": {
  34207. "type": "string",
  34208. "pattern": "^evt_"
  34209. },
  34210. "type": {
  34211. "type": "string",
  34212. "enum": ["session.next.prompted"]
  34213. },
  34214. "properties": {
  34215. "type": "object",
  34216. "properties": {
  34217. "timestamp": {
  34218. "type": "number"
  34219. },
  34220. "sessionID": {
  34221. "type": "string",
  34222. "pattern": "^ses"
  34223. },
  34224. "messageID": {
  34225. "type": "string",
  34226. "pattern": "^msg_"
  34227. },
  34228. "prompt": {
  34229. "$ref": "#/components/schemas/Prompt"
  34230. },
  34231. "delivery": {
  34232. "type": "string",
  34233. "enum": ["steer", "queue"]
  34234. }
  34235. },
  34236. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34237. "additionalProperties": false
  34238. }
  34239. },
  34240. "required": ["id", "type", "properties"],
  34241. "additionalProperties": false
  34242. },
  34243. "EventSessionNextPromptAdmitted": {
  34244. "type": "object",
  34245. "properties": {
  34246. "id": {
  34247. "type": "string",
  34248. "pattern": "^evt_"
  34249. },
  34250. "type": {
  34251. "type": "string",
  34252. "enum": ["session.next.prompt.admitted"]
  34253. },
  34254. "properties": {
  34255. "type": "object",
  34256. "properties": {
  34257. "timestamp": {
  34258. "type": "number"
  34259. },
  34260. "sessionID": {
  34261. "type": "string",
  34262. "pattern": "^ses"
  34263. },
  34264. "messageID": {
  34265. "type": "string",
  34266. "pattern": "^msg_"
  34267. },
  34268. "prompt": {
  34269. "$ref": "#/components/schemas/Prompt"
  34270. },
  34271. "delivery": {
  34272. "type": "string",
  34273. "enum": ["steer", "queue"]
  34274. }
  34275. },
  34276. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34277. "additionalProperties": false
  34278. }
  34279. },
  34280. "required": ["id", "type", "properties"],
  34281. "additionalProperties": false
  34282. },
  34283. "EventSessionNextContextUpdated": {
  34284. "type": "object",
  34285. "properties": {
  34286. "id": {
  34287. "type": "string",
  34288. "pattern": "^evt_"
  34289. },
  34290. "type": {
  34291. "type": "string",
  34292. "enum": ["session.next.context.updated"]
  34293. },
  34294. "properties": {
  34295. "type": "object",
  34296. "properties": {
  34297. "timestamp": {
  34298. "type": "number"
  34299. },
  34300. "sessionID": {
  34301. "type": "string",
  34302. "pattern": "^ses"
  34303. },
  34304. "messageID": {
  34305. "type": "string",
  34306. "pattern": "^msg_"
  34307. },
  34308. "text": {
  34309. "type": "string"
  34310. }
  34311. },
  34312. "required": ["timestamp", "sessionID", "messageID", "text"],
  34313. "additionalProperties": false
  34314. }
  34315. },
  34316. "required": ["id", "type", "properties"],
  34317. "additionalProperties": false
  34318. },
  34319. "EventSessionNextSynthetic": {
  34320. "type": "object",
  34321. "properties": {
  34322. "id": {
  34323. "type": "string",
  34324. "pattern": "^evt_"
  34325. },
  34326. "type": {
  34327. "type": "string",
  34328. "enum": ["session.next.synthetic"]
  34329. },
  34330. "properties": {
  34331. "type": "object",
  34332. "properties": {
  34333. "timestamp": {
  34334. "type": "number"
  34335. },
  34336. "sessionID": {
  34337. "type": "string",
  34338. "pattern": "^ses"
  34339. },
  34340. "messageID": {
  34341. "type": "string",
  34342. "pattern": "^msg_"
  34343. },
  34344. "text": {
  34345. "type": "string"
  34346. }
  34347. },
  34348. "required": ["timestamp", "sessionID", "messageID", "text"],
  34349. "additionalProperties": false
  34350. }
  34351. },
  34352. "required": ["id", "type", "properties"],
  34353. "additionalProperties": false
  34354. },
  34355. "EventSessionNextShellStarted": {
  34356. "type": "object",
  34357. "properties": {
  34358. "id": {
  34359. "type": "string",
  34360. "pattern": "^evt_"
  34361. },
  34362. "type": {
  34363. "type": "string",
  34364. "enum": ["session.next.shell.started"]
  34365. },
  34366. "properties": {
  34367. "type": "object",
  34368. "properties": {
  34369. "timestamp": {
  34370. "type": "number"
  34371. },
  34372. "sessionID": {
  34373. "type": "string",
  34374. "pattern": "^ses"
  34375. },
  34376. "messageID": {
  34377. "type": "string",
  34378. "pattern": "^msg_"
  34379. },
  34380. "callID": {
  34381. "type": "string"
  34382. },
  34383. "command": {
  34384. "type": "string"
  34385. }
  34386. },
  34387. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  34388. "additionalProperties": false
  34389. }
  34390. },
  34391. "required": ["id", "type", "properties"],
  34392. "additionalProperties": false
  34393. },
  34394. "EventSessionNextShellEnded": {
  34395. "type": "object",
  34396. "properties": {
  34397. "id": {
  34398. "type": "string",
  34399. "pattern": "^evt_"
  34400. },
  34401. "type": {
  34402. "type": "string",
  34403. "enum": ["session.next.shell.ended"]
  34404. },
  34405. "properties": {
  34406. "type": "object",
  34407. "properties": {
  34408. "timestamp": {
  34409. "type": "number"
  34410. },
  34411. "sessionID": {
  34412. "type": "string",
  34413. "pattern": "^ses"
  34414. },
  34415. "callID": {
  34416. "type": "string"
  34417. },
  34418. "output": {
  34419. "type": "string"
  34420. }
  34421. },
  34422. "required": ["timestamp", "sessionID", "callID", "output"],
  34423. "additionalProperties": false
  34424. }
  34425. },
  34426. "required": ["id", "type", "properties"],
  34427. "additionalProperties": false
  34428. },
  34429. "EventSessionNextStepStarted": {
  34430. "type": "object",
  34431. "properties": {
  34432. "id": {
  34433. "type": "string",
  34434. "pattern": "^evt_"
  34435. },
  34436. "type": {
  34437. "type": "string",
  34438. "enum": ["session.next.step.started"]
  34439. },
  34440. "properties": {
  34441. "type": "object",
  34442. "properties": {
  34443. "timestamp": {
  34444. "type": "number"
  34445. },
  34446. "sessionID": {
  34447. "type": "string",
  34448. "pattern": "^ses"
  34449. },
  34450. "assistantMessageID": {
  34451. "type": "string",
  34452. "pattern": "^msg_"
  34453. },
  34454. "agent": {
  34455. "type": "string"
  34456. },
  34457. "model": {
  34458. "$ref": "#/components/schemas/ModelRef"
  34459. },
  34460. "snapshot": {
  34461. "type": "string"
  34462. }
  34463. },
  34464. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  34465. "additionalProperties": false
  34466. }
  34467. },
  34468. "required": ["id", "type", "properties"],
  34469. "additionalProperties": false
  34470. },
  34471. "EventSessionNextStepEnded": {
  34472. "type": "object",
  34473. "properties": {
  34474. "id": {
  34475. "type": "string",
  34476. "pattern": "^evt_"
  34477. },
  34478. "type": {
  34479. "type": "string",
  34480. "enum": ["session.next.step.ended"]
  34481. },
  34482. "properties": {
  34483. "type": "object",
  34484. "properties": {
  34485. "timestamp": {
  34486. "type": "number"
  34487. },
  34488. "sessionID": {
  34489. "type": "string",
  34490. "pattern": "^ses"
  34491. },
  34492. "assistantMessageID": {
  34493. "type": "string",
  34494. "pattern": "^msg_"
  34495. },
  34496. "finish": {
  34497. "type": "string"
  34498. },
  34499. "cost": {
  34500. "type": "number"
  34501. },
  34502. "tokens": {
  34503. "type": "object",
  34504. "properties": {
  34505. "input": {
  34506. "type": "number"
  34507. },
  34508. "output": {
  34509. "type": "number"
  34510. },
  34511. "reasoning": {
  34512. "type": "number"
  34513. },
  34514. "cache": {
  34515. "type": "object",
  34516. "properties": {
  34517. "read": {
  34518. "type": "number"
  34519. },
  34520. "write": {
  34521. "type": "number"
  34522. }
  34523. },
  34524. "required": ["read", "write"],
  34525. "additionalProperties": false
  34526. }
  34527. },
  34528. "required": ["input", "output", "reasoning", "cache"],
  34529. "additionalProperties": false
  34530. },
  34531. "snapshot": {
  34532. "type": "string"
  34533. },
  34534. "files": {
  34535. "type": "array",
  34536. "items": {
  34537. "type": "string"
  34538. }
  34539. }
  34540. },
  34541. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  34542. "additionalProperties": false
  34543. }
  34544. },
  34545. "required": ["id", "type", "properties"],
  34546. "additionalProperties": false
  34547. },
  34548. "EventSessionNextStepFailed": {
  34549. "type": "object",
  34550. "properties": {
  34551. "id": {
  34552. "type": "string",
  34553. "pattern": "^evt_"
  34554. },
  34555. "type": {
  34556. "type": "string",
  34557. "enum": ["session.next.step.failed"]
  34558. },
  34559. "properties": {
  34560. "type": "object",
  34561. "properties": {
  34562. "timestamp": {
  34563. "type": "number"
  34564. },
  34565. "sessionID": {
  34566. "type": "string",
  34567. "pattern": "^ses"
  34568. },
  34569. "assistantMessageID": {
  34570. "type": "string",
  34571. "pattern": "^msg_"
  34572. },
  34573. "error": {
  34574. "$ref": "#/components/schemas/SessionErrorUnknown"
  34575. }
  34576. },
  34577. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  34578. "additionalProperties": false
  34579. }
  34580. },
  34581. "required": ["id", "type", "properties"],
  34582. "additionalProperties": false
  34583. },
  34584. "EventSessionNextTextStarted": {
  34585. "type": "object",
  34586. "properties": {
  34587. "id": {
  34588. "type": "string",
  34589. "pattern": "^evt_"
  34590. },
  34591. "type": {
  34592. "type": "string",
  34593. "enum": ["session.next.text.started"]
  34594. },
  34595. "properties": {
  34596. "type": "object",
  34597. "properties": {
  34598. "timestamp": {
  34599. "type": "number"
  34600. },
  34601. "sessionID": {
  34602. "type": "string",
  34603. "pattern": "^ses"
  34604. },
  34605. "assistantMessageID": {
  34606. "type": "string",
  34607. "pattern": "^msg_"
  34608. },
  34609. "textID": {
  34610. "type": "string"
  34611. }
  34612. },
  34613. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  34614. "additionalProperties": false
  34615. }
  34616. },
  34617. "required": ["id", "type", "properties"],
  34618. "additionalProperties": false
  34619. },
  34620. "EventSessionNextTextDelta": {
  34621. "type": "object",
  34622. "properties": {
  34623. "id": {
  34624. "type": "string",
  34625. "pattern": "^evt_"
  34626. },
  34627. "type": {
  34628. "type": "string",
  34629. "enum": ["session.next.text.delta"]
  34630. },
  34631. "properties": {
  34632. "type": "object",
  34633. "properties": {
  34634. "timestamp": {
  34635. "type": "number"
  34636. },
  34637. "sessionID": {
  34638. "type": "string",
  34639. "pattern": "^ses"
  34640. },
  34641. "assistantMessageID": {
  34642. "type": "string",
  34643. "pattern": "^msg_"
  34644. },
  34645. "textID": {
  34646. "type": "string"
  34647. },
  34648. "delta": {
  34649. "type": "string"
  34650. }
  34651. },
  34652. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  34653. "additionalProperties": false
  34654. }
  34655. },
  34656. "required": ["id", "type", "properties"],
  34657. "additionalProperties": false
  34658. },
  34659. "EventSessionNextTextEnded": {
  34660. "type": "object",
  34661. "properties": {
  34662. "id": {
  34663. "type": "string",
  34664. "pattern": "^evt_"
  34665. },
  34666. "type": {
  34667. "type": "string",
  34668. "enum": ["session.next.text.ended"]
  34669. },
  34670. "properties": {
  34671. "type": "object",
  34672. "properties": {
  34673. "timestamp": {
  34674. "type": "number"
  34675. },
  34676. "sessionID": {
  34677. "type": "string",
  34678. "pattern": "^ses"
  34679. },
  34680. "assistantMessageID": {
  34681. "type": "string",
  34682. "pattern": "^msg_"
  34683. },
  34684. "textID": {
  34685. "type": "string"
  34686. },
  34687. "text": {
  34688. "type": "string"
  34689. }
  34690. },
  34691. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  34692. "additionalProperties": false
  34693. }
  34694. },
  34695. "required": ["id", "type", "properties"],
  34696. "additionalProperties": false
  34697. },
  34698. "EventSessionNextReasoningStarted": {
  34699. "type": "object",
  34700. "properties": {
  34701. "id": {
  34702. "type": "string",
  34703. "pattern": "^evt_"
  34704. },
  34705. "type": {
  34706. "type": "string",
  34707. "enum": ["session.next.reasoning.started"]
  34708. },
  34709. "properties": {
  34710. "type": "object",
  34711. "properties": {
  34712. "timestamp": {
  34713. "type": "number"
  34714. },
  34715. "sessionID": {
  34716. "type": "string",
  34717. "pattern": "^ses"
  34718. },
  34719. "assistantMessageID": {
  34720. "type": "string",
  34721. "pattern": "^msg_"
  34722. },
  34723. "reasoningID": {
  34724. "type": "string"
  34725. },
  34726. "providerMetadata": {
  34727. "$ref": "#/components/schemas/LLMProviderMetadata"
  34728. }
  34729. },
  34730. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  34731. "additionalProperties": false
  34732. }
  34733. },
  34734. "required": ["id", "type", "properties"],
  34735. "additionalProperties": false
  34736. },
  34737. "EventSessionNextReasoningDelta": {
  34738. "type": "object",
  34739. "properties": {
  34740. "id": {
  34741. "type": "string",
  34742. "pattern": "^evt_"
  34743. },
  34744. "type": {
  34745. "type": "string",
  34746. "enum": ["session.next.reasoning.delta"]
  34747. },
  34748. "properties": {
  34749. "type": "object",
  34750. "properties": {
  34751. "timestamp": {
  34752. "type": "number"
  34753. },
  34754. "sessionID": {
  34755. "type": "string",
  34756. "pattern": "^ses"
  34757. },
  34758. "assistantMessageID": {
  34759. "type": "string",
  34760. "pattern": "^msg_"
  34761. },
  34762. "reasoningID": {
  34763. "type": "string"
  34764. },
  34765. "delta": {
  34766. "type": "string"
  34767. }
  34768. },
  34769. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  34770. "additionalProperties": false
  34771. }
  34772. },
  34773. "required": ["id", "type", "properties"],
  34774. "additionalProperties": false
  34775. },
  34776. "EventSessionNextReasoningEnded": {
  34777. "type": "object",
  34778. "properties": {
  34779. "id": {
  34780. "type": "string",
  34781. "pattern": "^evt_"
  34782. },
  34783. "type": {
  34784. "type": "string",
  34785. "enum": ["session.next.reasoning.ended"]
  34786. },
  34787. "properties": {
  34788. "type": "object",
  34789. "properties": {
  34790. "timestamp": {
  34791. "type": "number"
  34792. },
  34793. "sessionID": {
  34794. "type": "string",
  34795. "pattern": "^ses"
  34796. },
  34797. "assistantMessageID": {
  34798. "type": "string",
  34799. "pattern": "^msg_"
  34800. },
  34801. "reasoningID": {
  34802. "type": "string"
  34803. },
  34804. "text": {
  34805. "type": "string"
  34806. },
  34807. "providerMetadata": {
  34808. "$ref": "#/components/schemas/LLMProviderMetadata"
  34809. }
  34810. },
  34811. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  34812. "additionalProperties": false
  34813. }
  34814. },
  34815. "required": ["id", "type", "properties"],
  34816. "additionalProperties": false
  34817. },
  34818. "EventSessionNextToolInputStarted": {
  34819. "type": "object",
  34820. "properties": {
  34821. "id": {
  34822. "type": "string",
  34823. "pattern": "^evt_"
  34824. },
  34825. "type": {
  34826. "type": "string",
  34827. "enum": ["session.next.tool.input.started"]
  34828. },
  34829. "properties": {
  34830. "type": "object",
  34831. "properties": {
  34832. "timestamp": {
  34833. "type": "number"
  34834. },
  34835. "sessionID": {
  34836. "type": "string",
  34837. "pattern": "^ses"
  34838. },
  34839. "assistantMessageID": {
  34840. "type": "string",
  34841. "pattern": "^msg_"
  34842. },
  34843. "callID": {
  34844. "type": "string"
  34845. },
  34846. "name": {
  34847. "type": "string"
  34848. }
  34849. },
  34850. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  34851. "additionalProperties": false
  34852. }
  34853. },
  34854. "required": ["id", "type", "properties"],
  34855. "additionalProperties": false
  34856. },
  34857. "EventSessionNextToolInputDelta": {
  34858. "type": "object",
  34859. "properties": {
  34860. "id": {
  34861. "type": "string",
  34862. "pattern": "^evt_"
  34863. },
  34864. "type": {
  34865. "type": "string",
  34866. "enum": ["session.next.tool.input.delta"]
  34867. },
  34868. "properties": {
  34869. "type": "object",
  34870. "properties": {
  34871. "timestamp": {
  34872. "type": "number"
  34873. },
  34874. "sessionID": {
  34875. "type": "string",
  34876. "pattern": "^ses"
  34877. },
  34878. "assistantMessageID": {
  34879. "type": "string",
  34880. "pattern": "^msg_"
  34881. },
  34882. "callID": {
  34883. "type": "string"
  34884. },
  34885. "delta": {
  34886. "type": "string"
  34887. }
  34888. },
  34889. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  34890. "additionalProperties": false
  34891. }
  34892. },
  34893. "required": ["id", "type", "properties"],
  34894. "additionalProperties": false
  34895. },
  34896. "EventSessionNextToolInputEnded": {
  34897. "type": "object",
  34898. "properties": {
  34899. "id": {
  34900. "type": "string",
  34901. "pattern": "^evt_"
  34902. },
  34903. "type": {
  34904. "type": "string",
  34905. "enum": ["session.next.tool.input.ended"]
  34906. },
  34907. "properties": {
  34908. "type": "object",
  34909. "properties": {
  34910. "timestamp": {
  34911. "type": "number"
  34912. },
  34913. "sessionID": {
  34914. "type": "string",
  34915. "pattern": "^ses"
  34916. },
  34917. "assistantMessageID": {
  34918. "type": "string",
  34919. "pattern": "^msg_"
  34920. },
  34921. "callID": {
  34922. "type": "string"
  34923. },
  34924. "text": {
  34925. "type": "string"
  34926. }
  34927. },
  34928. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  34929. "additionalProperties": false
  34930. }
  34931. },
  34932. "required": ["id", "type", "properties"],
  34933. "additionalProperties": false
  34934. },
  34935. "EventSessionNextToolCalled": {
  34936. "type": "object",
  34937. "properties": {
  34938. "id": {
  34939. "type": "string",
  34940. "pattern": "^evt_"
  34941. },
  34942. "type": {
  34943. "type": "string",
  34944. "enum": ["session.next.tool.called"]
  34945. },
  34946. "properties": {
  34947. "type": "object",
  34948. "properties": {
  34949. "timestamp": {
  34950. "type": "number"
  34951. },
  34952. "sessionID": {
  34953. "type": "string",
  34954. "pattern": "^ses"
  34955. },
  34956. "assistantMessageID": {
  34957. "type": "string",
  34958. "pattern": "^msg_"
  34959. },
  34960. "callID": {
  34961. "type": "string"
  34962. },
  34963. "tool": {
  34964. "type": "string"
  34965. },
  34966. "input": {
  34967. "type": "object"
  34968. },
  34969. "provider": {
  34970. "type": "object",
  34971. "properties": {
  34972. "executed": {
  34973. "type": "boolean"
  34974. },
  34975. "metadata": {
  34976. "$ref": "#/components/schemas/LLMProviderMetadata"
  34977. }
  34978. },
  34979. "required": ["executed"],
  34980. "additionalProperties": false
  34981. }
  34982. },
  34983. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  34984. "additionalProperties": false
  34985. }
  34986. },
  34987. "required": ["id", "type", "properties"],
  34988. "additionalProperties": false
  34989. },
  34990. "EventSessionNextToolProgress": {
  34991. "type": "object",
  34992. "properties": {
  34993. "id": {
  34994. "type": "string",
  34995. "pattern": "^evt_"
  34996. },
  34997. "type": {
  34998. "type": "string",
  34999. "enum": ["session.next.tool.progress"]
  35000. },
  35001. "properties": {
  35002. "type": "object",
  35003. "properties": {
  35004. "timestamp": {
  35005. "type": "number"
  35006. },
  35007. "sessionID": {
  35008. "type": "string",
  35009. "pattern": "^ses"
  35010. },
  35011. "assistantMessageID": {
  35012. "type": "string",
  35013. "pattern": "^msg_"
  35014. },
  35015. "callID": {
  35016. "type": "string"
  35017. },
  35018. "structured": {
  35019. "type": "object"
  35020. },
  35021. "content": {
  35022. "type": "array",
  35023. "items": {
  35024. "$ref": "#/components/schemas/LLMToolContent"
  35025. }
  35026. }
  35027. },
  35028. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  35029. "additionalProperties": false
  35030. }
  35031. },
  35032. "required": ["id", "type", "properties"],
  35033. "additionalProperties": false
  35034. },
  35035. "EventSessionNextToolSuccess": {
  35036. "type": "object",
  35037. "properties": {
  35038. "id": {
  35039. "type": "string",
  35040. "pattern": "^evt_"
  35041. },
  35042. "type": {
  35043. "type": "string",
  35044. "enum": ["session.next.tool.success"]
  35045. },
  35046. "properties": {
  35047. "type": "object",
  35048. "properties": {
  35049. "timestamp": {
  35050. "type": "number"
  35051. },
  35052. "sessionID": {
  35053. "type": "string",
  35054. "pattern": "^ses"
  35055. },
  35056. "assistantMessageID": {
  35057. "type": "string",
  35058. "pattern": "^msg_"
  35059. },
  35060. "callID": {
  35061. "type": "string"
  35062. },
  35063. "structured": {
  35064. "type": "object"
  35065. },
  35066. "content": {
  35067. "type": "array",
  35068. "items": {
  35069. "$ref": "#/components/schemas/LLMToolContent"
  35070. }
  35071. },
  35072. "outputPaths": {
  35073. "type": "array",
  35074. "items": {
  35075. "type": "string"
  35076. }
  35077. },
  35078. "result": {},
  35079. "provider": {
  35080. "type": "object",
  35081. "properties": {
  35082. "executed": {
  35083. "type": "boolean"
  35084. },
  35085. "metadata": {
  35086. "$ref": "#/components/schemas/LLMProviderMetadata"
  35087. }
  35088. },
  35089. "required": ["executed"],
  35090. "additionalProperties": false
  35091. }
  35092. },
  35093. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  35094. "additionalProperties": false
  35095. }
  35096. },
  35097. "required": ["id", "type", "properties"],
  35098. "additionalProperties": false
  35099. },
  35100. "EventSessionNextToolFailed": {
  35101. "type": "object",
  35102. "properties": {
  35103. "id": {
  35104. "type": "string",
  35105. "pattern": "^evt_"
  35106. },
  35107. "type": {
  35108. "type": "string",
  35109. "enum": ["session.next.tool.failed"]
  35110. },
  35111. "properties": {
  35112. "type": "object",
  35113. "properties": {
  35114. "timestamp": {
  35115. "type": "number"
  35116. },
  35117. "sessionID": {
  35118. "type": "string",
  35119. "pattern": "^ses"
  35120. },
  35121. "assistantMessageID": {
  35122. "type": "string",
  35123. "pattern": "^msg_"
  35124. },
  35125. "callID": {
  35126. "type": "string"
  35127. },
  35128. "error": {
  35129. "$ref": "#/components/schemas/SessionErrorUnknown"
  35130. },
  35131. "result": {},
  35132. "provider": {
  35133. "type": "object",
  35134. "properties": {
  35135. "executed": {
  35136. "type": "boolean"
  35137. },
  35138. "metadata": {
  35139. "$ref": "#/components/schemas/LLMProviderMetadata"
  35140. }
  35141. },
  35142. "required": ["executed"],
  35143. "additionalProperties": false
  35144. }
  35145. },
  35146. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  35147. "additionalProperties": false
  35148. }
  35149. },
  35150. "required": ["id", "type", "properties"],
  35151. "additionalProperties": false
  35152. },
  35153. "EventSessionNextRetried": {
  35154. "type": "object",
  35155. "properties": {
  35156. "id": {
  35157. "type": "string",
  35158. "pattern": "^evt_"
  35159. },
  35160. "type": {
  35161. "type": "string",
  35162. "enum": ["session.next.retried"]
  35163. },
  35164. "properties": {
  35165. "type": "object",
  35166. "properties": {
  35167. "timestamp": {
  35168. "type": "number"
  35169. },
  35170. "sessionID": {
  35171. "type": "string",
  35172. "pattern": "^ses"
  35173. },
  35174. "attempt": {
  35175. "type": "number"
  35176. },
  35177. "error": {
  35178. "$ref": "#/components/schemas/SessionNextRetry_error"
  35179. }
  35180. },
  35181. "required": ["timestamp", "sessionID", "attempt", "error"],
  35182. "additionalProperties": false
  35183. }
  35184. },
  35185. "required": ["id", "type", "properties"],
  35186. "additionalProperties": false
  35187. },
  35188. "EventSessionNextCompactionStarted": {
  35189. "type": "object",
  35190. "properties": {
  35191. "id": {
  35192. "type": "string",
  35193. "pattern": "^evt_"
  35194. },
  35195. "type": {
  35196. "type": "string",
  35197. "enum": ["session.next.compaction.started"]
  35198. },
  35199. "properties": {
  35200. "type": "object",
  35201. "properties": {
  35202. "timestamp": {
  35203. "type": "number"
  35204. },
  35205. "sessionID": {
  35206. "type": "string",
  35207. "pattern": "^ses"
  35208. },
  35209. "messageID": {
  35210. "type": "string",
  35211. "pattern": "^msg_"
  35212. },
  35213. "reason": {
  35214. "type": "string",
  35215. "enum": ["auto", "manual"]
  35216. }
  35217. },
  35218. "required": ["timestamp", "sessionID", "messageID", "reason"],
  35219. "additionalProperties": false
  35220. }
  35221. },
  35222. "required": ["id", "type", "properties"],
  35223. "additionalProperties": false
  35224. },
  35225. "EventSessionNextCompactionDelta": {
  35226. "type": "object",
  35227. "properties": {
  35228. "id": {
  35229. "type": "string",
  35230. "pattern": "^evt_"
  35231. },
  35232. "type": {
  35233. "type": "string",
  35234. "enum": ["session.next.compaction.delta"]
  35235. },
  35236. "properties": {
  35237. "type": "object",
  35238. "properties": {
  35239. "timestamp": {
  35240. "type": "number"
  35241. },
  35242. "sessionID": {
  35243. "type": "string",
  35244. "pattern": "^ses"
  35245. },
  35246. "messageID": {
  35247. "type": "string",
  35248. "pattern": "^msg_"
  35249. },
  35250. "text": {
  35251. "type": "string"
  35252. }
  35253. },
  35254. "required": ["timestamp", "sessionID", "messageID", "text"],
  35255. "additionalProperties": false
  35256. }
  35257. },
  35258. "required": ["id", "type", "properties"],
  35259. "additionalProperties": false
  35260. },
  35261. "EventSessionNextCompactionEnded": {
  35262. "type": "object",
  35263. "properties": {
  35264. "id": {
  35265. "type": "string",
  35266. "pattern": "^evt_"
  35267. },
  35268. "type": {
  35269. "type": "string",
  35270. "enum": ["session.next.compaction.ended"]
  35271. },
  35272. "properties": {
  35273. "type": "object",
  35274. "properties": {
  35275. "timestamp": {
  35276. "type": "number"
  35277. },
  35278. "sessionID": {
  35279. "type": "string",
  35280. "pattern": "^ses"
  35281. },
  35282. "messageID": {
  35283. "type": "string",
  35284. "pattern": "^msg_"
  35285. },
  35286. "reason": {
  35287. "type": "string",
  35288. "enum": ["auto", "manual"]
  35289. },
  35290. "text": {
  35291. "type": "string"
  35292. },
  35293. "recent": {
  35294. "type": "string"
  35295. }
  35296. },
  35297. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  35298. "additionalProperties": false
  35299. }
  35300. },
  35301. "required": ["id", "type", "properties"],
  35302. "additionalProperties": false
  35303. },
  35304. "EventSessionNextRevertStaged": {
  35305. "type": "object",
  35306. "properties": {
  35307. "id": {
  35308. "type": "string",
  35309. "pattern": "^evt_"
  35310. },
  35311. "type": {
  35312. "type": "string",
  35313. "enum": ["session.next.revert.staged"]
  35314. },
  35315. "properties": {
  35316. "type": "object",
  35317. "properties": {
  35318. "timestamp": {
  35319. "type": "number"
  35320. },
  35321. "sessionID": {
  35322. "type": "string",
  35323. "pattern": "^ses"
  35324. },
  35325. "revert": {
  35326. "$ref": "#/components/schemas/RevertState"
  35327. }
  35328. },
  35329. "required": ["timestamp", "sessionID", "revert"],
  35330. "additionalProperties": false
  35331. }
  35332. },
  35333. "required": ["id", "type", "properties"],
  35334. "additionalProperties": false
  35335. },
  35336. "EventSessionNextRevertCleared": {
  35337. "type": "object",
  35338. "properties": {
  35339. "id": {
  35340. "type": "string",
  35341. "pattern": "^evt_"
  35342. },
  35343. "type": {
  35344. "type": "string",
  35345. "enum": ["session.next.revert.cleared"]
  35346. },
  35347. "properties": {
  35348. "type": "object",
  35349. "properties": {
  35350. "timestamp": {
  35351. "type": "number"
  35352. },
  35353. "sessionID": {
  35354. "type": "string",
  35355. "pattern": "^ses"
  35356. }
  35357. },
  35358. "required": ["timestamp", "sessionID"],
  35359. "additionalProperties": false
  35360. }
  35361. },
  35362. "required": ["id", "type", "properties"],
  35363. "additionalProperties": false
  35364. },
  35365. "EventSessionNextRevertCommitted": {
  35366. "type": "object",
  35367. "properties": {
  35368. "id": {
  35369. "type": "string",
  35370. "pattern": "^evt_"
  35371. },
  35372. "type": {
  35373. "type": "string",
  35374. "enum": ["session.next.revert.committed"]
  35375. },
  35376. "properties": {
  35377. "type": "object",
  35378. "properties": {
  35379. "timestamp": {
  35380. "type": "number"
  35381. },
  35382. "sessionID": {
  35383. "type": "string",
  35384. "pattern": "^ses"
  35385. },
  35386. "messageID": {
  35387. "type": "string",
  35388. "pattern": "^msg_"
  35389. }
  35390. },
  35391. "required": ["timestamp", "sessionID", "messageID"],
  35392. "additionalProperties": false
  35393. }
  35394. },
  35395. "required": ["id", "type", "properties"],
  35396. "additionalProperties": false
  35397. },
  35398. "EventMessagePartDelta": {
  35399. "type": "object",
  35400. "properties": {
  35401. "id": {
  35402. "type": "string",
  35403. "pattern": "^evt_"
  35404. },
  35405. "type": {
  35406. "type": "string",
  35407. "enum": ["message.part.delta"]
  35408. },
  35409. "properties": {
  35410. "type": "object",
  35411. "properties": {
  35412. "sessionID": {
  35413. "type": "string",
  35414. "pattern": "^ses"
  35415. },
  35416. "messageID": {
  35417. "type": "string",
  35418. "pattern": "^msg"
  35419. },
  35420. "partID": {
  35421. "type": "string",
  35422. "pattern": "^prt"
  35423. },
  35424. "field": {
  35425. "type": "string"
  35426. },
  35427. "delta": {
  35428. "type": "string"
  35429. }
  35430. },
  35431. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  35432. "additionalProperties": false
  35433. }
  35434. },
  35435. "required": ["id", "type", "properties"],
  35436. "additionalProperties": false
  35437. },
  35438. "EventSessionDiff": {
  35439. "type": "object",
  35440. "properties": {
  35441. "id": {
  35442. "type": "string",
  35443. "pattern": "^evt_"
  35444. },
  35445. "type": {
  35446. "type": "string",
  35447. "enum": ["session.diff"]
  35448. },
  35449. "properties": {
  35450. "type": "object",
  35451. "properties": {
  35452. "sessionID": {
  35453. "type": "string",
  35454. "pattern": "^ses"
  35455. },
  35456. "diff": {
  35457. "type": "array",
  35458. "items": {
  35459. "$ref": "#/components/schemas/SnapshotFileDiff"
  35460. }
  35461. }
  35462. },
  35463. "required": ["sessionID", "diff"],
  35464. "additionalProperties": false
  35465. }
  35466. },
  35467. "required": ["id", "type", "properties"],
  35468. "additionalProperties": false
  35469. },
  35470. "EventSessionError": {
  35471. "type": "object",
  35472. "properties": {
  35473. "id": {
  35474. "type": "string",
  35475. "pattern": "^evt_"
  35476. },
  35477. "type": {
  35478. "type": "string",
  35479. "enum": ["session.error"]
  35480. },
  35481. "properties": {
  35482. "type": "object",
  35483. "properties": {
  35484. "sessionID": {
  35485. "type": "string",
  35486. "pattern": "^ses"
  35487. },
  35488. "error": {
  35489. "anyOf": [
  35490. {
  35491. "$ref": "#/components/schemas/ProviderAuthError"
  35492. },
  35493. {
  35494. "$ref": "#/components/schemas/UnknownError"
  35495. },
  35496. {
  35497. "$ref": "#/components/schemas/MessageOutputLengthError"
  35498. },
  35499. {
  35500. "$ref": "#/components/schemas/MessageAbortedError"
  35501. },
  35502. {
  35503. "$ref": "#/components/schemas/StructuredOutputError"
  35504. },
  35505. {
  35506. "$ref": "#/components/schemas/ContextOverflowError"
  35507. },
  35508. {
  35509. "$ref": "#/components/schemas/ContentFilterError"
  35510. },
  35511. {
  35512. "$ref": "#/components/schemas/APIError"
  35513. }
  35514. ]
  35515. }
  35516. },
  35517. "additionalProperties": false
  35518. }
  35519. },
  35520. "required": ["id", "type", "properties"],
  35521. "additionalProperties": false
  35522. },
  35523. "EventInstallationUpdated": {
  35524. "type": "object",
  35525. "properties": {
  35526. "id": {
  35527. "type": "string",
  35528. "pattern": "^evt_"
  35529. },
  35530. "type": {
  35531. "type": "string",
  35532. "enum": ["installation.updated"]
  35533. },
  35534. "properties": {
  35535. "type": "object",
  35536. "properties": {
  35537. "version": {
  35538. "type": "string"
  35539. }
  35540. },
  35541. "required": ["version"],
  35542. "additionalProperties": false
  35543. }
  35544. },
  35545. "required": ["id", "type", "properties"],
  35546. "additionalProperties": false
  35547. },
  35548. "EventInstallationUpdate-available": {
  35549. "type": "object",
  35550. "properties": {
  35551. "id": {
  35552. "type": "string",
  35553. "pattern": "^evt_"
  35554. },
  35555. "type": {
  35556. "type": "string",
  35557. "enum": ["installation.update-available"]
  35558. },
  35559. "properties": {
  35560. "type": "object",
  35561. "properties": {
  35562. "version": {
  35563. "type": "string"
  35564. }
  35565. },
  35566. "required": ["version"],
  35567. "additionalProperties": false
  35568. }
  35569. },
  35570. "required": ["id", "type", "properties"],
  35571. "additionalProperties": false
  35572. },
  35573. "EventFileEdited": {
  35574. "type": "object",
  35575. "properties": {
  35576. "id": {
  35577. "type": "string",
  35578. "pattern": "^evt_"
  35579. },
  35580. "type": {
  35581. "type": "string",
  35582. "enum": ["file.edited"]
  35583. },
  35584. "properties": {
  35585. "type": "object",
  35586. "properties": {
  35587. "file": {
  35588. "type": "string"
  35589. }
  35590. },
  35591. "required": ["file"],
  35592. "additionalProperties": false
  35593. }
  35594. },
  35595. "required": ["id", "type", "properties"],
  35596. "additionalProperties": false
  35597. },
  35598. "EventReferenceUpdated": {
  35599. "type": "object",
  35600. "properties": {
  35601. "id": {
  35602. "type": "string",
  35603. "pattern": "^evt_"
  35604. },
  35605. "type": {
  35606. "type": "string",
  35607. "enum": ["reference.updated"]
  35608. },
  35609. "properties": {
  35610. "type": "object",
  35611. "properties": {}
  35612. }
  35613. },
  35614. "required": ["id", "type", "properties"],
  35615. "additionalProperties": false
  35616. },
  35617. "EventPermissionV2Asked": {
  35618. "type": "object",
  35619. "properties": {
  35620. "id": {
  35621. "type": "string",
  35622. "pattern": "^evt_"
  35623. },
  35624. "type": {
  35625. "type": "string",
  35626. "enum": ["permission.v2.asked"]
  35627. },
  35628. "properties": {
  35629. "type": "object",
  35630. "properties": {
  35631. "id": {
  35632. "type": "string",
  35633. "pattern": "^per"
  35634. },
  35635. "sessionID": {
  35636. "type": "string",
  35637. "pattern": "^ses"
  35638. },
  35639. "action": {
  35640. "type": "string"
  35641. },
  35642. "resources": {
  35643. "type": "array",
  35644. "items": {
  35645. "type": "string"
  35646. }
  35647. },
  35648. "save": {
  35649. "type": "array",
  35650. "items": {
  35651. "type": "string"
  35652. }
  35653. },
  35654. "metadata": {
  35655. "type": "object"
  35656. },
  35657. "source": {
  35658. "$ref": "#/components/schemas/PermissionV2Source"
  35659. }
  35660. },
  35661. "required": ["id", "sessionID", "action", "resources"],
  35662. "additionalProperties": false
  35663. }
  35664. },
  35665. "required": ["id", "type", "properties"],
  35666. "additionalProperties": false
  35667. },
  35668. "EventPermissionV2Replied": {
  35669. "type": "object",
  35670. "properties": {
  35671. "id": {
  35672. "type": "string",
  35673. "pattern": "^evt_"
  35674. },
  35675. "type": {
  35676. "type": "string",
  35677. "enum": ["permission.v2.replied"]
  35678. },
  35679. "properties": {
  35680. "type": "object",
  35681. "properties": {
  35682. "sessionID": {
  35683. "type": "string",
  35684. "pattern": "^ses"
  35685. },
  35686. "requestID": {
  35687. "type": "string",
  35688. "pattern": "^per"
  35689. },
  35690. "reply": {
  35691. "$ref": "#/components/schemas/PermissionV2Reply"
  35692. }
  35693. },
  35694. "required": ["sessionID", "requestID", "reply"],
  35695. "additionalProperties": false
  35696. }
  35697. },
  35698. "required": ["id", "type", "properties"],
  35699. "additionalProperties": false
  35700. },
  35701. "EventPluginAdded": {
  35702. "type": "object",
  35703. "properties": {
  35704. "id": {
  35705. "type": "string",
  35706. "pattern": "^evt_"
  35707. },
  35708. "type": {
  35709. "type": "string",
  35710. "enum": ["plugin.added"]
  35711. },
  35712. "properties": {
  35713. "type": "object",
  35714. "properties": {
  35715. "id": {
  35716. "type": "string"
  35717. }
  35718. },
  35719. "required": ["id"],
  35720. "additionalProperties": false
  35721. }
  35722. },
  35723. "required": ["id", "type", "properties"],
  35724. "additionalProperties": false
  35725. },
  35726. "EventProjectDirectoriesUpdated": {
  35727. "type": "object",
  35728. "properties": {
  35729. "id": {
  35730. "type": "string",
  35731. "pattern": "^evt_"
  35732. },
  35733. "type": {
  35734. "type": "string",
  35735. "enum": ["project.directories.updated"]
  35736. },
  35737. "properties": {
  35738. "type": "object",
  35739. "properties": {
  35740. "projectID": {
  35741. "type": "string"
  35742. }
  35743. },
  35744. "required": ["projectID"],
  35745. "additionalProperties": false
  35746. }
  35747. },
  35748. "required": ["id", "type", "properties"],
  35749. "additionalProperties": false
  35750. },
  35751. "EventFileWatcherUpdated": {
  35752. "type": "object",
  35753. "properties": {
  35754. "id": {
  35755. "type": "string",
  35756. "pattern": "^evt_"
  35757. },
  35758. "type": {
  35759. "type": "string",
  35760. "enum": ["file.watcher.updated"]
  35761. },
  35762. "properties": {
  35763. "type": "object",
  35764. "properties": {
  35765. "file": {
  35766. "type": "string"
  35767. },
  35768. "event": {
  35769. "type": "string",
  35770. "enum": ["add", "change", "unlink"]
  35771. }
  35772. },
  35773. "required": ["file", "event"],
  35774. "additionalProperties": false
  35775. }
  35776. },
  35777. "required": ["id", "type", "properties"],
  35778. "additionalProperties": false
  35779. },
  35780. "EventPtyCreated": {
  35781. "type": "object",
  35782. "properties": {
  35783. "id": {
  35784. "type": "string",
  35785. "pattern": "^evt_"
  35786. },
  35787. "type": {
  35788. "type": "string",
  35789. "enum": ["pty.created"]
  35790. },
  35791. "properties": {
  35792. "type": "object",
  35793. "properties": {
  35794. "info": {
  35795. "$ref": "#/components/schemas/Pty"
  35796. }
  35797. },
  35798. "required": ["info"],
  35799. "additionalProperties": false
  35800. }
  35801. },
  35802. "required": ["id", "type", "properties"],
  35803. "additionalProperties": false
  35804. },
  35805. "EventPtyUpdated": {
  35806. "type": "object",
  35807. "properties": {
  35808. "id": {
  35809. "type": "string",
  35810. "pattern": "^evt_"
  35811. },
  35812. "type": {
  35813. "type": "string",
  35814. "enum": ["pty.updated"]
  35815. },
  35816. "properties": {
  35817. "type": "object",
  35818. "properties": {
  35819. "info": {
  35820. "$ref": "#/components/schemas/Pty"
  35821. }
  35822. },
  35823. "required": ["info"],
  35824. "additionalProperties": false
  35825. }
  35826. },
  35827. "required": ["id", "type", "properties"],
  35828. "additionalProperties": false
  35829. },
  35830. "EventPtyExited": {
  35831. "type": "object",
  35832. "properties": {
  35833. "id": {
  35834. "type": "string",
  35835. "pattern": "^evt_"
  35836. },
  35837. "type": {
  35838. "type": "string",
  35839. "enum": ["pty.exited"]
  35840. },
  35841. "properties": {
  35842. "type": "object",
  35843. "properties": {
  35844. "id": {
  35845. "type": "string",
  35846. "pattern": "^pty"
  35847. },
  35848. "exitCode": {
  35849. "type": "integer",
  35850. "minimum": 0
  35851. }
  35852. },
  35853. "required": ["id", "exitCode"],
  35854. "additionalProperties": false
  35855. }
  35856. },
  35857. "required": ["id", "type", "properties"],
  35858. "additionalProperties": false
  35859. },
  35860. "EventPtyDeleted": {
  35861. "type": "object",
  35862. "properties": {
  35863. "id": {
  35864. "type": "string",
  35865. "pattern": "^evt_"
  35866. },
  35867. "type": {
  35868. "type": "string",
  35869. "enum": ["pty.deleted"]
  35870. },
  35871. "properties": {
  35872. "type": "object",
  35873. "properties": {
  35874. "id": {
  35875. "type": "string",
  35876. "pattern": "^pty"
  35877. }
  35878. },
  35879. "required": ["id"],
  35880. "additionalProperties": false
  35881. }
  35882. },
  35883. "required": ["id", "type", "properties"],
  35884. "additionalProperties": false
  35885. },
  35886. "EventQuestionV2Asked": {
  35887. "type": "object",
  35888. "properties": {
  35889. "id": {
  35890. "type": "string",
  35891. "pattern": "^evt_"
  35892. },
  35893. "type": {
  35894. "type": "string",
  35895. "enum": ["question.v2.asked"]
  35896. },
  35897. "properties": {
  35898. "type": "object",
  35899. "properties": {
  35900. "id": {
  35901. "type": "string",
  35902. "pattern": "^que"
  35903. },
  35904. "sessionID": {
  35905. "type": "string",
  35906. "pattern": "^ses"
  35907. },
  35908. "questions": {
  35909. "type": "array",
  35910. "items": {
  35911. "$ref": "#/components/schemas/QuestionV2Info"
  35912. },
  35913. "description": "Questions to ask"
  35914. },
  35915. "tool": {
  35916. "$ref": "#/components/schemas/QuestionV2Tool"
  35917. }
  35918. },
  35919. "required": ["id", "sessionID", "questions"],
  35920. "additionalProperties": false
  35921. }
  35922. },
  35923. "required": ["id", "type", "properties"],
  35924. "additionalProperties": false
  35925. },
  35926. "EventQuestionV2Replied": {
  35927. "type": "object",
  35928. "properties": {
  35929. "id": {
  35930. "type": "string",
  35931. "pattern": "^evt_"
  35932. },
  35933. "type": {
  35934. "type": "string",
  35935. "enum": ["question.v2.replied"]
  35936. },
  35937. "properties": {
  35938. "type": "object",
  35939. "properties": {
  35940. "sessionID": {
  35941. "type": "string",
  35942. "pattern": "^ses"
  35943. },
  35944. "requestID": {
  35945. "type": "string",
  35946. "pattern": "^que"
  35947. },
  35948. "answers": {
  35949. "type": "array",
  35950. "items": {
  35951. "$ref": "#/components/schemas/QuestionV2Answer"
  35952. }
  35953. }
  35954. },
  35955. "required": ["sessionID", "requestID", "answers"],
  35956. "additionalProperties": false
  35957. }
  35958. },
  35959. "required": ["id", "type", "properties"],
  35960. "additionalProperties": false
  35961. },
  35962. "EventQuestionV2Rejected": {
  35963. "type": "object",
  35964. "properties": {
  35965. "id": {
  35966. "type": "string",
  35967. "pattern": "^evt_"
  35968. },
  35969. "type": {
  35970. "type": "string",
  35971. "enum": ["question.v2.rejected"]
  35972. },
  35973. "properties": {
  35974. "type": "object",
  35975. "properties": {
  35976. "sessionID": {
  35977. "type": "string",
  35978. "pattern": "^ses"
  35979. },
  35980. "requestID": {
  35981. "type": "string",
  35982. "pattern": "^que"
  35983. }
  35984. },
  35985. "required": ["sessionID", "requestID"],
  35986. "additionalProperties": false
  35987. }
  35988. },
  35989. "required": ["id", "type", "properties"],
  35990. "additionalProperties": false
  35991. },
  35992. "EventTodoUpdated": {
  35993. "type": "object",
  35994. "properties": {
  35995. "id": {
  35996. "type": "string",
  35997. "pattern": "^evt_"
  35998. },
  35999. "type": {
  36000. "type": "string",
  36001. "enum": ["todo.updated"]
  36002. },
  36003. "properties": {
  36004. "type": "object",
  36005. "properties": {
  36006. "sessionID": {
  36007. "type": "string",
  36008. "pattern": "^ses"
  36009. },
  36010. "todos": {
  36011. "type": "array",
  36012. "items": {
  36013. "$ref": "#/components/schemas/Todo"
  36014. }
  36015. }
  36016. },
  36017. "required": ["sessionID", "todos"],
  36018. "additionalProperties": false
  36019. }
  36020. },
  36021. "required": ["id", "type", "properties"],
  36022. "additionalProperties": false
  36023. },
  36024. "EventLspUpdated": {
  36025. "type": "object",
  36026. "properties": {
  36027. "id": {
  36028. "type": "string",
  36029. "pattern": "^evt_"
  36030. },
  36031. "type": {
  36032. "type": "string",
  36033. "enum": ["lsp.updated"]
  36034. },
  36035. "properties": {
  36036. "type": "object",
  36037. "properties": {}
  36038. }
  36039. },
  36040. "required": ["id", "type", "properties"],
  36041. "additionalProperties": false
  36042. },
  36043. "EventPermissionAsked": {
  36044. "type": "object",
  36045. "properties": {
  36046. "id": {
  36047. "type": "string",
  36048. "pattern": "^evt_"
  36049. },
  36050. "type": {
  36051. "type": "string",
  36052. "enum": ["permission.asked"]
  36053. },
  36054. "properties": {
  36055. "type": "object",
  36056. "properties": {
  36057. "id": {
  36058. "type": "string",
  36059. "pattern": "^per"
  36060. },
  36061. "sessionID": {
  36062. "type": "string",
  36063. "pattern": "^ses"
  36064. },
  36065. "permission": {
  36066. "type": "string"
  36067. },
  36068. "patterns": {
  36069. "type": "array",
  36070. "items": {
  36071. "type": "string"
  36072. }
  36073. },
  36074. "metadata": {
  36075. "type": "object"
  36076. },
  36077. "always": {
  36078. "type": "array",
  36079. "items": {
  36080. "type": "string"
  36081. }
  36082. },
  36083. "tool": {
  36084. "type": "object",
  36085. "properties": {
  36086. "messageID": {
  36087. "type": "string"
  36088. },
  36089. "callID": {
  36090. "type": "string"
  36091. }
  36092. },
  36093. "required": ["messageID", "callID"],
  36094. "additionalProperties": false
  36095. }
  36096. },
  36097. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  36098. "additionalProperties": false
  36099. }
  36100. },
  36101. "required": ["id", "type", "properties"],
  36102. "additionalProperties": false
  36103. },
  36104. "EventPermissionReplied": {
  36105. "type": "object",
  36106. "properties": {
  36107. "id": {
  36108. "type": "string",
  36109. "pattern": "^evt_"
  36110. },
  36111. "type": {
  36112. "type": "string",
  36113. "enum": ["permission.replied"]
  36114. },
  36115. "properties": {
  36116. "type": "object",
  36117. "properties": {
  36118. "sessionID": {
  36119. "type": "string",
  36120. "pattern": "^ses"
  36121. },
  36122. "requestID": {
  36123. "type": "string",
  36124. "pattern": "^per"
  36125. },
  36126. "reply": {
  36127. "type": "string",
  36128. "enum": ["once", "always", "reject"]
  36129. }
  36130. },
  36131. "required": ["sessionID", "requestID", "reply"],
  36132. "additionalProperties": false
  36133. }
  36134. },
  36135. "required": ["id", "type", "properties"],
  36136. "additionalProperties": false
  36137. },
  36138. "EventMcpToolsChanged": {
  36139. "type": "object",
  36140. "properties": {
  36141. "id": {
  36142. "type": "string",
  36143. "pattern": "^evt_"
  36144. },
  36145. "type": {
  36146. "type": "string",
  36147. "enum": ["mcp.tools.changed"]
  36148. },
  36149. "properties": {
  36150. "type": "object",
  36151. "properties": {
  36152. "server": {
  36153. "type": "string"
  36154. }
  36155. },
  36156. "required": ["server"],
  36157. "additionalProperties": false
  36158. }
  36159. },
  36160. "required": ["id", "type", "properties"],
  36161. "additionalProperties": false
  36162. },
  36163. "EventMcpBrowserOpenFailed": {
  36164. "type": "object",
  36165. "properties": {
  36166. "id": {
  36167. "type": "string",
  36168. "pattern": "^evt_"
  36169. },
  36170. "type": {
  36171. "type": "string",
  36172. "enum": ["mcp.browser.open.failed"]
  36173. },
  36174. "properties": {
  36175. "type": "object",
  36176. "properties": {
  36177. "mcpName": {
  36178. "type": "string"
  36179. },
  36180. "url": {
  36181. "type": "string"
  36182. }
  36183. },
  36184. "required": ["mcpName", "url"],
  36185. "additionalProperties": false
  36186. }
  36187. },
  36188. "required": ["id", "type", "properties"],
  36189. "additionalProperties": false
  36190. },
  36191. "EventCommandExecuted": {
  36192. "type": "object",
  36193. "properties": {
  36194. "id": {
  36195. "type": "string",
  36196. "pattern": "^evt_"
  36197. },
  36198. "type": {
  36199. "type": "string",
  36200. "enum": ["command.executed"]
  36201. },
  36202. "properties": {
  36203. "type": "object",
  36204. "properties": {
  36205. "name": {
  36206. "type": "string"
  36207. },
  36208. "sessionID": {
  36209. "type": "string",
  36210. "pattern": "^ses"
  36211. },
  36212. "arguments": {
  36213. "type": "string"
  36214. },
  36215. "messageID": {
  36216. "type": "string",
  36217. "pattern": "^msg"
  36218. }
  36219. },
  36220. "required": ["name", "sessionID", "arguments", "messageID"],
  36221. "additionalProperties": false
  36222. }
  36223. },
  36224. "required": ["id", "type", "properties"],
  36225. "additionalProperties": false
  36226. },
  36227. "EventProjectUpdated": {
  36228. "type": "object",
  36229. "properties": {
  36230. "id": {
  36231. "type": "string",
  36232. "pattern": "^evt_"
  36233. },
  36234. "type": {
  36235. "type": "string",
  36236. "enum": ["project.updated"]
  36237. },
  36238. "properties": {
  36239. "type": "object",
  36240. "properties": {
  36241. "id": {
  36242. "type": "string"
  36243. },
  36244. "worktree": {
  36245. "type": "string"
  36246. },
  36247. "vcs": {
  36248. "$ref": "#/components/schemas/ProjectVcs"
  36249. },
  36250. "name": {
  36251. "type": "string"
  36252. },
  36253. "icon": {
  36254. "$ref": "#/components/schemas/ProjectIcon"
  36255. },
  36256. "commands": {
  36257. "$ref": "#/components/schemas/ProjectCommands"
  36258. },
  36259. "time": {
  36260. "$ref": "#/components/schemas/ProjectTime"
  36261. },
  36262. "sandboxes": {
  36263. "type": "array",
  36264. "items": {
  36265. "type": "string"
  36266. }
  36267. }
  36268. },
  36269. "required": ["id", "worktree", "time", "sandboxes"],
  36270. "additionalProperties": false
  36271. }
  36272. },
  36273. "required": ["id", "type", "properties"],
  36274. "additionalProperties": false
  36275. },
  36276. "EventSessionStatus": {
  36277. "type": "object",
  36278. "properties": {
  36279. "id": {
  36280. "type": "string",
  36281. "pattern": "^evt_"
  36282. },
  36283. "type": {
  36284. "type": "string",
  36285. "enum": ["session.status"]
  36286. },
  36287. "properties": {
  36288. "type": "object",
  36289. "properties": {
  36290. "sessionID": {
  36291. "type": "string",
  36292. "pattern": "^ses"
  36293. },
  36294. "status": {
  36295. "$ref": "#/components/schemas/SessionStatus"
  36296. }
  36297. },
  36298. "required": ["sessionID", "status"],
  36299. "additionalProperties": false
  36300. }
  36301. },
  36302. "required": ["id", "type", "properties"],
  36303. "additionalProperties": false
  36304. },
  36305. "EventSessionIdle": {
  36306. "type": "object",
  36307. "properties": {
  36308. "id": {
  36309. "type": "string",
  36310. "pattern": "^evt_"
  36311. },
  36312. "type": {
  36313. "type": "string",
  36314. "enum": ["session.idle"]
  36315. },
  36316. "properties": {
  36317. "type": "object",
  36318. "properties": {
  36319. "sessionID": {
  36320. "type": "string",
  36321. "pattern": "^ses"
  36322. }
  36323. },
  36324. "required": ["sessionID"],
  36325. "additionalProperties": false
  36326. }
  36327. },
  36328. "required": ["id", "type", "properties"],
  36329. "additionalProperties": false
  36330. },
  36331. "EventQuestionAsked": {
  36332. "type": "object",
  36333. "properties": {
  36334. "id": {
  36335. "type": "string",
  36336. "pattern": "^evt_"
  36337. },
  36338. "type": {
  36339. "type": "string",
  36340. "enum": ["question.asked"]
  36341. },
  36342. "properties": {
  36343. "type": "object",
  36344. "properties": {
  36345. "id": {
  36346. "type": "string",
  36347. "pattern": "^que"
  36348. },
  36349. "sessionID": {
  36350. "type": "string",
  36351. "pattern": "^ses"
  36352. },
  36353. "questions": {
  36354. "type": "array",
  36355. "items": {
  36356. "$ref": "#/components/schemas/QuestionInfo"
  36357. },
  36358. "description": "Questions to ask"
  36359. },
  36360. "tool": {
  36361. "$ref": "#/components/schemas/QuestionTool"
  36362. }
  36363. },
  36364. "required": ["id", "sessionID", "questions"],
  36365. "additionalProperties": false
  36366. }
  36367. },
  36368. "required": ["id", "type", "properties"],
  36369. "additionalProperties": false
  36370. },
  36371. "EventQuestionReplied": {
  36372. "type": "object",
  36373. "properties": {
  36374. "id": {
  36375. "type": "string",
  36376. "pattern": "^evt_"
  36377. },
  36378. "type": {
  36379. "type": "string",
  36380. "enum": ["question.replied"]
  36381. },
  36382. "properties": {
  36383. "type": "object",
  36384. "properties": {
  36385. "sessionID": {
  36386. "type": "string",
  36387. "pattern": "^ses"
  36388. },
  36389. "requestID": {
  36390. "type": "string",
  36391. "pattern": "^que"
  36392. },
  36393. "answers": {
  36394. "type": "array",
  36395. "items": {
  36396. "$ref": "#/components/schemas/QuestionAnswer"
  36397. }
  36398. }
  36399. },
  36400. "required": ["sessionID", "requestID", "answers"],
  36401. "additionalProperties": false
  36402. }
  36403. },
  36404. "required": ["id", "type", "properties"],
  36405. "additionalProperties": false
  36406. },
  36407. "EventQuestionRejected": {
  36408. "type": "object",
  36409. "properties": {
  36410. "id": {
  36411. "type": "string",
  36412. "pattern": "^evt_"
  36413. },
  36414. "type": {
  36415. "type": "string",
  36416. "enum": ["question.rejected"]
  36417. },
  36418. "properties": {
  36419. "type": "object",
  36420. "properties": {
  36421. "sessionID": {
  36422. "type": "string",
  36423. "pattern": "^ses"
  36424. },
  36425. "requestID": {
  36426. "type": "string",
  36427. "pattern": "^que"
  36428. }
  36429. },
  36430. "required": ["sessionID", "requestID"],
  36431. "additionalProperties": false
  36432. }
  36433. },
  36434. "required": ["id", "type", "properties"],
  36435. "additionalProperties": false
  36436. },
  36437. "EventSessionCompacted": {
  36438. "type": "object",
  36439. "properties": {
  36440. "id": {
  36441. "type": "string",
  36442. "pattern": "^evt_"
  36443. },
  36444. "type": {
  36445. "type": "string",
  36446. "enum": ["session.compacted"]
  36447. },
  36448. "properties": {
  36449. "type": "object",
  36450. "properties": {
  36451. "sessionID": {
  36452. "type": "string",
  36453. "pattern": "^ses"
  36454. }
  36455. },
  36456. "required": ["sessionID"],
  36457. "additionalProperties": false
  36458. }
  36459. },
  36460. "required": ["id", "type", "properties"],
  36461. "additionalProperties": false
  36462. },
  36463. "EventVcsBranchUpdated": {
  36464. "type": "object",
  36465. "properties": {
  36466. "id": {
  36467. "type": "string",
  36468. "pattern": "^evt_"
  36469. },
  36470. "type": {
  36471. "type": "string",
  36472. "enum": ["vcs.branch.updated"]
  36473. },
  36474. "properties": {
  36475. "type": "object",
  36476. "properties": {
  36477. "branch": {
  36478. "type": "string"
  36479. }
  36480. },
  36481. "additionalProperties": false
  36482. }
  36483. },
  36484. "required": ["id", "type", "properties"],
  36485. "additionalProperties": false
  36486. },
  36487. "EventWorkspaceReady": {
  36488. "type": "object",
  36489. "properties": {
  36490. "id": {
  36491. "type": "string",
  36492. "pattern": "^evt_"
  36493. },
  36494. "type": {
  36495. "type": "string",
  36496. "enum": ["workspace.ready"]
  36497. },
  36498. "properties": {
  36499. "type": "object",
  36500. "properties": {
  36501. "name": {
  36502. "type": "string"
  36503. }
  36504. },
  36505. "required": ["name"],
  36506. "additionalProperties": false
  36507. }
  36508. },
  36509. "required": ["id", "type", "properties"],
  36510. "additionalProperties": false
  36511. },
  36512. "EventWorkspaceFailed": {
  36513. "type": "object",
  36514. "properties": {
  36515. "id": {
  36516. "type": "string",
  36517. "pattern": "^evt_"
  36518. },
  36519. "type": {
  36520. "type": "string",
  36521. "enum": ["workspace.failed"]
  36522. },
  36523. "properties": {
  36524. "type": "object",
  36525. "properties": {
  36526. "message": {
  36527. "type": "string"
  36528. }
  36529. },
  36530. "required": ["message"],
  36531. "additionalProperties": false
  36532. }
  36533. },
  36534. "required": ["id", "type", "properties"],
  36535. "additionalProperties": false
  36536. },
  36537. "EventWorkspaceStatus": {
  36538. "type": "object",
  36539. "properties": {
  36540. "id": {
  36541. "type": "string",
  36542. "pattern": "^evt_"
  36543. },
  36544. "type": {
  36545. "type": "string",
  36546. "enum": ["workspace.status"]
  36547. },
  36548. "properties": {
  36549. "type": "object",
  36550. "properties": {
  36551. "workspaceID": {
  36552. "type": "string",
  36553. "pattern": "^wrk"
  36554. },
  36555. "status": {
  36556. "type": "string",
  36557. "enum": ["connected", "connecting", "disconnected", "error"]
  36558. }
  36559. },
  36560. "required": ["workspaceID", "status"],
  36561. "additionalProperties": false
  36562. }
  36563. },
  36564. "required": ["id", "type", "properties"],
  36565. "additionalProperties": false
  36566. },
  36567. "EventWorktreeReady": {
  36568. "type": "object",
  36569. "properties": {
  36570. "id": {
  36571. "type": "string",
  36572. "pattern": "^evt_"
  36573. },
  36574. "type": {
  36575. "type": "string",
  36576. "enum": ["worktree.ready"]
  36577. },
  36578. "properties": {
  36579. "type": "object",
  36580. "properties": {
  36581. "name": {
  36582. "type": "string"
  36583. },
  36584. "branch": {
  36585. "type": "string"
  36586. }
  36587. },
  36588. "required": ["name"],
  36589. "additionalProperties": false
  36590. }
  36591. },
  36592. "required": ["id", "type", "properties"],
  36593. "additionalProperties": false
  36594. },
  36595. "EventWorktreeFailed": {
  36596. "type": "object",
  36597. "properties": {
  36598. "id": {
  36599. "type": "string",
  36600. "pattern": "^evt_"
  36601. },
  36602. "type": {
  36603. "type": "string",
  36604. "enum": ["worktree.failed"]
  36605. },
  36606. "properties": {
  36607. "type": "object",
  36608. "properties": {
  36609. "message": {
  36610. "type": "string"
  36611. }
  36612. },
  36613. "required": ["message"],
  36614. "additionalProperties": false
  36615. }
  36616. },
  36617. "required": ["id", "type", "properties"],
  36618. "additionalProperties": false
  36619. },
  36620. "EventServerConnected": {
  36621. "type": "object",
  36622. "properties": {
  36623. "id": {
  36624. "type": "string",
  36625. "pattern": "^evt_"
  36626. },
  36627. "type": {
  36628. "type": "string",
  36629. "enum": ["server.connected"]
  36630. },
  36631. "properties": {
  36632. "type": "object",
  36633. "properties": {}
  36634. }
  36635. },
  36636. "required": ["id", "type", "properties"],
  36637. "additionalProperties": false
  36638. },
  36639. "EventGlobalDisposed": {
  36640. "type": "object",
  36641. "properties": {
  36642. "id": {
  36643. "type": "string",
  36644. "pattern": "^evt_"
  36645. },
  36646. "type": {
  36647. "type": "string",
  36648. "enum": ["global.disposed"]
  36649. },
  36650. "properties": {
  36651. "type": "object",
  36652. "properties": {}
  36653. }
  36654. },
  36655. "required": ["id", "type", "properties"],
  36656. "additionalProperties": false
  36657. },
  36658. "CredentialOAuth": {
  36659. "type": "object",
  36660. "properties": {
  36661. "type": {
  36662. "type": "string",
  36663. "enum": ["oauth"]
  36664. },
  36665. "methodID": {
  36666. "type": "string"
  36667. },
  36668. "refresh": {
  36669. "type": "string"
  36670. },
  36671. "access": {
  36672. "type": "string"
  36673. },
  36674. "expires": {
  36675. "type": "integer",
  36676. "minimum": 0
  36677. },
  36678. "metadata": {
  36679. "type": "object"
  36680. }
  36681. },
  36682. "required": ["type", "methodID", "refresh", "access", "expires"],
  36683. "additionalProperties": false
  36684. },
  36685. "CredentialKey": {
  36686. "type": "object",
  36687. "properties": {
  36688. "type": {
  36689. "type": "string",
  36690. "enum": ["key"]
  36691. },
  36692. "key": {
  36693. "type": "string"
  36694. },
  36695. "metadata": {
  36696. "type": "object"
  36697. }
  36698. },
  36699. "required": ["type", "key"],
  36700. "additionalProperties": false
  36701. },
  36702. "SkillV2DirectorySource": {
  36703. "type": "object",
  36704. "properties": {
  36705. "type": {
  36706. "type": "string",
  36707. "enum": ["directory"]
  36708. },
  36709. "path": {
  36710. "type": "string"
  36711. }
  36712. },
  36713. "required": ["type", "path"],
  36714. "additionalProperties": false
  36715. },
  36716. "SkillV2UrlSource": {
  36717. "type": "object",
  36718. "properties": {
  36719. "type": {
  36720. "type": "string",
  36721. "enum": ["url"]
  36722. },
  36723. "url": {
  36724. "type": "string"
  36725. }
  36726. },
  36727. "required": ["type", "url"],
  36728. "additionalProperties": false
  36729. },
  36730. "SkillV2EmbeddedSource": {
  36731. "type": "object",
  36732. "properties": {
  36733. "type": {
  36734. "type": "string",
  36735. "enum": ["embedded"]
  36736. },
  36737. "skill": {
  36738. "$ref": "#/components/schemas/SkillV2Info"
  36739. }
  36740. },
  36741. "required": ["type", "skill"],
  36742. "additionalProperties": false
  36743. },
  36744. "BadRequestError": {
  36745. "type": "object",
  36746. "required": ["name", "data"],
  36747. "properties": {
  36748. "name": {
  36749. "type": "string",
  36750. "enum": ["BadRequest"]
  36751. },
  36752. "data": {
  36753. "type": "object",
  36754. "required": ["message"],
  36755. "properties": {
  36756. "message": {
  36757. "type": "string"
  36758. },
  36759. "kind": {
  36760. "type": "string",
  36761. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  36762. }
  36763. }
  36764. }
  36765. }
  36766. }
  36767. }
  36768. },
  36769. "security": [],
  36770. "tags": [
  36771. {
  36772. "name": "control",
  36773. "description": "Control plane routes."
  36774. },
  36775. {
  36776. "name": "controlPlane",
  36777. "description": "Control-plane orchestration routes."
  36778. },
  36779. {
  36780. "name": "global",
  36781. "description": "Global server routes."
  36782. },
  36783. {
  36784. "name": "event",
  36785. "description": "Instance event stream route."
  36786. },
  36787. {
  36788. "name": "config",
  36789. "description": "Experimental HttpApi config routes."
  36790. },
  36791. {
  36792. "name": "experimental",
  36793. "description": "Experimental HttpApi read-only routes."
  36794. },
  36795. {
  36796. "name": "file",
  36797. "description": "Experimental HttpApi file routes."
  36798. },
  36799. {
  36800. "name": "instance",
  36801. "description": "Experimental HttpApi instance read routes."
  36802. },
  36803. {
  36804. "name": "mcp",
  36805. "description": "Experimental HttpApi MCP routes."
  36806. },
  36807. {
  36808. "name": "project",
  36809. "description": "Experimental HttpApi project routes."
  36810. },
  36811. {
  36812. "name": "projectCopy",
  36813. "description": "Project copy naming routes."
  36814. },
  36815. {
  36816. "name": "pty",
  36817. "description": "Experimental HttpApi PTY routes."
  36818. },
  36819. {
  36820. "name": "question",
  36821. "description": "Question routes."
  36822. },
  36823. {
  36824. "name": "permission",
  36825. "description": "Experimental HttpApi permission routes."
  36826. },
  36827. {
  36828. "name": "provider",
  36829. "description": "Experimental HttpApi provider routes."
  36830. },
  36831. {
  36832. "name": "session",
  36833. "description": "Experimental HttpApi session routes."
  36834. },
  36835. {
  36836. "name": "sync",
  36837. "description": "Experimental HttpApi sync routes."
  36838. },
  36839. {
  36840. "name": "tui",
  36841. "description": "Experimental HttpApi TUI routes."
  36842. },
  36843. {
  36844. "name": "workspace",
  36845. "description": "Experimental HttpApi workspace routes."
  36846. },
  36847. {
  36848. "name": "opencode HttpApi",
  36849. "description": "Experimental HttpApi surface for selected instance routes."
  36850. },
  36851. {
  36852. "name": "opencode HttpApi",
  36853. "description": "Experimental HttpApi surface for selected instance routes."
  36854. },
  36855. {
  36856. "name": "opencode HttpApi",
  36857. "description": "Experimental HttpApi surface for selected instance routes."
  36858. },
  36859. {
  36860. "name": "sessions",
  36861. "description": "Experimental session routes."
  36862. },
  36863. {
  36864. "name": "messages",
  36865. "description": "Experimental message routes."
  36866. },
  36867. {
  36868. "name": "models",
  36869. "description": "Experimental model routes."
  36870. },
  36871. {
  36872. "name": "providers",
  36873. "description": "Experimental provider routes."
  36874. },
  36875. {
  36876. "name": "integrations",
  36877. "description": "Integration discovery and authentication routes."
  36878. },
  36879. {
  36880. "name": "opencode HttpApi",
  36881. "description": "Experimental HttpApi surface for selected instance routes."
  36882. },
  36883. {
  36884. "name": "permissions",
  36885. "description": "Experimental permission routes."
  36886. },
  36887. {
  36888. "name": "filesystem",
  36889. "description": "Experimental location-scoped filesystem routes."
  36890. },
  36891. {
  36892. "name": "commands",
  36893. "description": "Experimental command routes."
  36894. },
  36895. {
  36896. "name": "skills",
  36897. "description": "Experimental skill routes."
  36898. },
  36899. {
  36900. "name": "events",
  36901. "description": "Experimental event stream route."
  36902. },
  36903. {
  36904. "name": "pty",
  36905. "description": "Experimental location-scoped PTY routes."
  36906. },
  36907. {
  36908. "name": "session questions",
  36909. "description": "Experimental session question routes."
  36910. },
  36911. {
  36912. "name": "reference",
  36913. "description": "Location-scoped project references."
  36914. },
  36915. {
  36916. "name": "projectCopy",
  36917. "description": "Project copy management routes."
  36918. },
  36919. {
  36920. "name": "pty",
  36921. "description": "PTY websocket route."
  36922. }
  36923. ]
  36924. }