openapi.json 676 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188
  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. "/global/health": {
  216. "get": {
  217. "tags": ["global"],
  218. "operationId": "global.health",
  219. "parameters": [],
  220. "responses": {
  221. "200": {
  222. "description": "Health information",
  223. "content": {
  224. "application/json": {
  225. "schema": {
  226. "type": "object",
  227. "properties": {
  228. "healthy": {
  229. "type": "boolean",
  230. "enum": [true]
  231. },
  232. "version": {
  233. "type": "string"
  234. }
  235. },
  236. "required": ["healthy", "version"],
  237. "additionalProperties": false,
  238. "description": "Health information"
  239. }
  240. }
  241. }
  242. },
  243. "400": {
  244. "description": "Bad request",
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "$ref": "#/components/schemas/BadRequestError"
  249. }
  250. }
  251. }
  252. }
  253. },
  254. "description": "Get health information about the OpenCode server.",
  255. "summary": "Get health",
  256. "x-codeSamples": [
  257. {
  258. "lang": "js",
  259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  260. }
  261. ]
  262. }
  263. },
  264. "/global/event": {
  265. "get": {
  266. "tags": ["global"],
  267. "operationId": "global.event",
  268. "parameters": [],
  269. "responses": {
  270. "200": {
  271. "description": "Event stream",
  272. "content": {
  273. "text/event-stream": {
  274. "schema": {
  275. "$ref": "#/components/schemas/GlobalEvent"
  276. }
  277. }
  278. }
  279. },
  280. "400": {
  281. "description": "Bad request",
  282. "content": {
  283. "application/json": {
  284. "schema": {
  285. "$ref": "#/components/schemas/BadRequestError"
  286. }
  287. }
  288. }
  289. }
  290. },
  291. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  292. "summary": "Get global events",
  293. "x-codeSamples": [
  294. {
  295. "lang": "js",
  296. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  297. }
  298. ]
  299. }
  300. },
  301. "/global/config": {
  302. "get": {
  303. "tags": ["global"],
  304. "operationId": "global.config.get",
  305. "parameters": [],
  306. "responses": {
  307. "200": {
  308. "description": "Get global config info",
  309. "content": {
  310. "application/json": {
  311. "schema": {
  312. "$ref": "#/components/schemas/Config"
  313. }
  314. }
  315. }
  316. },
  317. "400": {
  318. "description": "Bad request",
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "$ref": "#/components/schemas/BadRequestError"
  323. }
  324. }
  325. }
  326. }
  327. },
  328. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  329. "summary": "Get global configuration",
  330. "x-codeSamples": [
  331. {
  332. "lang": "js",
  333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  334. }
  335. ]
  336. },
  337. "patch": {
  338. "tags": ["global"],
  339. "operationId": "global.config.update",
  340. "parameters": [],
  341. "responses": {
  342. "200": {
  343. "description": "Successfully updated global config",
  344. "content": {
  345. "application/json": {
  346. "schema": {
  347. "$ref": "#/components/schemas/Config"
  348. }
  349. }
  350. }
  351. },
  352. "400": {
  353. "description": "BadRequest | InvalidRequestError",
  354. "content": {
  355. "application/json": {
  356. "schema": {
  357. "anyOf": [
  358. {
  359. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  360. },
  361. {
  362. "$ref": "#/components/schemas/InvalidRequestError"
  363. }
  364. ]
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "description": "Update global OpenCode configuration settings and preferences.",
  371. "summary": "Update global configuration",
  372. "requestBody": {
  373. "content": {
  374. "application/json": {
  375. "schema": {
  376. "$ref": "#/components/schemas/Config"
  377. }
  378. }
  379. }
  380. },
  381. "x-codeSamples": [
  382. {
  383. "lang": "js",
  384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  385. }
  386. ]
  387. }
  388. },
  389. "/global/dispose": {
  390. "post": {
  391. "tags": ["global"],
  392. "operationId": "global.dispose",
  393. "parameters": [],
  394. "responses": {
  395. "200": {
  396. "description": "Global disposed",
  397. "content": {
  398. "application/json": {
  399. "schema": {
  400. "type": "boolean",
  401. "description": "Global disposed"
  402. }
  403. }
  404. }
  405. },
  406. "400": {
  407. "description": "Bad request",
  408. "content": {
  409. "application/json": {
  410. "schema": {
  411. "$ref": "#/components/schemas/BadRequestError"
  412. }
  413. }
  414. }
  415. }
  416. },
  417. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  418. "summary": "Dispose instance",
  419. "x-codeSamples": [
  420. {
  421. "lang": "js",
  422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  423. }
  424. ]
  425. }
  426. },
  427. "/global/upgrade": {
  428. "post": {
  429. "tags": ["global"],
  430. "operationId": "global.upgrade",
  431. "parameters": [],
  432. "responses": {
  433. "200": {
  434. "description": "Upgrade result",
  435. "content": {
  436. "application/json": {
  437. "schema": {
  438. "anyOf": [
  439. {
  440. "type": "object",
  441. "properties": {
  442. "success": {
  443. "type": "boolean",
  444. "enum": [true]
  445. },
  446. "version": {
  447. "type": "string"
  448. }
  449. },
  450. "required": ["success", "version"],
  451. "additionalProperties": false
  452. },
  453. {
  454. "type": "object",
  455. "properties": {
  456. "success": {
  457. "type": "boolean",
  458. "enum": [false]
  459. },
  460. "error": {
  461. "type": "string"
  462. }
  463. },
  464. "required": ["success", "error"],
  465. "additionalProperties": false
  466. }
  467. ],
  468. "description": "Upgrade result"
  469. }
  470. }
  471. }
  472. },
  473. "400": {
  474. "description": "BadRequest | InvalidRequestError",
  475. "content": {
  476. "application/json": {
  477. "schema": {
  478. "anyOf": [
  479. {
  480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  481. },
  482. {
  483. "$ref": "#/components/schemas/InvalidRequestError"
  484. }
  485. ]
  486. }
  487. }
  488. }
  489. }
  490. },
  491. "description": "Upgrade opencode to the specified version or latest if not specified.",
  492. "summary": "Upgrade opencode",
  493. "requestBody": {
  494. "content": {
  495. "application/json": {
  496. "schema": {
  497. "type": "object",
  498. "properties": {
  499. "target": {
  500. "type": "string"
  501. }
  502. },
  503. "additionalProperties": false
  504. }
  505. }
  506. }
  507. },
  508. "x-codeSamples": [
  509. {
  510. "lang": "js",
  511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  512. }
  513. ]
  514. }
  515. },
  516. "/event": {
  517. "get": {
  518. "tags": ["event"],
  519. "operationId": "event.subscribe",
  520. "parameters": [
  521. {
  522. "name": "directory",
  523. "in": "query",
  524. "schema": {
  525. "type": "string"
  526. },
  527. "required": false
  528. },
  529. {
  530. "name": "workspace",
  531. "in": "query",
  532. "schema": {
  533. "type": "string"
  534. },
  535. "required": false
  536. }
  537. ],
  538. "responses": {
  539. "200": {
  540. "description": "Event stream",
  541. "content": {
  542. "text/event-stream": {
  543. "schema": {
  544. "$ref": "#/components/schemas/Event"
  545. }
  546. }
  547. }
  548. }
  549. },
  550. "description": "Get events",
  551. "summary": "Subscribe to events",
  552. "x-codeSamples": [
  553. {
  554. "lang": "js",
  555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  556. }
  557. ]
  558. }
  559. },
  560. "/config": {
  561. "get": {
  562. "tags": ["config"],
  563. "operationId": "config.get",
  564. "parameters": [
  565. {
  566. "name": "directory",
  567. "in": "query",
  568. "schema": {
  569. "type": "string"
  570. },
  571. "required": false
  572. },
  573. {
  574. "name": "workspace",
  575. "in": "query",
  576. "schema": {
  577. "type": "string"
  578. },
  579. "required": false
  580. }
  581. ],
  582. "responses": {
  583. "200": {
  584. "description": "Get config info",
  585. "content": {
  586. "application/json": {
  587. "schema": {
  588. "$ref": "#/components/schemas/Config"
  589. }
  590. }
  591. }
  592. },
  593. "400": {
  594. "description": "Bad request",
  595. "content": {
  596. "application/json": {
  597. "schema": {
  598. "$ref": "#/components/schemas/BadRequestError"
  599. }
  600. }
  601. }
  602. }
  603. },
  604. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  605. "summary": "Get configuration",
  606. "x-codeSamples": [
  607. {
  608. "lang": "js",
  609. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  610. }
  611. ]
  612. },
  613. "patch": {
  614. "tags": ["config"],
  615. "operationId": "config.update",
  616. "parameters": [
  617. {
  618. "name": "directory",
  619. "in": "query",
  620. "schema": {
  621. "type": "string"
  622. },
  623. "required": false
  624. },
  625. {
  626. "name": "workspace",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. }
  633. ],
  634. "responses": {
  635. "200": {
  636. "description": "Successfully updated config",
  637. "content": {
  638. "application/json": {
  639. "schema": {
  640. "$ref": "#/components/schemas/Config"
  641. }
  642. }
  643. }
  644. },
  645. "400": {
  646. "description": "BadRequest | InvalidRequestError",
  647. "content": {
  648. "application/json": {
  649. "schema": {
  650. "anyOf": [
  651. {
  652. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  653. },
  654. {
  655. "$ref": "#/components/schemas/InvalidRequestError"
  656. }
  657. ]
  658. }
  659. }
  660. }
  661. }
  662. },
  663. "description": "Update OpenCode configuration settings and preferences.",
  664. "summary": "Update configuration",
  665. "requestBody": {
  666. "content": {
  667. "application/json": {
  668. "schema": {
  669. "$ref": "#/components/schemas/Config"
  670. }
  671. }
  672. }
  673. },
  674. "x-codeSamples": [
  675. {
  676. "lang": "js",
  677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  678. }
  679. ]
  680. }
  681. },
  682. "/config/providers": {
  683. "get": {
  684. "tags": ["config"],
  685. "operationId": "config.providers",
  686. "parameters": [
  687. {
  688. "name": "directory",
  689. "in": "query",
  690. "schema": {
  691. "type": "string"
  692. },
  693. "required": false
  694. },
  695. {
  696. "name": "workspace",
  697. "in": "query",
  698. "schema": {
  699. "type": "string"
  700. },
  701. "required": false
  702. }
  703. ],
  704. "responses": {
  705. "200": {
  706. "description": "List of providers",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "type": "object",
  711. "properties": {
  712. "providers": {
  713. "type": "array",
  714. "items": {
  715. "$ref": "#/components/schemas/Provider"
  716. }
  717. },
  718. "default": {
  719. "type": "object",
  720. "additionalProperties": {
  721. "type": "string"
  722. }
  723. }
  724. },
  725. "required": ["providers", "default"],
  726. "additionalProperties": false,
  727. "description": "List of providers"
  728. }
  729. }
  730. }
  731. },
  732. "400": {
  733. "description": "Bad request",
  734. "content": {
  735. "application/json": {
  736. "schema": {
  737. "$ref": "#/components/schemas/BadRequestError"
  738. }
  739. }
  740. }
  741. }
  742. },
  743. "description": "Get a list of all configured AI providers and their default models.",
  744. "summary": "List config providers",
  745. "x-codeSamples": [
  746. {
  747. "lang": "js",
  748. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  749. }
  750. ]
  751. }
  752. },
  753. "/experimental/console": {
  754. "get": {
  755. "tags": ["experimental"],
  756. "operationId": "experimental.console.get",
  757. "parameters": [
  758. {
  759. "name": "directory",
  760. "in": "query",
  761. "schema": {
  762. "type": "string"
  763. },
  764. "required": false
  765. },
  766. {
  767. "name": "workspace",
  768. "in": "query",
  769. "schema": {
  770. "type": "string"
  771. },
  772. "required": false
  773. }
  774. ],
  775. "responses": {
  776. "200": {
  777. "description": "Active Console provider metadata",
  778. "content": {
  779. "application/json": {
  780. "schema": {
  781. "$ref": "#/components/schemas/ConsoleState"
  782. }
  783. }
  784. }
  785. },
  786. "400": {
  787. "description": "Bad request",
  788. "content": {
  789. "application/json": {
  790. "schema": {
  791. "$ref": "#/components/schemas/BadRequestError"
  792. }
  793. }
  794. }
  795. },
  796. "500": {
  797. "description": "InternalServerError",
  798. "content": {
  799. "application/json": {
  800. "schema": {
  801. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  808. "summary": "Get active Console provider metadata",
  809. "x-codeSamples": [
  810. {
  811. "lang": "js",
  812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  813. }
  814. ]
  815. }
  816. },
  817. "/experimental/console/orgs": {
  818. "get": {
  819. "tags": ["experimental"],
  820. "operationId": "experimental.console.listOrgs",
  821. "parameters": [
  822. {
  823. "name": "directory",
  824. "in": "query",
  825. "schema": {
  826. "type": "string"
  827. },
  828. "required": false
  829. },
  830. {
  831. "name": "workspace",
  832. "in": "query",
  833. "schema": {
  834. "type": "string"
  835. },
  836. "required": false
  837. }
  838. ],
  839. "responses": {
  840. "200": {
  841. "description": "Switchable Console orgs",
  842. "content": {
  843. "application/json": {
  844. "schema": {
  845. "type": "object",
  846. "properties": {
  847. "orgs": {
  848. "type": "array",
  849. "items": {
  850. "type": "object",
  851. "properties": {
  852. "accountID": {
  853. "type": "string"
  854. },
  855. "accountEmail": {
  856. "type": "string"
  857. },
  858. "accountUrl": {
  859. "type": "string"
  860. },
  861. "orgID": {
  862. "type": "string"
  863. },
  864. "orgName": {
  865. "type": "string"
  866. },
  867. "active": {
  868. "type": "boolean"
  869. }
  870. },
  871. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  872. "additionalProperties": false
  873. }
  874. }
  875. },
  876. "required": ["orgs"],
  877. "additionalProperties": false,
  878. "description": "Switchable Console orgs"
  879. }
  880. }
  881. }
  882. },
  883. "400": {
  884. "description": "Bad request",
  885. "content": {
  886. "application/json": {
  887. "schema": {
  888. "$ref": "#/components/schemas/BadRequestError"
  889. }
  890. }
  891. }
  892. },
  893. "500": {
  894. "description": "InternalServerError",
  895. "content": {
  896. "application/json": {
  897. "schema": {
  898. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  899. }
  900. }
  901. }
  902. }
  903. },
  904. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  905. "summary": "List switchable Console orgs",
  906. "x-codeSamples": [
  907. {
  908. "lang": "js",
  909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  910. }
  911. ]
  912. }
  913. },
  914. "/experimental/console/switch": {
  915. "post": {
  916. "tags": ["experimental"],
  917. "operationId": "experimental.console.switchOrg",
  918. "parameters": [
  919. {
  920. "name": "directory",
  921. "in": "query",
  922. "schema": {
  923. "type": "string"
  924. },
  925. "required": false
  926. },
  927. {
  928. "name": "workspace",
  929. "in": "query",
  930. "schema": {
  931. "type": "string"
  932. },
  933. "required": false
  934. }
  935. ],
  936. "responses": {
  937. "200": {
  938. "description": "Switch success",
  939. "content": {
  940. "application/json": {
  941. "schema": {
  942. "type": "boolean",
  943. "description": "Switch success"
  944. }
  945. }
  946. }
  947. }
  948. },
  949. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  950. "summary": "Switch active Console org",
  951. "requestBody": {
  952. "content": {
  953. "application/json": {
  954. "schema": {
  955. "type": "object",
  956. "properties": {
  957. "accountID": {
  958. "type": "string"
  959. },
  960. "orgID": {
  961. "type": "string"
  962. }
  963. },
  964. "required": ["accountID", "orgID"],
  965. "additionalProperties": false
  966. }
  967. }
  968. }
  969. },
  970. "x-codeSamples": [
  971. {
  972. "lang": "js",
  973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  974. }
  975. ]
  976. }
  977. },
  978. "/experimental/tool": {
  979. "get": {
  980. "tags": ["experimental"],
  981. "operationId": "tool.list",
  982. "parameters": [
  983. {
  984. "name": "directory",
  985. "in": "query",
  986. "schema": {
  987. "type": "string"
  988. },
  989. "required": false
  990. },
  991. {
  992. "name": "workspace",
  993. "in": "query",
  994. "schema": {
  995. "type": "string"
  996. },
  997. "required": false
  998. },
  999. {
  1000. "name": "provider",
  1001. "in": "query",
  1002. "schema": {
  1003. "type": "string"
  1004. },
  1005. "required": true
  1006. },
  1007. {
  1008. "name": "model",
  1009. "in": "query",
  1010. "schema": {
  1011. "type": "string"
  1012. },
  1013. "required": true
  1014. }
  1015. ],
  1016. "responses": {
  1017. "200": {
  1018. "description": "Tools",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/ToolList"
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "400": {
  1028. "description": "BadRequest | InvalidRequestError",
  1029. "content": {
  1030. "application/json": {
  1031. "schema": {
  1032. "anyOf": [
  1033. {
  1034. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1035. },
  1036. {
  1037. "$ref": "#/components/schemas/InvalidRequestError"
  1038. }
  1039. ]
  1040. }
  1041. }
  1042. }
  1043. }
  1044. },
  1045. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1046. "summary": "List tools",
  1047. "x-codeSamples": [
  1048. {
  1049. "lang": "js",
  1050. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1051. }
  1052. ]
  1053. }
  1054. },
  1055. "/experimental/tool/ids": {
  1056. "get": {
  1057. "tags": ["experimental"],
  1058. "operationId": "tool.ids",
  1059. "parameters": [
  1060. {
  1061. "name": "directory",
  1062. "in": "query",
  1063. "schema": {
  1064. "type": "string"
  1065. },
  1066. "required": false
  1067. },
  1068. {
  1069. "name": "workspace",
  1070. "in": "query",
  1071. "schema": {
  1072. "type": "string"
  1073. },
  1074. "required": false
  1075. }
  1076. ],
  1077. "responses": {
  1078. "200": {
  1079. "description": "Tool IDs",
  1080. "content": {
  1081. "application/json": {
  1082. "schema": {
  1083. "$ref": "#/components/schemas/ToolIDs"
  1084. }
  1085. }
  1086. }
  1087. },
  1088. "400": {
  1089. "description": "BadRequest | InvalidRequestError",
  1090. "content": {
  1091. "application/json": {
  1092. "schema": {
  1093. "anyOf": [
  1094. {
  1095. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1096. },
  1097. {
  1098. "$ref": "#/components/schemas/InvalidRequestError"
  1099. }
  1100. ]
  1101. }
  1102. }
  1103. }
  1104. }
  1105. },
  1106. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1107. "summary": "List tool IDs",
  1108. "x-codeSamples": [
  1109. {
  1110. "lang": "js",
  1111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1112. }
  1113. ]
  1114. }
  1115. },
  1116. "/experimental/worktree": {
  1117. "get": {
  1118. "tags": ["experimental"],
  1119. "operationId": "worktree.list",
  1120. "parameters": [
  1121. {
  1122. "name": "directory",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": false
  1128. },
  1129. {
  1130. "name": "workspace",
  1131. "in": "query",
  1132. "schema": {
  1133. "type": "string"
  1134. },
  1135. "required": false
  1136. }
  1137. ],
  1138. "responses": {
  1139. "200": {
  1140. "description": "List of worktree directories",
  1141. "content": {
  1142. "application/json": {
  1143. "schema": {
  1144. "type": "array",
  1145. "items": {
  1146. "type": "string"
  1147. },
  1148. "description": "List of worktree directories"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "400": {
  1154. "description": "WorktreeError | InvalidRequestError",
  1155. "content": {
  1156. "application/json": {
  1157. "schema": {
  1158. "anyOf": [
  1159. {
  1160. "$ref": "#/components/schemas/WorktreeError"
  1161. },
  1162. {
  1163. "$ref": "#/components/schemas/InvalidRequestError"
  1164. }
  1165. ]
  1166. }
  1167. }
  1168. }
  1169. }
  1170. },
  1171. "description": "List all sandbox worktrees for the current project.",
  1172. "summary": "List worktrees",
  1173. "x-codeSamples": [
  1174. {
  1175. "lang": "js",
  1176. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1177. }
  1178. ]
  1179. },
  1180. "post": {
  1181. "tags": ["experimental"],
  1182. "operationId": "worktree.create",
  1183. "parameters": [
  1184. {
  1185. "name": "directory",
  1186. "in": "query",
  1187. "schema": {
  1188. "type": "string"
  1189. },
  1190. "required": false
  1191. },
  1192. {
  1193. "name": "workspace",
  1194. "in": "query",
  1195. "schema": {
  1196. "type": "string"
  1197. },
  1198. "required": false
  1199. }
  1200. ],
  1201. "responses": {
  1202. "200": {
  1203. "description": "Worktree created",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "$ref": "#/components/schemas/Worktree"
  1208. }
  1209. }
  1210. }
  1211. },
  1212. "400": {
  1213. "description": "WorktreeError | InvalidRequestError",
  1214. "content": {
  1215. "application/json": {
  1216. "schema": {
  1217. "anyOf": [
  1218. {
  1219. "$ref": "#/components/schemas/WorktreeError"
  1220. },
  1221. {
  1222. "$ref": "#/components/schemas/InvalidRequestError"
  1223. }
  1224. ]
  1225. }
  1226. }
  1227. }
  1228. }
  1229. },
  1230. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1231. "summary": "Create worktree",
  1232. "requestBody": {
  1233. "content": {
  1234. "application/json": {
  1235. "schema": {
  1236. "$ref": "#/components/schemas/WorktreeCreateInput"
  1237. }
  1238. }
  1239. }
  1240. },
  1241. "x-codeSamples": [
  1242. {
  1243. "lang": "js",
  1244. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1245. }
  1246. ]
  1247. },
  1248. "delete": {
  1249. "tags": ["experimental"],
  1250. "operationId": "worktree.remove",
  1251. "parameters": [
  1252. {
  1253. "name": "directory",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. },
  1260. {
  1261. "name": "workspace",
  1262. "in": "query",
  1263. "schema": {
  1264. "type": "string"
  1265. },
  1266. "required": false
  1267. }
  1268. ],
  1269. "responses": {
  1270. "200": {
  1271. "description": "Worktree removed",
  1272. "content": {
  1273. "application/json": {
  1274. "schema": {
  1275. "type": "boolean",
  1276. "description": "Worktree removed"
  1277. }
  1278. }
  1279. }
  1280. },
  1281. "400": {
  1282. "description": "WorktreeError | InvalidRequestError",
  1283. "content": {
  1284. "application/json": {
  1285. "schema": {
  1286. "anyOf": [
  1287. {
  1288. "$ref": "#/components/schemas/WorktreeError"
  1289. },
  1290. {
  1291. "$ref": "#/components/schemas/InvalidRequestError"
  1292. }
  1293. ]
  1294. }
  1295. }
  1296. }
  1297. }
  1298. },
  1299. "description": "Remove a git worktree and delete its branch.",
  1300. "summary": "Remove worktree",
  1301. "requestBody": {
  1302. "content": {
  1303. "application/json": {
  1304. "schema": {
  1305. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1306. }
  1307. }
  1308. }
  1309. },
  1310. "x-codeSamples": [
  1311. {
  1312. "lang": "js",
  1313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1314. }
  1315. ]
  1316. }
  1317. },
  1318. "/experimental/worktree/reset": {
  1319. "post": {
  1320. "tags": ["experimental"],
  1321. "operationId": "worktree.reset",
  1322. "parameters": [
  1323. {
  1324. "name": "directory",
  1325. "in": "query",
  1326. "schema": {
  1327. "type": "string"
  1328. },
  1329. "required": false
  1330. },
  1331. {
  1332. "name": "workspace",
  1333. "in": "query",
  1334. "schema": {
  1335. "type": "string"
  1336. },
  1337. "required": false
  1338. }
  1339. ],
  1340. "responses": {
  1341. "200": {
  1342. "description": "Worktree reset",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "type": "boolean",
  1347. "description": "Worktree reset"
  1348. }
  1349. }
  1350. }
  1351. },
  1352. "400": {
  1353. "description": "WorktreeError | InvalidRequestError",
  1354. "content": {
  1355. "application/json": {
  1356. "schema": {
  1357. "anyOf": [
  1358. {
  1359. "$ref": "#/components/schemas/WorktreeError"
  1360. },
  1361. {
  1362. "$ref": "#/components/schemas/InvalidRequestError"
  1363. }
  1364. ]
  1365. }
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "description": "Reset a worktree branch to the primary default branch.",
  1371. "summary": "Reset worktree",
  1372. "requestBody": {
  1373. "content": {
  1374. "application/json": {
  1375. "schema": {
  1376. "$ref": "#/components/schemas/WorktreeResetInput"
  1377. }
  1378. }
  1379. }
  1380. },
  1381. "x-codeSamples": [
  1382. {
  1383. "lang": "js",
  1384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1385. }
  1386. ]
  1387. }
  1388. },
  1389. "/experimental/session": {
  1390. "get": {
  1391. "tags": ["experimental"],
  1392. "operationId": "experimental.session.list",
  1393. "parameters": [
  1394. {
  1395. "name": "directory",
  1396. "in": "query",
  1397. "schema": {
  1398. "type": "string"
  1399. },
  1400. "required": false
  1401. },
  1402. {
  1403. "name": "workspace",
  1404. "in": "query",
  1405. "schema": {
  1406. "type": "string"
  1407. },
  1408. "required": false
  1409. },
  1410. {
  1411. "name": "roots",
  1412. "in": "query",
  1413. "schema": {
  1414. "anyOf": [
  1415. {
  1416. "type": "boolean"
  1417. },
  1418. {
  1419. "type": "string",
  1420. "enum": ["true", "false"]
  1421. }
  1422. ]
  1423. },
  1424. "required": false
  1425. },
  1426. {
  1427. "name": "start",
  1428. "in": "query",
  1429. "schema": {
  1430. "type": "number"
  1431. },
  1432. "required": false
  1433. },
  1434. {
  1435. "name": "cursor",
  1436. "in": "query",
  1437. "schema": {
  1438. "type": "number"
  1439. },
  1440. "required": false
  1441. },
  1442. {
  1443. "name": "search",
  1444. "in": "query",
  1445. "schema": {
  1446. "type": "string"
  1447. },
  1448. "required": false
  1449. },
  1450. {
  1451. "name": "limit",
  1452. "in": "query",
  1453. "schema": {
  1454. "type": "number"
  1455. },
  1456. "required": false
  1457. },
  1458. {
  1459. "name": "archived",
  1460. "in": "query",
  1461. "schema": {
  1462. "anyOf": [
  1463. {
  1464. "type": "boolean"
  1465. },
  1466. {
  1467. "type": "string",
  1468. "enum": ["true", "false"]
  1469. }
  1470. ]
  1471. },
  1472. "required": false
  1473. }
  1474. ],
  1475. "responses": {
  1476. "200": {
  1477. "description": "List of sessions",
  1478. "content": {
  1479. "application/json": {
  1480. "schema": {
  1481. "type": "array",
  1482. "items": {
  1483. "$ref": "#/components/schemas/GlobalSession"
  1484. },
  1485. "description": "List of sessions"
  1486. }
  1487. }
  1488. }
  1489. },
  1490. "400": {
  1491. "description": "Bad request",
  1492. "content": {
  1493. "application/json": {
  1494. "schema": {
  1495. "$ref": "#/components/schemas/BadRequestError"
  1496. }
  1497. }
  1498. }
  1499. }
  1500. },
  1501. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1502. "summary": "List sessions",
  1503. "x-codeSamples": [
  1504. {
  1505. "lang": "js",
  1506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1507. }
  1508. ]
  1509. }
  1510. },
  1511. "/experimental/resource": {
  1512. "get": {
  1513. "tags": ["experimental"],
  1514. "operationId": "experimental.resource.list",
  1515. "parameters": [
  1516. {
  1517. "name": "directory",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "workspace",
  1526. "in": "query",
  1527. "schema": {
  1528. "type": "string"
  1529. },
  1530. "required": false
  1531. }
  1532. ],
  1533. "responses": {
  1534. "200": {
  1535. "description": "MCP resources",
  1536. "content": {
  1537. "application/json": {
  1538. "schema": {
  1539. "type": "object",
  1540. "additionalProperties": {
  1541. "$ref": "#/components/schemas/McpResource"
  1542. },
  1543. "description": "MCP resources"
  1544. }
  1545. }
  1546. }
  1547. },
  1548. "400": {
  1549. "description": "Bad request",
  1550. "content": {
  1551. "application/json": {
  1552. "schema": {
  1553. "$ref": "#/components/schemas/BadRequestError"
  1554. }
  1555. }
  1556. }
  1557. }
  1558. },
  1559. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1560. "summary": "Get MCP resources",
  1561. "x-codeSamples": [
  1562. {
  1563. "lang": "js",
  1564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1565. }
  1566. ]
  1567. }
  1568. },
  1569. "/find": {
  1570. "get": {
  1571. "tags": ["file"],
  1572. "operationId": "find.text",
  1573. "parameters": [
  1574. {
  1575. "name": "directory",
  1576. "in": "query",
  1577. "schema": {
  1578. "type": "string"
  1579. },
  1580. "required": false
  1581. },
  1582. {
  1583. "name": "workspace",
  1584. "in": "query",
  1585. "schema": {
  1586. "type": "string"
  1587. },
  1588. "required": false
  1589. },
  1590. {
  1591. "name": "pattern",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": true
  1597. }
  1598. ],
  1599. "responses": {
  1600. "200": {
  1601. "description": "Matches",
  1602. "content": {
  1603. "application/json": {
  1604. "schema": {
  1605. "type": "array",
  1606. "items": {
  1607. "type": "object",
  1608. "properties": {
  1609. "path": {
  1610. "type": "object",
  1611. "properties": {
  1612. "text": {
  1613. "type": "string"
  1614. }
  1615. },
  1616. "required": ["text"],
  1617. "additionalProperties": false
  1618. },
  1619. "lines": {
  1620. "type": "object",
  1621. "properties": {
  1622. "text": {
  1623. "type": "string"
  1624. }
  1625. },
  1626. "required": ["text"],
  1627. "additionalProperties": false
  1628. },
  1629. "line_number": {
  1630. "type": "integer",
  1631. "minimum": 0
  1632. },
  1633. "absolute_offset": {
  1634. "type": "integer",
  1635. "minimum": 0
  1636. },
  1637. "submatches": {
  1638. "type": "array",
  1639. "items": {
  1640. "type": "object",
  1641. "properties": {
  1642. "match": {
  1643. "type": "object",
  1644. "properties": {
  1645. "text": {
  1646. "type": "string"
  1647. }
  1648. },
  1649. "required": ["text"],
  1650. "additionalProperties": false
  1651. },
  1652. "start": {
  1653. "type": "integer",
  1654. "minimum": 0
  1655. },
  1656. "end": {
  1657. "type": "integer",
  1658. "minimum": 0
  1659. }
  1660. },
  1661. "required": ["match", "start", "end"],
  1662. "additionalProperties": false
  1663. }
  1664. }
  1665. },
  1666. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1667. "additionalProperties": false
  1668. },
  1669. "description": "Matches"
  1670. }
  1671. }
  1672. }
  1673. },
  1674. "400": {
  1675. "description": "Bad request",
  1676. "content": {
  1677. "application/json": {
  1678. "schema": {
  1679. "$ref": "#/components/schemas/BadRequestError"
  1680. }
  1681. }
  1682. }
  1683. }
  1684. },
  1685. "description": "Search for text patterns across files in the project using ripgrep.",
  1686. "summary": "Find text",
  1687. "x-codeSamples": [
  1688. {
  1689. "lang": "js",
  1690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1691. }
  1692. ]
  1693. }
  1694. },
  1695. "/find/file": {
  1696. "get": {
  1697. "tags": ["file"],
  1698. "operationId": "find.files",
  1699. "parameters": [
  1700. {
  1701. "name": "directory",
  1702. "in": "query",
  1703. "schema": {
  1704. "type": "string"
  1705. },
  1706. "required": false
  1707. },
  1708. {
  1709. "name": "workspace",
  1710. "in": "query",
  1711. "schema": {
  1712. "type": "string"
  1713. },
  1714. "required": false
  1715. },
  1716. {
  1717. "name": "query",
  1718. "in": "query",
  1719. "schema": {
  1720. "type": "string"
  1721. },
  1722. "required": true
  1723. },
  1724. {
  1725. "name": "dirs",
  1726. "in": "query",
  1727. "schema": {
  1728. "type": "string",
  1729. "enum": ["true", "false"]
  1730. },
  1731. "required": false
  1732. },
  1733. {
  1734. "name": "type",
  1735. "in": "query",
  1736. "schema": {
  1737. "type": "string",
  1738. "enum": ["file", "directory"]
  1739. },
  1740. "required": false
  1741. },
  1742. {
  1743. "name": "limit",
  1744. "in": "query",
  1745. "schema": {
  1746. "type": "integer",
  1747. "minimum": 1,
  1748. "maximum": 200
  1749. },
  1750. "required": false
  1751. }
  1752. ],
  1753. "responses": {
  1754. "200": {
  1755. "description": "File paths",
  1756. "content": {
  1757. "application/json": {
  1758. "schema": {
  1759. "type": "array",
  1760. "items": {
  1761. "type": "string"
  1762. },
  1763. "description": "File paths"
  1764. }
  1765. }
  1766. }
  1767. },
  1768. "400": {
  1769. "description": "Bad request",
  1770. "content": {
  1771. "application/json": {
  1772. "schema": {
  1773. "$ref": "#/components/schemas/BadRequestError"
  1774. }
  1775. }
  1776. }
  1777. }
  1778. },
  1779. "description": "Search for files or directories by name or pattern in the project directory.",
  1780. "summary": "Find files",
  1781. "x-codeSamples": [
  1782. {
  1783. "lang": "js",
  1784. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1785. }
  1786. ]
  1787. }
  1788. },
  1789. "/find/symbol": {
  1790. "get": {
  1791. "tags": ["file"],
  1792. "operationId": "find.symbols",
  1793. "parameters": [
  1794. {
  1795. "name": "directory",
  1796. "in": "query",
  1797. "schema": {
  1798. "type": "string"
  1799. },
  1800. "required": false
  1801. },
  1802. {
  1803. "name": "workspace",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "query",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": true
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Symbols",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "array",
  1826. "items": {
  1827. "$ref": "#/components/schemas/Symbol"
  1828. },
  1829. "description": "Symbols"
  1830. }
  1831. }
  1832. }
  1833. },
  1834. "400": {
  1835. "description": "Bad request",
  1836. "content": {
  1837. "application/json": {
  1838. "schema": {
  1839. "$ref": "#/components/schemas/BadRequestError"
  1840. }
  1841. }
  1842. }
  1843. }
  1844. },
  1845. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1846. "summary": "Find symbols",
  1847. "x-codeSamples": [
  1848. {
  1849. "lang": "js",
  1850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1851. }
  1852. ]
  1853. }
  1854. },
  1855. "/file": {
  1856. "get": {
  1857. "tags": ["file"],
  1858. "operationId": "file.list",
  1859. "parameters": [
  1860. {
  1861. "name": "directory",
  1862. "in": "query",
  1863. "schema": {
  1864. "type": "string"
  1865. },
  1866. "required": false
  1867. },
  1868. {
  1869. "name": "workspace",
  1870. "in": "query",
  1871. "schema": {
  1872. "type": "string"
  1873. },
  1874. "required": false
  1875. },
  1876. {
  1877. "name": "path",
  1878. "in": "query",
  1879. "schema": {
  1880. "type": "string"
  1881. },
  1882. "required": true
  1883. }
  1884. ],
  1885. "responses": {
  1886. "200": {
  1887. "description": "Files and directories",
  1888. "content": {
  1889. "application/json": {
  1890. "schema": {
  1891. "type": "array",
  1892. "items": {
  1893. "$ref": "#/components/schemas/FileNode"
  1894. },
  1895. "description": "Files and directories"
  1896. }
  1897. }
  1898. }
  1899. },
  1900. "400": {
  1901. "description": "Bad request",
  1902. "content": {
  1903. "application/json": {
  1904. "schema": {
  1905. "$ref": "#/components/schemas/BadRequestError"
  1906. }
  1907. }
  1908. }
  1909. }
  1910. },
  1911. "description": "List files and directories in a specified path.",
  1912. "summary": "List files",
  1913. "x-codeSamples": [
  1914. {
  1915. "lang": "js",
  1916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1917. }
  1918. ]
  1919. }
  1920. },
  1921. "/file/content": {
  1922. "get": {
  1923. "tags": ["file"],
  1924. "operationId": "file.read",
  1925. "parameters": [
  1926. {
  1927. "name": "directory",
  1928. "in": "query",
  1929. "schema": {
  1930. "type": "string"
  1931. },
  1932. "required": false
  1933. },
  1934. {
  1935. "name": "workspace",
  1936. "in": "query",
  1937. "schema": {
  1938. "type": "string"
  1939. },
  1940. "required": false
  1941. },
  1942. {
  1943. "name": "path",
  1944. "in": "query",
  1945. "schema": {
  1946. "type": "string"
  1947. },
  1948. "required": true
  1949. }
  1950. ],
  1951. "responses": {
  1952. "200": {
  1953. "description": "File content",
  1954. "content": {
  1955. "application/json": {
  1956. "schema": {
  1957. "$ref": "#/components/schemas/FileContent"
  1958. }
  1959. }
  1960. }
  1961. },
  1962. "400": {
  1963. "description": "Bad request",
  1964. "content": {
  1965. "application/json": {
  1966. "schema": {
  1967. "$ref": "#/components/schemas/BadRequestError"
  1968. }
  1969. }
  1970. }
  1971. }
  1972. },
  1973. "description": "Read the content of a specified file.",
  1974. "summary": "Read file",
  1975. "x-codeSamples": [
  1976. {
  1977. "lang": "js",
  1978. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1979. }
  1980. ]
  1981. }
  1982. },
  1983. "/file/status": {
  1984. "get": {
  1985. "tags": ["file"],
  1986. "operationId": "file.status",
  1987. "parameters": [
  1988. {
  1989. "name": "directory",
  1990. "in": "query",
  1991. "schema": {
  1992. "type": "string"
  1993. },
  1994. "required": false
  1995. },
  1996. {
  1997. "name": "workspace",
  1998. "in": "query",
  1999. "schema": {
  2000. "type": "string"
  2001. },
  2002. "required": false
  2003. }
  2004. ],
  2005. "responses": {
  2006. "200": {
  2007. "description": "File status",
  2008. "content": {
  2009. "application/json": {
  2010. "schema": {
  2011. "type": "array",
  2012. "items": {
  2013. "$ref": "#/components/schemas/File"
  2014. },
  2015. "description": "File status"
  2016. }
  2017. }
  2018. }
  2019. },
  2020. "400": {
  2021. "description": "Bad request",
  2022. "content": {
  2023. "application/json": {
  2024. "schema": {
  2025. "$ref": "#/components/schemas/BadRequestError"
  2026. }
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "description": "Get the git status of all files in the project.",
  2032. "summary": "Get file status",
  2033. "x-codeSamples": [
  2034. {
  2035. "lang": "js",
  2036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2037. }
  2038. ]
  2039. }
  2040. },
  2041. "/instance/dispose": {
  2042. "post": {
  2043. "tags": ["instance"],
  2044. "operationId": "instance.dispose",
  2045. "parameters": [
  2046. {
  2047. "name": "directory",
  2048. "in": "query",
  2049. "schema": {
  2050. "type": "string"
  2051. },
  2052. "required": false
  2053. },
  2054. {
  2055. "name": "workspace",
  2056. "in": "query",
  2057. "schema": {
  2058. "type": "string"
  2059. },
  2060. "required": false
  2061. }
  2062. ],
  2063. "responses": {
  2064. "200": {
  2065. "description": "Instance disposed",
  2066. "content": {
  2067. "application/json": {
  2068. "schema": {
  2069. "type": "boolean",
  2070. "description": "Instance disposed"
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "400": {
  2076. "description": "Bad request",
  2077. "content": {
  2078. "application/json": {
  2079. "schema": {
  2080. "$ref": "#/components/schemas/BadRequestError"
  2081. }
  2082. }
  2083. }
  2084. }
  2085. },
  2086. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2087. "summary": "Dispose instance",
  2088. "x-codeSamples": [
  2089. {
  2090. "lang": "js",
  2091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2092. }
  2093. ]
  2094. }
  2095. },
  2096. "/path": {
  2097. "get": {
  2098. "tags": ["instance"],
  2099. "operationId": "path.get",
  2100. "parameters": [
  2101. {
  2102. "name": "directory",
  2103. "in": "query",
  2104. "schema": {
  2105. "type": "string"
  2106. },
  2107. "required": false
  2108. },
  2109. {
  2110. "name": "workspace",
  2111. "in": "query",
  2112. "schema": {
  2113. "type": "string"
  2114. },
  2115. "required": false
  2116. }
  2117. ],
  2118. "responses": {
  2119. "200": {
  2120. "description": "Path",
  2121. "content": {
  2122. "application/json": {
  2123. "schema": {
  2124. "$ref": "#/components/schemas/Path"
  2125. }
  2126. }
  2127. }
  2128. },
  2129. "400": {
  2130. "description": "Bad request",
  2131. "content": {
  2132. "application/json": {
  2133. "schema": {
  2134. "$ref": "#/components/schemas/BadRequestError"
  2135. }
  2136. }
  2137. }
  2138. }
  2139. },
  2140. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2141. "summary": "Get paths",
  2142. "x-codeSamples": [
  2143. {
  2144. "lang": "js",
  2145. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2146. }
  2147. ]
  2148. }
  2149. },
  2150. "/vcs": {
  2151. "get": {
  2152. "tags": ["instance"],
  2153. "operationId": "vcs.get",
  2154. "parameters": [
  2155. {
  2156. "name": "directory",
  2157. "in": "query",
  2158. "schema": {
  2159. "type": "string"
  2160. },
  2161. "required": false
  2162. },
  2163. {
  2164. "name": "workspace",
  2165. "in": "query",
  2166. "schema": {
  2167. "type": "string"
  2168. },
  2169. "required": false
  2170. }
  2171. ],
  2172. "responses": {
  2173. "200": {
  2174. "description": "VCS info",
  2175. "content": {
  2176. "application/json": {
  2177. "schema": {
  2178. "$ref": "#/components/schemas/VcsInfo"
  2179. }
  2180. }
  2181. }
  2182. },
  2183. "400": {
  2184. "description": "Bad request",
  2185. "content": {
  2186. "application/json": {
  2187. "schema": {
  2188. "$ref": "#/components/schemas/BadRequestError"
  2189. }
  2190. }
  2191. }
  2192. }
  2193. },
  2194. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2195. "summary": "Get VCS info",
  2196. "x-codeSamples": [
  2197. {
  2198. "lang": "js",
  2199. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2200. }
  2201. ]
  2202. }
  2203. },
  2204. "/vcs/status": {
  2205. "get": {
  2206. "tags": ["instance"],
  2207. "operationId": "vcs.status",
  2208. "parameters": [
  2209. {
  2210. "name": "directory",
  2211. "in": "query",
  2212. "schema": {
  2213. "type": "string"
  2214. },
  2215. "required": false
  2216. },
  2217. {
  2218. "name": "workspace",
  2219. "in": "query",
  2220. "schema": {
  2221. "type": "string"
  2222. },
  2223. "required": false
  2224. }
  2225. ],
  2226. "responses": {
  2227. "200": {
  2228. "description": "VCS status",
  2229. "content": {
  2230. "application/json": {
  2231. "schema": {
  2232. "type": "array",
  2233. "items": {
  2234. "$ref": "#/components/schemas/VcsFileStatus"
  2235. },
  2236. "description": "VCS status"
  2237. }
  2238. }
  2239. }
  2240. },
  2241. "400": {
  2242. "description": "Bad request",
  2243. "content": {
  2244. "application/json": {
  2245. "schema": {
  2246. "$ref": "#/components/schemas/BadRequestError"
  2247. }
  2248. }
  2249. }
  2250. }
  2251. },
  2252. "description": "Retrieve changed files in the current working tree without patches.",
  2253. "summary": "Get VCS status",
  2254. "x-codeSamples": [
  2255. {
  2256. "lang": "js",
  2257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2258. }
  2259. ]
  2260. }
  2261. },
  2262. "/vcs/diff": {
  2263. "get": {
  2264. "tags": ["instance"],
  2265. "operationId": "vcs.diff",
  2266. "parameters": [
  2267. {
  2268. "name": "directory",
  2269. "in": "query",
  2270. "schema": {
  2271. "type": "string"
  2272. },
  2273. "required": false
  2274. },
  2275. {
  2276. "name": "workspace",
  2277. "in": "query",
  2278. "schema": {
  2279. "type": "string"
  2280. },
  2281. "required": false
  2282. },
  2283. {
  2284. "name": "mode",
  2285. "in": "query",
  2286. "schema": {
  2287. "type": "string",
  2288. "enum": ["git", "branch"]
  2289. },
  2290. "required": true
  2291. },
  2292. {
  2293. "name": "context",
  2294. "in": "query",
  2295. "schema": {
  2296. "type": "integer",
  2297. "minimum": 0
  2298. },
  2299. "required": false
  2300. }
  2301. ],
  2302. "responses": {
  2303. "200": {
  2304. "description": "VCS diff",
  2305. "content": {
  2306. "application/json": {
  2307. "schema": {
  2308. "type": "array",
  2309. "items": {
  2310. "$ref": "#/components/schemas/VcsFileDiff"
  2311. },
  2312. "description": "VCS diff"
  2313. }
  2314. }
  2315. }
  2316. },
  2317. "400": {
  2318. "description": "Bad request",
  2319. "content": {
  2320. "application/json": {
  2321. "schema": {
  2322. "$ref": "#/components/schemas/BadRequestError"
  2323. }
  2324. }
  2325. }
  2326. }
  2327. },
  2328. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2329. "summary": "Get VCS diff",
  2330. "x-codeSamples": [
  2331. {
  2332. "lang": "js",
  2333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2334. }
  2335. ]
  2336. }
  2337. },
  2338. "/vcs/diff/raw": {
  2339. "get": {
  2340. "tags": ["instance"],
  2341. "operationId": "vcs.diff.raw",
  2342. "parameters": [
  2343. {
  2344. "name": "directory",
  2345. "in": "query",
  2346. "schema": {
  2347. "type": "string"
  2348. },
  2349. "required": false
  2350. },
  2351. {
  2352. "name": "workspace",
  2353. "in": "query",
  2354. "schema": {
  2355. "type": "string"
  2356. },
  2357. "required": false
  2358. }
  2359. ],
  2360. "responses": {
  2361. "200": {
  2362. "description": "Raw VCS diff",
  2363. "content": {
  2364. "text/x-diff; charset=utf-8": {
  2365. "schema": {
  2366. "type": "string"
  2367. }
  2368. }
  2369. }
  2370. },
  2371. "400": {
  2372. "description": "Bad request",
  2373. "content": {
  2374. "application/json": {
  2375. "schema": {
  2376. "$ref": "#/components/schemas/BadRequestError"
  2377. }
  2378. }
  2379. }
  2380. }
  2381. },
  2382. "description": "Retrieve a raw patch for current uncommitted changes.",
  2383. "summary": "Get raw VCS diff",
  2384. "x-codeSamples": [
  2385. {
  2386. "lang": "js",
  2387. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2388. }
  2389. ]
  2390. }
  2391. },
  2392. "/vcs/apply": {
  2393. "post": {
  2394. "tags": ["instance"],
  2395. "operationId": "vcs.apply",
  2396. "parameters": [
  2397. {
  2398. "name": "directory",
  2399. "in": "query",
  2400. "schema": {
  2401. "type": "string"
  2402. },
  2403. "required": false
  2404. },
  2405. {
  2406. "name": "workspace",
  2407. "in": "query",
  2408. "schema": {
  2409. "type": "string"
  2410. },
  2411. "required": false
  2412. }
  2413. ],
  2414. "responses": {
  2415. "200": {
  2416. "description": "VCS patch applied",
  2417. "content": {
  2418. "application/json": {
  2419. "schema": {
  2420. "type": "object",
  2421. "properties": {
  2422. "applied": {
  2423. "type": "boolean"
  2424. }
  2425. },
  2426. "required": ["applied"],
  2427. "additionalProperties": false,
  2428. "description": "VCS patch applied"
  2429. }
  2430. }
  2431. }
  2432. },
  2433. "400": {
  2434. "description": "VcsApplyError | InvalidRequestError",
  2435. "content": {
  2436. "application/json": {
  2437. "schema": {
  2438. "anyOf": [
  2439. {
  2440. "$ref": "#/components/schemas/VcsApplyError"
  2441. },
  2442. {
  2443. "$ref": "#/components/schemas/InvalidRequestError"
  2444. }
  2445. ]
  2446. }
  2447. }
  2448. }
  2449. }
  2450. },
  2451. "description": "Apply a raw patch to the current working tree.",
  2452. "summary": "Apply VCS patch",
  2453. "requestBody": {
  2454. "content": {
  2455. "application/json": {
  2456. "schema": {
  2457. "type": "object",
  2458. "properties": {
  2459. "patch": {
  2460. "type": "string"
  2461. }
  2462. },
  2463. "required": ["patch"],
  2464. "additionalProperties": false
  2465. }
  2466. }
  2467. }
  2468. },
  2469. "x-codeSamples": [
  2470. {
  2471. "lang": "js",
  2472. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2473. }
  2474. ]
  2475. }
  2476. },
  2477. "/command": {
  2478. "get": {
  2479. "tags": ["instance"],
  2480. "operationId": "command.list",
  2481. "parameters": [
  2482. {
  2483. "name": "directory",
  2484. "in": "query",
  2485. "schema": {
  2486. "type": "string"
  2487. },
  2488. "required": false
  2489. },
  2490. {
  2491. "name": "workspace",
  2492. "in": "query",
  2493. "schema": {
  2494. "type": "string"
  2495. },
  2496. "required": false
  2497. }
  2498. ],
  2499. "responses": {
  2500. "200": {
  2501. "description": "List of commands",
  2502. "content": {
  2503. "application/json": {
  2504. "schema": {
  2505. "type": "array",
  2506. "items": {
  2507. "$ref": "#/components/schemas/Command"
  2508. },
  2509. "description": "List of commands"
  2510. }
  2511. }
  2512. }
  2513. },
  2514. "400": {
  2515. "description": "Bad request",
  2516. "content": {
  2517. "application/json": {
  2518. "schema": {
  2519. "$ref": "#/components/schemas/BadRequestError"
  2520. }
  2521. }
  2522. }
  2523. }
  2524. },
  2525. "description": "Get a list of all available commands in the OpenCode system.",
  2526. "summary": "List commands",
  2527. "x-codeSamples": [
  2528. {
  2529. "lang": "js",
  2530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2531. }
  2532. ]
  2533. }
  2534. },
  2535. "/agent": {
  2536. "get": {
  2537. "tags": ["instance"],
  2538. "operationId": "app.agents",
  2539. "parameters": [
  2540. {
  2541. "name": "directory",
  2542. "in": "query",
  2543. "schema": {
  2544. "type": "string"
  2545. },
  2546. "required": false
  2547. },
  2548. {
  2549. "name": "workspace",
  2550. "in": "query",
  2551. "schema": {
  2552. "type": "string"
  2553. },
  2554. "required": false
  2555. }
  2556. ],
  2557. "responses": {
  2558. "200": {
  2559. "description": "List of agents",
  2560. "content": {
  2561. "application/json": {
  2562. "schema": {
  2563. "type": "array",
  2564. "items": {
  2565. "$ref": "#/components/schemas/Agent"
  2566. },
  2567. "description": "List of agents"
  2568. }
  2569. }
  2570. }
  2571. },
  2572. "400": {
  2573. "description": "Bad request",
  2574. "content": {
  2575. "application/json": {
  2576. "schema": {
  2577. "$ref": "#/components/schemas/BadRequestError"
  2578. }
  2579. }
  2580. }
  2581. }
  2582. },
  2583. "description": "Get a list of all available AI agents in the OpenCode system.",
  2584. "summary": "List agents",
  2585. "x-codeSamples": [
  2586. {
  2587. "lang": "js",
  2588. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2589. }
  2590. ]
  2591. }
  2592. },
  2593. "/skill": {
  2594. "get": {
  2595. "tags": ["instance"],
  2596. "operationId": "app.skills",
  2597. "parameters": [
  2598. {
  2599. "name": "directory",
  2600. "in": "query",
  2601. "schema": {
  2602. "type": "string"
  2603. },
  2604. "required": false
  2605. },
  2606. {
  2607. "name": "workspace",
  2608. "in": "query",
  2609. "schema": {
  2610. "type": "string"
  2611. },
  2612. "required": false
  2613. }
  2614. ],
  2615. "responses": {
  2616. "200": {
  2617. "description": "List of skills",
  2618. "content": {
  2619. "application/json": {
  2620. "schema": {
  2621. "type": "array",
  2622. "items": {
  2623. "type": "object",
  2624. "properties": {
  2625. "name": {
  2626. "type": "string"
  2627. },
  2628. "description": {
  2629. "type": "string"
  2630. },
  2631. "location": {
  2632. "type": "string"
  2633. },
  2634. "content": {
  2635. "type": "string"
  2636. }
  2637. },
  2638. "required": ["name", "location", "content"],
  2639. "additionalProperties": false
  2640. },
  2641. "description": "List of skills"
  2642. }
  2643. }
  2644. }
  2645. },
  2646. "400": {
  2647. "description": "Bad request",
  2648. "content": {
  2649. "application/json": {
  2650. "schema": {
  2651. "$ref": "#/components/schemas/BadRequestError"
  2652. }
  2653. }
  2654. }
  2655. }
  2656. },
  2657. "description": "Get a list of all available skills in the OpenCode system.",
  2658. "summary": "List skills",
  2659. "x-codeSamples": [
  2660. {
  2661. "lang": "js",
  2662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2663. }
  2664. ]
  2665. }
  2666. },
  2667. "/lsp": {
  2668. "get": {
  2669. "tags": ["instance"],
  2670. "operationId": "lsp.status",
  2671. "parameters": [
  2672. {
  2673. "name": "directory",
  2674. "in": "query",
  2675. "schema": {
  2676. "type": "string"
  2677. },
  2678. "required": false
  2679. },
  2680. {
  2681. "name": "workspace",
  2682. "in": "query",
  2683. "schema": {
  2684. "type": "string"
  2685. },
  2686. "required": false
  2687. }
  2688. ],
  2689. "responses": {
  2690. "200": {
  2691. "description": "LSP server status",
  2692. "content": {
  2693. "application/json": {
  2694. "schema": {
  2695. "type": "array",
  2696. "items": {
  2697. "$ref": "#/components/schemas/LSPStatus"
  2698. },
  2699. "description": "LSP server status"
  2700. }
  2701. }
  2702. }
  2703. },
  2704. "400": {
  2705. "description": "Bad request",
  2706. "content": {
  2707. "application/json": {
  2708. "schema": {
  2709. "$ref": "#/components/schemas/BadRequestError"
  2710. }
  2711. }
  2712. }
  2713. }
  2714. },
  2715. "description": "Get LSP server status",
  2716. "summary": "Get LSP status",
  2717. "x-codeSamples": [
  2718. {
  2719. "lang": "js",
  2720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2721. }
  2722. ]
  2723. }
  2724. },
  2725. "/formatter": {
  2726. "get": {
  2727. "tags": ["instance"],
  2728. "operationId": "formatter.status",
  2729. "parameters": [
  2730. {
  2731. "name": "directory",
  2732. "in": "query",
  2733. "schema": {
  2734. "type": "string"
  2735. },
  2736. "required": false
  2737. },
  2738. {
  2739. "name": "workspace",
  2740. "in": "query",
  2741. "schema": {
  2742. "type": "string"
  2743. },
  2744. "required": false
  2745. }
  2746. ],
  2747. "responses": {
  2748. "200": {
  2749. "description": "Formatter status",
  2750. "content": {
  2751. "application/json": {
  2752. "schema": {
  2753. "type": "array",
  2754. "items": {
  2755. "$ref": "#/components/schemas/FormatterStatus"
  2756. },
  2757. "description": "Formatter status"
  2758. }
  2759. }
  2760. }
  2761. },
  2762. "400": {
  2763. "description": "Bad request",
  2764. "content": {
  2765. "application/json": {
  2766. "schema": {
  2767. "$ref": "#/components/schemas/BadRequestError"
  2768. }
  2769. }
  2770. }
  2771. }
  2772. },
  2773. "description": "Get formatter status",
  2774. "summary": "Get formatter status",
  2775. "x-codeSamples": [
  2776. {
  2777. "lang": "js",
  2778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2779. }
  2780. ]
  2781. }
  2782. },
  2783. "/mcp": {
  2784. "get": {
  2785. "tags": ["mcp"],
  2786. "operationId": "mcp.status",
  2787. "parameters": [
  2788. {
  2789. "name": "directory",
  2790. "in": "query",
  2791. "schema": {
  2792. "type": "string"
  2793. },
  2794. "required": false
  2795. },
  2796. {
  2797. "name": "workspace",
  2798. "in": "query",
  2799. "schema": {
  2800. "type": "string"
  2801. },
  2802. "required": false
  2803. }
  2804. ],
  2805. "responses": {
  2806. "200": {
  2807. "description": "MCP server status",
  2808. "content": {
  2809. "application/json": {
  2810. "schema": {
  2811. "type": "object",
  2812. "additionalProperties": {
  2813. "$ref": "#/components/schemas/MCPStatus"
  2814. },
  2815. "description": "MCP server status"
  2816. }
  2817. }
  2818. }
  2819. },
  2820. "400": {
  2821. "description": "Bad request",
  2822. "content": {
  2823. "application/json": {
  2824. "schema": {
  2825. "$ref": "#/components/schemas/BadRequestError"
  2826. }
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2832. "summary": "Get MCP status",
  2833. "x-codeSamples": [
  2834. {
  2835. "lang": "js",
  2836. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2837. }
  2838. ]
  2839. },
  2840. "post": {
  2841. "tags": ["mcp"],
  2842. "operationId": "mcp.add",
  2843. "parameters": [
  2844. {
  2845. "name": "directory",
  2846. "in": "query",
  2847. "schema": {
  2848. "type": "string"
  2849. },
  2850. "required": false
  2851. },
  2852. {
  2853. "name": "workspace",
  2854. "in": "query",
  2855. "schema": {
  2856. "type": "string"
  2857. },
  2858. "required": false
  2859. }
  2860. ],
  2861. "responses": {
  2862. "200": {
  2863. "description": "MCP server added successfully",
  2864. "content": {
  2865. "application/json": {
  2866. "schema": {
  2867. "type": "object",
  2868. "additionalProperties": {
  2869. "$ref": "#/components/schemas/MCPStatus"
  2870. },
  2871. "description": "MCP server added successfully"
  2872. }
  2873. }
  2874. }
  2875. },
  2876. "400": {
  2877. "description": "BadRequest | InvalidRequestError",
  2878. "content": {
  2879. "application/json": {
  2880. "schema": {
  2881. "anyOf": [
  2882. {
  2883. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2884. },
  2885. {
  2886. "$ref": "#/components/schemas/InvalidRequestError"
  2887. }
  2888. ]
  2889. }
  2890. }
  2891. }
  2892. }
  2893. },
  2894. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2895. "summary": "Add MCP server",
  2896. "requestBody": {
  2897. "content": {
  2898. "application/json": {
  2899. "schema": {
  2900. "type": "object",
  2901. "properties": {
  2902. "name": {
  2903. "type": "string"
  2904. },
  2905. "config": {
  2906. "anyOf": [
  2907. {
  2908. "$ref": "#/components/schemas/McpLocalConfig"
  2909. },
  2910. {
  2911. "$ref": "#/components/schemas/McpRemoteConfig"
  2912. }
  2913. ]
  2914. }
  2915. },
  2916. "required": ["name", "config"],
  2917. "additionalProperties": false
  2918. }
  2919. }
  2920. }
  2921. },
  2922. "x-codeSamples": [
  2923. {
  2924. "lang": "js",
  2925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2926. }
  2927. ]
  2928. }
  2929. },
  2930. "/mcp/{name}/auth": {
  2931. "post": {
  2932. "tags": ["mcp"],
  2933. "operationId": "mcp.auth.start",
  2934. "parameters": [
  2935. {
  2936. "name": "name",
  2937. "in": "path",
  2938. "schema": {
  2939. "type": "string"
  2940. },
  2941. "required": true
  2942. },
  2943. {
  2944. "name": "directory",
  2945. "in": "query",
  2946. "schema": {
  2947. "type": "string"
  2948. },
  2949. "required": false
  2950. },
  2951. {
  2952. "name": "workspace",
  2953. "in": "query",
  2954. "schema": {
  2955. "type": "string"
  2956. },
  2957. "required": false
  2958. }
  2959. ],
  2960. "responses": {
  2961. "200": {
  2962. "description": "OAuth flow started",
  2963. "content": {
  2964. "application/json": {
  2965. "schema": {
  2966. "type": "object",
  2967. "properties": {
  2968. "authorizationUrl": {
  2969. "type": "string"
  2970. },
  2971. "oauthState": {
  2972. "type": "string"
  2973. }
  2974. },
  2975. "required": ["authorizationUrl", "oauthState"],
  2976. "additionalProperties": false,
  2977. "description": "OAuth flow started"
  2978. }
  2979. }
  2980. }
  2981. },
  2982. "400": {
  2983. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  2984. "content": {
  2985. "application/json": {
  2986. "schema": {
  2987. "anyOf": [
  2988. {
  2989. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2990. },
  2991. {
  2992. "$ref": "#/components/schemas/InvalidRequestError"
  2993. }
  2994. ]
  2995. }
  2996. }
  2997. }
  2998. },
  2999. "404": {
  3000. "description": "McpServerNotFoundError",
  3001. "content": {
  3002. "application/json": {
  3003. "schema": {
  3004. "$ref": "#/components/schemas/McpServerNotFoundError"
  3005. }
  3006. }
  3007. }
  3008. }
  3009. },
  3010. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3011. "summary": "Start MCP OAuth",
  3012. "x-codeSamples": [
  3013. {
  3014. "lang": "js",
  3015. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3016. }
  3017. ]
  3018. },
  3019. "delete": {
  3020. "tags": ["mcp"],
  3021. "operationId": "mcp.auth.remove",
  3022. "parameters": [
  3023. {
  3024. "name": "name",
  3025. "in": "path",
  3026. "schema": {
  3027. "type": "string"
  3028. },
  3029. "required": true
  3030. },
  3031. {
  3032. "name": "directory",
  3033. "in": "query",
  3034. "schema": {
  3035. "type": "string"
  3036. },
  3037. "required": false
  3038. },
  3039. {
  3040. "name": "workspace",
  3041. "in": "query",
  3042. "schema": {
  3043. "type": "string"
  3044. },
  3045. "required": false
  3046. }
  3047. ],
  3048. "responses": {
  3049. "200": {
  3050. "description": "OAuth credentials removed",
  3051. "content": {
  3052. "application/json": {
  3053. "schema": {
  3054. "type": "object",
  3055. "properties": {
  3056. "success": {
  3057. "type": "boolean",
  3058. "enum": [true]
  3059. }
  3060. },
  3061. "required": ["success"],
  3062. "additionalProperties": false,
  3063. "description": "OAuth credentials removed"
  3064. }
  3065. }
  3066. }
  3067. },
  3068. "400": {
  3069. "description": "Bad request",
  3070. "content": {
  3071. "application/json": {
  3072. "schema": {
  3073. "$ref": "#/components/schemas/BadRequestError"
  3074. }
  3075. }
  3076. }
  3077. },
  3078. "404": {
  3079. "description": "McpServerNotFoundError",
  3080. "content": {
  3081. "application/json": {
  3082. "schema": {
  3083. "$ref": "#/components/schemas/McpServerNotFoundError"
  3084. }
  3085. }
  3086. }
  3087. }
  3088. },
  3089. "description": "Remove OAuth credentials for an MCP server.",
  3090. "summary": "Remove MCP OAuth",
  3091. "x-codeSamples": [
  3092. {
  3093. "lang": "js",
  3094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3095. }
  3096. ]
  3097. }
  3098. },
  3099. "/mcp/{name}/auth/callback": {
  3100. "post": {
  3101. "tags": ["mcp"],
  3102. "operationId": "mcp.auth.callback",
  3103. "parameters": [
  3104. {
  3105. "name": "name",
  3106. "in": "path",
  3107. "schema": {
  3108. "type": "string"
  3109. },
  3110. "required": true
  3111. },
  3112. {
  3113. "name": "directory",
  3114. "in": "query",
  3115. "schema": {
  3116. "type": "string"
  3117. },
  3118. "required": false
  3119. },
  3120. {
  3121. "name": "workspace",
  3122. "in": "query",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": false
  3127. }
  3128. ],
  3129. "responses": {
  3130. "200": {
  3131. "description": "OAuth authentication completed",
  3132. "content": {
  3133. "application/json": {
  3134. "schema": {
  3135. "$ref": "#/components/schemas/MCPStatus"
  3136. }
  3137. }
  3138. }
  3139. },
  3140. "400": {
  3141. "description": "BadRequest | InvalidRequestError",
  3142. "content": {
  3143. "application/json": {
  3144. "schema": {
  3145. "anyOf": [
  3146. {
  3147. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3148. },
  3149. {
  3150. "$ref": "#/components/schemas/InvalidRequestError"
  3151. }
  3152. ]
  3153. }
  3154. }
  3155. }
  3156. },
  3157. "404": {
  3158. "description": "McpServerNotFoundError",
  3159. "content": {
  3160. "application/json": {
  3161. "schema": {
  3162. "$ref": "#/components/schemas/McpServerNotFoundError"
  3163. }
  3164. }
  3165. }
  3166. }
  3167. },
  3168. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3169. "summary": "Complete MCP OAuth",
  3170. "requestBody": {
  3171. "content": {
  3172. "application/json": {
  3173. "schema": {
  3174. "type": "object",
  3175. "properties": {
  3176. "code": {
  3177. "type": "string"
  3178. }
  3179. },
  3180. "required": ["code"],
  3181. "additionalProperties": false
  3182. }
  3183. }
  3184. }
  3185. },
  3186. "x-codeSamples": [
  3187. {
  3188. "lang": "js",
  3189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3190. }
  3191. ]
  3192. }
  3193. },
  3194. "/mcp/{name}/auth/authenticate": {
  3195. "post": {
  3196. "tags": ["mcp"],
  3197. "operationId": "mcp.auth.authenticate",
  3198. "parameters": [
  3199. {
  3200. "name": "name",
  3201. "in": "path",
  3202. "schema": {
  3203. "type": "string"
  3204. },
  3205. "required": true
  3206. },
  3207. {
  3208. "name": "directory",
  3209. "in": "query",
  3210. "schema": {
  3211. "type": "string"
  3212. },
  3213. "required": false
  3214. },
  3215. {
  3216. "name": "workspace",
  3217. "in": "query",
  3218. "schema": {
  3219. "type": "string"
  3220. },
  3221. "required": false
  3222. }
  3223. ],
  3224. "responses": {
  3225. "200": {
  3226. "description": "OAuth authentication completed",
  3227. "content": {
  3228. "application/json": {
  3229. "schema": {
  3230. "$ref": "#/components/schemas/MCPStatus"
  3231. }
  3232. }
  3233. }
  3234. },
  3235. "400": {
  3236. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3237. "content": {
  3238. "application/json": {
  3239. "schema": {
  3240. "anyOf": [
  3241. {
  3242. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3243. },
  3244. {
  3245. "$ref": "#/components/schemas/InvalidRequestError"
  3246. }
  3247. ]
  3248. }
  3249. }
  3250. }
  3251. },
  3252. "404": {
  3253. "description": "McpServerNotFoundError",
  3254. "content": {
  3255. "application/json": {
  3256. "schema": {
  3257. "$ref": "#/components/schemas/McpServerNotFoundError"
  3258. }
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "description": "Start OAuth flow and wait for callback (opens browser).",
  3264. "summary": "Authenticate MCP OAuth",
  3265. "x-codeSamples": [
  3266. {
  3267. "lang": "js",
  3268. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3269. }
  3270. ]
  3271. }
  3272. },
  3273. "/mcp/{name}/connect": {
  3274. "post": {
  3275. "tags": ["mcp"],
  3276. "operationId": "mcp.connect",
  3277. "parameters": [
  3278. {
  3279. "name": "name",
  3280. "in": "path",
  3281. "schema": {
  3282. "type": "string"
  3283. },
  3284. "required": true
  3285. },
  3286. {
  3287. "name": "directory",
  3288. "in": "query",
  3289. "schema": {
  3290. "type": "string"
  3291. },
  3292. "required": false
  3293. },
  3294. {
  3295. "name": "workspace",
  3296. "in": "query",
  3297. "schema": {
  3298. "type": "string"
  3299. },
  3300. "required": false
  3301. }
  3302. ],
  3303. "responses": {
  3304. "200": {
  3305. "description": "MCP server connected successfully",
  3306. "content": {
  3307. "application/json": {
  3308. "schema": {
  3309. "type": "boolean",
  3310. "description": "MCP server connected successfully"
  3311. }
  3312. }
  3313. }
  3314. },
  3315. "400": {
  3316. "description": "Bad request",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/BadRequestError"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "404": {
  3326. "description": "McpServerNotFoundError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "$ref": "#/components/schemas/McpServerNotFoundError"
  3331. }
  3332. }
  3333. }
  3334. }
  3335. },
  3336. "description": "Connect an MCP server.",
  3337. "x-codeSamples": [
  3338. {
  3339. "lang": "js",
  3340. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3341. }
  3342. ]
  3343. }
  3344. },
  3345. "/mcp/{name}/disconnect": {
  3346. "post": {
  3347. "tags": ["mcp"],
  3348. "operationId": "mcp.disconnect",
  3349. "parameters": [
  3350. {
  3351. "name": "name",
  3352. "in": "path",
  3353. "schema": {
  3354. "type": "string"
  3355. },
  3356. "required": true
  3357. },
  3358. {
  3359. "name": "directory",
  3360. "in": "query",
  3361. "schema": {
  3362. "type": "string"
  3363. },
  3364. "required": false
  3365. },
  3366. {
  3367. "name": "workspace",
  3368. "in": "query",
  3369. "schema": {
  3370. "type": "string"
  3371. },
  3372. "required": false
  3373. }
  3374. ],
  3375. "responses": {
  3376. "200": {
  3377. "description": "MCP server disconnected successfully",
  3378. "content": {
  3379. "application/json": {
  3380. "schema": {
  3381. "type": "boolean",
  3382. "description": "MCP server disconnected successfully"
  3383. }
  3384. }
  3385. }
  3386. },
  3387. "400": {
  3388. "description": "Bad request",
  3389. "content": {
  3390. "application/json": {
  3391. "schema": {
  3392. "$ref": "#/components/schemas/BadRequestError"
  3393. }
  3394. }
  3395. }
  3396. },
  3397. "404": {
  3398. "description": "McpServerNotFoundError",
  3399. "content": {
  3400. "application/json": {
  3401. "schema": {
  3402. "$ref": "#/components/schemas/McpServerNotFoundError"
  3403. }
  3404. }
  3405. }
  3406. }
  3407. },
  3408. "description": "Disconnect an MCP server.",
  3409. "x-codeSamples": [
  3410. {
  3411. "lang": "js",
  3412. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3413. }
  3414. ]
  3415. }
  3416. },
  3417. "/project": {
  3418. "get": {
  3419. "tags": ["project"],
  3420. "operationId": "project.list",
  3421. "parameters": [
  3422. {
  3423. "name": "directory",
  3424. "in": "query",
  3425. "schema": {
  3426. "type": "string"
  3427. },
  3428. "required": false
  3429. },
  3430. {
  3431. "name": "workspace",
  3432. "in": "query",
  3433. "schema": {
  3434. "type": "string"
  3435. },
  3436. "required": false
  3437. }
  3438. ],
  3439. "responses": {
  3440. "200": {
  3441. "description": "List of projects",
  3442. "content": {
  3443. "application/json": {
  3444. "schema": {
  3445. "type": "array",
  3446. "items": {
  3447. "$ref": "#/components/schemas/Project"
  3448. },
  3449. "description": "List of projects"
  3450. }
  3451. }
  3452. }
  3453. },
  3454. "400": {
  3455. "description": "Bad request",
  3456. "content": {
  3457. "application/json": {
  3458. "schema": {
  3459. "$ref": "#/components/schemas/BadRequestError"
  3460. }
  3461. }
  3462. }
  3463. }
  3464. },
  3465. "description": "Get a list of projects that have been opened with OpenCode.",
  3466. "summary": "List all projects",
  3467. "x-codeSamples": [
  3468. {
  3469. "lang": "js",
  3470. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3471. }
  3472. ]
  3473. }
  3474. },
  3475. "/project/current": {
  3476. "get": {
  3477. "tags": ["project"],
  3478. "operationId": "project.current",
  3479. "parameters": [
  3480. {
  3481. "name": "directory",
  3482. "in": "query",
  3483. "schema": {
  3484. "type": "string"
  3485. },
  3486. "required": false
  3487. },
  3488. {
  3489. "name": "workspace",
  3490. "in": "query",
  3491. "schema": {
  3492. "type": "string"
  3493. },
  3494. "required": false
  3495. }
  3496. ],
  3497. "responses": {
  3498. "200": {
  3499. "description": "Current project information",
  3500. "content": {
  3501. "application/json": {
  3502. "schema": {
  3503. "$ref": "#/components/schemas/Project"
  3504. }
  3505. }
  3506. }
  3507. },
  3508. "400": {
  3509. "description": "Bad request",
  3510. "content": {
  3511. "application/json": {
  3512. "schema": {
  3513. "$ref": "#/components/schemas/BadRequestError"
  3514. }
  3515. }
  3516. }
  3517. }
  3518. },
  3519. "description": "Retrieve the currently active project that OpenCode is working with.",
  3520. "summary": "Get current project",
  3521. "x-codeSamples": [
  3522. {
  3523. "lang": "js",
  3524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3525. }
  3526. ]
  3527. }
  3528. },
  3529. "/project/git/init": {
  3530. "post": {
  3531. "tags": ["project"],
  3532. "operationId": "project.initGit",
  3533. "parameters": [
  3534. {
  3535. "name": "directory",
  3536. "in": "query",
  3537. "schema": {
  3538. "type": "string"
  3539. },
  3540. "required": false
  3541. },
  3542. {
  3543. "name": "workspace",
  3544. "in": "query",
  3545. "schema": {
  3546. "type": "string"
  3547. },
  3548. "required": false
  3549. }
  3550. ],
  3551. "responses": {
  3552. "200": {
  3553. "description": "Project information after git initialization",
  3554. "content": {
  3555. "application/json": {
  3556. "schema": {
  3557. "$ref": "#/components/schemas/Project"
  3558. }
  3559. }
  3560. }
  3561. },
  3562. "400": {
  3563. "description": "Bad request",
  3564. "content": {
  3565. "application/json": {
  3566. "schema": {
  3567. "$ref": "#/components/schemas/BadRequestError"
  3568. }
  3569. }
  3570. }
  3571. }
  3572. },
  3573. "description": "Create a git repository for the current project and return the refreshed project info.",
  3574. "summary": "Initialize git repository",
  3575. "x-codeSamples": [
  3576. {
  3577. "lang": "js",
  3578. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3579. }
  3580. ]
  3581. }
  3582. },
  3583. "/project/{projectID}": {
  3584. "patch": {
  3585. "tags": ["project"],
  3586. "operationId": "project.update",
  3587. "parameters": [
  3588. {
  3589. "name": "projectID",
  3590. "in": "path",
  3591. "schema": {
  3592. "type": "string"
  3593. },
  3594. "required": true
  3595. },
  3596. {
  3597. "name": "directory",
  3598. "in": "query",
  3599. "schema": {
  3600. "type": "string"
  3601. },
  3602. "required": false
  3603. },
  3604. {
  3605. "name": "workspace",
  3606. "in": "query",
  3607. "schema": {
  3608. "type": "string"
  3609. },
  3610. "required": false
  3611. }
  3612. ],
  3613. "responses": {
  3614. "200": {
  3615. "description": "Updated project information",
  3616. "content": {
  3617. "application/json": {
  3618. "schema": {
  3619. "$ref": "#/components/schemas/Project"
  3620. }
  3621. }
  3622. }
  3623. },
  3624. "400": {
  3625. "description": "BadRequest | InvalidRequestError",
  3626. "content": {
  3627. "application/json": {
  3628. "schema": {
  3629. "anyOf": [
  3630. {
  3631. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3632. },
  3633. {
  3634. "$ref": "#/components/schemas/InvalidRequestError"
  3635. }
  3636. ]
  3637. }
  3638. }
  3639. }
  3640. },
  3641. "404": {
  3642. "description": "ProjectNotFoundError",
  3643. "content": {
  3644. "application/json": {
  3645. "schema": {
  3646. "$ref": "#/components/schemas/ProjectNotFoundError"
  3647. }
  3648. }
  3649. }
  3650. }
  3651. },
  3652. "description": "Update project properties such as name, icon, and commands.",
  3653. "summary": "Update project",
  3654. "requestBody": {
  3655. "content": {
  3656. "application/json": {
  3657. "schema": {
  3658. "type": "object",
  3659. "properties": {
  3660. "name": {
  3661. "type": "string"
  3662. },
  3663. "icon": {
  3664. "type": "object",
  3665. "properties": {
  3666. "url": {
  3667. "type": "string"
  3668. },
  3669. "override": {
  3670. "type": "string"
  3671. },
  3672. "color": {
  3673. "type": "string"
  3674. }
  3675. },
  3676. "additionalProperties": false
  3677. },
  3678. "commands": {
  3679. "type": "object",
  3680. "properties": {
  3681. "start": {
  3682. "type": "string",
  3683. "description": "Startup script to run when creating a new workspace (worktree)"
  3684. }
  3685. },
  3686. "additionalProperties": false
  3687. }
  3688. },
  3689. "additionalProperties": false
  3690. }
  3691. }
  3692. }
  3693. },
  3694. "x-codeSamples": [
  3695. {
  3696. "lang": "js",
  3697. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3698. }
  3699. ]
  3700. }
  3701. },
  3702. "/pty/shells": {
  3703. "get": {
  3704. "tags": ["pty"],
  3705. "operationId": "pty.shells",
  3706. "parameters": [
  3707. {
  3708. "name": "directory",
  3709. "in": "query",
  3710. "schema": {
  3711. "type": "string"
  3712. },
  3713. "required": false
  3714. },
  3715. {
  3716. "name": "workspace",
  3717. "in": "query",
  3718. "schema": {
  3719. "type": "string"
  3720. },
  3721. "required": false
  3722. }
  3723. ],
  3724. "responses": {
  3725. "200": {
  3726. "description": "List of shells",
  3727. "content": {
  3728. "application/json": {
  3729. "schema": {
  3730. "type": "array",
  3731. "items": {
  3732. "type": "object",
  3733. "properties": {
  3734. "path": {
  3735. "type": "string"
  3736. },
  3737. "name": {
  3738. "type": "string"
  3739. },
  3740. "acceptable": {
  3741. "type": "boolean"
  3742. }
  3743. },
  3744. "required": ["path", "name", "acceptable"],
  3745. "additionalProperties": false
  3746. },
  3747. "description": "List of shells"
  3748. }
  3749. }
  3750. }
  3751. },
  3752. "400": {
  3753. "description": "Bad request",
  3754. "content": {
  3755. "application/json": {
  3756. "schema": {
  3757. "$ref": "#/components/schemas/BadRequestError"
  3758. }
  3759. }
  3760. }
  3761. }
  3762. },
  3763. "description": "Get a list of available shells on the system.",
  3764. "summary": "List available shells",
  3765. "x-codeSamples": [
  3766. {
  3767. "lang": "js",
  3768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3769. }
  3770. ]
  3771. }
  3772. },
  3773. "/pty": {
  3774. "get": {
  3775. "tags": ["pty"],
  3776. "operationId": "pty.list",
  3777. "parameters": [
  3778. {
  3779. "name": "directory",
  3780. "in": "query",
  3781. "schema": {
  3782. "type": "string"
  3783. },
  3784. "required": false
  3785. },
  3786. {
  3787. "name": "workspace",
  3788. "in": "query",
  3789. "schema": {
  3790. "type": "string"
  3791. },
  3792. "required": false
  3793. }
  3794. ],
  3795. "responses": {
  3796. "200": {
  3797. "description": "List of sessions",
  3798. "content": {
  3799. "application/json": {
  3800. "schema": {
  3801. "type": "array",
  3802. "items": {
  3803. "$ref": "#/components/schemas/Pty"
  3804. },
  3805. "description": "List of sessions"
  3806. }
  3807. }
  3808. }
  3809. },
  3810. "400": {
  3811. "description": "Bad request",
  3812. "content": {
  3813. "application/json": {
  3814. "schema": {
  3815. "$ref": "#/components/schemas/BadRequestError"
  3816. }
  3817. }
  3818. }
  3819. }
  3820. },
  3821. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3822. "summary": "List PTY sessions",
  3823. "x-codeSamples": [
  3824. {
  3825. "lang": "js",
  3826. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3827. }
  3828. ]
  3829. },
  3830. "post": {
  3831. "tags": ["pty"],
  3832. "operationId": "pty.create",
  3833. "parameters": [
  3834. {
  3835. "name": "directory",
  3836. "in": "query",
  3837. "schema": {
  3838. "type": "string"
  3839. },
  3840. "required": false
  3841. },
  3842. {
  3843. "name": "workspace",
  3844. "in": "query",
  3845. "schema": {
  3846. "type": "string"
  3847. },
  3848. "required": false
  3849. }
  3850. ],
  3851. "responses": {
  3852. "200": {
  3853. "description": "Created session",
  3854. "content": {
  3855. "application/json": {
  3856. "schema": {
  3857. "$ref": "#/components/schemas/Pty"
  3858. }
  3859. }
  3860. }
  3861. },
  3862. "400": {
  3863. "description": "BadRequest | InvalidRequestError",
  3864. "content": {
  3865. "application/json": {
  3866. "schema": {
  3867. "anyOf": [
  3868. {
  3869. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3870. },
  3871. {
  3872. "$ref": "#/components/schemas/InvalidRequestError"
  3873. }
  3874. ]
  3875. }
  3876. }
  3877. }
  3878. }
  3879. },
  3880. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3881. "summary": "Create PTY session",
  3882. "requestBody": {
  3883. "content": {
  3884. "application/json": {
  3885. "schema": {
  3886. "type": "object",
  3887. "properties": {
  3888. "command": {
  3889. "type": "string"
  3890. },
  3891. "args": {
  3892. "type": "array",
  3893. "items": {
  3894. "type": "string"
  3895. }
  3896. },
  3897. "cwd": {
  3898. "type": "string"
  3899. },
  3900. "title": {
  3901. "type": "string"
  3902. },
  3903. "env": {
  3904. "type": "object",
  3905. "additionalProperties": {
  3906. "type": "string"
  3907. }
  3908. }
  3909. },
  3910. "additionalProperties": false
  3911. }
  3912. }
  3913. }
  3914. },
  3915. "x-codeSamples": [
  3916. {
  3917. "lang": "js",
  3918. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3919. }
  3920. ]
  3921. }
  3922. },
  3923. "/pty/{ptyID}": {
  3924. "get": {
  3925. "tags": ["pty"],
  3926. "operationId": "pty.get",
  3927. "parameters": [
  3928. {
  3929. "name": "ptyID",
  3930. "in": "path",
  3931. "schema": {
  3932. "type": "string",
  3933. "pattern": "^pty"
  3934. },
  3935. "required": true
  3936. },
  3937. {
  3938. "name": "directory",
  3939. "in": "query",
  3940. "schema": {
  3941. "type": "string"
  3942. },
  3943. "required": false
  3944. },
  3945. {
  3946. "name": "workspace",
  3947. "in": "query",
  3948. "schema": {
  3949. "type": "string"
  3950. },
  3951. "required": false
  3952. }
  3953. ],
  3954. "responses": {
  3955. "200": {
  3956. "description": "Session info",
  3957. "content": {
  3958. "application/json": {
  3959. "schema": {
  3960. "$ref": "#/components/schemas/Pty"
  3961. }
  3962. }
  3963. }
  3964. },
  3965. "400": {
  3966. "description": "Bad request",
  3967. "content": {
  3968. "application/json": {
  3969. "schema": {
  3970. "$ref": "#/components/schemas/BadRequestError"
  3971. }
  3972. }
  3973. }
  3974. },
  3975. "404": {
  3976. "description": "PtyNotFoundError",
  3977. "content": {
  3978. "application/json": {
  3979. "schema": {
  3980. "$ref": "#/components/schemas/PtyNotFoundError"
  3981. }
  3982. }
  3983. }
  3984. }
  3985. },
  3986. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3987. "summary": "Get PTY session",
  3988. "x-codeSamples": [
  3989. {
  3990. "lang": "js",
  3991. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3992. }
  3993. ]
  3994. },
  3995. "put": {
  3996. "tags": ["pty"],
  3997. "operationId": "pty.update",
  3998. "parameters": [
  3999. {
  4000. "name": "ptyID",
  4001. "in": "path",
  4002. "schema": {
  4003. "type": "string",
  4004. "pattern": "^pty"
  4005. },
  4006. "required": true
  4007. },
  4008. {
  4009. "name": "directory",
  4010. "in": "query",
  4011. "schema": {
  4012. "type": "string"
  4013. },
  4014. "required": false
  4015. },
  4016. {
  4017. "name": "workspace",
  4018. "in": "query",
  4019. "schema": {
  4020. "type": "string"
  4021. },
  4022. "required": false
  4023. }
  4024. ],
  4025. "responses": {
  4026. "200": {
  4027. "description": "Updated session",
  4028. "content": {
  4029. "application/json": {
  4030. "schema": {
  4031. "$ref": "#/components/schemas/Pty"
  4032. }
  4033. }
  4034. }
  4035. },
  4036. "400": {
  4037. "description": "BadRequest | InvalidRequestError",
  4038. "content": {
  4039. "application/json": {
  4040. "schema": {
  4041. "anyOf": [
  4042. {
  4043. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4044. },
  4045. {
  4046. "$ref": "#/components/schemas/InvalidRequestError"
  4047. }
  4048. ]
  4049. }
  4050. }
  4051. }
  4052. },
  4053. "404": {
  4054. "description": "PtyNotFoundError",
  4055. "content": {
  4056. "application/json": {
  4057. "schema": {
  4058. "$ref": "#/components/schemas/PtyNotFoundError"
  4059. }
  4060. }
  4061. }
  4062. }
  4063. },
  4064. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4065. "summary": "Update PTY session",
  4066. "requestBody": {
  4067. "content": {
  4068. "application/json": {
  4069. "schema": {
  4070. "type": "object",
  4071. "properties": {
  4072. "title": {
  4073. "type": "string"
  4074. },
  4075. "size": {
  4076. "type": "object",
  4077. "properties": {
  4078. "rows": {
  4079. "type": "integer",
  4080. "exclusiveMinimum": 0
  4081. },
  4082. "cols": {
  4083. "type": "integer",
  4084. "exclusiveMinimum": 0
  4085. }
  4086. },
  4087. "required": ["rows", "cols"],
  4088. "additionalProperties": false
  4089. }
  4090. },
  4091. "additionalProperties": false
  4092. }
  4093. }
  4094. }
  4095. },
  4096. "x-codeSamples": [
  4097. {
  4098. "lang": "js",
  4099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4100. }
  4101. ]
  4102. },
  4103. "delete": {
  4104. "tags": ["pty"],
  4105. "operationId": "pty.remove",
  4106. "parameters": [
  4107. {
  4108. "name": "ptyID",
  4109. "in": "path",
  4110. "schema": {
  4111. "type": "string",
  4112. "pattern": "^pty"
  4113. },
  4114. "required": true
  4115. },
  4116. {
  4117. "name": "directory",
  4118. "in": "query",
  4119. "schema": {
  4120. "type": "string"
  4121. },
  4122. "required": false
  4123. },
  4124. {
  4125. "name": "workspace",
  4126. "in": "query",
  4127. "schema": {
  4128. "type": "string"
  4129. },
  4130. "required": false
  4131. }
  4132. ],
  4133. "responses": {
  4134. "200": {
  4135. "description": "Session removed",
  4136. "content": {
  4137. "application/json": {
  4138. "schema": {
  4139. "type": "boolean",
  4140. "description": "Session removed"
  4141. }
  4142. }
  4143. }
  4144. },
  4145. "400": {
  4146. "description": "Bad request",
  4147. "content": {
  4148. "application/json": {
  4149. "schema": {
  4150. "$ref": "#/components/schemas/BadRequestError"
  4151. }
  4152. }
  4153. }
  4154. },
  4155. "404": {
  4156. "description": "PtyNotFoundError",
  4157. "content": {
  4158. "application/json": {
  4159. "schema": {
  4160. "$ref": "#/components/schemas/PtyNotFoundError"
  4161. }
  4162. }
  4163. }
  4164. }
  4165. },
  4166. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4167. "summary": "Remove PTY session",
  4168. "x-codeSamples": [
  4169. {
  4170. "lang": "js",
  4171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4172. }
  4173. ]
  4174. }
  4175. },
  4176. "/pty/{ptyID}/connect-token": {
  4177. "post": {
  4178. "tags": ["pty"],
  4179. "operationId": "pty.connectToken",
  4180. "parameters": [
  4181. {
  4182. "name": "ptyID",
  4183. "in": "path",
  4184. "schema": {
  4185. "type": "string",
  4186. "pattern": "^pty"
  4187. },
  4188. "required": true
  4189. },
  4190. {
  4191. "name": "directory",
  4192. "in": "query",
  4193. "schema": {
  4194. "type": "string"
  4195. },
  4196. "required": false
  4197. },
  4198. {
  4199. "name": "workspace",
  4200. "in": "query",
  4201. "schema": {
  4202. "type": "string"
  4203. },
  4204. "required": false
  4205. }
  4206. ],
  4207. "responses": {
  4208. "200": {
  4209. "description": "WebSocket connect token",
  4210. "content": {
  4211. "application/json": {
  4212. "schema": {
  4213. "type": "object",
  4214. "properties": {
  4215. "ticket": {
  4216. "type": "string"
  4217. },
  4218. "expires_in": {
  4219. "type": "integer",
  4220. "exclusiveMinimum": 0
  4221. }
  4222. },
  4223. "required": ["ticket", "expires_in"],
  4224. "additionalProperties": false,
  4225. "description": "WebSocket connect token"
  4226. }
  4227. }
  4228. }
  4229. },
  4230. "400": {
  4231. "description": "Bad request",
  4232. "content": {
  4233. "application/json": {
  4234. "schema": {
  4235. "$ref": "#/components/schemas/BadRequestError"
  4236. }
  4237. }
  4238. }
  4239. },
  4240. "403": {
  4241. "description": "PtyForbiddenError",
  4242. "content": {
  4243. "application/json": {
  4244. "schema": {
  4245. "$ref": "#/components/schemas/PtyForbiddenError"
  4246. }
  4247. }
  4248. }
  4249. },
  4250. "404": {
  4251. "description": "PtyNotFoundError",
  4252. "content": {
  4253. "application/json": {
  4254. "schema": {
  4255. "$ref": "#/components/schemas/PtyNotFoundError"
  4256. }
  4257. }
  4258. }
  4259. }
  4260. },
  4261. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4262. "summary": "Create PTY WebSocket token",
  4263. "x-codeSamples": [
  4264. {
  4265. "lang": "js",
  4266. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4267. }
  4268. ]
  4269. }
  4270. },
  4271. "/question": {
  4272. "get": {
  4273. "tags": ["question"],
  4274. "operationId": "question.list",
  4275. "parameters": [
  4276. {
  4277. "name": "directory",
  4278. "in": "query",
  4279. "schema": {
  4280. "type": "string"
  4281. },
  4282. "required": false
  4283. },
  4284. {
  4285. "name": "workspace",
  4286. "in": "query",
  4287. "schema": {
  4288. "type": "string"
  4289. },
  4290. "required": false
  4291. }
  4292. ],
  4293. "responses": {
  4294. "200": {
  4295. "description": "List of pending questions",
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "array",
  4300. "items": {
  4301. "$ref": "#/components/schemas/QuestionRequest"
  4302. },
  4303. "description": "List of pending questions"
  4304. }
  4305. }
  4306. }
  4307. },
  4308. "400": {
  4309. "description": "Bad request",
  4310. "content": {
  4311. "application/json": {
  4312. "schema": {
  4313. "$ref": "#/components/schemas/BadRequestError"
  4314. }
  4315. }
  4316. }
  4317. }
  4318. },
  4319. "description": "Get all pending question requests across all sessions.",
  4320. "summary": "List pending questions",
  4321. "x-codeSamples": [
  4322. {
  4323. "lang": "js",
  4324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4325. }
  4326. ]
  4327. }
  4328. },
  4329. "/question/{requestID}/reply": {
  4330. "post": {
  4331. "tags": ["question"],
  4332. "operationId": "question.reply",
  4333. "parameters": [
  4334. {
  4335. "name": "requestID",
  4336. "in": "path",
  4337. "schema": {
  4338. "type": "string",
  4339. "pattern": "^que"
  4340. },
  4341. "required": true
  4342. },
  4343. {
  4344. "name": "directory",
  4345. "in": "query",
  4346. "schema": {
  4347. "type": "string"
  4348. },
  4349. "required": false
  4350. },
  4351. {
  4352. "name": "workspace",
  4353. "in": "query",
  4354. "schema": {
  4355. "type": "string"
  4356. },
  4357. "required": false
  4358. }
  4359. ],
  4360. "responses": {
  4361. "200": {
  4362. "description": "Question answered successfully",
  4363. "content": {
  4364. "application/json": {
  4365. "schema": {
  4366. "type": "boolean",
  4367. "description": "Question answered successfully"
  4368. }
  4369. }
  4370. }
  4371. },
  4372. "400": {
  4373. "description": "BadRequest | InvalidRequestError",
  4374. "content": {
  4375. "application/json": {
  4376. "schema": {
  4377. "anyOf": [
  4378. {
  4379. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4380. },
  4381. {
  4382. "$ref": "#/components/schemas/InvalidRequestError"
  4383. }
  4384. ]
  4385. }
  4386. }
  4387. }
  4388. },
  4389. "404": {
  4390. "description": "QuestionNotFoundError",
  4391. "content": {
  4392. "application/json": {
  4393. "schema": {
  4394. "$ref": "#/components/schemas/QuestionNotFoundError"
  4395. }
  4396. }
  4397. }
  4398. }
  4399. },
  4400. "description": "Provide answers to a question request from the AI assistant.",
  4401. "summary": "Reply to question request",
  4402. "requestBody": {
  4403. "content": {
  4404. "application/json": {
  4405. "schema": {
  4406. "type": "object",
  4407. "properties": {
  4408. "answers": {
  4409. "type": "array",
  4410. "items": {
  4411. "$ref": "#/components/schemas/QuestionAnswer"
  4412. },
  4413. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4414. }
  4415. },
  4416. "required": ["answers"],
  4417. "additionalProperties": false
  4418. }
  4419. }
  4420. }
  4421. },
  4422. "x-codeSamples": [
  4423. {
  4424. "lang": "js",
  4425. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4426. }
  4427. ]
  4428. }
  4429. },
  4430. "/question/{requestID}/reject": {
  4431. "post": {
  4432. "tags": ["question"],
  4433. "operationId": "question.reject",
  4434. "parameters": [
  4435. {
  4436. "name": "requestID",
  4437. "in": "path",
  4438. "schema": {
  4439. "type": "string",
  4440. "pattern": "^que"
  4441. },
  4442. "required": true
  4443. },
  4444. {
  4445. "name": "directory",
  4446. "in": "query",
  4447. "schema": {
  4448. "type": "string"
  4449. },
  4450. "required": false
  4451. },
  4452. {
  4453. "name": "workspace",
  4454. "in": "query",
  4455. "schema": {
  4456. "type": "string"
  4457. },
  4458. "required": false
  4459. }
  4460. ],
  4461. "responses": {
  4462. "200": {
  4463. "description": "Question rejected successfully",
  4464. "content": {
  4465. "application/json": {
  4466. "schema": {
  4467. "type": "boolean",
  4468. "description": "Question rejected successfully"
  4469. }
  4470. }
  4471. }
  4472. },
  4473. "400": {
  4474. "description": "BadRequest | InvalidRequestError",
  4475. "content": {
  4476. "application/json": {
  4477. "schema": {
  4478. "anyOf": [
  4479. {
  4480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4481. },
  4482. {
  4483. "$ref": "#/components/schemas/InvalidRequestError"
  4484. }
  4485. ]
  4486. }
  4487. }
  4488. }
  4489. },
  4490. "404": {
  4491. "description": "QuestionNotFoundError",
  4492. "content": {
  4493. "application/json": {
  4494. "schema": {
  4495. "$ref": "#/components/schemas/QuestionNotFoundError"
  4496. }
  4497. }
  4498. }
  4499. }
  4500. },
  4501. "description": "Reject a question request from the AI assistant.",
  4502. "summary": "Reject question request",
  4503. "x-codeSamples": [
  4504. {
  4505. "lang": "js",
  4506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4507. }
  4508. ]
  4509. }
  4510. },
  4511. "/permission": {
  4512. "get": {
  4513. "tags": ["permission"],
  4514. "operationId": "permission.list",
  4515. "parameters": [
  4516. {
  4517. "name": "directory",
  4518. "in": "query",
  4519. "schema": {
  4520. "type": "string"
  4521. },
  4522. "required": false
  4523. },
  4524. {
  4525. "name": "workspace",
  4526. "in": "query",
  4527. "schema": {
  4528. "type": "string"
  4529. },
  4530. "required": false
  4531. }
  4532. ],
  4533. "responses": {
  4534. "200": {
  4535. "description": "List of pending permissions",
  4536. "content": {
  4537. "application/json": {
  4538. "schema": {
  4539. "type": "array",
  4540. "items": {
  4541. "$ref": "#/components/schemas/PermissionRequest"
  4542. },
  4543. "description": "List of pending permissions"
  4544. }
  4545. }
  4546. }
  4547. },
  4548. "400": {
  4549. "description": "Bad request",
  4550. "content": {
  4551. "application/json": {
  4552. "schema": {
  4553. "$ref": "#/components/schemas/BadRequestError"
  4554. }
  4555. }
  4556. }
  4557. }
  4558. },
  4559. "description": "Get all pending permission requests across all sessions.",
  4560. "summary": "List pending permissions",
  4561. "x-codeSamples": [
  4562. {
  4563. "lang": "js",
  4564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4565. }
  4566. ]
  4567. }
  4568. },
  4569. "/permission/{requestID}/reply": {
  4570. "post": {
  4571. "tags": ["permission"],
  4572. "operationId": "permission.reply",
  4573. "parameters": [
  4574. {
  4575. "name": "requestID",
  4576. "in": "path",
  4577. "schema": {
  4578. "type": "string",
  4579. "pattern": "^per"
  4580. },
  4581. "required": true
  4582. },
  4583. {
  4584. "name": "directory",
  4585. "in": "query",
  4586. "schema": {
  4587. "type": "string"
  4588. },
  4589. "required": false
  4590. },
  4591. {
  4592. "name": "workspace",
  4593. "in": "query",
  4594. "schema": {
  4595. "type": "string"
  4596. },
  4597. "required": false
  4598. }
  4599. ],
  4600. "responses": {
  4601. "200": {
  4602. "description": "Permission processed successfully",
  4603. "content": {
  4604. "application/json": {
  4605. "schema": {
  4606. "type": "boolean",
  4607. "description": "Permission processed successfully"
  4608. }
  4609. }
  4610. }
  4611. },
  4612. "400": {
  4613. "description": "BadRequest | InvalidRequestError",
  4614. "content": {
  4615. "application/json": {
  4616. "schema": {
  4617. "anyOf": [
  4618. {
  4619. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4620. },
  4621. {
  4622. "$ref": "#/components/schemas/InvalidRequestError"
  4623. }
  4624. ]
  4625. }
  4626. }
  4627. }
  4628. },
  4629. "404": {
  4630. "description": "PermissionNotFoundError",
  4631. "content": {
  4632. "application/json": {
  4633. "schema": {
  4634. "$ref": "#/components/schemas/PermissionNotFoundError"
  4635. }
  4636. }
  4637. }
  4638. }
  4639. },
  4640. "description": "Approve or deny a permission request from the AI assistant.",
  4641. "summary": "Respond to permission request",
  4642. "requestBody": {
  4643. "content": {
  4644. "application/json": {
  4645. "schema": {
  4646. "type": "object",
  4647. "properties": {
  4648. "reply": {
  4649. "type": "string",
  4650. "enum": ["once", "always", "reject"]
  4651. },
  4652. "message": {
  4653. "type": "string"
  4654. }
  4655. },
  4656. "required": ["reply"],
  4657. "additionalProperties": false
  4658. }
  4659. }
  4660. }
  4661. },
  4662. "x-codeSamples": [
  4663. {
  4664. "lang": "js",
  4665. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4666. }
  4667. ]
  4668. }
  4669. },
  4670. "/provider": {
  4671. "get": {
  4672. "tags": ["provider"],
  4673. "operationId": "provider.list",
  4674. "parameters": [
  4675. {
  4676. "name": "directory",
  4677. "in": "query",
  4678. "schema": {
  4679. "type": "string"
  4680. },
  4681. "required": false
  4682. },
  4683. {
  4684. "name": "workspace",
  4685. "in": "query",
  4686. "schema": {
  4687. "type": "string"
  4688. },
  4689. "required": false
  4690. }
  4691. ],
  4692. "responses": {
  4693. "200": {
  4694. "description": "List of providers",
  4695. "content": {
  4696. "application/json": {
  4697. "schema": {
  4698. "type": "object",
  4699. "properties": {
  4700. "all": {
  4701. "type": "array",
  4702. "items": {
  4703. "$ref": "#/components/schemas/Provider"
  4704. }
  4705. },
  4706. "default": {
  4707. "type": "object",
  4708. "additionalProperties": {
  4709. "type": "string"
  4710. }
  4711. },
  4712. "connected": {
  4713. "type": "array",
  4714. "items": {
  4715. "type": "string"
  4716. }
  4717. }
  4718. },
  4719. "required": ["all", "default", "connected"],
  4720. "additionalProperties": false,
  4721. "description": "List of providers"
  4722. }
  4723. }
  4724. }
  4725. },
  4726. "400": {
  4727. "description": "Bad request",
  4728. "content": {
  4729. "application/json": {
  4730. "schema": {
  4731. "$ref": "#/components/schemas/BadRequestError"
  4732. }
  4733. }
  4734. }
  4735. }
  4736. },
  4737. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4738. "summary": "List providers",
  4739. "x-codeSamples": [
  4740. {
  4741. "lang": "js",
  4742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4743. }
  4744. ]
  4745. }
  4746. },
  4747. "/provider/auth": {
  4748. "get": {
  4749. "tags": ["provider"],
  4750. "operationId": "provider.auth",
  4751. "parameters": [
  4752. {
  4753. "name": "directory",
  4754. "in": "query",
  4755. "schema": {
  4756. "type": "string"
  4757. },
  4758. "required": false
  4759. },
  4760. {
  4761. "name": "workspace",
  4762. "in": "query",
  4763. "schema": {
  4764. "type": "string"
  4765. },
  4766. "required": false
  4767. }
  4768. ],
  4769. "responses": {
  4770. "200": {
  4771. "description": "Provider auth methods",
  4772. "content": {
  4773. "application/json": {
  4774. "schema": {
  4775. "type": "object",
  4776. "additionalProperties": {
  4777. "type": "array",
  4778. "items": {
  4779. "$ref": "#/components/schemas/ProviderAuthMethod"
  4780. }
  4781. },
  4782. "description": "Provider auth methods"
  4783. }
  4784. }
  4785. }
  4786. },
  4787. "400": {
  4788. "description": "Bad request",
  4789. "content": {
  4790. "application/json": {
  4791. "schema": {
  4792. "$ref": "#/components/schemas/BadRequestError"
  4793. }
  4794. }
  4795. }
  4796. }
  4797. },
  4798. "description": "Retrieve available authentication methods for all AI providers.",
  4799. "summary": "Get provider auth methods",
  4800. "x-codeSamples": [
  4801. {
  4802. "lang": "js",
  4803. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4804. }
  4805. ]
  4806. }
  4807. },
  4808. "/provider/{providerID}/oauth/authorize": {
  4809. "post": {
  4810. "tags": ["provider"],
  4811. "operationId": "provider.oauth.authorize",
  4812. "parameters": [
  4813. {
  4814. "name": "providerID",
  4815. "in": "path",
  4816. "schema": {
  4817. "type": "string"
  4818. },
  4819. "required": true
  4820. },
  4821. {
  4822. "name": "directory",
  4823. "in": "query",
  4824. "schema": {
  4825. "type": "string"
  4826. },
  4827. "required": false
  4828. },
  4829. {
  4830. "name": "workspace",
  4831. "in": "query",
  4832. "schema": {
  4833. "type": "string"
  4834. },
  4835. "required": false
  4836. }
  4837. ],
  4838. "responses": {
  4839. "200": {
  4840. "description": "Authorization URL and method",
  4841. "content": {
  4842. "application/json": {
  4843. "schema": {
  4844. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4845. }
  4846. }
  4847. }
  4848. },
  4849. "400": {
  4850. "description": "ProviderAuthError | InvalidRequestError",
  4851. "content": {
  4852. "application/json": {
  4853. "schema": {
  4854. "anyOf": [
  4855. {
  4856. "$ref": "#/components/schemas/ProviderAuthError1"
  4857. },
  4858. {
  4859. "$ref": "#/components/schemas/InvalidRequestError"
  4860. }
  4861. ]
  4862. }
  4863. }
  4864. }
  4865. }
  4866. },
  4867. "description": "Start the OAuth authorization flow for a provider.",
  4868. "summary": "Start OAuth authorization",
  4869. "requestBody": {
  4870. "content": {
  4871. "application/json": {
  4872. "schema": {
  4873. "type": "object",
  4874. "properties": {
  4875. "method": {
  4876. "type": "number",
  4877. "description": "Auth method index"
  4878. },
  4879. "inputs": {
  4880. "type": "object",
  4881. "additionalProperties": {
  4882. "type": "string"
  4883. }
  4884. }
  4885. },
  4886. "required": ["method"],
  4887. "additionalProperties": false
  4888. }
  4889. }
  4890. }
  4891. },
  4892. "x-codeSamples": [
  4893. {
  4894. "lang": "js",
  4895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4896. }
  4897. ]
  4898. }
  4899. },
  4900. "/provider/{providerID}/oauth/callback": {
  4901. "post": {
  4902. "tags": ["provider"],
  4903. "operationId": "provider.oauth.callback",
  4904. "parameters": [
  4905. {
  4906. "name": "providerID",
  4907. "in": "path",
  4908. "schema": {
  4909. "type": "string"
  4910. },
  4911. "required": true
  4912. },
  4913. {
  4914. "name": "directory",
  4915. "in": "query",
  4916. "schema": {
  4917. "type": "string"
  4918. },
  4919. "required": false
  4920. },
  4921. {
  4922. "name": "workspace",
  4923. "in": "query",
  4924. "schema": {
  4925. "type": "string"
  4926. },
  4927. "required": false
  4928. }
  4929. ],
  4930. "responses": {
  4931. "200": {
  4932. "description": "OAuth callback processed successfully",
  4933. "content": {
  4934. "application/json": {
  4935. "schema": {
  4936. "type": "boolean",
  4937. "description": "OAuth callback processed successfully"
  4938. }
  4939. }
  4940. }
  4941. },
  4942. "400": {
  4943. "description": "ProviderAuthError | InvalidRequestError",
  4944. "content": {
  4945. "application/json": {
  4946. "schema": {
  4947. "anyOf": [
  4948. {
  4949. "$ref": "#/components/schemas/ProviderAuthError1"
  4950. },
  4951. {
  4952. "$ref": "#/components/schemas/InvalidRequestError"
  4953. }
  4954. ]
  4955. }
  4956. }
  4957. }
  4958. }
  4959. },
  4960. "description": "Handle the OAuth callback from a provider after user authorization.",
  4961. "summary": "Handle OAuth callback",
  4962. "requestBody": {
  4963. "content": {
  4964. "application/json": {
  4965. "schema": {
  4966. "type": "object",
  4967. "properties": {
  4968. "method": {
  4969. "type": "number",
  4970. "description": "Auth method index"
  4971. },
  4972. "code": {
  4973. "type": "string"
  4974. }
  4975. },
  4976. "required": ["method"],
  4977. "additionalProperties": false
  4978. }
  4979. }
  4980. }
  4981. },
  4982. "x-codeSamples": [
  4983. {
  4984. "lang": "js",
  4985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4986. }
  4987. ]
  4988. }
  4989. },
  4990. "/session": {
  4991. "get": {
  4992. "tags": ["session"],
  4993. "operationId": "session.list",
  4994. "parameters": [
  4995. {
  4996. "name": "directory",
  4997. "in": "query",
  4998. "schema": {
  4999. "type": "string"
  5000. },
  5001. "required": false
  5002. },
  5003. {
  5004. "name": "workspace",
  5005. "in": "query",
  5006. "schema": {
  5007. "type": "string"
  5008. },
  5009. "required": false
  5010. },
  5011. {
  5012. "name": "scope",
  5013. "in": "query",
  5014. "schema": {
  5015. "type": "string",
  5016. "enum": ["project"]
  5017. },
  5018. "required": false
  5019. },
  5020. {
  5021. "name": "path",
  5022. "in": "query",
  5023. "schema": {
  5024. "type": "string"
  5025. },
  5026. "required": false
  5027. },
  5028. {
  5029. "name": "roots",
  5030. "in": "query",
  5031. "schema": {
  5032. "anyOf": [
  5033. {
  5034. "type": "boolean"
  5035. },
  5036. {
  5037. "type": "string",
  5038. "enum": ["true", "false"]
  5039. }
  5040. ]
  5041. },
  5042. "required": false
  5043. },
  5044. {
  5045. "name": "start",
  5046. "in": "query",
  5047. "schema": {
  5048. "type": "number"
  5049. },
  5050. "required": false
  5051. },
  5052. {
  5053. "name": "search",
  5054. "in": "query",
  5055. "schema": {
  5056. "type": "string"
  5057. },
  5058. "required": false
  5059. },
  5060. {
  5061. "name": "limit",
  5062. "in": "query",
  5063. "schema": {
  5064. "type": "number"
  5065. },
  5066. "required": false
  5067. }
  5068. ],
  5069. "responses": {
  5070. "200": {
  5071. "description": "List of sessions",
  5072. "content": {
  5073. "application/json": {
  5074. "schema": {
  5075. "type": "array",
  5076. "items": {
  5077. "$ref": "#/components/schemas/Session"
  5078. },
  5079. "description": "List of sessions"
  5080. }
  5081. }
  5082. }
  5083. },
  5084. "400": {
  5085. "description": "Bad request",
  5086. "content": {
  5087. "application/json": {
  5088. "schema": {
  5089. "$ref": "#/components/schemas/BadRequestError"
  5090. }
  5091. }
  5092. }
  5093. }
  5094. },
  5095. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5096. "summary": "List sessions",
  5097. "x-codeSamples": [
  5098. {
  5099. "lang": "js",
  5100. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5101. }
  5102. ]
  5103. },
  5104. "post": {
  5105. "tags": ["session"],
  5106. "operationId": "session.create",
  5107. "parameters": [
  5108. {
  5109. "name": "directory",
  5110. "in": "query",
  5111. "schema": {
  5112. "type": "string"
  5113. },
  5114. "required": false
  5115. },
  5116. {
  5117. "name": "workspace",
  5118. "in": "query",
  5119. "schema": {
  5120. "type": "string"
  5121. },
  5122. "required": false
  5123. }
  5124. ],
  5125. "responses": {
  5126. "200": {
  5127. "description": "Successfully created session",
  5128. "content": {
  5129. "application/json": {
  5130. "schema": {
  5131. "$ref": "#/components/schemas/Session"
  5132. }
  5133. }
  5134. }
  5135. },
  5136. "400": {
  5137. "description": "BadRequest | InvalidRequestError",
  5138. "content": {
  5139. "application/json": {
  5140. "schema": {
  5141. "anyOf": [
  5142. {
  5143. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5144. },
  5145. {
  5146. "$ref": "#/components/schemas/InvalidRequestError"
  5147. }
  5148. ]
  5149. }
  5150. }
  5151. }
  5152. }
  5153. },
  5154. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5155. "summary": "Create session",
  5156. "requestBody": {
  5157. "content": {
  5158. "application/json": {
  5159. "schema": {
  5160. "type": "object",
  5161. "properties": {
  5162. "parentID": {
  5163. "type": "string",
  5164. "pattern": "^ses"
  5165. },
  5166. "title": {
  5167. "type": "string"
  5168. },
  5169. "agent": {
  5170. "type": "string"
  5171. },
  5172. "model": {
  5173. "type": "object",
  5174. "properties": {
  5175. "id": {
  5176. "type": "string"
  5177. },
  5178. "providerID": {
  5179. "type": "string"
  5180. },
  5181. "variant": {
  5182. "type": "string"
  5183. }
  5184. },
  5185. "required": ["id", "providerID"],
  5186. "additionalProperties": false
  5187. },
  5188. "metadata": {
  5189. "type": "object"
  5190. },
  5191. "permission": {
  5192. "$ref": "#/components/schemas/PermissionRuleset"
  5193. },
  5194. "workspaceID": {
  5195. "type": "string",
  5196. "pattern": "^wrk"
  5197. }
  5198. },
  5199. "additionalProperties": false
  5200. }
  5201. }
  5202. }
  5203. },
  5204. "x-codeSamples": [
  5205. {
  5206. "lang": "js",
  5207. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5208. }
  5209. ]
  5210. }
  5211. },
  5212. "/session/status": {
  5213. "get": {
  5214. "tags": ["session"],
  5215. "operationId": "session.status",
  5216. "parameters": [
  5217. {
  5218. "name": "directory",
  5219. "in": "query",
  5220. "schema": {
  5221. "type": "string"
  5222. },
  5223. "required": false
  5224. },
  5225. {
  5226. "name": "workspace",
  5227. "in": "query",
  5228. "schema": {
  5229. "type": "string"
  5230. },
  5231. "required": false
  5232. }
  5233. ],
  5234. "responses": {
  5235. "200": {
  5236. "description": "Get session status",
  5237. "content": {
  5238. "application/json": {
  5239. "schema": {
  5240. "type": "object",
  5241. "additionalProperties": {
  5242. "$ref": "#/components/schemas/SessionStatus"
  5243. },
  5244. "description": "Get session status"
  5245. }
  5246. }
  5247. }
  5248. },
  5249. "400": {
  5250. "description": "BadRequest | InvalidRequestError",
  5251. "content": {
  5252. "application/json": {
  5253. "schema": {
  5254. "anyOf": [
  5255. {
  5256. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5257. },
  5258. {
  5259. "$ref": "#/components/schemas/InvalidRequestError"
  5260. }
  5261. ]
  5262. }
  5263. }
  5264. }
  5265. }
  5266. },
  5267. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5268. "summary": "Get session status",
  5269. "x-codeSamples": [
  5270. {
  5271. "lang": "js",
  5272. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5273. }
  5274. ]
  5275. }
  5276. },
  5277. "/session/{sessionID}": {
  5278. "get": {
  5279. "tags": ["session"],
  5280. "operationId": "session.get",
  5281. "parameters": [
  5282. {
  5283. "name": "sessionID",
  5284. "in": "path",
  5285. "schema": {
  5286. "type": "string",
  5287. "pattern": "^ses"
  5288. },
  5289. "required": true
  5290. },
  5291. {
  5292. "name": "directory",
  5293. "in": "query",
  5294. "schema": {
  5295. "type": "string"
  5296. },
  5297. "required": false
  5298. },
  5299. {
  5300. "name": "workspace",
  5301. "in": "query",
  5302. "schema": {
  5303. "type": "string"
  5304. },
  5305. "required": false
  5306. }
  5307. ],
  5308. "responses": {
  5309. "200": {
  5310. "description": "Get session",
  5311. "content": {
  5312. "application/json": {
  5313. "schema": {
  5314. "$ref": "#/components/schemas/Session"
  5315. }
  5316. }
  5317. }
  5318. },
  5319. "400": {
  5320. "description": "BadRequest | InvalidRequestError",
  5321. "content": {
  5322. "application/json": {
  5323. "schema": {
  5324. "anyOf": [
  5325. {
  5326. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5327. },
  5328. {
  5329. "$ref": "#/components/schemas/InvalidRequestError"
  5330. }
  5331. ]
  5332. }
  5333. }
  5334. }
  5335. },
  5336. "404": {
  5337. "description": "NotFoundError",
  5338. "content": {
  5339. "application/json": {
  5340. "schema": {
  5341. "$ref": "#/components/schemas/NotFoundError"
  5342. }
  5343. }
  5344. }
  5345. }
  5346. },
  5347. "description": "Retrieve detailed information about a specific OpenCode session.",
  5348. "summary": "Get session",
  5349. "x-codeSamples": [
  5350. {
  5351. "lang": "js",
  5352. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5353. }
  5354. ]
  5355. },
  5356. "delete": {
  5357. "tags": ["session"],
  5358. "operationId": "session.delete",
  5359. "parameters": [
  5360. {
  5361. "name": "sessionID",
  5362. "in": "path",
  5363. "schema": {
  5364. "type": "string",
  5365. "pattern": "^ses"
  5366. },
  5367. "required": true
  5368. },
  5369. {
  5370. "name": "directory",
  5371. "in": "query",
  5372. "schema": {
  5373. "type": "string"
  5374. },
  5375. "required": false
  5376. },
  5377. {
  5378. "name": "workspace",
  5379. "in": "query",
  5380. "schema": {
  5381. "type": "string"
  5382. },
  5383. "required": false
  5384. }
  5385. ],
  5386. "responses": {
  5387. "200": {
  5388. "description": "Successfully deleted session",
  5389. "content": {
  5390. "application/json": {
  5391. "schema": {
  5392. "type": "boolean",
  5393. "description": "Successfully deleted session"
  5394. }
  5395. }
  5396. }
  5397. },
  5398. "400": {
  5399. "description": "BadRequest | InvalidRequestError",
  5400. "content": {
  5401. "application/json": {
  5402. "schema": {
  5403. "anyOf": [
  5404. {
  5405. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5406. },
  5407. {
  5408. "$ref": "#/components/schemas/InvalidRequestError"
  5409. }
  5410. ]
  5411. }
  5412. }
  5413. }
  5414. },
  5415. "404": {
  5416. "description": "NotFoundError",
  5417. "content": {
  5418. "application/json": {
  5419. "schema": {
  5420. "$ref": "#/components/schemas/NotFoundError"
  5421. }
  5422. }
  5423. }
  5424. }
  5425. },
  5426. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5427. "summary": "Delete session",
  5428. "x-codeSamples": [
  5429. {
  5430. "lang": "js",
  5431. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5432. }
  5433. ]
  5434. },
  5435. "patch": {
  5436. "tags": ["session"],
  5437. "operationId": "session.update",
  5438. "parameters": [
  5439. {
  5440. "name": "sessionID",
  5441. "in": "path",
  5442. "schema": {
  5443. "type": "string",
  5444. "pattern": "^ses"
  5445. },
  5446. "required": true
  5447. },
  5448. {
  5449. "name": "directory",
  5450. "in": "query",
  5451. "schema": {
  5452. "type": "string"
  5453. },
  5454. "required": false
  5455. },
  5456. {
  5457. "name": "workspace",
  5458. "in": "query",
  5459. "schema": {
  5460. "type": "string"
  5461. },
  5462. "required": false
  5463. }
  5464. ],
  5465. "responses": {
  5466. "200": {
  5467. "description": "Successfully updated session",
  5468. "content": {
  5469. "application/json": {
  5470. "schema": {
  5471. "$ref": "#/components/schemas/Session"
  5472. }
  5473. }
  5474. }
  5475. },
  5476. "400": {
  5477. "description": "BadRequest | InvalidRequestError",
  5478. "content": {
  5479. "application/json": {
  5480. "schema": {
  5481. "anyOf": [
  5482. {
  5483. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5484. },
  5485. {
  5486. "$ref": "#/components/schemas/InvalidRequestError"
  5487. }
  5488. ]
  5489. }
  5490. }
  5491. }
  5492. },
  5493. "404": {
  5494. "description": "NotFoundError",
  5495. "content": {
  5496. "application/json": {
  5497. "schema": {
  5498. "$ref": "#/components/schemas/NotFoundError"
  5499. }
  5500. }
  5501. }
  5502. }
  5503. },
  5504. "description": "Update properties of an existing session, such as title or other metadata.",
  5505. "summary": "Update session",
  5506. "requestBody": {
  5507. "content": {
  5508. "application/json": {
  5509. "schema": {
  5510. "type": "object",
  5511. "properties": {
  5512. "title": {
  5513. "type": "string"
  5514. },
  5515. "metadata": {
  5516. "type": "object"
  5517. },
  5518. "permission": {
  5519. "$ref": "#/components/schemas/PermissionRuleset"
  5520. },
  5521. "time": {
  5522. "type": "object",
  5523. "properties": {
  5524. "archived": {
  5525. "type": "number"
  5526. }
  5527. },
  5528. "additionalProperties": false
  5529. }
  5530. },
  5531. "additionalProperties": false
  5532. }
  5533. }
  5534. }
  5535. },
  5536. "x-codeSamples": [
  5537. {
  5538. "lang": "js",
  5539. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5540. }
  5541. ]
  5542. }
  5543. },
  5544. "/session/{sessionID}/children": {
  5545. "get": {
  5546. "tags": ["session"],
  5547. "operationId": "session.children",
  5548. "parameters": [
  5549. {
  5550. "name": "sessionID",
  5551. "in": "path",
  5552. "schema": {
  5553. "type": "string",
  5554. "pattern": "^ses"
  5555. },
  5556. "required": true
  5557. },
  5558. {
  5559. "name": "directory",
  5560. "in": "query",
  5561. "schema": {
  5562. "type": "string"
  5563. },
  5564. "required": false
  5565. },
  5566. {
  5567. "name": "workspace",
  5568. "in": "query",
  5569. "schema": {
  5570. "type": "string"
  5571. },
  5572. "required": false
  5573. }
  5574. ],
  5575. "responses": {
  5576. "200": {
  5577. "description": "List of children",
  5578. "content": {
  5579. "application/json": {
  5580. "schema": {
  5581. "type": "array",
  5582. "items": {
  5583. "$ref": "#/components/schemas/Session"
  5584. },
  5585. "description": "List of children"
  5586. }
  5587. }
  5588. }
  5589. },
  5590. "400": {
  5591. "description": "BadRequest | InvalidRequestError",
  5592. "content": {
  5593. "application/json": {
  5594. "schema": {
  5595. "anyOf": [
  5596. {
  5597. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5598. },
  5599. {
  5600. "$ref": "#/components/schemas/InvalidRequestError"
  5601. }
  5602. ]
  5603. }
  5604. }
  5605. }
  5606. },
  5607. "404": {
  5608. "description": "NotFoundError",
  5609. "content": {
  5610. "application/json": {
  5611. "schema": {
  5612. "$ref": "#/components/schemas/NotFoundError"
  5613. }
  5614. }
  5615. }
  5616. }
  5617. },
  5618. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5619. "summary": "Get session children",
  5620. "x-codeSamples": [
  5621. {
  5622. "lang": "js",
  5623. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5624. }
  5625. ]
  5626. }
  5627. },
  5628. "/session/{sessionID}/todo": {
  5629. "get": {
  5630. "tags": ["session"],
  5631. "operationId": "session.todo",
  5632. "parameters": [
  5633. {
  5634. "name": "sessionID",
  5635. "in": "path",
  5636. "schema": {
  5637. "type": "string",
  5638. "pattern": "^ses"
  5639. },
  5640. "required": true
  5641. },
  5642. {
  5643. "name": "directory",
  5644. "in": "query",
  5645. "schema": {
  5646. "type": "string"
  5647. },
  5648. "required": false
  5649. },
  5650. {
  5651. "name": "workspace",
  5652. "in": "query",
  5653. "schema": {
  5654. "type": "string"
  5655. },
  5656. "required": false
  5657. }
  5658. ],
  5659. "responses": {
  5660. "200": {
  5661. "description": "Todo list",
  5662. "content": {
  5663. "application/json": {
  5664. "schema": {
  5665. "type": "array",
  5666. "items": {
  5667. "$ref": "#/components/schemas/Todo"
  5668. },
  5669. "description": "Todo list"
  5670. }
  5671. }
  5672. }
  5673. },
  5674. "400": {
  5675. "description": "BadRequest | InvalidRequestError",
  5676. "content": {
  5677. "application/json": {
  5678. "schema": {
  5679. "anyOf": [
  5680. {
  5681. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5682. },
  5683. {
  5684. "$ref": "#/components/schemas/InvalidRequestError"
  5685. }
  5686. ]
  5687. }
  5688. }
  5689. }
  5690. },
  5691. "404": {
  5692. "description": "NotFoundError",
  5693. "content": {
  5694. "application/json": {
  5695. "schema": {
  5696. "$ref": "#/components/schemas/NotFoundError"
  5697. }
  5698. }
  5699. }
  5700. }
  5701. },
  5702. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5703. "summary": "Get session todos",
  5704. "x-codeSamples": [
  5705. {
  5706. "lang": "js",
  5707. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5708. }
  5709. ]
  5710. }
  5711. },
  5712. "/session/{sessionID}/diff": {
  5713. "get": {
  5714. "tags": ["session"],
  5715. "operationId": "session.diff",
  5716. "parameters": [
  5717. {
  5718. "name": "sessionID",
  5719. "in": "path",
  5720. "schema": {
  5721. "type": "string",
  5722. "pattern": "^ses"
  5723. },
  5724. "required": true
  5725. },
  5726. {
  5727. "name": "directory",
  5728. "in": "query",
  5729. "schema": {
  5730. "type": "string"
  5731. },
  5732. "required": false
  5733. },
  5734. {
  5735. "name": "workspace",
  5736. "in": "query",
  5737. "schema": {
  5738. "type": "string"
  5739. },
  5740. "required": false
  5741. },
  5742. {
  5743. "name": "messageID",
  5744. "in": "query",
  5745. "schema": {
  5746. "type": "string",
  5747. "pattern": "^msg"
  5748. },
  5749. "required": false
  5750. }
  5751. ],
  5752. "responses": {
  5753. "200": {
  5754. "description": "Successfully retrieved diff",
  5755. "content": {
  5756. "application/json": {
  5757. "schema": {
  5758. "type": "array",
  5759. "items": {
  5760. "$ref": "#/components/schemas/SnapshotFileDiff"
  5761. },
  5762. "description": "Successfully retrieved diff"
  5763. }
  5764. }
  5765. }
  5766. },
  5767. "400": {
  5768. "description": "Bad request",
  5769. "content": {
  5770. "application/json": {
  5771. "schema": {
  5772. "$ref": "#/components/schemas/BadRequestError"
  5773. }
  5774. }
  5775. }
  5776. }
  5777. },
  5778. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5779. "summary": "Get message diff",
  5780. "x-codeSamples": [
  5781. {
  5782. "lang": "js",
  5783. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5784. }
  5785. ]
  5786. }
  5787. },
  5788. "/session/{sessionID}/message": {
  5789. "get": {
  5790. "tags": ["session"],
  5791. "operationId": "session.messages",
  5792. "parameters": [
  5793. {
  5794. "name": "sessionID",
  5795. "in": "path",
  5796. "schema": {
  5797. "type": "string",
  5798. "pattern": "^ses"
  5799. },
  5800. "required": true
  5801. },
  5802. {
  5803. "name": "directory",
  5804. "in": "query",
  5805. "schema": {
  5806. "type": "string"
  5807. },
  5808. "required": false
  5809. },
  5810. {
  5811. "name": "workspace",
  5812. "in": "query",
  5813. "schema": {
  5814. "type": "string"
  5815. },
  5816. "required": false
  5817. },
  5818. {
  5819. "name": "limit",
  5820. "in": "query",
  5821. "schema": {
  5822. "type": "integer",
  5823. "minimum": 0,
  5824. "maximum": 9007199254740991
  5825. },
  5826. "required": false
  5827. },
  5828. {
  5829. "name": "before",
  5830. "in": "query",
  5831. "schema": {
  5832. "type": "string"
  5833. },
  5834. "required": false
  5835. }
  5836. ],
  5837. "responses": {
  5838. "200": {
  5839. "description": "List of messages",
  5840. "content": {
  5841. "application/json": {
  5842. "schema": {
  5843. "type": "array",
  5844. "items": {
  5845. "type": "object",
  5846. "properties": {
  5847. "info": {
  5848. "$ref": "#/components/schemas/Message"
  5849. },
  5850. "parts": {
  5851. "type": "array",
  5852. "items": {
  5853. "$ref": "#/components/schemas/Part"
  5854. }
  5855. }
  5856. },
  5857. "required": ["info", "parts"],
  5858. "additionalProperties": false
  5859. },
  5860. "description": "List of messages"
  5861. }
  5862. }
  5863. }
  5864. },
  5865. "400": {
  5866. "description": "BadRequest | InvalidRequestError",
  5867. "content": {
  5868. "application/json": {
  5869. "schema": {
  5870. "anyOf": [
  5871. {
  5872. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5873. },
  5874. {
  5875. "$ref": "#/components/schemas/InvalidRequestError"
  5876. }
  5877. ]
  5878. }
  5879. }
  5880. }
  5881. },
  5882. "404": {
  5883. "description": "NotFoundError",
  5884. "content": {
  5885. "application/json": {
  5886. "schema": {
  5887. "$ref": "#/components/schemas/NotFoundError"
  5888. }
  5889. }
  5890. }
  5891. }
  5892. },
  5893. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5894. "summary": "Get session messages",
  5895. "x-codeSamples": [
  5896. {
  5897. "lang": "js",
  5898. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5899. }
  5900. ]
  5901. },
  5902. "post": {
  5903. "tags": ["session"],
  5904. "operationId": "session.prompt",
  5905. "parameters": [
  5906. {
  5907. "name": "sessionID",
  5908. "in": "path",
  5909. "schema": {
  5910. "type": "string",
  5911. "pattern": "^ses"
  5912. },
  5913. "required": true
  5914. },
  5915. {
  5916. "name": "directory",
  5917. "in": "query",
  5918. "schema": {
  5919. "type": "string"
  5920. },
  5921. "required": false
  5922. },
  5923. {
  5924. "name": "workspace",
  5925. "in": "query",
  5926. "schema": {
  5927. "type": "string"
  5928. },
  5929. "required": false
  5930. }
  5931. ],
  5932. "responses": {
  5933. "200": {
  5934. "description": "Created message",
  5935. "content": {
  5936. "application/json": {
  5937. "schema": {
  5938. "type": "object",
  5939. "required": ["info", "parts"],
  5940. "properties": {
  5941. "info": {
  5942. "$ref": "#/components/schemas/AssistantMessage"
  5943. },
  5944. "parts": {
  5945. "type": "array",
  5946. "items": {
  5947. "$ref": "#/components/schemas/Part"
  5948. }
  5949. }
  5950. }
  5951. }
  5952. }
  5953. }
  5954. },
  5955. "400": {
  5956. "description": "BadRequest | InvalidRequestError",
  5957. "content": {
  5958. "application/json": {
  5959. "schema": {
  5960. "anyOf": [
  5961. {
  5962. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5963. },
  5964. {
  5965. "$ref": "#/components/schemas/InvalidRequestError"
  5966. }
  5967. ]
  5968. }
  5969. }
  5970. }
  5971. },
  5972. "404": {
  5973. "description": "NotFoundError",
  5974. "content": {
  5975. "application/json": {
  5976. "schema": {
  5977. "$ref": "#/components/schemas/NotFoundError"
  5978. }
  5979. }
  5980. }
  5981. }
  5982. },
  5983. "description": "Create and send a new message to a session, streaming the AI response.",
  5984. "summary": "Send message",
  5985. "requestBody": {
  5986. "content": {
  5987. "application/json": {
  5988. "schema": {
  5989. "type": "object",
  5990. "properties": {
  5991. "messageID": {
  5992. "type": "string",
  5993. "pattern": "^msg"
  5994. },
  5995. "model": {
  5996. "type": "object",
  5997. "properties": {
  5998. "providerID": {
  5999. "type": "string"
  6000. },
  6001. "modelID": {
  6002. "type": "string"
  6003. }
  6004. },
  6005. "required": ["providerID", "modelID"],
  6006. "additionalProperties": false
  6007. },
  6008. "agent": {
  6009. "type": "string"
  6010. },
  6011. "noReply": {
  6012. "type": "boolean"
  6013. },
  6014. "tools": {
  6015. "type": "object",
  6016. "additionalProperties": {
  6017. "type": "boolean"
  6018. }
  6019. },
  6020. "format": {
  6021. "$ref": "#/components/schemas/OutputFormat"
  6022. },
  6023. "system": {
  6024. "type": "string"
  6025. },
  6026. "variant": {
  6027. "type": "string"
  6028. },
  6029. "parts": {
  6030. "type": "array",
  6031. "items": {
  6032. "anyOf": [
  6033. {
  6034. "$ref": "#/components/schemas/TextPartInput"
  6035. },
  6036. {
  6037. "$ref": "#/components/schemas/FilePartInput"
  6038. },
  6039. {
  6040. "$ref": "#/components/schemas/AgentPartInput"
  6041. },
  6042. {
  6043. "$ref": "#/components/schemas/SubtaskPartInput"
  6044. }
  6045. ]
  6046. }
  6047. }
  6048. },
  6049. "required": ["parts"],
  6050. "additionalProperties": false
  6051. }
  6052. }
  6053. }
  6054. },
  6055. "x-codeSamples": [
  6056. {
  6057. "lang": "js",
  6058. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6059. }
  6060. ]
  6061. }
  6062. },
  6063. "/session/{sessionID}/message/{messageID}": {
  6064. "get": {
  6065. "tags": ["session"],
  6066. "operationId": "session.message",
  6067. "parameters": [
  6068. {
  6069. "name": "sessionID",
  6070. "in": "path",
  6071. "schema": {
  6072. "type": "string",
  6073. "pattern": "^ses"
  6074. },
  6075. "required": true
  6076. },
  6077. {
  6078. "name": "messageID",
  6079. "in": "path",
  6080. "schema": {
  6081. "type": "string",
  6082. "pattern": "^msg"
  6083. },
  6084. "required": true
  6085. },
  6086. {
  6087. "name": "directory",
  6088. "in": "query",
  6089. "schema": {
  6090. "type": "string"
  6091. },
  6092. "required": false
  6093. },
  6094. {
  6095. "name": "workspace",
  6096. "in": "query",
  6097. "schema": {
  6098. "type": "string"
  6099. },
  6100. "required": false
  6101. }
  6102. ],
  6103. "responses": {
  6104. "200": {
  6105. "description": "Message",
  6106. "content": {
  6107. "application/json": {
  6108. "schema": {
  6109. "type": "object",
  6110. "properties": {
  6111. "info": {
  6112. "$ref": "#/components/schemas/Message"
  6113. },
  6114. "parts": {
  6115. "type": "array",
  6116. "items": {
  6117. "$ref": "#/components/schemas/Part"
  6118. }
  6119. }
  6120. },
  6121. "required": ["info", "parts"],
  6122. "additionalProperties": false,
  6123. "description": "Message"
  6124. }
  6125. }
  6126. }
  6127. },
  6128. "400": {
  6129. "description": "BadRequest | InvalidRequestError",
  6130. "content": {
  6131. "application/json": {
  6132. "schema": {
  6133. "anyOf": [
  6134. {
  6135. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6136. },
  6137. {
  6138. "$ref": "#/components/schemas/InvalidRequestError"
  6139. }
  6140. ]
  6141. }
  6142. }
  6143. }
  6144. },
  6145. "404": {
  6146. "description": "NotFoundError",
  6147. "content": {
  6148. "application/json": {
  6149. "schema": {
  6150. "$ref": "#/components/schemas/NotFoundError"
  6151. }
  6152. }
  6153. }
  6154. }
  6155. },
  6156. "description": "Retrieve a specific message from a session by its message ID.",
  6157. "summary": "Get message",
  6158. "x-codeSamples": [
  6159. {
  6160. "lang": "js",
  6161. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6162. }
  6163. ]
  6164. },
  6165. "delete": {
  6166. "tags": ["session"],
  6167. "operationId": "session.deleteMessage",
  6168. "parameters": [
  6169. {
  6170. "name": "sessionID",
  6171. "in": "path",
  6172. "schema": {
  6173. "type": "string",
  6174. "pattern": "^ses"
  6175. },
  6176. "required": true
  6177. },
  6178. {
  6179. "name": "messageID",
  6180. "in": "path",
  6181. "schema": {
  6182. "type": "string",
  6183. "pattern": "^msg"
  6184. },
  6185. "required": true
  6186. },
  6187. {
  6188. "name": "directory",
  6189. "in": "query",
  6190. "schema": {
  6191. "type": "string"
  6192. },
  6193. "required": false
  6194. },
  6195. {
  6196. "name": "workspace",
  6197. "in": "query",
  6198. "schema": {
  6199. "type": "string"
  6200. },
  6201. "required": false
  6202. }
  6203. ],
  6204. "responses": {
  6205. "200": {
  6206. "description": "Successfully deleted message",
  6207. "content": {
  6208. "application/json": {
  6209. "schema": {
  6210. "type": "boolean",
  6211. "description": "Successfully deleted message"
  6212. }
  6213. }
  6214. }
  6215. },
  6216. "400": {
  6217. "description": "BadRequest | InvalidRequestError",
  6218. "content": {
  6219. "application/json": {
  6220. "schema": {
  6221. "anyOf": [
  6222. {
  6223. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6224. },
  6225. {
  6226. "$ref": "#/components/schemas/InvalidRequestError"
  6227. }
  6228. ]
  6229. }
  6230. }
  6231. }
  6232. },
  6233. "404": {
  6234. "description": "NotFoundError",
  6235. "content": {
  6236. "application/json": {
  6237. "schema": {
  6238. "$ref": "#/components/schemas/NotFoundError"
  6239. }
  6240. }
  6241. }
  6242. },
  6243. "409": {
  6244. "description": "SessionBusyError",
  6245. "content": {
  6246. "application/json": {
  6247. "schema": {
  6248. "$ref": "#/components/schemas/SessionBusyError"
  6249. }
  6250. }
  6251. }
  6252. }
  6253. },
  6254. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6255. "summary": "Delete message",
  6256. "x-codeSamples": [
  6257. {
  6258. "lang": "js",
  6259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6260. }
  6261. ]
  6262. }
  6263. },
  6264. "/session/{sessionID}/fork": {
  6265. "post": {
  6266. "tags": ["session"],
  6267. "operationId": "session.fork",
  6268. "parameters": [
  6269. {
  6270. "name": "sessionID",
  6271. "in": "path",
  6272. "schema": {
  6273. "type": "string",
  6274. "pattern": "^ses"
  6275. },
  6276. "required": true
  6277. },
  6278. {
  6279. "name": "directory",
  6280. "in": "query",
  6281. "schema": {
  6282. "type": "string"
  6283. },
  6284. "required": false
  6285. },
  6286. {
  6287. "name": "workspace",
  6288. "in": "query",
  6289. "schema": {
  6290. "type": "string"
  6291. },
  6292. "required": false
  6293. }
  6294. ],
  6295. "responses": {
  6296. "200": {
  6297. "description": "200",
  6298. "content": {
  6299. "application/json": {
  6300. "schema": {
  6301. "$ref": "#/components/schemas/Session"
  6302. }
  6303. }
  6304. }
  6305. },
  6306. "400": {
  6307. "description": "BadRequest | InvalidRequestError",
  6308. "content": {
  6309. "application/json": {
  6310. "schema": {
  6311. "anyOf": [
  6312. {
  6313. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6314. },
  6315. {
  6316. "$ref": "#/components/schemas/InvalidRequestError"
  6317. }
  6318. ]
  6319. }
  6320. }
  6321. }
  6322. },
  6323. "404": {
  6324. "description": "NotFoundError",
  6325. "content": {
  6326. "application/json": {
  6327. "schema": {
  6328. "$ref": "#/components/schemas/NotFoundError"
  6329. }
  6330. }
  6331. }
  6332. }
  6333. },
  6334. "description": "Create a new session by forking an existing session at a specific message point.",
  6335. "summary": "Fork session",
  6336. "requestBody": {
  6337. "content": {
  6338. "application/json": {
  6339. "schema": {
  6340. "type": "object",
  6341. "properties": {
  6342. "messageID": {
  6343. "type": "string",
  6344. "pattern": "^msg"
  6345. }
  6346. },
  6347. "additionalProperties": false
  6348. }
  6349. }
  6350. }
  6351. },
  6352. "x-codeSamples": [
  6353. {
  6354. "lang": "js",
  6355. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6356. }
  6357. ]
  6358. }
  6359. },
  6360. "/session/{sessionID}/abort": {
  6361. "post": {
  6362. "tags": ["session"],
  6363. "operationId": "session.abort",
  6364. "parameters": [
  6365. {
  6366. "name": "sessionID",
  6367. "in": "path",
  6368. "schema": {
  6369. "type": "string",
  6370. "pattern": "^ses"
  6371. },
  6372. "required": true
  6373. },
  6374. {
  6375. "name": "directory",
  6376. "in": "query",
  6377. "schema": {
  6378. "type": "string"
  6379. },
  6380. "required": false
  6381. },
  6382. {
  6383. "name": "workspace",
  6384. "in": "query",
  6385. "schema": {
  6386. "type": "string"
  6387. },
  6388. "required": false
  6389. }
  6390. ],
  6391. "responses": {
  6392. "200": {
  6393. "description": "Aborted session",
  6394. "content": {
  6395. "application/json": {
  6396. "schema": {
  6397. "type": "boolean",
  6398. "description": "Aborted session"
  6399. }
  6400. }
  6401. }
  6402. },
  6403. "400": {
  6404. "description": "BadRequest | InvalidRequestError",
  6405. "content": {
  6406. "application/json": {
  6407. "schema": {
  6408. "anyOf": [
  6409. {
  6410. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6411. },
  6412. {
  6413. "$ref": "#/components/schemas/InvalidRequestError"
  6414. }
  6415. ]
  6416. }
  6417. }
  6418. }
  6419. }
  6420. },
  6421. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6422. "summary": "Abort session",
  6423. "x-codeSamples": [
  6424. {
  6425. "lang": "js",
  6426. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6427. }
  6428. ]
  6429. }
  6430. },
  6431. "/session/{sessionID}/init": {
  6432. "post": {
  6433. "tags": ["session"],
  6434. "operationId": "session.init",
  6435. "parameters": [
  6436. {
  6437. "name": "sessionID",
  6438. "in": "path",
  6439. "schema": {
  6440. "type": "string",
  6441. "pattern": "^ses"
  6442. },
  6443. "required": true
  6444. },
  6445. {
  6446. "name": "directory",
  6447. "in": "query",
  6448. "schema": {
  6449. "type": "string"
  6450. },
  6451. "required": false
  6452. },
  6453. {
  6454. "name": "workspace",
  6455. "in": "query",
  6456. "schema": {
  6457. "type": "string"
  6458. },
  6459. "required": false
  6460. }
  6461. ],
  6462. "responses": {
  6463. "200": {
  6464. "description": "200",
  6465. "content": {
  6466. "application/json": {
  6467. "schema": {
  6468. "type": "boolean",
  6469. "description": "200"
  6470. }
  6471. }
  6472. }
  6473. },
  6474. "400": {
  6475. "description": "BadRequest | InvalidRequestError",
  6476. "content": {
  6477. "application/json": {
  6478. "schema": {
  6479. "anyOf": [
  6480. {
  6481. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6482. },
  6483. {
  6484. "$ref": "#/components/schemas/InvalidRequestError"
  6485. }
  6486. ]
  6487. }
  6488. }
  6489. }
  6490. },
  6491. "404": {
  6492. "description": "NotFoundError",
  6493. "content": {
  6494. "application/json": {
  6495. "schema": {
  6496. "$ref": "#/components/schemas/NotFoundError"
  6497. }
  6498. }
  6499. }
  6500. }
  6501. },
  6502. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6503. "summary": "Initialize session",
  6504. "requestBody": {
  6505. "content": {
  6506. "application/json": {
  6507. "schema": {
  6508. "type": "object",
  6509. "properties": {
  6510. "modelID": {
  6511. "type": "string"
  6512. },
  6513. "providerID": {
  6514. "type": "string"
  6515. },
  6516. "messageID": {
  6517. "type": "string",
  6518. "pattern": "^msg"
  6519. }
  6520. },
  6521. "required": ["modelID", "providerID", "messageID"],
  6522. "additionalProperties": false
  6523. }
  6524. }
  6525. }
  6526. },
  6527. "x-codeSamples": [
  6528. {
  6529. "lang": "js",
  6530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6531. }
  6532. ]
  6533. }
  6534. },
  6535. "/session/{sessionID}/share": {
  6536. "post": {
  6537. "tags": ["session"],
  6538. "operationId": "session.share",
  6539. "parameters": [
  6540. {
  6541. "name": "sessionID",
  6542. "in": "path",
  6543. "schema": {
  6544. "type": "string",
  6545. "pattern": "^ses"
  6546. },
  6547. "required": true
  6548. },
  6549. {
  6550. "name": "directory",
  6551. "in": "query",
  6552. "schema": {
  6553. "type": "string"
  6554. },
  6555. "required": false
  6556. },
  6557. {
  6558. "name": "workspace",
  6559. "in": "query",
  6560. "schema": {
  6561. "type": "string"
  6562. },
  6563. "required": false
  6564. }
  6565. ],
  6566. "responses": {
  6567. "200": {
  6568. "description": "Successfully shared session",
  6569. "content": {
  6570. "application/json": {
  6571. "schema": {
  6572. "$ref": "#/components/schemas/Session"
  6573. }
  6574. }
  6575. }
  6576. },
  6577. "400": {
  6578. "description": "Bad request",
  6579. "content": {
  6580. "application/json": {
  6581. "schema": {
  6582. "$ref": "#/components/schemas/BadRequestError"
  6583. }
  6584. }
  6585. }
  6586. },
  6587. "404": {
  6588. "description": "NotFoundError",
  6589. "content": {
  6590. "application/json": {
  6591. "schema": {
  6592. "$ref": "#/components/schemas/NotFoundError"
  6593. }
  6594. }
  6595. }
  6596. },
  6597. "500": {
  6598. "description": "InternalServerError",
  6599. "content": {
  6600. "application/json": {
  6601. "schema": {
  6602. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6603. }
  6604. }
  6605. }
  6606. }
  6607. },
  6608. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6609. "summary": "Share session",
  6610. "x-codeSamples": [
  6611. {
  6612. "lang": "js",
  6613. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6614. }
  6615. ]
  6616. },
  6617. "delete": {
  6618. "tags": ["session"],
  6619. "operationId": "session.unshare",
  6620. "parameters": [
  6621. {
  6622. "name": "sessionID",
  6623. "in": "path",
  6624. "schema": {
  6625. "type": "string",
  6626. "pattern": "^ses"
  6627. },
  6628. "required": true
  6629. },
  6630. {
  6631. "name": "directory",
  6632. "in": "query",
  6633. "schema": {
  6634. "type": "string"
  6635. },
  6636. "required": false
  6637. },
  6638. {
  6639. "name": "workspace",
  6640. "in": "query",
  6641. "schema": {
  6642. "type": "string"
  6643. },
  6644. "required": false
  6645. }
  6646. ],
  6647. "responses": {
  6648. "200": {
  6649. "description": "Successfully unshared session",
  6650. "content": {
  6651. "application/json": {
  6652. "schema": {
  6653. "$ref": "#/components/schemas/Session"
  6654. }
  6655. }
  6656. }
  6657. },
  6658. "400": {
  6659. "description": "Bad request",
  6660. "content": {
  6661. "application/json": {
  6662. "schema": {
  6663. "$ref": "#/components/schemas/BadRequestError"
  6664. }
  6665. }
  6666. }
  6667. },
  6668. "404": {
  6669. "description": "NotFoundError",
  6670. "content": {
  6671. "application/json": {
  6672. "schema": {
  6673. "$ref": "#/components/schemas/NotFoundError"
  6674. }
  6675. }
  6676. }
  6677. },
  6678. "500": {
  6679. "description": "InternalServerError",
  6680. "content": {
  6681. "application/json": {
  6682. "schema": {
  6683. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6684. }
  6685. }
  6686. }
  6687. }
  6688. },
  6689. "description": "Remove the shareable link for a session, making it private again.",
  6690. "summary": "Unshare session",
  6691. "x-codeSamples": [
  6692. {
  6693. "lang": "js",
  6694. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6695. }
  6696. ]
  6697. }
  6698. },
  6699. "/session/{sessionID}/summarize": {
  6700. "post": {
  6701. "tags": ["session"],
  6702. "operationId": "session.summarize",
  6703. "parameters": [
  6704. {
  6705. "name": "sessionID",
  6706. "in": "path",
  6707. "schema": {
  6708. "type": "string",
  6709. "pattern": "^ses"
  6710. },
  6711. "required": true
  6712. },
  6713. {
  6714. "name": "directory",
  6715. "in": "query",
  6716. "schema": {
  6717. "type": "string"
  6718. },
  6719. "required": false
  6720. },
  6721. {
  6722. "name": "workspace",
  6723. "in": "query",
  6724. "schema": {
  6725. "type": "string"
  6726. },
  6727. "required": false
  6728. }
  6729. ],
  6730. "responses": {
  6731. "200": {
  6732. "description": "Summarized session",
  6733. "content": {
  6734. "application/json": {
  6735. "schema": {
  6736. "type": "boolean",
  6737. "description": "Summarized session"
  6738. }
  6739. }
  6740. }
  6741. },
  6742. "400": {
  6743. "description": "BadRequest | InvalidRequestError",
  6744. "content": {
  6745. "application/json": {
  6746. "schema": {
  6747. "anyOf": [
  6748. {
  6749. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6750. },
  6751. {
  6752. "$ref": "#/components/schemas/InvalidRequestError"
  6753. }
  6754. ]
  6755. }
  6756. }
  6757. }
  6758. },
  6759. "404": {
  6760. "description": "NotFoundError",
  6761. "content": {
  6762. "application/json": {
  6763. "schema": {
  6764. "$ref": "#/components/schemas/NotFoundError"
  6765. }
  6766. }
  6767. }
  6768. }
  6769. },
  6770. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  6771. "summary": "Summarize session",
  6772. "requestBody": {
  6773. "content": {
  6774. "application/json": {
  6775. "schema": {
  6776. "type": "object",
  6777. "properties": {
  6778. "providerID": {
  6779. "type": "string"
  6780. },
  6781. "modelID": {
  6782. "type": "string"
  6783. },
  6784. "auto": {
  6785. "type": "boolean"
  6786. }
  6787. },
  6788. "required": ["providerID", "modelID"],
  6789. "additionalProperties": false
  6790. }
  6791. }
  6792. }
  6793. },
  6794. "x-codeSamples": [
  6795. {
  6796. "lang": "js",
  6797. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6798. }
  6799. ]
  6800. }
  6801. },
  6802. "/session/{sessionID}/prompt_async": {
  6803. "post": {
  6804. "tags": ["session"],
  6805. "operationId": "session.prompt_async",
  6806. "parameters": [
  6807. {
  6808. "name": "sessionID",
  6809. "in": "path",
  6810. "schema": {
  6811. "type": "string",
  6812. "pattern": "^ses"
  6813. },
  6814. "required": true
  6815. },
  6816. {
  6817. "name": "directory",
  6818. "in": "query",
  6819. "schema": {
  6820. "type": "string"
  6821. },
  6822. "required": false
  6823. },
  6824. {
  6825. "name": "workspace",
  6826. "in": "query",
  6827. "schema": {
  6828. "type": "string"
  6829. },
  6830. "required": false
  6831. }
  6832. ],
  6833. "responses": {
  6834. "204": {
  6835. "description": "Prompt accepted"
  6836. },
  6837. "400": {
  6838. "description": "BadRequest | InvalidRequestError",
  6839. "content": {
  6840. "application/json": {
  6841. "schema": {
  6842. "anyOf": [
  6843. {
  6844. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6845. },
  6846. {
  6847. "$ref": "#/components/schemas/InvalidRequestError"
  6848. }
  6849. ]
  6850. }
  6851. }
  6852. }
  6853. },
  6854. "404": {
  6855. "description": "NotFoundError",
  6856. "content": {
  6857. "application/json": {
  6858. "schema": {
  6859. "$ref": "#/components/schemas/NotFoundError"
  6860. }
  6861. }
  6862. }
  6863. }
  6864. },
  6865. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6866. "summary": "Send async message",
  6867. "requestBody": {
  6868. "content": {
  6869. "application/json": {
  6870. "schema": {
  6871. "type": "object",
  6872. "properties": {
  6873. "messageID": {
  6874. "type": "string",
  6875. "pattern": "^msg"
  6876. },
  6877. "model": {
  6878. "type": "object",
  6879. "properties": {
  6880. "providerID": {
  6881. "type": "string"
  6882. },
  6883. "modelID": {
  6884. "type": "string"
  6885. }
  6886. },
  6887. "required": ["providerID", "modelID"],
  6888. "additionalProperties": false
  6889. },
  6890. "agent": {
  6891. "type": "string"
  6892. },
  6893. "noReply": {
  6894. "type": "boolean"
  6895. },
  6896. "tools": {
  6897. "type": "object",
  6898. "additionalProperties": {
  6899. "type": "boolean"
  6900. }
  6901. },
  6902. "format": {
  6903. "$ref": "#/components/schemas/OutputFormat"
  6904. },
  6905. "system": {
  6906. "type": "string"
  6907. },
  6908. "variant": {
  6909. "type": "string"
  6910. },
  6911. "parts": {
  6912. "type": "array",
  6913. "items": {
  6914. "anyOf": [
  6915. {
  6916. "$ref": "#/components/schemas/TextPartInput"
  6917. },
  6918. {
  6919. "$ref": "#/components/schemas/FilePartInput"
  6920. },
  6921. {
  6922. "$ref": "#/components/schemas/AgentPartInput"
  6923. },
  6924. {
  6925. "$ref": "#/components/schemas/SubtaskPartInput"
  6926. }
  6927. ]
  6928. }
  6929. }
  6930. },
  6931. "required": ["parts"],
  6932. "additionalProperties": false
  6933. }
  6934. }
  6935. }
  6936. },
  6937. "x-codeSamples": [
  6938. {
  6939. "lang": "js",
  6940. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6941. }
  6942. ]
  6943. }
  6944. },
  6945. "/session/{sessionID}/command": {
  6946. "post": {
  6947. "tags": ["session"],
  6948. "operationId": "session.command",
  6949. "parameters": [
  6950. {
  6951. "name": "sessionID",
  6952. "in": "path",
  6953. "schema": {
  6954. "type": "string",
  6955. "pattern": "^ses"
  6956. },
  6957. "required": true
  6958. },
  6959. {
  6960. "name": "directory",
  6961. "in": "query",
  6962. "schema": {
  6963. "type": "string"
  6964. },
  6965. "required": false
  6966. },
  6967. {
  6968. "name": "workspace",
  6969. "in": "query",
  6970. "schema": {
  6971. "type": "string"
  6972. },
  6973. "required": false
  6974. }
  6975. ],
  6976. "responses": {
  6977. "200": {
  6978. "description": "Created message",
  6979. "content": {
  6980. "application/json": {
  6981. "schema": {
  6982. "type": "object",
  6983. "required": ["info", "parts"],
  6984. "properties": {
  6985. "info": {
  6986. "$ref": "#/components/schemas/AssistantMessage"
  6987. },
  6988. "parts": {
  6989. "type": "array",
  6990. "items": {
  6991. "$ref": "#/components/schemas/Part"
  6992. }
  6993. }
  6994. }
  6995. }
  6996. }
  6997. }
  6998. },
  6999. "400": {
  7000. "description": "BadRequest | InvalidRequestError",
  7001. "content": {
  7002. "application/json": {
  7003. "schema": {
  7004. "anyOf": [
  7005. {
  7006. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7007. },
  7008. {
  7009. "$ref": "#/components/schemas/InvalidRequestError"
  7010. }
  7011. ]
  7012. }
  7013. }
  7014. }
  7015. },
  7016. "404": {
  7017. "description": "NotFoundError",
  7018. "content": {
  7019. "application/json": {
  7020. "schema": {
  7021. "$ref": "#/components/schemas/NotFoundError"
  7022. }
  7023. }
  7024. }
  7025. }
  7026. },
  7027. "description": "Send a new command to a session for execution by the AI assistant.",
  7028. "summary": "Send command",
  7029. "requestBody": {
  7030. "content": {
  7031. "application/json": {
  7032. "schema": {
  7033. "type": "object",
  7034. "properties": {
  7035. "messageID": {
  7036. "type": "string",
  7037. "pattern": "^msg"
  7038. },
  7039. "agent": {
  7040. "type": "string"
  7041. },
  7042. "model": {
  7043. "type": "string"
  7044. },
  7045. "arguments": {
  7046. "type": "string"
  7047. },
  7048. "command": {
  7049. "type": "string"
  7050. },
  7051. "variant": {
  7052. "type": "string"
  7053. },
  7054. "parts": {
  7055. "type": "array",
  7056. "items": {
  7057. "type": "object",
  7058. "properties": {
  7059. "id": {
  7060. "type": "string",
  7061. "pattern": "^prt"
  7062. },
  7063. "type": {
  7064. "type": "string",
  7065. "enum": ["file"]
  7066. },
  7067. "mime": {
  7068. "type": "string"
  7069. },
  7070. "filename": {
  7071. "type": "string"
  7072. },
  7073. "url": {
  7074. "type": "string"
  7075. },
  7076. "source": {
  7077. "$ref": "#/components/schemas/FilePartSource"
  7078. }
  7079. },
  7080. "required": ["type", "mime", "url"],
  7081. "additionalProperties": false
  7082. }
  7083. }
  7084. },
  7085. "required": ["arguments", "command"],
  7086. "additionalProperties": false
  7087. }
  7088. }
  7089. }
  7090. },
  7091. "x-codeSamples": [
  7092. {
  7093. "lang": "js",
  7094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7095. }
  7096. ]
  7097. }
  7098. },
  7099. "/session/{sessionID}/shell": {
  7100. "post": {
  7101. "tags": ["session"],
  7102. "operationId": "session.shell",
  7103. "parameters": [
  7104. {
  7105. "name": "sessionID",
  7106. "in": "path",
  7107. "schema": {
  7108. "type": "string",
  7109. "pattern": "^ses"
  7110. },
  7111. "required": true
  7112. },
  7113. {
  7114. "name": "directory",
  7115. "in": "query",
  7116. "schema": {
  7117. "type": "string"
  7118. },
  7119. "required": false
  7120. },
  7121. {
  7122. "name": "workspace",
  7123. "in": "query",
  7124. "schema": {
  7125. "type": "string"
  7126. },
  7127. "required": false
  7128. }
  7129. ],
  7130. "responses": {
  7131. "200": {
  7132. "description": "Created message",
  7133. "content": {
  7134. "application/json": {
  7135. "schema": {
  7136. "type": "object",
  7137. "properties": {
  7138. "info": {
  7139. "$ref": "#/components/schemas/Message"
  7140. },
  7141. "parts": {
  7142. "type": "array",
  7143. "items": {
  7144. "$ref": "#/components/schemas/Part"
  7145. }
  7146. }
  7147. },
  7148. "required": ["info", "parts"],
  7149. "additionalProperties": false,
  7150. "description": "Created message"
  7151. }
  7152. }
  7153. }
  7154. },
  7155. "400": {
  7156. "description": "BadRequest | InvalidRequestError",
  7157. "content": {
  7158. "application/json": {
  7159. "schema": {
  7160. "anyOf": [
  7161. {
  7162. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7163. },
  7164. {
  7165. "$ref": "#/components/schemas/InvalidRequestError"
  7166. }
  7167. ]
  7168. }
  7169. }
  7170. }
  7171. },
  7172. "404": {
  7173. "description": "NotFoundError",
  7174. "content": {
  7175. "application/json": {
  7176. "schema": {
  7177. "$ref": "#/components/schemas/NotFoundError"
  7178. }
  7179. }
  7180. }
  7181. },
  7182. "409": {
  7183. "description": "SessionBusyError",
  7184. "content": {
  7185. "application/json": {
  7186. "schema": {
  7187. "$ref": "#/components/schemas/SessionBusyError"
  7188. }
  7189. }
  7190. }
  7191. }
  7192. },
  7193. "description": "Execute a shell command within the session context and return the AI's response.",
  7194. "summary": "Run shell command",
  7195. "requestBody": {
  7196. "content": {
  7197. "application/json": {
  7198. "schema": {
  7199. "type": "object",
  7200. "properties": {
  7201. "messageID": {
  7202. "type": "string",
  7203. "pattern": "^msg"
  7204. },
  7205. "agent": {
  7206. "type": "string"
  7207. },
  7208. "model": {
  7209. "type": "object",
  7210. "properties": {
  7211. "providerID": {
  7212. "type": "string"
  7213. },
  7214. "modelID": {
  7215. "type": "string"
  7216. }
  7217. },
  7218. "required": ["providerID", "modelID"],
  7219. "additionalProperties": false
  7220. },
  7221. "command": {
  7222. "type": "string"
  7223. }
  7224. },
  7225. "required": ["agent", "command"],
  7226. "additionalProperties": false
  7227. }
  7228. }
  7229. }
  7230. },
  7231. "x-codeSamples": [
  7232. {
  7233. "lang": "js",
  7234. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7235. }
  7236. ]
  7237. }
  7238. },
  7239. "/session/{sessionID}/revert": {
  7240. "post": {
  7241. "tags": ["session"],
  7242. "operationId": "session.revert",
  7243. "parameters": [
  7244. {
  7245. "name": "sessionID",
  7246. "in": "path",
  7247. "schema": {
  7248. "type": "string",
  7249. "pattern": "^ses"
  7250. },
  7251. "required": true
  7252. },
  7253. {
  7254. "name": "directory",
  7255. "in": "query",
  7256. "schema": {
  7257. "type": "string"
  7258. },
  7259. "required": false
  7260. },
  7261. {
  7262. "name": "workspace",
  7263. "in": "query",
  7264. "schema": {
  7265. "type": "string"
  7266. },
  7267. "required": false
  7268. }
  7269. ],
  7270. "responses": {
  7271. "200": {
  7272. "description": "Updated session",
  7273. "content": {
  7274. "application/json": {
  7275. "schema": {
  7276. "$ref": "#/components/schemas/Session"
  7277. }
  7278. }
  7279. }
  7280. },
  7281. "400": {
  7282. "description": "BadRequest | InvalidRequestError",
  7283. "content": {
  7284. "application/json": {
  7285. "schema": {
  7286. "anyOf": [
  7287. {
  7288. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7289. },
  7290. {
  7291. "$ref": "#/components/schemas/InvalidRequestError"
  7292. }
  7293. ]
  7294. }
  7295. }
  7296. }
  7297. },
  7298. "404": {
  7299. "description": "NotFoundError",
  7300. "content": {
  7301. "application/json": {
  7302. "schema": {
  7303. "$ref": "#/components/schemas/NotFoundError"
  7304. }
  7305. }
  7306. }
  7307. },
  7308. "409": {
  7309. "description": "SessionBusyError",
  7310. "content": {
  7311. "application/json": {
  7312. "schema": {
  7313. "$ref": "#/components/schemas/SessionBusyError"
  7314. }
  7315. }
  7316. }
  7317. }
  7318. },
  7319. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7320. "summary": "Revert message",
  7321. "requestBody": {
  7322. "content": {
  7323. "application/json": {
  7324. "schema": {
  7325. "type": "object",
  7326. "properties": {
  7327. "messageID": {
  7328. "type": "string",
  7329. "pattern": "^msg"
  7330. },
  7331. "partID": {
  7332. "type": "string",
  7333. "pattern": "^prt"
  7334. }
  7335. },
  7336. "required": ["messageID"],
  7337. "additionalProperties": false
  7338. }
  7339. }
  7340. }
  7341. },
  7342. "x-codeSamples": [
  7343. {
  7344. "lang": "js",
  7345. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7346. }
  7347. ]
  7348. }
  7349. },
  7350. "/session/{sessionID}/unrevert": {
  7351. "post": {
  7352. "tags": ["session"],
  7353. "operationId": "session.unrevert",
  7354. "parameters": [
  7355. {
  7356. "name": "sessionID",
  7357. "in": "path",
  7358. "schema": {
  7359. "type": "string",
  7360. "pattern": "^ses"
  7361. },
  7362. "required": true
  7363. },
  7364. {
  7365. "name": "directory",
  7366. "in": "query",
  7367. "schema": {
  7368. "type": "string"
  7369. },
  7370. "required": false
  7371. },
  7372. {
  7373. "name": "workspace",
  7374. "in": "query",
  7375. "schema": {
  7376. "type": "string"
  7377. },
  7378. "required": false
  7379. }
  7380. ],
  7381. "responses": {
  7382. "200": {
  7383. "description": "Updated session",
  7384. "content": {
  7385. "application/json": {
  7386. "schema": {
  7387. "$ref": "#/components/schemas/Session"
  7388. }
  7389. }
  7390. }
  7391. },
  7392. "400": {
  7393. "description": "BadRequest | InvalidRequestError",
  7394. "content": {
  7395. "application/json": {
  7396. "schema": {
  7397. "anyOf": [
  7398. {
  7399. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7400. },
  7401. {
  7402. "$ref": "#/components/schemas/InvalidRequestError"
  7403. }
  7404. ]
  7405. }
  7406. }
  7407. }
  7408. },
  7409. "404": {
  7410. "description": "NotFoundError",
  7411. "content": {
  7412. "application/json": {
  7413. "schema": {
  7414. "$ref": "#/components/schemas/NotFoundError"
  7415. }
  7416. }
  7417. }
  7418. },
  7419. "409": {
  7420. "description": "SessionBusyError",
  7421. "content": {
  7422. "application/json": {
  7423. "schema": {
  7424. "$ref": "#/components/schemas/SessionBusyError"
  7425. }
  7426. }
  7427. }
  7428. }
  7429. },
  7430. "description": "Restore all previously reverted messages in a session.",
  7431. "summary": "Restore reverted messages",
  7432. "x-codeSamples": [
  7433. {
  7434. "lang": "js",
  7435. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7436. }
  7437. ]
  7438. }
  7439. },
  7440. "/session/{sessionID}/permissions/{permissionID}": {
  7441. "post": {
  7442. "tags": ["session"],
  7443. "operationId": "permission.respond",
  7444. "parameters": [
  7445. {
  7446. "name": "sessionID",
  7447. "in": "path",
  7448. "schema": {
  7449. "type": "string",
  7450. "pattern": "^ses"
  7451. },
  7452. "required": true
  7453. },
  7454. {
  7455. "name": "permissionID",
  7456. "in": "path",
  7457. "schema": {
  7458. "type": "string",
  7459. "pattern": "^per"
  7460. },
  7461. "required": true
  7462. },
  7463. {
  7464. "name": "directory",
  7465. "in": "query",
  7466. "schema": {
  7467. "type": "string"
  7468. },
  7469. "required": false
  7470. },
  7471. {
  7472. "name": "workspace",
  7473. "in": "query",
  7474. "schema": {
  7475. "type": "string"
  7476. },
  7477. "required": false
  7478. }
  7479. ],
  7480. "responses": {
  7481. "200": {
  7482. "description": "Permission processed successfully",
  7483. "content": {
  7484. "application/json": {
  7485. "schema": {
  7486. "type": "boolean",
  7487. "description": "Permission processed successfully"
  7488. }
  7489. }
  7490. }
  7491. },
  7492. "400": {
  7493. "description": "BadRequest | InvalidRequestError",
  7494. "content": {
  7495. "application/json": {
  7496. "schema": {
  7497. "anyOf": [
  7498. {
  7499. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7500. },
  7501. {
  7502. "$ref": "#/components/schemas/InvalidRequestError"
  7503. }
  7504. ]
  7505. }
  7506. }
  7507. }
  7508. },
  7509. "404": {
  7510. "description": "NotFoundError | PermissionNotFoundError",
  7511. "content": {
  7512. "application/json": {
  7513. "schema": {
  7514. "anyOf": [
  7515. {
  7516. "$ref": "#/components/schemas/NotFoundError"
  7517. },
  7518. {
  7519. "$ref": "#/components/schemas/PermissionNotFoundError"
  7520. }
  7521. ]
  7522. }
  7523. }
  7524. }
  7525. }
  7526. },
  7527. "description": "Approve or deny a permission request from the AI assistant.",
  7528. "summary": "Respond to permission",
  7529. "deprecated": true,
  7530. "requestBody": {
  7531. "content": {
  7532. "application/json": {
  7533. "schema": {
  7534. "type": "object",
  7535. "properties": {
  7536. "response": {
  7537. "type": "string",
  7538. "enum": ["once", "always", "reject"]
  7539. }
  7540. },
  7541. "required": ["response"],
  7542. "additionalProperties": false
  7543. }
  7544. }
  7545. }
  7546. },
  7547. "x-codeSamples": [
  7548. {
  7549. "lang": "js",
  7550. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7551. }
  7552. ]
  7553. }
  7554. },
  7555. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7556. "delete": {
  7557. "tags": ["session"],
  7558. "operationId": "part.delete",
  7559. "parameters": [
  7560. {
  7561. "name": "sessionID",
  7562. "in": "path",
  7563. "schema": {
  7564. "type": "string",
  7565. "pattern": "^ses"
  7566. },
  7567. "required": true
  7568. },
  7569. {
  7570. "name": "messageID",
  7571. "in": "path",
  7572. "schema": {
  7573. "type": "string",
  7574. "pattern": "^msg"
  7575. },
  7576. "required": true
  7577. },
  7578. {
  7579. "name": "partID",
  7580. "in": "path",
  7581. "schema": {
  7582. "type": "string",
  7583. "pattern": "^prt"
  7584. },
  7585. "required": true
  7586. },
  7587. {
  7588. "name": "directory",
  7589. "in": "query",
  7590. "schema": {
  7591. "type": "string"
  7592. },
  7593. "required": false
  7594. },
  7595. {
  7596. "name": "workspace",
  7597. "in": "query",
  7598. "schema": {
  7599. "type": "string"
  7600. },
  7601. "required": false
  7602. }
  7603. ],
  7604. "responses": {
  7605. "200": {
  7606. "description": "Successfully deleted part",
  7607. "content": {
  7608. "application/json": {
  7609. "schema": {
  7610. "type": "boolean",
  7611. "description": "Successfully deleted part"
  7612. }
  7613. }
  7614. }
  7615. },
  7616. "400": {
  7617. "description": "BadRequest | InvalidRequestError",
  7618. "content": {
  7619. "application/json": {
  7620. "schema": {
  7621. "anyOf": [
  7622. {
  7623. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7624. },
  7625. {
  7626. "$ref": "#/components/schemas/InvalidRequestError"
  7627. }
  7628. ]
  7629. }
  7630. }
  7631. }
  7632. },
  7633. "404": {
  7634. "description": "NotFoundError",
  7635. "content": {
  7636. "application/json": {
  7637. "schema": {
  7638. "$ref": "#/components/schemas/NotFoundError"
  7639. }
  7640. }
  7641. }
  7642. }
  7643. },
  7644. "description": "Delete a part from a message.",
  7645. "x-codeSamples": [
  7646. {
  7647. "lang": "js",
  7648. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7649. }
  7650. ]
  7651. },
  7652. "patch": {
  7653. "tags": ["session"],
  7654. "operationId": "part.update",
  7655. "parameters": [
  7656. {
  7657. "name": "sessionID",
  7658. "in": "path",
  7659. "schema": {
  7660. "type": "string",
  7661. "pattern": "^ses"
  7662. },
  7663. "required": true
  7664. },
  7665. {
  7666. "name": "messageID",
  7667. "in": "path",
  7668. "schema": {
  7669. "type": "string",
  7670. "pattern": "^msg"
  7671. },
  7672. "required": true
  7673. },
  7674. {
  7675. "name": "partID",
  7676. "in": "path",
  7677. "schema": {
  7678. "type": "string",
  7679. "pattern": "^prt"
  7680. },
  7681. "required": true
  7682. },
  7683. {
  7684. "name": "directory",
  7685. "in": "query",
  7686. "schema": {
  7687. "type": "string"
  7688. },
  7689. "required": false
  7690. },
  7691. {
  7692. "name": "workspace",
  7693. "in": "query",
  7694. "schema": {
  7695. "type": "string"
  7696. },
  7697. "required": false
  7698. }
  7699. ],
  7700. "responses": {
  7701. "200": {
  7702. "description": "Successfully updated part",
  7703. "content": {
  7704. "application/json": {
  7705. "schema": {
  7706. "$ref": "#/components/schemas/Part"
  7707. }
  7708. }
  7709. }
  7710. },
  7711. "400": {
  7712. "description": "BadRequest | InvalidRequestError",
  7713. "content": {
  7714. "application/json": {
  7715. "schema": {
  7716. "anyOf": [
  7717. {
  7718. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7719. },
  7720. {
  7721. "$ref": "#/components/schemas/InvalidRequestError"
  7722. }
  7723. ]
  7724. }
  7725. }
  7726. }
  7727. },
  7728. "404": {
  7729. "description": "NotFoundError",
  7730. "content": {
  7731. "application/json": {
  7732. "schema": {
  7733. "$ref": "#/components/schemas/NotFoundError"
  7734. }
  7735. }
  7736. }
  7737. }
  7738. },
  7739. "description": "Update a part in a message.",
  7740. "requestBody": {
  7741. "content": {
  7742. "application/json": {
  7743. "schema": {
  7744. "$ref": "#/components/schemas/Part"
  7745. }
  7746. }
  7747. }
  7748. },
  7749. "x-codeSamples": [
  7750. {
  7751. "lang": "js",
  7752. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  7753. }
  7754. ]
  7755. }
  7756. },
  7757. "/sync/start": {
  7758. "post": {
  7759. "tags": ["sync"],
  7760. "operationId": "sync.start",
  7761. "parameters": [
  7762. {
  7763. "name": "directory",
  7764. "in": "query",
  7765. "schema": {
  7766. "type": "string"
  7767. },
  7768. "required": false
  7769. },
  7770. {
  7771. "name": "workspace",
  7772. "in": "query",
  7773. "schema": {
  7774. "type": "string"
  7775. },
  7776. "required": false
  7777. }
  7778. ],
  7779. "responses": {
  7780. "200": {
  7781. "description": "Workspace sync started",
  7782. "content": {
  7783. "application/json": {
  7784. "schema": {
  7785. "type": "boolean",
  7786. "description": "Workspace sync started"
  7787. }
  7788. }
  7789. }
  7790. },
  7791. "400": {
  7792. "description": "Bad request",
  7793. "content": {
  7794. "application/json": {
  7795. "schema": {
  7796. "$ref": "#/components/schemas/BadRequestError"
  7797. }
  7798. }
  7799. }
  7800. }
  7801. },
  7802. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  7803. "summary": "Start workspace sync",
  7804. "x-codeSamples": [
  7805. {
  7806. "lang": "js",
  7807. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  7808. }
  7809. ]
  7810. }
  7811. },
  7812. "/sync/replay": {
  7813. "post": {
  7814. "tags": ["sync"],
  7815. "operationId": "sync.replay",
  7816. "parameters": [
  7817. {
  7818. "name": "directory",
  7819. "in": "query",
  7820. "schema": {
  7821. "type": "string"
  7822. },
  7823. "required": false
  7824. },
  7825. {
  7826. "name": "workspace",
  7827. "in": "query",
  7828. "schema": {
  7829. "type": "string"
  7830. },
  7831. "required": false
  7832. }
  7833. ],
  7834. "responses": {
  7835. "200": {
  7836. "description": "Replayed sync events",
  7837. "content": {
  7838. "application/json": {
  7839. "schema": {
  7840. "type": "object",
  7841. "properties": {
  7842. "sessionID": {
  7843. "type": "string"
  7844. }
  7845. },
  7846. "required": ["sessionID"],
  7847. "additionalProperties": false,
  7848. "description": "Replayed sync events"
  7849. }
  7850. }
  7851. }
  7852. },
  7853. "400": {
  7854. "description": "BadRequest | InvalidRequestError",
  7855. "content": {
  7856. "application/json": {
  7857. "schema": {
  7858. "anyOf": [
  7859. {
  7860. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7861. },
  7862. {
  7863. "$ref": "#/components/schemas/InvalidRequestError"
  7864. }
  7865. ]
  7866. }
  7867. }
  7868. }
  7869. }
  7870. },
  7871. "description": "Validate and replay a complete sync event history.",
  7872. "summary": "Replay sync events",
  7873. "requestBody": {
  7874. "content": {
  7875. "application/json": {
  7876. "schema": {
  7877. "type": "object",
  7878. "properties": {
  7879. "directory": {
  7880. "type": "string"
  7881. },
  7882. "events": {
  7883. "type": "array",
  7884. "minItems": 1,
  7885. "items": {
  7886. "type": "object",
  7887. "properties": {
  7888. "id": {
  7889. "type": "string"
  7890. },
  7891. "aggregateID": {
  7892. "type": "string"
  7893. },
  7894. "seq": {
  7895. "type": "integer",
  7896. "minimum": 0
  7897. },
  7898. "type": {
  7899. "type": "string"
  7900. },
  7901. "data": {
  7902. "type": "object"
  7903. }
  7904. },
  7905. "required": ["id", "aggregateID", "seq", "type", "data"],
  7906. "additionalProperties": false
  7907. }
  7908. }
  7909. },
  7910. "required": ["directory", "events"],
  7911. "additionalProperties": false
  7912. }
  7913. }
  7914. }
  7915. },
  7916. "x-codeSamples": [
  7917. {
  7918. "lang": "js",
  7919. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7920. }
  7921. ]
  7922. }
  7923. },
  7924. "/sync/steal": {
  7925. "post": {
  7926. "tags": ["sync"],
  7927. "operationId": "sync.steal",
  7928. "parameters": [
  7929. {
  7930. "name": "directory",
  7931. "in": "query",
  7932. "schema": {
  7933. "type": "string"
  7934. },
  7935. "required": false
  7936. },
  7937. {
  7938. "name": "workspace",
  7939. "in": "query",
  7940. "schema": {
  7941. "type": "string"
  7942. },
  7943. "required": false
  7944. }
  7945. ],
  7946. "responses": {
  7947. "200": {
  7948. "description": "Session stolen into workspace",
  7949. "content": {
  7950. "application/json": {
  7951. "schema": {
  7952. "type": "object",
  7953. "properties": {
  7954. "sessionID": {
  7955. "type": "string",
  7956. "pattern": "^ses"
  7957. }
  7958. },
  7959. "required": ["sessionID"],
  7960. "additionalProperties": false,
  7961. "description": "Session stolen into workspace"
  7962. }
  7963. }
  7964. }
  7965. },
  7966. "400": {
  7967. "description": "BadRequest | InvalidRequestError",
  7968. "content": {
  7969. "application/json": {
  7970. "schema": {
  7971. "anyOf": [
  7972. {
  7973. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7974. },
  7975. {
  7976. "$ref": "#/components/schemas/InvalidRequestError"
  7977. }
  7978. ]
  7979. }
  7980. }
  7981. }
  7982. }
  7983. },
  7984. "description": "Update a session to belong to the current workspace through the sync event system.",
  7985. "summary": "Steal session into workspace",
  7986. "requestBody": {
  7987. "content": {
  7988. "application/json": {
  7989. "schema": {
  7990. "type": "object",
  7991. "properties": {
  7992. "sessionID": {
  7993. "type": "string",
  7994. "pattern": "^ses"
  7995. }
  7996. },
  7997. "required": ["sessionID"],
  7998. "additionalProperties": false
  7999. }
  8000. }
  8001. }
  8002. },
  8003. "x-codeSamples": [
  8004. {
  8005. "lang": "js",
  8006. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8007. }
  8008. ]
  8009. }
  8010. },
  8011. "/sync/history": {
  8012. "post": {
  8013. "tags": ["sync"],
  8014. "operationId": "sync.history.list",
  8015. "parameters": [
  8016. {
  8017. "name": "directory",
  8018. "in": "query",
  8019. "schema": {
  8020. "type": "string"
  8021. },
  8022. "required": false
  8023. },
  8024. {
  8025. "name": "workspace",
  8026. "in": "query",
  8027. "schema": {
  8028. "type": "string"
  8029. },
  8030. "required": false
  8031. }
  8032. ],
  8033. "responses": {
  8034. "200": {
  8035. "description": "Sync events",
  8036. "content": {
  8037. "application/json": {
  8038. "schema": {
  8039. "type": "array",
  8040. "items": {
  8041. "type": "object",
  8042. "properties": {
  8043. "id": {
  8044. "type": "string"
  8045. },
  8046. "aggregate_id": {
  8047. "type": "string"
  8048. },
  8049. "seq": {
  8050. "type": "integer",
  8051. "minimum": 0
  8052. },
  8053. "type": {
  8054. "type": "string"
  8055. },
  8056. "data": {
  8057. "type": "object"
  8058. }
  8059. },
  8060. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8061. "additionalProperties": false
  8062. },
  8063. "description": "Sync events"
  8064. }
  8065. }
  8066. }
  8067. },
  8068. "400": {
  8069. "description": "BadRequest | InvalidRequestError",
  8070. "content": {
  8071. "application/json": {
  8072. "schema": {
  8073. "anyOf": [
  8074. {
  8075. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8076. },
  8077. {
  8078. "$ref": "#/components/schemas/InvalidRequestError"
  8079. }
  8080. ]
  8081. }
  8082. }
  8083. }
  8084. }
  8085. },
  8086. "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.",
  8087. "summary": "List sync events",
  8088. "requestBody": {
  8089. "content": {
  8090. "application/json": {
  8091. "schema": {
  8092. "type": "object",
  8093. "additionalProperties": {
  8094. "type": "integer",
  8095. "minimum": 0
  8096. }
  8097. }
  8098. }
  8099. }
  8100. },
  8101. "x-codeSamples": [
  8102. {
  8103. "lang": "js",
  8104. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8105. }
  8106. ]
  8107. }
  8108. },
  8109. "/api/session": {
  8110. "get": {
  8111. "tags": ["v2"],
  8112. "operationId": "v2.session.list",
  8113. "parameters": [
  8114. {
  8115. "name": "directory",
  8116. "in": "query",
  8117. "schema": {
  8118. "type": "string"
  8119. },
  8120. "required": false
  8121. },
  8122. {
  8123. "name": "workspace",
  8124. "in": "query",
  8125. "schema": {
  8126. "type": "string"
  8127. },
  8128. "required": false
  8129. },
  8130. {
  8131. "name": "limit",
  8132. "in": "query",
  8133. "schema": {
  8134. "type": "number"
  8135. },
  8136. "required": false
  8137. },
  8138. {
  8139. "name": "order",
  8140. "in": "query",
  8141. "schema": {
  8142. "type": "string",
  8143. "enum": ["asc", "desc"]
  8144. },
  8145. "required": false
  8146. },
  8147. {
  8148. "name": "path",
  8149. "in": "query",
  8150. "schema": {
  8151. "type": "string"
  8152. },
  8153. "required": false
  8154. },
  8155. {
  8156. "name": "roots",
  8157. "in": "query",
  8158. "schema": {
  8159. "anyOf": [
  8160. {
  8161. "type": "boolean"
  8162. },
  8163. {
  8164. "type": "string",
  8165. "enum": ["true", "false"]
  8166. }
  8167. ]
  8168. },
  8169. "required": false
  8170. },
  8171. {
  8172. "name": "start",
  8173. "in": "query",
  8174. "schema": {
  8175. "type": "number"
  8176. },
  8177. "required": false
  8178. },
  8179. {
  8180. "name": "search",
  8181. "in": "query",
  8182. "schema": {
  8183. "type": "string"
  8184. },
  8185. "required": false
  8186. },
  8187. {
  8188. "name": "cursor",
  8189. "in": "query",
  8190. "schema": {
  8191. "type": "string",
  8192. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  8193. },
  8194. "required": false
  8195. }
  8196. ],
  8197. "security": [],
  8198. "responses": {
  8199. "200": {
  8200. "description": "V2SessionsResponse",
  8201. "content": {
  8202. "application/json": {
  8203. "schema": {
  8204. "$ref": "#/components/schemas/V2SessionsResponse"
  8205. }
  8206. }
  8207. }
  8208. },
  8209. "400": {
  8210. "description": "InvalidCursorError | InvalidRequestError",
  8211. "content": {
  8212. "application/json": {
  8213. "schema": {
  8214. "anyOf": [
  8215. {
  8216. "$ref": "#/components/schemas/InvalidCursorError"
  8217. },
  8218. {
  8219. "$ref": "#/components/schemas/InvalidRequestError"
  8220. },
  8221. {
  8222. "$ref": "#/components/schemas/InvalidRequestError"
  8223. }
  8224. ]
  8225. }
  8226. }
  8227. }
  8228. },
  8229. "401": {
  8230. "description": "UnauthorizedError",
  8231. "content": {
  8232. "application/json": {
  8233. "schema": {
  8234. "$ref": "#/components/schemas/UnauthorizedError"
  8235. }
  8236. }
  8237. }
  8238. }
  8239. },
  8240. "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.",
  8241. "summary": "List v2 sessions",
  8242. "x-codeSamples": [
  8243. {
  8244. "lang": "js",
  8245. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8246. }
  8247. ]
  8248. }
  8249. },
  8250. "/api/session/{sessionID}/prompt": {
  8251. "post": {
  8252. "tags": ["v2"],
  8253. "operationId": "v2.session.prompt",
  8254. "parameters": [
  8255. {
  8256. "name": "sessionID",
  8257. "in": "path",
  8258. "schema": {
  8259. "type": "string",
  8260. "pattern": "^ses"
  8261. },
  8262. "required": true
  8263. },
  8264. {
  8265. "name": "directory",
  8266. "in": "query",
  8267. "schema": {
  8268. "type": "string"
  8269. },
  8270. "required": false
  8271. },
  8272. {
  8273. "name": "workspace",
  8274. "in": "query",
  8275. "schema": {
  8276. "type": "string"
  8277. },
  8278. "required": false
  8279. }
  8280. ],
  8281. "security": [],
  8282. "responses": {
  8283. "200": {
  8284. "description": "Session.Message",
  8285. "content": {
  8286. "application/json": {
  8287. "schema": {
  8288. "$ref": "#/components/schemas/SessionMessage"
  8289. }
  8290. }
  8291. }
  8292. },
  8293. "400": {
  8294. "description": "InvalidRequestError",
  8295. "content": {
  8296. "application/json": {
  8297. "schema": {
  8298. "$ref": "#/components/schemas/InvalidRequestError"
  8299. }
  8300. }
  8301. }
  8302. },
  8303. "401": {
  8304. "description": "UnauthorizedError",
  8305. "content": {
  8306. "application/json": {
  8307. "schema": {
  8308. "$ref": "#/components/schemas/UnauthorizedError"
  8309. }
  8310. }
  8311. }
  8312. },
  8313. "404": {
  8314. "description": "SessionNotFoundError",
  8315. "content": {
  8316. "application/json": {
  8317. "schema": {
  8318. "$ref": "#/components/schemas/SessionNotFoundError"
  8319. }
  8320. }
  8321. }
  8322. },
  8323. "503": {
  8324. "description": "ServiceUnavailableError",
  8325. "content": {
  8326. "application/json": {
  8327. "schema": {
  8328. "$ref": "#/components/schemas/ServiceUnavailableError"
  8329. }
  8330. }
  8331. }
  8332. }
  8333. },
  8334. "description": "Create a v2 session message and queue it for the agent loop.",
  8335. "summary": "Send v2 message",
  8336. "requestBody": {
  8337. "content": {
  8338. "application/json": {
  8339. "schema": {
  8340. "type": "object",
  8341. "properties": {
  8342. "prompt": {
  8343. "$ref": "#/components/schemas/Prompt"
  8344. },
  8345. "delivery": {
  8346. "$ref": "#/components/schemas/SessionDelivery"
  8347. }
  8348. },
  8349. "required": ["prompt"],
  8350. "additionalProperties": false
  8351. }
  8352. }
  8353. }
  8354. },
  8355. "x-codeSamples": [
  8356. {
  8357. "lang": "js",
  8358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  8359. }
  8360. ]
  8361. }
  8362. },
  8363. "/api/session/{sessionID}/compact": {
  8364. "post": {
  8365. "tags": ["v2"],
  8366. "operationId": "v2.session.compact",
  8367. "parameters": [
  8368. {
  8369. "name": "sessionID",
  8370. "in": "path",
  8371. "schema": {
  8372. "type": "string",
  8373. "pattern": "^ses"
  8374. },
  8375. "required": true
  8376. },
  8377. {
  8378. "name": "directory",
  8379. "in": "query",
  8380. "schema": {
  8381. "type": "string"
  8382. },
  8383. "required": false
  8384. },
  8385. {
  8386. "name": "workspace",
  8387. "in": "query",
  8388. "schema": {
  8389. "type": "string"
  8390. },
  8391. "required": false
  8392. }
  8393. ],
  8394. "security": [],
  8395. "responses": {
  8396. "204": {
  8397. "description": "<No Content>"
  8398. },
  8399. "400": {
  8400. "description": "InvalidRequestError",
  8401. "content": {
  8402. "application/json": {
  8403. "schema": {
  8404. "$ref": "#/components/schemas/InvalidRequestError"
  8405. }
  8406. }
  8407. }
  8408. },
  8409. "401": {
  8410. "description": "UnauthorizedError",
  8411. "content": {
  8412. "application/json": {
  8413. "schema": {
  8414. "$ref": "#/components/schemas/UnauthorizedError"
  8415. }
  8416. }
  8417. }
  8418. },
  8419. "404": {
  8420. "description": "SessionNotFoundError",
  8421. "content": {
  8422. "application/json": {
  8423. "schema": {
  8424. "$ref": "#/components/schemas/SessionNotFoundError"
  8425. }
  8426. }
  8427. }
  8428. },
  8429. "503": {
  8430. "description": "ServiceUnavailableError",
  8431. "content": {
  8432. "application/json": {
  8433. "schema": {
  8434. "$ref": "#/components/schemas/ServiceUnavailableError"
  8435. }
  8436. }
  8437. }
  8438. }
  8439. },
  8440. "description": "Compact a v2 session conversation.",
  8441. "summary": "Compact v2 session",
  8442. "x-codeSamples": [
  8443. {
  8444. "lang": "js",
  8445. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8446. }
  8447. ]
  8448. }
  8449. },
  8450. "/api/session/{sessionID}/wait": {
  8451. "post": {
  8452. "tags": ["v2"],
  8453. "operationId": "v2.session.wait",
  8454. "parameters": [
  8455. {
  8456. "name": "sessionID",
  8457. "in": "path",
  8458. "schema": {
  8459. "type": "string",
  8460. "pattern": "^ses"
  8461. },
  8462. "required": true
  8463. },
  8464. {
  8465. "name": "directory",
  8466. "in": "query",
  8467. "schema": {
  8468. "type": "string"
  8469. },
  8470. "required": false
  8471. },
  8472. {
  8473. "name": "workspace",
  8474. "in": "query",
  8475. "schema": {
  8476. "type": "string"
  8477. },
  8478. "required": false
  8479. }
  8480. ],
  8481. "security": [],
  8482. "responses": {
  8483. "204": {
  8484. "description": "<No Content>"
  8485. },
  8486. "400": {
  8487. "description": "InvalidRequestError",
  8488. "content": {
  8489. "application/json": {
  8490. "schema": {
  8491. "$ref": "#/components/schemas/InvalidRequestError"
  8492. }
  8493. }
  8494. }
  8495. },
  8496. "401": {
  8497. "description": "UnauthorizedError",
  8498. "content": {
  8499. "application/json": {
  8500. "schema": {
  8501. "$ref": "#/components/schemas/UnauthorizedError"
  8502. }
  8503. }
  8504. }
  8505. },
  8506. "404": {
  8507. "description": "SessionNotFoundError",
  8508. "content": {
  8509. "application/json": {
  8510. "schema": {
  8511. "$ref": "#/components/schemas/SessionNotFoundError"
  8512. }
  8513. }
  8514. }
  8515. },
  8516. "503": {
  8517. "description": "ServiceUnavailableError",
  8518. "content": {
  8519. "application/json": {
  8520. "schema": {
  8521. "$ref": "#/components/schemas/ServiceUnavailableError"
  8522. }
  8523. }
  8524. }
  8525. }
  8526. },
  8527. "description": "Wait for a v2 session agent loop to become idle.",
  8528. "summary": "Wait for v2 session",
  8529. "x-codeSamples": [
  8530. {
  8531. "lang": "js",
  8532. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8533. }
  8534. ]
  8535. }
  8536. },
  8537. "/api/session/{sessionID}/context": {
  8538. "get": {
  8539. "tags": ["v2"],
  8540. "operationId": "v2.session.context",
  8541. "parameters": [
  8542. {
  8543. "name": "sessionID",
  8544. "in": "path",
  8545. "schema": {
  8546. "type": "string",
  8547. "pattern": "^ses"
  8548. },
  8549. "required": true
  8550. },
  8551. {
  8552. "name": "directory",
  8553. "in": "query",
  8554. "schema": {
  8555. "type": "string"
  8556. },
  8557. "required": false
  8558. },
  8559. {
  8560. "name": "workspace",
  8561. "in": "query",
  8562. "schema": {
  8563. "type": "string"
  8564. },
  8565. "required": false
  8566. }
  8567. ],
  8568. "security": [],
  8569. "responses": {
  8570. "200": {
  8571. "description": "Success",
  8572. "content": {
  8573. "application/json": {
  8574. "schema": {
  8575. "type": "array",
  8576. "items": {
  8577. "$ref": "#/components/schemas/SessionMessage"
  8578. }
  8579. }
  8580. }
  8581. }
  8582. },
  8583. "400": {
  8584. "description": "InvalidRequestError",
  8585. "content": {
  8586. "application/json": {
  8587. "schema": {
  8588. "$ref": "#/components/schemas/InvalidRequestError"
  8589. }
  8590. }
  8591. }
  8592. },
  8593. "401": {
  8594. "description": "UnauthorizedError",
  8595. "content": {
  8596. "application/json": {
  8597. "schema": {
  8598. "$ref": "#/components/schemas/UnauthorizedError"
  8599. }
  8600. }
  8601. }
  8602. },
  8603. "404": {
  8604. "description": "SessionNotFoundError",
  8605. "content": {
  8606. "application/json": {
  8607. "schema": {
  8608. "$ref": "#/components/schemas/SessionNotFoundError"
  8609. }
  8610. }
  8611. }
  8612. },
  8613. "500": {
  8614. "description": "UnknownError",
  8615. "content": {
  8616. "application/json": {
  8617. "schema": {
  8618. "$ref": "#/components/schemas/UnknownError1"
  8619. }
  8620. }
  8621. }
  8622. }
  8623. },
  8624. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8625. "summary": "Get v2 session context",
  8626. "x-codeSamples": [
  8627. {
  8628. "lang": "js",
  8629. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8630. }
  8631. ]
  8632. }
  8633. },
  8634. "/api/session/{sessionID}/message": {
  8635. "get": {
  8636. "tags": ["v2 messages"],
  8637. "operationId": "v2.session.messages",
  8638. "parameters": [
  8639. {
  8640. "name": "sessionID",
  8641. "in": "path",
  8642. "schema": {
  8643. "type": "string",
  8644. "pattern": "^ses"
  8645. },
  8646. "required": true
  8647. },
  8648. {
  8649. "name": "directory",
  8650. "in": "query",
  8651. "schema": {
  8652. "type": "string"
  8653. },
  8654. "required": false
  8655. },
  8656. {
  8657. "name": "workspace",
  8658. "in": "query",
  8659. "schema": {
  8660. "type": "string"
  8661. },
  8662. "required": false
  8663. },
  8664. {
  8665. "name": "limit",
  8666. "in": "query",
  8667. "schema": {
  8668. "type": "number"
  8669. },
  8670. "required": false
  8671. },
  8672. {
  8673. "name": "order",
  8674. "in": "query",
  8675. "schema": {
  8676. "type": "string",
  8677. "enum": ["asc", "desc"]
  8678. },
  8679. "required": false
  8680. },
  8681. {
  8682. "name": "cursor",
  8683. "in": "query",
  8684. "schema": {
  8685. "type": "string",
  8686. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8687. },
  8688. "required": false
  8689. }
  8690. ],
  8691. "security": [],
  8692. "responses": {
  8693. "200": {
  8694. "description": "V2SessionMessagesResponse",
  8695. "content": {
  8696. "application/json": {
  8697. "schema": {
  8698. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8699. }
  8700. }
  8701. }
  8702. },
  8703. "400": {
  8704. "description": "InvalidCursorError | InvalidRequestError",
  8705. "content": {
  8706. "application/json": {
  8707. "schema": {
  8708. "anyOf": [
  8709. {
  8710. "$ref": "#/components/schemas/InvalidCursorError"
  8711. },
  8712. {
  8713. "$ref": "#/components/schemas/InvalidRequestError"
  8714. }
  8715. ]
  8716. }
  8717. }
  8718. }
  8719. },
  8720. "401": {
  8721. "description": "UnauthorizedError",
  8722. "content": {
  8723. "application/json": {
  8724. "schema": {
  8725. "$ref": "#/components/schemas/UnauthorizedError"
  8726. }
  8727. }
  8728. }
  8729. },
  8730. "404": {
  8731. "description": "SessionNotFoundError",
  8732. "content": {
  8733. "application/json": {
  8734. "schema": {
  8735. "$ref": "#/components/schemas/SessionNotFoundError"
  8736. }
  8737. }
  8738. }
  8739. },
  8740. "500": {
  8741. "description": "UnknownError",
  8742. "content": {
  8743. "application/json": {
  8744. "schema": {
  8745. "$ref": "#/components/schemas/UnknownError1"
  8746. }
  8747. }
  8748. }
  8749. }
  8750. },
  8751. "description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  8752. "summary": "Get v2 session messages",
  8753. "x-codeSamples": [
  8754. {
  8755. "lang": "js",
  8756. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  8757. }
  8758. ]
  8759. }
  8760. },
  8761. "/api/model": {
  8762. "get": {
  8763. "tags": ["v2 models"],
  8764. "operationId": "v2.model.list",
  8765. "parameters": [
  8766. {
  8767. "name": "location",
  8768. "in": "query",
  8769. "schema": {
  8770. "type": "object",
  8771. "properties": {
  8772. "directory": {
  8773. "type": "string"
  8774. },
  8775. "workspace": {
  8776. "type": "string"
  8777. }
  8778. },
  8779. "additionalProperties": false
  8780. },
  8781. "required": false,
  8782. "style": "deepObject",
  8783. "explode": true
  8784. }
  8785. ],
  8786. "security": [],
  8787. "responses": {
  8788. "200": {
  8789. "description": "Success",
  8790. "content": {
  8791. "application/json": {
  8792. "schema": {
  8793. "type": "array",
  8794. "items": {
  8795. "$ref": "#/components/schemas/ModelV2Info"
  8796. }
  8797. }
  8798. }
  8799. }
  8800. },
  8801. "400": {
  8802. "description": "InvalidRequestError",
  8803. "content": {
  8804. "application/json": {
  8805. "schema": {
  8806. "$ref": "#/components/schemas/InvalidRequestError"
  8807. }
  8808. }
  8809. }
  8810. },
  8811. "401": {
  8812. "description": "UnauthorizedError",
  8813. "content": {
  8814. "application/json": {
  8815. "schema": {
  8816. "$ref": "#/components/schemas/UnauthorizedError"
  8817. }
  8818. }
  8819. }
  8820. },
  8821. "503": {
  8822. "description": "ServiceUnavailableError",
  8823. "content": {
  8824. "application/json": {
  8825. "schema": {
  8826. "$ref": "#/components/schemas/ServiceUnavailableError"
  8827. }
  8828. }
  8829. }
  8830. }
  8831. },
  8832. "description": "Retrieve available v2 models ordered by release date.",
  8833. "summary": "List v2 models",
  8834. "x-codeSamples": [
  8835. {
  8836. "lang": "js",
  8837. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  8838. }
  8839. ]
  8840. }
  8841. },
  8842. "/api/provider": {
  8843. "get": {
  8844. "tags": ["v2 providers"],
  8845. "operationId": "v2.provider.list",
  8846. "parameters": [
  8847. {
  8848. "name": "location",
  8849. "in": "query",
  8850. "schema": {
  8851. "type": "object",
  8852. "properties": {
  8853. "directory": {
  8854. "type": "string"
  8855. },
  8856. "workspace": {
  8857. "type": "string"
  8858. }
  8859. },
  8860. "additionalProperties": false
  8861. },
  8862. "required": false,
  8863. "style": "deepObject",
  8864. "explode": true
  8865. }
  8866. ],
  8867. "security": [],
  8868. "responses": {
  8869. "200": {
  8870. "description": "Success",
  8871. "content": {
  8872. "application/json": {
  8873. "schema": {
  8874. "type": "array",
  8875. "items": {
  8876. "$ref": "#/components/schemas/ProviderV2Info"
  8877. }
  8878. }
  8879. }
  8880. }
  8881. },
  8882. "400": {
  8883. "description": "InvalidRequestError",
  8884. "content": {
  8885. "application/json": {
  8886. "schema": {
  8887. "$ref": "#/components/schemas/InvalidRequestError"
  8888. }
  8889. }
  8890. }
  8891. },
  8892. "401": {
  8893. "description": "UnauthorizedError",
  8894. "content": {
  8895. "application/json": {
  8896. "schema": {
  8897. "$ref": "#/components/schemas/UnauthorizedError"
  8898. }
  8899. }
  8900. }
  8901. },
  8902. "503": {
  8903. "description": "ServiceUnavailableError",
  8904. "content": {
  8905. "application/json": {
  8906. "schema": {
  8907. "$ref": "#/components/schemas/ServiceUnavailableError"
  8908. }
  8909. }
  8910. }
  8911. }
  8912. },
  8913. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  8914. "summary": "List v2 providers",
  8915. "x-codeSamples": [
  8916. {
  8917. "lang": "js",
  8918. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  8919. }
  8920. ]
  8921. }
  8922. },
  8923. "/api/provider/{providerID}": {
  8924. "get": {
  8925. "tags": ["v2 providers"],
  8926. "operationId": "v2.provider.get",
  8927. "parameters": [
  8928. {
  8929. "name": "providerID",
  8930. "in": "path",
  8931. "schema": {
  8932. "type": "string"
  8933. },
  8934. "required": true
  8935. },
  8936. {
  8937. "name": "location",
  8938. "in": "query",
  8939. "schema": {
  8940. "type": "object",
  8941. "properties": {
  8942. "directory": {
  8943. "type": "string"
  8944. },
  8945. "workspace": {
  8946. "type": "string"
  8947. }
  8948. },
  8949. "additionalProperties": false
  8950. },
  8951. "required": false,
  8952. "style": "deepObject",
  8953. "explode": true
  8954. }
  8955. ],
  8956. "security": [],
  8957. "responses": {
  8958. "200": {
  8959. "description": "ProviderV2.Info",
  8960. "content": {
  8961. "application/json": {
  8962. "schema": {
  8963. "$ref": "#/components/schemas/ProviderV2Info"
  8964. }
  8965. }
  8966. }
  8967. },
  8968. "400": {
  8969. "description": "InvalidRequestError",
  8970. "content": {
  8971. "application/json": {
  8972. "schema": {
  8973. "$ref": "#/components/schemas/InvalidRequestError"
  8974. }
  8975. }
  8976. }
  8977. },
  8978. "401": {
  8979. "description": "UnauthorizedError",
  8980. "content": {
  8981. "application/json": {
  8982. "schema": {
  8983. "$ref": "#/components/schemas/UnauthorizedError"
  8984. }
  8985. }
  8986. }
  8987. },
  8988. "404": {
  8989. "description": "ProviderNotFoundError",
  8990. "content": {
  8991. "application/json": {
  8992. "schema": {
  8993. "$ref": "#/components/schemas/ProviderNotFoundError"
  8994. }
  8995. }
  8996. }
  8997. },
  8998. "503": {
  8999. "description": "ServiceUnavailableError",
  9000. "content": {
  9001. "application/json": {
  9002. "schema": {
  9003. "$ref": "#/components/schemas/ServiceUnavailableError"
  9004. }
  9005. }
  9006. }
  9007. }
  9008. },
  9009. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  9010. "summary": "Get v2 provider",
  9011. "x-codeSamples": [
  9012. {
  9013. "lang": "js",
  9014. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  9015. }
  9016. ]
  9017. }
  9018. },
  9019. "/tui/append-prompt": {
  9020. "post": {
  9021. "tags": ["tui"],
  9022. "operationId": "tui.appendPrompt",
  9023. "parameters": [
  9024. {
  9025. "name": "directory",
  9026. "in": "query",
  9027. "schema": {
  9028. "type": "string"
  9029. },
  9030. "required": false
  9031. },
  9032. {
  9033. "name": "workspace",
  9034. "in": "query",
  9035. "schema": {
  9036. "type": "string"
  9037. },
  9038. "required": false
  9039. }
  9040. ],
  9041. "responses": {
  9042. "200": {
  9043. "description": "Prompt processed successfully",
  9044. "content": {
  9045. "application/json": {
  9046. "schema": {
  9047. "type": "boolean",
  9048. "description": "Prompt processed successfully"
  9049. }
  9050. }
  9051. }
  9052. },
  9053. "400": {
  9054. "description": "BadRequest | InvalidRequestError",
  9055. "content": {
  9056. "application/json": {
  9057. "schema": {
  9058. "anyOf": [
  9059. {
  9060. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9061. },
  9062. {
  9063. "$ref": "#/components/schemas/InvalidRequestError"
  9064. }
  9065. ]
  9066. }
  9067. }
  9068. }
  9069. }
  9070. },
  9071. "description": "Append prompt to the TUI.",
  9072. "summary": "Append TUI prompt",
  9073. "requestBody": {
  9074. "content": {
  9075. "application/json": {
  9076. "schema": {
  9077. "type": "object",
  9078. "properties": {
  9079. "text": {
  9080. "type": "string"
  9081. }
  9082. },
  9083. "required": ["text"],
  9084. "additionalProperties": false
  9085. }
  9086. }
  9087. }
  9088. },
  9089. "x-codeSamples": [
  9090. {
  9091. "lang": "js",
  9092. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  9093. }
  9094. ]
  9095. }
  9096. },
  9097. "/tui/open-help": {
  9098. "post": {
  9099. "tags": ["tui"],
  9100. "operationId": "tui.openHelp",
  9101. "parameters": [
  9102. {
  9103. "name": "directory",
  9104. "in": "query",
  9105. "schema": {
  9106. "type": "string"
  9107. },
  9108. "required": false
  9109. },
  9110. {
  9111. "name": "workspace",
  9112. "in": "query",
  9113. "schema": {
  9114. "type": "string"
  9115. },
  9116. "required": false
  9117. }
  9118. ],
  9119. "responses": {
  9120. "200": {
  9121. "description": "Help dialog opened successfully",
  9122. "content": {
  9123. "application/json": {
  9124. "schema": {
  9125. "type": "boolean",
  9126. "description": "Help dialog opened successfully"
  9127. }
  9128. }
  9129. }
  9130. },
  9131. "400": {
  9132. "description": "Bad request",
  9133. "content": {
  9134. "application/json": {
  9135. "schema": {
  9136. "$ref": "#/components/schemas/BadRequestError"
  9137. }
  9138. }
  9139. }
  9140. }
  9141. },
  9142. "description": "Open the help dialog in the TUI to display user assistance information.",
  9143. "summary": "Open help dialog",
  9144. "x-codeSamples": [
  9145. {
  9146. "lang": "js",
  9147. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  9148. }
  9149. ]
  9150. }
  9151. },
  9152. "/tui/open-sessions": {
  9153. "post": {
  9154. "tags": ["tui"],
  9155. "operationId": "tui.openSessions",
  9156. "parameters": [
  9157. {
  9158. "name": "directory",
  9159. "in": "query",
  9160. "schema": {
  9161. "type": "string"
  9162. },
  9163. "required": false
  9164. },
  9165. {
  9166. "name": "workspace",
  9167. "in": "query",
  9168. "schema": {
  9169. "type": "string"
  9170. },
  9171. "required": false
  9172. }
  9173. ],
  9174. "responses": {
  9175. "200": {
  9176. "description": "Session dialog opened successfully",
  9177. "content": {
  9178. "application/json": {
  9179. "schema": {
  9180. "type": "boolean",
  9181. "description": "Session dialog opened successfully"
  9182. }
  9183. }
  9184. }
  9185. },
  9186. "400": {
  9187. "description": "Bad request",
  9188. "content": {
  9189. "application/json": {
  9190. "schema": {
  9191. "$ref": "#/components/schemas/BadRequestError"
  9192. }
  9193. }
  9194. }
  9195. }
  9196. },
  9197. "description": "Open the session dialog.",
  9198. "summary": "Open sessions dialog",
  9199. "x-codeSamples": [
  9200. {
  9201. "lang": "js",
  9202. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9203. }
  9204. ]
  9205. }
  9206. },
  9207. "/tui/open-themes": {
  9208. "post": {
  9209. "tags": ["tui"],
  9210. "operationId": "tui.openThemes",
  9211. "parameters": [
  9212. {
  9213. "name": "directory",
  9214. "in": "query",
  9215. "schema": {
  9216. "type": "string"
  9217. },
  9218. "required": false
  9219. },
  9220. {
  9221. "name": "workspace",
  9222. "in": "query",
  9223. "schema": {
  9224. "type": "string"
  9225. },
  9226. "required": false
  9227. }
  9228. ],
  9229. "responses": {
  9230. "200": {
  9231. "description": "Theme dialog opened successfully",
  9232. "content": {
  9233. "application/json": {
  9234. "schema": {
  9235. "type": "boolean",
  9236. "description": "Theme dialog opened successfully"
  9237. }
  9238. }
  9239. }
  9240. },
  9241. "400": {
  9242. "description": "Bad request",
  9243. "content": {
  9244. "application/json": {
  9245. "schema": {
  9246. "$ref": "#/components/schemas/BadRequestError"
  9247. }
  9248. }
  9249. }
  9250. }
  9251. },
  9252. "description": "Open the theme dialog.",
  9253. "summary": "Open themes dialog",
  9254. "x-codeSamples": [
  9255. {
  9256. "lang": "js",
  9257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9258. }
  9259. ]
  9260. }
  9261. },
  9262. "/tui/open-models": {
  9263. "post": {
  9264. "tags": ["tui"],
  9265. "operationId": "tui.openModels",
  9266. "parameters": [
  9267. {
  9268. "name": "directory",
  9269. "in": "query",
  9270. "schema": {
  9271. "type": "string"
  9272. },
  9273. "required": false
  9274. },
  9275. {
  9276. "name": "workspace",
  9277. "in": "query",
  9278. "schema": {
  9279. "type": "string"
  9280. },
  9281. "required": false
  9282. }
  9283. ],
  9284. "responses": {
  9285. "200": {
  9286. "description": "Model dialog opened successfully",
  9287. "content": {
  9288. "application/json": {
  9289. "schema": {
  9290. "type": "boolean",
  9291. "description": "Model dialog opened successfully"
  9292. }
  9293. }
  9294. }
  9295. },
  9296. "400": {
  9297. "description": "Bad request",
  9298. "content": {
  9299. "application/json": {
  9300. "schema": {
  9301. "$ref": "#/components/schemas/BadRequestError"
  9302. }
  9303. }
  9304. }
  9305. }
  9306. },
  9307. "description": "Open the model dialog.",
  9308. "summary": "Open models dialog",
  9309. "x-codeSamples": [
  9310. {
  9311. "lang": "js",
  9312. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9313. }
  9314. ]
  9315. }
  9316. },
  9317. "/tui/submit-prompt": {
  9318. "post": {
  9319. "tags": ["tui"],
  9320. "operationId": "tui.submitPrompt",
  9321. "parameters": [
  9322. {
  9323. "name": "directory",
  9324. "in": "query",
  9325. "schema": {
  9326. "type": "string"
  9327. },
  9328. "required": false
  9329. },
  9330. {
  9331. "name": "workspace",
  9332. "in": "query",
  9333. "schema": {
  9334. "type": "string"
  9335. },
  9336. "required": false
  9337. }
  9338. ],
  9339. "responses": {
  9340. "200": {
  9341. "description": "Prompt submitted successfully",
  9342. "content": {
  9343. "application/json": {
  9344. "schema": {
  9345. "type": "boolean",
  9346. "description": "Prompt submitted successfully"
  9347. }
  9348. }
  9349. }
  9350. },
  9351. "400": {
  9352. "description": "Bad request",
  9353. "content": {
  9354. "application/json": {
  9355. "schema": {
  9356. "$ref": "#/components/schemas/BadRequestError"
  9357. }
  9358. }
  9359. }
  9360. }
  9361. },
  9362. "description": "Submit the prompt.",
  9363. "summary": "Submit TUI prompt",
  9364. "x-codeSamples": [
  9365. {
  9366. "lang": "js",
  9367. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9368. }
  9369. ]
  9370. }
  9371. },
  9372. "/tui/clear-prompt": {
  9373. "post": {
  9374. "tags": ["tui"],
  9375. "operationId": "tui.clearPrompt",
  9376. "parameters": [
  9377. {
  9378. "name": "directory",
  9379. "in": "query",
  9380. "schema": {
  9381. "type": "string"
  9382. },
  9383. "required": false
  9384. },
  9385. {
  9386. "name": "workspace",
  9387. "in": "query",
  9388. "schema": {
  9389. "type": "string"
  9390. },
  9391. "required": false
  9392. }
  9393. ],
  9394. "responses": {
  9395. "200": {
  9396. "description": "Prompt cleared successfully",
  9397. "content": {
  9398. "application/json": {
  9399. "schema": {
  9400. "type": "boolean",
  9401. "description": "Prompt cleared successfully"
  9402. }
  9403. }
  9404. }
  9405. },
  9406. "400": {
  9407. "description": "Bad request",
  9408. "content": {
  9409. "application/json": {
  9410. "schema": {
  9411. "$ref": "#/components/schemas/BadRequestError"
  9412. }
  9413. }
  9414. }
  9415. }
  9416. },
  9417. "description": "Clear the prompt.",
  9418. "summary": "Clear TUI prompt",
  9419. "x-codeSamples": [
  9420. {
  9421. "lang": "js",
  9422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9423. }
  9424. ]
  9425. }
  9426. },
  9427. "/tui/execute-command": {
  9428. "post": {
  9429. "tags": ["tui"],
  9430. "operationId": "tui.executeCommand",
  9431. "parameters": [
  9432. {
  9433. "name": "directory",
  9434. "in": "query",
  9435. "schema": {
  9436. "type": "string"
  9437. },
  9438. "required": false
  9439. },
  9440. {
  9441. "name": "workspace",
  9442. "in": "query",
  9443. "schema": {
  9444. "type": "string"
  9445. },
  9446. "required": false
  9447. }
  9448. ],
  9449. "responses": {
  9450. "200": {
  9451. "description": "Command executed successfully",
  9452. "content": {
  9453. "application/json": {
  9454. "schema": {
  9455. "type": "boolean",
  9456. "description": "Command executed successfully"
  9457. }
  9458. }
  9459. }
  9460. },
  9461. "400": {
  9462. "description": "BadRequest | InvalidRequestError",
  9463. "content": {
  9464. "application/json": {
  9465. "schema": {
  9466. "anyOf": [
  9467. {
  9468. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9469. },
  9470. {
  9471. "$ref": "#/components/schemas/InvalidRequestError"
  9472. }
  9473. ]
  9474. }
  9475. }
  9476. }
  9477. }
  9478. },
  9479. "description": "Execute a TUI command.",
  9480. "summary": "Execute TUI command",
  9481. "requestBody": {
  9482. "content": {
  9483. "application/json": {
  9484. "schema": {
  9485. "type": "object",
  9486. "properties": {
  9487. "command": {
  9488. "type": "string"
  9489. }
  9490. },
  9491. "required": ["command"],
  9492. "additionalProperties": false
  9493. }
  9494. }
  9495. }
  9496. },
  9497. "x-codeSamples": [
  9498. {
  9499. "lang": "js",
  9500. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9501. }
  9502. ]
  9503. }
  9504. },
  9505. "/tui/show-toast": {
  9506. "post": {
  9507. "tags": ["tui"],
  9508. "operationId": "tui.showToast",
  9509. "parameters": [
  9510. {
  9511. "name": "directory",
  9512. "in": "query",
  9513. "schema": {
  9514. "type": "string"
  9515. },
  9516. "required": false
  9517. },
  9518. {
  9519. "name": "workspace",
  9520. "in": "query",
  9521. "schema": {
  9522. "type": "string"
  9523. },
  9524. "required": false
  9525. }
  9526. ],
  9527. "responses": {
  9528. "200": {
  9529. "description": "Toast notification shown successfully",
  9530. "content": {
  9531. "application/json": {
  9532. "schema": {
  9533. "type": "boolean",
  9534. "description": "Toast notification shown successfully"
  9535. }
  9536. }
  9537. }
  9538. },
  9539. "400": {
  9540. "description": "Bad request",
  9541. "content": {
  9542. "application/json": {
  9543. "schema": {
  9544. "$ref": "#/components/schemas/BadRequestError"
  9545. }
  9546. }
  9547. }
  9548. }
  9549. },
  9550. "description": "Show a toast notification in the TUI.",
  9551. "summary": "Show TUI toast",
  9552. "requestBody": {
  9553. "content": {
  9554. "application/json": {
  9555. "schema": {
  9556. "type": "object",
  9557. "properties": {
  9558. "title": {
  9559. "type": "string"
  9560. },
  9561. "message": {
  9562. "type": "string"
  9563. },
  9564. "variant": {
  9565. "type": "string",
  9566. "enum": ["info", "success", "warning", "error"]
  9567. },
  9568. "duration": {
  9569. "type": "integer",
  9570. "exclusiveMinimum": 0
  9571. }
  9572. },
  9573. "required": ["message", "variant"],
  9574. "additionalProperties": false
  9575. }
  9576. }
  9577. }
  9578. },
  9579. "x-codeSamples": [
  9580. {
  9581. "lang": "js",
  9582. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9583. }
  9584. ]
  9585. }
  9586. },
  9587. "/tui/publish": {
  9588. "post": {
  9589. "tags": ["tui"],
  9590. "operationId": "tui.publish",
  9591. "parameters": [
  9592. {
  9593. "name": "directory",
  9594. "in": "query",
  9595. "schema": {
  9596. "type": "string"
  9597. },
  9598. "required": false
  9599. },
  9600. {
  9601. "name": "workspace",
  9602. "in": "query",
  9603. "schema": {
  9604. "type": "string"
  9605. },
  9606. "required": false
  9607. }
  9608. ],
  9609. "responses": {
  9610. "200": {
  9611. "description": "Event published successfully",
  9612. "content": {
  9613. "application/json": {
  9614. "schema": {
  9615. "type": "boolean",
  9616. "description": "Event published successfully"
  9617. }
  9618. }
  9619. }
  9620. },
  9621. "400": {
  9622. "description": "BadRequest | InvalidRequestError",
  9623. "content": {
  9624. "application/json": {
  9625. "schema": {
  9626. "anyOf": [
  9627. {
  9628. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9629. },
  9630. {
  9631. "$ref": "#/components/schemas/InvalidRequestError"
  9632. }
  9633. ]
  9634. }
  9635. }
  9636. }
  9637. }
  9638. },
  9639. "description": "Publish a TUI event.",
  9640. "summary": "Publish TUI event",
  9641. "requestBody": {
  9642. "content": {
  9643. "application/json": {
  9644. "schema": {
  9645. "anyOf": [
  9646. {
  9647. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9648. },
  9649. {
  9650. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9651. },
  9652. {
  9653. "$ref": "#/components/schemas/EventTuiToastShow"
  9654. },
  9655. {
  9656. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9657. }
  9658. ]
  9659. }
  9660. }
  9661. }
  9662. },
  9663. "x-codeSamples": [
  9664. {
  9665. "lang": "js",
  9666. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9667. }
  9668. ]
  9669. }
  9670. },
  9671. "/tui/select-session": {
  9672. "post": {
  9673. "tags": ["tui"],
  9674. "operationId": "tui.selectSession",
  9675. "parameters": [
  9676. {
  9677. "name": "directory",
  9678. "in": "query",
  9679. "schema": {
  9680. "type": "string"
  9681. },
  9682. "required": false
  9683. },
  9684. {
  9685. "name": "workspace",
  9686. "in": "query",
  9687. "schema": {
  9688. "type": "string"
  9689. },
  9690. "required": false
  9691. }
  9692. ],
  9693. "responses": {
  9694. "200": {
  9695. "description": "Session selected successfully",
  9696. "content": {
  9697. "application/json": {
  9698. "schema": {
  9699. "type": "boolean",
  9700. "description": "Session selected successfully"
  9701. }
  9702. }
  9703. }
  9704. },
  9705. "400": {
  9706. "description": "BadRequest | InvalidRequestError",
  9707. "content": {
  9708. "application/json": {
  9709. "schema": {
  9710. "anyOf": [
  9711. {
  9712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9713. },
  9714. {
  9715. "$ref": "#/components/schemas/InvalidRequestError"
  9716. }
  9717. ]
  9718. }
  9719. }
  9720. }
  9721. },
  9722. "404": {
  9723. "description": "NotFoundError",
  9724. "content": {
  9725. "application/json": {
  9726. "schema": {
  9727. "$ref": "#/components/schemas/NotFoundError"
  9728. }
  9729. }
  9730. }
  9731. }
  9732. },
  9733. "description": "Navigate the TUI to display the specified session.",
  9734. "summary": "Select session",
  9735. "requestBody": {
  9736. "content": {
  9737. "application/json": {
  9738. "schema": {
  9739. "type": "object",
  9740. "properties": {
  9741. "sessionID": {
  9742. "type": "string",
  9743. "pattern": "^ses",
  9744. "description": "Session ID to navigate to"
  9745. }
  9746. },
  9747. "required": ["sessionID"],
  9748. "additionalProperties": false
  9749. }
  9750. }
  9751. }
  9752. },
  9753. "x-codeSamples": [
  9754. {
  9755. "lang": "js",
  9756. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9757. }
  9758. ]
  9759. }
  9760. },
  9761. "/tui/control/next": {
  9762. "get": {
  9763. "tags": ["tui"],
  9764. "operationId": "tui.control.next",
  9765. "parameters": [
  9766. {
  9767. "name": "directory",
  9768. "in": "query",
  9769. "schema": {
  9770. "type": "string"
  9771. },
  9772. "required": false
  9773. },
  9774. {
  9775. "name": "workspace",
  9776. "in": "query",
  9777. "schema": {
  9778. "type": "string"
  9779. },
  9780. "required": false
  9781. }
  9782. ],
  9783. "responses": {
  9784. "200": {
  9785. "description": "Next TUI request",
  9786. "content": {
  9787. "application/json": {
  9788. "schema": {
  9789. "type": "object",
  9790. "properties": {
  9791. "path": {
  9792. "type": "string"
  9793. },
  9794. "body": {}
  9795. },
  9796. "required": ["path", "body"],
  9797. "additionalProperties": false,
  9798. "description": "Next TUI request"
  9799. }
  9800. }
  9801. }
  9802. },
  9803. "400": {
  9804. "description": "Bad request",
  9805. "content": {
  9806. "application/json": {
  9807. "schema": {
  9808. "$ref": "#/components/schemas/BadRequestError"
  9809. }
  9810. }
  9811. }
  9812. }
  9813. },
  9814. "description": "Retrieve the next TUI request from the queue for processing.",
  9815. "summary": "Get next TUI request",
  9816. "x-codeSamples": [
  9817. {
  9818. "lang": "js",
  9819. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9820. }
  9821. ]
  9822. }
  9823. },
  9824. "/tui/control/response": {
  9825. "post": {
  9826. "tags": ["tui"],
  9827. "operationId": "tui.control.response",
  9828. "parameters": [
  9829. {
  9830. "name": "directory",
  9831. "in": "query",
  9832. "schema": {
  9833. "type": "string"
  9834. },
  9835. "required": false
  9836. },
  9837. {
  9838. "name": "workspace",
  9839. "in": "query",
  9840. "schema": {
  9841. "type": "string"
  9842. },
  9843. "required": false
  9844. }
  9845. ],
  9846. "responses": {
  9847. "200": {
  9848. "description": "Response submitted successfully",
  9849. "content": {
  9850. "application/json": {
  9851. "schema": {
  9852. "type": "boolean",
  9853. "description": "Response submitted successfully"
  9854. }
  9855. }
  9856. }
  9857. },
  9858. "400": {
  9859. "description": "Bad request",
  9860. "content": {
  9861. "application/json": {
  9862. "schema": {
  9863. "$ref": "#/components/schemas/BadRequestError"
  9864. }
  9865. }
  9866. }
  9867. }
  9868. },
  9869. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9870. "summary": "Submit TUI response",
  9871. "requestBody": {
  9872. "content": {
  9873. "application/json": {
  9874. "schema": {}
  9875. }
  9876. }
  9877. },
  9878. "x-codeSamples": [
  9879. {
  9880. "lang": "js",
  9881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9882. }
  9883. ]
  9884. }
  9885. },
  9886. "/experimental/workspace/adapter": {
  9887. "get": {
  9888. "tags": ["workspace"],
  9889. "operationId": "experimental.workspace.adapter.list",
  9890. "parameters": [
  9891. {
  9892. "name": "directory",
  9893. "in": "query",
  9894. "schema": {
  9895. "type": "string"
  9896. },
  9897. "required": false
  9898. },
  9899. {
  9900. "name": "workspace",
  9901. "in": "query",
  9902. "schema": {
  9903. "type": "string"
  9904. },
  9905. "required": false
  9906. }
  9907. ],
  9908. "responses": {
  9909. "200": {
  9910. "description": "Workspace adapters",
  9911. "content": {
  9912. "application/json": {
  9913. "schema": {
  9914. "type": "array",
  9915. "items": {
  9916. "type": "object",
  9917. "properties": {
  9918. "type": {
  9919. "type": "string"
  9920. },
  9921. "name": {
  9922. "type": "string"
  9923. },
  9924. "description": {
  9925. "type": "string"
  9926. }
  9927. },
  9928. "required": ["type", "name", "description"],
  9929. "additionalProperties": false
  9930. },
  9931. "description": "Workspace adapters"
  9932. }
  9933. }
  9934. }
  9935. },
  9936. "400": {
  9937. "description": "Bad request",
  9938. "content": {
  9939. "application/json": {
  9940. "schema": {
  9941. "$ref": "#/components/schemas/BadRequestError"
  9942. }
  9943. }
  9944. }
  9945. }
  9946. },
  9947. "description": "List all available workspace adapters for the current project.",
  9948. "summary": "List workspace adapters",
  9949. "x-codeSamples": [
  9950. {
  9951. "lang": "js",
  9952. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9953. }
  9954. ]
  9955. }
  9956. },
  9957. "/experimental/workspace": {
  9958. "get": {
  9959. "tags": ["workspace"],
  9960. "operationId": "experimental.workspace.list",
  9961. "parameters": [
  9962. {
  9963. "name": "directory",
  9964. "in": "query",
  9965. "schema": {
  9966. "type": "string"
  9967. },
  9968. "required": false
  9969. },
  9970. {
  9971. "name": "workspace",
  9972. "in": "query",
  9973. "schema": {
  9974. "type": "string"
  9975. },
  9976. "required": false
  9977. }
  9978. ],
  9979. "responses": {
  9980. "200": {
  9981. "description": "Workspaces",
  9982. "content": {
  9983. "application/json": {
  9984. "schema": {
  9985. "type": "array",
  9986. "items": {
  9987. "$ref": "#/components/schemas/Workspace"
  9988. },
  9989. "description": "Workspaces"
  9990. }
  9991. }
  9992. }
  9993. },
  9994. "400": {
  9995. "description": "Bad request",
  9996. "content": {
  9997. "application/json": {
  9998. "schema": {
  9999. "$ref": "#/components/schemas/BadRequestError"
  10000. }
  10001. }
  10002. }
  10003. }
  10004. },
  10005. "description": "List all workspaces.",
  10006. "summary": "List workspaces",
  10007. "x-codeSamples": [
  10008. {
  10009. "lang": "js",
  10010. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  10011. }
  10012. ]
  10013. },
  10014. "post": {
  10015. "tags": ["workspace"],
  10016. "operationId": "experimental.workspace.create",
  10017. "parameters": [
  10018. {
  10019. "name": "directory",
  10020. "in": "query",
  10021. "schema": {
  10022. "type": "string"
  10023. },
  10024. "required": false
  10025. },
  10026. {
  10027. "name": "workspace",
  10028. "in": "query",
  10029. "schema": {
  10030. "type": "string"
  10031. },
  10032. "required": false
  10033. }
  10034. ],
  10035. "responses": {
  10036. "200": {
  10037. "description": "Workspace created",
  10038. "content": {
  10039. "application/json": {
  10040. "schema": {
  10041. "$ref": "#/components/schemas/Workspace"
  10042. }
  10043. }
  10044. }
  10045. },
  10046. "400": {
  10047. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  10048. "content": {
  10049. "application/json": {
  10050. "schema": {
  10051. "anyOf": [
  10052. {
  10053. "$ref": "#/components/schemas/WorkspaceCreateError"
  10054. },
  10055. {
  10056. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10057. },
  10058. {
  10059. "$ref": "#/components/schemas/InvalidRequestError"
  10060. }
  10061. ]
  10062. }
  10063. }
  10064. }
  10065. }
  10066. },
  10067. "description": "Create a workspace for the current project.",
  10068. "summary": "Create workspace",
  10069. "requestBody": {
  10070. "content": {
  10071. "application/json": {
  10072. "schema": {
  10073. "type": "object",
  10074. "properties": {
  10075. "id": {
  10076. "type": "string",
  10077. "pattern": "^wrk"
  10078. },
  10079. "type": {
  10080. "type": "string"
  10081. },
  10082. "branch": {
  10083. "anyOf": [
  10084. {
  10085. "type": "string"
  10086. },
  10087. {
  10088. "type": "null"
  10089. }
  10090. ]
  10091. },
  10092. "extra": {
  10093. "anyOf": [
  10094. {},
  10095. {
  10096. "type": "null"
  10097. }
  10098. ]
  10099. }
  10100. },
  10101. "required": ["type"],
  10102. "additionalProperties": false
  10103. }
  10104. }
  10105. }
  10106. },
  10107. "x-codeSamples": [
  10108. {
  10109. "lang": "js",
  10110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  10111. }
  10112. ]
  10113. }
  10114. },
  10115. "/experimental/workspace/sync-list": {
  10116. "post": {
  10117. "tags": ["workspace"],
  10118. "operationId": "experimental.workspace.syncList",
  10119. "parameters": [
  10120. {
  10121. "name": "directory",
  10122. "in": "query",
  10123. "schema": {
  10124. "type": "string"
  10125. },
  10126. "required": false
  10127. },
  10128. {
  10129. "name": "workspace",
  10130. "in": "query",
  10131. "schema": {
  10132. "type": "string"
  10133. },
  10134. "required": false
  10135. }
  10136. ],
  10137. "responses": {
  10138. "204": {
  10139. "description": "Workspace list synced"
  10140. },
  10141. "400": {
  10142. "description": "Bad request",
  10143. "content": {
  10144. "application/json": {
  10145. "schema": {
  10146. "$ref": "#/components/schemas/BadRequestError"
  10147. }
  10148. }
  10149. }
  10150. }
  10151. },
  10152. "description": "Register missing workspaces returned by workspace adapters.",
  10153. "summary": "Sync workspace list",
  10154. "x-codeSamples": [
  10155. {
  10156. "lang": "js",
  10157. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  10158. }
  10159. ]
  10160. }
  10161. },
  10162. "/experimental/workspace/status": {
  10163. "get": {
  10164. "tags": ["workspace"],
  10165. "operationId": "experimental.workspace.status",
  10166. "parameters": [
  10167. {
  10168. "name": "directory",
  10169. "in": "query",
  10170. "schema": {
  10171. "type": "string"
  10172. },
  10173. "required": false
  10174. },
  10175. {
  10176. "name": "workspace",
  10177. "in": "query",
  10178. "schema": {
  10179. "type": "string"
  10180. },
  10181. "required": false
  10182. }
  10183. ],
  10184. "responses": {
  10185. "200": {
  10186. "description": "Workspace status",
  10187. "content": {
  10188. "application/json": {
  10189. "schema": {
  10190. "type": "array",
  10191. "items": {
  10192. "type": "object",
  10193. "properties": {
  10194. "workspaceID": {
  10195. "type": "string",
  10196. "pattern": "^wrk"
  10197. },
  10198. "status": {
  10199. "type": "string",
  10200. "enum": ["connected", "connecting", "disconnected", "error"]
  10201. }
  10202. },
  10203. "required": ["workspaceID", "status"],
  10204. "additionalProperties": false
  10205. },
  10206. "description": "Workspace status"
  10207. }
  10208. }
  10209. }
  10210. },
  10211. "400": {
  10212. "description": "Bad request",
  10213. "content": {
  10214. "application/json": {
  10215. "schema": {
  10216. "$ref": "#/components/schemas/BadRequestError"
  10217. }
  10218. }
  10219. }
  10220. }
  10221. },
  10222. "description": "Get connection status for workspaces in the current project.",
  10223. "summary": "Workspace status",
  10224. "x-codeSamples": [
  10225. {
  10226. "lang": "js",
  10227. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10228. }
  10229. ]
  10230. }
  10231. },
  10232. "/experimental/workspace/{id}": {
  10233. "delete": {
  10234. "tags": ["workspace"],
  10235. "operationId": "experimental.workspace.remove",
  10236. "parameters": [
  10237. {
  10238. "name": "id",
  10239. "in": "path",
  10240. "schema": {
  10241. "type": "string",
  10242. "pattern": "^wrk"
  10243. },
  10244. "required": true
  10245. },
  10246. {
  10247. "name": "directory",
  10248. "in": "query",
  10249. "schema": {
  10250. "type": "string"
  10251. },
  10252. "required": false
  10253. },
  10254. {
  10255. "name": "workspace",
  10256. "in": "query",
  10257. "schema": {
  10258. "type": "string"
  10259. },
  10260. "required": false
  10261. }
  10262. ],
  10263. "responses": {
  10264. "200": {
  10265. "description": "Workspace removed",
  10266. "content": {
  10267. "application/json": {
  10268. "schema": {
  10269. "$ref": "#/components/schemas/Workspace"
  10270. }
  10271. }
  10272. }
  10273. },
  10274. "400": {
  10275. "description": "BadRequest | InvalidRequestError",
  10276. "content": {
  10277. "application/json": {
  10278. "schema": {
  10279. "anyOf": [
  10280. {
  10281. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10282. },
  10283. {
  10284. "$ref": "#/components/schemas/InvalidRequestError"
  10285. }
  10286. ]
  10287. }
  10288. }
  10289. }
  10290. }
  10291. },
  10292. "description": "Remove an existing workspace.",
  10293. "summary": "Remove workspace",
  10294. "x-codeSamples": [
  10295. {
  10296. "lang": "js",
  10297. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10298. }
  10299. ]
  10300. }
  10301. },
  10302. "/experimental/workspace/warp": {
  10303. "post": {
  10304. "tags": ["workspace"],
  10305. "operationId": "experimental.workspace.warp",
  10306. "parameters": [
  10307. {
  10308. "name": "directory",
  10309. "in": "query",
  10310. "schema": {
  10311. "type": "string"
  10312. },
  10313. "required": false
  10314. },
  10315. {
  10316. "name": "workspace",
  10317. "in": "query",
  10318. "schema": {
  10319. "type": "string"
  10320. },
  10321. "required": false
  10322. }
  10323. ],
  10324. "responses": {
  10325. "204": {
  10326. "description": "Session warped"
  10327. },
  10328. "400": {
  10329. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10330. "content": {
  10331. "application/json": {
  10332. "schema": {
  10333. "anyOf": [
  10334. {
  10335. "$ref": "#/components/schemas/WorkspaceWarpError"
  10336. },
  10337. {
  10338. "$ref": "#/components/schemas/VcsApplyError"
  10339. },
  10340. {
  10341. "$ref": "#/components/schemas/InvalidRequestError"
  10342. }
  10343. ]
  10344. }
  10345. }
  10346. }
  10347. },
  10348. "404": {
  10349. "description": "NotFoundError",
  10350. "content": {
  10351. "application/json": {
  10352. "schema": {
  10353. "$ref": "#/components/schemas/NotFoundError"
  10354. }
  10355. }
  10356. }
  10357. }
  10358. },
  10359. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10360. "summary": "Warp session into workspace",
  10361. "requestBody": {
  10362. "content": {
  10363. "application/json": {
  10364. "schema": {
  10365. "type": "object",
  10366. "properties": {
  10367. "id": {
  10368. "anyOf": [
  10369. {
  10370. "type": "string",
  10371. "pattern": "^wrk"
  10372. },
  10373. {
  10374. "type": "null"
  10375. }
  10376. ]
  10377. },
  10378. "sessionID": {
  10379. "type": "string",
  10380. "pattern": "^ses"
  10381. },
  10382. "copyChanges": {
  10383. "type": "boolean"
  10384. }
  10385. },
  10386. "required": ["id", "sessionID"],
  10387. "additionalProperties": false
  10388. }
  10389. }
  10390. }
  10391. },
  10392. "x-codeSamples": [
  10393. {
  10394. "lang": "js",
  10395. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10396. }
  10397. ]
  10398. }
  10399. },
  10400. "/pty/{ptyID}/connect": {
  10401. "get": {
  10402. "tags": ["pty"],
  10403. "operationId": "pty.connect",
  10404. "parameters": [
  10405. {
  10406. "name": "ptyID",
  10407. "in": "path",
  10408. "schema": {
  10409. "type": "string",
  10410. "pattern": "^pty"
  10411. },
  10412. "required": true
  10413. },
  10414. {
  10415. "in": "query",
  10416. "name": "directory",
  10417. "schema": {
  10418. "type": "string"
  10419. }
  10420. },
  10421. {
  10422. "in": "query",
  10423. "name": "workspace",
  10424. "schema": {
  10425. "type": "string"
  10426. }
  10427. },
  10428. {
  10429. "in": "query",
  10430. "name": "cursor",
  10431. "schema": {
  10432. "type": "string"
  10433. }
  10434. },
  10435. {
  10436. "in": "query",
  10437. "name": "ticket",
  10438. "schema": {
  10439. "type": "string"
  10440. }
  10441. }
  10442. ],
  10443. "responses": {
  10444. "200": {
  10445. "description": "Connected session",
  10446. "content": {
  10447. "application/json": {
  10448. "schema": {
  10449. "type": "boolean",
  10450. "description": "Connected session"
  10451. }
  10452. }
  10453. }
  10454. },
  10455. "403": {
  10456. "description": "Forbidden",
  10457. "content": {
  10458. "application/json": {
  10459. "schema": {
  10460. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10461. }
  10462. }
  10463. }
  10464. },
  10465. "404": {
  10466. "description": "Not found",
  10467. "content": {
  10468. "application/json": {
  10469. "schema": {
  10470. "$ref": "#/components/schemas/NotFoundError"
  10471. }
  10472. }
  10473. }
  10474. }
  10475. },
  10476. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10477. "summary": "Connect to PTY session",
  10478. "x-codeSamples": [
  10479. {
  10480. "lang": "js",
  10481. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10482. }
  10483. ]
  10484. }
  10485. }
  10486. },
  10487. "components": {
  10488. "schemas": {
  10489. "Event": {
  10490. "anyOf": [
  10491. {
  10492. "$ref": "#/components/schemas/EventModels-devRefreshed"
  10493. },
  10494. {
  10495. "$ref": "#/components/schemas/EventPluginAdded"
  10496. },
  10497. {
  10498. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  10499. },
  10500. {
  10501. "$ref": "#/components/schemas/EventFileEdited"
  10502. },
  10503. {
  10504. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10505. },
  10506. {
  10507. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10508. },
  10509. {
  10510. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10511. },
  10512. {
  10513. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10514. },
  10515. {
  10516. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10517. },
  10518. {
  10519. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10520. },
  10521. {
  10522. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10523. },
  10524. {
  10525. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10526. },
  10527. {
  10528. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10529. },
  10530. {
  10531. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10532. },
  10533. {
  10534. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10535. },
  10536. {
  10537. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10538. },
  10539. {
  10540. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10541. },
  10542. {
  10543. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10544. },
  10545. {
  10546. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10547. },
  10548. {
  10549. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10550. },
  10551. {
  10552. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10553. },
  10554. {
  10555. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10556. },
  10557. {
  10558. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10559. },
  10560. {
  10561. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10562. },
  10563. {
  10564. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10565. },
  10566. {
  10567. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10568. },
  10569. {
  10570. "$ref": "#/components/schemas/EventSessionNextRetried"
  10571. },
  10572. {
  10573. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10574. },
  10575. {
  10576. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10577. },
  10578. {
  10579. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10580. },
  10581. {
  10582. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10583. },
  10584. {
  10585. "$ref": "#/components/schemas/EventSessionCreated"
  10586. },
  10587. {
  10588. "$ref": "#/components/schemas/EventSessionUpdated"
  10589. },
  10590. {
  10591. "$ref": "#/components/schemas/EventSessionDeleted"
  10592. },
  10593. {
  10594. "$ref": "#/components/schemas/EventMessageUpdated"
  10595. },
  10596. {
  10597. "$ref": "#/components/schemas/EventMessageRemoved"
  10598. },
  10599. {
  10600. "$ref": "#/components/schemas/EventMessagePartUpdated"
  10601. },
  10602. {
  10603. "$ref": "#/components/schemas/EventMessagePartRemoved"
  10604. },
  10605. {
  10606. "$ref": "#/components/schemas/EventMessagePartDelta"
  10607. },
  10608. {
  10609. "$ref": "#/components/schemas/EventPermissionAsked"
  10610. },
  10611. {
  10612. "$ref": "#/components/schemas/EventPermissionReplied"
  10613. },
  10614. {
  10615. "$ref": "#/components/schemas/EventSessionDiff"
  10616. },
  10617. {
  10618. "$ref": "#/components/schemas/EventSessionError"
  10619. },
  10620. {
  10621. "$ref": "#/components/schemas/EventQuestionAsked"
  10622. },
  10623. {
  10624. "$ref": "#/components/schemas/EventQuestionReplied"
  10625. },
  10626. {
  10627. "$ref": "#/components/schemas/EventQuestionRejected"
  10628. },
  10629. {
  10630. "$ref": "#/components/schemas/EventTodoUpdated"
  10631. },
  10632. {
  10633. "$ref": "#/components/schemas/EventSessionStatus"
  10634. },
  10635. {
  10636. "$ref": "#/components/schemas/EventSessionIdle"
  10637. },
  10638. {
  10639. "$ref": "#/components/schemas/EventSessionCompacted"
  10640. },
  10641. {
  10642. "$ref": "#/components/schemas/EventLspUpdated"
  10643. },
  10644. {
  10645. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10646. },
  10647. {
  10648. "$ref": "#/components/schemas/Event.tui.command.execute"
  10649. },
  10650. {
  10651. "$ref": "#/components/schemas/Event.tui.toast.show"
  10652. },
  10653. {
  10654. "$ref": "#/components/schemas/Event.tui.session.select"
  10655. },
  10656. {
  10657. "$ref": "#/components/schemas/EventMcpToolsChanged"
  10658. },
  10659. {
  10660. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  10661. },
  10662. {
  10663. "$ref": "#/components/schemas/EventCommandExecuted"
  10664. },
  10665. {
  10666. "$ref": "#/components/schemas/EventProjectUpdated"
  10667. },
  10668. {
  10669. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  10670. },
  10671. {
  10672. "$ref": "#/components/schemas/EventWorkspaceReady"
  10673. },
  10674. {
  10675. "$ref": "#/components/schemas/EventWorkspaceFailed"
  10676. },
  10677. {
  10678. "$ref": "#/components/schemas/EventWorkspaceStatus"
  10679. },
  10680. {
  10681. "$ref": "#/components/schemas/EventWorktreeReady"
  10682. },
  10683. {
  10684. "$ref": "#/components/schemas/EventWorktreeFailed"
  10685. },
  10686. {
  10687. "$ref": "#/components/schemas/EventPtyCreated"
  10688. },
  10689. {
  10690. "$ref": "#/components/schemas/EventPtyUpdated"
  10691. },
  10692. {
  10693. "$ref": "#/components/schemas/EventPtyExited"
  10694. },
  10695. {
  10696. "$ref": "#/components/schemas/EventPtyDeleted"
  10697. },
  10698. {
  10699. "$ref": "#/components/schemas/EventInstallationUpdated"
  10700. },
  10701. {
  10702. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  10703. },
  10704. {
  10705. "$ref": "#/components/schemas/EventServerConnected"
  10706. },
  10707. {
  10708. "$ref": "#/components/schemas/EventGlobalDisposed"
  10709. },
  10710. {
  10711. "$ref": "#/components/schemas/EventAccountAdded"
  10712. },
  10713. {
  10714. "$ref": "#/components/schemas/EventAccountRemoved"
  10715. },
  10716. {
  10717. "$ref": "#/components/schemas/EventAccountSwitched"
  10718. },
  10719. {
  10720. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  10721. }
  10722. ]
  10723. },
  10724. "QuestionReplied": {
  10725. "type": "object",
  10726. "properties": {
  10727. "sessionID": {
  10728. "type": "string",
  10729. "pattern": "^ses"
  10730. },
  10731. "requestID": {
  10732. "type": "string",
  10733. "pattern": "^que"
  10734. },
  10735. "answers": {
  10736. "type": "array",
  10737. "items": {
  10738. "$ref": "#/components/schemas/QuestionAnswer"
  10739. }
  10740. }
  10741. },
  10742. "required": ["sessionID", "requestID", "answers"],
  10743. "additionalProperties": false
  10744. },
  10745. "QuestionRejected": {
  10746. "type": "object",
  10747. "properties": {
  10748. "sessionID": {
  10749. "type": "string",
  10750. "pattern": "^ses"
  10751. },
  10752. "requestID": {
  10753. "type": "string",
  10754. "pattern": "^que"
  10755. }
  10756. },
  10757. "required": ["sessionID", "requestID"],
  10758. "additionalProperties": false
  10759. },
  10760. "OAuth": {
  10761. "type": "object",
  10762. "properties": {
  10763. "type": {
  10764. "type": "string",
  10765. "enum": ["oauth"]
  10766. },
  10767. "refresh": {
  10768. "type": "string"
  10769. },
  10770. "access": {
  10771. "type": "string"
  10772. },
  10773. "expires": {
  10774. "type": "integer",
  10775. "minimum": 0
  10776. },
  10777. "accountId": {
  10778. "type": "string"
  10779. },
  10780. "enterpriseUrl": {
  10781. "type": "string"
  10782. }
  10783. },
  10784. "required": ["type", "refresh", "access", "expires"],
  10785. "additionalProperties": false
  10786. },
  10787. "ApiAuth": {
  10788. "type": "object",
  10789. "properties": {
  10790. "type": {
  10791. "type": "string",
  10792. "enum": ["api"]
  10793. },
  10794. "key": {
  10795. "type": "string"
  10796. },
  10797. "metadata": {
  10798. "type": "object",
  10799. "additionalProperties": {
  10800. "type": "string"
  10801. }
  10802. }
  10803. },
  10804. "required": ["type", "key"],
  10805. "additionalProperties": false
  10806. },
  10807. "WellKnownAuth": {
  10808. "type": "object",
  10809. "properties": {
  10810. "type": {
  10811. "type": "string",
  10812. "enum": ["wellknown"]
  10813. },
  10814. "key": {
  10815. "type": "string"
  10816. },
  10817. "token": {
  10818. "type": "string"
  10819. }
  10820. },
  10821. "required": ["type", "key", "token"],
  10822. "additionalProperties": false
  10823. },
  10824. "Auth": {
  10825. "anyOf": [
  10826. {
  10827. "$ref": "#/components/schemas/OAuth"
  10828. },
  10829. {
  10830. "$ref": "#/components/schemas/ApiAuth"
  10831. },
  10832. {
  10833. "$ref": "#/components/schemas/WellKnownAuth"
  10834. }
  10835. ]
  10836. },
  10837. "effect_HttpApiError_BadRequest": {
  10838. "type": "object",
  10839. "properties": {
  10840. "_tag": {
  10841. "type": "string",
  10842. "enum": ["BadRequest"]
  10843. }
  10844. },
  10845. "required": ["_tag"],
  10846. "additionalProperties": false
  10847. },
  10848. "InvalidRequestError": {
  10849. "type": "object",
  10850. "properties": {
  10851. "_tag": {
  10852. "type": "string",
  10853. "enum": ["InvalidRequestError"]
  10854. },
  10855. "message": {
  10856. "type": "string"
  10857. },
  10858. "kind": {
  10859. "type": "string"
  10860. },
  10861. "field": {
  10862. "type": "string"
  10863. }
  10864. },
  10865. "required": ["_tag", "message"],
  10866. "additionalProperties": false
  10867. },
  10868. "Prompt": {
  10869. "type": "object",
  10870. "properties": {
  10871. "text": {
  10872. "type": "string"
  10873. },
  10874. "files": {
  10875. "type": "array",
  10876. "items": {
  10877. "$ref": "#/components/schemas/PromptFileAttachment"
  10878. }
  10879. },
  10880. "agents": {
  10881. "type": "array",
  10882. "items": {
  10883. "$ref": "#/components/schemas/PromptAgentAttachment"
  10884. }
  10885. },
  10886. "references": {
  10887. "type": "array",
  10888. "items": {
  10889. "$ref": "#/components/schemas/PromptReferenceAttachment"
  10890. }
  10891. }
  10892. },
  10893. "required": ["text"],
  10894. "additionalProperties": false
  10895. },
  10896. "SnapshotFileDiff": {
  10897. "type": "object",
  10898. "properties": {
  10899. "file": {
  10900. "type": "string"
  10901. },
  10902. "patch": {
  10903. "type": "string"
  10904. },
  10905. "additions": {
  10906. "type": "number"
  10907. },
  10908. "deletions": {
  10909. "type": "number"
  10910. },
  10911. "status": {
  10912. "type": "string",
  10913. "enum": ["added", "deleted", "modified"]
  10914. }
  10915. },
  10916. "required": ["additions", "deletions"],
  10917. "additionalProperties": false
  10918. },
  10919. "Session": {
  10920. "type": "object",
  10921. "properties": {
  10922. "id": {
  10923. "type": "string",
  10924. "pattern": "^ses"
  10925. },
  10926. "slug": {
  10927. "type": "string"
  10928. },
  10929. "projectID": {
  10930. "type": "string"
  10931. },
  10932. "workspaceID": {
  10933. "type": "string",
  10934. "pattern": "^wrk"
  10935. },
  10936. "directory": {
  10937. "type": "string"
  10938. },
  10939. "path": {
  10940. "type": "string"
  10941. },
  10942. "parentID": {
  10943. "type": "string",
  10944. "pattern": "^ses"
  10945. },
  10946. "summary": {
  10947. "type": "object",
  10948. "properties": {
  10949. "additions": {
  10950. "type": "number"
  10951. },
  10952. "deletions": {
  10953. "type": "number"
  10954. },
  10955. "files": {
  10956. "type": "number"
  10957. },
  10958. "diffs": {
  10959. "type": "array",
  10960. "items": {
  10961. "$ref": "#/components/schemas/SnapshotFileDiff"
  10962. }
  10963. }
  10964. },
  10965. "required": ["additions", "deletions", "files"],
  10966. "additionalProperties": false
  10967. },
  10968. "cost": {
  10969. "type": "number"
  10970. },
  10971. "tokens": {
  10972. "type": "object",
  10973. "properties": {
  10974. "input": {
  10975. "type": "number"
  10976. },
  10977. "output": {
  10978. "type": "number"
  10979. },
  10980. "reasoning": {
  10981. "type": "number"
  10982. },
  10983. "cache": {
  10984. "type": "object",
  10985. "properties": {
  10986. "read": {
  10987. "type": "number"
  10988. },
  10989. "write": {
  10990. "type": "number"
  10991. }
  10992. },
  10993. "required": ["read", "write"],
  10994. "additionalProperties": false
  10995. }
  10996. },
  10997. "required": ["input", "output", "reasoning", "cache"],
  10998. "additionalProperties": false
  10999. },
  11000. "share": {
  11001. "type": "object",
  11002. "properties": {
  11003. "url": {
  11004. "type": "string"
  11005. }
  11006. },
  11007. "required": ["url"],
  11008. "additionalProperties": false
  11009. },
  11010. "title": {
  11011. "type": "string"
  11012. },
  11013. "agent": {
  11014. "type": "string"
  11015. },
  11016. "model": {
  11017. "type": "object",
  11018. "properties": {
  11019. "id": {
  11020. "type": "string"
  11021. },
  11022. "providerID": {
  11023. "type": "string"
  11024. },
  11025. "variant": {
  11026. "type": "string"
  11027. }
  11028. },
  11029. "required": ["id", "providerID"],
  11030. "additionalProperties": false
  11031. },
  11032. "version": {
  11033. "type": "string"
  11034. },
  11035. "metadata": {
  11036. "type": "object"
  11037. },
  11038. "time": {
  11039. "type": "object",
  11040. "properties": {
  11041. "created": {
  11042. "type": "integer",
  11043. "minimum": 0
  11044. },
  11045. "updated": {
  11046. "type": "integer",
  11047. "minimum": 0
  11048. },
  11049. "compacting": {
  11050. "type": "integer",
  11051. "minimum": 0
  11052. },
  11053. "archived": {
  11054. "type": "number"
  11055. }
  11056. },
  11057. "required": ["created", "updated"],
  11058. "additionalProperties": false
  11059. },
  11060. "permission": {
  11061. "$ref": "#/components/schemas/PermissionRuleset"
  11062. },
  11063. "revert": {
  11064. "type": "object",
  11065. "properties": {
  11066. "messageID": {
  11067. "type": "string",
  11068. "pattern": "^msg"
  11069. },
  11070. "partID": {
  11071. "type": "string",
  11072. "pattern": "^prt"
  11073. },
  11074. "snapshot": {
  11075. "type": "string"
  11076. },
  11077. "diff": {
  11078. "type": "string"
  11079. }
  11080. },
  11081. "required": ["messageID"],
  11082. "additionalProperties": false
  11083. }
  11084. },
  11085. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11086. "additionalProperties": false
  11087. },
  11088. "OutputFormatText": {
  11089. "type": "object",
  11090. "properties": {
  11091. "type": {
  11092. "type": "string",
  11093. "enum": ["text"]
  11094. }
  11095. },
  11096. "required": ["type"],
  11097. "additionalProperties": false
  11098. },
  11099. "JSONSchema": {
  11100. "type": "object"
  11101. },
  11102. "OutputFormatJsonSchema": {
  11103. "type": "object",
  11104. "properties": {
  11105. "type": {
  11106. "type": "string",
  11107. "enum": ["json_schema"]
  11108. },
  11109. "schema": {
  11110. "$ref": "#/components/schemas/JSONSchema"
  11111. },
  11112. "retryCount": {
  11113. "type": "integer",
  11114. "minimum": 0
  11115. }
  11116. },
  11117. "required": ["type", "schema"],
  11118. "additionalProperties": false
  11119. },
  11120. "OutputFormat": {
  11121. "anyOf": [
  11122. {
  11123. "$ref": "#/components/schemas/OutputFormatText"
  11124. },
  11125. {
  11126. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11127. }
  11128. ]
  11129. },
  11130. "UserMessage": {
  11131. "type": "object",
  11132. "properties": {
  11133. "id": {
  11134. "type": "string",
  11135. "pattern": "^msg"
  11136. },
  11137. "sessionID": {
  11138. "type": "string",
  11139. "pattern": "^ses"
  11140. },
  11141. "role": {
  11142. "type": "string",
  11143. "enum": ["user"]
  11144. },
  11145. "time": {
  11146. "type": "object",
  11147. "properties": {
  11148. "created": {
  11149. "type": "integer",
  11150. "minimum": 0
  11151. }
  11152. },
  11153. "required": ["created"],
  11154. "additionalProperties": false
  11155. },
  11156. "format": {
  11157. "$ref": "#/components/schemas/OutputFormat"
  11158. },
  11159. "summary": {
  11160. "type": "object",
  11161. "properties": {
  11162. "title": {
  11163. "type": "string"
  11164. },
  11165. "body": {
  11166. "type": "string"
  11167. },
  11168. "diffs": {
  11169. "type": "array",
  11170. "items": {
  11171. "$ref": "#/components/schemas/SnapshotFileDiff"
  11172. }
  11173. }
  11174. },
  11175. "required": ["diffs"],
  11176. "additionalProperties": false
  11177. },
  11178. "agent": {
  11179. "type": "string"
  11180. },
  11181. "model": {
  11182. "type": "object",
  11183. "properties": {
  11184. "providerID": {
  11185. "type": "string"
  11186. },
  11187. "modelID": {
  11188. "type": "string"
  11189. },
  11190. "variant": {
  11191. "type": "string"
  11192. }
  11193. },
  11194. "required": ["providerID", "modelID"],
  11195. "additionalProperties": false
  11196. },
  11197. "system": {
  11198. "type": "string"
  11199. },
  11200. "tools": {
  11201. "type": "object",
  11202. "additionalProperties": {
  11203. "type": "boolean"
  11204. }
  11205. }
  11206. },
  11207. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11208. "additionalProperties": false
  11209. },
  11210. "ProviderAuthError": {
  11211. "type": "object",
  11212. "properties": {
  11213. "name": {
  11214. "type": "string",
  11215. "enum": ["ProviderAuthError"]
  11216. },
  11217. "data": {
  11218. "type": "object",
  11219. "properties": {
  11220. "providerID": {
  11221. "type": "string"
  11222. },
  11223. "message": {
  11224. "type": "string"
  11225. }
  11226. },
  11227. "required": ["providerID", "message"],
  11228. "additionalProperties": false
  11229. }
  11230. },
  11231. "required": ["name", "data"],
  11232. "additionalProperties": false
  11233. },
  11234. "UnknownError": {
  11235. "type": "object",
  11236. "properties": {
  11237. "name": {
  11238. "type": "string",
  11239. "enum": ["UnknownError"]
  11240. },
  11241. "data": {
  11242. "type": "object",
  11243. "properties": {
  11244. "message": {
  11245. "type": "string"
  11246. },
  11247. "ref": {
  11248. "type": "string"
  11249. }
  11250. },
  11251. "required": ["message"],
  11252. "additionalProperties": false
  11253. }
  11254. },
  11255. "required": ["name", "data"],
  11256. "additionalProperties": false
  11257. },
  11258. "MessageOutputLengthError": {
  11259. "type": "object",
  11260. "properties": {
  11261. "name": {
  11262. "type": "string",
  11263. "enum": ["MessageOutputLengthError"]
  11264. },
  11265. "data": {
  11266. "type": "object",
  11267. "properties": {}
  11268. }
  11269. },
  11270. "required": ["name", "data"],
  11271. "additionalProperties": false
  11272. },
  11273. "MessageAbortedError": {
  11274. "type": "object",
  11275. "properties": {
  11276. "name": {
  11277. "type": "string",
  11278. "enum": ["MessageAbortedError"]
  11279. },
  11280. "data": {
  11281. "type": "object",
  11282. "properties": {
  11283. "message": {
  11284. "type": "string"
  11285. }
  11286. },
  11287. "required": ["message"],
  11288. "additionalProperties": false
  11289. }
  11290. },
  11291. "required": ["name", "data"],
  11292. "additionalProperties": false
  11293. },
  11294. "StructuredOutputError": {
  11295. "type": "object",
  11296. "properties": {
  11297. "name": {
  11298. "type": "string",
  11299. "enum": ["StructuredOutputError"]
  11300. },
  11301. "data": {
  11302. "type": "object",
  11303. "properties": {
  11304. "message": {
  11305. "type": "string"
  11306. },
  11307. "retries": {
  11308. "type": "integer",
  11309. "minimum": 0
  11310. }
  11311. },
  11312. "required": ["message", "retries"],
  11313. "additionalProperties": false
  11314. }
  11315. },
  11316. "required": ["name", "data"],
  11317. "additionalProperties": false
  11318. },
  11319. "ContextOverflowError": {
  11320. "type": "object",
  11321. "properties": {
  11322. "name": {
  11323. "type": "string",
  11324. "enum": ["ContextOverflowError"]
  11325. },
  11326. "data": {
  11327. "type": "object",
  11328. "properties": {
  11329. "message": {
  11330. "type": "string"
  11331. },
  11332. "responseBody": {
  11333. "type": "string"
  11334. }
  11335. },
  11336. "required": ["message"],
  11337. "additionalProperties": false
  11338. }
  11339. },
  11340. "required": ["name", "data"],
  11341. "additionalProperties": false
  11342. },
  11343. "APIError": {
  11344. "type": "object",
  11345. "properties": {
  11346. "name": {
  11347. "type": "string",
  11348. "enum": ["APIError"]
  11349. },
  11350. "data": {
  11351. "type": "object",
  11352. "properties": {
  11353. "message": {
  11354. "type": "string"
  11355. },
  11356. "statusCode": {
  11357. "type": "integer",
  11358. "minimum": 0
  11359. },
  11360. "isRetryable": {
  11361. "type": "boolean"
  11362. },
  11363. "responseHeaders": {
  11364. "type": "object",
  11365. "additionalProperties": {
  11366. "type": "string"
  11367. }
  11368. },
  11369. "responseBody": {
  11370. "type": "string"
  11371. },
  11372. "metadata": {
  11373. "type": "object",
  11374. "additionalProperties": {
  11375. "type": "string"
  11376. }
  11377. }
  11378. },
  11379. "required": ["message", "isRetryable"],
  11380. "additionalProperties": false
  11381. }
  11382. },
  11383. "required": ["name", "data"],
  11384. "additionalProperties": false
  11385. },
  11386. "AssistantMessage": {
  11387. "type": "object",
  11388. "properties": {
  11389. "id": {
  11390. "type": "string",
  11391. "pattern": "^msg"
  11392. },
  11393. "sessionID": {
  11394. "type": "string",
  11395. "pattern": "^ses"
  11396. },
  11397. "role": {
  11398. "type": "string",
  11399. "enum": ["assistant"]
  11400. },
  11401. "time": {
  11402. "type": "object",
  11403. "properties": {
  11404. "created": {
  11405. "type": "integer",
  11406. "minimum": 0
  11407. },
  11408. "completed": {
  11409. "type": "integer",
  11410. "minimum": 0
  11411. }
  11412. },
  11413. "required": ["created"],
  11414. "additionalProperties": false
  11415. },
  11416. "error": {
  11417. "anyOf": [
  11418. {
  11419. "$ref": "#/components/schemas/ProviderAuthError"
  11420. },
  11421. {
  11422. "$ref": "#/components/schemas/UnknownError"
  11423. },
  11424. {
  11425. "$ref": "#/components/schemas/MessageOutputLengthError"
  11426. },
  11427. {
  11428. "$ref": "#/components/schemas/MessageAbortedError"
  11429. },
  11430. {
  11431. "$ref": "#/components/schemas/StructuredOutputError"
  11432. },
  11433. {
  11434. "$ref": "#/components/schemas/ContextOverflowError"
  11435. },
  11436. {
  11437. "$ref": "#/components/schemas/APIError"
  11438. }
  11439. ]
  11440. },
  11441. "parentID": {
  11442. "type": "string",
  11443. "pattern": "^msg"
  11444. },
  11445. "modelID": {
  11446. "type": "string"
  11447. },
  11448. "providerID": {
  11449. "type": "string"
  11450. },
  11451. "mode": {
  11452. "type": "string"
  11453. },
  11454. "agent": {
  11455. "type": "string"
  11456. },
  11457. "path": {
  11458. "type": "object",
  11459. "properties": {
  11460. "cwd": {
  11461. "type": "string"
  11462. },
  11463. "root": {
  11464. "type": "string"
  11465. }
  11466. },
  11467. "required": ["cwd", "root"],
  11468. "additionalProperties": false
  11469. },
  11470. "summary": {
  11471. "type": "boolean"
  11472. },
  11473. "cost": {
  11474. "type": "number"
  11475. },
  11476. "tokens": {
  11477. "type": "object",
  11478. "properties": {
  11479. "total": {
  11480. "type": "number"
  11481. },
  11482. "input": {
  11483. "type": "number"
  11484. },
  11485. "output": {
  11486. "type": "number"
  11487. },
  11488. "reasoning": {
  11489. "type": "number"
  11490. },
  11491. "cache": {
  11492. "type": "object",
  11493. "properties": {
  11494. "read": {
  11495. "type": "number"
  11496. },
  11497. "write": {
  11498. "type": "number"
  11499. }
  11500. },
  11501. "required": ["read", "write"],
  11502. "additionalProperties": false
  11503. }
  11504. },
  11505. "required": ["input", "output", "reasoning", "cache"],
  11506. "additionalProperties": false
  11507. },
  11508. "structured": {},
  11509. "variant": {
  11510. "type": "string"
  11511. },
  11512. "finish": {
  11513. "type": "string"
  11514. }
  11515. },
  11516. "required": [
  11517. "id",
  11518. "sessionID",
  11519. "role",
  11520. "time",
  11521. "parentID",
  11522. "modelID",
  11523. "providerID",
  11524. "mode",
  11525. "agent",
  11526. "path",
  11527. "cost",
  11528. "tokens"
  11529. ],
  11530. "additionalProperties": false
  11531. },
  11532. "Message": {
  11533. "anyOf": [
  11534. {
  11535. "$ref": "#/components/schemas/UserMessage"
  11536. },
  11537. {
  11538. "$ref": "#/components/schemas/AssistantMessage"
  11539. }
  11540. ]
  11541. },
  11542. "TextPart": {
  11543. "type": "object",
  11544. "properties": {
  11545. "id": {
  11546. "type": "string",
  11547. "pattern": "^prt"
  11548. },
  11549. "sessionID": {
  11550. "type": "string",
  11551. "pattern": "^ses"
  11552. },
  11553. "messageID": {
  11554. "type": "string",
  11555. "pattern": "^msg"
  11556. },
  11557. "type": {
  11558. "type": "string",
  11559. "enum": ["text"]
  11560. },
  11561. "text": {
  11562. "type": "string"
  11563. },
  11564. "synthetic": {
  11565. "type": "boolean"
  11566. },
  11567. "ignored": {
  11568. "type": "boolean"
  11569. },
  11570. "time": {
  11571. "type": "object",
  11572. "properties": {
  11573. "start": {
  11574. "type": "integer",
  11575. "minimum": 0
  11576. },
  11577. "end": {
  11578. "type": "integer",
  11579. "minimum": 0
  11580. }
  11581. },
  11582. "required": ["start"],
  11583. "additionalProperties": false
  11584. },
  11585. "metadata": {
  11586. "type": "object"
  11587. }
  11588. },
  11589. "required": ["id", "sessionID", "messageID", "type", "text"],
  11590. "additionalProperties": false
  11591. },
  11592. "SubtaskPart": {
  11593. "type": "object",
  11594. "properties": {
  11595. "id": {
  11596. "type": "string",
  11597. "pattern": "^prt"
  11598. },
  11599. "sessionID": {
  11600. "type": "string",
  11601. "pattern": "^ses"
  11602. },
  11603. "messageID": {
  11604. "type": "string",
  11605. "pattern": "^msg"
  11606. },
  11607. "type": {
  11608. "type": "string",
  11609. "enum": ["subtask"]
  11610. },
  11611. "prompt": {
  11612. "type": "string"
  11613. },
  11614. "description": {
  11615. "type": "string"
  11616. },
  11617. "agent": {
  11618. "type": "string"
  11619. },
  11620. "model": {
  11621. "type": "object",
  11622. "properties": {
  11623. "providerID": {
  11624. "type": "string"
  11625. },
  11626. "modelID": {
  11627. "type": "string"
  11628. }
  11629. },
  11630. "required": ["providerID", "modelID"],
  11631. "additionalProperties": false
  11632. },
  11633. "command": {
  11634. "type": "string"
  11635. }
  11636. },
  11637. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  11638. "additionalProperties": false
  11639. },
  11640. "ReasoningPart": {
  11641. "type": "object",
  11642. "properties": {
  11643. "id": {
  11644. "type": "string",
  11645. "pattern": "^prt"
  11646. },
  11647. "sessionID": {
  11648. "type": "string",
  11649. "pattern": "^ses"
  11650. },
  11651. "messageID": {
  11652. "type": "string",
  11653. "pattern": "^msg"
  11654. },
  11655. "type": {
  11656. "type": "string",
  11657. "enum": ["reasoning"]
  11658. },
  11659. "text": {
  11660. "type": "string"
  11661. },
  11662. "metadata": {
  11663. "type": "object"
  11664. },
  11665. "time": {
  11666. "type": "object",
  11667. "properties": {
  11668. "start": {
  11669. "type": "integer",
  11670. "minimum": 0
  11671. },
  11672. "end": {
  11673. "type": "integer",
  11674. "minimum": 0
  11675. }
  11676. },
  11677. "required": ["start"],
  11678. "additionalProperties": false
  11679. }
  11680. },
  11681. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  11682. "additionalProperties": false
  11683. },
  11684. "FilePartSourceText": {
  11685. "type": "object",
  11686. "properties": {
  11687. "value": {
  11688. "type": "string"
  11689. },
  11690. "start": {
  11691. "type": "number"
  11692. },
  11693. "end": {
  11694. "type": "number"
  11695. }
  11696. },
  11697. "required": ["value", "start", "end"],
  11698. "additionalProperties": false
  11699. },
  11700. "FileSource": {
  11701. "type": "object",
  11702. "properties": {
  11703. "text": {
  11704. "$ref": "#/components/schemas/FilePartSourceText"
  11705. },
  11706. "type": {
  11707. "type": "string",
  11708. "enum": ["file"]
  11709. },
  11710. "path": {
  11711. "type": "string"
  11712. }
  11713. },
  11714. "required": ["text", "type", "path"],
  11715. "additionalProperties": false
  11716. },
  11717. "Range": {
  11718. "type": "object",
  11719. "properties": {
  11720. "start": {
  11721. "type": "object",
  11722. "properties": {
  11723. "line": {
  11724. "type": "integer",
  11725. "minimum": 0
  11726. },
  11727. "character": {
  11728. "type": "integer",
  11729. "minimum": 0
  11730. }
  11731. },
  11732. "required": ["line", "character"],
  11733. "additionalProperties": false
  11734. },
  11735. "end": {
  11736. "type": "object",
  11737. "properties": {
  11738. "line": {
  11739. "type": "integer",
  11740. "minimum": 0
  11741. },
  11742. "character": {
  11743. "type": "integer",
  11744. "minimum": 0
  11745. }
  11746. },
  11747. "required": ["line", "character"],
  11748. "additionalProperties": false
  11749. }
  11750. },
  11751. "required": ["start", "end"],
  11752. "additionalProperties": false
  11753. },
  11754. "SymbolSource": {
  11755. "type": "object",
  11756. "properties": {
  11757. "text": {
  11758. "$ref": "#/components/schemas/FilePartSourceText"
  11759. },
  11760. "type": {
  11761. "type": "string",
  11762. "enum": ["symbol"]
  11763. },
  11764. "path": {
  11765. "type": "string"
  11766. },
  11767. "range": {
  11768. "$ref": "#/components/schemas/Range"
  11769. },
  11770. "name": {
  11771. "type": "string"
  11772. },
  11773. "kind": {
  11774. "type": "integer",
  11775. "minimum": 0
  11776. }
  11777. },
  11778. "required": ["text", "type", "path", "range", "name", "kind"],
  11779. "additionalProperties": false
  11780. },
  11781. "ResourceSource": {
  11782. "type": "object",
  11783. "properties": {
  11784. "text": {
  11785. "$ref": "#/components/schemas/FilePartSourceText"
  11786. },
  11787. "type": {
  11788. "type": "string",
  11789. "enum": ["resource"]
  11790. },
  11791. "clientName": {
  11792. "type": "string"
  11793. },
  11794. "uri": {
  11795. "type": "string"
  11796. }
  11797. },
  11798. "required": ["text", "type", "clientName", "uri"],
  11799. "additionalProperties": false
  11800. },
  11801. "FilePartSource": {
  11802. "anyOf": [
  11803. {
  11804. "$ref": "#/components/schemas/FileSource"
  11805. },
  11806. {
  11807. "$ref": "#/components/schemas/SymbolSource"
  11808. },
  11809. {
  11810. "$ref": "#/components/schemas/ResourceSource"
  11811. }
  11812. ]
  11813. },
  11814. "FilePart": {
  11815. "type": "object",
  11816. "properties": {
  11817. "id": {
  11818. "type": "string",
  11819. "pattern": "^prt"
  11820. },
  11821. "sessionID": {
  11822. "type": "string",
  11823. "pattern": "^ses"
  11824. },
  11825. "messageID": {
  11826. "type": "string",
  11827. "pattern": "^msg"
  11828. },
  11829. "type": {
  11830. "type": "string",
  11831. "enum": ["file"]
  11832. },
  11833. "mime": {
  11834. "type": "string"
  11835. },
  11836. "filename": {
  11837. "type": "string"
  11838. },
  11839. "url": {
  11840. "type": "string"
  11841. },
  11842. "source": {
  11843. "$ref": "#/components/schemas/FilePartSource"
  11844. }
  11845. },
  11846. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  11847. "additionalProperties": false
  11848. },
  11849. "ToolStatePending": {
  11850. "type": "object",
  11851. "properties": {
  11852. "status": {
  11853. "type": "string",
  11854. "enum": ["pending"]
  11855. },
  11856. "input": {
  11857. "type": "object"
  11858. },
  11859. "raw": {
  11860. "type": "string"
  11861. }
  11862. },
  11863. "required": ["status", "input", "raw"],
  11864. "additionalProperties": false
  11865. },
  11866. "ToolStateRunning": {
  11867. "type": "object",
  11868. "properties": {
  11869. "status": {
  11870. "type": "string",
  11871. "enum": ["running"]
  11872. },
  11873. "input": {
  11874. "type": "object"
  11875. },
  11876. "title": {
  11877. "type": "string"
  11878. },
  11879. "metadata": {
  11880. "type": "object"
  11881. },
  11882. "time": {
  11883. "type": "object",
  11884. "properties": {
  11885. "start": {
  11886. "type": "integer",
  11887. "minimum": 0
  11888. }
  11889. },
  11890. "required": ["start"],
  11891. "additionalProperties": false
  11892. }
  11893. },
  11894. "required": ["status", "input", "time"],
  11895. "additionalProperties": false
  11896. },
  11897. "ToolStateCompleted": {
  11898. "type": "object",
  11899. "properties": {
  11900. "status": {
  11901. "type": "string",
  11902. "enum": ["completed"]
  11903. },
  11904. "input": {
  11905. "type": "object"
  11906. },
  11907. "output": {
  11908. "type": "string"
  11909. },
  11910. "title": {
  11911. "type": "string"
  11912. },
  11913. "metadata": {
  11914. "type": "object"
  11915. },
  11916. "time": {
  11917. "type": "object",
  11918. "properties": {
  11919. "start": {
  11920. "type": "integer",
  11921. "minimum": 0
  11922. },
  11923. "end": {
  11924. "type": "integer",
  11925. "minimum": 0
  11926. },
  11927. "compacted": {
  11928. "type": "integer",
  11929. "minimum": 0
  11930. }
  11931. },
  11932. "required": ["start", "end"],
  11933. "additionalProperties": false
  11934. },
  11935. "attachments": {
  11936. "type": "array",
  11937. "items": {
  11938. "$ref": "#/components/schemas/FilePart"
  11939. }
  11940. }
  11941. },
  11942. "required": ["status", "input", "output", "title", "metadata", "time"],
  11943. "additionalProperties": false
  11944. },
  11945. "ToolStateError": {
  11946. "type": "object",
  11947. "properties": {
  11948. "status": {
  11949. "type": "string",
  11950. "enum": ["error"]
  11951. },
  11952. "input": {
  11953. "type": "object"
  11954. },
  11955. "error": {
  11956. "type": "string"
  11957. },
  11958. "metadata": {
  11959. "type": "object"
  11960. },
  11961. "time": {
  11962. "type": "object",
  11963. "properties": {
  11964. "start": {
  11965. "type": "integer",
  11966. "minimum": 0
  11967. },
  11968. "end": {
  11969. "type": "integer",
  11970. "minimum": 0
  11971. }
  11972. },
  11973. "required": ["start", "end"],
  11974. "additionalProperties": false
  11975. }
  11976. },
  11977. "required": ["status", "input", "error", "time"],
  11978. "additionalProperties": false
  11979. },
  11980. "ToolState": {
  11981. "anyOf": [
  11982. {
  11983. "$ref": "#/components/schemas/ToolStatePending"
  11984. },
  11985. {
  11986. "$ref": "#/components/schemas/ToolStateRunning"
  11987. },
  11988. {
  11989. "$ref": "#/components/schemas/ToolStateCompleted"
  11990. },
  11991. {
  11992. "$ref": "#/components/schemas/ToolStateError"
  11993. }
  11994. ]
  11995. },
  11996. "ToolPart": {
  11997. "type": "object",
  11998. "properties": {
  11999. "id": {
  12000. "type": "string",
  12001. "pattern": "^prt"
  12002. },
  12003. "sessionID": {
  12004. "type": "string",
  12005. "pattern": "^ses"
  12006. },
  12007. "messageID": {
  12008. "type": "string",
  12009. "pattern": "^msg"
  12010. },
  12011. "type": {
  12012. "type": "string",
  12013. "enum": ["tool"]
  12014. },
  12015. "callID": {
  12016. "type": "string"
  12017. },
  12018. "tool": {
  12019. "type": "string"
  12020. },
  12021. "state": {
  12022. "$ref": "#/components/schemas/ToolState"
  12023. },
  12024. "metadata": {
  12025. "type": "object"
  12026. }
  12027. },
  12028. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12029. "additionalProperties": false
  12030. },
  12031. "StepStartPart": {
  12032. "type": "object",
  12033. "properties": {
  12034. "id": {
  12035. "type": "string",
  12036. "pattern": "^prt"
  12037. },
  12038. "sessionID": {
  12039. "type": "string",
  12040. "pattern": "^ses"
  12041. },
  12042. "messageID": {
  12043. "type": "string",
  12044. "pattern": "^msg"
  12045. },
  12046. "type": {
  12047. "type": "string",
  12048. "enum": ["step-start"]
  12049. },
  12050. "snapshot": {
  12051. "type": "string"
  12052. }
  12053. },
  12054. "required": ["id", "sessionID", "messageID", "type"],
  12055. "additionalProperties": false
  12056. },
  12057. "StepFinishPart": {
  12058. "type": "object",
  12059. "properties": {
  12060. "id": {
  12061. "type": "string",
  12062. "pattern": "^prt"
  12063. },
  12064. "sessionID": {
  12065. "type": "string",
  12066. "pattern": "^ses"
  12067. },
  12068. "messageID": {
  12069. "type": "string",
  12070. "pattern": "^msg"
  12071. },
  12072. "type": {
  12073. "type": "string",
  12074. "enum": ["step-finish"]
  12075. },
  12076. "reason": {
  12077. "type": "string"
  12078. },
  12079. "snapshot": {
  12080. "type": "string"
  12081. },
  12082. "cost": {
  12083. "type": "number"
  12084. },
  12085. "tokens": {
  12086. "type": "object",
  12087. "properties": {
  12088. "total": {
  12089. "type": "number"
  12090. },
  12091. "input": {
  12092. "type": "number"
  12093. },
  12094. "output": {
  12095. "type": "number"
  12096. },
  12097. "reasoning": {
  12098. "type": "number"
  12099. },
  12100. "cache": {
  12101. "type": "object",
  12102. "properties": {
  12103. "read": {
  12104. "type": "number"
  12105. },
  12106. "write": {
  12107. "type": "number"
  12108. }
  12109. },
  12110. "required": ["read", "write"],
  12111. "additionalProperties": false
  12112. }
  12113. },
  12114. "required": ["input", "output", "reasoning", "cache"],
  12115. "additionalProperties": false
  12116. }
  12117. },
  12118. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12119. "additionalProperties": false
  12120. },
  12121. "SnapshotPart": {
  12122. "type": "object",
  12123. "properties": {
  12124. "id": {
  12125. "type": "string",
  12126. "pattern": "^prt"
  12127. },
  12128. "sessionID": {
  12129. "type": "string",
  12130. "pattern": "^ses"
  12131. },
  12132. "messageID": {
  12133. "type": "string",
  12134. "pattern": "^msg"
  12135. },
  12136. "type": {
  12137. "type": "string",
  12138. "enum": ["snapshot"]
  12139. },
  12140. "snapshot": {
  12141. "type": "string"
  12142. }
  12143. },
  12144. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12145. "additionalProperties": false
  12146. },
  12147. "PatchPart": {
  12148. "type": "object",
  12149. "properties": {
  12150. "id": {
  12151. "type": "string",
  12152. "pattern": "^prt"
  12153. },
  12154. "sessionID": {
  12155. "type": "string",
  12156. "pattern": "^ses"
  12157. },
  12158. "messageID": {
  12159. "type": "string",
  12160. "pattern": "^msg"
  12161. },
  12162. "type": {
  12163. "type": "string",
  12164. "enum": ["patch"]
  12165. },
  12166. "hash": {
  12167. "type": "string"
  12168. },
  12169. "files": {
  12170. "type": "array",
  12171. "items": {
  12172. "type": "string"
  12173. }
  12174. }
  12175. },
  12176. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12177. "additionalProperties": false
  12178. },
  12179. "AgentPart": {
  12180. "type": "object",
  12181. "properties": {
  12182. "id": {
  12183. "type": "string",
  12184. "pattern": "^prt"
  12185. },
  12186. "sessionID": {
  12187. "type": "string",
  12188. "pattern": "^ses"
  12189. },
  12190. "messageID": {
  12191. "type": "string",
  12192. "pattern": "^msg"
  12193. },
  12194. "type": {
  12195. "type": "string",
  12196. "enum": ["agent"]
  12197. },
  12198. "name": {
  12199. "type": "string"
  12200. },
  12201. "source": {
  12202. "type": "object",
  12203. "properties": {
  12204. "value": {
  12205. "type": "string"
  12206. },
  12207. "start": {
  12208. "type": "integer",
  12209. "minimum": 0
  12210. },
  12211. "end": {
  12212. "type": "integer",
  12213. "minimum": 0
  12214. }
  12215. },
  12216. "required": ["value", "start", "end"],
  12217. "additionalProperties": false
  12218. }
  12219. },
  12220. "required": ["id", "sessionID", "messageID", "type", "name"],
  12221. "additionalProperties": false
  12222. },
  12223. "RetryPart": {
  12224. "type": "object",
  12225. "properties": {
  12226. "id": {
  12227. "type": "string",
  12228. "pattern": "^prt"
  12229. },
  12230. "sessionID": {
  12231. "type": "string",
  12232. "pattern": "^ses"
  12233. },
  12234. "messageID": {
  12235. "type": "string",
  12236. "pattern": "^msg"
  12237. },
  12238. "type": {
  12239. "type": "string",
  12240. "enum": ["retry"]
  12241. },
  12242. "attempt": {
  12243. "type": "integer",
  12244. "minimum": 0
  12245. },
  12246. "error": {
  12247. "$ref": "#/components/schemas/APIError"
  12248. },
  12249. "time": {
  12250. "type": "object",
  12251. "properties": {
  12252. "created": {
  12253. "type": "integer",
  12254. "minimum": 0
  12255. }
  12256. },
  12257. "required": ["created"],
  12258. "additionalProperties": false
  12259. }
  12260. },
  12261. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12262. "additionalProperties": false
  12263. },
  12264. "CompactionPart": {
  12265. "type": "object",
  12266. "properties": {
  12267. "id": {
  12268. "type": "string",
  12269. "pattern": "^prt"
  12270. },
  12271. "sessionID": {
  12272. "type": "string",
  12273. "pattern": "^ses"
  12274. },
  12275. "messageID": {
  12276. "type": "string",
  12277. "pattern": "^msg"
  12278. },
  12279. "type": {
  12280. "type": "string",
  12281. "enum": ["compaction"]
  12282. },
  12283. "auto": {
  12284. "type": "boolean"
  12285. },
  12286. "overflow": {
  12287. "type": "boolean"
  12288. },
  12289. "tail_start_id": {
  12290. "type": "string",
  12291. "pattern": "^msg"
  12292. }
  12293. },
  12294. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12295. "additionalProperties": false
  12296. },
  12297. "Part": {
  12298. "anyOf": [
  12299. {
  12300. "$ref": "#/components/schemas/TextPart"
  12301. },
  12302. {
  12303. "$ref": "#/components/schemas/SubtaskPart"
  12304. },
  12305. {
  12306. "$ref": "#/components/schemas/ReasoningPart"
  12307. },
  12308. {
  12309. "$ref": "#/components/schemas/FilePart"
  12310. },
  12311. {
  12312. "$ref": "#/components/schemas/ToolPart"
  12313. },
  12314. {
  12315. "$ref": "#/components/schemas/StepStartPart"
  12316. },
  12317. {
  12318. "$ref": "#/components/schemas/StepFinishPart"
  12319. },
  12320. {
  12321. "$ref": "#/components/schemas/SnapshotPart"
  12322. },
  12323. {
  12324. "$ref": "#/components/schemas/PatchPart"
  12325. },
  12326. {
  12327. "$ref": "#/components/schemas/AgentPart"
  12328. },
  12329. {
  12330. "$ref": "#/components/schemas/RetryPart"
  12331. },
  12332. {
  12333. "$ref": "#/components/schemas/CompactionPart"
  12334. }
  12335. ]
  12336. },
  12337. "QuestionOption": {
  12338. "type": "object",
  12339. "properties": {
  12340. "label": {
  12341. "type": "string",
  12342. "description": "Display text (1-5 words, concise)"
  12343. },
  12344. "description": {
  12345. "type": "string",
  12346. "description": "Explanation of choice"
  12347. }
  12348. },
  12349. "required": ["label", "description"],
  12350. "additionalProperties": false
  12351. },
  12352. "QuestionInfo": {
  12353. "type": "object",
  12354. "properties": {
  12355. "question": {
  12356. "type": "string",
  12357. "description": "Complete question"
  12358. },
  12359. "header": {
  12360. "type": "string",
  12361. "description": "Very short label (max 30 chars)"
  12362. },
  12363. "options": {
  12364. "type": "array",
  12365. "items": {
  12366. "$ref": "#/components/schemas/QuestionOption"
  12367. },
  12368. "description": "Available choices"
  12369. },
  12370. "multiple": {
  12371. "type": "boolean"
  12372. },
  12373. "custom": {
  12374. "type": "boolean"
  12375. }
  12376. },
  12377. "required": ["question", "header", "options"],
  12378. "additionalProperties": false
  12379. },
  12380. "QuestionTool": {
  12381. "type": "object",
  12382. "properties": {
  12383. "messageID": {
  12384. "type": "string",
  12385. "pattern": "^msg"
  12386. },
  12387. "callID": {
  12388. "type": "string"
  12389. }
  12390. },
  12391. "required": ["messageID", "callID"],
  12392. "additionalProperties": false
  12393. },
  12394. "QuestionAnswer": {
  12395. "type": "array",
  12396. "items": {
  12397. "type": "string"
  12398. }
  12399. },
  12400. "Todo": {
  12401. "type": "object",
  12402. "properties": {
  12403. "content": {
  12404. "type": "string",
  12405. "description": "Brief description of the task"
  12406. },
  12407. "status": {
  12408. "type": "string",
  12409. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  12410. },
  12411. "priority": {
  12412. "type": "string",
  12413. "description": "Priority level of the task: high, medium, low"
  12414. }
  12415. },
  12416. "required": ["content", "status", "priority"],
  12417. "additionalProperties": false
  12418. },
  12419. "SessionStatus": {
  12420. "anyOf": [
  12421. {
  12422. "type": "object",
  12423. "properties": {
  12424. "type": {
  12425. "type": "string",
  12426. "enum": ["idle"]
  12427. }
  12428. },
  12429. "required": ["type"],
  12430. "additionalProperties": false
  12431. },
  12432. {
  12433. "type": "object",
  12434. "properties": {
  12435. "type": {
  12436. "type": "string",
  12437. "enum": ["retry"]
  12438. },
  12439. "attempt": {
  12440. "type": "integer",
  12441. "minimum": 0
  12442. },
  12443. "message": {
  12444. "type": "string"
  12445. },
  12446. "action": {
  12447. "type": "object",
  12448. "properties": {
  12449. "reason": {
  12450. "type": "string"
  12451. },
  12452. "provider": {
  12453. "type": "string"
  12454. },
  12455. "title": {
  12456. "type": "string"
  12457. },
  12458. "message": {
  12459. "type": "string"
  12460. },
  12461. "label": {
  12462. "type": "string"
  12463. },
  12464. "link": {
  12465. "type": "string"
  12466. }
  12467. },
  12468. "required": ["reason", "provider", "title", "message", "label"],
  12469. "additionalProperties": false
  12470. },
  12471. "next": {
  12472. "type": "integer",
  12473. "minimum": 0
  12474. }
  12475. },
  12476. "required": ["type", "attempt", "message", "next"],
  12477. "additionalProperties": false
  12478. },
  12479. {
  12480. "type": "object",
  12481. "properties": {
  12482. "type": {
  12483. "type": "string",
  12484. "enum": ["busy"]
  12485. }
  12486. },
  12487. "required": ["type"],
  12488. "additionalProperties": false
  12489. }
  12490. ]
  12491. },
  12492. "Pty": {
  12493. "type": "object",
  12494. "properties": {
  12495. "id": {
  12496. "type": "string",
  12497. "pattern": "^pty"
  12498. },
  12499. "title": {
  12500. "type": "string"
  12501. },
  12502. "command": {
  12503. "type": "string"
  12504. },
  12505. "args": {
  12506. "type": "array",
  12507. "items": {
  12508. "type": "string"
  12509. }
  12510. },
  12511. "cwd": {
  12512. "type": "string"
  12513. },
  12514. "status": {
  12515. "type": "string",
  12516. "enum": ["running", "exited"]
  12517. },
  12518. "pid": {
  12519. "type": "integer",
  12520. "minimum": 0
  12521. }
  12522. },
  12523. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  12524. "additionalProperties": false
  12525. },
  12526. "GlobalEvent": {
  12527. "type": "object",
  12528. "properties": {
  12529. "directory": {
  12530. "type": "string"
  12531. },
  12532. "project": {
  12533. "type": "string"
  12534. },
  12535. "workspace": {
  12536. "type": "string"
  12537. },
  12538. "payload": {
  12539. "anyOf": [
  12540. {
  12541. "type": "object",
  12542. "properties": {
  12543. "id": {
  12544. "type": "string"
  12545. },
  12546. "type": {
  12547. "type": "string",
  12548. "enum": ["models-dev.refreshed"]
  12549. },
  12550. "properties": {
  12551. "type": "object",
  12552. "properties": {}
  12553. }
  12554. },
  12555. "required": ["id", "type", "properties"],
  12556. "additionalProperties": false
  12557. },
  12558. {
  12559. "type": "object",
  12560. "properties": {
  12561. "id": {
  12562. "type": "string"
  12563. },
  12564. "type": {
  12565. "type": "string",
  12566. "enum": ["plugin.added"]
  12567. },
  12568. "properties": {
  12569. "type": "object",
  12570. "properties": {
  12571. "id": {
  12572. "type": "string"
  12573. }
  12574. },
  12575. "required": ["id"],
  12576. "additionalProperties": false
  12577. }
  12578. },
  12579. "required": ["id", "type", "properties"],
  12580. "additionalProperties": false
  12581. },
  12582. {
  12583. "type": "object",
  12584. "properties": {
  12585. "id": {
  12586. "type": "string"
  12587. },
  12588. "type": {
  12589. "type": "string",
  12590. "enum": ["catalog.model.updated"]
  12591. },
  12592. "properties": {
  12593. "type": "object",
  12594. "properties": {
  12595. "model": {
  12596. "$ref": "#/components/schemas/ModelV2Info"
  12597. }
  12598. },
  12599. "required": ["model"],
  12600. "additionalProperties": false
  12601. }
  12602. },
  12603. "required": ["id", "type", "properties"],
  12604. "additionalProperties": false
  12605. },
  12606. {
  12607. "type": "object",
  12608. "properties": {
  12609. "id": {
  12610. "type": "string"
  12611. },
  12612. "type": {
  12613. "type": "string",
  12614. "enum": ["file.edited"]
  12615. },
  12616. "properties": {
  12617. "type": "object",
  12618. "properties": {
  12619. "file": {
  12620. "type": "string"
  12621. }
  12622. },
  12623. "required": ["file"],
  12624. "additionalProperties": false
  12625. }
  12626. },
  12627. "required": ["id", "type", "properties"],
  12628. "additionalProperties": false
  12629. },
  12630. {
  12631. "type": "object",
  12632. "properties": {
  12633. "id": {
  12634. "type": "string"
  12635. },
  12636. "type": {
  12637. "type": "string",
  12638. "enum": ["session.next.agent.switched"]
  12639. },
  12640. "properties": {
  12641. "type": "object",
  12642. "properties": {
  12643. "timestamp": {
  12644. "type": "number"
  12645. },
  12646. "sessionID": {
  12647. "type": "string",
  12648. "pattern": "^ses"
  12649. },
  12650. "agent": {
  12651. "type": "string"
  12652. }
  12653. },
  12654. "required": ["timestamp", "sessionID", "agent"],
  12655. "additionalProperties": false
  12656. }
  12657. },
  12658. "required": ["id", "type", "properties"],
  12659. "additionalProperties": false
  12660. },
  12661. {
  12662. "type": "object",
  12663. "properties": {
  12664. "id": {
  12665. "type": "string"
  12666. },
  12667. "type": {
  12668. "type": "string",
  12669. "enum": ["session.next.model.switched"]
  12670. },
  12671. "properties": {
  12672. "type": "object",
  12673. "properties": {
  12674. "timestamp": {
  12675. "type": "number"
  12676. },
  12677. "sessionID": {
  12678. "type": "string",
  12679. "pattern": "^ses"
  12680. },
  12681. "model": {
  12682. "type": "object",
  12683. "properties": {
  12684. "id": {
  12685. "type": "string"
  12686. },
  12687. "providerID": {
  12688. "type": "string"
  12689. },
  12690. "variant": {
  12691. "type": "string"
  12692. }
  12693. },
  12694. "required": ["id", "providerID"],
  12695. "additionalProperties": false
  12696. }
  12697. },
  12698. "required": ["timestamp", "sessionID", "model"],
  12699. "additionalProperties": false
  12700. }
  12701. },
  12702. "required": ["id", "type", "properties"],
  12703. "additionalProperties": false
  12704. },
  12705. {
  12706. "type": "object",
  12707. "properties": {
  12708. "id": {
  12709. "type": "string"
  12710. },
  12711. "type": {
  12712. "type": "string",
  12713. "enum": ["session.next.prompted"]
  12714. },
  12715. "properties": {
  12716. "type": "object",
  12717. "properties": {
  12718. "timestamp": {
  12719. "type": "number"
  12720. },
  12721. "sessionID": {
  12722. "type": "string",
  12723. "pattern": "^ses"
  12724. },
  12725. "prompt": {
  12726. "$ref": "#/components/schemas/Prompt"
  12727. }
  12728. },
  12729. "required": ["timestamp", "sessionID", "prompt"],
  12730. "additionalProperties": false
  12731. }
  12732. },
  12733. "required": ["id", "type", "properties"],
  12734. "additionalProperties": false
  12735. },
  12736. {
  12737. "type": "object",
  12738. "properties": {
  12739. "id": {
  12740. "type": "string"
  12741. },
  12742. "type": {
  12743. "type": "string",
  12744. "enum": ["session.next.synthetic"]
  12745. },
  12746. "properties": {
  12747. "type": "object",
  12748. "properties": {
  12749. "timestamp": {
  12750. "type": "number"
  12751. },
  12752. "sessionID": {
  12753. "type": "string",
  12754. "pattern": "^ses"
  12755. },
  12756. "text": {
  12757. "type": "string"
  12758. }
  12759. },
  12760. "required": ["timestamp", "sessionID", "text"],
  12761. "additionalProperties": false
  12762. }
  12763. },
  12764. "required": ["id", "type", "properties"],
  12765. "additionalProperties": false
  12766. },
  12767. {
  12768. "type": "object",
  12769. "properties": {
  12770. "id": {
  12771. "type": "string"
  12772. },
  12773. "type": {
  12774. "type": "string",
  12775. "enum": ["session.next.shell.started"]
  12776. },
  12777. "properties": {
  12778. "type": "object",
  12779. "properties": {
  12780. "timestamp": {
  12781. "type": "number"
  12782. },
  12783. "sessionID": {
  12784. "type": "string",
  12785. "pattern": "^ses"
  12786. },
  12787. "callID": {
  12788. "type": "string"
  12789. },
  12790. "command": {
  12791. "type": "string"
  12792. }
  12793. },
  12794. "required": ["timestamp", "sessionID", "callID", "command"],
  12795. "additionalProperties": false
  12796. }
  12797. },
  12798. "required": ["id", "type", "properties"],
  12799. "additionalProperties": false
  12800. },
  12801. {
  12802. "type": "object",
  12803. "properties": {
  12804. "id": {
  12805. "type": "string"
  12806. },
  12807. "type": {
  12808. "type": "string",
  12809. "enum": ["session.next.shell.ended"]
  12810. },
  12811. "properties": {
  12812. "type": "object",
  12813. "properties": {
  12814. "timestamp": {
  12815. "type": "number"
  12816. },
  12817. "sessionID": {
  12818. "type": "string",
  12819. "pattern": "^ses"
  12820. },
  12821. "callID": {
  12822. "type": "string"
  12823. },
  12824. "output": {
  12825. "type": "string"
  12826. }
  12827. },
  12828. "required": ["timestamp", "sessionID", "callID", "output"],
  12829. "additionalProperties": false
  12830. }
  12831. },
  12832. "required": ["id", "type", "properties"],
  12833. "additionalProperties": false
  12834. },
  12835. {
  12836. "type": "object",
  12837. "properties": {
  12838. "id": {
  12839. "type": "string"
  12840. },
  12841. "type": {
  12842. "type": "string",
  12843. "enum": ["session.next.step.started"]
  12844. },
  12845. "properties": {
  12846. "type": "object",
  12847. "properties": {
  12848. "timestamp": {
  12849. "type": "number"
  12850. },
  12851. "sessionID": {
  12852. "type": "string",
  12853. "pattern": "^ses"
  12854. },
  12855. "agent": {
  12856. "type": "string"
  12857. },
  12858. "model": {
  12859. "type": "object",
  12860. "properties": {
  12861. "id": {
  12862. "type": "string"
  12863. },
  12864. "providerID": {
  12865. "type": "string"
  12866. },
  12867. "variant": {
  12868. "type": "string"
  12869. }
  12870. },
  12871. "required": ["id", "providerID"],
  12872. "additionalProperties": false
  12873. },
  12874. "snapshot": {
  12875. "type": "string"
  12876. }
  12877. },
  12878. "required": ["timestamp", "sessionID", "agent", "model"],
  12879. "additionalProperties": false
  12880. }
  12881. },
  12882. "required": ["id", "type", "properties"],
  12883. "additionalProperties": false
  12884. },
  12885. {
  12886. "type": "object",
  12887. "properties": {
  12888. "id": {
  12889. "type": "string"
  12890. },
  12891. "type": {
  12892. "type": "string",
  12893. "enum": ["session.next.step.ended"]
  12894. },
  12895. "properties": {
  12896. "type": "object",
  12897. "properties": {
  12898. "timestamp": {
  12899. "type": "number"
  12900. },
  12901. "sessionID": {
  12902. "type": "string",
  12903. "pattern": "^ses"
  12904. },
  12905. "finish": {
  12906. "type": "string"
  12907. },
  12908. "cost": {
  12909. "type": "number"
  12910. },
  12911. "tokens": {
  12912. "type": "object",
  12913. "properties": {
  12914. "input": {
  12915. "type": "number"
  12916. },
  12917. "output": {
  12918. "type": "number"
  12919. },
  12920. "reasoning": {
  12921. "type": "number"
  12922. },
  12923. "cache": {
  12924. "type": "object",
  12925. "properties": {
  12926. "read": {
  12927. "type": "number"
  12928. },
  12929. "write": {
  12930. "type": "number"
  12931. }
  12932. },
  12933. "required": ["read", "write"],
  12934. "additionalProperties": false
  12935. }
  12936. },
  12937. "required": ["input", "output", "reasoning", "cache"],
  12938. "additionalProperties": false
  12939. },
  12940. "snapshot": {
  12941. "type": "string"
  12942. }
  12943. },
  12944. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  12945. "additionalProperties": false
  12946. }
  12947. },
  12948. "required": ["id", "type", "properties"],
  12949. "additionalProperties": false
  12950. },
  12951. {
  12952. "type": "object",
  12953. "properties": {
  12954. "id": {
  12955. "type": "string"
  12956. },
  12957. "type": {
  12958. "type": "string",
  12959. "enum": ["session.next.step.failed"]
  12960. },
  12961. "properties": {
  12962. "type": "object",
  12963. "properties": {
  12964. "timestamp": {
  12965. "type": "number"
  12966. },
  12967. "sessionID": {
  12968. "type": "string",
  12969. "pattern": "^ses"
  12970. },
  12971. "error": {
  12972. "$ref": "#/components/schemas/SessionErrorUnknown"
  12973. }
  12974. },
  12975. "required": ["timestamp", "sessionID", "error"],
  12976. "additionalProperties": false
  12977. }
  12978. },
  12979. "required": ["id", "type", "properties"],
  12980. "additionalProperties": false
  12981. },
  12982. {
  12983. "type": "object",
  12984. "properties": {
  12985. "id": {
  12986. "type": "string"
  12987. },
  12988. "type": {
  12989. "type": "string",
  12990. "enum": ["session.next.text.started"]
  12991. },
  12992. "properties": {
  12993. "type": "object",
  12994. "properties": {
  12995. "timestamp": {
  12996. "type": "number"
  12997. },
  12998. "sessionID": {
  12999. "type": "string",
  13000. "pattern": "^ses"
  13001. }
  13002. },
  13003. "required": ["timestamp", "sessionID"],
  13004. "additionalProperties": false
  13005. }
  13006. },
  13007. "required": ["id", "type", "properties"],
  13008. "additionalProperties": false
  13009. },
  13010. {
  13011. "type": "object",
  13012. "properties": {
  13013. "id": {
  13014. "type": "string"
  13015. },
  13016. "type": {
  13017. "type": "string",
  13018. "enum": ["session.next.text.delta"]
  13019. },
  13020. "properties": {
  13021. "type": "object",
  13022. "properties": {
  13023. "timestamp": {
  13024. "type": "number"
  13025. },
  13026. "sessionID": {
  13027. "type": "string",
  13028. "pattern": "^ses"
  13029. },
  13030. "delta": {
  13031. "type": "string"
  13032. }
  13033. },
  13034. "required": ["timestamp", "sessionID", "delta"],
  13035. "additionalProperties": false
  13036. }
  13037. },
  13038. "required": ["id", "type", "properties"],
  13039. "additionalProperties": false
  13040. },
  13041. {
  13042. "type": "object",
  13043. "properties": {
  13044. "id": {
  13045. "type": "string"
  13046. },
  13047. "type": {
  13048. "type": "string",
  13049. "enum": ["session.next.text.ended"]
  13050. },
  13051. "properties": {
  13052. "type": "object",
  13053. "properties": {
  13054. "timestamp": {
  13055. "type": "number"
  13056. },
  13057. "sessionID": {
  13058. "type": "string",
  13059. "pattern": "^ses"
  13060. },
  13061. "text": {
  13062. "type": "string"
  13063. }
  13064. },
  13065. "required": ["timestamp", "sessionID", "text"],
  13066. "additionalProperties": false
  13067. }
  13068. },
  13069. "required": ["id", "type", "properties"],
  13070. "additionalProperties": false
  13071. },
  13072. {
  13073. "type": "object",
  13074. "properties": {
  13075. "id": {
  13076. "type": "string"
  13077. },
  13078. "type": {
  13079. "type": "string",
  13080. "enum": ["session.next.reasoning.started"]
  13081. },
  13082. "properties": {
  13083. "type": "object",
  13084. "properties": {
  13085. "timestamp": {
  13086. "type": "number"
  13087. },
  13088. "sessionID": {
  13089. "type": "string",
  13090. "pattern": "^ses"
  13091. },
  13092. "reasoningID": {
  13093. "type": "string"
  13094. }
  13095. },
  13096. "required": ["timestamp", "sessionID", "reasoningID"],
  13097. "additionalProperties": false
  13098. }
  13099. },
  13100. "required": ["id", "type", "properties"],
  13101. "additionalProperties": false
  13102. },
  13103. {
  13104. "type": "object",
  13105. "properties": {
  13106. "id": {
  13107. "type": "string"
  13108. },
  13109. "type": {
  13110. "type": "string",
  13111. "enum": ["session.next.reasoning.delta"]
  13112. },
  13113. "properties": {
  13114. "type": "object",
  13115. "properties": {
  13116. "timestamp": {
  13117. "type": "number"
  13118. },
  13119. "sessionID": {
  13120. "type": "string",
  13121. "pattern": "^ses"
  13122. },
  13123. "reasoningID": {
  13124. "type": "string"
  13125. },
  13126. "delta": {
  13127. "type": "string"
  13128. }
  13129. },
  13130. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  13131. "additionalProperties": false
  13132. }
  13133. },
  13134. "required": ["id", "type", "properties"],
  13135. "additionalProperties": false
  13136. },
  13137. {
  13138. "type": "object",
  13139. "properties": {
  13140. "id": {
  13141. "type": "string"
  13142. },
  13143. "type": {
  13144. "type": "string",
  13145. "enum": ["session.next.reasoning.ended"]
  13146. },
  13147. "properties": {
  13148. "type": "object",
  13149. "properties": {
  13150. "timestamp": {
  13151. "type": "number"
  13152. },
  13153. "sessionID": {
  13154. "type": "string",
  13155. "pattern": "^ses"
  13156. },
  13157. "reasoningID": {
  13158. "type": "string"
  13159. },
  13160. "text": {
  13161. "type": "string"
  13162. }
  13163. },
  13164. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  13165. "additionalProperties": false
  13166. }
  13167. },
  13168. "required": ["id", "type", "properties"],
  13169. "additionalProperties": false
  13170. },
  13171. {
  13172. "type": "object",
  13173. "properties": {
  13174. "id": {
  13175. "type": "string"
  13176. },
  13177. "type": {
  13178. "type": "string",
  13179. "enum": ["session.next.tool.input.started"]
  13180. },
  13181. "properties": {
  13182. "type": "object",
  13183. "properties": {
  13184. "timestamp": {
  13185. "type": "number"
  13186. },
  13187. "sessionID": {
  13188. "type": "string",
  13189. "pattern": "^ses"
  13190. },
  13191. "callID": {
  13192. "type": "string"
  13193. },
  13194. "name": {
  13195. "type": "string"
  13196. }
  13197. },
  13198. "required": ["timestamp", "sessionID", "callID", "name"],
  13199. "additionalProperties": false
  13200. }
  13201. },
  13202. "required": ["id", "type", "properties"],
  13203. "additionalProperties": false
  13204. },
  13205. {
  13206. "type": "object",
  13207. "properties": {
  13208. "id": {
  13209. "type": "string"
  13210. },
  13211. "type": {
  13212. "type": "string",
  13213. "enum": ["session.next.tool.input.delta"]
  13214. },
  13215. "properties": {
  13216. "type": "object",
  13217. "properties": {
  13218. "timestamp": {
  13219. "type": "number"
  13220. },
  13221. "sessionID": {
  13222. "type": "string",
  13223. "pattern": "^ses"
  13224. },
  13225. "callID": {
  13226. "type": "string"
  13227. },
  13228. "delta": {
  13229. "type": "string"
  13230. }
  13231. },
  13232. "required": ["timestamp", "sessionID", "callID", "delta"],
  13233. "additionalProperties": false
  13234. }
  13235. },
  13236. "required": ["id", "type", "properties"],
  13237. "additionalProperties": false
  13238. },
  13239. {
  13240. "type": "object",
  13241. "properties": {
  13242. "id": {
  13243. "type": "string"
  13244. },
  13245. "type": {
  13246. "type": "string",
  13247. "enum": ["session.next.tool.input.ended"]
  13248. },
  13249. "properties": {
  13250. "type": "object",
  13251. "properties": {
  13252. "timestamp": {
  13253. "type": "number"
  13254. },
  13255. "sessionID": {
  13256. "type": "string",
  13257. "pattern": "^ses"
  13258. },
  13259. "callID": {
  13260. "type": "string"
  13261. },
  13262. "text": {
  13263. "type": "string"
  13264. }
  13265. },
  13266. "required": ["timestamp", "sessionID", "callID", "text"],
  13267. "additionalProperties": false
  13268. }
  13269. },
  13270. "required": ["id", "type", "properties"],
  13271. "additionalProperties": false
  13272. },
  13273. {
  13274. "type": "object",
  13275. "properties": {
  13276. "id": {
  13277. "type": "string"
  13278. },
  13279. "type": {
  13280. "type": "string",
  13281. "enum": ["session.next.tool.called"]
  13282. },
  13283. "properties": {
  13284. "type": "object",
  13285. "properties": {
  13286. "timestamp": {
  13287. "type": "number"
  13288. },
  13289. "sessionID": {
  13290. "type": "string",
  13291. "pattern": "^ses"
  13292. },
  13293. "callID": {
  13294. "type": "string"
  13295. },
  13296. "tool": {
  13297. "type": "string"
  13298. },
  13299. "input": {
  13300. "type": "object"
  13301. },
  13302. "provider": {
  13303. "type": "object",
  13304. "properties": {
  13305. "executed": {
  13306. "type": "boolean"
  13307. },
  13308. "metadata": {
  13309. "type": "object"
  13310. }
  13311. },
  13312. "required": ["executed"],
  13313. "additionalProperties": false
  13314. }
  13315. },
  13316. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  13317. "additionalProperties": false
  13318. }
  13319. },
  13320. "required": ["id", "type", "properties"],
  13321. "additionalProperties": false
  13322. },
  13323. {
  13324. "type": "object",
  13325. "properties": {
  13326. "id": {
  13327. "type": "string"
  13328. },
  13329. "type": {
  13330. "type": "string",
  13331. "enum": ["session.next.tool.progress"]
  13332. },
  13333. "properties": {
  13334. "type": "object",
  13335. "properties": {
  13336. "timestamp": {
  13337. "type": "number"
  13338. },
  13339. "sessionID": {
  13340. "type": "string",
  13341. "pattern": "^ses"
  13342. },
  13343. "callID": {
  13344. "type": "string"
  13345. },
  13346. "structured": {
  13347. "type": "object"
  13348. },
  13349. "content": {
  13350. "type": "array",
  13351. "items": {
  13352. "anyOf": [
  13353. {
  13354. "$ref": "#/components/schemas/ToolTextContent"
  13355. },
  13356. {
  13357. "$ref": "#/components/schemas/ToolFileContent"
  13358. }
  13359. ]
  13360. }
  13361. }
  13362. },
  13363. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  13364. "additionalProperties": false
  13365. }
  13366. },
  13367. "required": ["id", "type", "properties"],
  13368. "additionalProperties": false
  13369. },
  13370. {
  13371. "type": "object",
  13372. "properties": {
  13373. "id": {
  13374. "type": "string"
  13375. },
  13376. "type": {
  13377. "type": "string",
  13378. "enum": ["session.next.tool.success"]
  13379. },
  13380. "properties": {
  13381. "type": "object",
  13382. "properties": {
  13383. "timestamp": {
  13384. "type": "number"
  13385. },
  13386. "sessionID": {
  13387. "type": "string",
  13388. "pattern": "^ses"
  13389. },
  13390. "callID": {
  13391. "type": "string"
  13392. },
  13393. "structured": {
  13394. "type": "object"
  13395. },
  13396. "content": {
  13397. "type": "array",
  13398. "items": {
  13399. "anyOf": [
  13400. {
  13401. "$ref": "#/components/schemas/ToolTextContent"
  13402. },
  13403. {
  13404. "$ref": "#/components/schemas/ToolFileContent"
  13405. }
  13406. ]
  13407. }
  13408. },
  13409. "provider": {
  13410. "type": "object",
  13411. "properties": {
  13412. "executed": {
  13413. "type": "boolean"
  13414. },
  13415. "metadata": {
  13416. "type": "object"
  13417. }
  13418. },
  13419. "required": ["executed"],
  13420. "additionalProperties": false
  13421. }
  13422. },
  13423. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  13424. "additionalProperties": false
  13425. }
  13426. },
  13427. "required": ["id", "type", "properties"],
  13428. "additionalProperties": false
  13429. },
  13430. {
  13431. "type": "object",
  13432. "properties": {
  13433. "id": {
  13434. "type": "string"
  13435. },
  13436. "type": {
  13437. "type": "string",
  13438. "enum": ["session.next.tool.failed"]
  13439. },
  13440. "properties": {
  13441. "type": "object",
  13442. "properties": {
  13443. "timestamp": {
  13444. "type": "number"
  13445. },
  13446. "sessionID": {
  13447. "type": "string",
  13448. "pattern": "^ses"
  13449. },
  13450. "callID": {
  13451. "type": "string"
  13452. },
  13453. "error": {
  13454. "$ref": "#/components/schemas/SessionErrorUnknown"
  13455. },
  13456. "provider": {
  13457. "type": "object",
  13458. "properties": {
  13459. "executed": {
  13460. "type": "boolean"
  13461. },
  13462. "metadata": {
  13463. "type": "object"
  13464. }
  13465. },
  13466. "required": ["executed"],
  13467. "additionalProperties": false
  13468. }
  13469. },
  13470. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  13471. "additionalProperties": false
  13472. }
  13473. },
  13474. "required": ["id", "type", "properties"],
  13475. "additionalProperties": false
  13476. },
  13477. {
  13478. "type": "object",
  13479. "properties": {
  13480. "id": {
  13481. "type": "string"
  13482. },
  13483. "type": {
  13484. "type": "string",
  13485. "enum": ["session.next.retried"]
  13486. },
  13487. "properties": {
  13488. "type": "object",
  13489. "properties": {
  13490. "timestamp": {
  13491. "type": "number"
  13492. },
  13493. "sessionID": {
  13494. "type": "string",
  13495. "pattern": "^ses"
  13496. },
  13497. "attempt": {
  13498. "type": "number"
  13499. },
  13500. "error": {
  13501. "$ref": "#/components/schemas/SessionNextRetry_error"
  13502. }
  13503. },
  13504. "required": ["timestamp", "sessionID", "attempt", "error"],
  13505. "additionalProperties": false
  13506. }
  13507. },
  13508. "required": ["id", "type", "properties"],
  13509. "additionalProperties": false
  13510. },
  13511. {
  13512. "type": "object",
  13513. "properties": {
  13514. "id": {
  13515. "type": "string"
  13516. },
  13517. "type": {
  13518. "type": "string",
  13519. "enum": ["session.next.compaction.started"]
  13520. },
  13521. "properties": {
  13522. "type": "object",
  13523. "properties": {
  13524. "timestamp": {
  13525. "type": "number"
  13526. },
  13527. "sessionID": {
  13528. "type": "string",
  13529. "pattern": "^ses"
  13530. },
  13531. "reason": {
  13532. "type": "string",
  13533. "enum": ["auto", "manual"]
  13534. }
  13535. },
  13536. "required": ["timestamp", "sessionID", "reason"],
  13537. "additionalProperties": false
  13538. }
  13539. },
  13540. "required": ["id", "type", "properties"],
  13541. "additionalProperties": false
  13542. },
  13543. {
  13544. "type": "object",
  13545. "properties": {
  13546. "id": {
  13547. "type": "string"
  13548. },
  13549. "type": {
  13550. "type": "string",
  13551. "enum": ["session.next.compaction.delta"]
  13552. },
  13553. "properties": {
  13554. "type": "object",
  13555. "properties": {
  13556. "timestamp": {
  13557. "type": "number"
  13558. },
  13559. "sessionID": {
  13560. "type": "string",
  13561. "pattern": "^ses"
  13562. },
  13563. "text": {
  13564. "type": "string"
  13565. }
  13566. },
  13567. "required": ["timestamp", "sessionID", "text"],
  13568. "additionalProperties": false
  13569. }
  13570. },
  13571. "required": ["id", "type", "properties"],
  13572. "additionalProperties": false
  13573. },
  13574. {
  13575. "type": "object",
  13576. "properties": {
  13577. "id": {
  13578. "type": "string"
  13579. },
  13580. "type": {
  13581. "type": "string",
  13582. "enum": ["session.next.compaction.ended"]
  13583. },
  13584. "properties": {
  13585. "type": "object",
  13586. "properties": {
  13587. "timestamp": {
  13588. "type": "number"
  13589. },
  13590. "sessionID": {
  13591. "type": "string",
  13592. "pattern": "^ses"
  13593. },
  13594. "text": {
  13595. "type": "string"
  13596. },
  13597. "include": {
  13598. "type": "string"
  13599. }
  13600. },
  13601. "required": ["timestamp", "sessionID", "text"],
  13602. "additionalProperties": false
  13603. }
  13604. },
  13605. "required": ["id", "type", "properties"],
  13606. "additionalProperties": false
  13607. },
  13608. {
  13609. "type": "object",
  13610. "properties": {
  13611. "id": {
  13612. "type": "string"
  13613. },
  13614. "type": {
  13615. "type": "string",
  13616. "enum": ["file.watcher.updated"]
  13617. },
  13618. "properties": {
  13619. "type": "object",
  13620. "properties": {
  13621. "file": {
  13622. "type": "string"
  13623. },
  13624. "event": {
  13625. "type": "string",
  13626. "enum": ["add", "change", "unlink"]
  13627. }
  13628. },
  13629. "required": ["file", "event"],
  13630. "additionalProperties": false
  13631. }
  13632. },
  13633. "required": ["id", "type", "properties"],
  13634. "additionalProperties": false
  13635. },
  13636. {
  13637. "type": "object",
  13638. "properties": {
  13639. "id": {
  13640. "type": "string"
  13641. },
  13642. "type": {
  13643. "type": "string",
  13644. "enum": ["session.created"]
  13645. },
  13646. "properties": {
  13647. "type": "object",
  13648. "properties": {
  13649. "sessionID": {
  13650. "type": "string",
  13651. "pattern": "^ses"
  13652. },
  13653. "info": {
  13654. "$ref": "#/components/schemas/Session"
  13655. }
  13656. },
  13657. "required": ["sessionID", "info"],
  13658. "additionalProperties": false
  13659. }
  13660. },
  13661. "required": ["id", "type", "properties"],
  13662. "additionalProperties": false
  13663. },
  13664. {
  13665. "type": "object",
  13666. "properties": {
  13667. "id": {
  13668. "type": "string"
  13669. },
  13670. "type": {
  13671. "type": "string",
  13672. "enum": ["session.updated"]
  13673. },
  13674. "properties": {
  13675. "type": "object",
  13676. "properties": {
  13677. "sessionID": {
  13678. "type": "string",
  13679. "pattern": "^ses"
  13680. },
  13681. "info": {
  13682. "$ref": "#/components/schemas/Session"
  13683. }
  13684. },
  13685. "required": ["sessionID", "info"],
  13686. "additionalProperties": false
  13687. }
  13688. },
  13689. "required": ["id", "type", "properties"],
  13690. "additionalProperties": false
  13691. },
  13692. {
  13693. "type": "object",
  13694. "properties": {
  13695. "id": {
  13696. "type": "string"
  13697. },
  13698. "type": {
  13699. "type": "string",
  13700. "enum": ["session.deleted"]
  13701. },
  13702. "properties": {
  13703. "type": "object",
  13704. "properties": {
  13705. "sessionID": {
  13706. "type": "string",
  13707. "pattern": "^ses"
  13708. },
  13709. "info": {
  13710. "$ref": "#/components/schemas/Session"
  13711. }
  13712. },
  13713. "required": ["sessionID", "info"],
  13714. "additionalProperties": false
  13715. }
  13716. },
  13717. "required": ["id", "type", "properties"],
  13718. "additionalProperties": false
  13719. },
  13720. {
  13721. "type": "object",
  13722. "properties": {
  13723. "id": {
  13724. "type": "string"
  13725. },
  13726. "type": {
  13727. "type": "string",
  13728. "enum": ["message.updated"]
  13729. },
  13730. "properties": {
  13731. "type": "object",
  13732. "properties": {
  13733. "sessionID": {
  13734. "type": "string",
  13735. "pattern": "^ses"
  13736. },
  13737. "info": {
  13738. "$ref": "#/components/schemas/Message"
  13739. }
  13740. },
  13741. "required": ["sessionID", "info"],
  13742. "additionalProperties": false
  13743. }
  13744. },
  13745. "required": ["id", "type", "properties"],
  13746. "additionalProperties": false
  13747. },
  13748. {
  13749. "type": "object",
  13750. "properties": {
  13751. "id": {
  13752. "type": "string"
  13753. },
  13754. "type": {
  13755. "type": "string",
  13756. "enum": ["message.removed"]
  13757. },
  13758. "properties": {
  13759. "type": "object",
  13760. "properties": {
  13761. "sessionID": {
  13762. "type": "string",
  13763. "pattern": "^ses"
  13764. },
  13765. "messageID": {
  13766. "type": "string",
  13767. "pattern": "^msg"
  13768. }
  13769. },
  13770. "required": ["sessionID", "messageID"],
  13771. "additionalProperties": false
  13772. }
  13773. },
  13774. "required": ["id", "type", "properties"],
  13775. "additionalProperties": false
  13776. },
  13777. {
  13778. "type": "object",
  13779. "properties": {
  13780. "id": {
  13781. "type": "string"
  13782. },
  13783. "type": {
  13784. "type": "string",
  13785. "enum": ["message.part.updated"]
  13786. },
  13787. "properties": {
  13788. "type": "object",
  13789. "properties": {
  13790. "sessionID": {
  13791. "type": "string",
  13792. "pattern": "^ses"
  13793. },
  13794. "part": {
  13795. "$ref": "#/components/schemas/Part"
  13796. },
  13797. "time": {
  13798. "type": "number"
  13799. }
  13800. },
  13801. "required": ["sessionID", "part", "time"],
  13802. "additionalProperties": false
  13803. }
  13804. },
  13805. "required": ["id", "type", "properties"],
  13806. "additionalProperties": false
  13807. },
  13808. {
  13809. "type": "object",
  13810. "properties": {
  13811. "id": {
  13812. "type": "string"
  13813. },
  13814. "type": {
  13815. "type": "string",
  13816. "enum": ["message.part.removed"]
  13817. },
  13818. "properties": {
  13819. "type": "object",
  13820. "properties": {
  13821. "sessionID": {
  13822. "type": "string",
  13823. "pattern": "^ses"
  13824. },
  13825. "messageID": {
  13826. "type": "string",
  13827. "pattern": "^msg"
  13828. },
  13829. "partID": {
  13830. "type": "string",
  13831. "pattern": "^prt"
  13832. }
  13833. },
  13834. "required": ["sessionID", "messageID", "partID"],
  13835. "additionalProperties": false
  13836. }
  13837. },
  13838. "required": ["id", "type", "properties"],
  13839. "additionalProperties": false
  13840. },
  13841. {
  13842. "type": "object",
  13843. "properties": {
  13844. "id": {
  13845. "type": "string"
  13846. },
  13847. "type": {
  13848. "type": "string",
  13849. "enum": ["message.part.delta"]
  13850. },
  13851. "properties": {
  13852. "type": "object",
  13853. "properties": {
  13854. "sessionID": {
  13855. "type": "string",
  13856. "pattern": "^ses"
  13857. },
  13858. "messageID": {
  13859. "type": "string",
  13860. "pattern": "^msg"
  13861. },
  13862. "partID": {
  13863. "type": "string",
  13864. "pattern": "^prt"
  13865. },
  13866. "field": {
  13867. "type": "string"
  13868. },
  13869. "delta": {
  13870. "type": "string"
  13871. }
  13872. },
  13873. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  13874. "additionalProperties": false
  13875. }
  13876. },
  13877. "required": ["id", "type", "properties"],
  13878. "additionalProperties": false
  13879. },
  13880. {
  13881. "type": "object",
  13882. "properties": {
  13883. "id": {
  13884. "type": "string"
  13885. },
  13886. "type": {
  13887. "type": "string",
  13888. "enum": ["permission.asked"]
  13889. },
  13890. "properties": {
  13891. "type": "object",
  13892. "properties": {
  13893. "id": {
  13894. "type": "string",
  13895. "pattern": "^per"
  13896. },
  13897. "sessionID": {
  13898. "type": "string",
  13899. "pattern": "^ses"
  13900. },
  13901. "permission": {
  13902. "type": "string"
  13903. },
  13904. "patterns": {
  13905. "type": "array",
  13906. "items": {
  13907. "type": "string"
  13908. }
  13909. },
  13910. "metadata": {
  13911. "type": "object"
  13912. },
  13913. "always": {
  13914. "type": "array",
  13915. "items": {
  13916. "type": "string"
  13917. }
  13918. },
  13919. "tool": {
  13920. "type": "object",
  13921. "properties": {
  13922. "messageID": {
  13923. "type": "string",
  13924. "pattern": "^msg"
  13925. },
  13926. "callID": {
  13927. "type": "string"
  13928. }
  13929. },
  13930. "required": ["messageID", "callID"],
  13931. "additionalProperties": false
  13932. }
  13933. },
  13934. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  13935. "additionalProperties": false
  13936. }
  13937. },
  13938. "required": ["id", "type", "properties"],
  13939. "additionalProperties": false
  13940. },
  13941. {
  13942. "type": "object",
  13943. "properties": {
  13944. "id": {
  13945. "type": "string"
  13946. },
  13947. "type": {
  13948. "type": "string",
  13949. "enum": ["permission.replied"]
  13950. },
  13951. "properties": {
  13952. "type": "object",
  13953. "properties": {
  13954. "sessionID": {
  13955. "type": "string",
  13956. "pattern": "^ses"
  13957. },
  13958. "requestID": {
  13959. "type": "string",
  13960. "pattern": "^per"
  13961. },
  13962. "reply": {
  13963. "type": "string",
  13964. "enum": ["once", "always", "reject"]
  13965. }
  13966. },
  13967. "required": ["sessionID", "requestID", "reply"],
  13968. "additionalProperties": false
  13969. }
  13970. },
  13971. "required": ["id", "type", "properties"],
  13972. "additionalProperties": false
  13973. },
  13974. {
  13975. "type": "object",
  13976. "properties": {
  13977. "id": {
  13978. "type": "string"
  13979. },
  13980. "type": {
  13981. "type": "string",
  13982. "enum": ["session.diff"]
  13983. },
  13984. "properties": {
  13985. "type": "object",
  13986. "properties": {
  13987. "sessionID": {
  13988. "type": "string",
  13989. "pattern": "^ses"
  13990. },
  13991. "diff": {
  13992. "type": "array",
  13993. "items": {
  13994. "$ref": "#/components/schemas/SnapshotFileDiff"
  13995. }
  13996. }
  13997. },
  13998. "required": ["sessionID", "diff"],
  13999. "additionalProperties": false
  14000. }
  14001. },
  14002. "required": ["id", "type", "properties"],
  14003. "additionalProperties": false
  14004. },
  14005. {
  14006. "type": "object",
  14007. "properties": {
  14008. "id": {
  14009. "type": "string"
  14010. },
  14011. "type": {
  14012. "type": "string",
  14013. "enum": ["session.error"]
  14014. },
  14015. "properties": {
  14016. "type": "object",
  14017. "properties": {
  14018. "sessionID": {
  14019. "type": "string",
  14020. "pattern": "^ses"
  14021. },
  14022. "error": {
  14023. "anyOf": [
  14024. {
  14025. "$ref": "#/components/schemas/ProviderAuthError"
  14026. },
  14027. {
  14028. "$ref": "#/components/schemas/UnknownError"
  14029. },
  14030. {
  14031. "$ref": "#/components/schemas/MessageOutputLengthError"
  14032. },
  14033. {
  14034. "$ref": "#/components/schemas/MessageAbortedError"
  14035. },
  14036. {
  14037. "$ref": "#/components/schemas/StructuredOutputError"
  14038. },
  14039. {
  14040. "$ref": "#/components/schemas/ContextOverflowError"
  14041. },
  14042. {
  14043. "$ref": "#/components/schemas/APIError"
  14044. }
  14045. ]
  14046. }
  14047. },
  14048. "additionalProperties": false
  14049. }
  14050. },
  14051. "required": ["id", "type", "properties"],
  14052. "additionalProperties": false
  14053. },
  14054. {
  14055. "type": "object",
  14056. "properties": {
  14057. "id": {
  14058. "type": "string"
  14059. },
  14060. "type": {
  14061. "type": "string",
  14062. "enum": ["question.asked"]
  14063. },
  14064. "properties": {
  14065. "type": "object",
  14066. "properties": {
  14067. "id": {
  14068. "type": "string",
  14069. "pattern": "^que"
  14070. },
  14071. "sessionID": {
  14072. "type": "string",
  14073. "pattern": "^ses"
  14074. },
  14075. "questions": {
  14076. "type": "array",
  14077. "items": {
  14078. "$ref": "#/components/schemas/QuestionInfo"
  14079. },
  14080. "description": "Questions to ask"
  14081. },
  14082. "tool": {
  14083. "$ref": "#/components/schemas/QuestionTool"
  14084. }
  14085. },
  14086. "required": ["id", "sessionID", "questions"],
  14087. "additionalProperties": false
  14088. }
  14089. },
  14090. "required": ["id", "type", "properties"],
  14091. "additionalProperties": false
  14092. },
  14093. {
  14094. "type": "object",
  14095. "properties": {
  14096. "id": {
  14097. "type": "string"
  14098. },
  14099. "type": {
  14100. "type": "string",
  14101. "enum": ["question.replied"]
  14102. },
  14103. "properties": {
  14104. "type": "object",
  14105. "properties": {
  14106. "sessionID": {
  14107. "type": "string",
  14108. "pattern": "^ses"
  14109. },
  14110. "requestID": {
  14111. "type": "string",
  14112. "pattern": "^que"
  14113. },
  14114. "answers": {
  14115. "type": "array",
  14116. "items": {
  14117. "$ref": "#/components/schemas/QuestionAnswer"
  14118. }
  14119. }
  14120. },
  14121. "required": ["sessionID", "requestID", "answers"],
  14122. "additionalProperties": false
  14123. }
  14124. },
  14125. "required": ["id", "type", "properties"],
  14126. "additionalProperties": false
  14127. },
  14128. {
  14129. "type": "object",
  14130. "properties": {
  14131. "id": {
  14132. "type": "string"
  14133. },
  14134. "type": {
  14135. "type": "string",
  14136. "enum": ["question.rejected"]
  14137. },
  14138. "properties": {
  14139. "type": "object",
  14140. "properties": {
  14141. "sessionID": {
  14142. "type": "string",
  14143. "pattern": "^ses"
  14144. },
  14145. "requestID": {
  14146. "type": "string",
  14147. "pattern": "^que"
  14148. }
  14149. },
  14150. "required": ["sessionID", "requestID"],
  14151. "additionalProperties": false
  14152. }
  14153. },
  14154. "required": ["id", "type", "properties"],
  14155. "additionalProperties": false
  14156. },
  14157. {
  14158. "type": "object",
  14159. "properties": {
  14160. "id": {
  14161. "type": "string"
  14162. },
  14163. "type": {
  14164. "type": "string",
  14165. "enum": ["todo.updated"]
  14166. },
  14167. "properties": {
  14168. "type": "object",
  14169. "properties": {
  14170. "sessionID": {
  14171. "type": "string",
  14172. "pattern": "^ses"
  14173. },
  14174. "todos": {
  14175. "type": "array",
  14176. "items": {
  14177. "$ref": "#/components/schemas/Todo"
  14178. }
  14179. }
  14180. },
  14181. "required": ["sessionID", "todos"],
  14182. "additionalProperties": false
  14183. }
  14184. },
  14185. "required": ["id", "type", "properties"],
  14186. "additionalProperties": false
  14187. },
  14188. {
  14189. "type": "object",
  14190. "properties": {
  14191. "id": {
  14192. "type": "string"
  14193. },
  14194. "type": {
  14195. "type": "string",
  14196. "enum": ["session.status"]
  14197. },
  14198. "properties": {
  14199. "type": "object",
  14200. "properties": {
  14201. "sessionID": {
  14202. "type": "string",
  14203. "pattern": "^ses"
  14204. },
  14205. "status": {
  14206. "$ref": "#/components/schemas/SessionStatus"
  14207. }
  14208. },
  14209. "required": ["sessionID", "status"],
  14210. "additionalProperties": false
  14211. }
  14212. },
  14213. "required": ["id", "type", "properties"],
  14214. "additionalProperties": false
  14215. },
  14216. {
  14217. "type": "object",
  14218. "properties": {
  14219. "id": {
  14220. "type": "string"
  14221. },
  14222. "type": {
  14223. "type": "string",
  14224. "enum": ["session.idle"]
  14225. },
  14226. "properties": {
  14227. "type": "object",
  14228. "properties": {
  14229. "sessionID": {
  14230. "type": "string",
  14231. "pattern": "^ses"
  14232. }
  14233. },
  14234. "required": ["sessionID"],
  14235. "additionalProperties": false
  14236. }
  14237. },
  14238. "required": ["id", "type", "properties"],
  14239. "additionalProperties": false
  14240. },
  14241. {
  14242. "type": "object",
  14243. "properties": {
  14244. "id": {
  14245. "type": "string"
  14246. },
  14247. "type": {
  14248. "type": "string",
  14249. "enum": ["session.compacted"]
  14250. },
  14251. "properties": {
  14252. "type": "object",
  14253. "properties": {
  14254. "sessionID": {
  14255. "type": "string",
  14256. "pattern": "^ses"
  14257. }
  14258. },
  14259. "required": ["sessionID"],
  14260. "additionalProperties": false
  14261. }
  14262. },
  14263. "required": ["id", "type", "properties"],
  14264. "additionalProperties": false
  14265. },
  14266. {
  14267. "type": "object",
  14268. "properties": {
  14269. "id": {
  14270. "type": "string"
  14271. },
  14272. "type": {
  14273. "type": "string",
  14274. "enum": ["lsp.updated"]
  14275. },
  14276. "properties": {
  14277. "type": "object",
  14278. "properties": {}
  14279. }
  14280. },
  14281. "required": ["id", "type", "properties"],
  14282. "additionalProperties": false
  14283. },
  14284. {
  14285. "type": "object",
  14286. "properties": {
  14287. "id": {
  14288. "type": "string"
  14289. },
  14290. "type": {
  14291. "type": "string",
  14292. "enum": ["tui.prompt.append"]
  14293. },
  14294. "properties": {
  14295. "type": "object",
  14296. "properties": {
  14297. "text": {
  14298. "type": "string"
  14299. }
  14300. },
  14301. "required": ["text"],
  14302. "additionalProperties": false
  14303. }
  14304. },
  14305. "required": ["id", "type", "properties"],
  14306. "additionalProperties": false
  14307. },
  14308. {
  14309. "type": "object",
  14310. "properties": {
  14311. "id": {
  14312. "type": "string"
  14313. },
  14314. "type": {
  14315. "type": "string",
  14316. "enum": ["tui.command.execute"]
  14317. },
  14318. "properties": {
  14319. "type": "object",
  14320. "properties": {
  14321. "command": {
  14322. "anyOf": [
  14323. {
  14324. "type": "string",
  14325. "enum": [
  14326. "session.list",
  14327. "session.new",
  14328. "session.share",
  14329. "session.interrupt",
  14330. "session.compact",
  14331. "session.page.up",
  14332. "session.page.down",
  14333. "session.line.up",
  14334. "session.line.down",
  14335. "session.half.page.up",
  14336. "session.half.page.down",
  14337. "session.first",
  14338. "session.last",
  14339. "prompt.clear",
  14340. "prompt.submit",
  14341. "agent.cycle"
  14342. ]
  14343. },
  14344. {
  14345. "type": "string"
  14346. }
  14347. ]
  14348. }
  14349. },
  14350. "required": ["command"],
  14351. "additionalProperties": false
  14352. }
  14353. },
  14354. "required": ["id", "type", "properties"],
  14355. "additionalProperties": false
  14356. },
  14357. {
  14358. "type": "object",
  14359. "properties": {
  14360. "id": {
  14361. "type": "string"
  14362. },
  14363. "type": {
  14364. "type": "string",
  14365. "enum": ["tui.toast.show"]
  14366. },
  14367. "properties": {
  14368. "type": "object",
  14369. "properties": {
  14370. "title": {
  14371. "type": "string"
  14372. },
  14373. "message": {
  14374. "type": "string"
  14375. },
  14376. "variant": {
  14377. "type": "string",
  14378. "enum": ["info", "success", "warning", "error"]
  14379. },
  14380. "duration": {
  14381. "type": "integer",
  14382. "exclusiveMinimum": 0
  14383. }
  14384. },
  14385. "required": ["message", "variant"],
  14386. "additionalProperties": false
  14387. }
  14388. },
  14389. "required": ["id", "type", "properties"],
  14390. "additionalProperties": false
  14391. },
  14392. {
  14393. "type": "object",
  14394. "properties": {
  14395. "id": {
  14396. "type": "string"
  14397. },
  14398. "type": {
  14399. "type": "string",
  14400. "enum": ["tui.session.select"]
  14401. },
  14402. "properties": {
  14403. "type": "object",
  14404. "properties": {
  14405. "sessionID": {
  14406. "type": "string",
  14407. "pattern": "^ses",
  14408. "description": "Session ID to navigate to"
  14409. }
  14410. },
  14411. "required": ["sessionID"],
  14412. "additionalProperties": false
  14413. }
  14414. },
  14415. "required": ["id", "type", "properties"],
  14416. "additionalProperties": false
  14417. },
  14418. {
  14419. "type": "object",
  14420. "properties": {
  14421. "id": {
  14422. "type": "string"
  14423. },
  14424. "type": {
  14425. "type": "string",
  14426. "enum": ["mcp.tools.changed"]
  14427. },
  14428. "properties": {
  14429. "type": "object",
  14430. "properties": {
  14431. "server": {
  14432. "type": "string"
  14433. }
  14434. },
  14435. "required": ["server"],
  14436. "additionalProperties": false
  14437. }
  14438. },
  14439. "required": ["id", "type", "properties"],
  14440. "additionalProperties": false
  14441. },
  14442. {
  14443. "type": "object",
  14444. "properties": {
  14445. "id": {
  14446. "type": "string"
  14447. },
  14448. "type": {
  14449. "type": "string",
  14450. "enum": ["mcp.browser.open.failed"]
  14451. },
  14452. "properties": {
  14453. "type": "object",
  14454. "properties": {
  14455. "mcpName": {
  14456. "type": "string"
  14457. },
  14458. "url": {
  14459. "type": "string"
  14460. }
  14461. },
  14462. "required": ["mcpName", "url"],
  14463. "additionalProperties": false
  14464. }
  14465. },
  14466. "required": ["id", "type", "properties"],
  14467. "additionalProperties": false
  14468. },
  14469. {
  14470. "type": "object",
  14471. "properties": {
  14472. "id": {
  14473. "type": "string"
  14474. },
  14475. "type": {
  14476. "type": "string",
  14477. "enum": ["command.executed"]
  14478. },
  14479. "properties": {
  14480. "type": "object",
  14481. "properties": {
  14482. "name": {
  14483. "type": "string"
  14484. },
  14485. "sessionID": {
  14486. "type": "string",
  14487. "pattern": "^ses"
  14488. },
  14489. "arguments": {
  14490. "type": "string"
  14491. },
  14492. "messageID": {
  14493. "type": "string",
  14494. "pattern": "^msg"
  14495. }
  14496. },
  14497. "required": ["name", "sessionID", "arguments", "messageID"],
  14498. "additionalProperties": false
  14499. }
  14500. },
  14501. "required": ["id", "type", "properties"],
  14502. "additionalProperties": false
  14503. },
  14504. {
  14505. "type": "object",
  14506. "properties": {
  14507. "id": {
  14508. "type": "string"
  14509. },
  14510. "type": {
  14511. "type": "string",
  14512. "enum": ["project.updated"]
  14513. },
  14514. "properties": {
  14515. "type": "object",
  14516. "properties": {
  14517. "id": {
  14518. "type": "string"
  14519. },
  14520. "worktree": {
  14521. "type": "string"
  14522. },
  14523. "vcs": {
  14524. "type": "string",
  14525. "enum": ["git"]
  14526. },
  14527. "name": {
  14528. "type": "string"
  14529. },
  14530. "icon": {
  14531. "type": "object",
  14532. "properties": {
  14533. "url": {
  14534. "type": "string"
  14535. },
  14536. "override": {
  14537. "type": "string"
  14538. },
  14539. "color": {
  14540. "type": "string"
  14541. }
  14542. },
  14543. "additionalProperties": false
  14544. },
  14545. "commands": {
  14546. "type": "object",
  14547. "properties": {
  14548. "start": {
  14549. "type": "string",
  14550. "description": "Startup script to run when creating a new workspace (worktree)"
  14551. }
  14552. },
  14553. "additionalProperties": false
  14554. },
  14555. "time": {
  14556. "type": "object",
  14557. "properties": {
  14558. "created": {
  14559. "type": "integer",
  14560. "minimum": 0
  14561. },
  14562. "updated": {
  14563. "type": "integer",
  14564. "minimum": 0
  14565. },
  14566. "initialized": {
  14567. "type": "integer",
  14568. "minimum": 0
  14569. }
  14570. },
  14571. "required": ["created", "updated"],
  14572. "additionalProperties": false
  14573. },
  14574. "sandboxes": {
  14575. "type": "array",
  14576. "items": {
  14577. "type": "string"
  14578. }
  14579. }
  14580. },
  14581. "required": ["id", "worktree", "time", "sandboxes"],
  14582. "additionalProperties": false
  14583. }
  14584. },
  14585. "required": ["id", "type", "properties"],
  14586. "additionalProperties": false
  14587. },
  14588. {
  14589. "type": "object",
  14590. "properties": {
  14591. "id": {
  14592. "type": "string"
  14593. },
  14594. "type": {
  14595. "type": "string",
  14596. "enum": ["vcs.branch.updated"]
  14597. },
  14598. "properties": {
  14599. "type": "object",
  14600. "properties": {
  14601. "branch": {
  14602. "type": "string"
  14603. }
  14604. },
  14605. "additionalProperties": false
  14606. }
  14607. },
  14608. "required": ["id", "type", "properties"],
  14609. "additionalProperties": false
  14610. },
  14611. {
  14612. "type": "object",
  14613. "properties": {
  14614. "id": {
  14615. "type": "string"
  14616. },
  14617. "type": {
  14618. "type": "string",
  14619. "enum": ["workspace.ready"]
  14620. },
  14621. "properties": {
  14622. "type": "object",
  14623. "properties": {
  14624. "name": {
  14625. "type": "string"
  14626. }
  14627. },
  14628. "required": ["name"],
  14629. "additionalProperties": false
  14630. }
  14631. },
  14632. "required": ["id", "type", "properties"],
  14633. "additionalProperties": false
  14634. },
  14635. {
  14636. "type": "object",
  14637. "properties": {
  14638. "id": {
  14639. "type": "string"
  14640. },
  14641. "type": {
  14642. "type": "string",
  14643. "enum": ["workspace.failed"]
  14644. },
  14645. "properties": {
  14646. "type": "object",
  14647. "properties": {
  14648. "message": {
  14649. "type": "string"
  14650. }
  14651. },
  14652. "required": ["message"],
  14653. "additionalProperties": false
  14654. }
  14655. },
  14656. "required": ["id", "type", "properties"],
  14657. "additionalProperties": false
  14658. },
  14659. {
  14660. "type": "object",
  14661. "properties": {
  14662. "id": {
  14663. "type": "string"
  14664. },
  14665. "type": {
  14666. "type": "string",
  14667. "enum": ["workspace.status"]
  14668. },
  14669. "properties": {
  14670. "type": "object",
  14671. "properties": {
  14672. "workspaceID": {
  14673. "type": "string",
  14674. "pattern": "^wrk"
  14675. },
  14676. "status": {
  14677. "type": "string",
  14678. "enum": ["connected", "connecting", "disconnected", "error"]
  14679. }
  14680. },
  14681. "required": ["workspaceID", "status"],
  14682. "additionalProperties": false
  14683. }
  14684. },
  14685. "required": ["id", "type", "properties"],
  14686. "additionalProperties": false
  14687. },
  14688. {
  14689. "type": "object",
  14690. "properties": {
  14691. "id": {
  14692. "type": "string"
  14693. },
  14694. "type": {
  14695. "type": "string",
  14696. "enum": ["worktree.ready"]
  14697. },
  14698. "properties": {
  14699. "type": "object",
  14700. "properties": {
  14701. "name": {
  14702. "type": "string"
  14703. },
  14704. "branch": {
  14705. "type": "string"
  14706. }
  14707. },
  14708. "required": ["name"],
  14709. "additionalProperties": false
  14710. }
  14711. },
  14712. "required": ["id", "type", "properties"],
  14713. "additionalProperties": false
  14714. },
  14715. {
  14716. "type": "object",
  14717. "properties": {
  14718. "id": {
  14719. "type": "string"
  14720. },
  14721. "type": {
  14722. "type": "string",
  14723. "enum": ["worktree.failed"]
  14724. },
  14725. "properties": {
  14726. "type": "object",
  14727. "properties": {
  14728. "message": {
  14729. "type": "string"
  14730. }
  14731. },
  14732. "required": ["message"],
  14733. "additionalProperties": false
  14734. }
  14735. },
  14736. "required": ["id", "type", "properties"],
  14737. "additionalProperties": false
  14738. },
  14739. {
  14740. "type": "object",
  14741. "properties": {
  14742. "id": {
  14743. "type": "string"
  14744. },
  14745. "type": {
  14746. "type": "string",
  14747. "enum": ["pty.created"]
  14748. },
  14749. "properties": {
  14750. "type": "object",
  14751. "properties": {
  14752. "info": {
  14753. "$ref": "#/components/schemas/Pty"
  14754. }
  14755. },
  14756. "required": ["info"],
  14757. "additionalProperties": false
  14758. }
  14759. },
  14760. "required": ["id", "type", "properties"],
  14761. "additionalProperties": false
  14762. },
  14763. {
  14764. "type": "object",
  14765. "properties": {
  14766. "id": {
  14767. "type": "string"
  14768. },
  14769. "type": {
  14770. "type": "string",
  14771. "enum": ["pty.updated"]
  14772. },
  14773. "properties": {
  14774. "type": "object",
  14775. "properties": {
  14776. "info": {
  14777. "$ref": "#/components/schemas/Pty"
  14778. }
  14779. },
  14780. "required": ["info"],
  14781. "additionalProperties": false
  14782. }
  14783. },
  14784. "required": ["id", "type", "properties"],
  14785. "additionalProperties": false
  14786. },
  14787. {
  14788. "type": "object",
  14789. "properties": {
  14790. "id": {
  14791. "type": "string"
  14792. },
  14793. "type": {
  14794. "type": "string",
  14795. "enum": ["pty.exited"]
  14796. },
  14797. "properties": {
  14798. "type": "object",
  14799. "properties": {
  14800. "id": {
  14801. "type": "string",
  14802. "pattern": "^pty"
  14803. },
  14804. "exitCode": {
  14805. "type": "integer",
  14806. "minimum": 0
  14807. }
  14808. },
  14809. "required": ["id", "exitCode"],
  14810. "additionalProperties": false
  14811. }
  14812. },
  14813. "required": ["id", "type", "properties"],
  14814. "additionalProperties": false
  14815. },
  14816. {
  14817. "type": "object",
  14818. "properties": {
  14819. "id": {
  14820. "type": "string"
  14821. },
  14822. "type": {
  14823. "type": "string",
  14824. "enum": ["pty.deleted"]
  14825. },
  14826. "properties": {
  14827. "type": "object",
  14828. "properties": {
  14829. "id": {
  14830. "type": "string",
  14831. "pattern": "^pty"
  14832. }
  14833. },
  14834. "required": ["id"],
  14835. "additionalProperties": false
  14836. }
  14837. },
  14838. "required": ["id", "type", "properties"],
  14839. "additionalProperties": false
  14840. },
  14841. {
  14842. "type": "object",
  14843. "properties": {
  14844. "id": {
  14845. "type": "string"
  14846. },
  14847. "type": {
  14848. "type": "string",
  14849. "enum": ["installation.updated"]
  14850. },
  14851. "properties": {
  14852. "type": "object",
  14853. "properties": {
  14854. "version": {
  14855. "type": "string"
  14856. }
  14857. },
  14858. "required": ["version"],
  14859. "additionalProperties": false
  14860. }
  14861. },
  14862. "required": ["id", "type", "properties"],
  14863. "additionalProperties": false
  14864. },
  14865. {
  14866. "type": "object",
  14867. "properties": {
  14868. "id": {
  14869. "type": "string"
  14870. },
  14871. "type": {
  14872. "type": "string",
  14873. "enum": ["installation.update-available"]
  14874. },
  14875. "properties": {
  14876. "type": "object",
  14877. "properties": {
  14878. "version": {
  14879. "type": "string"
  14880. }
  14881. },
  14882. "required": ["version"],
  14883. "additionalProperties": false
  14884. }
  14885. },
  14886. "required": ["id", "type", "properties"],
  14887. "additionalProperties": false
  14888. },
  14889. {
  14890. "type": "object",
  14891. "properties": {
  14892. "id": {
  14893. "type": "string"
  14894. },
  14895. "type": {
  14896. "type": "string",
  14897. "enum": ["server.connected"]
  14898. },
  14899. "properties": {
  14900. "type": "object",
  14901. "properties": {}
  14902. }
  14903. },
  14904. "required": ["id", "type", "properties"],
  14905. "additionalProperties": false
  14906. },
  14907. {
  14908. "type": "object",
  14909. "properties": {
  14910. "id": {
  14911. "type": "string"
  14912. },
  14913. "type": {
  14914. "type": "string",
  14915. "enum": ["global.disposed"]
  14916. },
  14917. "properties": {
  14918. "type": "object",
  14919. "properties": {}
  14920. }
  14921. },
  14922. "required": ["id", "type", "properties"],
  14923. "additionalProperties": false
  14924. },
  14925. {
  14926. "type": "object",
  14927. "properties": {
  14928. "id": {
  14929. "type": "string"
  14930. },
  14931. "type": {
  14932. "type": "string",
  14933. "enum": ["account.added"]
  14934. },
  14935. "properties": {
  14936. "type": "object",
  14937. "properties": {
  14938. "account": {
  14939. "$ref": "#/components/schemas/AuthInfo"
  14940. }
  14941. },
  14942. "required": ["account"],
  14943. "additionalProperties": false
  14944. }
  14945. },
  14946. "required": ["id", "type", "properties"],
  14947. "additionalProperties": false
  14948. },
  14949. {
  14950. "type": "object",
  14951. "properties": {
  14952. "id": {
  14953. "type": "string"
  14954. },
  14955. "type": {
  14956. "type": "string",
  14957. "enum": ["account.removed"]
  14958. },
  14959. "properties": {
  14960. "type": "object",
  14961. "properties": {
  14962. "account": {
  14963. "$ref": "#/components/schemas/AuthInfo"
  14964. }
  14965. },
  14966. "required": ["account"],
  14967. "additionalProperties": false
  14968. }
  14969. },
  14970. "required": ["id", "type", "properties"],
  14971. "additionalProperties": false
  14972. },
  14973. {
  14974. "type": "object",
  14975. "properties": {
  14976. "id": {
  14977. "type": "string"
  14978. },
  14979. "type": {
  14980. "type": "string",
  14981. "enum": ["account.switched"]
  14982. },
  14983. "properties": {
  14984. "type": "object",
  14985. "properties": {
  14986. "serviceID": {
  14987. "type": "string"
  14988. },
  14989. "from": {
  14990. "type": "string"
  14991. },
  14992. "to": {
  14993. "type": "string"
  14994. }
  14995. },
  14996. "required": ["serviceID"],
  14997. "additionalProperties": false
  14998. }
  14999. },
  15000. "required": ["id", "type", "properties"],
  15001. "additionalProperties": false
  15002. },
  15003. {
  15004. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15005. },
  15006. {
  15007. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  15008. },
  15009. {
  15010. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  15011. },
  15012. {
  15013. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  15014. },
  15015. {
  15016. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  15017. },
  15018. {
  15019. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  15020. },
  15021. {
  15022. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  15023. },
  15024. {
  15025. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  15026. },
  15027. {
  15028. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  15029. },
  15030. {
  15031. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  15032. },
  15033. {
  15034. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  15035. },
  15036. {
  15037. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  15038. },
  15039. {
  15040. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  15041. },
  15042. {
  15043. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  15044. },
  15045. {
  15046. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  15047. },
  15048. {
  15049. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  15050. },
  15051. {
  15052. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  15053. },
  15054. {
  15055. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  15056. },
  15057. {
  15058. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  15059. },
  15060. {
  15061. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  15062. },
  15063. {
  15064. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  15065. },
  15066. {
  15067. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  15068. },
  15069. {
  15070. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  15071. },
  15072. {
  15073. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  15074. },
  15075. {
  15076. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  15077. },
  15078. {
  15079. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  15080. },
  15081. {
  15082. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  15083. },
  15084. {
  15085. "$ref": "#/components/schemas/SyncEventSessionCreated"
  15086. },
  15087. {
  15088. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  15089. },
  15090. {
  15091. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  15092. },
  15093. {
  15094. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  15095. },
  15096. {
  15097. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  15098. },
  15099. {
  15100. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  15101. },
  15102. {
  15103. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  15104. }
  15105. ]
  15106. }
  15107. },
  15108. "required": ["directory", "payload"],
  15109. "additionalProperties": false
  15110. },
  15111. "LogLevel": {
  15112. "type": "string",
  15113. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  15114. "description": "Log level"
  15115. },
  15116. "ServerConfig": {
  15117. "type": "object",
  15118. "properties": {
  15119. "port": {
  15120. "type": "integer",
  15121. "exclusiveMinimum": 0
  15122. },
  15123. "hostname": {
  15124. "type": "string"
  15125. },
  15126. "mdns": {
  15127. "type": "boolean"
  15128. },
  15129. "mdnsDomain": {
  15130. "type": "string"
  15131. },
  15132. "cors": {
  15133. "type": "array",
  15134. "items": {
  15135. "type": "string"
  15136. }
  15137. }
  15138. },
  15139. "additionalProperties": false,
  15140. "description": "Server configuration for opencode serve and web commands"
  15141. },
  15142. "ReferenceConfigEntry": {
  15143. "anyOf": [
  15144. {
  15145. "type": "string"
  15146. },
  15147. {
  15148. "type": "object",
  15149. "properties": {
  15150. "repository": {
  15151. "type": "string",
  15152. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  15153. },
  15154. "branch": {
  15155. "type": "string"
  15156. }
  15157. },
  15158. "required": ["repository"],
  15159. "additionalProperties": false
  15160. },
  15161. {
  15162. "type": "object",
  15163. "properties": {
  15164. "path": {
  15165. "type": "string",
  15166. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  15167. }
  15168. },
  15169. "required": ["path"],
  15170. "additionalProperties": false
  15171. }
  15172. ]
  15173. },
  15174. "ReferenceConfig": {
  15175. "type": "object",
  15176. "additionalProperties": {
  15177. "$ref": "#/components/schemas/ReferenceConfigEntry"
  15178. }
  15179. },
  15180. "PermissionActionConfig": {
  15181. "type": "string",
  15182. "enum": ["ask", "allow", "deny"]
  15183. },
  15184. "PermissionObjectConfig": {
  15185. "type": "object",
  15186. "additionalProperties": {
  15187. "$ref": "#/components/schemas/PermissionActionConfig"
  15188. }
  15189. },
  15190. "PermissionRuleConfig": {
  15191. "anyOf": [
  15192. {
  15193. "$ref": "#/components/schemas/PermissionActionConfig"
  15194. },
  15195. {
  15196. "$ref": "#/components/schemas/PermissionObjectConfig"
  15197. }
  15198. ]
  15199. },
  15200. "PermissionConfig": {
  15201. "anyOf": [
  15202. {
  15203. "$ref": "#/components/schemas/PermissionActionConfig"
  15204. },
  15205. {
  15206. "type": "object",
  15207. "properties": {
  15208. "read": {
  15209. "$ref": "#/components/schemas/PermissionRuleConfig"
  15210. },
  15211. "edit": {
  15212. "$ref": "#/components/schemas/PermissionRuleConfig"
  15213. },
  15214. "glob": {
  15215. "$ref": "#/components/schemas/PermissionRuleConfig"
  15216. },
  15217. "grep": {
  15218. "$ref": "#/components/schemas/PermissionRuleConfig"
  15219. },
  15220. "list": {
  15221. "$ref": "#/components/schemas/PermissionRuleConfig"
  15222. },
  15223. "bash": {
  15224. "$ref": "#/components/schemas/PermissionRuleConfig"
  15225. },
  15226. "task": {
  15227. "$ref": "#/components/schemas/PermissionRuleConfig"
  15228. },
  15229. "external_directory": {
  15230. "$ref": "#/components/schemas/PermissionRuleConfig"
  15231. },
  15232. "todowrite": {
  15233. "$ref": "#/components/schemas/PermissionActionConfig"
  15234. },
  15235. "question": {
  15236. "$ref": "#/components/schemas/PermissionActionConfig"
  15237. },
  15238. "webfetch": {
  15239. "$ref": "#/components/schemas/PermissionActionConfig"
  15240. },
  15241. "websearch": {
  15242. "$ref": "#/components/schemas/PermissionActionConfig"
  15243. },
  15244. "repo_clone": {
  15245. "$ref": "#/components/schemas/PermissionRuleConfig"
  15246. },
  15247. "repo_overview": {
  15248. "$ref": "#/components/schemas/PermissionRuleConfig"
  15249. },
  15250. "lsp": {
  15251. "$ref": "#/components/schemas/PermissionRuleConfig"
  15252. },
  15253. "doom_loop": {
  15254. "$ref": "#/components/schemas/PermissionActionConfig"
  15255. },
  15256. "skill": {
  15257. "$ref": "#/components/schemas/PermissionRuleConfig"
  15258. }
  15259. },
  15260. "additionalProperties": {
  15261. "$ref": "#/components/schemas/PermissionRuleConfig"
  15262. }
  15263. }
  15264. ]
  15265. },
  15266. "AgentConfig": {
  15267. "type": "object",
  15268. "properties": {
  15269. "model": {
  15270. "type": "string"
  15271. },
  15272. "variant": {
  15273. "type": "string"
  15274. },
  15275. "temperature": {
  15276. "type": "number"
  15277. },
  15278. "top_p": {
  15279. "type": "number"
  15280. },
  15281. "prompt": {
  15282. "type": "string"
  15283. },
  15284. "tools": {
  15285. "type": "object",
  15286. "additionalProperties": {
  15287. "type": "boolean"
  15288. }
  15289. },
  15290. "disable": {
  15291. "type": "boolean"
  15292. },
  15293. "description": {
  15294. "type": "string"
  15295. },
  15296. "mode": {
  15297. "type": "string",
  15298. "enum": ["subagent", "primary", "all"]
  15299. },
  15300. "hidden": {
  15301. "type": "boolean"
  15302. },
  15303. "options": {
  15304. "type": "object"
  15305. },
  15306. "color": {
  15307. "anyOf": [
  15308. {
  15309. "type": "string",
  15310. "pattern": "^#[0-9a-fA-F]{6}$"
  15311. },
  15312. {
  15313. "type": "string",
  15314. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  15315. }
  15316. ],
  15317. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  15318. },
  15319. "steps": {
  15320. "type": "integer",
  15321. "exclusiveMinimum": 0
  15322. },
  15323. "maxSteps": {
  15324. "type": "integer",
  15325. "exclusiveMinimum": 0
  15326. },
  15327. "permission": {
  15328. "$ref": "#/components/schemas/PermissionConfig"
  15329. }
  15330. },
  15331. "additionalProperties": {}
  15332. },
  15333. "ProviderConfig": {
  15334. "type": "object",
  15335. "properties": {
  15336. "api": {
  15337. "type": "string"
  15338. },
  15339. "name": {
  15340. "type": "string"
  15341. },
  15342. "env": {
  15343. "type": "array",
  15344. "items": {
  15345. "type": "string"
  15346. }
  15347. },
  15348. "id": {
  15349. "type": "string"
  15350. },
  15351. "npm": {
  15352. "type": "string"
  15353. },
  15354. "whitelist": {
  15355. "type": "array",
  15356. "items": {
  15357. "type": "string"
  15358. }
  15359. },
  15360. "blacklist": {
  15361. "type": "array",
  15362. "items": {
  15363. "type": "string"
  15364. }
  15365. },
  15366. "options": {
  15367. "type": "object",
  15368. "properties": {
  15369. "apiKey": {
  15370. "type": "string"
  15371. },
  15372. "baseURL": {
  15373. "type": "string"
  15374. },
  15375. "enterpriseUrl": {
  15376. "type": "string"
  15377. },
  15378. "setCacheKey": {
  15379. "type": "boolean"
  15380. },
  15381. "timeout": {
  15382. "anyOf": [
  15383. {
  15384. "type": "integer",
  15385. "exclusiveMinimum": 0
  15386. },
  15387. {
  15388. "type": "boolean",
  15389. "enum": [false]
  15390. }
  15391. ],
  15392. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  15393. },
  15394. "headerTimeout": {
  15395. "anyOf": [
  15396. {
  15397. "type": "integer",
  15398. "exclusiveMinimum": 0
  15399. },
  15400. {
  15401. "type": "boolean",
  15402. "enum": [false]
  15403. }
  15404. ],
  15405. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  15406. },
  15407. "chunkTimeout": {
  15408. "type": "integer",
  15409. "exclusiveMinimum": 0
  15410. }
  15411. },
  15412. "additionalProperties": {}
  15413. },
  15414. "models": {
  15415. "type": "object",
  15416. "additionalProperties": {
  15417. "type": "object",
  15418. "properties": {
  15419. "id": {
  15420. "type": "string"
  15421. },
  15422. "name": {
  15423. "type": "string"
  15424. },
  15425. "family": {
  15426. "type": "string"
  15427. },
  15428. "release_date": {
  15429. "type": "string"
  15430. },
  15431. "attachment": {
  15432. "type": "boolean"
  15433. },
  15434. "reasoning": {
  15435. "type": "boolean"
  15436. },
  15437. "temperature": {
  15438. "type": "boolean"
  15439. },
  15440. "tool_call": {
  15441. "type": "boolean"
  15442. },
  15443. "interleaved": {
  15444. "anyOf": [
  15445. {
  15446. "type": "boolean",
  15447. "enum": [true]
  15448. },
  15449. {
  15450. "type": "object",
  15451. "properties": {
  15452. "field": {
  15453. "type": "string",
  15454. "enum": ["reasoning_content", "reasoning_details"]
  15455. }
  15456. },
  15457. "required": ["field"],
  15458. "additionalProperties": false
  15459. }
  15460. ]
  15461. },
  15462. "cost": {
  15463. "type": "object",
  15464. "properties": {
  15465. "input": {
  15466. "type": "number"
  15467. },
  15468. "output": {
  15469. "type": "number"
  15470. },
  15471. "cache_read": {
  15472. "type": "number"
  15473. },
  15474. "cache_write": {
  15475. "type": "number"
  15476. },
  15477. "context_over_200k": {
  15478. "type": "object",
  15479. "properties": {
  15480. "input": {
  15481. "type": "number"
  15482. },
  15483. "output": {
  15484. "type": "number"
  15485. },
  15486. "cache_read": {
  15487. "type": "number"
  15488. },
  15489. "cache_write": {
  15490. "type": "number"
  15491. }
  15492. },
  15493. "required": ["input", "output"],
  15494. "additionalProperties": false
  15495. }
  15496. },
  15497. "required": ["input", "output"],
  15498. "additionalProperties": false
  15499. },
  15500. "limit": {
  15501. "type": "object",
  15502. "properties": {
  15503. "context": {
  15504. "type": "number"
  15505. },
  15506. "input": {
  15507. "type": "number"
  15508. },
  15509. "output": {
  15510. "type": "number"
  15511. }
  15512. },
  15513. "required": ["context", "output"],
  15514. "additionalProperties": false
  15515. },
  15516. "modalities": {
  15517. "type": "object",
  15518. "properties": {
  15519. "input": {
  15520. "type": "array",
  15521. "items": {
  15522. "type": "string",
  15523. "enum": ["text", "audio", "image", "video", "pdf"]
  15524. }
  15525. },
  15526. "output": {
  15527. "type": "array",
  15528. "items": {
  15529. "type": "string",
  15530. "enum": ["text", "audio", "image", "video", "pdf"]
  15531. }
  15532. }
  15533. },
  15534. "additionalProperties": false
  15535. },
  15536. "experimental": {
  15537. "type": "boolean"
  15538. },
  15539. "status": {
  15540. "type": "string",
  15541. "enum": ["alpha", "beta", "deprecated", "active"]
  15542. },
  15543. "provider": {
  15544. "type": "object",
  15545. "properties": {
  15546. "npm": {
  15547. "type": "string"
  15548. },
  15549. "api": {
  15550. "type": "string"
  15551. }
  15552. },
  15553. "additionalProperties": false
  15554. },
  15555. "options": {
  15556. "type": "object"
  15557. },
  15558. "headers": {
  15559. "type": "object",
  15560. "additionalProperties": {
  15561. "type": "string"
  15562. }
  15563. },
  15564. "variants": {
  15565. "type": "object",
  15566. "additionalProperties": {
  15567. "type": "object",
  15568. "properties": {
  15569. "disabled": {
  15570. "type": "boolean"
  15571. }
  15572. },
  15573. "additionalProperties": {}
  15574. },
  15575. "description": "Variant-specific configuration"
  15576. }
  15577. },
  15578. "additionalProperties": false
  15579. }
  15580. }
  15581. },
  15582. "additionalProperties": false
  15583. },
  15584. "McpLocalConfig": {
  15585. "type": "object",
  15586. "properties": {
  15587. "type": {
  15588. "type": "string",
  15589. "enum": ["local"],
  15590. "description": "Type of MCP server connection"
  15591. },
  15592. "command": {
  15593. "type": "array",
  15594. "items": {
  15595. "type": "string"
  15596. },
  15597. "description": "Command and arguments to run the MCP server"
  15598. },
  15599. "environment": {
  15600. "type": "object",
  15601. "additionalProperties": {
  15602. "type": "string"
  15603. }
  15604. },
  15605. "enabled": {
  15606. "type": "boolean"
  15607. },
  15608. "timeout": {
  15609. "type": "integer",
  15610. "exclusiveMinimum": 0
  15611. }
  15612. },
  15613. "required": ["type", "command"],
  15614. "additionalProperties": false
  15615. },
  15616. "McpOAuthConfig": {
  15617. "type": "object",
  15618. "properties": {
  15619. "clientId": {
  15620. "type": "string"
  15621. },
  15622. "clientSecret": {
  15623. "type": "string"
  15624. },
  15625. "scope": {
  15626. "type": "string"
  15627. },
  15628. "callbackPort": {
  15629. "type": "integer",
  15630. "minimum": 1,
  15631. "maximum": 65535
  15632. },
  15633. "redirectUri": {
  15634. "type": "string"
  15635. }
  15636. },
  15637. "additionalProperties": false
  15638. },
  15639. "McpRemoteConfig": {
  15640. "type": "object",
  15641. "properties": {
  15642. "type": {
  15643. "type": "string",
  15644. "enum": ["remote"],
  15645. "description": "Type of MCP server connection"
  15646. },
  15647. "url": {
  15648. "type": "string",
  15649. "description": "URL of the remote MCP server"
  15650. },
  15651. "enabled": {
  15652. "type": "boolean"
  15653. },
  15654. "headers": {
  15655. "type": "object",
  15656. "additionalProperties": {
  15657. "type": "string"
  15658. }
  15659. },
  15660. "oauth": {
  15661. "anyOf": [
  15662. {
  15663. "$ref": "#/components/schemas/McpOAuthConfig"
  15664. },
  15665. {
  15666. "type": "boolean",
  15667. "enum": [false]
  15668. }
  15669. ],
  15670. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  15671. },
  15672. "timeout": {
  15673. "type": "integer",
  15674. "exclusiveMinimum": 0
  15675. }
  15676. },
  15677. "required": ["type", "url"],
  15678. "additionalProperties": false
  15679. },
  15680. "LayoutConfig": {
  15681. "type": "string",
  15682. "enum": ["auto", "stretch"],
  15683. "description": "@deprecated Always uses stretch layout."
  15684. },
  15685. "ImageAttachmentConfig": {
  15686. "type": "object",
  15687. "properties": {
  15688. "auto_resize": {
  15689. "type": "boolean"
  15690. },
  15691. "max_width": {
  15692. "type": "integer",
  15693. "exclusiveMinimum": 0
  15694. },
  15695. "max_height": {
  15696. "type": "integer",
  15697. "exclusiveMinimum": 0
  15698. },
  15699. "max_base64_bytes": {
  15700. "type": "integer",
  15701. "exclusiveMinimum": 0
  15702. }
  15703. },
  15704. "additionalProperties": false
  15705. },
  15706. "AttachmentConfig": {
  15707. "type": "object",
  15708. "properties": {
  15709. "image": {
  15710. "$ref": "#/components/schemas/ImageAttachmentConfig"
  15711. }
  15712. },
  15713. "additionalProperties": false
  15714. },
  15715. "Config": {
  15716. "type": "object",
  15717. "properties": {
  15718. "$schema": {
  15719. "type": "string"
  15720. },
  15721. "shell": {
  15722. "type": "string"
  15723. },
  15724. "logLevel": {
  15725. "$ref": "#/components/schemas/LogLevel"
  15726. },
  15727. "server": {
  15728. "$ref": "#/components/schemas/ServerConfig"
  15729. },
  15730. "command": {
  15731. "type": "object",
  15732. "additionalProperties": {
  15733. "type": "object",
  15734. "properties": {
  15735. "template": {
  15736. "type": "string"
  15737. },
  15738. "description": {
  15739. "type": "string"
  15740. },
  15741. "agent": {
  15742. "type": "string"
  15743. },
  15744. "model": {
  15745. "type": "string"
  15746. },
  15747. "subtask": {
  15748. "type": "boolean"
  15749. }
  15750. },
  15751. "required": ["template"],
  15752. "additionalProperties": false
  15753. }
  15754. },
  15755. "skills": {
  15756. "type": "object",
  15757. "properties": {
  15758. "paths": {
  15759. "type": "array",
  15760. "items": {
  15761. "type": "string"
  15762. }
  15763. },
  15764. "urls": {
  15765. "type": "array",
  15766. "items": {
  15767. "type": "string"
  15768. }
  15769. }
  15770. },
  15771. "additionalProperties": false
  15772. },
  15773. "reference": {
  15774. "$ref": "#/components/schemas/ReferenceConfig"
  15775. },
  15776. "watcher": {
  15777. "type": "object",
  15778. "properties": {
  15779. "ignore": {
  15780. "type": "array",
  15781. "items": {
  15782. "type": "string"
  15783. }
  15784. }
  15785. },
  15786. "additionalProperties": false
  15787. },
  15788. "snapshot": {
  15789. "type": "boolean"
  15790. },
  15791. "plugin": {
  15792. "type": "array",
  15793. "items": {
  15794. "anyOf": [
  15795. {
  15796. "type": "string"
  15797. },
  15798. {
  15799. "type": "array",
  15800. "prefixItems": [
  15801. {
  15802. "type": "string"
  15803. },
  15804. {
  15805. "type": "object"
  15806. }
  15807. ],
  15808. "maxItems": 2,
  15809. "minItems": 2
  15810. }
  15811. ]
  15812. }
  15813. },
  15814. "share": {
  15815. "type": "string",
  15816. "enum": ["manual", "auto", "disabled"]
  15817. },
  15818. "autoshare": {
  15819. "type": "boolean"
  15820. },
  15821. "autoupdate": {
  15822. "anyOf": [
  15823. {
  15824. "type": "boolean"
  15825. },
  15826. {
  15827. "type": "string",
  15828. "enum": ["notify"]
  15829. }
  15830. ],
  15831. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  15832. },
  15833. "disabled_providers": {
  15834. "type": "array",
  15835. "items": {
  15836. "type": "string"
  15837. }
  15838. },
  15839. "enabled_providers": {
  15840. "type": "array",
  15841. "items": {
  15842. "type": "string"
  15843. }
  15844. },
  15845. "model": {
  15846. "type": "string"
  15847. },
  15848. "small_model": {
  15849. "type": "string"
  15850. },
  15851. "default_agent": {
  15852. "type": "string"
  15853. },
  15854. "username": {
  15855. "type": "string"
  15856. },
  15857. "mode": {
  15858. "type": "object",
  15859. "properties": {
  15860. "build": {
  15861. "$ref": "#/components/schemas/AgentConfig"
  15862. },
  15863. "plan": {
  15864. "$ref": "#/components/schemas/AgentConfig"
  15865. }
  15866. },
  15867. "additionalProperties": {
  15868. "$ref": "#/components/schemas/AgentConfig"
  15869. }
  15870. },
  15871. "agent": {
  15872. "type": "object",
  15873. "properties": {
  15874. "plan": {
  15875. "$ref": "#/components/schemas/AgentConfig"
  15876. },
  15877. "build": {
  15878. "$ref": "#/components/schemas/AgentConfig"
  15879. },
  15880. "general": {
  15881. "$ref": "#/components/schemas/AgentConfig"
  15882. },
  15883. "explore": {
  15884. "$ref": "#/components/schemas/AgentConfig"
  15885. },
  15886. "scout": {
  15887. "$ref": "#/components/schemas/AgentConfig"
  15888. },
  15889. "title": {
  15890. "$ref": "#/components/schemas/AgentConfig"
  15891. },
  15892. "summary": {
  15893. "$ref": "#/components/schemas/AgentConfig"
  15894. },
  15895. "compaction": {
  15896. "$ref": "#/components/schemas/AgentConfig"
  15897. }
  15898. },
  15899. "additionalProperties": {
  15900. "$ref": "#/components/schemas/AgentConfig"
  15901. }
  15902. },
  15903. "provider": {
  15904. "type": "object",
  15905. "additionalProperties": {
  15906. "$ref": "#/components/schemas/ProviderConfig"
  15907. }
  15908. },
  15909. "mcp": {
  15910. "type": "object",
  15911. "additionalProperties": {
  15912. "anyOf": [
  15913. {
  15914. "$ref": "#/components/schemas/McpLocalConfig"
  15915. },
  15916. {
  15917. "$ref": "#/components/schemas/McpRemoteConfig"
  15918. },
  15919. {
  15920. "type": "object",
  15921. "properties": {
  15922. "enabled": {
  15923. "type": "boolean"
  15924. }
  15925. },
  15926. "required": ["enabled"],
  15927. "additionalProperties": false
  15928. }
  15929. ]
  15930. }
  15931. },
  15932. "formatter": {
  15933. "anyOf": [
  15934. {
  15935. "type": "boolean"
  15936. },
  15937. {
  15938. "type": "object",
  15939. "additionalProperties": {
  15940. "type": "object",
  15941. "properties": {
  15942. "disabled": {
  15943. "type": "boolean"
  15944. },
  15945. "command": {
  15946. "type": "array",
  15947. "items": {
  15948. "type": "string"
  15949. }
  15950. },
  15951. "environment": {
  15952. "type": "object",
  15953. "additionalProperties": {
  15954. "type": "string"
  15955. }
  15956. },
  15957. "extensions": {
  15958. "type": "array",
  15959. "items": {
  15960. "type": "string"
  15961. }
  15962. }
  15963. },
  15964. "additionalProperties": false
  15965. }
  15966. }
  15967. ],
  15968. "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."
  15969. },
  15970. "lsp": {
  15971. "anyOf": [
  15972. {
  15973. "type": "boolean"
  15974. },
  15975. {
  15976. "type": "object",
  15977. "additionalProperties": {
  15978. "anyOf": [
  15979. {
  15980. "type": "object",
  15981. "properties": {
  15982. "disabled": {
  15983. "type": "boolean",
  15984. "enum": [true]
  15985. }
  15986. },
  15987. "required": ["disabled"],
  15988. "additionalProperties": false
  15989. },
  15990. {
  15991. "type": "object",
  15992. "properties": {
  15993. "command": {
  15994. "type": "array",
  15995. "items": {
  15996. "type": "string"
  15997. }
  15998. },
  15999. "extensions": {
  16000. "type": "array",
  16001. "items": {
  16002. "type": "string"
  16003. }
  16004. },
  16005. "disabled": {
  16006. "type": "boolean"
  16007. },
  16008. "env": {
  16009. "type": "object",
  16010. "additionalProperties": {
  16011. "type": "string"
  16012. }
  16013. },
  16014. "initialization": {
  16015. "type": "object"
  16016. }
  16017. },
  16018. "required": ["command"],
  16019. "additionalProperties": false
  16020. }
  16021. ]
  16022. }
  16023. }
  16024. ],
  16025. "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."
  16026. },
  16027. "instructions": {
  16028. "type": "array",
  16029. "items": {
  16030. "type": "string"
  16031. }
  16032. },
  16033. "layout": {
  16034. "$ref": "#/components/schemas/LayoutConfig"
  16035. },
  16036. "permission": {
  16037. "$ref": "#/components/schemas/PermissionConfig"
  16038. },
  16039. "tools": {
  16040. "type": "object",
  16041. "additionalProperties": {
  16042. "type": "boolean"
  16043. }
  16044. },
  16045. "attachment": {
  16046. "$ref": "#/components/schemas/AttachmentConfig"
  16047. },
  16048. "enterprise": {
  16049. "type": "object",
  16050. "properties": {
  16051. "url": {
  16052. "type": "string"
  16053. }
  16054. },
  16055. "additionalProperties": false
  16056. },
  16057. "tool_output": {
  16058. "type": "object",
  16059. "properties": {
  16060. "max_lines": {
  16061. "type": "integer",
  16062. "exclusiveMinimum": 0
  16063. },
  16064. "max_bytes": {
  16065. "type": "integer",
  16066. "exclusiveMinimum": 0
  16067. }
  16068. },
  16069. "additionalProperties": false
  16070. },
  16071. "compaction": {
  16072. "type": "object",
  16073. "properties": {
  16074. "auto": {
  16075. "type": "boolean"
  16076. },
  16077. "prune": {
  16078. "type": "boolean"
  16079. },
  16080. "tail_turns": {
  16081. "type": "integer",
  16082. "minimum": 0
  16083. },
  16084. "preserve_recent_tokens": {
  16085. "type": "integer",
  16086. "minimum": 0
  16087. },
  16088. "reserved": {
  16089. "type": "integer",
  16090. "minimum": 0
  16091. }
  16092. },
  16093. "additionalProperties": false
  16094. },
  16095. "experimental": {
  16096. "type": "object",
  16097. "properties": {
  16098. "disable_paste_summary": {
  16099. "type": "boolean"
  16100. },
  16101. "batch_tool": {
  16102. "type": "boolean"
  16103. },
  16104. "openTelemetry": {
  16105. "type": "boolean"
  16106. },
  16107. "primary_tools": {
  16108. "type": "array",
  16109. "items": {
  16110. "type": "string"
  16111. }
  16112. },
  16113. "continue_loop_on_deny": {
  16114. "type": "boolean"
  16115. },
  16116. "mcp_timeout": {
  16117. "type": "integer",
  16118. "exclusiveMinimum": 0
  16119. },
  16120. "policies": {
  16121. "type": "array",
  16122. "items": {
  16123. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  16124. }
  16125. }
  16126. },
  16127. "additionalProperties": false
  16128. }
  16129. },
  16130. "additionalProperties": false
  16131. },
  16132. "Model": {
  16133. "type": "object",
  16134. "properties": {
  16135. "id": {
  16136. "type": "string"
  16137. },
  16138. "providerID": {
  16139. "type": "string"
  16140. },
  16141. "api": {
  16142. "type": "object",
  16143. "properties": {
  16144. "id": {
  16145. "type": "string"
  16146. },
  16147. "url": {
  16148. "type": "string"
  16149. },
  16150. "npm": {
  16151. "type": "string"
  16152. }
  16153. },
  16154. "required": ["id", "url", "npm"],
  16155. "additionalProperties": false
  16156. },
  16157. "name": {
  16158. "type": "string"
  16159. },
  16160. "family": {
  16161. "type": "string"
  16162. },
  16163. "capabilities": {
  16164. "type": "object",
  16165. "properties": {
  16166. "temperature": {
  16167. "type": "boolean"
  16168. },
  16169. "reasoning": {
  16170. "type": "boolean"
  16171. },
  16172. "attachment": {
  16173. "type": "boolean"
  16174. },
  16175. "toolcall": {
  16176. "type": "boolean"
  16177. },
  16178. "input": {
  16179. "type": "object",
  16180. "properties": {
  16181. "text": {
  16182. "type": "boolean"
  16183. },
  16184. "audio": {
  16185. "type": "boolean"
  16186. },
  16187. "image": {
  16188. "type": "boolean"
  16189. },
  16190. "video": {
  16191. "type": "boolean"
  16192. },
  16193. "pdf": {
  16194. "type": "boolean"
  16195. }
  16196. },
  16197. "required": ["text", "audio", "image", "video", "pdf"],
  16198. "additionalProperties": false
  16199. },
  16200. "output": {
  16201. "type": "object",
  16202. "properties": {
  16203. "text": {
  16204. "type": "boolean"
  16205. },
  16206. "audio": {
  16207. "type": "boolean"
  16208. },
  16209. "image": {
  16210. "type": "boolean"
  16211. },
  16212. "video": {
  16213. "type": "boolean"
  16214. },
  16215. "pdf": {
  16216. "type": "boolean"
  16217. }
  16218. },
  16219. "required": ["text", "audio", "image", "video", "pdf"],
  16220. "additionalProperties": false
  16221. },
  16222. "interleaved": {
  16223. "anyOf": [
  16224. {
  16225. "type": "boolean"
  16226. },
  16227. {
  16228. "type": "object",
  16229. "properties": {
  16230. "field": {
  16231. "type": "string",
  16232. "enum": ["reasoning_content", "reasoning_details"]
  16233. }
  16234. },
  16235. "required": ["field"],
  16236. "additionalProperties": false
  16237. }
  16238. ]
  16239. }
  16240. },
  16241. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  16242. "additionalProperties": false
  16243. },
  16244. "cost": {
  16245. "type": "object",
  16246. "properties": {
  16247. "input": {
  16248. "type": "number"
  16249. },
  16250. "output": {
  16251. "type": "number"
  16252. },
  16253. "cache": {
  16254. "type": "object",
  16255. "properties": {
  16256. "read": {
  16257. "type": "number"
  16258. },
  16259. "write": {
  16260. "type": "number"
  16261. }
  16262. },
  16263. "required": ["read", "write"],
  16264. "additionalProperties": false
  16265. },
  16266. "tiers": {
  16267. "type": "array",
  16268. "items": {
  16269. "type": "object",
  16270. "properties": {
  16271. "input": {
  16272. "type": "number"
  16273. },
  16274. "output": {
  16275. "type": "number"
  16276. },
  16277. "cache": {
  16278. "type": "object",
  16279. "properties": {
  16280. "read": {
  16281. "type": "number"
  16282. },
  16283. "write": {
  16284. "type": "number"
  16285. }
  16286. },
  16287. "required": ["read", "write"],
  16288. "additionalProperties": false
  16289. },
  16290. "tier": {
  16291. "type": "object",
  16292. "properties": {
  16293. "type": {
  16294. "type": "string",
  16295. "enum": ["context"]
  16296. },
  16297. "size": {
  16298. "type": "number"
  16299. }
  16300. },
  16301. "required": ["type", "size"],
  16302. "additionalProperties": false
  16303. }
  16304. },
  16305. "required": ["input", "output", "cache", "tier"],
  16306. "additionalProperties": false
  16307. }
  16308. },
  16309. "experimentalOver200K": {
  16310. "type": "object",
  16311. "properties": {
  16312. "input": {
  16313. "type": "number"
  16314. },
  16315. "output": {
  16316. "type": "number"
  16317. },
  16318. "cache": {
  16319. "type": "object",
  16320. "properties": {
  16321. "read": {
  16322. "type": "number"
  16323. },
  16324. "write": {
  16325. "type": "number"
  16326. }
  16327. },
  16328. "required": ["read", "write"],
  16329. "additionalProperties": false
  16330. }
  16331. },
  16332. "required": ["input", "output", "cache"],
  16333. "additionalProperties": false
  16334. }
  16335. },
  16336. "required": ["input", "output", "cache"],
  16337. "additionalProperties": false
  16338. },
  16339. "limit": {
  16340. "type": "object",
  16341. "properties": {
  16342. "context": {
  16343. "type": "number"
  16344. },
  16345. "input": {
  16346. "type": "number"
  16347. },
  16348. "output": {
  16349. "type": "number"
  16350. }
  16351. },
  16352. "required": ["context", "output"],
  16353. "additionalProperties": false
  16354. },
  16355. "status": {
  16356. "type": "string",
  16357. "enum": ["alpha", "beta", "deprecated", "active"]
  16358. },
  16359. "options": {
  16360. "type": "object"
  16361. },
  16362. "headers": {
  16363. "type": "object",
  16364. "additionalProperties": {
  16365. "type": "string"
  16366. }
  16367. },
  16368. "release_date": {
  16369. "type": "string"
  16370. },
  16371. "variants": {
  16372. "type": "object",
  16373. "additionalProperties": {
  16374. "type": "object"
  16375. }
  16376. }
  16377. },
  16378. "required": [
  16379. "id",
  16380. "providerID",
  16381. "api",
  16382. "name",
  16383. "capabilities",
  16384. "cost",
  16385. "limit",
  16386. "status",
  16387. "options",
  16388. "headers",
  16389. "release_date"
  16390. ],
  16391. "additionalProperties": false
  16392. },
  16393. "Provider": {
  16394. "type": "object",
  16395. "properties": {
  16396. "id": {
  16397. "type": "string"
  16398. },
  16399. "name": {
  16400. "type": "string"
  16401. },
  16402. "source": {
  16403. "type": "string",
  16404. "enum": ["env", "config", "custom", "api"]
  16405. },
  16406. "env": {
  16407. "type": "array",
  16408. "items": {
  16409. "type": "string"
  16410. }
  16411. },
  16412. "key": {
  16413. "type": "string"
  16414. },
  16415. "options": {
  16416. "type": "object"
  16417. },
  16418. "models": {
  16419. "type": "object",
  16420. "additionalProperties": {
  16421. "$ref": "#/components/schemas/Model"
  16422. }
  16423. }
  16424. },
  16425. "required": ["id", "name", "source", "env", "options", "models"],
  16426. "additionalProperties": false
  16427. },
  16428. "ConsoleState": {
  16429. "type": "object",
  16430. "properties": {
  16431. "consoleManagedProviders": {
  16432. "type": "array",
  16433. "items": {
  16434. "type": "string"
  16435. }
  16436. },
  16437. "activeOrgName": {
  16438. "type": "string"
  16439. },
  16440. "switchableOrgCount": {
  16441. "type": "integer",
  16442. "minimum": 0
  16443. }
  16444. },
  16445. "required": ["consoleManagedProviders", "switchableOrgCount"],
  16446. "additionalProperties": false
  16447. },
  16448. "effect_HttpApiError_InternalServerError": {
  16449. "type": "object",
  16450. "properties": {
  16451. "_tag": {
  16452. "type": "string",
  16453. "enum": ["InternalServerError"]
  16454. }
  16455. },
  16456. "required": ["_tag"],
  16457. "additionalProperties": false
  16458. },
  16459. "ToolListItem": {
  16460. "type": "object",
  16461. "properties": {
  16462. "id": {
  16463. "type": "string"
  16464. },
  16465. "description": {
  16466. "type": "string"
  16467. },
  16468. "parameters": {}
  16469. },
  16470. "required": ["id", "description", "parameters"],
  16471. "additionalProperties": false
  16472. },
  16473. "ToolList": {
  16474. "type": "array",
  16475. "items": {
  16476. "$ref": "#/components/schemas/ToolListItem"
  16477. }
  16478. },
  16479. "ToolIDs": {
  16480. "type": "array",
  16481. "items": {
  16482. "type": "string"
  16483. }
  16484. },
  16485. "WorktreeError": {
  16486. "type": "object",
  16487. "properties": {
  16488. "name": {
  16489. "type": "string",
  16490. "enum": [
  16491. "WorktreeNotGitError",
  16492. "WorktreeNameGenerationFailedError",
  16493. "WorktreeCreateFailedError",
  16494. "WorktreeStartCommandFailedError",
  16495. "WorktreeRemoveFailedError",
  16496. "WorktreeResetFailedError",
  16497. "WorktreeListFailedError"
  16498. ]
  16499. },
  16500. "data": {
  16501. "type": "object",
  16502. "properties": {
  16503. "message": {
  16504. "type": "string"
  16505. }
  16506. },
  16507. "required": ["message"],
  16508. "additionalProperties": false
  16509. }
  16510. },
  16511. "required": ["name", "data"],
  16512. "additionalProperties": false
  16513. },
  16514. "WorktreeCreateInput": {
  16515. "type": "object",
  16516. "properties": {
  16517. "name": {
  16518. "type": "string"
  16519. },
  16520. "startCommand": {
  16521. "type": "string",
  16522. "description": "Additional startup script to run after the project's start command"
  16523. }
  16524. },
  16525. "additionalProperties": false
  16526. },
  16527. "Worktree": {
  16528. "type": "object",
  16529. "properties": {
  16530. "name": {
  16531. "type": "string"
  16532. },
  16533. "branch": {
  16534. "type": "string"
  16535. },
  16536. "directory": {
  16537. "type": "string"
  16538. }
  16539. },
  16540. "required": ["name", "directory"],
  16541. "additionalProperties": false
  16542. },
  16543. "WorktreeRemoveInput": {
  16544. "type": "object",
  16545. "properties": {
  16546. "directory": {
  16547. "type": "string"
  16548. }
  16549. },
  16550. "required": ["directory"],
  16551. "additionalProperties": false
  16552. },
  16553. "WorktreeResetInput": {
  16554. "type": "object",
  16555. "properties": {
  16556. "directory": {
  16557. "type": "string"
  16558. }
  16559. },
  16560. "required": ["directory"],
  16561. "additionalProperties": false
  16562. },
  16563. "PermissionAction": {
  16564. "type": "string",
  16565. "enum": ["allow", "deny", "ask"]
  16566. },
  16567. "PermissionRule": {
  16568. "type": "object",
  16569. "properties": {
  16570. "permission": {
  16571. "type": "string"
  16572. },
  16573. "pattern": {
  16574. "type": "string"
  16575. },
  16576. "action": {
  16577. "$ref": "#/components/schemas/PermissionAction"
  16578. }
  16579. },
  16580. "required": ["permission", "pattern", "action"],
  16581. "additionalProperties": false
  16582. },
  16583. "PermissionRuleset": {
  16584. "type": "array",
  16585. "items": {
  16586. "$ref": "#/components/schemas/PermissionRule"
  16587. }
  16588. },
  16589. "ProjectSummary": {
  16590. "type": "object",
  16591. "properties": {
  16592. "id": {
  16593. "type": "string"
  16594. },
  16595. "name": {
  16596. "type": "string"
  16597. },
  16598. "worktree": {
  16599. "type": "string"
  16600. }
  16601. },
  16602. "required": ["id", "worktree"],
  16603. "additionalProperties": false
  16604. },
  16605. "GlobalSession": {
  16606. "type": "object",
  16607. "properties": {
  16608. "id": {
  16609. "type": "string",
  16610. "pattern": "^ses"
  16611. },
  16612. "slug": {
  16613. "type": "string"
  16614. },
  16615. "projectID": {
  16616. "type": "string"
  16617. },
  16618. "workspaceID": {
  16619. "type": "string",
  16620. "pattern": "^wrk"
  16621. },
  16622. "directory": {
  16623. "type": "string"
  16624. },
  16625. "path": {
  16626. "type": "string"
  16627. },
  16628. "parentID": {
  16629. "type": "string",
  16630. "pattern": "^ses"
  16631. },
  16632. "summary": {
  16633. "type": "object",
  16634. "properties": {
  16635. "additions": {
  16636. "type": "number"
  16637. },
  16638. "deletions": {
  16639. "type": "number"
  16640. },
  16641. "files": {
  16642. "type": "number"
  16643. },
  16644. "diffs": {
  16645. "type": "array",
  16646. "items": {
  16647. "$ref": "#/components/schemas/SnapshotFileDiff"
  16648. }
  16649. }
  16650. },
  16651. "required": ["additions", "deletions", "files"],
  16652. "additionalProperties": false
  16653. },
  16654. "cost": {
  16655. "type": "number"
  16656. },
  16657. "tokens": {
  16658. "type": "object",
  16659. "properties": {
  16660. "input": {
  16661. "type": "number"
  16662. },
  16663. "output": {
  16664. "type": "number"
  16665. },
  16666. "reasoning": {
  16667. "type": "number"
  16668. },
  16669. "cache": {
  16670. "type": "object",
  16671. "properties": {
  16672. "read": {
  16673. "type": "number"
  16674. },
  16675. "write": {
  16676. "type": "number"
  16677. }
  16678. },
  16679. "required": ["read", "write"],
  16680. "additionalProperties": false
  16681. }
  16682. },
  16683. "required": ["input", "output", "reasoning", "cache"],
  16684. "additionalProperties": false
  16685. },
  16686. "share": {
  16687. "type": "object",
  16688. "properties": {
  16689. "url": {
  16690. "type": "string"
  16691. }
  16692. },
  16693. "required": ["url"],
  16694. "additionalProperties": false
  16695. },
  16696. "title": {
  16697. "type": "string"
  16698. },
  16699. "agent": {
  16700. "type": "string"
  16701. },
  16702. "model": {
  16703. "type": "object",
  16704. "properties": {
  16705. "id": {
  16706. "type": "string"
  16707. },
  16708. "providerID": {
  16709. "type": "string"
  16710. },
  16711. "variant": {
  16712. "type": "string"
  16713. }
  16714. },
  16715. "required": ["id", "providerID"],
  16716. "additionalProperties": false
  16717. },
  16718. "version": {
  16719. "type": "string"
  16720. },
  16721. "metadata": {
  16722. "type": "object"
  16723. },
  16724. "time": {
  16725. "type": "object",
  16726. "properties": {
  16727. "created": {
  16728. "type": "integer",
  16729. "minimum": 0
  16730. },
  16731. "updated": {
  16732. "type": "integer",
  16733. "minimum": 0
  16734. },
  16735. "compacting": {
  16736. "type": "integer",
  16737. "minimum": 0
  16738. },
  16739. "archived": {
  16740. "type": "number"
  16741. }
  16742. },
  16743. "required": ["created", "updated"],
  16744. "additionalProperties": false
  16745. },
  16746. "permission": {
  16747. "$ref": "#/components/schemas/PermissionRuleset"
  16748. },
  16749. "revert": {
  16750. "type": "object",
  16751. "properties": {
  16752. "messageID": {
  16753. "type": "string",
  16754. "pattern": "^msg"
  16755. },
  16756. "partID": {
  16757. "type": "string",
  16758. "pattern": "^prt"
  16759. },
  16760. "snapshot": {
  16761. "type": "string"
  16762. },
  16763. "diff": {
  16764. "type": "string"
  16765. }
  16766. },
  16767. "required": ["messageID"],
  16768. "additionalProperties": false
  16769. },
  16770. "project": {
  16771. "anyOf": [
  16772. {
  16773. "$ref": "#/components/schemas/ProjectSummary"
  16774. },
  16775. {
  16776. "type": "null"
  16777. }
  16778. ]
  16779. }
  16780. },
  16781. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  16782. "additionalProperties": false
  16783. },
  16784. "McpResource": {
  16785. "type": "object",
  16786. "properties": {
  16787. "name": {
  16788. "type": "string"
  16789. },
  16790. "uri": {
  16791. "type": "string"
  16792. },
  16793. "description": {
  16794. "type": "string"
  16795. },
  16796. "mimeType": {
  16797. "type": "string"
  16798. },
  16799. "client": {
  16800. "type": "string"
  16801. }
  16802. },
  16803. "required": ["name", "uri", "client"],
  16804. "additionalProperties": false
  16805. },
  16806. "Symbol": {
  16807. "type": "object",
  16808. "properties": {
  16809. "name": {
  16810. "type": "string"
  16811. },
  16812. "kind": {
  16813. "type": "integer",
  16814. "minimum": 0
  16815. },
  16816. "location": {
  16817. "type": "object",
  16818. "properties": {
  16819. "uri": {
  16820. "type": "string"
  16821. },
  16822. "range": {
  16823. "$ref": "#/components/schemas/Range"
  16824. }
  16825. },
  16826. "required": ["uri", "range"],
  16827. "additionalProperties": false
  16828. }
  16829. },
  16830. "required": ["name", "kind", "location"],
  16831. "additionalProperties": false
  16832. },
  16833. "FileNode": {
  16834. "type": "object",
  16835. "properties": {
  16836. "name": {
  16837. "type": "string"
  16838. },
  16839. "path": {
  16840. "type": "string"
  16841. },
  16842. "absolute": {
  16843. "type": "string"
  16844. },
  16845. "type": {
  16846. "type": "string",
  16847. "enum": ["file", "directory"]
  16848. },
  16849. "ignored": {
  16850. "type": "boolean"
  16851. }
  16852. },
  16853. "required": ["name", "path", "absolute", "type", "ignored"],
  16854. "additionalProperties": false
  16855. },
  16856. "FileContent": {
  16857. "type": "object",
  16858. "properties": {
  16859. "type": {
  16860. "type": "string",
  16861. "enum": ["text", "binary"]
  16862. },
  16863. "content": {
  16864. "type": "string"
  16865. },
  16866. "diff": {
  16867. "type": "string"
  16868. },
  16869. "patch": {
  16870. "type": "object",
  16871. "properties": {
  16872. "oldFileName": {
  16873. "type": "string"
  16874. },
  16875. "newFileName": {
  16876. "type": "string"
  16877. },
  16878. "oldHeader": {
  16879. "type": "string"
  16880. },
  16881. "newHeader": {
  16882. "type": "string"
  16883. },
  16884. "hunks": {
  16885. "type": "array",
  16886. "items": {
  16887. "type": "object",
  16888. "properties": {
  16889. "oldStart": {
  16890. "type": "integer",
  16891. "minimum": 0
  16892. },
  16893. "oldLines": {
  16894. "type": "integer",
  16895. "minimum": 0
  16896. },
  16897. "newStart": {
  16898. "type": "integer",
  16899. "minimum": 0
  16900. },
  16901. "newLines": {
  16902. "type": "integer",
  16903. "minimum": 0
  16904. },
  16905. "lines": {
  16906. "type": "array",
  16907. "items": {
  16908. "type": "string"
  16909. }
  16910. }
  16911. },
  16912. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  16913. "additionalProperties": false
  16914. }
  16915. },
  16916. "index": {
  16917. "type": "string"
  16918. }
  16919. },
  16920. "required": ["oldFileName", "newFileName", "hunks"],
  16921. "additionalProperties": false
  16922. },
  16923. "encoding": {
  16924. "type": "string",
  16925. "enum": ["base64"]
  16926. },
  16927. "mimeType": {
  16928. "type": "string"
  16929. }
  16930. },
  16931. "required": ["type", "content"],
  16932. "additionalProperties": false
  16933. },
  16934. "File": {
  16935. "type": "object",
  16936. "properties": {
  16937. "path": {
  16938. "type": "string"
  16939. },
  16940. "added": {
  16941. "type": "integer",
  16942. "minimum": 0
  16943. },
  16944. "removed": {
  16945. "type": "integer",
  16946. "minimum": 0
  16947. },
  16948. "status": {
  16949. "type": "string",
  16950. "enum": ["added", "deleted", "modified"]
  16951. }
  16952. },
  16953. "required": ["path", "added", "removed", "status"],
  16954. "additionalProperties": false
  16955. },
  16956. "Path": {
  16957. "type": "object",
  16958. "properties": {
  16959. "home": {
  16960. "type": "string"
  16961. },
  16962. "state": {
  16963. "type": "string"
  16964. },
  16965. "config": {
  16966. "type": "string"
  16967. },
  16968. "worktree": {
  16969. "type": "string"
  16970. },
  16971. "directory": {
  16972. "type": "string"
  16973. }
  16974. },
  16975. "required": ["home", "state", "config", "worktree", "directory"],
  16976. "additionalProperties": false
  16977. },
  16978. "VcsInfo": {
  16979. "type": "object",
  16980. "properties": {
  16981. "branch": {
  16982. "type": "string"
  16983. },
  16984. "default_branch": {
  16985. "type": "string"
  16986. }
  16987. },
  16988. "additionalProperties": false
  16989. },
  16990. "VcsFileStatus": {
  16991. "type": "object",
  16992. "properties": {
  16993. "file": {
  16994. "type": "string"
  16995. },
  16996. "additions": {
  16997. "type": "number"
  16998. },
  16999. "deletions": {
  17000. "type": "number"
  17001. },
  17002. "status": {
  17003. "type": "string",
  17004. "enum": ["added", "deleted", "modified"]
  17005. }
  17006. },
  17007. "required": ["file", "additions", "deletions", "status"],
  17008. "additionalProperties": false
  17009. },
  17010. "VcsFileDiff": {
  17011. "type": "object",
  17012. "properties": {
  17013. "file": {
  17014. "type": "string"
  17015. },
  17016. "patch": {
  17017. "type": "string"
  17018. },
  17019. "additions": {
  17020. "type": "number"
  17021. },
  17022. "deletions": {
  17023. "type": "number"
  17024. },
  17025. "status": {
  17026. "type": "string",
  17027. "enum": ["added", "deleted", "modified"]
  17028. }
  17029. },
  17030. "required": ["file", "additions", "deletions"],
  17031. "additionalProperties": false
  17032. },
  17033. "VcsApplyError": {
  17034. "type": "object",
  17035. "properties": {
  17036. "name": {
  17037. "type": "string",
  17038. "enum": ["VcsApplyError"]
  17039. },
  17040. "data": {
  17041. "type": "object",
  17042. "properties": {
  17043. "message": {
  17044. "type": "string"
  17045. },
  17046. "reason": {
  17047. "type": "string",
  17048. "enum": ["non-git", "not-clean"]
  17049. }
  17050. },
  17051. "required": ["message", "reason"],
  17052. "additionalProperties": false
  17053. }
  17054. },
  17055. "required": ["name", "data"],
  17056. "additionalProperties": false
  17057. },
  17058. "Command": {
  17059. "type": "object",
  17060. "properties": {
  17061. "name": {
  17062. "type": "string"
  17063. },
  17064. "description": {
  17065. "type": "string"
  17066. },
  17067. "agent": {
  17068. "type": "string"
  17069. },
  17070. "model": {
  17071. "type": "string"
  17072. },
  17073. "source": {
  17074. "type": "string",
  17075. "enum": ["command", "mcp", "skill"]
  17076. },
  17077. "template": {
  17078. "type": "string"
  17079. },
  17080. "subtask": {
  17081. "type": "boolean"
  17082. },
  17083. "hints": {
  17084. "type": "array",
  17085. "items": {
  17086. "type": "string"
  17087. }
  17088. }
  17089. },
  17090. "required": ["name", "template", "hints"],
  17091. "additionalProperties": false
  17092. },
  17093. "Agent": {
  17094. "type": "object",
  17095. "properties": {
  17096. "name": {
  17097. "type": "string"
  17098. },
  17099. "description": {
  17100. "type": "string"
  17101. },
  17102. "mode": {
  17103. "type": "string",
  17104. "enum": ["subagent", "primary", "all"]
  17105. },
  17106. "native": {
  17107. "type": "boolean"
  17108. },
  17109. "hidden": {
  17110. "type": "boolean"
  17111. },
  17112. "topP": {
  17113. "type": "number"
  17114. },
  17115. "temperature": {
  17116. "type": "number"
  17117. },
  17118. "color": {
  17119. "type": "string"
  17120. },
  17121. "permission": {
  17122. "$ref": "#/components/schemas/PermissionRuleset"
  17123. },
  17124. "model": {
  17125. "type": "object",
  17126. "properties": {
  17127. "modelID": {
  17128. "type": "string"
  17129. },
  17130. "providerID": {
  17131. "type": "string"
  17132. }
  17133. },
  17134. "required": ["modelID", "providerID"],
  17135. "additionalProperties": false
  17136. },
  17137. "variant": {
  17138. "type": "string"
  17139. },
  17140. "prompt": {
  17141. "type": "string"
  17142. },
  17143. "options": {
  17144. "type": "object"
  17145. },
  17146. "steps": {
  17147. "type": "number"
  17148. }
  17149. },
  17150. "required": ["name", "mode", "permission", "options"],
  17151. "additionalProperties": false
  17152. },
  17153. "LSPStatus": {
  17154. "type": "object",
  17155. "properties": {
  17156. "id": {
  17157. "type": "string"
  17158. },
  17159. "name": {
  17160. "type": "string"
  17161. },
  17162. "root": {
  17163. "type": "string"
  17164. },
  17165. "status": {
  17166. "type": "string",
  17167. "enum": ["connected", "error"]
  17168. }
  17169. },
  17170. "required": ["id", "name", "root", "status"],
  17171. "additionalProperties": false
  17172. },
  17173. "FormatterStatus": {
  17174. "type": "object",
  17175. "properties": {
  17176. "name": {
  17177. "type": "string"
  17178. },
  17179. "extensions": {
  17180. "type": "array",
  17181. "items": {
  17182. "type": "string"
  17183. }
  17184. },
  17185. "enabled": {
  17186. "type": "boolean"
  17187. }
  17188. },
  17189. "required": ["name", "extensions", "enabled"],
  17190. "additionalProperties": false
  17191. },
  17192. "MCPStatusConnected": {
  17193. "type": "object",
  17194. "properties": {
  17195. "status": {
  17196. "type": "string",
  17197. "enum": ["connected"]
  17198. }
  17199. },
  17200. "required": ["status"],
  17201. "additionalProperties": false
  17202. },
  17203. "MCPStatusDisabled": {
  17204. "type": "object",
  17205. "properties": {
  17206. "status": {
  17207. "type": "string",
  17208. "enum": ["disabled"]
  17209. }
  17210. },
  17211. "required": ["status"],
  17212. "additionalProperties": false
  17213. },
  17214. "MCPStatusFailed": {
  17215. "type": "object",
  17216. "properties": {
  17217. "status": {
  17218. "type": "string",
  17219. "enum": ["failed"]
  17220. },
  17221. "error": {
  17222. "type": "string"
  17223. }
  17224. },
  17225. "required": ["status", "error"],
  17226. "additionalProperties": false
  17227. },
  17228. "MCPStatusNeedsAuth": {
  17229. "type": "object",
  17230. "properties": {
  17231. "status": {
  17232. "type": "string",
  17233. "enum": ["needs_auth"]
  17234. }
  17235. },
  17236. "required": ["status"],
  17237. "additionalProperties": false
  17238. },
  17239. "MCPStatusNeedsClientRegistration": {
  17240. "type": "object",
  17241. "properties": {
  17242. "status": {
  17243. "type": "string",
  17244. "enum": ["needs_client_registration"]
  17245. },
  17246. "error": {
  17247. "type": "string"
  17248. }
  17249. },
  17250. "required": ["status", "error"],
  17251. "additionalProperties": false
  17252. },
  17253. "MCPStatus": {
  17254. "anyOf": [
  17255. {
  17256. "$ref": "#/components/schemas/MCPStatusConnected"
  17257. },
  17258. {
  17259. "$ref": "#/components/schemas/MCPStatusDisabled"
  17260. },
  17261. {
  17262. "$ref": "#/components/schemas/MCPStatusFailed"
  17263. },
  17264. {
  17265. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  17266. },
  17267. {
  17268. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  17269. }
  17270. ]
  17271. },
  17272. "McpUnsupportedOAuthError": {
  17273. "type": "object",
  17274. "properties": {
  17275. "error": {
  17276. "type": "string"
  17277. }
  17278. },
  17279. "required": ["error"],
  17280. "additionalProperties": false
  17281. },
  17282. "McpServerNotFoundError": {
  17283. "type": "object",
  17284. "properties": {
  17285. "_tag": {
  17286. "type": "string",
  17287. "enum": ["McpServerNotFoundError"]
  17288. },
  17289. "name": {
  17290. "type": "string"
  17291. },
  17292. "message": {
  17293. "type": "string"
  17294. }
  17295. },
  17296. "required": ["_tag", "name", "message"],
  17297. "additionalProperties": false
  17298. },
  17299. "Project": {
  17300. "type": "object",
  17301. "properties": {
  17302. "id": {
  17303. "type": "string"
  17304. },
  17305. "worktree": {
  17306. "type": "string"
  17307. },
  17308. "vcs": {
  17309. "type": "string",
  17310. "enum": ["git"]
  17311. },
  17312. "name": {
  17313. "type": "string"
  17314. },
  17315. "icon": {
  17316. "type": "object",
  17317. "properties": {
  17318. "url": {
  17319. "type": "string"
  17320. },
  17321. "override": {
  17322. "type": "string"
  17323. },
  17324. "color": {
  17325. "type": "string"
  17326. }
  17327. },
  17328. "additionalProperties": false
  17329. },
  17330. "commands": {
  17331. "type": "object",
  17332. "properties": {
  17333. "start": {
  17334. "type": "string",
  17335. "description": "Startup script to run when creating a new workspace (worktree)"
  17336. }
  17337. },
  17338. "additionalProperties": false
  17339. },
  17340. "time": {
  17341. "type": "object",
  17342. "properties": {
  17343. "created": {
  17344. "type": "integer",
  17345. "minimum": 0
  17346. },
  17347. "updated": {
  17348. "type": "integer",
  17349. "minimum": 0
  17350. },
  17351. "initialized": {
  17352. "type": "integer",
  17353. "minimum": 0
  17354. }
  17355. },
  17356. "required": ["created", "updated"],
  17357. "additionalProperties": false
  17358. },
  17359. "sandboxes": {
  17360. "type": "array",
  17361. "items": {
  17362. "type": "string"
  17363. }
  17364. }
  17365. },
  17366. "required": ["id", "worktree", "time", "sandboxes"],
  17367. "additionalProperties": false
  17368. },
  17369. "ProjectNotFoundError": {
  17370. "type": "object",
  17371. "properties": {
  17372. "_tag": {
  17373. "type": "string",
  17374. "enum": ["ProjectNotFoundError"]
  17375. },
  17376. "projectID": {
  17377. "type": "string"
  17378. },
  17379. "message": {
  17380. "type": "string"
  17381. }
  17382. },
  17383. "required": ["_tag", "projectID", "message"],
  17384. "additionalProperties": false
  17385. },
  17386. "PtyNotFoundError": {
  17387. "type": "object",
  17388. "properties": {
  17389. "_tag": {
  17390. "type": "string",
  17391. "enum": ["PtyNotFoundError"]
  17392. },
  17393. "ptyID": {
  17394. "type": "string"
  17395. },
  17396. "message": {
  17397. "type": "string"
  17398. }
  17399. },
  17400. "required": ["_tag", "ptyID", "message"],
  17401. "additionalProperties": false
  17402. },
  17403. "PtyForbiddenError": {
  17404. "type": "object",
  17405. "properties": {
  17406. "_tag": {
  17407. "type": "string",
  17408. "enum": ["PtyForbiddenError"]
  17409. },
  17410. "message": {
  17411. "type": "string"
  17412. }
  17413. },
  17414. "required": ["_tag", "message"],
  17415. "additionalProperties": false
  17416. },
  17417. "QuestionRequest": {
  17418. "type": "object",
  17419. "properties": {
  17420. "id": {
  17421. "type": "string",
  17422. "pattern": "^que"
  17423. },
  17424. "sessionID": {
  17425. "type": "string",
  17426. "pattern": "^ses"
  17427. },
  17428. "questions": {
  17429. "type": "array",
  17430. "items": {
  17431. "$ref": "#/components/schemas/QuestionInfo"
  17432. },
  17433. "description": "Questions to ask"
  17434. },
  17435. "tool": {
  17436. "$ref": "#/components/schemas/QuestionTool"
  17437. }
  17438. },
  17439. "required": ["id", "sessionID", "questions"],
  17440. "additionalProperties": false
  17441. },
  17442. "QuestionNotFoundError": {
  17443. "type": "object",
  17444. "properties": {
  17445. "_tag": {
  17446. "type": "string",
  17447. "enum": ["QuestionNotFoundError"]
  17448. },
  17449. "requestID": {
  17450. "type": "string"
  17451. },
  17452. "message": {
  17453. "type": "string"
  17454. }
  17455. },
  17456. "required": ["_tag", "requestID", "message"],
  17457. "additionalProperties": false
  17458. },
  17459. "PermissionRequest": {
  17460. "type": "object",
  17461. "properties": {
  17462. "id": {
  17463. "type": "string",
  17464. "pattern": "^per"
  17465. },
  17466. "sessionID": {
  17467. "type": "string",
  17468. "pattern": "^ses"
  17469. },
  17470. "permission": {
  17471. "type": "string"
  17472. },
  17473. "patterns": {
  17474. "type": "array",
  17475. "items": {
  17476. "type": "string"
  17477. }
  17478. },
  17479. "metadata": {
  17480. "type": "object"
  17481. },
  17482. "always": {
  17483. "type": "array",
  17484. "items": {
  17485. "type": "string"
  17486. }
  17487. },
  17488. "tool": {
  17489. "type": "object",
  17490. "properties": {
  17491. "messageID": {
  17492. "type": "string",
  17493. "pattern": "^msg"
  17494. },
  17495. "callID": {
  17496. "type": "string"
  17497. }
  17498. },
  17499. "required": ["messageID", "callID"],
  17500. "additionalProperties": false
  17501. }
  17502. },
  17503. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  17504. "additionalProperties": false
  17505. },
  17506. "PermissionNotFoundError": {
  17507. "type": "object",
  17508. "properties": {
  17509. "_tag": {
  17510. "type": "string",
  17511. "enum": ["PermissionNotFoundError"]
  17512. },
  17513. "requestID": {
  17514. "type": "string"
  17515. },
  17516. "message": {
  17517. "type": "string"
  17518. }
  17519. },
  17520. "required": ["_tag", "requestID", "message"],
  17521. "additionalProperties": false
  17522. },
  17523. "ProviderAuthMethod": {
  17524. "type": "object",
  17525. "properties": {
  17526. "type": {
  17527. "type": "string",
  17528. "enum": ["oauth", "api"]
  17529. },
  17530. "label": {
  17531. "type": "string"
  17532. },
  17533. "prompts": {
  17534. "type": "array",
  17535. "items": {
  17536. "anyOf": [
  17537. {
  17538. "type": "object",
  17539. "properties": {
  17540. "type": {
  17541. "type": "string",
  17542. "enum": ["text"]
  17543. },
  17544. "key": {
  17545. "type": "string"
  17546. },
  17547. "message": {
  17548. "type": "string"
  17549. },
  17550. "placeholder": {
  17551. "type": "string"
  17552. },
  17553. "when": {
  17554. "type": "object",
  17555. "properties": {
  17556. "key": {
  17557. "type": "string"
  17558. },
  17559. "op": {
  17560. "type": "string",
  17561. "enum": ["eq", "neq"]
  17562. },
  17563. "value": {
  17564. "type": "string"
  17565. }
  17566. },
  17567. "required": ["key", "op", "value"],
  17568. "additionalProperties": false
  17569. }
  17570. },
  17571. "required": ["type", "key", "message"],
  17572. "additionalProperties": false
  17573. },
  17574. {
  17575. "type": "object",
  17576. "properties": {
  17577. "type": {
  17578. "type": "string",
  17579. "enum": ["select"]
  17580. },
  17581. "key": {
  17582. "type": "string"
  17583. },
  17584. "message": {
  17585. "type": "string"
  17586. },
  17587. "options": {
  17588. "type": "array",
  17589. "items": {
  17590. "type": "object",
  17591. "properties": {
  17592. "label": {
  17593. "type": "string"
  17594. },
  17595. "value": {
  17596. "type": "string"
  17597. },
  17598. "hint": {
  17599. "type": "string"
  17600. }
  17601. },
  17602. "required": ["label", "value"],
  17603. "additionalProperties": false
  17604. }
  17605. },
  17606. "when": {
  17607. "type": "object",
  17608. "properties": {
  17609. "key": {
  17610. "type": "string"
  17611. },
  17612. "op": {
  17613. "type": "string",
  17614. "enum": ["eq", "neq"]
  17615. },
  17616. "value": {
  17617. "type": "string"
  17618. }
  17619. },
  17620. "required": ["key", "op", "value"],
  17621. "additionalProperties": false
  17622. }
  17623. },
  17624. "required": ["type", "key", "message", "options"],
  17625. "additionalProperties": false
  17626. }
  17627. ]
  17628. }
  17629. }
  17630. },
  17631. "required": ["type", "label"],
  17632. "additionalProperties": false
  17633. },
  17634. "ProviderAuthAuthorization": {
  17635. "type": "object",
  17636. "properties": {
  17637. "url": {
  17638. "type": "string"
  17639. },
  17640. "method": {
  17641. "type": "string",
  17642. "enum": ["auto", "code"]
  17643. },
  17644. "instructions": {
  17645. "type": "string"
  17646. }
  17647. },
  17648. "required": ["url", "method", "instructions"],
  17649. "additionalProperties": false
  17650. },
  17651. "ProviderAuthError1": {
  17652. "type": "object",
  17653. "properties": {
  17654. "name": {
  17655. "type": "string",
  17656. "enum": [
  17657. "BadRequest",
  17658. "ProviderAuthOauthMissing",
  17659. "ProviderAuthOauthCodeMissing",
  17660. "ProviderAuthOauthCallbackFailed",
  17661. "ProviderAuthValidationFailed"
  17662. ]
  17663. },
  17664. "data": {
  17665. "type": "object",
  17666. "properties": {
  17667. "providerID": {
  17668. "type": "string"
  17669. },
  17670. "field": {
  17671. "type": "string"
  17672. },
  17673. "message": {
  17674. "type": "string"
  17675. },
  17676. "kind": {
  17677. "type": "string"
  17678. }
  17679. },
  17680. "additionalProperties": false
  17681. }
  17682. },
  17683. "required": ["name", "data"],
  17684. "additionalProperties": false
  17685. },
  17686. "NotFoundError": {
  17687. "type": "object",
  17688. "required": ["name", "data"],
  17689. "properties": {
  17690. "name": {
  17691. "type": "string",
  17692. "enum": ["NotFoundError"]
  17693. },
  17694. "data": {
  17695. "type": "object",
  17696. "required": ["message"],
  17697. "properties": {
  17698. "message": {
  17699. "type": "string"
  17700. }
  17701. }
  17702. }
  17703. }
  17704. },
  17705. "TextPartInput": {
  17706. "type": "object",
  17707. "properties": {
  17708. "id": {
  17709. "type": "string",
  17710. "pattern": "^prt"
  17711. },
  17712. "type": {
  17713. "type": "string",
  17714. "enum": ["text"]
  17715. },
  17716. "text": {
  17717. "type": "string"
  17718. },
  17719. "synthetic": {
  17720. "type": "boolean"
  17721. },
  17722. "ignored": {
  17723. "type": "boolean"
  17724. },
  17725. "time": {
  17726. "type": "object",
  17727. "properties": {
  17728. "start": {
  17729. "type": "integer",
  17730. "minimum": 0
  17731. },
  17732. "end": {
  17733. "type": "integer",
  17734. "minimum": 0
  17735. }
  17736. },
  17737. "required": ["start"],
  17738. "additionalProperties": false
  17739. },
  17740. "metadata": {
  17741. "type": "object"
  17742. }
  17743. },
  17744. "required": ["type", "text"],
  17745. "additionalProperties": false
  17746. },
  17747. "FilePartInput": {
  17748. "type": "object",
  17749. "properties": {
  17750. "id": {
  17751. "type": "string",
  17752. "pattern": "^prt"
  17753. },
  17754. "type": {
  17755. "type": "string",
  17756. "enum": ["file"]
  17757. },
  17758. "mime": {
  17759. "type": "string"
  17760. },
  17761. "filename": {
  17762. "type": "string"
  17763. },
  17764. "url": {
  17765. "type": "string"
  17766. },
  17767. "source": {
  17768. "$ref": "#/components/schemas/FilePartSource"
  17769. }
  17770. },
  17771. "required": ["type", "mime", "url"],
  17772. "additionalProperties": false
  17773. },
  17774. "AgentPartInput": {
  17775. "type": "object",
  17776. "properties": {
  17777. "id": {
  17778. "type": "string",
  17779. "pattern": "^prt"
  17780. },
  17781. "type": {
  17782. "type": "string",
  17783. "enum": ["agent"]
  17784. },
  17785. "name": {
  17786. "type": "string"
  17787. },
  17788. "source": {
  17789. "type": "object",
  17790. "properties": {
  17791. "value": {
  17792. "type": "string"
  17793. },
  17794. "start": {
  17795. "type": "integer",
  17796. "minimum": 0
  17797. },
  17798. "end": {
  17799. "type": "integer",
  17800. "minimum": 0
  17801. }
  17802. },
  17803. "required": ["value", "start", "end"],
  17804. "additionalProperties": false
  17805. }
  17806. },
  17807. "required": ["type", "name"],
  17808. "additionalProperties": false
  17809. },
  17810. "SubtaskPartInput": {
  17811. "type": "object",
  17812. "properties": {
  17813. "id": {
  17814. "type": "string",
  17815. "pattern": "^prt"
  17816. },
  17817. "type": {
  17818. "type": "string",
  17819. "enum": ["subtask"]
  17820. },
  17821. "prompt": {
  17822. "type": "string"
  17823. },
  17824. "description": {
  17825. "type": "string"
  17826. },
  17827. "agent": {
  17828. "type": "string"
  17829. },
  17830. "model": {
  17831. "type": "object",
  17832. "properties": {
  17833. "providerID": {
  17834. "type": "string"
  17835. },
  17836. "modelID": {
  17837. "type": "string"
  17838. }
  17839. },
  17840. "required": ["providerID", "modelID"],
  17841. "additionalProperties": false
  17842. },
  17843. "command": {
  17844. "type": "string"
  17845. }
  17846. },
  17847. "required": ["type", "prompt", "description", "agent"],
  17848. "additionalProperties": false
  17849. },
  17850. "SessionBusyError": {
  17851. "type": "object",
  17852. "properties": {
  17853. "_tag": {
  17854. "type": "string",
  17855. "enum": ["SessionBusyError"]
  17856. },
  17857. "sessionID": {
  17858. "type": "string"
  17859. },
  17860. "message": {
  17861. "type": "string"
  17862. }
  17863. },
  17864. "required": ["_tag", "sessionID", "message"],
  17865. "additionalProperties": false
  17866. },
  17867. "V2SessionsResponse": {
  17868. "type": "object",
  17869. "properties": {
  17870. "items": {
  17871. "type": "array",
  17872. "items": {
  17873. "$ref": "#/components/schemas/SessionInfo"
  17874. }
  17875. },
  17876. "cursor": {
  17877. "type": "object",
  17878. "properties": {
  17879. "previous": {
  17880. "type": "string"
  17881. },
  17882. "next": {
  17883. "type": "string"
  17884. }
  17885. },
  17886. "additionalProperties": false
  17887. }
  17888. },
  17889. "required": ["items", "cursor"],
  17890. "additionalProperties": false
  17891. },
  17892. "InvalidCursorError": {
  17893. "type": "object",
  17894. "properties": {
  17895. "_tag": {
  17896. "type": "string",
  17897. "enum": ["InvalidCursorError"]
  17898. },
  17899. "message": {
  17900. "type": "string"
  17901. }
  17902. },
  17903. "required": ["_tag", "message"],
  17904. "additionalProperties": false
  17905. },
  17906. "UnauthorizedError": {
  17907. "type": "object",
  17908. "properties": {
  17909. "_tag": {
  17910. "type": "string",
  17911. "enum": ["UnauthorizedError"]
  17912. },
  17913. "message": {
  17914. "type": "string"
  17915. }
  17916. },
  17917. "required": ["_tag", "message"],
  17918. "additionalProperties": false
  17919. },
  17920. "SessionNotFoundError": {
  17921. "type": "object",
  17922. "properties": {
  17923. "_tag": {
  17924. "type": "string",
  17925. "enum": ["SessionNotFoundError"]
  17926. },
  17927. "sessionID": {
  17928. "type": "string"
  17929. },
  17930. "message": {
  17931. "type": "string"
  17932. }
  17933. },
  17934. "required": ["_tag", "sessionID", "message"],
  17935. "additionalProperties": false
  17936. },
  17937. "ServiceUnavailableError": {
  17938. "type": "object",
  17939. "properties": {
  17940. "_tag": {
  17941. "type": "string",
  17942. "enum": ["ServiceUnavailableError"]
  17943. },
  17944. "message": {
  17945. "type": "string"
  17946. },
  17947. "service": {
  17948. "type": "string"
  17949. }
  17950. },
  17951. "required": ["_tag", "message"],
  17952. "additionalProperties": false
  17953. },
  17954. "UnknownError1": {
  17955. "type": "object",
  17956. "properties": {
  17957. "_tag": {
  17958. "type": "string",
  17959. "enum": ["UnknownError"]
  17960. },
  17961. "message": {
  17962. "type": "string"
  17963. },
  17964. "ref": {
  17965. "type": "string"
  17966. }
  17967. },
  17968. "required": ["_tag", "message"],
  17969. "additionalProperties": false
  17970. },
  17971. "V2SessionMessagesResponse": {
  17972. "type": "object",
  17973. "properties": {
  17974. "items": {
  17975. "type": "array",
  17976. "items": {
  17977. "$ref": "#/components/schemas/SessionMessage"
  17978. }
  17979. },
  17980. "cursor": {
  17981. "type": "object",
  17982. "properties": {
  17983. "previous": {
  17984. "type": "string"
  17985. },
  17986. "next": {
  17987. "type": "string"
  17988. }
  17989. },
  17990. "additionalProperties": false
  17991. }
  17992. },
  17993. "required": ["items", "cursor"],
  17994. "additionalProperties": false
  17995. },
  17996. "ProviderNotFoundError": {
  17997. "type": "object",
  17998. "properties": {
  17999. "_tag": {
  18000. "type": "string",
  18001. "enum": ["ProviderNotFoundError"]
  18002. },
  18003. "providerID": {
  18004. "type": "string"
  18005. },
  18006. "message": {
  18007. "type": "string"
  18008. }
  18009. },
  18010. "required": ["_tag", "providerID", "message"],
  18011. "additionalProperties": false
  18012. },
  18013. "EventTuiPromptAppend": {
  18014. "type": "object",
  18015. "properties": {
  18016. "type": {
  18017. "type": "string",
  18018. "enum": ["tui.prompt.append"]
  18019. },
  18020. "properties": {
  18021. "type": "object",
  18022. "properties": {
  18023. "text": {
  18024. "type": "string"
  18025. }
  18026. },
  18027. "required": ["text"],
  18028. "additionalProperties": false
  18029. }
  18030. },
  18031. "required": ["type", "properties"],
  18032. "additionalProperties": false
  18033. },
  18034. "EventTuiCommandExecute": {
  18035. "type": "object",
  18036. "properties": {
  18037. "type": {
  18038. "type": "string",
  18039. "enum": ["tui.command.execute"]
  18040. },
  18041. "properties": {
  18042. "type": "object",
  18043. "properties": {
  18044. "command": {
  18045. "anyOf": [
  18046. {
  18047. "type": "string",
  18048. "enum": [
  18049. "session.list",
  18050. "session.new",
  18051. "session.share",
  18052. "session.interrupt",
  18053. "session.compact",
  18054. "session.page.up",
  18055. "session.page.down",
  18056. "session.line.up",
  18057. "session.line.down",
  18058. "session.half.page.up",
  18059. "session.half.page.down",
  18060. "session.first",
  18061. "session.last",
  18062. "prompt.clear",
  18063. "prompt.submit",
  18064. "agent.cycle"
  18065. ]
  18066. },
  18067. {
  18068. "type": "string"
  18069. }
  18070. ]
  18071. }
  18072. },
  18073. "required": ["command"],
  18074. "additionalProperties": false
  18075. }
  18076. },
  18077. "required": ["type", "properties"],
  18078. "additionalProperties": false
  18079. },
  18080. "EventTuiToastShow": {
  18081. "type": "object",
  18082. "properties": {
  18083. "type": {
  18084. "type": "string",
  18085. "enum": ["tui.toast.show"]
  18086. },
  18087. "properties": {
  18088. "type": "object",
  18089. "properties": {
  18090. "title": {
  18091. "type": "string"
  18092. },
  18093. "message": {
  18094. "type": "string"
  18095. },
  18096. "variant": {
  18097. "type": "string",
  18098. "enum": ["info", "success", "warning", "error"]
  18099. },
  18100. "duration": {
  18101. "type": "integer",
  18102. "exclusiveMinimum": 0
  18103. }
  18104. },
  18105. "required": ["message", "variant"],
  18106. "additionalProperties": false
  18107. }
  18108. },
  18109. "required": ["type", "properties"],
  18110. "additionalProperties": false
  18111. },
  18112. "EventTuiSessionSelect": {
  18113. "type": "object",
  18114. "properties": {
  18115. "type": {
  18116. "type": "string",
  18117. "enum": ["tui.session.select"]
  18118. },
  18119. "properties": {
  18120. "type": "object",
  18121. "properties": {
  18122. "sessionID": {
  18123. "type": "string",
  18124. "pattern": "^ses",
  18125. "description": "Session ID to navigate to"
  18126. }
  18127. },
  18128. "required": ["sessionID"],
  18129. "additionalProperties": false
  18130. }
  18131. },
  18132. "required": ["type", "properties"],
  18133. "additionalProperties": false
  18134. },
  18135. "Workspace": {
  18136. "type": "object",
  18137. "properties": {
  18138. "id": {
  18139. "type": "string",
  18140. "pattern": "^wrk"
  18141. },
  18142. "type": {
  18143. "type": "string"
  18144. },
  18145. "name": {
  18146. "type": "string"
  18147. },
  18148. "branch": {
  18149. "anyOf": [
  18150. {
  18151. "type": "string"
  18152. },
  18153. {
  18154. "type": "null"
  18155. }
  18156. ]
  18157. },
  18158. "directory": {
  18159. "anyOf": [
  18160. {
  18161. "type": "string"
  18162. },
  18163. {
  18164. "type": "null"
  18165. }
  18166. ]
  18167. },
  18168. "extra": {
  18169. "anyOf": [
  18170. {},
  18171. {
  18172. "type": "null"
  18173. }
  18174. ]
  18175. },
  18176. "projectID": {
  18177. "type": "string"
  18178. },
  18179. "timeUsed": {
  18180. "anyOf": [
  18181. {
  18182. "type": "number"
  18183. },
  18184. {
  18185. "type": "string",
  18186. "enum": ["NaN"]
  18187. },
  18188. {
  18189. "type": "string",
  18190. "enum": ["Infinity"]
  18191. },
  18192. {
  18193. "type": "string",
  18194. "enum": ["-Infinity"]
  18195. },
  18196. {
  18197. "type": "string",
  18198. "enum": ["Infinity", "-Infinity", "NaN"]
  18199. }
  18200. ]
  18201. }
  18202. },
  18203. "required": ["id", "type", "name", "projectID", "timeUsed"],
  18204. "additionalProperties": false
  18205. },
  18206. "WorkspaceCreateError": {
  18207. "type": "object",
  18208. "properties": {
  18209. "name": {
  18210. "type": "string",
  18211. "enum": ["WorkspaceCreateError"]
  18212. },
  18213. "data": {
  18214. "type": "object",
  18215. "properties": {
  18216. "message": {
  18217. "type": "string"
  18218. }
  18219. },
  18220. "required": ["message"],
  18221. "additionalProperties": false
  18222. }
  18223. },
  18224. "required": ["name", "data"],
  18225. "additionalProperties": false
  18226. },
  18227. "WorkspaceWarpError": {
  18228. "type": "object",
  18229. "properties": {
  18230. "name": {
  18231. "type": "string",
  18232. "enum": ["WorkspaceWarpError"]
  18233. },
  18234. "data": {
  18235. "type": "object",
  18236. "properties": {
  18237. "message": {
  18238. "type": "string"
  18239. }
  18240. },
  18241. "required": ["message"],
  18242. "additionalProperties": false
  18243. }
  18244. },
  18245. "required": ["name", "data"],
  18246. "additionalProperties": false
  18247. },
  18248. "effect_HttpApiError_Forbidden": {
  18249. "type": "object",
  18250. "properties": {
  18251. "_tag": {
  18252. "type": "string",
  18253. "enum": ["Forbidden"]
  18254. }
  18255. },
  18256. "required": ["_tag"],
  18257. "additionalProperties": false
  18258. },
  18259. "Event.tui.prompt.append": {
  18260. "type": "object",
  18261. "properties": {
  18262. "id": {
  18263. "type": "string"
  18264. },
  18265. "type": {
  18266. "type": "string",
  18267. "enum": ["tui.prompt.append"]
  18268. },
  18269. "properties": {
  18270. "type": "object",
  18271. "properties": {
  18272. "text": {
  18273. "type": "string"
  18274. }
  18275. },
  18276. "required": ["text"],
  18277. "additionalProperties": false
  18278. }
  18279. },
  18280. "required": ["id", "type", "properties"],
  18281. "additionalProperties": false
  18282. },
  18283. "Event.tui.command.execute": {
  18284. "type": "object",
  18285. "properties": {
  18286. "id": {
  18287. "type": "string"
  18288. },
  18289. "type": {
  18290. "type": "string",
  18291. "enum": ["tui.command.execute"]
  18292. },
  18293. "properties": {
  18294. "type": "object",
  18295. "properties": {
  18296. "command": {
  18297. "anyOf": [
  18298. {
  18299. "type": "string",
  18300. "enum": [
  18301. "session.list",
  18302. "session.new",
  18303. "session.share",
  18304. "session.interrupt",
  18305. "session.compact",
  18306. "session.page.up",
  18307. "session.page.down",
  18308. "session.line.up",
  18309. "session.line.down",
  18310. "session.half.page.up",
  18311. "session.half.page.down",
  18312. "session.first",
  18313. "session.last",
  18314. "prompt.clear",
  18315. "prompt.submit",
  18316. "agent.cycle"
  18317. ]
  18318. },
  18319. {
  18320. "type": "string"
  18321. }
  18322. ]
  18323. }
  18324. },
  18325. "required": ["command"],
  18326. "additionalProperties": false
  18327. }
  18328. },
  18329. "required": ["id", "type", "properties"],
  18330. "additionalProperties": false
  18331. },
  18332. "Event.tui.toast.show": {
  18333. "type": "object",
  18334. "properties": {
  18335. "id": {
  18336. "type": "string"
  18337. },
  18338. "type": {
  18339. "type": "string",
  18340. "enum": ["tui.toast.show"]
  18341. },
  18342. "properties": {
  18343. "type": "object",
  18344. "properties": {
  18345. "title": {
  18346. "type": "string"
  18347. },
  18348. "message": {
  18349. "type": "string"
  18350. },
  18351. "variant": {
  18352. "type": "string",
  18353. "enum": ["info", "success", "warning", "error"]
  18354. },
  18355. "duration": {
  18356. "type": "integer",
  18357. "exclusiveMinimum": 0
  18358. }
  18359. },
  18360. "required": ["message", "variant"],
  18361. "additionalProperties": false
  18362. }
  18363. },
  18364. "required": ["id", "type", "properties"],
  18365. "additionalProperties": false
  18366. },
  18367. "Event.tui.session.select": {
  18368. "type": "object",
  18369. "properties": {
  18370. "id": {
  18371. "type": "string"
  18372. },
  18373. "type": {
  18374. "type": "string",
  18375. "enum": ["tui.session.select"]
  18376. },
  18377. "properties": {
  18378. "type": "object",
  18379. "properties": {
  18380. "sessionID": {
  18381. "type": "string",
  18382. "pattern": "^ses",
  18383. "description": "Session ID to navigate to"
  18384. }
  18385. },
  18386. "required": ["sessionID"],
  18387. "additionalProperties": false
  18388. }
  18389. },
  18390. "required": ["id", "type", "properties"],
  18391. "additionalProperties": false
  18392. },
  18393. "ModelV2Info": {
  18394. "type": "object",
  18395. "properties": {
  18396. "id": {
  18397. "type": "string"
  18398. },
  18399. "apiID": {
  18400. "type": "string"
  18401. },
  18402. "providerID": {
  18403. "type": "string"
  18404. },
  18405. "family": {
  18406. "type": "string"
  18407. },
  18408. "name": {
  18409. "type": "string"
  18410. },
  18411. "endpoint": {
  18412. "anyOf": [
  18413. {
  18414. "type": "object",
  18415. "properties": {
  18416. "type": {
  18417. "type": "string",
  18418. "enum": ["unknown"]
  18419. }
  18420. },
  18421. "required": ["type"],
  18422. "additionalProperties": false
  18423. },
  18424. {
  18425. "type": "object",
  18426. "properties": {
  18427. "type": {
  18428. "type": "string",
  18429. "enum": ["openai/responses"]
  18430. },
  18431. "url": {
  18432. "type": "string"
  18433. },
  18434. "websocket": {
  18435. "type": "boolean"
  18436. }
  18437. },
  18438. "required": ["type", "url"],
  18439. "additionalProperties": false
  18440. },
  18441. {
  18442. "type": "object",
  18443. "properties": {
  18444. "type": {
  18445. "type": "string",
  18446. "enum": ["openai/completions"]
  18447. },
  18448. "url": {
  18449. "type": "string"
  18450. },
  18451. "reasoning": {
  18452. "anyOf": [
  18453. {
  18454. "type": "object",
  18455. "properties": {
  18456. "type": {
  18457. "type": "string",
  18458. "enum": ["reasoning_content"]
  18459. }
  18460. },
  18461. "required": ["type"],
  18462. "additionalProperties": false
  18463. },
  18464. {
  18465. "type": "object",
  18466. "properties": {
  18467. "type": {
  18468. "type": "string",
  18469. "enum": ["reasoning_details"]
  18470. }
  18471. },
  18472. "required": ["type"],
  18473. "additionalProperties": false
  18474. }
  18475. ]
  18476. }
  18477. },
  18478. "required": ["type", "url"],
  18479. "additionalProperties": false
  18480. },
  18481. {
  18482. "type": "object",
  18483. "properties": {
  18484. "type": {
  18485. "type": "string",
  18486. "enum": ["anthropic/messages"]
  18487. },
  18488. "url": {
  18489. "type": "string"
  18490. }
  18491. },
  18492. "required": ["type", "url"],
  18493. "additionalProperties": false
  18494. },
  18495. {
  18496. "type": "object",
  18497. "properties": {
  18498. "type": {
  18499. "type": "string",
  18500. "enum": ["aisdk"]
  18501. },
  18502. "package": {
  18503. "type": "string"
  18504. },
  18505. "url": {
  18506. "type": "string"
  18507. }
  18508. },
  18509. "required": ["type", "package"],
  18510. "additionalProperties": false
  18511. }
  18512. ]
  18513. },
  18514. "capabilities": {
  18515. "type": "object",
  18516. "properties": {
  18517. "tools": {
  18518. "type": "boolean"
  18519. },
  18520. "input": {
  18521. "type": "array",
  18522. "items": {
  18523. "type": "string"
  18524. }
  18525. },
  18526. "output": {
  18527. "type": "array",
  18528. "items": {
  18529. "type": "string"
  18530. }
  18531. }
  18532. },
  18533. "required": ["tools", "input", "output"],
  18534. "additionalProperties": false
  18535. },
  18536. "options": {
  18537. "type": "object",
  18538. "properties": {
  18539. "headers": {
  18540. "type": "object",
  18541. "additionalProperties": {
  18542. "type": "string"
  18543. }
  18544. },
  18545. "body": {
  18546. "type": "object"
  18547. },
  18548. "aisdk": {
  18549. "type": "object",
  18550. "properties": {
  18551. "provider": {
  18552. "type": "object"
  18553. },
  18554. "request": {
  18555. "type": "object"
  18556. }
  18557. },
  18558. "required": ["provider", "request"],
  18559. "additionalProperties": false
  18560. },
  18561. "variant": {
  18562. "type": "string"
  18563. }
  18564. },
  18565. "required": ["headers", "body", "aisdk"],
  18566. "additionalProperties": false
  18567. },
  18568. "variants": {
  18569. "type": "array",
  18570. "items": {
  18571. "type": "object",
  18572. "properties": {
  18573. "id": {
  18574. "type": "string"
  18575. },
  18576. "headers": {
  18577. "type": "object",
  18578. "additionalProperties": {
  18579. "type": "string"
  18580. }
  18581. },
  18582. "body": {
  18583. "type": "object"
  18584. },
  18585. "aisdk": {
  18586. "type": "object",
  18587. "properties": {
  18588. "provider": {
  18589. "type": "object"
  18590. },
  18591. "request": {
  18592. "type": "object"
  18593. }
  18594. },
  18595. "required": ["provider", "request"],
  18596. "additionalProperties": false
  18597. }
  18598. },
  18599. "required": ["id", "headers", "body", "aisdk"],
  18600. "additionalProperties": false
  18601. }
  18602. },
  18603. "time": {
  18604. "type": "object",
  18605. "properties": {
  18606. "released": {
  18607. "anyOf": [
  18608. {
  18609. "type": "number"
  18610. },
  18611. {
  18612. "type": "string",
  18613. "enum": ["NaN"]
  18614. },
  18615. {
  18616. "type": "string",
  18617. "enum": ["Infinity"]
  18618. },
  18619. {
  18620. "type": "string",
  18621. "enum": ["-Infinity"]
  18622. },
  18623. {
  18624. "type": "string",
  18625. "enum": ["Infinity", "-Infinity", "NaN"]
  18626. }
  18627. ]
  18628. }
  18629. },
  18630. "required": ["released"],
  18631. "additionalProperties": false
  18632. },
  18633. "cost": {
  18634. "type": "array",
  18635. "items": {
  18636. "type": "object",
  18637. "properties": {
  18638. "tier": {
  18639. "type": "object",
  18640. "properties": {
  18641. "type": {
  18642. "type": "string",
  18643. "enum": ["context"]
  18644. },
  18645. "size": {
  18646. "type": "integer"
  18647. }
  18648. },
  18649. "required": ["type", "size"],
  18650. "additionalProperties": false
  18651. },
  18652. "input": {
  18653. "type": "number"
  18654. },
  18655. "output": {
  18656. "type": "number"
  18657. },
  18658. "cache": {
  18659. "type": "object",
  18660. "properties": {
  18661. "read": {
  18662. "type": "number"
  18663. },
  18664. "write": {
  18665. "type": "number"
  18666. }
  18667. },
  18668. "required": ["read", "write"],
  18669. "additionalProperties": false
  18670. }
  18671. },
  18672. "required": ["input", "output", "cache"],
  18673. "additionalProperties": false
  18674. }
  18675. },
  18676. "status": {
  18677. "type": "string",
  18678. "enum": ["alpha", "beta", "deprecated", "active"]
  18679. },
  18680. "enabled": {
  18681. "type": "boolean"
  18682. },
  18683. "limit": {
  18684. "type": "object",
  18685. "properties": {
  18686. "context": {
  18687. "type": "integer"
  18688. },
  18689. "input": {
  18690. "type": "integer"
  18691. },
  18692. "output": {
  18693. "type": "integer"
  18694. }
  18695. },
  18696. "required": ["context", "output"],
  18697. "additionalProperties": false
  18698. }
  18699. },
  18700. "required": [
  18701. "id",
  18702. "apiID",
  18703. "providerID",
  18704. "name",
  18705. "endpoint",
  18706. "capabilities",
  18707. "options",
  18708. "variants",
  18709. "time",
  18710. "cost",
  18711. "status",
  18712. "enabled",
  18713. "limit"
  18714. ],
  18715. "additionalProperties": false
  18716. },
  18717. "PromptSource": {
  18718. "type": "object",
  18719. "properties": {
  18720. "start": {
  18721. "type": "number"
  18722. },
  18723. "end": {
  18724. "type": "number"
  18725. },
  18726. "text": {
  18727. "type": "string"
  18728. }
  18729. },
  18730. "required": ["start", "end", "text"],
  18731. "additionalProperties": false
  18732. },
  18733. "PromptFileAttachment": {
  18734. "type": "object",
  18735. "properties": {
  18736. "uri": {
  18737. "type": "string"
  18738. },
  18739. "mime": {
  18740. "type": "string"
  18741. },
  18742. "name": {
  18743. "type": "string"
  18744. },
  18745. "description": {
  18746. "type": "string"
  18747. },
  18748. "source": {
  18749. "$ref": "#/components/schemas/PromptSource"
  18750. }
  18751. },
  18752. "required": ["uri", "mime"],
  18753. "additionalProperties": false
  18754. },
  18755. "PromptAgentAttachment": {
  18756. "type": "object",
  18757. "properties": {
  18758. "name": {
  18759. "type": "string"
  18760. },
  18761. "source": {
  18762. "$ref": "#/components/schemas/PromptSource"
  18763. }
  18764. },
  18765. "required": ["name"],
  18766. "additionalProperties": false
  18767. },
  18768. "PromptReferenceAttachment": {
  18769. "type": "object",
  18770. "properties": {
  18771. "name": {
  18772. "type": "string"
  18773. },
  18774. "kind": {
  18775. "type": "string",
  18776. "enum": ["local", "git", "invalid"]
  18777. },
  18778. "uri": {
  18779. "type": "string"
  18780. },
  18781. "repository": {
  18782. "type": "string"
  18783. },
  18784. "branch": {
  18785. "type": "string"
  18786. },
  18787. "target": {
  18788. "type": "string"
  18789. },
  18790. "targetUri": {
  18791. "type": "string"
  18792. },
  18793. "problem": {
  18794. "type": "string"
  18795. },
  18796. "source": {
  18797. "$ref": "#/components/schemas/PromptSource"
  18798. }
  18799. },
  18800. "required": ["name", "kind"],
  18801. "additionalProperties": false
  18802. },
  18803. "SessionErrorUnknown": {
  18804. "type": "object",
  18805. "properties": {
  18806. "type": {
  18807. "type": "string",
  18808. "enum": ["unknown"]
  18809. },
  18810. "message": {
  18811. "type": "string"
  18812. }
  18813. },
  18814. "required": ["type", "message"],
  18815. "additionalProperties": false
  18816. },
  18817. "ToolTextContent": {
  18818. "type": "object",
  18819. "properties": {
  18820. "type": {
  18821. "type": "string",
  18822. "enum": ["text"]
  18823. },
  18824. "text": {
  18825. "type": "string"
  18826. }
  18827. },
  18828. "required": ["type", "text"],
  18829. "additionalProperties": false
  18830. },
  18831. "ToolFileContent": {
  18832. "type": "object",
  18833. "properties": {
  18834. "type": {
  18835. "type": "string",
  18836. "enum": ["file"]
  18837. },
  18838. "uri": {
  18839. "type": "string"
  18840. },
  18841. "mime": {
  18842. "type": "string"
  18843. },
  18844. "name": {
  18845. "type": "string"
  18846. }
  18847. },
  18848. "required": ["type", "uri", "mime"],
  18849. "additionalProperties": false
  18850. },
  18851. "SessionNextRetry_error": {
  18852. "type": "object",
  18853. "properties": {
  18854. "message": {
  18855. "type": "string"
  18856. },
  18857. "statusCode": {
  18858. "type": "number"
  18859. },
  18860. "isRetryable": {
  18861. "type": "boolean"
  18862. },
  18863. "responseHeaders": {
  18864. "type": "object",
  18865. "additionalProperties": {
  18866. "type": "string"
  18867. }
  18868. },
  18869. "responseBody": {
  18870. "type": "string"
  18871. },
  18872. "metadata": {
  18873. "type": "object",
  18874. "additionalProperties": {
  18875. "type": "string"
  18876. }
  18877. }
  18878. },
  18879. "required": ["message", "isRetryable"],
  18880. "additionalProperties": false
  18881. },
  18882. "AuthOAuthCredential": {
  18883. "type": "object",
  18884. "properties": {
  18885. "type": {
  18886. "type": "string",
  18887. "enum": ["oauth"]
  18888. },
  18889. "refresh": {
  18890. "type": "string"
  18891. },
  18892. "access": {
  18893. "type": "string"
  18894. },
  18895. "expires": {
  18896. "type": "integer",
  18897. "minimum": 0
  18898. }
  18899. },
  18900. "required": ["type", "refresh", "access", "expires"],
  18901. "additionalProperties": false
  18902. },
  18903. "AuthApiKeyCredential": {
  18904. "type": "object",
  18905. "properties": {
  18906. "type": {
  18907. "type": "string",
  18908. "enum": ["api"]
  18909. },
  18910. "key": {
  18911. "type": "string"
  18912. },
  18913. "metadata": {
  18914. "type": "object",
  18915. "additionalProperties": {
  18916. "type": "string"
  18917. }
  18918. }
  18919. },
  18920. "required": ["type", "key"],
  18921. "additionalProperties": false
  18922. },
  18923. "AuthCredential": {
  18924. "anyOf": [
  18925. {
  18926. "$ref": "#/components/schemas/AuthOAuthCredential"
  18927. },
  18928. {
  18929. "$ref": "#/components/schemas/AuthApiKeyCredential"
  18930. }
  18931. ]
  18932. },
  18933. "AuthInfo": {
  18934. "type": "object",
  18935. "properties": {
  18936. "id": {
  18937. "type": "string"
  18938. },
  18939. "serviceID": {
  18940. "type": "string"
  18941. },
  18942. "description": {
  18943. "type": "string"
  18944. },
  18945. "credential": {
  18946. "$ref": "#/components/schemas/AuthCredential"
  18947. }
  18948. },
  18949. "required": ["id", "serviceID", "description", "credential"],
  18950. "additionalProperties": false
  18951. },
  18952. "EventServerInstanceDisposed": {
  18953. "type": "object",
  18954. "properties": {
  18955. "id": {
  18956. "type": "string"
  18957. },
  18958. "type": {
  18959. "type": "string",
  18960. "enum": ["server.instance.disposed"]
  18961. },
  18962. "properties": {
  18963. "type": "object",
  18964. "properties": {
  18965. "directory": {
  18966. "type": "string"
  18967. }
  18968. },
  18969. "required": ["directory"],
  18970. "additionalProperties": false
  18971. }
  18972. },
  18973. "required": ["id", "type", "properties"],
  18974. "additionalProperties": false
  18975. },
  18976. "SyncEventSessionNextAgentSwitched": {
  18977. "type": "object",
  18978. "properties": {
  18979. "type": {
  18980. "type": "string",
  18981. "enum": ["sync"]
  18982. },
  18983. "name": {
  18984. "type": "string",
  18985. "enum": ["session.next.agent.switched.1"]
  18986. },
  18987. "id": {
  18988. "type": "string"
  18989. },
  18990. "seq": {
  18991. "type": "number"
  18992. },
  18993. "aggregateID": {
  18994. "type": "string",
  18995. "enum": ["sessionID"]
  18996. },
  18997. "data": {
  18998. "type": "object",
  18999. "properties": {
  19000. "timestamp": {
  19001. "type": "number"
  19002. },
  19003. "sessionID": {
  19004. "type": "string",
  19005. "pattern": "^ses"
  19006. },
  19007. "agent": {
  19008. "type": "string"
  19009. }
  19010. },
  19011. "required": ["timestamp", "sessionID", "agent"],
  19012. "additionalProperties": false
  19013. }
  19014. },
  19015. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19016. "additionalProperties": false
  19017. },
  19018. "SyncEventSessionNextModelSwitched": {
  19019. "type": "object",
  19020. "properties": {
  19021. "type": {
  19022. "type": "string",
  19023. "enum": ["sync"]
  19024. },
  19025. "name": {
  19026. "type": "string",
  19027. "enum": ["session.next.model.switched.1"]
  19028. },
  19029. "id": {
  19030. "type": "string"
  19031. },
  19032. "seq": {
  19033. "type": "number"
  19034. },
  19035. "aggregateID": {
  19036. "type": "string",
  19037. "enum": ["sessionID"]
  19038. },
  19039. "data": {
  19040. "type": "object",
  19041. "properties": {
  19042. "timestamp": {
  19043. "type": "number"
  19044. },
  19045. "sessionID": {
  19046. "type": "string",
  19047. "pattern": "^ses"
  19048. },
  19049. "model": {
  19050. "type": "object",
  19051. "properties": {
  19052. "id": {
  19053. "type": "string"
  19054. },
  19055. "providerID": {
  19056. "type": "string"
  19057. },
  19058. "variant": {
  19059. "type": "string"
  19060. }
  19061. },
  19062. "required": ["id", "providerID"],
  19063. "additionalProperties": false
  19064. }
  19065. },
  19066. "required": ["timestamp", "sessionID", "model"],
  19067. "additionalProperties": false
  19068. }
  19069. },
  19070. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19071. "additionalProperties": false
  19072. },
  19073. "SyncEventSessionNextPrompted": {
  19074. "type": "object",
  19075. "properties": {
  19076. "type": {
  19077. "type": "string",
  19078. "enum": ["sync"]
  19079. },
  19080. "name": {
  19081. "type": "string",
  19082. "enum": ["session.next.prompted.1"]
  19083. },
  19084. "id": {
  19085. "type": "string"
  19086. },
  19087. "seq": {
  19088. "type": "number"
  19089. },
  19090. "aggregateID": {
  19091. "type": "string",
  19092. "enum": ["sessionID"]
  19093. },
  19094. "data": {
  19095. "type": "object",
  19096. "properties": {
  19097. "timestamp": {
  19098. "type": "number"
  19099. },
  19100. "sessionID": {
  19101. "type": "string",
  19102. "pattern": "^ses"
  19103. },
  19104. "prompt": {
  19105. "$ref": "#/components/schemas/Prompt"
  19106. }
  19107. },
  19108. "required": ["timestamp", "sessionID", "prompt"],
  19109. "additionalProperties": false
  19110. }
  19111. },
  19112. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19113. "additionalProperties": false
  19114. },
  19115. "SyncEventSessionNextSynthetic": {
  19116. "type": "object",
  19117. "properties": {
  19118. "type": {
  19119. "type": "string",
  19120. "enum": ["sync"]
  19121. },
  19122. "name": {
  19123. "type": "string",
  19124. "enum": ["session.next.synthetic.1"]
  19125. },
  19126. "id": {
  19127. "type": "string"
  19128. },
  19129. "seq": {
  19130. "type": "number"
  19131. },
  19132. "aggregateID": {
  19133. "type": "string",
  19134. "enum": ["sessionID"]
  19135. },
  19136. "data": {
  19137. "type": "object",
  19138. "properties": {
  19139. "timestamp": {
  19140. "type": "number"
  19141. },
  19142. "sessionID": {
  19143. "type": "string",
  19144. "pattern": "^ses"
  19145. },
  19146. "text": {
  19147. "type": "string"
  19148. }
  19149. },
  19150. "required": ["timestamp", "sessionID", "text"],
  19151. "additionalProperties": false
  19152. }
  19153. },
  19154. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19155. "additionalProperties": false
  19156. },
  19157. "SyncEventSessionNextShellStarted": {
  19158. "type": "object",
  19159. "properties": {
  19160. "type": {
  19161. "type": "string",
  19162. "enum": ["sync"]
  19163. },
  19164. "name": {
  19165. "type": "string",
  19166. "enum": ["session.next.shell.started.1"]
  19167. },
  19168. "id": {
  19169. "type": "string"
  19170. },
  19171. "seq": {
  19172. "type": "number"
  19173. },
  19174. "aggregateID": {
  19175. "type": "string",
  19176. "enum": ["sessionID"]
  19177. },
  19178. "data": {
  19179. "type": "object",
  19180. "properties": {
  19181. "timestamp": {
  19182. "type": "number"
  19183. },
  19184. "sessionID": {
  19185. "type": "string",
  19186. "pattern": "^ses"
  19187. },
  19188. "callID": {
  19189. "type": "string"
  19190. },
  19191. "command": {
  19192. "type": "string"
  19193. }
  19194. },
  19195. "required": ["timestamp", "sessionID", "callID", "command"],
  19196. "additionalProperties": false
  19197. }
  19198. },
  19199. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19200. "additionalProperties": false
  19201. },
  19202. "SyncEventSessionNextShellEnded": {
  19203. "type": "object",
  19204. "properties": {
  19205. "type": {
  19206. "type": "string",
  19207. "enum": ["sync"]
  19208. },
  19209. "name": {
  19210. "type": "string",
  19211. "enum": ["session.next.shell.ended.1"]
  19212. },
  19213. "id": {
  19214. "type": "string"
  19215. },
  19216. "seq": {
  19217. "type": "number"
  19218. },
  19219. "aggregateID": {
  19220. "type": "string",
  19221. "enum": ["sessionID"]
  19222. },
  19223. "data": {
  19224. "type": "object",
  19225. "properties": {
  19226. "timestamp": {
  19227. "type": "number"
  19228. },
  19229. "sessionID": {
  19230. "type": "string",
  19231. "pattern": "^ses"
  19232. },
  19233. "callID": {
  19234. "type": "string"
  19235. },
  19236. "output": {
  19237. "type": "string"
  19238. }
  19239. },
  19240. "required": ["timestamp", "sessionID", "callID", "output"],
  19241. "additionalProperties": false
  19242. }
  19243. },
  19244. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19245. "additionalProperties": false
  19246. },
  19247. "SyncEventSessionNextStepStarted": {
  19248. "type": "object",
  19249. "properties": {
  19250. "type": {
  19251. "type": "string",
  19252. "enum": ["sync"]
  19253. },
  19254. "name": {
  19255. "type": "string",
  19256. "enum": ["session.next.step.started.1"]
  19257. },
  19258. "id": {
  19259. "type": "string"
  19260. },
  19261. "seq": {
  19262. "type": "number"
  19263. },
  19264. "aggregateID": {
  19265. "type": "string",
  19266. "enum": ["sessionID"]
  19267. },
  19268. "data": {
  19269. "type": "object",
  19270. "properties": {
  19271. "timestamp": {
  19272. "type": "number"
  19273. },
  19274. "sessionID": {
  19275. "type": "string",
  19276. "pattern": "^ses"
  19277. },
  19278. "agent": {
  19279. "type": "string"
  19280. },
  19281. "model": {
  19282. "type": "object",
  19283. "properties": {
  19284. "id": {
  19285. "type": "string"
  19286. },
  19287. "providerID": {
  19288. "type": "string"
  19289. },
  19290. "variant": {
  19291. "type": "string"
  19292. }
  19293. },
  19294. "required": ["id", "providerID"],
  19295. "additionalProperties": false
  19296. },
  19297. "snapshot": {
  19298. "type": "string"
  19299. }
  19300. },
  19301. "required": ["timestamp", "sessionID", "agent", "model"],
  19302. "additionalProperties": false
  19303. }
  19304. },
  19305. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19306. "additionalProperties": false
  19307. },
  19308. "SyncEventSessionNextStepEnded": {
  19309. "type": "object",
  19310. "properties": {
  19311. "type": {
  19312. "type": "string",
  19313. "enum": ["sync"]
  19314. },
  19315. "name": {
  19316. "type": "string",
  19317. "enum": ["session.next.step.ended.1"]
  19318. },
  19319. "id": {
  19320. "type": "string"
  19321. },
  19322. "seq": {
  19323. "type": "number"
  19324. },
  19325. "aggregateID": {
  19326. "type": "string",
  19327. "enum": ["sessionID"]
  19328. },
  19329. "data": {
  19330. "type": "object",
  19331. "properties": {
  19332. "timestamp": {
  19333. "type": "number"
  19334. },
  19335. "sessionID": {
  19336. "type": "string",
  19337. "pattern": "^ses"
  19338. },
  19339. "finish": {
  19340. "type": "string"
  19341. },
  19342. "cost": {
  19343. "type": "number"
  19344. },
  19345. "tokens": {
  19346. "type": "object",
  19347. "properties": {
  19348. "input": {
  19349. "type": "number"
  19350. },
  19351. "output": {
  19352. "type": "number"
  19353. },
  19354. "reasoning": {
  19355. "type": "number"
  19356. },
  19357. "cache": {
  19358. "type": "object",
  19359. "properties": {
  19360. "read": {
  19361. "type": "number"
  19362. },
  19363. "write": {
  19364. "type": "number"
  19365. }
  19366. },
  19367. "required": ["read", "write"],
  19368. "additionalProperties": false
  19369. }
  19370. },
  19371. "required": ["input", "output", "reasoning", "cache"],
  19372. "additionalProperties": false
  19373. },
  19374. "snapshot": {
  19375. "type": "string"
  19376. }
  19377. },
  19378. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19379. "additionalProperties": false
  19380. }
  19381. },
  19382. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19383. "additionalProperties": false
  19384. },
  19385. "SyncEventSessionNextStepFailed": {
  19386. "type": "object",
  19387. "properties": {
  19388. "type": {
  19389. "type": "string",
  19390. "enum": ["sync"]
  19391. },
  19392. "name": {
  19393. "type": "string",
  19394. "enum": ["session.next.step.failed.1"]
  19395. },
  19396. "id": {
  19397. "type": "string"
  19398. },
  19399. "seq": {
  19400. "type": "number"
  19401. },
  19402. "aggregateID": {
  19403. "type": "string",
  19404. "enum": ["sessionID"]
  19405. },
  19406. "data": {
  19407. "type": "object",
  19408. "properties": {
  19409. "timestamp": {
  19410. "type": "number"
  19411. },
  19412. "sessionID": {
  19413. "type": "string",
  19414. "pattern": "^ses"
  19415. },
  19416. "error": {
  19417. "$ref": "#/components/schemas/SessionErrorUnknown"
  19418. }
  19419. },
  19420. "required": ["timestamp", "sessionID", "error"],
  19421. "additionalProperties": false
  19422. }
  19423. },
  19424. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19425. "additionalProperties": false
  19426. },
  19427. "SyncEventSessionNextTextStarted": {
  19428. "type": "object",
  19429. "properties": {
  19430. "type": {
  19431. "type": "string",
  19432. "enum": ["sync"]
  19433. },
  19434. "name": {
  19435. "type": "string",
  19436. "enum": ["session.next.text.started.1"]
  19437. },
  19438. "id": {
  19439. "type": "string"
  19440. },
  19441. "seq": {
  19442. "type": "number"
  19443. },
  19444. "aggregateID": {
  19445. "type": "string",
  19446. "enum": ["sessionID"]
  19447. },
  19448. "data": {
  19449. "type": "object",
  19450. "properties": {
  19451. "timestamp": {
  19452. "type": "number"
  19453. },
  19454. "sessionID": {
  19455. "type": "string",
  19456. "pattern": "^ses"
  19457. }
  19458. },
  19459. "required": ["timestamp", "sessionID"],
  19460. "additionalProperties": false
  19461. }
  19462. },
  19463. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19464. "additionalProperties": false
  19465. },
  19466. "SyncEventSessionNextTextDelta": {
  19467. "type": "object",
  19468. "properties": {
  19469. "type": {
  19470. "type": "string",
  19471. "enum": ["sync"]
  19472. },
  19473. "name": {
  19474. "type": "string",
  19475. "enum": ["session.next.text.delta.1"]
  19476. },
  19477. "id": {
  19478. "type": "string"
  19479. },
  19480. "seq": {
  19481. "type": "number"
  19482. },
  19483. "aggregateID": {
  19484. "type": "string",
  19485. "enum": ["sessionID"]
  19486. },
  19487. "data": {
  19488. "type": "object",
  19489. "properties": {
  19490. "timestamp": {
  19491. "type": "number"
  19492. },
  19493. "sessionID": {
  19494. "type": "string",
  19495. "pattern": "^ses"
  19496. },
  19497. "delta": {
  19498. "type": "string"
  19499. }
  19500. },
  19501. "required": ["timestamp", "sessionID", "delta"],
  19502. "additionalProperties": false
  19503. }
  19504. },
  19505. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19506. "additionalProperties": false
  19507. },
  19508. "SyncEventSessionNextTextEnded": {
  19509. "type": "object",
  19510. "properties": {
  19511. "type": {
  19512. "type": "string",
  19513. "enum": ["sync"]
  19514. },
  19515. "name": {
  19516. "type": "string",
  19517. "enum": ["session.next.text.ended.1"]
  19518. },
  19519. "id": {
  19520. "type": "string"
  19521. },
  19522. "seq": {
  19523. "type": "number"
  19524. },
  19525. "aggregateID": {
  19526. "type": "string",
  19527. "enum": ["sessionID"]
  19528. },
  19529. "data": {
  19530. "type": "object",
  19531. "properties": {
  19532. "timestamp": {
  19533. "type": "number"
  19534. },
  19535. "sessionID": {
  19536. "type": "string",
  19537. "pattern": "^ses"
  19538. },
  19539. "text": {
  19540. "type": "string"
  19541. }
  19542. },
  19543. "required": ["timestamp", "sessionID", "text"],
  19544. "additionalProperties": false
  19545. }
  19546. },
  19547. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19548. "additionalProperties": false
  19549. },
  19550. "SyncEventSessionNextReasoningStarted": {
  19551. "type": "object",
  19552. "properties": {
  19553. "type": {
  19554. "type": "string",
  19555. "enum": ["sync"]
  19556. },
  19557. "name": {
  19558. "type": "string",
  19559. "enum": ["session.next.reasoning.started.1"]
  19560. },
  19561. "id": {
  19562. "type": "string"
  19563. },
  19564. "seq": {
  19565. "type": "number"
  19566. },
  19567. "aggregateID": {
  19568. "type": "string",
  19569. "enum": ["sessionID"]
  19570. },
  19571. "data": {
  19572. "type": "object",
  19573. "properties": {
  19574. "timestamp": {
  19575. "type": "number"
  19576. },
  19577. "sessionID": {
  19578. "type": "string",
  19579. "pattern": "^ses"
  19580. },
  19581. "reasoningID": {
  19582. "type": "string"
  19583. }
  19584. },
  19585. "required": ["timestamp", "sessionID", "reasoningID"],
  19586. "additionalProperties": false
  19587. }
  19588. },
  19589. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19590. "additionalProperties": false
  19591. },
  19592. "SyncEventSessionNextReasoningDelta": {
  19593. "type": "object",
  19594. "properties": {
  19595. "type": {
  19596. "type": "string",
  19597. "enum": ["sync"]
  19598. },
  19599. "name": {
  19600. "type": "string",
  19601. "enum": ["session.next.reasoning.delta.1"]
  19602. },
  19603. "id": {
  19604. "type": "string"
  19605. },
  19606. "seq": {
  19607. "type": "number"
  19608. },
  19609. "aggregateID": {
  19610. "type": "string",
  19611. "enum": ["sessionID"]
  19612. },
  19613. "data": {
  19614. "type": "object",
  19615. "properties": {
  19616. "timestamp": {
  19617. "type": "number"
  19618. },
  19619. "sessionID": {
  19620. "type": "string",
  19621. "pattern": "^ses"
  19622. },
  19623. "reasoningID": {
  19624. "type": "string"
  19625. },
  19626. "delta": {
  19627. "type": "string"
  19628. }
  19629. },
  19630. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  19631. "additionalProperties": false
  19632. }
  19633. },
  19634. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19635. "additionalProperties": false
  19636. },
  19637. "SyncEventSessionNextReasoningEnded": {
  19638. "type": "object",
  19639. "properties": {
  19640. "type": {
  19641. "type": "string",
  19642. "enum": ["sync"]
  19643. },
  19644. "name": {
  19645. "type": "string",
  19646. "enum": ["session.next.reasoning.ended.1"]
  19647. },
  19648. "id": {
  19649. "type": "string"
  19650. },
  19651. "seq": {
  19652. "type": "number"
  19653. },
  19654. "aggregateID": {
  19655. "type": "string",
  19656. "enum": ["sessionID"]
  19657. },
  19658. "data": {
  19659. "type": "object",
  19660. "properties": {
  19661. "timestamp": {
  19662. "type": "number"
  19663. },
  19664. "sessionID": {
  19665. "type": "string",
  19666. "pattern": "^ses"
  19667. },
  19668. "reasoningID": {
  19669. "type": "string"
  19670. },
  19671. "text": {
  19672. "type": "string"
  19673. }
  19674. },
  19675. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  19676. "additionalProperties": false
  19677. }
  19678. },
  19679. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19680. "additionalProperties": false
  19681. },
  19682. "SyncEventSessionNextToolInputStarted": {
  19683. "type": "object",
  19684. "properties": {
  19685. "type": {
  19686. "type": "string",
  19687. "enum": ["sync"]
  19688. },
  19689. "name": {
  19690. "type": "string",
  19691. "enum": ["session.next.tool.input.started.1"]
  19692. },
  19693. "id": {
  19694. "type": "string"
  19695. },
  19696. "seq": {
  19697. "type": "number"
  19698. },
  19699. "aggregateID": {
  19700. "type": "string",
  19701. "enum": ["sessionID"]
  19702. },
  19703. "data": {
  19704. "type": "object",
  19705. "properties": {
  19706. "timestamp": {
  19707. "type": "number"
  19708. },
  19709. "sessionID": {
  19710. "type": "string",
  19711. "pattern": "^ses"
  19712. },
  19713. "callID": {
  19714. "type": "string"
  19715. },
  19716. "name": {
  19717. "type": "string"
  19718. }
  19719. },
  19720. "required": ["timestamp", "sessionID", "callID", "name"],
  19721. "additionalProperties": false
  19722. }
  19723. },
  19724. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19725. "additionalProperties": false
  19726. },
  19727. "SyncEventSessionNextToolInputDelta": {
  19728. "type": "object",
  19729. "properties": {
  19730. "type": {
  19731. "type": "string",
  19732. "enum": ["sync"]
  19733. },
  19734. "name": {
  19735. "type": "string",
  19736. "enum": ["session.next.tool.input.delta.1"]
  19737. },
  19738. "id": {
  19739. "type": "string"
  19740. },
  19741. "seq": {
  19742. "type": "number"
  19743. },
  19744. "aggregateID": {
  19745. "type": "string",
  19746. "enum": ["sessionID"]
  19747. },
  19748. "data": {
  19749. "type": "object",
  19750. "properties": {
  19751. "timestamp": {
  19752. "type": "number"
  19753. },
  19754. "sessionID": {
  19755. "type": "string",
  19756. "pattern": "^ses"
  19757. },
  19758. "callID": {
  19759. "type": "string"
  19760. },
  19761. "delta": {
  19762. "type": "string"
  19763. }
  19764. },
  19765. "required": ["timestamp", "sessionID", "callID", "delta"],
  19766. "additionalProperties": false
  19767. }
  19768. },
  19769. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19770. "additionalProperties": false
  19771. },
  19772. "SyncEventSessionNextToolInputEnded": {
  19773. "type": "object",
  19774. "properties": {
  19775. "type": {
  19776. "type": "string",
  19777. "enum": ["sync"]
  19778. },
  19779. "name": {
  19780. "type": "string",
  19781. "enum": ["session.next.tool.input.ended.1"]
  19782. },
  19783. "id": {
  19784. "type": "string"
  19785. },
  19786. "seq": {
  19787. "type": "number"
  19788. },
  19789. "aggregateID": {
  19790. "type": "string",
  19791. "enum": ["sessionID"]
  19792. },
  19793. "data": {
  19794. "type": "object",
  19795. "properties": {
  19796. "timestamp": {
  19797. "type": "number"
  19798. },
  19799. "sessionID": {
  19800. "type": "string",
  19801. "pattern": "^ses"
  19802. },
  19803. "callID": {
  19804. "type": "string"
  19805. },
  19806. "text": {
  19807. "type": "string"
  19808. }
  19809. },
  19810. "required": ["timestamp", "sessionID", "callID", "text"],
  19811. "additionalProperties": false
  19812. }
  19813. },
  19814. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19815. "additionalProperties": false
  19816. },
  19817. "SyncEventSessionNextToolCalled": {
  19818. "type": "object",
  19819. "properties": {
  19820. "type": {
  19821. "type": "string",
  19822. "enum": ["sync"]
  19823. },
  19824. "name": {
  19825. "type": "string",
  19826. "enum": ["session.next.tool.called.1"]
  19827. },
  19828. "id": {
  19829. "type": "string"
  19830. },
  19831. "seq": {
  19832. "type": "number"
  19833. },
  19834. "aggregateID": {
  19835. "type": "string",
  19836. "enum": ["sessionID"]
  19837. },
  19838. "data": {
  19839. "type": "object",
  19840. "properties": {
  19841. "timestamp": {
  19842. "type": "number"
  19843. },
  19844. "sessionID": {
  19845. "type": "string",
  19846. "pattern": "^ses"
  19847. },
  19848. "callID": {
  19849. "type": "string"
  19850. },
  19851. "tool": {
  19852. "type": "string"
  19853. },
  19854. "input": {
  19855. "type": "object"
  19856. },
  19857. "provider": {
  19858. "type": "object",
  19859. "properties": {
  19860. "executed": {
  19861. "type": "boolean"
  19862. },
  19863. "metadata": {
  19864. "type": "object"
  19865. }
  19866. },
  19867. "required": ["executed"],
  19868. "additionalProperties": false
  19869. }
  19870. },
  19871. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  19872. "additionalProperties": false
  19873. }
  19874. },
  19875. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19876. "additionalProperties": false
  19877. },
  19878. "SyncEventSessionNextToolProgress": {
  19879. "type": "object",
  19880. "properties": {
  19881. "type": {
  19882. "type": "string",
  19883. "enum": ["sync"]
  19884. },
  19885. "name": {
  19886. "type": "string",
  19887. "enum": ["session.next.tool.progress.1"]
  19888. },
  19889. "id": {
  19890. "type": "string"
  19891. },
  19892. "seq": {
  19893. "type": "number"
  19894. },
  19895. "aggregateID": {
  19896. "type": "string",
  19897. "enum": ["sessionID"]
  19898. },
  19899. "data": {
  19900. "type": "object",
  19901. "properties": {
  19902. "timestamp": {
  19903. "type": "number"
  19904. },
  19905. "sessionID": {
  19906. "type": "string",
  19907. "pattern": "^ses"
  19908. },
  19909. "callID": {
  19910. "type": "string"
  19911. },
  19912. "structured": {
  19913. "type": "object"
  19914. },
  19915. "content": {
  19916. "type": "array",
  19917. "items": {
  19918. "anyOf": [
  19919. {
  19920. "$ref": "#/components/schemas/ToolTextContent"
  19921. },
  19922. {
  19923. "$ref": "#/components/schemas/ToolFileContent"
  19924. }
  19925. ]
  19926. }
  19927. }
  19928. },
  19929. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  19930. "additionalProperties": false
  19931. }
  19932. },
  19933. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19934. "additionalProperties": false
  19935. },
  19936. "SyncEventSessionNextToolSuccess": {
  19937. "type": "object",
  19938. "properties": {
  19939. "type": {
  19940. "type": "string",
  19941. "enum": ["sync"]
  19942. },
  19943. "name": {
  19944. "type": "string",
  19945. "enum": ["session.next.tool.success.1"]
  19946. },
  19947. "id": {
  19948. "type": "string"
  19949. },
  19950. "seq": {
  19951. "type": "number"
  19952. },
  19953. "aggregateID": {
  19954. "type": "string",
  19955. "enum": ["sessionID"]
  19956. },
  19957. "data": {
  19958. "type": "object",
  19959. "properties": {
  19960. "timestamp": {
  19961. "type": "number"
  19962. },
  19963. "sessionID": {
  19964. "type": "string",
  19965. "pattern": "^ses"
  19966. },
  19967. "callID": {
  19968. "type": "string"
  19969. },
  19970. "structured": {
  19971. "type": "object"
  19972. },
  19973. "content": {
  19974. "type": "array",
  19975. "items": {
  19976. "anyOf": [
  19977. {
  19978. "$ref": "#/components/schemas/ToolTextContent"
  19979. },
  19980. {
  19981. "$ref": "#/components/schemas/ToolFileContent"
  19982. }
  19983. ]
  19984. }
  19985. },
  19986. "provider": {
  19987. "type": "object",
  19988. "properties": {
  19989. "executed": {
  19990. "type": "boolean"
  19991. },
  19992. "metadata": {
  19993. "type": "object"
  19994. }
  19995. },
  19996. "required": ["executed"],
  19997. "additionalProperties": false
  19998. }
  19999. },
  20000. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  20001. "additionalProperties": false
  20002. }
  20003. },
  20004. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20005. "additionalProperties": false
  20006. },
  20007. "SyncEventSessionNextToolFailed": {
  20008. "type": "object",
  20009. "properties": {
  20010. "type": {
  20011. "type": "string",
  20012. "enum": ["sync"]
  20013. },
  20014. "name": {
  20015. "type": "string",
  20016. "enum": ["session.next.tool.failed.1"]
  20017. },
  20018. "id": {
  20019. "type": "string"
  20020. },
  20021. "seq": {
  20022. "type": "number"
  20023. },
  20024. "aggregateID": {
  20025. "type": "string",
  20026. "enum": ["sessionID"]
  20027. },
  20028. "data": {
  20029. "type": "object",
  20030. "properties": {
  20031. "timestamp": {
  20032. "type": "number"
  20033. },
  20034. "sessionID": {
  20035. "type": "string",
  20036. "pattern": "^ses"
  20037. },
  20038. "callID": {
  20039. "type": "string"
  20040. },
  20041. "error": {
  20042. "$ref": "#/components/schemas/SessionErrorUnknown"
  20043. },
  20044. "provider": {
  20045. "type": "object",
  20046. "properties": {
  20047. "executed": {
  20048. "type": "boolean"
  20049. },
  20050. "metadata": {
  20051. "type": "object"
  20052. }
  20053. },
  20054. "required": ["executed"],
  20055. "additionalProperties": false
  20056. }
  20057. },
  20058. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  20059. "additionalProperties": false
  20060. }
  20061. },
  20062. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20063. "additionalProperties": false
  20064. },
  20065. "SyncEventSessionNextRetried": {
  20066. "type": "object",
  20067. "properties": {
  20068. "type": {
  20069. "type": "string",
  20070. "enum": ["sync"]
  20071. },
  20072. "name": {
  20073. "type": "string",
  20074. "enum": ["session.next.retried.1"]
  20075. },
  20076. "id": {
  20077. "type": "string"
  20078. },
  20079. "seq": {
  20080. "type": "number"
  20081. },
  20082. "aggregateID": {
  20083. "type": "string",
  20084. "enum": ["sessionID"]
  20085. },
  20086. "data": {
  20087. "type": "object",
  20088. "properties": {
  20089. "timestamp": {
  20090. "type": "number"
  20091. },
  20092. "sessionID": {
  20093. "type": "string",
  20094. "pattern": "^ses"
  20095. },
  20096. "attempt": {
  20097. "type": "number"
  20098. },
  20099. "error": {
  20100. "$ref": "#/components/schemas/SessionNextRetry_error"
  20101. }
  20102. },
  20103. "required": ["timestamp", "sessionID", "attempt", "error"],
  20104. "additionalProperties": false
  20105. }
  20106. },
  20107. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20108. "additionalProperties": false
  20109. },
  20110. "SyncEventSessionNextCompactionStarted": {
  20111. "type": "object",
  20112. "properties": {
  20113. "type": {
  20114. "type": "string",
  20115. "enum": ["sync"]
  20116. },
  20117. "name": {
  20118. "type": "string",
  20119. "enum": ["session.next.compaction.started.1"]
  20120. },
  20121. "id": {
  20122. "type": "string"
  20123. },
  20124. "seq": {
  20125. "type": "number"
  20126. },
  20127. "aggregateID": {
  20128. "type": "string",
  20129. "enum": ["sessionID"]
  20130. },
  20131. "data": {
  20132. "type": "object",
  20133. "properties": {
  20134. "timestamp": {
  20135. "type": "number"
  20136. },
  20137. "sessionID": {
  20138. "type": "string",
  20139. "pattern": "^ses"
  20140. },
  20141. "reason": {
  20142. "type": "string",
  20143. "enum": ["auto", "manual"]
  20144. }
  20145. },
  20146. "required": ["timestamp", "sessionID", "reason"],
  20147. "additionalProperties": false
  20148. }
  20149. },
  20150. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20151. "additionalProperties": false
  20152. },
  20153. "SyncEventSessionNextCompactionDelta": {
  20154. "type": "object",
  20155. "properties": {
  20156. "type": {
  20157. "type": "string",
  20158. "enum": ["sync"]
  20159. },
  20160. "name": {
  20161. "type": "string",
  20162. "enum": ["session.next.compaction.delta.1"]
  20163. },
  20164. "id": {
  20165. "type": "string"
  20166. },
  20167. "seq": {
  20168. "type": "number"
  20169. },
  20170. "aggregateID": {
  20171. "type": "string",
  20172. "enum": ["sessionID"]
  20173. },
  20174. "data": {
  20175. "type": "object",
  20176. "properties": {
  20177. "timestamp": {
  20178. "type": "number"
  20179. },
  20180. "sessionID": {
  20181. "type": "string",
  20182. "pattern": "^ses"
  20183. },
  20184. "text": {
  20185. "type": "string"
  20186. }
  20187. },
  20188. "required": ["timestamp", "sessionID", "text"],
  20189. "additionalProperties": false
  20190. }
  20191. },
  20192. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20193. "additionalProperties": false
  20194. },
  20195. "SyncEventSessionNextCompactionEnded": {
  20196. "type": "object",
  20197. "properties": {
  20198. "type": {
  20199. "type": "string",
  20200. "enum": ["sync"]
  20201. },
  20202. "name": {
  20203. "type": "string",
  20204. "enum": ["session.next.compaction.ended.1"]
  20205. },
  20206. "id": {
  20207. "type": "string"
  20208. },
  20209. "seq": {
  20210. "type": "number"
  20211. },
  20212. "aggregateID": {
  20213. "type": "string",
  20214. "enum": ["sessionID"]
  20215. },
  20216. "data": {
  20217. "type": "object",
  20218. "properties": {
  20219. "timestamp": {
  20220. "type": "number"
  20221. },
  20222. "sessionID": {
  20223. "type": "string",
  20224. "pattern": "^ses"
  20225. },
  20226. "text": {
  20227. "type": "string"
  20228. },
  20229. "include": {
  20230. "type": "string"
  20231. }
  20232. },
  20233. "required": ["timestamp", "sessionID", "text"],
  20234. "additionalProperties": false
  20235. }
  20236. },
  20237. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20238. "additionalProperties": false
  20239. },
  20240. "SyncEventSessionCreated": {
  20241. "type": "object",
  20242. "properties": {
  20243. "type": {
  20244. "type": "string",
  20245. "enum": ["sync"]
  20246. },
  20247. "name": {
  20248. "type": "string",
  20249. "enum": ["session.created.1"]
  20250. },
  20251. "id": {
  20252. "type": "string"
  20253. },
  20254. "seq": {
  20255. "type": "number"
  20256. },
  20257. "aggregateID": {
  20258. "type": "string",
  20259. "enum": ["sessionID"]
  20260. },
  20261. "data": {
  20262. "type": "object",
  20263. "properties": {
  20264. "sessionID": {
  20265. "type": "string",
  20266. "pattern": "^ses"
  20267. },
  20268. "info": {
  20269. "$ref": "#/components/schemas/Session"
  20270. }
  20271. },
  20272. "required": ["sessionID", "info"],
  20273. "additionalProperties": false
  20274. }
  20275. },
  20276. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20277. "additionalProperties": false
  20278. },
  20279. "SyncEventSessionUpdated": {
  20280. "type": "object",
  20281. "properties": {
  20282. "type": {
  20283. "type": "string",
  20284. "enum": ["sync"]
  20285. },
  20286. "name": {
  20287. "type": "string",
  20288. "enum": ["session.updated.1"]
  20289. },
  20290. "id": {
  20291. "type": "string"
  20292. },
  20293. "seq": {
  20294. "type": "number"
  20295. },
  20296. "aggregateID": {
  20297. "type": "string",
  20298. "enum": ["sessionID"]
  20299. },
  20300. "data": {
  20301. "type": "object",
  20302. "properties": {
  20303. "sessionID": {
  20304. "type": "string",
  20305. "pattern": "^ses"
  20306. },
  20307. "info": {
  20308. "$ref": "#/components/schemas/Session"
  20309. }
  20310. },
  20311. "required": ["sessionID", "info"],
  20312. "additionalProperties": false
  20313. }
  20314. },
  20315. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20316. "additionalProperties": false
  20317. },
  20318. "SyncEventSessionDeleted": {
  20319. "type": "object",
  20320. "properties": {
  20321. "type": {
  20322. "type": "string",
  20323. "enum": ["sync"]
  20324. },
  20325. "name": {
  20326. "type": "string",
  20327. "enum": ["session.deleted.1"]
  20328. },
  20329. "id": {
  20330. "type": "string"
  20331. },
  20332. "seq": {
  20333. "type": "number"
  20334. },
  20335. "aggregateID": {
  20336. "type": "string",
  20337. "enum": ["sessionID"]
  20338. },
  20339. "data": {
  20340. "type": "object",
  20341. "properties": {
  20342. "sessionID": {
  20343. "type": "string",
  20344. "pattern": "^ses"
  20345. },
  20346. "info": {
  20347. "$ref": "#/components/schemas/Session"
  20348. }
  20349. },
  20350. "required": ["sessionID", "info"],
  20351. "additionalProperties": false
  20352. }
  20353. },
  20354. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20355. "additionalProperties": false
  20356. },
  20357. "SyncEventMessageUpdated": {
  20358. "type": "object",
  20359. "properties": {
  20360. "type": {
  20361. "type": "string",
  20362. "enum": ["sync"]
  20363. },
  20364. "name": {
  20365. "type": "string",
  20366. "enum": ["message.updated.1"]
  20367. },
  20368. "id": {
  20369. "type": "string"
  20370. },
  20371. "seq": {
  20372. "type": "number"
  20373. },
  20374. "aggregateID": {
  20375. "type": "string",
  20376. "enum": ["sessionID"]
  20377. },
  20378. "data": {
  20379. "type": "object",
  20380. "properties": {
  20381. "sessionID": {
  20382. "type": "string",
  20383. "pattern": "^ses"
  20384. },
  20385. "info": {
  20386. "$ref": "#/components/schemas/Message"
  20387. }
  20388. },
  20389. "required": ["sessionID", "info"],
  20390. "additionalProperties": false
  20391. }
  20392. },
  20393. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20394. "additionalProperties": false
  20395. },
  20396. "SyncEventMessageRemoved": {
  20397. "type": "object",
  20398. "properties": {
  20399. "type": {
  20400. "type": "string",
  20401. "enum": ["sync"]
  20402. },
  20403. "name": {
  20404. "type": "string",
  20405. "enum": ["message.removed.1"]
  20406. },
  20407. "id": {
  20408. "type": "string"
  20409. },
  20410. "seq": {
  20411. "type": "number"
  20412. },
  20413. "aggregateID": {
  20414. "type": "string",
  20415. "enum": ["sessionID"]
  20416. },
  20417. "data": {
  20418. "type": "object",
  20419. "properties": {
  20420. "sessionID": {
  20421. "type": "string",
  20422. "pattern": "^ses"
  20423. },
  20424. "messageID": {
  20425. "type": "string",
  20426. "pattern": "^msg"
  20427. }
  20428. },
  20429. "required": ["sessionID", "messageID"],
  20430. "additionalProperties": false
  20431. }
  20432. },
  20433. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20434. "additionalProperties": false
  20435. },
  20436. "SyncEventMessagePartUpdated": {
  20437. "type": "object",
  20438. "properties": {
  20439. "type": {
  20440. "type": "string",
  20441. "enum": ["sync"]
  20442. },
  20443. "name": {
  20444. "type": "string",
  20445. "enum": ["message.part.updated.1"]
  20446. },
  20447. "id": {
  20448. "type": "string"
  20449. },
  20450. "seq": {
  20451. "type": "number"
  20452. },
  20453. "aggregateID": {
  20454. "type": "string",
  20455. "enum": ["sessionID"]
  20456. },
  20457. "data": {
  20458. "type": "object",
  20459. "properties": {
  20460. "sessionID": {
  20461. "type": "string",
  20462. "pattern": "^ses"
  20463. },
  20464. "part": {
  20465. "$ref": "#/components/schemas/Part"
  20466. },
  20467. "time": {
  20468. "type": "number"
  20469. }
  20470. },
  20471. "required": ["sessionID", "part", "time"],
  20472. "additionalProperties": false
  20473. }
  20474. },
  20475. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20476. "additionalProperties": false
  20477. },
  20478. "SyncEventMessagePartRemoved": {
  20479. "type": "object",
  20480. "properties": {
  20481. "type": {
  20482. "type": "string",
  20483. "enum": ["sync"]
  20484. },
  20485. "name": {
  20486. "type": "string",
  20487. "enum": ["message.part.removed.1"]
  20488. },
  20489. "id": {
  20490. "type": "string"
  20491. },
  20492. "seq": {
  20493. "type": "number"
  20494. },
  20495. "aggregateID": {
  20496. "type": "string",
  20497. "enum": ["sessionID"]
  20498. },
  20499. "data": {
  20500. "type": "object",
  20501. "properties": {
  20502. "sessionID": {
  20503. "type": "string",
  20504. "pattern": "^ses"
  20505. },
  20506. "messageID": {
  20507. "type": "string",
  20508. "pattern": "^msg"
  20509. },
  20510. "partID": {
  20511. "type": "string",
  20512. "pattern": "^prt"
  20513. }
  20514. },
  20515. "required": ["sessionID", "messageID", "partID"],
  20516. "additionalProperties": false
  20517. }
  20518. },
  20519. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20520. "additionalProperties": false
  20521. },
  20522. "PolicyEffect": {
  20523. "type": "string",
  20524. "enum": ["allow", "deny"]
  20525. },
  20526. "ConfigV2ExperimentalPolicy": {
  20527. "type": "object",
  20528. "properties": {
  20529. "action": {
  20530. "type": "string",
  20531. "enum": ["provider.use"]
  20532. },
  20533. "effect": {
  20534. "$ref": "#/components/schemas/PolicyEffect"
  20535. },
  20536. "resource": {
  20537. "type": "string"
  20538. }
  20539. },
  20540. "required": ["action", "effect", "resource"],
  20541. "additionalProperties": false
  20542. },
  20543. "SessionInfo": {
  20544. "type": "object",
  20545. "properties": {
  20546. "id": {
  20547. "type": "string",
  20548. "pattern": "^ses"
  20549. },
  20550. "parentID": {
  20551. "type": "string",
  20552. "pattern": "^ses"
  20553. },
  20554. "projectID": {
  20555. "type": "string"
  20556. },
  20557. "workspaceID": {
  20558. "type": "string",
  20559. "pattern": "^wrk"
  20560. },
  20561. "path": {
  20562. "type": "string"
  20563. },
  20564. "agent": {
  20565. "type": "string"
  20566. },
  20567. "model": {
  20568. "type": "object",
  20569. "properties": {
  20570. "id": {
  20571. "type": "string"
  20572. },
  20573. "providerID": {
  20574. "type": "string"
  20575. },
  20576. "variant": {
  20577. "type": "string"
  20578. }
  20579. },
  20580. "required": ["id", "providerID"],
  20581. "additionalProperties": false
  20582. },
  20583. "cost": {
  20584. "type": "number"
  20585. },
  20586. "tokens": {
  20587. "type": "object",
  20588. "properties": {
  20589. "input": {
  20590. "type": "number"
  20591. },
  20592. "output": {
  20593. "type": "number"
  20594. },
  20595. "reasoning": {
  20596. "type": "number"
  20597. },
  20598. "cache": {
  20599. "type": "object",
  20600. "properties": {
  20601. "read": {
  20602. "type": "number"
  20603. },
  20604. "write": {
  20605. "type": "number"
  20606. }
  20607. },
  20608. "required": ["read", "write"],
  20609. "additionalProperties": false
  20610. }
  20611. },
  20612. "required": ["input", "output", "reasoning", "cache"],
  20613. "additionalProperties": false
  20614. },
  20615. "time": {
  20616. "type": "object",
  20617. "properties": {
  20618. "created": {
  20619. "type": "number"
  20620. },
  20621. "updated": {
  20622. "type": "number"
  20623. },
  20624. "archived": {
  20625. "type": "number"
  20626. }
  20627. },
  20628. "required": ["created", "updated"],
  20629. "additionalProperties": false
  20630. },
  20631. "title": {
  20632. "type": "string"
  20633. }
  20634. },
  20635. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  20636. "additionalProperties": false
  20637. },
  20638. "SessionDelivery": {
  20639. "type": "string",
  20640. "enum": ["immediate", "deferred"]
  20641. },
  20642. "SessionMessageAgentSwitched": {
  20643. "type": "object",
  20644. "properties": {
  20645. "id": {
  20646. "type": "string"
  20647. },
  20648. "metadata": {
  20649. "type": "object"
  20650. },
  20651. "time": {
  20652. "type": "object",
  20653. "properties": {
  20654. "created": {
  20655. "type": "number"
  20656. }
  20657. },
  20658. "required": ["created"],
  20659. "additionalProperties": false
  20660. },
  20661. "type": {
  20662. "type": "string",
  20663. "enum": ["agent-switched"]
  20664. },
  20665. "agent": {
  20666. "type": "string"
  20667. }
  20668. },
  20669. "required": ["id", "time", "type", "agent"],
  20670. "additionalProperties": false
  20671. },
  20672. "SessionMessageModelSwitched": {
  20673. "type": "object",
  20674. "properties": {
  20675. "id": {
  20676. "type": "string"
  20677. },
  20678. "metadata": {
  20679. "type": "object"
  20680. },
  20681. "time": {
  20682. "type": "object",
  20683. "properties": {
  20684. "created": {
  20685. "type": "number"
  20686. }
  20687. },
  20688. "required": ["created"],
  20689. "additionalProperties": false
  20690. },
  20691. "type": {
  20692. "type": "string",
  20693. "enum": ["model-switched"]
  20694. },
  20695. "model": {
  20696. "type": "object",
  20697. "properties": {
  20698. "id": {
  20699. "type": "string"
  20700. },
  20701. "providerID": {
  20702. "type": "string"
  20703. },
  20704. "variant": {
  20705. "type": "string"
  20706. }
  20707. },
  20708. "required": ["id", "providerID"],
  20709. "additionalProperties": false
  20710. }
  20711. },
  20712. "required": ["id", "time", "type", "model"],
  20713. "additionalProperties": false
  20714. },
  20715. "SessionMessageUser": {
  20716. "type": "object",
  20717. "properties": {
  20718. "id": {
  20719. "type": "string"
  20720. },
  20721. "metadata": {
  20722. "type": "object"
  20723. },
  20724. "time": {
  20725. "type": "object",
  20726. "properties": {
  20727. "created": {
  20728. "type": "number"
  20729. }
  20730. },
  20731. "required": ["created"],
  20732. "additionalProperties": false
  20733. },
  20734. "text": {
  20735. "type": "string"
  20736. },
  20737. "files": {
  20738. "type": "array",
  20739. "items": {
  20740. "$ref": "#/components/schemas/PromptFileAttachment"
  20741. }
  20742. },
  20743. "agents": {
  20744. "type": "array",
  20745. "items": {
  20746. "$ref": "#/components/schemas/PromptAgentAttachment"
  20747. }
  20748. },
  20749. "references": {
  20750. "type": "array",
  20751. "items": {
  20752. "$ref": "#/components/schemas/PromptReferenceAttachment"
  20753. }
  20754. },
  20755. "type": {
  20756. "type": "string",
  20757. "enum": ["user"]
  20758. }
  20759. },
  20760. "required": ["id", "time", "text", "type"],
  20761. "additionalProperties": false
  20762. },
  20763. "SessionMessageSynthetic": {
  20764. "type": "object",
  20765. "properties": {
  20766. "id": {
  20767. "type": "string"
  20768. },
  20769. "metadata": {
  20770. "type": "object"
  20771. },
  20772. "time": {
  20773. "type": "object",
  20774. "properties": {
  20775. "created": {
  20776. "type": "number"
  20777. }
  20778. },
  20779. "required": ["created"],
  20780. "additionalProperties": false
  20781. },
  20782. "sessionID": {
  20783. "type": "string",
  20784. "pattern": "^ses"
  20785. },
  20786. "text": {
  20787. "type": "string"
  20788. },
  20789. "type": {
  20790. "type": "string",
  20791. "enum": ["synthetic"]
  20792. }
  20793. },
  20794. "required": ["id", "time", "sessionID", "text", "type"],
  20795. "additionalProperties": false
  20796. },
  20797. "SessionMessageShell": {
  20798. "type": "object",
  20799. "properties": {
  20800. "id": {
  20801. "type": "string"
  20802. },
  20803. "metadata": {
  20804. "type": "object"
  20805. },
  20806. "time": {
  20807. "type": "object",
  20808. "properties": {
  20809. "created": {
  20810. "type": "number"
  20811. },
  20812. "completed": {
  20813. "type": "number"
  20814. }
  20815. },
  20816. "required": ["created"],
  20817. "additionalProperties": false
  20818. },
  20819. "type": {
  20820. "type": "string",
  20821. "enum": ["shell"]
  20822. },
  20823. "callID": {
  20824. "type": "string"
  20825. },
  20826. "command": {
  20827. "type": "string"
  20828. },
  20829. "output": {
  20830. "type": "string"
  20831. }
  20832. },
  20833. "required": ["id", "time", "type", "callID", "command", "output"],
  20834. "additionalProperties": false
  20835. },
  20836. "SessionMessageAssistantText": {
  20837. "type": "object",
  20838. "properties": {
  20839. "type": {
  20840. "type": "string",
  20841. "enum": ["text"]
  20842. },
  20843. "text": {
  20844. "type": "string"
  20845. }
  20846. },
  20847. "required": ["type", "text"],
  20848. "additionalProperties": false
  20849. },
  20850. "SessionMessageAssistantReasoning": {
  20851. "type": "object",
  20852. "properties": {
  20853. "type": {
  20854. "type": "string",
  20855. "enum": ["reasoning"]
  20856. },
  20857. "id": {
  20858. "type": "string"
  20859. },
  20860. "text": {
  20861. "type": "string"
  20862. }
  20863. },
  20864. "required": ["type", "id", "text"],
  20865. "additionalProperties": false
  20866. },
  20867. "SessionMessageToolStatePending": {
  20868. "type": "object",
  20869. "properties": {
  20870. "status": {
  20871. "type": "string",
  20872. "enum": ["pending"]
  20873. },
  20874. "input": {
  20875. "type": "string"
  20876. }
  20877. },
  20878. "required": ["status", "input"],
  20879. "additionalProperties": false
  20880. },
  20881. "SessionMessageToolStateRunning": {
  20882. "type": "object",
  20883. "properties": {
  20884. "status": {
  20885. "type": "string",
  20886. "enum": ["running"]
  20887. },
  20888. "input": {
  20889. "type": "object"
  20890. },
  20891. "structured": {
  20892. "type": "object"
  20893. },
  20894. "content": {
  20895. "type": "array",
  20896. "items": {
  20897. "anyOf": [
  20898. {
  20899. "$ref": "#/components/schemas/ToolTextContent"
  20900. },
  20901. {
  20902. "$ref": "#/components/schemas/ToolFileContent"
  20903. }
  20904. ]
  20905. }
  20906. }
  20907. },
  20908. "required": ["status", "input", "structured", "content"],
  20909. "additionalProperties": false
  20910. },
  20911. "SessionMessageToolStateCompleted": {
  20912. "type": "object",
  20913. "properties": {
  20914. "status": {
  20915. "type": "string",
  20916. "enum": ["completed"]
  20917. },
  20918. "input": {
  20919. "type": "object"
  20920. },
  20921. "attachments": {
  20922. "type": "array",
  20923. "items": {
  20924. "$ref": "#/components/schemas/PromptFileAttachment"
  20925. }
  20926. },
  20927. "content": {
  20928. "type": "array",
  20929. "items": {
  20930. "anyOf": [
  20931. {
  20932. "$ref": "#/components/schemas/ToolTextContent"
  20933. },
  20934. {
  20935. "$ref": "#/components/schemas/ToolFileContent"
  20936. }
  20937. ]
  20938. }
  20939. },
  20940. "structured": {
  20941. "type": "object"
  20942. }
  20943. },
  20944. "required": ["status", "input", "content", "structured"],
  20945. "additionalProperties": false
  20946. },
  20947. "SessionMessageToolStateError": {
  20948. "type": "object",
  20949. "properties": {
  20950. "status": {
  20951. "type": "string",
  20952. "enum": ["error"]
  20953. },
  20954. "input": {
  20955. "type": "object"
  20956. },
  20957. "content": {
  20958. "type": "array",
  20959. "items": {
  20960. "anyOf": [
  20961. {
  20962. "$ref": "#/components/schemas/ToolTextContent"
  20963. },
  20964. {
  20965. "$ref": "#/components/schemas/ToolFileContent"
  20966. }
  20967. ]
  20968. }
  20969. },
  20970. "structured": {
  20971. "type": "object"
  20972. },
  20973. "error": {
  20974. "$ref": "#/components/schemas/SessionErrorUnknown"
  20975. }
  20976. },
  20977. "required": ["status", "input", "content", "structured", "error"],
  20978. "additionalProperties": false
  20979. },
  20980. "SessionMessageAssistantTool": {
  20981. "type": "object",
  20982. "properties": {
  20983. "type": {
  20984. "type": "string",
  20985. "enum": ["tool"]
  20986. },
  20987. "id": {
  20988. "type": "string"
  20989. },
  20990. "name": {
  20991. "type": "string"
  20992. },
  20993. "provider": {
  20994. "type": "object",
  20995. "properties": {
  20996. "executed": {
  20997. "type": "boolean"
  20998. },
  20999. "metadata": {
  21000. "type": "object"
  21001. }
  21002. },
  21003. "required": ["executed"],
  21004. "additionalProperties": false
  21005. },
  21006. "state": {
  21007. "anyOf": [
  21008. {
  21009. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21010. },
  21011. {
  21012. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21013. },
  21014. {
  21015. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21016. },
  21017. {
  21018. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21019. }
  21020. ]
  21021. },
  21022. "time": {
  21023. "type": "object",
  21024. "properties": {
  21025. "created": {
  21026. "type": "number"
  21027. },
  21028. "ran": {
  21029. "type": "number"
  21030. },
  21031. "completed": {
  21032. "type": "number"
  21033. },
  21034. "pruned": {
  21035. "type": "number"
  21036. }
  21037. },
  21038. "required": ["created"],
  21039. "additionalProperties": false
  21040. }
  21041. },
  21042. "required": ["type", "id", "name", "state", "time"],
  21043. "additionalProperties": false
  21044. },
  21045. "SessionMessageAssistant": {
  21046. "type": "object",
  21047. "properties": {
  21048. "id": {
  21049. "type": "string"
  21050. },
  21051. "metadata": {
  21052. "type": "object"
  21053. },
  21054. "time": {
  21055. "type": "object",
  21056. "properties": {
  21057. "created": {
  21058. "type": "number"
  21059. },
  21060. "completed": {
  21061. "type": "number"
  21062. }
  21063. },
  21064. "required": ["created"],
  21065. "additionalProperties": false
  21066. },
  21067. "type": {
  21068. "type": "string",
  21069. "enum": ["assistant"]
  21070. },
  21071. "agent": {
  21072. "type": "string"
  21073. },
  21074. "model": {
  21075. "type": "object",
  21076. "properties": {
  21077. "id": {
  21078. "type": "string"
  21079. },
  21080. "providerID": {
  21081. "type": "string"
  21082. },
  21083. "variant": {
  21084. "type": "string"
  21085. }
  21086. },
  21087. "required": ["id", "providerID"],
  21088. "additionalProperties": false
  21089. },
  21090. "content": {
  21091. "type": "array",
  21092. "items": {
  21093. "anyOf": [
  21094. {
  21095. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21096. },
  21097. {
  21098. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21099. },
  21100. {
  21101. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21102. }
  21103. ]
  21104. }
  21105. },
  21106. "snapshot": {
  21107. "type": "object",
  21108. "properties": {
  21109. "start": {
  21110. "type": "string"
  21111. },
  21112. "end": {
  21113. "type": "string"
  21114. }
  21115. },
  21116. "additionalProperties": false
  21117. },
  21118. "finish": {
  21119. "type": "string"
  21120. },
  21121. "cost": {
  21122. "type": "number"
  21123. },
  21124. "tokens": {
  21125. "type": "object",
  21126. "properties": {
  21127. "input": {
  21128. "type": "number"
  21129. },
  21130. "output": {
  21131. "type": "number"
  21132. },
  21133. "reasoning": {
  21134. "type": "number"
  21135. },
  21136. "cache": {
  21137. "type": "object",
  21138. "properties": {
  21139. "read": {
  21140. "type": "number"
  21141. },
  21142. "write": {
  21143. "type": "number"
  21144. }
  21145. },
  21146. "required": ["read", "write"],
  21147. "additionalProperties": false
  21148. }
  21149. },
  21150. "required": ["input", "output", "reasoning", "cache"],
  21151. "additionalProperties": false
  21152. },
  21153. "error": {
  21154. "$ref": "#/components/schemas/SessionErrorUnknown"
  21155. }
  21156. },
  21157. "required": ["id", "time", "type", "agent", "model", "content"],
  21158. "additionalProperties": false
  21159. },
  21160. "SessionMessageCompaction": {
  21161. "type": "object",
  21162. "properties": {
  21163. "type": {
  21164. "type": "string",
  21165. "enum": ["compaction"]
  21166. },
  21167. "reason": {
  21168. "type": "string",
  21169. "enum": ["auto", "manual"]
  21170. },
  21171. "summary": {
  21172. "type": "string"
  21173. },
  21174. "include": {
  21175. "type": "string"
  21176. },
  21177. "id": {
  21178. "type": "string"
  21179. },
  21180. "metadata": {
  21181. "type": "object"
  21182. },
  21183. "time": {
  21184. "type": "object",
  21185. "properties": {
  21186. "created": {
  21187. "type": "number"
  21188. }
  21189. },
  21190. "required": ["created"],
  21191. "additionalProperties": false
  21192. }
  21193. },
  21194. "required": ["type", "reason", "summary", "id", "time"],
  21195. "additionalProperties": false
  21196. },
  21197. "SessionMessage": {
  21198. "anyOf": [
  21199. {
  21200. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21201. },
  21202. {
  21203. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21204. },
  21205. {
  21206. "$ref": "#/components/schemas/SessionMessageUser"
  21207. },
  21208. {
  21209. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21210. },
  21211. {
  21212. "$ref": "#/components/schemas/SessionMessageShell"
  21213. },
  21214. {
  21215. "$ref": "#/components/schemas/SessionMessageAssistant"
  21216. },
  21217. {
  21218. "$ref": "#/components/schemas/SessionMessageCompaction"
  21219. }
  21220. ]
  21221. },
  21222. "ProviderV2Info": {
  21223. "type": "object",
  21224. "properties": {
  21225. "id": {
  21226. "type": "string"
  21227. },
  21228. "name": {
  21229. "type": "string"
  21230. },
  21231. "enabled": {
  21232. "anyOf": [
  21233. {
  21234. "type": "boolean",
  21235. "enum": [false]
  21236. },
  21237. {
  21238. "type": "object",
  21239. "properties": {
  21240. "via": {
  21241. "type": "string",
  21242. "enum": ["env"]
  21243. },
  21244. "name": {
  21245. "type": "string"
  21246. }
  21247. },
  21248. "required": ["via", "name"],
  21249. "additionalProperties": false
  21250. },
  21251. {
  21252. "type": "object",
  21253. "properties": {
  21254. "via": {
  21255. "type": "string",
  21256. "enum": ["account"]
  21257. },
  21258. "service": {
  21259. "type": "string"
  21260. }
  21261. },
  21262. "required": ["via", "service"],
  21263. "additionalProperties": false
  21264. },
  21265. {
  21266. "type": "object",
  21267. "properties": {
  21268. "via": {
  21269. "type": "string",
  21270. "enum": ["custom"]
  21271. },
  21272. "data": {
  21273. "type": "object"
  21274. }
  21275. },
  21276. "required": ["via", "data"],
  21277. "additionalProperties": false
  21278. }
  21279. ]
  21280. },
  21281. "env": {
  21282. "type": "array",
  21283. "items": {
  21284. "type": "string"
  21285. }
  21286. },
  21287. "endpoint": {
  21288. "anyOf": [
  21289. {
  21290. "type": "object",
  21291. "properties": {
  21292. "type": {
  21293. "type": "string",
  21294. "enum": ["unknown"]
  21295. }
  21296. },
  21297. "required": ["type"],
  21298. "additionalProperties": false
  21299. },
  21300. {
  21301. "type": "object",
  21302. "properties": {
  21303. "type": {
  21304. "type": "string",
  21305. "enum": ["openai/responses"]
  21306. },
  21307. "url": {
  21308. "type": "string"
  21309. },
  21310. "websocket": {
  21311. "type": "boolean"
  21312. }
  21313. },
  21314. "required": ["type", "url"],
  21315. "additionalProperties": false
  21316. },
  21317. {
  21318. "type": "object",
  21319. "properties": {
  21320. "type": {
  21321. "type": "string",
  21322. "enum": ["openai/completions"]
  21323. },
  21324. "url": {
  21325. "type": "string"
  21326. },
  21327. "reasoning": {
  21328. "anyOf": [
  21329. {
  21330. "type": "object",
  21331. "properties": {
  21332. "type": {
  21333. "type": "string",
  21334. "enum": ["reasoning_content"]
  21335. }
  21336. },
  21337. "required": ["type"],
  21338. "additionalProperties": false
  21339. },
  21340. {
  21341. "type": "object",
  21342. "properties": {
  21343. "type": {
  21344. "type": "string",
  21345. "enum": ["reasoning_details"]
  21346. }
  21347. },
  21348. "required": ["type"],
  21349. "additionalProperties": false
  21350. }
  21351. ]
  21352. }
  21353. },
  21354. "required": ["type", "url"],
  21355. "additionalProperties": false
  21356. },
  21357. {
  21358. "type": "object",
  21359. "properties": {
  21360. "type": {
  21361. "type": "string",
  21362. "enum": ["anthropic/messages"]
  21363. },
  21364. "url": {
  21365. "type": "string"
  21366. }
  21367. },
  21368. "required": ["type", "url"],
  21369. "additionalProperties": false
  21370. },
  21371. {
  21372. "type": "object",
  21373. "properties": {
  21374. "type": {
  21375. "type": "string",
  21376. "enum": ["aisdk"]
  21377. },
  21378. "package": {
  21379. "type": "string"
  21380. },
  21381. "url": {
  21382. "type": "string"
  21383. }
  21384. },
  21385. "required": ["type", "package"],
  21386. "additionalProperties": false
  21387. }
  21388. ]
  21389. },
  21390. "options": {
  21391. "type": "object",
  21392. "properties": {
  21393. "headers": {
  21394. "type": "object",
  21395. "additionalProperties": {
  21396. "type": "string"
  21397. }
  21398. },
  21399. "body": {
  21400. "type": "object"
  21401. },
  21402. "aisdk": {
  21403. "type": "object",
  21404. "properties": {
  21405. "provider": {
  21406. "type": "object"
  21407. },
  21408. "request": {
  21409. "type": "object"
  21410. }
  21411. },
  21412. "required": ["provider", "request"],
  21413. "additionalProperties": false
  21414. }
  21415. },
  21416. "required": ["headers", "body", "aisdk"],
  21417. "additionalProperties": false
  21418. }
  21419. },
  21420. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21421. "additionalProperties": false
  21422. },
  21423. "EventModels-devRefreshed": {
  21424. "type": "object",
  21425. "properties": {
  21426. "id": {
  21427. "type": "string"
  21428. },
  21429. "type": {
  21430. "type": "string",
  21431. "enum": ["models-dev.refreshed"]
  21432. },
  21433. "properties": {
  21434. "type": "object",
  21435. "properties": {}
  21436. }
  21437. },
  21438. "required": ["id", "type", "properties"],
  21439. "additionalProperties": false
  21440. },
  21441. "EventPluginAdded": {
  21442. "type": "object",
  21443. "properties": {
  21444. "id": {
  21445. "type": "string"
  21446. },
  21447. "type": {
  21448. "type": "string",
  21449. "enum": ["plugin.added"]
  21450. },
  21451. "properties": {
  21452. "type": "object",
  21453. "properties": {
  21454. "id": {
  21455. "type": "string"
  21456. }
  21457. },
  21458. "required": ["id"],
  21459. "additionalProperties": false
  21460. }
  21461. },
  21462. "required": ["id", "type", "properties"],
  21463. "additionalProperties": false
  21464. },
  21465. "ModelV2Info1": {
  21466. "type": "object",
  21467. "properties": {
  21468. "id": {
  21469. "type": "string"
  21470. },
  21471. "apiID": {
  21472. "type": "string"
  21473. },
  21474. "providerID": {
  21475. "type": "string"
  21476. },
  21477. "family": {
  21478. "type": "string"
  21479. },
  21480. "name": {
  21481. "type": "string"
  21482. },
  21483. "endpoint": {
  21484. "anyOf": [
  21485. {
  21486. "type": "object",
  21487. "properties": {
  21488. "type": {
  21489. "type": "string",
  21490. "enum": ["unknown"]
  21491. }
  21492. },
  21493. "required": ["type"],
  21494. "additionalProperties": false
  21495. },
  21496. {
  21497. "type": "object",
  21498. "properties": {
  21499. "type": {
  21500. "type": "string",
  21501. "enum": ["openai/responses"]
  21502. },
  21503. "url": {
  21504. "type": "string"
  21505. },
  21506. "websocket": {
  21507. "type": "boolean"
  21508. }
  21509. },
  21510. "required": ["type", "url"],
  21511. "additionalProperties": false
  21512. },
  21513. {
  21514. "type": "object",
  21515. "properties": {
  21516. "type": {
  21517. "type": "string",
  21518. "enum": ["openai/completions"]
  21519. },
  21520. "url": {
  21521. "type": "string"
  21522. },
  21523. "reasoning": {
  21524. "anyOf": [
  21525. {
  21526. "type": "object",
  21527. "properties": {
  21528. "type": {
  21529. "type": "string",
  21530. "enum": ["reasoning_content"]
  21531. }
  21532. },
  21533. "required": ["type"],
  21534. "additionalProperties": false
  21535. },
  21536. {
  21537. "type": "object",
  21538. "properties": {
  21539. "type": {
  21540. "type": "string",
  21541. "enum": ["reasoning_details"]
  21542. }
  21543. },
  21544. "required": ["type"],
  21545. "additionalProperties": false
  21546. }
  21547. ]
  21548. }
  21549. },
  21550. "required": ["type", "url"],
  21551. "additionalProperties": false
  21552. },
  21553. {
  21554. "type": "object",
  21555. "properties": {
  21556. "type": {
  21557. "type": "string",
  21558. "enum": ["anthropic/messages"]
  21559. },
  21560. "url": {
  21561. "type": "string"
  21562. }
  21563. },
  21564. "required": ["type", "url"],
  21565. "additionalProperties": false
  21566. },
  21567. {
  21568. "type": "object",
  21569. "properties": {
  21570. "type": {
  21571. "type": "string",
  21572. "enum": ["aisdk"]
  21573. },
  21574. "package": {
  21575. "type": "string"
  21576. },
  21577. "url": {
  21578. "type": "string"
  21579. }
  21580. },
  21581. "required": ["type", "package"],
  21582. "additionalProperties": false
  21583. }
  21584. ]
  21585. },
  21586. "capabilities": {
  21587. "type": "object",
  21588. "properties": {
  21589. "tools": {
  21590. "type": "boolean"
  21591. },
  21592. "input": {
  21593. "type": "array",
  21594. "items": {
  21595. "type": "string"
  21596. }
  21597. },
  21598. "output": {
  21599. "type": "array",
  21600. "items": {
  21601. "type": "string"
  21602. }
  21603. }
  21604. },
  21605. "required": ["tools", "input", "output"],
  21606. "additionalProperties": false
  21607. },
  21608. "options": {
  21609. "type": "object",
  21610. "properties": {
  21611. "headers": {
  21612. "type": "object",
  21613. "additionalProperties": {
  21614. "type": "string"
  21615. }
  21616. },
  21617. "body": {
  21618. "type": "object"
  21619. },
  21620. "aisdk": {
  21621. "type": "object",
  21622. "properties": {
  21623. "provider": {
  21624. "type": "object"
  21625. },
  21626. "request": {
  21627. "type": "object"
  21628. }
  21629. },
  21630. "required": ["provider", "request"],
  21631. "additionalProperties": false
  21632. },
  21633. "variant": {
  21634. "type": "string"
  21635. }
  21636. },
  21637. "required": ["headers", "body", "aisdk"],
  21638. "additionalProperties": false
  21639. },
  21640. "variants": {
  21641. "type": "array",
  21642. "items": {
  21643. "type": "object",
  21644. "properties": {
  21645. "id": {
  21646. "type": "string"
  21647. },
  21648. "headers": {
  21649. "type": "object",
  21650. "additionalProperties": {
  21651. "type": "string"
  21652. }
  21653. },
  21654. "body": {
  21655. "type": "object"
  21656. },
  21657. "aisdk": {
  21658. "type": "object",
  21659. "properties": {
  21660. "provider": {
  21661. "type": "object"
  21662. },
  21663. "request": {
  21664. "type": "object"
  21665. }
  21666. },
  21667. "required": ["provider", "request"],
  21668. "additionalProperties": false
  21669. }
  21670. },
  21671. "required": ["id", "headers", "body", "aisdk"],
  21672. "additionalProperties": false
  21673. }
  21674. },
  21675. "time": {
  21676. "type": "object",
  21677. "properties": {
  21678. "released": {
  21679. "anyOf": [
  21680. {
  21681. "type": "number"
  21682. },
  21683. {
  21684. "type": "string",
  21685. "enum": ["NaN"]
  21686. },
  21687. {
  21688. "type": "string",
  21689. "enum": ["Infinity"]
  21690. },
  21691. {
  21692. "type": "string",
  21693. "enum": ["-Infinity"]
  21694. }
  21695. ]
  21696. }
  21697. },
  21698. "required": ["released"],
  21699. "additionalProperties": false
  21700. },
  21701. "cost": {
  21702. "type": "array",
  21703. "items": {
  21704. "type": "object",
  21705. "properties": {
  21706. "tier": {
  21707. "type": "object",
  21708. "properties": {
  21709. "type": {
  21710. "type": "string",
  21711. "enum": ["context"]
  21712. },
  21713. "size": {
  21714. "type": "integer"
  21715. }
  21716. },
  21717. "required": ["type", "size"],
  21718. "additionalProperties": false
  21719. },
  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. "status": {
  21745. "type": "string",
  21746. "enum": ["alpha", "beta", "deprecated", "active"]
  21747. },
  21748. "enabled": {
  21749. "type": "boolean"
  21750. },
  21751. "limit": {
  21752. "type": "object",
  21753. "properties": {
  21754. "context": {
  21755. "type": "integer"
  21756. },
  21757. "input": {
  21758. "type": "integer"
  21759. },
  21760. "output": {
  21761. "type": "integer"
  21762. }
  21763. },
  21764. "required": ["context", "output"],
  21765. "additionalProperties": false
  21766. }
  21767. },
  21768. "required": [
  21769. "id",
  21770. "apiID",
  21771. "providerID",
  21772. "name",
  21773. "endpoint",
  21774. "capabilities",
  21775. "options",
  21776. "variants",
  21777. "time",
  21778. "cost",
  21779. "status",
  21780. "enabled",
  21781. "limit"
  21782. ],
  21783. "additionalProperties": false
  21784. },
  21785. "EventCatalogModelUpdated": {
  21786. "type": "object",
  21787. "properties": {
  21788. "id": {
  21789. "type": "string"
  21790. },
  21791. "type": {
  21792. "type": "string",
  21793. "enum": ["catalog.model.updated"]
  21794. },
  21795. "properties": {
  21796. "type": "object",
  21797. "properties": {
  21798. "model": {
  21799. "$ref": "#/components/schemas/ModelV2Info1"
  21800. }
  21801. },
  21802. "required": ["model"],
  21803. "additionalProperties": false
  21804. }
  21805. },
  21806. "required": ["id", "type", "properties"],
  21807. "additionalProperties": false
  21808. },
  21809. "EventFileEdited": {
  21810. "type": "object",
  21811. "properties": {
  21812. "id": {
  21813. "type": "string"
  21814. },
  21815. "type": {
  21816. "type": "string",
  21817. "enum": ["file.edited"]
  21818. },
  21819. "properties": {
  21820. "type": "object",
  21821. "properties": {
  21822. "file": {
  21823. "type": "string"
  21824. }
  21825. },
  21826. "required": ["file"],
  21827. "additionalProperties": false
  21828. }
  21829. },
  21830. "required": ["id", "type", "properties"],
  21831. "additionalProperties": false
  21832. },
  21833. "EventSessionNextAgentSwitched": {
  21834. "type": "object",
  21835. "properties": {
  21836. "id": {
  21837. "type": "string"
  21838. },
  21839. "type": {
  21840. "type": "string",
  21841. "enum": ["session.next.agent.switched"]
  21842. },
  21843. "properties": {
  21844. "type": "object",
  21845. "properties": {
  21846. "timestamp": {
  21847. "type": "number"
  21848. },
  21849. "sessionID": {
  21850. "type": "string",
  21851. "pattern": "^ses"
  21852. },
  21853. "agent": {
  21854. "type": "string"
  21855. }
  21856. },
  21857. "required": ["timestamp", "sessionID", "agent"],
  21858. "additionalProperties": false
  21859. }
  21860. },
  21861. "required": ["id", "type", "properties"],
  21862. "additionalProperties": false
  21863. },
  21864. "EventSessionNextModelSwitched": {
  21865. "type": "object",
  21866. "properties": {
  21867. "id": {
  21868. "type": "string"
  21869. },
  21870. "type": {
  21871. "type": "string",
  21872. "enum": ["session.next.model.switched"]
  21873. },
  21874. "properties": {
  21875. "type": "object",
  21876. "properties": {
  21877. "timestamp": {
  21878. "type": "number"
  21879. },
  21880. "sessionID": {
  21881. "type": "string",
  21882. "pattern": "^ses"
  21883. },
  21884. "model": {
  21885. "type": "object",
  21886. "properties": {
  21887. "id": {
  21888. "type": "string"
  21889. },
  21890. "providerID": {
  21891. "type": "string"
  21892. },
  21893. "variant": {
  21894. "type": "string"
  21895. }
  21896. },
  21897. "required": ["id", "providerID"],
  21898. "additionalProperties": false
  21899. }
  21900. },
  21901. "required": ["timestamp", "sessionID", "model"],
  21902. "additionalProperties": false
  21903. }
  21904. },
  21905. "required": ["id", "type", "properties"],
  21906. "additionalProperties": false
  21907. },
  21908. "EventSessionNextPrompted": {
  21909. "type": "object",
  21910. "properties": {
  21911. "id": {
  21912. "type": "string"
  21913. },
  21914. "type": {
  21915. "type": "string",
  21916. "enum": ["session.next.prompted"]
  21917. },
  21918. "properties": {
  21919. "type": "object",
  21920. "properties": {
  21921. "timestamp": {
  21922. "type": "number"
  21923. },
  21924. "sessionID": {
  21925. "type": "string",
  21926. "pattern": "^ses"
  21927. },
  21928. "prompt": {
  21929. "$ref": "#/components/schemas/Prompt"
  21930. }
  21931. },
  21932. "required": ["timestamp", "sessionID", "prompt"],
  21933. "additionalProperties": false
  21934. }
  21935. },
  21936. "required": ["id", "type", "properties"],
  21937. "additionalProperties": false
  21938. },
  21939. "EventSessionNextSynthetic": {
  21940. "type": "object",
  21941. "properties": {
  21942. "id": {
  21943. "type": "string"
  21944. },
  21945. "type": {
  21946. "type": "string",
  21947. "enum": ["session.next.synthetic"]
  21948. },
  21949. "properties": {
  21950. "type": "object",
  21951. "properties": {
  21952. "timestamp": {
  21953. "type": "number"
  21954. },
  21955. "sessionID": {
  21956. "type": "string",
  21957. "pattern": "^ses"
  21958. },
  21959. "text": {
  21960. "type": "string"
  21961. }
  21962. },
  21963. "required": ["timestamp", "sessionID", "text"],
  21964. "additionalProperties": false
  21965. }
  21966. },
  21967. "required": ["id", "type", "properties"],
  21968. "additionalProperties": false
  21969. },
  21970. "EventSessionNextShellStarted": {
  21971. "type": "object",
  21972. "properties": {
  21973. "id": {
  21974. "type": "string"
  21975. },
  21976. "type": {
  21977. "type": "string",
  21978. "enum": ["session.next.shell.started"]
  21979. },
  21980. "properties": {
  21981. "type": "object",
  21982. "properties": {
  21983. "timestamp": {
  21984. "type": "number"
  21985. },
  21986. "sessionID": {
  21987. "type": "string",
  21988. "pattern": "^ses"
  21989. },
  21990. "callID": {
  21991. "type": "string"
  21992. },
  21993. "command": {
  21994. "type": "string"
  21995. }
  21996. },
  21997. "required": ["timestamp", "sessionID", "callID", "command"],
  21998. "additionalProperties": false
  21999. }
  22000. },
  22001. "required": ["id", "type", "properties"],
  22002. "additionalProperties": false
  22003. },
  22004. "EventSessionNextShellEnded": {
  22005. "type": "object",
  22006. "properties": {
  22007. "id": {
  22008. "type": "string"
  22009. },
  22010. "type": {
  22011. "type": "string",
  22012. "enum": ["session.next.shell.ended"]
  22013. },
  22014. "properties": {
  22015. "type": "object",
  22016. "properties": {
  22017. "timestamp": {
  22018. "type": "number"
  22019. },
  22020. "sessionID": {
  22021. "type": "string",
  22022. "pattern": "^ses"
  22023. },
  22024. "callID": {
  22025. "type": "string"
  22026. },
  22027. "output": {
  22028. "type": "string"
  22029. }
  22030. },
  22031. "required": ["timestamp", "sessionID", "callID", "output"],
  22032. "additionalProperties": false
  22033. }
  22034. },
  22035. "required": ["id", "type", "properties"],
  22036. "additionalProperties": false
  22037. },
  22038. "EventSessionNextStepStarted": {
  22039. "type": "object",
  22040. "properties": {
  22041. "id": {
  22042. "type": "string"
  22043. },
  22044. "type": {
  22045. "type": "string",
  22046. "enum": ["session.next.step.started"]
  22047. },
  22048. "properties": {
  22049. "type": "object",
  22050. "properties": {
  22051. "timestamp": {
  22052. "type": "number"
  22053. },
  22054. "sessionID": {
  22055. "type": "string",
  22056. "pattern": "^ses"
  22057. },
  22058. "agent": {
  22059. "type": "string"
  22060. },
  22061. "model": {
  22062. "type": "object",
  22063. "properties": {
  22064. "id": {
  22065. "type": "string"
  22066. },
  22067. "providerID": {
  22068. "type": "string"
  22069. },
  22070. "variant": {
  22071. "type": "string"
  22072. }
  22073. },
  22074. "required": ["id", "providerID"],
  22075. "additionalProperties": false
  22076. },
  22077. "snapshot": {
  22078. "type": "string"
  22079. }
  22080. },
  22081. "required": ["timestamp", "sessionID", "agent", "model"],
  22082. "additionalProperties": false
  22083. }
  22084. },
  22085. "required": ["id", "type", "properties"],
  22086. "additionalProperties": false
  22087. },
  22088. "EventSessionNextStepEnded": {
  22089. "type": "object",
  22090. "properties": {
  22091. "id": {
  22092. "type": "string"
  22093. },
  22094. "type": {
  22095. "type": "string",
  22096. "enum": ["session.next.step.ended"]
  22097. },
  22098. "properties": {
  22099. "type": "object",
  22100. "properties": {
  22101. "timestamp": {
  22102. "type": "number"
  22103. },
  22104. "sessionID": {
  22105. "type": "string",
  22106. "pattern": "^ses"
  22107. },
  22108. "finish": {
  22109. "type": "string"
  22110. },
  22111. "cost": {
  22112. "type": "number"
  22113. },
  22114. "tokens": {
  22115. "type": "object",
  22116. "properties": {
  22117. "input": {
  22118. "type": "number"
  22119. },
  22120. "output": {
  22121. "type": "number"
  22122. },
  22123. "reasoning": {
  22124. "type": "number"
  22125. },
  22126. "cache": {
  22127. "type": "object",
  22128. "properties": {
  22129. "read": {
  22130. "type": "number"
  22131. },
  22132. "write": {
  22133. "type": "number"
  22134. }
  22135. },
  22136. "required": ["read", "write"],
  22137. "additionalProperties": false
  22138. }
  22139. },
  22140. "required": ["input", "output", "reasoning", "cache"],
  22141. "additionalProperties": false
  22142. },
  22143. "snapshot": {
  22144. "type": "string"
  22145. }
  22146. },
  22147. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  22148. "additionalProperties": false
  22149. }
  22150. },
  22151. "required": ["id", "type", "properties"],
  22152. "additionalProperties": false
  22153. },
  22154. "EventSessionNextStepFailed": {
  22155. "type": "object",
  22156. "properties": {
  22157. "id": {
  22158. "type": "string"
  22159. },
  22160. "type": {
  22161. "type": "string",
  22162. "enum": ["session.next.step.failed"]
  22163. },
  22164. "properties": {
  22165. "type": "object",
  22166. "properties": {
  22167. "timestamp": {
  22168. "type": "number"
  22169. },
  22170. "sessionID": {
  22171. "type": "string",
  22172. "pattern": "^ses"
  22173. },
  22174. "error": {
  22175. "$ref": "#/components/schemas/SessionErrorUnknown"
  22176. }
  22177. },
  22178. "required": ["timestamp", "sessionID", "error"],
  22179. "additionalProperties": false
  22180. }
  22181. },
  22182. "required": ["id", "type", "properties"],
  22183. "additionalProperties": false
  22184. },
  22185. "EventSessionNextTextStarted": {
  22186. "type": "object",
  22187. "properties": {
  22188. "id": {
  22189. "type": "string"
  22190. },
  22191. "type": {
  22192. "type": "string",
  22193. "enum": ["session.next.text.started"]
  22194. },
  22195. "properties": {
  22196. "type": "object",
  22197. "properties": {
  22198. "timestamp": {
  22199. "type": "number"
  22200. },
  22201. "sessionID": {
  22202. "type": "string",
  22203. "pattern": "^ses"
  22204. }
  22205. },
  22206. "required": ["timestamp", "sessionID"],
  22207. "additionalProperties": false
  22208. }
  22209. },
  22210. "required": ["id", "type", "properties"],
  22211. "additionalProperties": false
  22212. },
  22213. "EventSessionNextTextDelta": {
  22214. "type": "object",
  22215. "properties": {
  22216. "id": {
  22217. "type": "string"
  22218. },
  22219. "type": {
  22220. "type": "string",
  22221. "enum": ["session.next.text.delta"]
  22222. },
  22223. "properties": {
  22224. "type": "object",
  22225. "properties": {
  22226. "timestamp": {
  22227. "type": "number"
  22228. },
  22229. "sessionID": {
  22230. "type": "string",
  22231. "pattern": "^ses"
  22232. },
  22233. "delta": {
  22234. "type": "string"
  22235. }
  22236. },
  22237. "required": ["timestamp", "sessionID", "delta"],
  22238. "additionalProperties": false
  22239. }
  22240. },
  22241. "required": ["id", "type", "properties"],
  22242. "additionalProperties": false
  22243. },
  22244. "EventSessionNextTextEnded": {
  22245. "type": "object",
  22246. "properties": {
  22247. "id": {
  22248. "type": "string"
  22249. },
  22250. "type": {
  22251. "type": "string",
  22252. "enum": ["session.next.text.ended"]
  22253. },
  22254. "properties": {
  22255. "type": "object",
  22256. "properties": {
  22257. "timestamp": {
  22258. "type": "number"
  22259. },
  22260. "sessionID": {
  22261. "type": "string",
  22262. "pattern": "^ses"
  22263. },
  22264. "text": {
  22265. "type": "string"
  22266. }
  22267. },
  22268. "required": ["timestamp", "sessionID", "text"],
  22269. "additionalProperties": false
  22270. }
  22271. },
  22272. "required": ["id", "type", "properties"],
  22273. "additionalProperties": false
  22274. },
  22275. "EventSessionNextReasoningStarted": {
  22276. "type": "object",
  22277. "properties": {
  22278. "id": {
  22279. "type": "string"
  22280. },
  22281. "type": {
  22282. "type": "string",
  22283. "enum": ["session.next.reasoning.started"]
  22284. },
  22285. "properties": {
  22286. "type": "object",
  22287. "properties": {
  22288. "timestamp": {
  22289. "type": "number"
  22290. },
  22291. "sessionID": {
  22292. "type": "string",
  22293. "pattern": "^ses"
  22294. },
  22295. "reasoningID": {
  22296. "type": "string"
  22297. }
  22298. },
  22299. "required": ["timestamp", "sessionID", "reasoningID"],
  22300. "additionalProperties": false
  22301. }
  22302. },
  22303. "required": ["id", "type", "properties"],
  22304. "additionalProperties": false
  22305. },
  22306. "EventSessionNextReasoningDelta": {
  22307. "type": "object",
  22308. "properties": {
  22309. "id": {
  22310. "type": "string"
  22311. },
  22312. "type": {
  22313. "type": "string",
  22314. "enum": ["session.next.reasoning.delta"]
  22315. },
  22316. "properties": {
  22317. "type": "object",
  22318. "properties": {
  22319. "timestamp": {
  22320. "type": "number"
  22321. },
  22322. "sessionID": {
  22323. "type": "string",
  22324. "pattern": "^ses"
  22325. },
  22326. "reasoningID": {
  22327. "type": "string"
  22328. },
  22329. "delta": {
  22330. "type": "string"
  22331. }
  22332. },
  22333. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  22334. "additionalProperties": false
  22335. }
  22336. },
  22337. "required": ["id", "type", "properties"],
  22338. "additionalProperties": false
  22339. },
  22340. "EventSessionNextReasoningEnded": {
  22341. "type": "object",
  22342. "properties": {
  22343. "id": {
  22344. "type": "string"
  22345. },
  22346. "type": {
  22347. "type": "string",
  22348. "enum": ["session.next.reasoning.ended"]
  22349. },
  22350. "properties": {
  22351. "type": "object",
  22352. "properties": {
  22353. "timestamp": {
  22354. "type": "number"
  22355. },
  22356. "sessionID": {
  22357. "type": "string",
  22358. "pattern": "^ses"
  22359. },
  22360. "reasoningID": {
  22361. "type": "string"
  22362. },
  22363. "text": {
  22364. "type": "string"
  22365. }
  22366. },
  22367. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  22368. "additionalProperties": false
  22369. }
  22370. },
  22371. "required": ["id", "type", "properties"],
  22372. "additionalProperties": false
  22373. },
  22374. "EventSessionNextToolInputStarted": {
  22375. "type": "object",
  22376. "properties": {
  22377. "id": {
  22378. "type": "string"
  22379. },
  22380. "type": {
  22381. "type": "string",
  22382. "enum": ["session.next.tool.input.started"]
  22383. },
  22384. "properties": {
  22385. "type": "object",
  22386. "properties": {
  22387. "timestamp": {
  22388. "type": "number"
  22389. },
  22390. "sessionID": {
  22391. "type": "string",
  22392. "pattern": "^ses"
  22393. },
  22394. "callID": {
  22395. "type": "string"
  22396. },
  22397. "name": {
  22398. "type": "string"
  22399. }
  22400. },
  22401. "required": ["timestamp", "sessionID", "callID", "name"],
  22402. "additionalProperties": false
  22403. }
  22404. },
  22405. "required": ["id", "type", "properties"],
  22406. "additionalProperties": false
  22407. },
  22408. "EventSessionNextToolInputDelta": {
  22409. "type": "object",
  22410. "properties": {
  22411. "id": {
  22412. "type": "string"
  22413. },
  22414. "type": {
  22415. "type": "string",
  22416. "enum": ["session.next.tool.input.delta"]
  22417. },
  22418. "properties": {
  22419. "type": "object",
  22420. "properties": {
  22421. "timestamp": {
  22422. "type": "number"
  22423. },
  22424. "sessionID": {
  22425. "type": "string",
  22426. "pattern": "^ses"
  22427. },
  22428. "callID": {
  22429. "type": "string"
  22430. },
  22431. "delta": {
  22432. "type": "string"
  22433. }
  22434. },
  22435. "required": ["timestamp", "sessionID", "callID", "delta"],
  22436. "additionalProperties": false
  22437. }
  22438. },
  22439. "required": ["id", "type", "properties"],
  22440. "additionalProperties": false
  22441. },
  22442. "EventSessionNextToolInputEnded": {
  22443. "type": "object",
  22444. "properties": {
  22445. "id": {
  22446. "type": "string"
  22447. },
  22448. "type": {
  22449. "type": "string",
  22450. "enum": ["session.next.tool.input.ended"]
  22451. },
  22452. "properties": {
  22453. "type": "object",
  22454. "properties": {
  22455. "timestamp": {
  22456. "type": "number"
  22457. },
  22458. "sessionID": {
  22459. "type": "string",
  22460. "pattern": "^ses"
  22461. },
  22462. "callID": {
  22463. "type": "string"
  22464. },
  22465. "text": {
  22466. "type": "string"
  22467. }
  22468. },
  22469. "required": ["timestamp", "sessionID", "callID", "text"],
  22470. "additionalProperties": false
  22471. }
  22472. },
  22473. "required": ["id", "type", "properties"],
  22474. "additionalProperties": false
  22475. },
  22476. "EventSessionNextToolCalled": {
  22477. "type": "object",
  22478. "properties": {
  22479. "id": {
  22480. "type": "string"
  22481. },
  22482. "type": {
  22483. "type": "string",
  22484. "enum": ["session.next.tool.called"]
  22485. },
  22486. "properties": {
  22487. "type": "object",
  22488. "properties": {
  22489. "timestamp": {
  22490. "type": "number"
  22491. },
  22492. "sessionID": {
  22493. "type": "string",
  22494. "pattern": "^ses"
  22495. },
  22496. "callID": {
  22497. "type": "string"
  22498. },
  22499. "tool": {
  22500. "type": "string"
  22501. },
  22502. "input": {
  22503. "type": "object"
  22504. },
  22505. "provider": {
  22506. "type": "object",
  22507. "properties": {
  22508. "executed": {
  22509. "type": "boolean"
  22510. },
  22511. "metadata": {
  22512. "type": "object"
  22513. }
  22514. },
  22515. "required": ["executed"],
  22516. "additionalProperties": false
  22517. }
  22518. },
  22519. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  22520. "additionalProperties": false
  22521. }
  22522. },
  22523. "required": ["id", "type", "properties"],
  22524. "additionalProperties": false
  22525. },
  22526. "EventSessionNextToolProgress": {
  22527. "type": "object",
  22528. "properties": {
  22529. "id": {
  22530. "type": "string"
  22531. },
  22532. "type": {
  22533. "type": "string",
  22534. "enum": ["session.next.tool.progress"]
  22535. },
  22536. "properties": {
  22537. "type": "object",
  22538. "properties": {
  22539. "timestamp": {
  22540. "type": "number"
  22541. },
  22542. "sessionID": {
  22543. "type": "string",
  22544. "pattern": "^ses"
  22545. },
  22546. "callID": {
  22547. "type": "string"
  22548. },
  22549. "structured": {
  22550. "type": "object"
  22551. },
  22552. "content": {
  22553. "type": "array",
  22554. "items": {
  22555. "anyOf": [
  22556. {
  22557. "$ref": "#/components/schemas/ToolTextContent"
  22558. },
  22559. {
  22560. "$ref": "#/components/schemas/ToolFileContent"
  22561. }
  22562. ]
  22563. }
  22564. }
  22565. },
  22566. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  22567. "additionalProperties": false
  22568. }
  22569. },
  22570. "required": ["id", "type", "properties"],
  22571. "additionalProperties": false
  22572. },
  22573. "EventSessionNextToolSuccess": {
  22574. "type": "object",
  22575. "properties": {
  22576. "id": {
  22577. "type": "string"
  22578. },
  22579. "type": {
  22580. "type": "string",
  22581. "enum": ["session.next.tool.success"]
  22582. },
  22583. "properties": {
  22584. "type": "object",
  22585. "properties": {
  22586. "timestamp": {
  22587. "type": "number"
  22588. },
  22589. "sessionID": {
  22590. "type": "string",
  22591. "pattern": "^ses"
  22592. },
  22593. "callID": {
  22594. "type": "string"
  22595. },
  22596. "structured": {
  22597. "type": "object"
  22598. },
  22599. "content": {
  22600. "type": "array",
  22601. "items": {
  22602. "anyOf": [
  22603. {
  22604. "$ref": "#/components/schemas/ToolTextContent"
  22605. },
  22606. {
  22607. "$ref": "#/components/schemas/ToolFileContent"
  22608. }
  22609. ]
  22610. }
  22611. },
  22612. "provider": {
  22613. "type": "object",
  22614. "properties": {
  22615. "executed": {
  22616. "type": "boolean"
  22617. },
  22618. "metadata": {
  22619. "type": "object"
  22620. }
  22621. },
  22622. "required": ["executed"],
  22623. "additionalProperties": false
  22624. }
  22625. },
  22626. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  22627. "additionalProperties": false
  22628. }
  22629. },
  22630. "required": ["id", "type", "properties"],
  22631. "additionalProperties": false
  22632. },
  22633. "EventSessionNextToolFailed": {
  22634. "type": "object",
  22635. "properties": {
  22636. "id": {
  22637. "type": "string"
  22638. },
  22639. "type": {
  22640. "type": "string",
  22641. "enum": ["session.next.tool.failed"]
  22642. },
  22643. "properties": {
  22644. "type": "object",
  22645. "properties": {
  22646. "timestamp": {
  22647. "type": "number"
  22648. },
  22649. "sessionID": {
  22650. "type": "string",
  22651. "pattern": "^ses"
  22652. },
  22653. "callID": {
  22654. "type": "string"
  22655. },
  22656. "error": {
  22657. "$ref": "#/components/schemas/SessionErrorUnknown"
  22658. },
  22659. "provider": {
  22660. "type": "object",
  22661. "properties": {
  22662. "executed": {
  22663. "type": "boolean"
  22664. },
  22665. "metadata": {
  22666. "type": "object"
  22667. }
  22668. },
  22669. "required": ["executed"],
  22670. "additionalProperties": false
  22671. }
  22672. },
  22673. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  22674. "additionalProperties": false
  22675. }
  22676. },
  22677. "required": ["id", "type", "properties"],
  22678. "additionalProperties": false
  22679. },
  22680. "EventSessionNextRetried": {
  22681. "type": "object",
  22682. "properties": {
  22683. "id": {
  22684. "type": "string"
  22685. },
  22686. "type": {
  22687. "type": "string",
  22688. "enum": ["session.next.retried"]
  22689. },
  22690. "properties": {
  22691. "type": "object",
  22692. "properties": {
  22693. "timestamp": {
  22694. "type": "number"
  22695. },
  22696. "sessionID": {
  22697. "type": "string",
  22698. "pattern": "^ses"
  22699. },
  22700. "attempt": {
  22701. "type": "number"
  22702. },
  22703. "error": {
  22704. "$ref": "#/components/schemas/SessionNextRetry_error"
  22705. }
  22706. },
  22707. "required": ["timestamp", "sessionID", "attempt", "error"],
  22708. "additionalProperties": false
  22709. }
  22710. },
  22711. "required": ["id", "type", "properties"],
  22712. "additionalProperties": false
  22713. },
  22714. "EventSessionNextCompactionStarted": {
  22715. "type": "object",
  22716. "properties": {
  22717. "id": {
  22718. "type": "string"
  22719. },
  22720. "type": {
  22721. "type": "string",
  22722. "enum": ["session.next.compaction.started"]
  22723. },
  22724. "properties": {
  22725. "type": "object",
  22726. "properties": {
  22727. "timestamp": {
  22728. "type": "number"
  22729. },
  22730. "sessionID": {
  22731. "type": "string",
  22732. "pattern": "^ses"
  22733. },
  22734. "reason": {
  22735. "type": "string",
  22736. "enum": ["auto", "manual"]
  22737. }
  22738. },
  22739. "required": ["timestamp", "sessionID", "reason"],
  22740. "additionalProperties": false
  22741. }
  22742. },
  22743. "required": ["id", "type", "properties"],
  22744. "additionalProperties": false
  22745. },
  22746. "EventSessionNextCompactionDelta": {
  22747. "type": "object",
  22748. "properties": {
  22749. "id": {
  22750. "type": "string"
  22751. },
  22752. "type": {
  22753. "type": "string",
  22754. "enum": ["session.next.compaction.delta"]
  22755. },
  22756. "properties": {
  22757. "type": "object",
  22758. "properties": {
  22759. "timestamp": {
  22760. "type": "number"
  22761. },
  22762. "sessionID": {
  22763. "type": "string",
  22764. "pattern": "^ses"
  22765. },
  22766. "text": {
  22767. "type": "string"
  22768. }
  22769. },
  22770. "required": ["timestamp", "sessionID", "text"],
  22771. "additionalProperties": false
  22772. }
  22773. },
  22774. "required": ["id", "type", "properties"],
  22775. "additionalProperties": false
  22776. },
  22777. "EventSessionNextCompactionEnded": {
  22778. "type": "object",
  22779. "properties": {
  22780. "id": {
  22781. "type": "string"
  22782. },
  22783. "type": {
  22784. "type": "string",
  22785. "enum": ["session.next.compaction.ended"]
  22786. },
  22787. "properties": {
  22788. "type": "object",
  22789. "properties": {
  22790. "timestamp": {
  22791. "type": "number"
  22792. },
  22793. "sessionID": {
  22794. "type": "string",
  22795. "pattern": "^ses"
  22796. },
  22797. "text": {
  22798. "type": "string"
  22799. },
  22800. "include": {
  22801. "type": "string"
  22802. }
  22803. },
  22804. "required": ["timestamp", "sessionID", "text"],
  22805. "additionalProperties": false
  22806. }
  22807. },
  22808. "required": ["id", "type", "properties"],
  22809. "additionalProperties": false
  22810. },
  22811. "EventFileWatcherUpdated": {
  22812. "type": "object",
  22813. "properties": {
  22814. "id": {
  22815. "type": "string"
  22816. },
  22817. "type": {
  22818. "type": "string",
  22819. "enum": ["file.watcher.updated"]
  22820. },
  22821. "properties": {
  22822. "type": "object",
  22823. "properties": {
  22824. "file": {
  22825. "type": "string"
  22826. },
  22827. "event": {
  22828. "type": "string",
  22829. "enum": ["add", "change", "unlink"]
  22830. }
  22831. },
  22832. "required": ["file", "event"],
  22833. "additionalProperties": false
  22834. }
  22835. },
  22836. "required": ["id", "type", "properties"],
  22837. "additionalProperties": false
  22838. },
  22839. "EventSessionCreated": {
  22840. "type": "object",
  22841. "properties": {
  22842. "id": {
  22843. "type": "string"
  22844. },
  22845. "type": {
  22846. "type": "string",
  22847. "enum": ["session.created"]
  22848. },
  22849. "properties": {
  22850. "type": "object",
  22851. "properties": {
  22852. "sessionID": {
  22853. "type": "string",
  22854. "pattern": "^ses"
  22855. },
  22856. "info": {
  22857. "$ref": "#/components/schemas/Session"
  22858. }
  22859. },
  22860. "required": ["sessionID", "info"],
  22861. "additionalProperties": false
  22862. }
  22863. },
  22864. "required": ["id", "type", "properties"],
  22865. "additionalProperties": false
  22866. },
  22867. "EventSessionUpdated": {
  22868. "type": "object",
  22869. "properties": {
  22870. "id": {
  22871. "type": "string"
  22872. },
  22873. "type": {
  22874. "type": "string",
  22875. "enum": ["session.updated"]
  22876. },
  22877. "properties": {
  22878. "type": "object",
  22879. "properties": {
  22880. "sessionID": {
  22881. "type": "string",
  22882. "pattern": "^ses"
  22883. },
  22884. "info": {
  22885. "$ref": "#/components/schemas/Session"
  22886. }
  22887. },
  22888. "required": ["sessionID", "info"],
  22889. "additionalProperties": false
  22890. }
  22891. },
  22892. "required": ["id", "type", "properties"],
  22893. "additionalProperties": false
  22894. },
  22895. "EventSessionDeleted": {
  22896. "type": "object",
  22897. "properties": {
  22898. "id": {
  22899. "type": "string"
  22900. },
  22901. "type": {
  22902. "type": "string",
  22903. "enum": ["session.deleted"]
  22904. },
  22905. "properties": {
  22906. "type": "object",
  22907. "properties": {
  22908. "sessionID": {
  22909. "type": "string",
  22910. "pattern": "^ses"
  22911. },
  22912. "info": {
  22913. "$ref": "#/components/schemas/Session"
  22914. }
  22915. },
  22916. "required": ["sessionID", "info"],
  22917. "additionalProperties": false
  22918. }
  22919. },
  22920. "required": ["id", "type", "properties"],
  22921. "additionalProperties": false
  22922. },
  22923. "EventMessageUpdated": {
  22924. "type": "object",
  22925. "properties": {
  22926. "id": {
  22927. "type": "string"
  22928. },
  22929. "type": {
  22930. "type": "string",
  22931. "enum": ["message.updated"]
  22932. },
  22933. "properties": {
  22934. "type": "object",
  22935. "properties": {
  22936. "sessionID": {
  22937. "type": "string",
  22938. "pattern": "^ses"
  22939. },
  22940. "info": {
  22941. "$ref": "#/components/schemas/Message"
  22942. }
  22943. },
  22944. "required": ["sessionID", "info"],
  22945. "additionalProperties": false
  22946. }
  22947. },
  22948. "required": ["id", "type", "properties"],
  22949. "additionalProperties": false
  22950. },
  22951. "EventMessageRemoved": {
  22952. "type": "object",
  22953. "properties": {
  22954. "id": {
  22955. "type": "string"
  22956. },
  22957. "type": {
  22958. "type": "string",
  22959. "enum": ["message.removed"]
  22960. },
  22961. "properties": {
  22962. "type": "object",
  22963. "properties": {
  22964. "sessionID": {
  22965. "type": "string",
  22966. "pattern": "^ses"
  22967. },
  22968. "messageID": {
  22969. "type": "string",
  22970. "pattern": "^msg"
  22971. }
  22972. },
  22973. "required": ["sessionID", "messageID"],
  22974. "additionalProperties": false
  22975. }
  22976. },
  22977. "required": ["id", "type", "properties"],
  22978. "additionalProperties": false
  22979. },
  22980. "EventMessagePartUpdated": {
  22981. "type": "object",
  22982. "properties": {
  22983. "id": {
  22984. "type": "string"
  22985. },
  22986. "type": {
  22987. "type": "string",
  22988. "enum": ["message.part.updated"]
  22989. },
  22990. "properties": {
  22991. "type": "object",
  22992. "properties": {
  22993. "sessionID": {
  22994. "type": "string",
  22995. "pattern": "^ses"
  22996. },
  22997. "part": {
  22998. "$ref": "#/components/schemas/Part"
  22999. },
  23000. "time": {
  23001. "type": "number"
  23002. }
  23003. },
  23004. "required": ["sessionID", "part", "time"],
  23005. "additionalProperties": false
  23006. }
  23007. },
  23008. "required": ["id", "type", "properties"],
  23009. "additionalProperties": false
  23010. },
  23011. "EventMessagePartRemoved": {
  23012. "type": "object",
  23013. "properties": {
  23014. "id": {
  23015. "type": "string"
  23016. },
  23017. "type": {
  23018. "type": "string",
  23019. "enum": ["message.part.removed"]
  23020. },
  23021. "properties": {
  23022. "type": "object",
  23023. "properties": {
  23024. "sessionID": {
  23025. "type": "string",
  23026. "pattern": "^ses"
  23027. },
  23028. "messageID": {
  23029. "type": "string",
  23030. "pattern": "^msg"
  23031. },
  23032. "partID": {
  23033. "type": "string",
  23034. "pattern": "^prt"
  23035. }
  23036. },
  23037. "required": ["sessionID", "messageID", "partID"],
  23038. "additionalProperties": false
  23039. }
  23040. },
  23041. "required": ["id", "type", "properties"],
  23042. "additionalProperties": false
  23043. },
  23044. "EventMessagePartDelta": {
  23045. "type": "object",
  23046. "properties": {
  23047. "id": {
  23048. "type": "string"
  23049. },
  23050. "type": {
  23051. "type": "string",
  23052. "enum": ["message.part.delta"]
  23053. },
  23054. "properties": {
  23055. "type": "object",
  23056. "properties": {
  23057. "sessionID": {
  23058. "type": "string",
  23059. "pattern": "^ses"
  23060. },
  23061. "messageID": {
  23062. "type": "string",
  23063. "pattern": "^msg"
  23064. },
  23065. "partID": {
  23066. "type": "string",
  23067. "pattern": "^prt"
  23068. },
  23069. "field": {
  23070. "type": "string"
  23071. },
  23072. "delta": {
  23073. "type": "string"
  23074. }
  23075. },
  23076. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  23077. "additionalProperties": false
  23078. }
  23079. },
  23080. "required": ["id", "type", "properties"],
  23081. "additionalProperties": false
  23082. },
  23083. "EventPermissionAsked": {
  23084. "type": "object",
  23085. "properties": {
  23086. "id": {
  23087. "type": "string"
  23088. },
  23089. "type": {
  23090. "type": "string",
  23091. "enum": ["permission.asked"]
  23092. },
  23093. "properties": {
  23094. "type": "object",
  23095. "properties": {
  23096. "id": {
  23097. "type": "string",
  23098. "pattern": "^per"
  23099. },
  23100. "sessionID": {
  23101. "type": "string",
  23102. "pattern": "^ses"
  23103. },
  23104. "permission": {
  23105. "type": "string"
  23106. },
  23107. "patterns": {
  23108. "type": "array",
  23109. "items": {
  23110. "type": "string"
  23111. }
  23112. },
  23113. "metadata": {
  23114. "type": "object"
  23115. },
  23116. "always": {
  23117. "type": "array",
  23118. "items": {
  23119. "type": "string"
  23120. }
  23121. },
  23122. "tool": {
  23123. "type": "object",
  23124. "properties": {
  23125. "messageID": {
  23126. "type": "string",
  23127. "pattern": "^msg"
  23128. },
  23129. "callID": {
  23130. "type": "string"
  23131. }
  23132. },
  23133. "required": ["messageID", "callID"],
  23134. "additionalProperties": false
  23135. }
  23136. },
  23137. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  23138. "additionalProperties": false
  23139. }
  23140. },
  23141. "required": ["id", "type", "properties"],
  23142. "additionalProperties": false
  23143. },
  23144. "EventPermissionReplied": {
  23145. "type": "object",
  23146. "properties": {
  23147. "id": {
  23148. "type": "string"
  23149. },
  23150. "type": {
  23151. "type": "string",
  23152. "enum": ["permission.replied"]
  23153. },
  23154. "properties": {
  23155. "type": "object",
  23156. "properties": {
  23157. "sessionID": {
  23158. "type": "string",
  23159. "pattern": "^ses"
  23160. },
  23161. "requestID": {
  23162. "type": "string",
  23163. "pattern": "^per"
  23164. },
  23165. "reply": {
  23166. "type": "string",
  23167. "enum": ["once", "always", "reject"]
  23168. }
  23169. },
  23170. "required": ["sessionID", "requestID", "reply"],
  23171. "additionalProperties": false
  23172. }
  23173. },
  23174. "required": ["id", "type", "properties"],
  23175. "additionalProperties": false
  23176. },
  23177. "EventSessionDiff": {
  23178. "type": "object",
  23179. "properties": {
  23180. "id": {
  23181. "type": "string"
  23182. },
  23183. "type": {
  23184. "type": "string",
  23185. "enum": ["session.diff"]
  23186. },
  23187. "properties": {
  23188. "type": "object",
  23189. "properties": {
  23190. "sessionID": {
  23191. "type": "string",
  23192. "pattern": "^ses"
  23193. },
  23194. "diff": {
  23195. "type": "array",
  23196. "items": {
  23197. "$ref": "#/components/schemas/SnapshotFileDiff"
  23198. }
  23199. }
  23200. },
  23201. "required": ["sessionID", "diff"],
  23202. "additionalProperties": false
  23203. }
  23204. },
  23205. "required": ["id", "type", "properties"],
  23206. "additionalProperties": false
  23207. },
  23208. "EventSessionError": {
  23209. "type": "object",
  23210. "properties": {
  23211. "id": {
  23212. "type": "string"
  23213. },
  23214. "type": {
  23215. "type": "string",
  23216. "enum": ["session.error"]
  23217. },
  23218. "properties": {
  23219. "type": "object",
  23220. "properties": {
  23221. "sessionID": {
  23222. "type": "string",
  23223. "pattern": "^ses"
  23224. },
  23225. "error": {
  23226. "anyOf": [
  23227. {
  23228. "$ref": "#/components/schemas/ProviderAuthError"
  23229. },
  23230. {
  23231. "$ref": "#/components/schemas/UnknownError"
  23232. },
  23233. {
  23234. "$ref": "#/components/schemas/MessageOutputLengthError"
  23235. },
  23236. {
  23237. "$ref": "#/components/schemas/MessageAbortedError"
  23238. },
  23239. {
  23240. "$ref": "#/components/schemas/StructuredOutputError"
  23241. },
  23242. {
  23243. "$ref": "#/components/schemas/ContextOverflowError"
  23244. },
  23245. {
  23246. "$ref": "#/components/schemas/APIError"
  23247. }
  23248. ]
  23249. }
  23250. },
  23251. "additionalProperties": false
  23252. }
  23253. },
  23254. "required": ["id", "type", "properties"],
  23255. "additionalProperties": false
  23256. },
  23257. "EventQuestionAsked": {
  23258. "type": "object",
  23259. "properties": {
  23260. "id": {
  23261. "type": "string"
  23262. },
  23263. "type": {
  23264. "type": "string",
  23265. "enum": ["question.asked"]
  23266. },
  23267. "properties": {
  23268. "type": "object",
  23269. "properties": {
  23270. "id": {
  23271. "type": "string",
  23272. "pattern": "^que"
  23273. },
  23274. "sessionID": {
  23275. "type": "string",
  23276. "pattern": "^ses"
  23277. },
  23278. "questions": {
  23279. "type": "array",
  23280. "items": {
  23281. "$ref": "#/components/schemas/QuestionInfo"
  23282. },
  23283. "description": "Questions to ask"
  23284. },
  23285. "tool": {
  23286. "$ref": "#/components/schemas/QuestionTool"
  23287. }
  23288. },
  23289. "required": ["id", "sessionID", "questions"],
  23290. "additionalProperties": false
  23291. }
  23292. },
  23293. "required": ["id", "type", "properties"],
  23294. "additionalProperties": false
  23295. },
  23296. "EventQuestionReplied": {
  23297. "type": "object",
  23298. "properties": {
  23299. "id": {
  23300. "type": "string"
  23301. },
  23302. "type": {
  23303. "type": "string",
  23304. "enum": ["question.replied"]
  23305. },
  23306. "properties": {
  23307. "type": "object",
  23308. "properties": {
  23309. "sessionID": {
  23310. "type": "string",
  23311. "pattern": "^ses"
  23312. },
  23313. "requestID": {
  23314. "type": "string",
  23315. "pattern": "^que"
  23316. },
  23317. "answers": {
  23318. "type": "array",
  23319. "items": {
  23320. "$ref": "#/components/schemas/QuestionAnswer"
  23321. }
  23322. }
  23323. },
  23324. "required": ["sessionID", "requestID", "answers"],
  23325. "additionalProperties": false
  23326. }
  23327. },
  23328. "required": ["id", "type", "properties"],
  23329. "additionalProperties": false
  23330. },
  23331. "EventQuestionRejected": {
  23332. "type": "object",
  23333. "properties": {
  23334. "id": {
  23335. "type": "string"
  23336. },
  23337. "type": {
  23338. "type": "string",
  23339. "enum": ["question.rejected"]
  23340. },
  23341. "properties": {
  23342. "type": "object",
  23343. "properties": {
  23344. "sessionID": {
  23345. "type": "string",
  23346. "pattern": "^ses"
  23347. },
  23348. "requestID": {
  23349. "type": "string",
  23350. "pattern": "^que"
  23351. }
  23352. },
  23353. "required": ["sessionID", "requestID"],
  23354. "additionalProperties": false
  23355. }
  23356. },
  23357. "required": ["id", "type", "properties"],
  23358. "additionalProperties": false
  23359. },
  23360. "EventTodoUpdated": {
  23361. "type": "object",
  23362. "properties": {
  23363. "id": {
  23364. "type": "string"
  23365. },
  23366. "type": {
  23367. "type": "string",
  23368. "enum": ["todo.updated"]
  23369. },
  23370. "properties": {
  23371. "type": "object",
  23372. "properties": {
  23373. "sessionID": {
  23374. "type": "string",
  23375. "pattern": "^ses"
  23376. },
  23377. "todos": {
  23378. "type": "array",
  23379. "items": {
  23380. "$ref": "#/components/schemas/Todo"
  23381. }
  23382. }
  23383. },
  23384. "required": ["sessionID", "todos"],
  23385. "additionalProperties": false
  23386. }
  23387. },
  23388. "required": ["id", "type", "properties"],
  23389. "additionalProperties": false
  23390. },
  23391. "EventSessionStatus": {
  23392. "type": "object",
  23393. "properties": {
  23394. "id": {
  23395. "type": "string"
  23396. },
  23397. "type": {
  23398. "type": "string",
  23399. "enum": ["session.status"]
  23400. },
  23401. "properties": {
  23402. "type": "object",
  23403. "properties": {
  23404. "sessionID": {
  23405. "type": "string",
  23406. "pattern": "^ses"
  23407. },
  23408. "status": {
  23409. "$ref": "#/components/schemas/SessionStatus"
  23410. }
  23411. },
  23412. "required": ["sessionID", "status"],
  23413. "additionalProperties": false
  23414. }
  23415. },
  23416. "required": ["id", "type", "properties"],
  23417. "additionalProperties": false
  23418. },
  23419. "EventSessionIdle": {
  23420. "type": "object",
  23421. "properties": {
  23422. "id": {
  23423. "type": "string"
  23424. },
  23425. "type": {
  23426. "type": "string",
  23427. "enum": ["session.idle"]
  23428. },
  23429. "properties": {
  23430. "type": "object",
  23431. "properties": {
  23432. "sessionID": {
  23433. "type": "string",
  23434. "pattern": "^ses"
  23435. }
  23436. },
  23437. "required": ["sessionID"],
  23438. "additionalProperties": false
  23439. }
  23440. },
  23441. "required": ["id", "type", "properties"],
  23442. "additionalProperties": false
  23443. },
  23444. "EventSessionCompacted": {
  23445. "type": "object",
  23446. "properties": {
  23447. "id": {
  23448. "type": "string"
  23449. },
  23450. "type": {
  23451. "type": "string",
  23452. "enum": ["session.compacted"]
  23453. },
  23454. "properties": {
  23455. "type": "object",
  23456. "properties": {
  23457. "sessionID": {
  23458. "type": "string",
  23459. "pattern": "^ses"
  23460. }
  23461. },
  23462. "required": ["sessionID"],
  23463. "additionalProperties": false
  23464. }
  23465. },
  23466. "required": ["id", "type", "properties"],
  23467. "additionalProperties": false
  23468. },
  23469. "EventLspUpdated": {
  23470. "type": "object",
  23471. "properties": {
  23472. "id": {
  23473. "type": "string"
  23474. },
  23475. "type": {
  23476. "type": "string",
  23477. "enum": ["lsp.updated"]
  23478. },
  23479. "properties": {
  23480. "type": "object",
  23481. "properties": {}
  23482. }
  23483. },
  23484. "required": ["id", "type", "properties"],
  23485. "additionalProperties": false
  23486. },
  23487. "EventMcpToolsChanged": {
  23488. "type": "object",
  23489. "properties": {
  23490. "id": {
  23491. "type": "string"
  23492. },
  23493. "type": {
  23494. "type": "string",
  23495. "enum": ["mcp.tools.changed"]
  23496. },
  23497. "properties": {
  23498. "type": "object",
  23499. "properties": {
  23500. "server": {
  23501. "type": "string"
  23502. }
  23503. },
  23504. "required": ["server"],
  23505. "additionalProperties": false
  23506. }
  23507. },
  23508. "required": ["id", "type", "properties"],
  23509. "additionalProperties": false
  23510. },
  23511. "EventMcpBrowserOpenFailed": {
  23512. "type": "object",
  23513. "properties": {
  23514. "id": {
  23515. "type": "string"
  23516. },
  23517. "type": {
  23518. "type": "string",
  23519. "enum": ["mcp.browser.open.failed"]
  23520. },
  23521. "properties": {
  23522. "type": "object",
  23523. "properties": {
  23524. "mcpName": {
  23525. "type": "string"
  23526. },
  23527. "url": {
  23528. "type": "string"
  23529. }
  23530. },
  23531. "required": ["mcpName", "url"],
  23532. "additionalProperties": false
  23533. }
  23534. },
  23535. "required": ["id", "type", "properties"],
  23536. "additionalProperties": false
  23537. },
  23538. "EventCommandExecuted": {
  23539. "type": "object",
  23540. "properties": {
  23541. "id": {
  23542. "type": "string"
  23543. },
  23544. "type": {
  23545. "type": "string",
  23546. "enum": ["command.executed"]
  23547. },
  23548. "properties": {
  23549. "type": "object",
  23550. "properties": {
  23551. "name": {
  23552. "type": "string"
  23553. },
  23554. "sessionID": {
  23555. "type": "string",
  23556. "pattern": "^ses"
  23557. },
  23558. "arguments": {
  23559. "type": "string"
  23560. },
  23561. "messageID": {
  23562. "type": "string",
  23563. "pattern": "^msg"
  23564. }
  23565. },
  23566. "required": ["name", "sessionID", "arguments", "messageID"],
  23567. "additionalProperties": false
  23568. }
  23569. },
  23570. "required": ["id", "type", "properties"],
  23571. "additionalProperties": false
  23572. },
  23573. "EventProjectUpdated": {
  23574. "type": "object",
  23575. "properties": {
  23576. "id": {
  23577. "type": "string"
  23578. },
  23579. "type": {
  23580. "type": "string",
  23581. "enum": ["project.updated"]
  23582. },
  23583. "properties": {
  23584. "type": "object",
  23585. "properties": {
  23586. "id": {
  23587. "type": "string"
  23588. },
  23589. "worktree": {
  23590. "type": "string"
  23591. },
  23592. "vcs": {
  23593. "type": "string",
  23594. "enum": ["git"]
  23595. },
  23596. "name": {
  23597. "type": "string"
  23598. },
  23599. "icon": {
  23600. "type": "object",
  23601. "properties": {
  23602. "url": {
  23603. "type": "string"
  23604. },
  23605. "override": {
  23606. "type": "string"
  23607. },
  23608. "color": {
  23609. "type": "string"
  23610. }
  23611. },
  23612. "additionalProperties": false
  23613. },
  23614. "commands": {
  23615. "type": "object",
  23616. "properties": {
  23617. "start": {
  23618. "type": "string",
  23619. "description": "Startup script to run when creating a new workspace (worktree)"
  23620. }
  23621. },
  23622. "additionalProperties": false
  23623. },
  23624. "time": {
  23625. "type": "object",
  23626. "properties": {
  23627. "created": {
  23628. "type": "integer",
  23629. "minimum": 0
  23630. },
  23631. "updated": {
  23632. "type": "integer",
  23633. "minimum": 0
  23634. },
  23635. "initialized": {
  23636. "type": "integer",
  23637. "minimum": 0
  23638. }
  23639. },
  23640. "required": ["created", "updated"],
  23641. "additionalProperties": false
  23642. },
  23643. "sandboxes": {
  23644. "type": "array",
  23645. "items": {
  23646. "type": "string"
  23647. }
  23648. }
  23649. },
  23650. "required": ["id", "worktree", "time", "sandboxes"],
  23651. "additionalProperties": false
  23652. }
  23653. },
  23654. "required": ["id", "type", "properties"],
  23655. "additionalProperties": false
  23656. },
  23657. "EventVcsBranchUpdated": {
  23658. "type": "object",
  23659. "properties": {
  23660. "id": {
  23661. "type": "string"
  23662. },
  23663. "type": {
  23664. "type": "string",
  23665. "enum": ["vcs.branch.updated"]
  23666. },
  23667. "properties": {
  23668. "type": "object",
  23669. "properties": {
  23670. "branch": {
  23671. "type": "string"
  23672. }
  23673. },
  23674. "additionalProperties": false
  23675. }
  23676. },
  23677. "required": ["id", "type", "properties"],
  23678. "additionalProperties": false
  23679. },
  23680. "EventWorkspaceReady": {
  23681. "type": "object",
  23682. "properties": {
  23683. "id": {
  23684. "type": "string"
  23685. },
  23686. "type": {
  23687. "type": "string",
  23688. "enum": ["workspace.ready"]
  23689. },
  23690. "properties": {
  23691. "type": "object",
  23692. "properties": {
  23693. "name": {
  23694. "type": "string"
  23695. }
  23696. },
  23697. "required": ["name"],
  23698. "additionalProperties": false
  23699. }
  23700. },
  23701. "required": ["id", "type", "properties"],
  23702. "additionalProperties": false
  23703. },
  23704. "EventWorkspaceFailed": {
  23705. "type": "object",
  23706. "properties": {
  23707. "id": {
  23708. "type": "string"
  23709. },
  23710. "type": {
  23711. "type": "string",
  23712. "enum": ["workspace.failed"]
  23713. },
  23714. "properties": {
  23715. "type": "object",
  23716. "properties": {
  23717. "message": {
  23718. "type": "string"
  23719. }
  23720. },
  23721. "required": ["message"],
  23722. "additionalProperties": false
  23723. }
  23724. },
  23725. "required": ["id", "type", "properties"],
  23726. "additionalProperties": false
  23727. },
  23728. "EventWorkspaceStatus": {
  23729. "type": "object",
  23730. "properties": {
  23731. "id": {
  23732. "type": "string"
  23733. },
  23734. "type": {
  23735. "type": "string",
  23736. "enum": ["workspace.status"]
  23737. },
  23738. "properties": {
  23739. "type": "object",
  23740. "properties": {
  23741. "workspaceID": {
  23742. "type": "string",
  23743. "pattern": "^wrk"
  23744. },
  23745. "status": {
  23746. "type": "string",
  23747. "enum": ["connected", "connecting", "disconnected", "error"]
  23748. }
  23749. },
  23750. "required": ["workspaceID", "status"],
  23751. "additionalProperties": false
  23752. }
  23753. },
  23754. "required": ["id", "type", "properties"],
  23755. "additionalProperties": false
  23756. },
  23757. "EventWorktreeReady": {
  23758. "type": "object",
  23759. "properties": {
  23760. "id": {
  23761. "type": "string"
  23762. },
  23763. "type": {
  23764. "type": "string",
  23765. "enum": ["worktree.ready"]
  23766. },
  23767. "properties": {
  23768. "type": "object",
  23769. "properties": {
  23770. "name": {
  23771. "type": "string"
  23772. },
  23773. "branch": {
  23774. "type": "string"
  23775. }
  23776. },
  23777. "required": ["name"],
  23778. "additionalProperties": false
  23779. }
  23780. },
  23781. "required": ["id", "type", "properties"],
  23782. "additionalProperties": false
  23783. },
  23784. "EventWorktreeFailed": {
  23785. "type": "object",
  23786. "properties": {
  23787. "id": {
  23788. "type": "string"
  23789. },
  23790. "type": {
  23791. "type": "string",
  23792. "enum": ["worktree.failed"]
  23793. },
  23794. "properties": {
  23795. "type": "object",
  23796. "properties": {
  23797. "message": {
  23798. "type": "string"
  23799. }
  23800. },
  23801. "required": ["message"],
  23802. "additionalProperties": false
  23803. }
  23804. },
  23805. "required": ["id", "type", "properties"],
  23806. "additionalProperties": false
  23807. },
  23808. "EventPtyCreated": {
  23809. "type": "object",
  23810. "properties": {
  23811. "id": {
  23812. "type": "string"
  23813. },
  23814. "type": {
  23815. "type": "string",
  23816. "enum": ["pty.created"]
  23817. },
  23818. "properties": {
  23819. "type": "object",
  23820. "properties": {
  23821. "info": {
  23822. "$ref": "#/components/schemas/Pty"
  23823. }
  23824. },
  23825. "required": ["info"],
  23826. "additionalProperties": false
  23827. }
  23828. },
  23829. "required": ["id", "type", "properties"],
  23830. "additionalProperties": false
  23831. },
  23832. "EventPtyUpdated": {
  23833. "type": "object",
  23834. "properties": {
  23835. "id": {
  23836. "type": "string"
  23837. },
  23838. "type": {
  23839. "type": "string",
  23840. "enum": ["pty.updated"]
  23841. },
  23842. "properties": {
  23843. "type": "object",
  23844. "properties": {
  23845. "info": {
  23846. "$ref": "#/components/schemas/Pty"
  23847. }
  23848. },
  23849. "required": ["info"],
  23850. "additionalProperties": false
  23851. }
  23852. },
  23853. "required": ["id", "type", "properties"],
  23854. "additionalProperties": false
  23855. },
  23856. "EventPtyExited": {
  23857. "type": "object",
  23858. "properties": {
  23859. "id": {
  23860. "type": "string"
  23861. },
  23862. "type": {
  23863. "type": "string",
  23864. "enum": ["pty.exited"]
  23865. },
  23866. "properties": {
  23867. "type": "object",
  23868. "properties": {
  23869. "id": {
  23870. "type": "string",
  23871. "pattern": "^pty"
  23872. },
  23873. "exitCode": {
  23874. "type": "integer",
  23875. "minimum": 0
  23876. }
  23877. },
  23878. "required": ["id", "exitCode"],
  23879. "additionalProperties": false
  23880. }
  23881. },
  23882. "required": ["id", "type", "properties"],
  23883. "additionalProperties": false
  23884. },
  23885. "EventPtyDeleted": {
  23886. "type": "object",
  23887. "properties": {
  23888. "id": {
  23889. "type": "string"
  23890. },
  23891. "type": {
  23892. "type": "string",
  23893. "enum": ["pty.deleted"]
  23894. },
  23895. "properties": {
  23896. "type": "object",
  23897. "properties": {
  23898. "id": {
  23899. "type": "string",
  23900. "pattern": "^pty"
  23901. }
  23902. },
  23903. "required": ["id"],
  23904. "additionalProperties": false
  23905. }
  23906. },
  23907. "required": ["id", "type", "properties"],
  23908. "additionalProperties": false
  23909. },
  23910. "EventInstallationUpdated": {
  23911. "type": "object",
  23912. "properties": {
  23913. "id": {
  23914. "type": "string"
  23915. },
  23916. "type": {
  23917. "type": "string",
  23918. "enum": ["installation.updated"]
  23919. },
  23920. "properties": {
  23921. "type": "object",
  23922. "properties": {
  23923. "version": {
  23924. "type": "string"
  23925. }
  23926. },
  23927. "required": ["version"],
  23928. "additionalProperties": false
  23929. }
  23930. },
  23931. "required": ["id", "type", "properties"],
  23932. "additionalProperties": false
  23933. },
  23934. "EventInstallationUpdate-available": {
  23935. "type": "object",
  23936. "properties": {
  23937. "id": {
  23938. "type": "string"
  23939. },
  23940. "type": {
  23941. "type": "string",
  23942. "enum": ["installation.update-available"]
  23943. },
  23944. "properties": {
  23945. "type": "object",
  23946. "properties": {
  23947. "version": {
  23948. "type": "string"
  23949. }
  23950. },
  23951. "required": ["version"],
  23952. "additionalProperties": false
  23953. }
  23954. },
  23955. "required": ["id", "type", "properties"],
  23956. "additionalProperties": false
  23957. },
  23958. "EventServerConnected": {
  23959. "type": "object",
  23960. "properties": {
  23961. "id": {
  23962. "type": "string"
  23963. },
  23964. "type": {
  23965. "type": "string",
  23966. "enum": ["server.connected"]
  23967. },
  23968. "properties": {
  23969. "type": "object",
  23970. "properties": {}
  23971. }
  23972. },
  23973. "required": ["id", "type", "properties"],
  23974. "additionalProperties": false
  23975. },
  23976. "EventGlobalDisposed": {
  23977. "type": "object",
  23978. "properties": {
  23979. "id": {
  23980. "type": "string"
  23981. },
  23982. "type": {
  23983. "type": "string",
  23984. "enum": ["global.disposed"]
  23985. },
  23986. "properties": {
  23987. "type": "object",
  23988. "properties": {}
  23989. }
  23990. },
  23991. "required": ["id", "type", "properties"],
  23992. "additionalProperties": false
  23993. },
  23994. "EventAccountAdded": {
  23995. "type": "object",
  23996. "properties": {
  23997. "id": {
  23998. "type": "string"
  23999. },
  24000. "type": {
  24001. "type": "string",
  24002. "enum": ["account.added"]
  24003. },
  24004. "properties": {
  24005. "type": "object",
  24006. "properties": {
  24007. "account": {
  24008. "$ref": "#/components/schemas/AuthInfo"
  24009. }
  24010. },
  24011. "required": ["account"],
  24012. "additionalProperties": false
  24013. }
  24014. },
  24015. "required": ["id", "type", "properties"],
  24016. "additionalProperties": false
  24017. },
  24018. "EventAccountRemoved": {
  24019. "type": "object",
  24020. "properties": {
  24021. "id": {
  24022. "type": "string"
  24023. },
  24024. "type": {
  24025. "type": "string",
  24026. "enum": ["account.removed"]
  24027. },
  24028. "properties": {
  24029. "type": "object",
  24030. "properties": {
  24031. "account": {
  24032. "$ref": "#/components/schemas/AuthInfo"
  24033. }
  24034. },
  24035. "required": ["account"],
  24036. "additionalProperties": false
  24037. }
  24038. },
  24039. "required": ["id", "type", "properties"],
  24040. "additionalProperties": false
  24041. },
  24042. "EventAccountSwitched": {
  24043. "type": "object",
  24044. "properties": {
  24045. "id": {
  24046. "type": "string"
  24047. },
  24048. "type": {
  24049. "type": "string",
  24050. "enum": ["account.switched"]
  24051. },
  24052. "properties": {
  24053. "type": "object",
  24054. "properties": {
  24055. "serviceID": {
  24056. "type": "string"
  24057. },
  24058. "from": {
  24059. "type": "string"
  24060. },
  24061. "to": {
  24062. "type": "string"
  24063. }
  24064. },
  24065. "required": ["serviceID"],
  24066. "additionalProperties": false
  24067. }
  24068. },
  24069. "required": ["id", "type", "properties"],
  24070. "additionalProperties": false
  24071. },
  24072. "BadRequestError": {
  24073. "type": "object",
  24074. "required": ["name", "data"],
  24075. "properties": {
  24076. "name": {
  24077. "type": "string",
  24078. "enum": ["BadRequest"]
  24079. },
  24080. "data": {
  24081. "type": "object",
  24082. "required": ["message"],
  24083. "properties": {
  24084. "message": {
  24085. "type": "string"
  24086. },
  24087. "kind": {
  24088. "type": "string",
  24089. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  24090. }
  24091. }
  24092. }
  24093. }
  24094. }
  24095. }
  24096. },
  24097. "security": [],
  24098. "tags": [
  24099. {
  24100. "name": "control",
  24101. "description": "Control plane routes."
  24102. },
  24103. {
  24104. "name": "global",
  24105. "description": "Global server routes."
  24106. },
  24107. {
  24108. "name": "event",
  24109. "description": "Instance event stream route."
  24110. },
  24111. {
  24112. "name": "config",
  24113. "description": "Experimental HttpApi config routes."
  24114. },
  24115. {
  24116. "name": "experimental",
  24117. "description": "Experimental HttpApi read-only routes."
  24118. },
  24119. {
  24120. "name": "file",
  24121. "description": "Experimental HttpApi file routes."
  24122. },
  24123. {
  24124. "name": "instance",
  24125. "description": "Experimental HttpApi instance read routes."
  24126. },
  24127. {
  24128. "name": "mcp",
  24129. "description": "Experimental HttpApi MCP routes."
  24130. },
  24131. {
  24132. "name": "project",
  24133. "description": "Experimental HttpApi project routes."
  24134. },
  24135. {
  24136. "name": "pty",
  24137. "description": "Experimental HttpApi PTY routes."
  24138. },
  24139. {
  24140. "name": "question",
  24141. "description": "Question routes."
  24142. },
  24143. {
  24144. "name": "permission",
  24145. "description": "Experimental HttpApi permission routes."
  24146. },
  24147. {
  24148. "name": "provider",
  24149. "description": "Experimental HttpApi provider routes."
  24150. },
  24151. {
  24152. "name": "session",
  24153. "description": "Experimental HttpApi session routes."
  24154. },
  24155. {
  24156. "name": "sync",
  24157. "description": "Experimental HttpApi sync routes."
  24158. },
  24159. {
  24160. "name": "v2",
  24161. "description": "Experimental v2 routes."
  24162. },
  24163. {
  24164. "name": "v2 messages",
  24165. "description": "Experimental v2 message routes."
  24166. },
  24167. {
  24168. "name": "v2 models",
  24169. "description": "Experimental v2 model routes."
  24170. },
  24171. {
  24172. "name": "v2 providers",
  24173. "description": "Experimental v2 provider routes."
  24174. },
  24175. {
  24176. "name": "tui",
  24177. "description": "Experimental HttpApi TUI routes."
  24178. },
  24179. {
  24180. "name": "workspace",
  24181. "description": "Experimental HttpApi workspace routes."
  24182. },
  24183. {
  24184. "name": "pty",
  24185. "description": "PTY websocket route."
  24186. }
  24187. ]
  24188. }