openapi.json 693 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791
  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. "/api/permission/request": {
  9020. "get": {
  9021. "tags": ["v2 permissions"],
  9022. "operationId": "v2.permission.request.list",
  9023. "parameters": [
  9024. {
  9025. "name": "location",
  9026. "in": "query",
  9027. "schema": {
  9028. "type": "object",
  9029. "properties": {
  9030. "directory": {
  9031. "type": "string"
  9032. },
  9033. "workspace": {
  9034. "type": "string"
  9035. }
  9036. },
  9037. "additionalProperties": false
  9038. },
  9039. "required": false,
  9040. "style": "deepObject",
  9041. "explode": true
  9042. }
  9043. ],
  9044. "security": [],
  9045. "responses": {
  9046. "200": {
  9047. "description": "Success",
  9048. "content": {
  9049. "application/json": {
  9050. "schema": {
  9051. "type": "array",
  9052. "items": {
  9053. "$ref": "#/components/schemas/PermissionV2Request"
  9054. }
  9055. }
  9056. }
  9057. }
  9058. },
  9059. "400": {
  9060. "description": "InvalidRequestError",
  9061. "content": {
  9062. "application/json": {
  9063. "schema": {
  9064. "$ref": "#/components/schemas/InvalidRequestError"
  9065. }
  9066. }
  9067. }
  9068. },
  9069. "401": {
  9070. "description": "UnauthorizedError",
  9071. "content": {
  9072. "application/json": {
  9073. "schema": {
  9074. "$ref": "#/components/schemas/UnauthorizedError"
  9075. }
  9076. }
  9077. }
  9078. }
  9079. },
  9080. "description": "Retrieve pending permission requests for a location.",
  9081. "summary": "List pending permission requests",
  9082. "x-codeSamples": [
  9083. {
  9084. "lang": "js",
  9085. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  9086. }
  9087. ]
  9088. }
  9089. },
  9090. "/api/session/{sessionID}/permission/request": {
  9091. "get": {
  9092. "tags": ["v2 session permissions"],
  9093. "operationId": "v2.session.permission.list",
  9094. "parameters": [
  9095. {
  9096. "name": "sessionID",
  9097. "in": "path",
  9098. "schema": {
  9099. "type": "string",
  9100. "pattern": "^ses"
  9101. },
  9102. "required": true
  9103. }
  9104. ],
  9105. "security": [],
  9106. "responses": {
  9107. "200": {
  9108. "description": "Success",
  9109. "content": {
  9110. "application/json": {
  9111. "schema": {
  9112. "type": "array",
  9113. "items": {
  9114. "$ref": "#/components/schemas/PermissionV2Request"
  9115. }
  9116. }
  9117. }
  9118. }
  9119. },
  9120. "400": {
  9121. "description": "InvalidRequestError",
  9122. "content": {
  9123. "application/json": {
  9124. "schema": {
  9125. "$ref": "#/components/schemas/InvalidRequestError"
  9126. }
  9127. }
  9128. }
  9129. },
  9130. "401": {
  9131. "description": "UnauthorizedError",
  9132. "content": {
  9133. "application/json": {
  9134. "schema": {
  9135. "$ref": "#/components/schemas/UnauthorizedError"
  9136. }
  9137. }
  9138. }
  9139. },
  9140. "404": {
  9141. "description": "SessionNotFoundError",
  9142. "content": {
  9143. "application/json": {
  9144. "schema": {
  9145. "$ref": "#/components/schemas/SessionNotFoundError"
  9146. }
  9147. }
  9148. }
  9149. }
  9150. },
  9151. "description": "Retrieve pending permission requests owned by a session.",
  9152. "summary": "List session permission requests",
  9153. "x-codeSamples": [
  9154. {
  9155. "lang": "js",
  9156. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  9157. }
  9158. ]
  9159. }
  9160. },
  9161. "/api/session/{sessionID}/permission/request/{requestID}/reply": {
  9162. "post": {
  9163. "tags": ["v2 session permissions"],
  9164. "operationId": "v2.session.permission.reply",
  9165. "parameters": [
  9166. {
  9167. "name": "sessionID",
  9168. "in": "path",
  9169. "schema": {
  9170. "type": "string",
  9171. "pattern": "^ses"
  9172. },
  9173. "required": true
  9174. },
  9175. {
  9176. "name": "requestID",
  9177. "in": "path",
  9178. "schema": {
  9179. "type": "string",
  9180. "pattern": "^per"
  9181. },
  9182. "required": true
  9183. }
  9184. ],
  9185. "security": [],
  9186. "responses": {
  9187. "204": {
  9188. "description": "<No Content>"
  9189. },
  9190. "400": {
  9191. "description": "InvalidRequestError",
  9192. "content": {
  9193. "application/json": {
  9194. "schema": {
  9195. "$ref": "#/components/schemas/InvalidRequestError"
  9196. }
  9197. }
  9198. }
  9199. },
  9200. "401": {
  9201. "description": "UnauthorizedError",
  9202. "content": {
  9203. "application/json": {
  9204. "schema": {
  9205. "$ref": "#/components/schemas/UnauthorizedError"
  9206. }
  9207. }
  9208. }
  9209. },
  9210. "404": {
  9211. "description": "SessionNotFoundError | PermissionNotFoundError",
  9212. "content": {
  9213. "application/json": {
  9214. "schema": {
  9215. "anyOf": [
  9216. {
  9217. "$ref": "#/components/schemas/SessionNotFoundError"
  9218. },
  9219. {
  9220. "$ref": "#/components/schemas/PermissionNotFoundError"
  9221. }
  9222. ]
  9223. }
  9224. }
  9225. }
  9226. }
  9227. },
  9228. "description": "Respond to a pending permission request owned by a session.",
  9229. "summary": "Reply to pending permission request",
  9230. "requestBody": {
  9231. "content": {
  9232. "application/json": {
  9233. "schema": {
  9234. "type": "object",
  9235. "properties": {
  9236. "reply": {
  9237. "$ref": "#/components/schemas/PermissionV2Reply"
  9238. },
  9239. "message": {
  9240. "type": "string"
  9241. }
  9242. },
  9243. "required": ["reply"],
  9244. "additionalProperties": false
  9245. }
  9246. }
  9247. }
  9248. },
  9249. "x-codeSamples": [
  9250. {
  9251. "lang": "js",
  9252. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  9253. }
  9254. ]
  9255. }
  9256. },
  9257. "/api/permission/saved": {
  9258. "get": {
  9259. "tags": ["v2 saved permissions"],
  9260. "operationId": "v2.permission.saved.list",
  9261. "parameters": [
  9262. {
  9263. "name": "projectID",
  9264. "in": "query",
  9265. "schema": {
  9266. "type": "string"
  9267. },
  9268. "required": false
  9269. }
  9270. ],
  9271. "security": [],
  9272. "responses": {
  9273. "200": {
  9274. "description": "Success",
  9275. "content": {
  9276. "application/json": {
  9277. "schema": {
  9278. "type": "array",
  9279. "items": {
  9280. "$ref": "#/components/schemas/PermissionSavedInfo"
  9281. }
  9282. }
  9283. }
  9284. }
  9285. },
  9286. "400": {
  9287. "description": "InvalidRequestError",
  9288. "content": {
  9289. "application/json": {
  9290. "schema": {
  9291. "$ref": "#/components/schemas/InvalidRequestError"
  9292. }
  9293. }
  9294. }
  9295. },
  9296. "401": {
  9297. "description": "UnauthorizedError",
  9298. "content": {
  9299. "application/json": {
  9300. "schema": {
  9301. "$ref": "#/components/schemas/UnauthorizedError"
  9302. }
  9303. }
  9304. }
  9305. }
  9306. },
  9307. "description": "Retrieve saved permissions, optionally filtered by project.",
  9308. "summary": "List saved permissions",
  9309. "x-codeSamples": [
  9310. {
  9311. "lang": "js",
  9312. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  9313. }
  9314. ]
  9315. }
  9316. },
  9317. "/api/permission/saved/{id}": {
  9318. "delete": {
  9319. "tags": ["v2 saved permissions"],
  9320. "operationId": "v2.permission.saved.remove",
  9321. "parameters": [
  9322. {
  9323. "name": "id",
  9324. "in": "path",
  9325. "schema": {
  9326. "type": "string"
  9327. },
  9328. "required": true
  9329. }
  9330. ],
  9331. "security": [],
  9332. "responses": {
  9333. "204": {
  9334. "description": "<No Content>"
  9335. },
  9336. "400": {
  9337. "description": "InvalidRequestError",
  9338. "content": {
  9339. "application/json": {
  9340. "schema": {
  9341. "$ref": "#/components/schemas/InvalidRequestError"
  9342. }
  9343. }
  9344. }
  9345. },
  9346. "401": {
  9347. "description": "UnauthorizedError",
  9348. "content": {
  9349. "application/json": {
  9350. "schema": {
  9351. "$ref": "#/components/schemas/UnauthorizedError"
  9352. }
  9353. }
  9354. }
  9355. }
  9356. },
  9357. "description": "Remove a saved permission by ID.",
  9358. "summary": "Remove saved permission",
  9359. "x-codeSamples": [
  9360. {
  9361. "lang": "js",
  9362. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  9363. }
  9364. ]
  9365. }
  9366. },
  9367. "/tui/append-prompt": {
  9368. "post": {
  9369. "tags": ["tui"],
  9370. "operationId": "tui.appendPrompt",
  9371. "parameters": [
  9372. {
  9373. "name": "directory",
  9374. "in": "query",
  9375. "schema": {
  9376. "type": "string"
  9377. },
  9378. "required": false
  9379. },
  9380. {
  9381. "name": "workspace",
  9382. "in": "query",
  9383. "schema": {
  9384. "type": "string"
  9385. },
  9386. "required": false
  9387. }
  9388. ],
  9389. "responses": {
  9390. "200": {
  9391. "description": "Prompt processed successfully",
  9392. "content": {
  9393. "application/json": {
  9394. "schema": {
  9395. "type": "boolean",
  9396. "description": "Prompt processed successfully"
  9397. }
  9398. }
  9399. }
  9400. },
  9401. "400": {
  9402. "description": "BadRequest | InvalidRequestError",
  9403. "content": {
  9404. "application/json": {
  9405. "schema": {
  9406. "anyOf": [
  9407. {
  9408. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9409. },
  9410. {
  9411. "$ref": "#/components/schemas/InvalidRequestError"
  9412. }
  9413. ]
  9414. }
  9415. }
  9416. }
  9417. }
  9418. },
  9419. "description": "Append prompt to the TUI.",
  9420. "summary": "Append TUI prompt",
  9421. "requestBody": {
  9422. "content": {
  9423. "application/json": {
  9424. "schema": {
  9425. "type": "object",
  9426. "properties": {
  9427. "text": {
  9428. "type": "string"
  9429. }
  9430. },
  9431. "required": ["text"],
  9432. "additionalProperties": false
  9433. }
  9434. }
  9435. }
  9436. },
  9437. "x-codeSamples": [
  9438. {
  9439. "lang": "js",
  9440. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  9441. }
  9442. ]
  9443. }
  9444. },
  9445. "/tui/open-help": {
  9446. "post": {
  9447. "tags": ["tui"],
  9448. "operationId": "tui.openHelp",
  9449. "parameters": [
  9450. {
  9451. "name": "directory",
  9452. "in": "query",
  9453. "schema": {
  9454. "type": "string"
  9455. },
  9456. "required": false
  9457. },
  9458. {
  9459. "name": "workspace",
  9460. "in": "query",
  9461. "schema": {
  9462. "type": "string"
  9463. },
  9464. "required": false
  9465. }
  9466. ],
  9467. "responses": {
  9468. "200": {
  9469. "description": "Help dialog opened successfully",
  9470. "content": {
  9471. "application/json": {
  9472. "schema": {
  9473. "type": "boolean",
  9474. "description": "Help dialog opened successfully"
  9475. }
  9476. }
  9477. }
  9478. },
  9479. "400": {
  9480. "description": "Bad request",
  9481. "content": {
  9482. "application/json": {
  9483. "schema": {
  9484. "$ref": "#/components/schemas/BadRequestError"
  9485. }
  9486. }
  9487. }
  9488. }
  9489. },
  9490. "description": "Open the help dialog in the TUI to display user assistance information.",
  9491. "summary": "Open help dialog",
  9492. "x-codeSamples": [
  9493. {
  9494. "lang": "js",
  9495. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  9496. }
  9497. ]
  9498. }
  9499. },
  9500. "/tui/open-sessions": {
  9501. "post": {
  9502. "tags": ["tui"],
  9503. "operationId": "tui.openSessions",
  9504. "parameters": [
  9505. {
  9506. "name": "directory",
  9507. "in": "query",
  9508. "schema": {
  9509. "type": "string"
  9510. },
  9511. "required": false
  9512. },
  9513. {
  9514. "name": "workspace",
  9515. "in": "query",
  9516. "schema": {
  9517. "type": "string"
  9518. },
  9519. "required": false
  9520. }
  9521. ],
  9522. "responses": {
  9523. "200": {
  9524. "description": "Session dialog opened successfully",
  9525. "content": {
  9526. "application/json": {
  9527. "schema": {
  9528. "type": "boolean",
  9529. "description": "Session dialog opened successfully"
  9530. }
  9531. }
  9532. }
  9533. },
  9534. "400": {
  9535. "description": "Bad request",
  9536. "content": {
  9537. "application/json": {
  9538. "schema": {
  9539. "$ref": "#/components/schemas/BadRequestError"
  9540. }
  9541. }
  9542. }
  9543. }
  9544. },
  9545. "description": "Open the session dialog.",
  9546. "summary": "Open sessions dialog",
  9547. "x-codeSamples": [
  9548. {
  9549. "lang": "js",
  9550. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9551. }
  9552. ]
  9553. }
  9554. },
  9555. "/tui/open-themes": {
  9556. "post": {
  9557. "tags": ["tui"],
  9558. "operationId": "tui.openThemes",
  9559. "parameters": [
  9560. {
  9561. "name": "directory",
  9562. "in": "query",
  9563. "schema": {
  9564. "type": "string"
  9565. },
  9566. "required": false
  9567. },
  9568. {
  9569. "name": "workspace",
  9570. "in": "query",
  9571. "schema": {
  9572. "type": "string"
  9573. },
  9574. "required": false
  9575. }
  9576. ],
  9577. "responses": {
  9578. "200": {
  9579. "description": "Theme dialog opened successfully",
  9580. "content": {
  9581. "application/json": {
  9582. "schema": {
  9583. "type": "boolean",
  9584. "description": "Theme dialog opened successfully"
  9585. }
  9586. }
  9587. }
  9588. },
  9589. "400": {
  9590. "description": "Bad request",
  9591. "content": {
  9592. "application/json": {
  9593. "schema": {
  9594. "$ref": "#/components/schemas/BadRequestError"
  9595. }
  9596. }
  9597. }
  9598. }
  9599. },
  9600. "description": "Open the theme dialog.",
  9601. "summary": "Open themes dialog",
  9602. "x-codeSamples": [
  9603. {
  9604. "lang": "js",
  9605. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9606. }
  9607. ]
  9608. }
  9609. },
  9610. "/tui/open-models": {
  9611. "post": {
  9612. "tags": ["tui"],
  9613. "operationId": "tui.openModels",
  9614. "parameters": [
  9615. {
  9616. "name": "directory",
  9617. "in": "query",
  9618. "schema": {
  9619. "type": "string"
  9620. },
  9621. "required": false
  9622. },
  9623. {
  9624. "name": "workspace",
  9625. "in": "query",
  9626. "schema": {
  9627. "type": "string"
  9628. },
  9629. "required": false
  9630. }
  9631. ],
  9632. "responses": {
  9633. "200": {
  9634. "description": "Model dialog opened successfully",
  9635. "content": {
  9636. "application/json": {
  9637. "schema": {
  9638. "type": "boolean",
  9639. "description": "Model dialog opened successfully"
  9640. }
  9641. }
  9642. }
  9643. },
  9644. "400": {
  9645. "description": "Bad request",
  9646. "content": {
  9647. "application/json": {
  9648. "schema": {
  9649. "$ref": "#/components/schemas/BadRequestError"
  9650. }
  9651. }
  9652. }
  9653. }
  9654. },
  9655. "description": "Open the model dialog.",
  9656. "summary": "Open models dialog",
  9657. "x-codeSamples": [
  9658. {
  9659. "lang": "js",
  9660. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9661. }
  9662. ]
  9663. }
  9664. },
  9665. "/tui/submit-prompt": {
  9666. "post": {
  9667. "tags": ["tui"],
  9668. "operationId": "tui.submitPrompt",
  9669. "parameters": [
  9670. {
  9671. "name": "directory",
  9672. "in": "query",
  9673. "schema": {
  9674. "type": "string"
  9675. },
  9676. "required": false
  9677. },
  9678. {
  9679. "name": "workspace",
  9680. "in": "query",
  9681. "schema": {
  9682. "type": "string"
  9683. },
  9684. "required": false
  9685. }
  9686. ],
  9687. "responses": {
  9688. "200": {
  9689. "description": "Prompt submitted successfully",
  9690. "content": {
  9691. "application/json": {
  9692. "schema": {
  9693. "type": "boolean",
  9694. "description": "Prompt submitted successfully"
  9695. }
  9696. }
  9697. }
  9698. },
  9699. "400": {
  9700. "description": "Bad request",
  9701. "content": {
  9702. "application/json": {
  9703. "schema": {
  9704. "$ref": "#/components/schemas/BadRequestError"
  9705. }
  9706. }
  9707. }
  9708. }
  9709. },
  9710. "description": "Submit the prompt.",
  9711. "summary": "Submit TUI prompt",
  9712. "x-codeSamples": [
  9713. {
  9714. "lang": "js",
  9715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9716. }
  9717. ]
  9718. }
  9719. },
  9720. "/tui/clear-prompt": {
  9721. "post": {
  9722. "tags": ["tui"],
  9723. "operationId": "tui.clearPrompt",
  9724. "parameters": [
  9725. {
  9726. "name": "directory",
  9727. "in": "query",
  9728. "schema": {
  9729. "type": "string"
  9730. },
  9731. "required": false
  9732. },
  9733. {
  9734. "name": "workspace",
  9735. "in": "query",
  9736. "schema": {
  9737. "type": "string"
  9738. },
  9739. "required": false
  9740. }
  9741. ],
  9742. "responses": {
  9743. "200": {
  9744. "description": "Prompt cleared successfully",
  9745. "content": {
  9746. "application/json": {
  9747. "schema": {
  9748. "type": "boolean",
  9749. "description": "Prompt cleared successfully"
  9750. }
  9751. }
  9752. }
  9753. },
  9754. "400": {
  9755. "description": "Bad request",
  9756. "content": {
  9757. "application/json": {
  9758. "schema": {
  9759. "$ref": "#/components/schemas/BadRequestError"
  9760. }
  9761. }
  9762. }
  9763. }
  9764. },
  9765. "description": "Clear the prompt.",
  9766. "summary": "Clear TUI prompt",
  9767. "x-codeSamples": [
  9768. {
  9769. "lang": "js",
  9770. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9771. }
  9772. ]
  9773. }
  9774. },
  9775. "/tui/execute-command": {
  9776. "post": {
  9777. "tags": ["tui"],
  9778. "operationId": "tui.executeCommand",
  9779. "parameters": [
  9780. {
  9781. "name": "directory",
  9782. "in": "query",
  9783. "schema": {
  9784. "type": "string"
  9785. },
  9786. "required": false
  9787. },
  9788. {
  9789. "name": "workspace",
  9790. "in": "query",
  9791. "schema": {
  9792. "type": "string"
  9793. },
  9794. "required": false
  9795. }
  9796. ],
  9797. "responses": {
  9798. "200": {
  9799. "description": "Command executed successfully",
  9800. "content": {
  9801. "application/json": {
  9802. "schema": {
  9803. "type": "boolean",
  9804. "description": "Command executed successfully"
  9805. }
  9806. }
  9807. }
  9808. },
  9809. "400": {
  9810. "description": "BadRequest | InvalidRequestError",
  9811. "content": {
  9812. "application/json": {
  9813. "schema": {
  9814. "anyOf": [
  9815. {
  9816. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9817. },
  9818. {
  9819. "$ref": "#/components/schemas/InvalidRequestError"
  9820. }
  9821. ]
  9822. }
  9823. }
  9824. }
  9825. }
  9826. },
  9827. "description": "Execute a TUI command.",
  9828. "summary": "Execute TUI command",
  9829. "requestBody": {
  9830. "content": {
  9831. "application/json": {
  9832. "schema": {
  9833. "type": "object",
  9834. "properties": {
  9835. "command": {
  9836. "type": "string"
  9837. }
  9838. },
  9839. "required": ["command"],
  9840. "additionalProperties": false
  9841. }
  9842. }
  9843. }
  9844. },
  9845. "x-codeSamples": [
  9846. {
  9847. "lang": "js",
  9848. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9849. }
  9850. ]
  9851. }
  9852. },
  9853. "/tui/show-toast": {
  9854. "post": {
  9855. "tags": ["tui"],
  9856. "operationId": "tui.showToast",
  9857. "parameters": [
  9858. {
  9859. "name": "directory",
  9860. "in": "query",
  9861. "schema": {
  9862. "type": "string"
  9863. },
  9864. "required": false
  9865. },
  9866. {
  9867. "name": "workspace",
  9868. "in": "query",
  9869. "schema": {
  9870. "type": "string"
  9871. },
  9872. "required": false
  9873. }
  9874. ],
  9875. "responses": {
  9876. "200": {
  9877. "description": "Toast notification shown successfully",
  9878. "content": {
  9879. "application/json": {
  9880. "schema": {
  9881. "type": "boolean",
  9882. "description": "Toast notification shown successfully"
  9883. }
  9884. }
  9885. }
  9886. },
  9887. "400": {
  9888. "description": "Bad request",
  9889. "content": {
  9890. "application/json": {
  9891. "schema": {
  9892. "$ref": "#/components/schemas/BadRequestError"
  9893. }
  9894. }
  9895. }
  9896. }
  9897. },
  9898. "description": "Show a toast notification in the TUI.",
  9899. "summary": "Show TUI toast",
  9900. "requestBody": {
  9901. "content": {
  9902. "application/json": {
  9903. "schema": {
  9904. "type": "object",
  9905. "properties": {
  9906. "title": {
  9907. "type": "string"
  9908. },
  9909. "message": {
  9910. "type": "string"
  9911. },
  9912. "variant": {
  9913. "type": "string",
  9914. "enum": ["info", "success", "warning", "error"]
  9915. },
  9916. "duration": {
  9917. "type": "integer",
  9918. "exclusiveMinimum": 0
  9919. }
  9920. },
  9921. "required": ["message", "variant"],
  9922. "additionalProperties": false
  9923. }
  9924. }
  9925. }
  9926. },
  9927. "x-codeSamples": [
  9928. {
  9929. "lang": "js",
  9930. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9931. }
  9932. ]
  9933. }
  9934. },
  9935. "/tui/publish": {
  9936. "post": {
  9937. "tags": ["tui"],
  9938. "operationId": "tui.publish",
  9939. "parameters": [
  9940. {
  9941. "name": "directory",
  9942. "in": "query",
  9943. "schema": {
  9944. "type": "string"
  9945. },
  9946. "required": false
  9947. },
  9948. {
  9949. "name": "workspace",
  9950. "in": "query",
  9951. "schema": {
  9952. "type": "string"
  9953. },
  9954. "required": false
  9955. }
  9956. ],
  9957. "responses": {
  9958. "200": {
  9959. "description": "Event published successfully",
  9960. "content": {
  9961. "application/json": {
  9962. "schema": {
  9963. "type": "boolean",
  9964. "description": "Event published successfully"
  9965. }
  9966. }
  9967. }
  9968. },
  9969. "400": {
  9970. "description": "BadRequest | InvalidRequestError",
  9971. "content": {
  9972. "application/json": {
  9973. "schema": {
  9974. "anyOf": [
  9975. {
  9976. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9977. },
  9978. {
  9979. "$ref": "#/components/schemas/InvalidRequestError"
  9980. }
  9981. ]
  9982. }
  9983. }
  9984. }
  9985. }
  9986. },
  9987. "description": "Publish a TUI event.",
  9988. "summary": "Publish TUI event",
  9989. "requestBody": {
  9990. "content": {
  9991. "application/json": {
  9992. "schema": {
  9993. "anyOf": [
  9994. {
  9995. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9996. },
  9997. {
  9998. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9999. },
  10000. {
  10001. "$ref": "#/components/schemas/EventTuiToastShow"
  10002. },
  10003. {
  10004. "$ref": "#/components/schemas/EventTuiSessionSelect"
  10005. }
  10006. ]
  10007. }
  10008. }
  10009. }
  10010. },
  10011. "x-codeSamples": [
  10012. {
  10013. "lang": "js",
  10014. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  10015. }
  10016. ]
  10017. }
  10018. },
  10019. "/tui/select-session": {
  10020. "post": {
  10021. "tags": ["tui"],
  10022. "operationId": "tui.selectSession",
  10023. "parameters": [
  10024. {
  10025. "name": "directory",
  10026. "in": "query",
  10027. "schema": {
  10028. "type": "string"
  10029. },
  10030. "required": false
  10031. },
  10032. {
  10033. "name": "workspace",
  10034. "in": "query",
  10035. "schema": {
  10036. "type": "string"
  10037. },
  10038. "required": false
  10039. }
  10040. ],
  10041. "responses": {
  10042. "200": {
  10043. "description": "Session selected successfully",
  10044. "content": {
  10045. "application/json": {
  10046. "schema": {
  10047. "type": "boolean",
  10048. "description": "Session selected successfully"
  10049. }
  10050. }
  10051. }
  10052. },
  10053. "400": {
  10054. "description": "BadRequest | InvalidRequestError",
  10055. "content": {
  10056. "application/json": {
  10057. "schema": {
  10058. "anyOf": [
  10059. {
  10060. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10061. },
  10062. {
  10063. "$ref": "#/components/schemas/InvalidRequestError"
  10064. }
  10065. ]
  10066. }
  10067. }
  10068. }
  10069. },
  10070. "404": {
  10071. "description": "NotFoundError",
  10072. "content": {
  10073. "application/json": {
  10074. "schema": {
  10075. "$ref": "#/components/schemas/NotFoundError"
  10076. }
  10077. }
  10078. }
  10079. }
  10080. },
  10081. "description": "Navigate the TUI to display the specified session.",
  10082. "summary": "Select session",
  10083. "requestBody": {
  10084. "content": {
  10085. "application/json": {
  10086. "schema": {
  10087. "type": "object",
  10088. "properties": {
  10089. "sessionID": {
  10090. "type": "string",
  10091. "pattern": "^ses",
  10092. "description": "Session ID to navigate to"
  10093. }
  10094. },
  10095. "required": ["sessionID"],
  10096. "additionalProperties": false
  10097. }
  10098. }
  10099. }
  10100. },
  10101. "x-codeSamples": [
  10102. {
  10103. "lang": "js",
  10104. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  10105. }
  10106. ]
  10107. }
  10108. },
  10109. "/tui/control/next": {
  10110. "get": {
  10111. "tags": ["tui"],
  10112. "operationId": "tui.control.next",
  10113. "parameters": [
  10114. {
  10115. "name": "directory",
  10116. "in": "query",
  10117. "schema": {
  10118. "type": "string"
  10119. },
  10120. "required": false
  10121. },
  10122. {
  10123. "name": "workspace",
  10124. "in": "query",
  10125. "schema": {
  10126. "type": "string"
  10127. },
  10128. "required": false
  10129. }
  10130. ],
  10131. "responses": {
  10132. "200": {
  10133. "description": "Next TUI request",
  10134. "content": {
  10135. "application/json": {
  10136. "schema": {
  10137. "type": "object",
  10138. "properties": {
  10139. "path": {
  10140. "type": "string"
  10141. },
  10142. "body": {}
  10143. },
  10144. "required": ["path", "body"],
  10145. "additionalProperties": false,
  10146. "description": "Next TUI request"
  10147. }
  10148. }
  10149. }
  10150. },
  10151. "400": {
  10152. "description": "Bad request",
  10153. "content": {
  10154. "application/json": {
  10155. "schema": {
  10156. "$ref": "#/components/schemas/BadRequestError"
  10157. }
  10158. }
  10159. }
  10160. }
  10161. },
  10162. "description": "Retrieve the next TUI request from the queue for processing.",
  10163. "summary": "Get next TUI request",
  10164. "x-codeSamples": [
  10165. {
  10166. "lang": "js",
  10167. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  10168. }
  10169. ]
  10170. }
  10171. },
  10172. "/tui/control/response": {
  10173. "post": {
  10174. "tags": ["tui"],
  10175. "operationId": "tui.control.response",
  10176. "parameters": [
  10177. {
  10178. "name": "directory",
  10179. "in": "query",
  10180. "schema": {
  10181. "type": "string"
  10182. },
  10183. "required": false
  10184. },
  10185. {
  10186. "name": "workspace",
  10187. "in": "query",
  10188. "schema": {
  10189. "type": "string"
  10190. },
  10191. "required": false
  10192. }
  10193. ],
  10194. "responses": {
  10195. "200": {
  10196. "description": "Response submitted successfully",
  10197. "content": {
  10198. "application/json": {
  10199. "schema": {
  10200. "type": "boolean",
  10201. "description": "Response submitted successfully"
  10202. }
  10203. }
  10204. }
  10205. },
  10206. "400": {
  10207. "description": "Bad request",
  10208. "content": {
  10209. "application/json": {
  10210. "schema": {
  10211. "$ref": "#/components/schemas/BadRequestError"
  10212. }
  10213. }
  10214. }
  10215. }
  10216. },
  10217. "description": "Submit a response to the TUI request queue to complete a pending request.",
  10218. "summary": "Submit TUI response",
  10219. "requestBody": {
  10220. "content": {
  10221. "application/json": {
  10222. "schema": {}
  10223. }
  10224. }
  10225. },
  10226. "x-codeSamples": [
  10227. {
  10228. "lang": "js",
  10229. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  10230. }
  10231. ]
  10232. }
  10233. },
  10234. "/experimental/workspace/adapter": {
  10235. "get": {
  10236. "tags": ["workspace"],
  10237. "operationId": "experimental.workspace.adapter.list",
  10238. "parameters": [
  10239. {
  10240. "name": "directory",
  10241. "in": "query",
  10242. "schema": {
  10243. "type": "string"
  10244. },
  10245. "required": false
  10246. },
  10247. {
  10248. "name": "workspace",
  10249. "in": "query",
  10250. "schema": {
  10251. "type": "string"
  10252. },
  10253. "required": false
  10254. }
  10255. ],
  10256. "responses": {
  10257. "200": {
  10258. "description": "Workspace adapters",
  10259. "content": {
  10260. "application/json": {
  10261. "schema": {
  10262. "type": "array",
  10263. "items": {
  10264. "type": "object",
  10265. "properties": {
  10266. "type": {
  10267. "type": "string"
  10268. },
  10269. "name": {
  10270. "type": "string"
  10271. },
  10272. "description": {
  10273. "type": "string"
  10274. }
  10275. },
  10276. "required": ["type", "name", "description"],
  10277. "additionalProperties": false
  10278. },
  10279. "description": "Workspace adapters"
  10280. }
  10281. }
  10282. }
  10283. },
  10284. "400": {
  10285. "description": "Bad request",
  10286. "content": {
  10287. "application/json": {
  10288. "schema": {
  10289. "$ref": "#/components/schemas/BadRequestError"
  10290. }
  10291. }
  10292. }
  10293. }
  10294. },
  10295. "description": "List all available workspace adapters for the current project.",
  10296. "summary": "List workspace adapters",
  10297. "x-codeSamples": [
  10298. {
  10299. "lang": "js",
  10300. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  10301. }
  10302. ]
  10303. }
  10304. },
  10305. "/experimental/workspace": {
  10306. "get": {
  10307. "tags": ["workspace"],
  10308. "operationId": "experimental.workspace.list",
  10309. "parameters": [
  10310. {
  10311. "name": "directory",
  10312. "in": "query",
  10313. "schema": {
  10314. "type": "string"
  10315. },
  10316. "required": false
  10317. },
  10318. {
  10319. "name": "workspace",
  10320. "in": "query",
  10321. "schema": {
  10322. "type": "string"
  10323. },
  10324. "required": false
  10325. }
  10326. ],
  10327. "responses": {
  10328. "200": {
  10329. "description": "Workspaces",
  10330. "content": {
  10331. "application/json": {
  10332. "schema": {
  10333. "type": "array",
  10334. "items": {
  10335. "$ref": "#/components/schemas/Workspace"
  10336. },
  10337. "description": "Workspaces"
  10338. }
  10339. }
  10340. }
  10341. },
  10342. "400": {
  10343. "description": "Bad request",
  10344. "content": {
  10345. "application/json": {
  10346. "schema": {
  10347. "$ref": "#/components/schemas/BadRequestError"
  10348. }
  10349. }
  10350. }
  10351. }
  10352. },
  10353. "description": "List all workspaces.",
  10354. "summary": "List workspaces",
  10355. "x-codeSamples": [
  10356. {
  10357. "lang": "js",
  10358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  10359. }
  10360. ]
  10361. },
  10362. "post": {
  10363. "tags": ["workspace"],
  10364. "operationId": "experimental.workspace.create",
  10365. "parameters": [
  10366. {
  10367. "name": "directory",
  10368. "in": "query",
  10369. "schema": {
  10370. "type": "string"
  10371. },
  10372. "required": false
  10373. },
  10374. {
  10375. "name": "workspace",
  10376. "in": "query",
  10377. "schema": {
  10378. "type": "string"
  10379. },
  10380. "required": false
  10381. }
  10382. ],
  10383. "responses": {
  10384. "200": {
  10385. "description": "Workspace created",
  10386. "content": {
  10387. "application/json": {
  10388. "schema": {
  10389. "$ref": "#/components/schemas/Workspace"
  10390. }
  10391. }
  10392. }
  10393. },
  10394. "400": {
  10395. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  10396. "content": {
  10397. "application/json": {
  10398. "schema": {
  10399. "anyOf": [
  10400. {
  10401. "$ref": "#/components/schemas/WorkspaceCreateError"
  10402. },
  10403. {
  10404. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10405. },
  10406. {
  10407. "$ref": "#/components/schemas/InvalidRequestError"
  10408. }
  10409. ]
  10410. }
  10411. }
  10412. }
  10413. }
  10414. },
  10415. "description": "Create a workspace for the current project.",
  10416. "summary": "Create workspace",
  10417. "requestBody": {
  10418. "content": {
  10419. "application/json": {
  10420. "schema": {
  10421. "type": "object",
  10422. "properties": {
  10423. "id": {
  10424. "type": "string",
  10425. "pattern": "^wrk"
  10426. },
  10427. "type": {
  10428. "type": "string"
  10429. },
  10430. "branch": {
  10431. "anyOf": [
  10432. {
  10433. "type": "string"
  10434. },
  10435. {
  10436. "type": "null"
  10437. }
  10438. ]
  10439. },
  10440. "extra": {
  10441. "anyOf": [
  10442. {},
  10443. {
  10444. "type": "null"
  10445. }
  10446. ]
  10447. }
  10448. },
  10449. "required": ["type"],
  10450. "additionalProperties": false
  10451. }
  10452. }
  10453. }
  10454. },
  10455. "x-codeSamples": [
  10456. {
  10457. "lang": "js",
  10458. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  10459. }
  10460. ]
  10461. }
  10462. },
  10463. "/experimental/workspace/sync-list": {
  10464. "post": {
  10465. "tags": ["workspace"],
  10466. "operationId": "experimental.workspace.syncList",
  10467. "parameters": [
  10468. {
  10469. "name": "directory",
  10470. "in": "query",
  10471. "schema": {
  10472. "type": "string"
  10473. },
  10474. "required": false
  10475. },
  10476. {
  10477. "name": "workspace",
  10478. "in": "query",
  10479. "schema": {
  10480. "type": "string"
  10481. },
  10482. "required": false
  10483. }
  10484. ],
  10485. "responses": {
  10486. "204": {
  10487. "description": "Workspace list synced"
  10488. },
  10489. "400": {
  10490. "description": "Bad request",
  10491. "content": {
  10492. "application/json": {
  10493. "schema": {
  10494. "$ref": "#/components/schemas/BadRequestError"
  10495. }
  10496. }
  10497. }
  10498. }
  10499. },
  10500. "description": "Register missing workspaces returned by workspace adapters.",
  10501. "summary": "Sync workspace list",
  10502. "x-codeSamples": [
  10503. {
  10504. "lang": "js",
  10505. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  10506. }
  10507. ]
  10508. }
  10509. },
  10510. "/experimental/workspace/status": {
  10511. "get": {
  10512. "tags": ["workspace"],
  10513. "operationId": "experimental.workspace.status",
  10514. "parameters": [
  10515. {
  10516. "name": "directory",
  10517. "in": "query",
  10518. "schema": {
  10519. "type": "string"
  10520. },
  10521. "required": false
  10522. },
  10523. {
  10524. "name": "workspace",
  10525. "in": "query",
  10526. "schema": {
  10527. "type": "string"
  10528. },
  10529. "required": false
  10530. }
  10531. ],
  10532. "responses": {
  10533. "200": {
  10534. "description": "Workspace status",
  10535. "content": {
  10536. "application/json": {
  10537. "schema": {
  10538. "type": "array",
  10539. "items": {
  10540. "type": "object",
  10541. "properties": {
  10542. "workspaceID": {
  10543. "type": "string",
  10544. "pattern": "^wrk"
  10545. },
  10546. "status": {
  10547. "type": "string",
  10548. "enum": ["connected", "connecting", "disconnected", "error"]
  10549. }
  10550. },
  10551. "required": ["workspaceID", "status"],
  10552. "additionalProperties": false
  10553. },
  10554. "description": "Workspace status"
  10555. }
  10556. }
  10557. }
  10558. },
  10559. "400": {
  10560. "description": "Bad request",
  10561. "content": {
  10562. "application/json": {
  10563. "schema": {
  10564. "$ref": "#/components/schemas/BadRequestError"
  10565. }
  10566. }
  10567. }
  10568. }
  10569. },
  10570. "description": "Get connection status for workspaces in the current project.",
  10571. "summary": "Workspace status",
  10572. "x-codeSamples": [
  10573. {
  10574. "lang": "js",
  10575. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10576. }
  10577. ]
  10578. }
  10579. },
  10580. "/experimental/workspace/{id}": {
  10581. "delete": {
  10582. "tags": ["workspace"],
  10583. "operationId": "experimental.workspace.remove",
  10584. "parameters": [
  10585. {
  10586. "name": "id",
  10587. "in": "path",
  10588. "schema": {
  10589. "type": "string",
  10590. "pattern": "^wrk"
  10591. },
  10592. "required": true
  10593. },
  10594. {
  10595. "name": "directory",
  10596. "in": "query",
  10597. "schema": {
  10598. "type": "string"
  10599. },
  10600. "required": false
  10601. },
  10602. {
  10603. "name": "workspace",
  10604. "in": "query",
  10605. "schema": {
  10606. "type": "string"
  10607. },
  10608. "required": false
  10609. }
  10610. ],
  10611. "responses": {
  10612. "200": {
  10613. "description": "Workspace removed",
  10614. "content": {
  10615. "application/json": {
  10616. "schema": {
  10617. "$ref": "#/components/schemas/Workspace"
  10618. }
  10619. }
  10620. }
  10621. },
  10622. "400": {
  10623. "description": "BadRequest | InvalidRequestError",
  10624. "content": {
  10625. "application/json": {
  10626. "schema": {
  10627. "anyOf": [
  10628. {
  10629. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10630. },
  10631. {
  10632. "$ref": "#/components/schemas/InvalidRequestError"
  10633. }
  10634. ]
  10635. }
  10636. }
  10637. }
  10638. }
  10639. },
  10640. "description": "Remove an existing workspace.",
  10641. "summary": "Remove workspace",
  10642. "x-codeSamples": [
  10643. {
  10644. "lang": "js",
  10645. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10646. }
  10647. ]
  10648. }
  10649. },
  10650. "/experimental/workspace/warp": {
  10651. "post": {
  10652. "tags": ["workspace"],
  10653. "operationId": "experimental.workspace.warp",
  10654. "parameters": [
  10655. {
  10656. "name": "directory",
  10657. "in": "query",
  10658. "schema": {
  10659. "type": "string"
  10660. },
  10661. "required": false
  10662. },
  10663. {
  10664. "name": "workspace",
  10665. "in": "query",
  10666. "schema": {
  10667. "type": "string"
  10668. },
  10669. "required": false
  10670. }
  10671. ],
  10672. "responses": {
  10673. "204": {
  10674. "description": "Session warped"
  10675. },
  10676. "400": {
  10677. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10678. "content": {
  10679. "application/json": {
  10680. "schema": {
  10681. "anyOf": [
  10682. {
  10683. "$ref": "#/components/schemas/WorkspaceWarpError"
  10684. },
  10685. {
  10686. "$ref": "#/components/schemas/VcsApplyError"
  10687. },
  10688. {
  10689. "$ref": "#/components/schemas/InvalidRequestError"
  10690. }
  10691. ]
  10692. }
  10693. }
  10694. }
  10695. },
  10696. "404": {
  10697. "description": "NotFoundError",
  10698. "content": {
  10699. "application/json": {
  10700. "schema": {
  10701. "$ref": "#/components/schemas/NotFoundError"
  10702. }
  10703. }
  10704. }
  10705. }
  10706. },
  10707. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10708. "summary": "Warp session into workspace",
  10709. "requestBody": {
  10710. "content": {
  10711. "application/json": {
  10712. "schema": {
  10713. "type": "object",
  10714. "properties": {
  10715. "id": {
  10716. "anyOf": [
  10717. {
  10718. "type": "string",
  10719. "pattern": "^wrk"
  10720. },
  10721. {
  10722. "type": "null"
  10723. }
  10724. ]
  10725. },
  10726. "sessionID": {
  10727. "type": "string",
  10728. "pattern": "^ses"
  10729. },
  10730. "copyChanges": {
  10731. "type": "boolean"
  10732. }
  10733. },
  10734. "required": ["id", "sessionID"],
  10735. "additionalProperties": false
  10736. }
  10737. }
  10738. }
  10739. },
  10740. "x-codeSamples": [
  10741. {
  10742. "lang": "js",
  10743. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10744. }
  10745. ]
  10746. }
  10747. },
  10748. "/pty/{ptyID}/connect": {
  10749. "get": {
  10750. "tags": ["pty"],
  10751. "operationId": "pty.connect",
  10752. "parameters": [
  10753. {
  10754. "name": "ptyID",
  10755. "in": "path",
  10756. "schema": {
  10757. "type": "string",
  10758. "pattern": "^pty"
  10759. },
  10760. "required": true
  10761. },
  10762. {
  10763. "in": "query",
  10764. "name": "directory",
  10765. "schema": {
  10766. "type": "string"
  10767. }
  10768. },
  10769. {
  10770. "in": "query",
  10771. "name": "workspace",
  10772. "schema": {
  10773. "type": "string"
  10774. }
  10775. },
  10776. {
  10777. "in": "query",
  10778. "name": "cursor",
  10779. "schema": {
  10780. "type": "string"
  10781. }
  10782. },
  10783. {
  10784. "in": "query",
  10785. "name": "ticket",
  10786. "schema": {
  10787. "type": "string"
  10788. }
  10789. }
  10790. ],
  10791. "responses": {
  10792. "200": {
  10793. "description": "Connected session",
  10794. "content": {
  10795. "application/json": {
  10796. "schema": {
  10797. "type": "boolean",
  10798. "description": "Connected session"
  10799. }
  10800. }
  10801. }
  10802. },
  10803. "403": {
  10804. "description": "Forbidden",
  10805. "content": {
  10806. "application/json": {
  10807. "schema": {
  10808. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10809. }
  10810. }
  10811. }
  10812. },
  10813. "404": {
  10814. "description": "Not found",
  10815. "content": {
  10816. "application/json": {
  10817. "schema": {
  10818. "$ref": "#/components/schemas/NotFoundError"
  10819. }
  10820. }
  10821. }
  10822. }
  10823. },
  10824. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10825. "summary": "Connect to PTY session",
  10826. "x-codeSamples": [
  10827. {
  10828. "lang": "js",
  10829. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10830. }
  10831. ]
  10832. }
  10833. }
  10834. },
  10835. "components": {
  10836. "schemas": {
  10837. "Event": {
  10838. "anyOf": [
  10839. {
  10840. "$ref": "#/components/schemas/EventModels-devRefreshed"
  10841. },
  10842. {
  10843. "$ref": "#/components/schemas/EventPluginAdded"
  10844. },
  10845. {
  10846. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  10847. },
  10848. {
  10849. "$ref": "#/components/schemas/EventFileEdited"
  10850. },
  10851. {
  10852. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10853. },
  10854. {
  10855. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10856. },
  10857. {
  10858. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10859. },
  10860. {
  10861. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10862. },
  10863. {
  10864. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10865. },
  10866. {
  10867. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10868. },
  10869. {
  10870. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10871. },
  10872. {
  10873. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10874. },
  10875. {
  10876. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10877. },
  10878. {
  10879. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10880. },
  10881. {
  10882. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10883. },
  10884. {
  10885. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10886. },
  10887. {
  10888. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10889. },
  10890. {
  10891. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10892. },
  10893. {
  10894. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10895. },
  10896. {
  10897. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10898. },
  10899. {
  10900. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10901. },
  10902. {
  10903. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10904. },
  10905. {
  10906. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10907. },
  10908. {
  10909. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10910. },
  10911. {
  10912. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10913. },
  10914. {
  10915. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10916. },
  10917. {
  10918. "$ref": "#/components/schemas/EventSessionNextRetried"
  10919. },
  10920. {
  10921. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10922. },
  10923. {
  10924. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10925. },
  10926. {
  10927. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10928. },
  10929. {
  10930. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10931. },
  10932. {
  10933. "$ref": "#/components/schemas/EventSessionCreated"
  10934. },
  10935. {
  10936. "$ref": "#/components/schemas/EventSessionUpdated"
  10937. },
  10938. {
  10939. "$ref": "#/components/schemas/EventSessionDeleted"
  10940. },
  10941. {
  10942. "$ref": "#/components/schemas/EventMessageUpdated"
  10943. },
  10944. {
  10945. "$ref": "#/components/schemas/EventMessageRemoved"
  10946. },
  10947. {
  10948. "$ref": "#/components/schemas/EventMessagePartUpdated"
  10949. },
  10950. {
  10951. "$ref": "#/components/schemas/EventMessagePartRemoved"
  10952. },
  10953. {
  10954. "$ref": "#/components/schemas/EventMessagePartDelta"
  10955. },
  10956. {
  10957. "$ref": "#/components/schemas/EventSessionDiff"
  10958. },
  10959. {
  10960. "$ref": "#/components/schemas/EventSessionError"
  10961. },
  10962. {
  10963. "$ref": "#/components/schemas/EventPermissionAsked"
  10964. },
  10965. {
  10966. "$ref": "#/components/schemas/EventPermissionReplied"
  10967. },
  10968. {
  10969. "$ref": "#/components/schemas/EventQuestionAsked"
  10970. },
  10971. {
  10972. "$ref": "#/components/schemas/EventQuestionReplied"
  10973. },
  10974. {
  10975. "$ref": "#/components/schemas/EventQuestionRejected"
  10976. },
  10977. {
  10978. "$ref": "#/components/schemas/EventTodoUpdated"
  10979. },
  10980. {
  10981. "$ref": "#/components/schemas/EventSessionStatus"
  10982. },
  10983. {
  10984. "$ref": "#/components/schemas/EventSessionIdle"
  10985. },
  10986. {
  10987. "$ref": "#/components/schemas/EventSessionCompacted"
  10988. },
  10989. {
  10990. "$ref": "#/components/schemas/EventLspUpdated"
  10991. },
  10992. {
  10993. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10994. },
  10995. {
  10996. "$ref": "#/components/schemas/Event.tui.command.execute"
  10997. },
  10998. {
  10999. "$ref": "#/components/schemas/Event.tui.toast.show"
  11000. },
  11001. {
  11002. "$ref": "#/components/schemas/Event.tui.session.select"
  11003. },
  11004. {
  11005. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11006. },
  11007. {
  11008. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11009. },
  11010. {
  11011. "$ref": "#/components/schemas/EventCommandExecuted"
  11012. },
  11013. {
  11014. "$ref": "#/components/schemas/EventProjectUpdated"
  11015. },
  11016. {
  11017. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11018. },
  11019. {
  11020. "$ref": "#/components/schemas/EventWorkspaceReady"
  11021. },
  11022. {
  11023. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11024. },
  11025. {
  11026. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11027. },
  11028. {
  11029. "$ref": "#/components/schemas/EventWorktreeReady"
  11030. },
  11031. {
  11032. "$ref": "#/components/schemas/EventWorktreeFailed"
  11033. },
  11034. {
  11035. "$ref": "#/components/schemas/EventPtyCreated"
  11036. },
  11037. {
  11038. "$ref": "#/components/schemas/EventPtyUpdated"
  11039. },
  11040. {
  11041. "$ref": "#/components/schemas/EventPtyExited"
  11042. },
  11043. {
  11044. "$ref": "#/components/schemas/EventPtyDeleted"
  11045. },
  11046. {
  11047. "$ref": "#/components/schemas/EventInstallationUpdated"
  11048. },
  11049. {
  11050. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11051. },
  11052. {
  11053. "$ref": "#/components/schemas/EventServerConnected"
  11054. },
  11055. {
  11056. "$ref": "#/components/schemas/EventGlobalDisposed"
  11057. },
  11058. {
  11059. "$ref": "#/components/schemas/EventPermissionV2Asked"
  11060. },
  11061. {
  11062. "$ref": "#/components/schemas/EventPermissionV2Replied"
  11063. },
  11064. {
  11065. "$ref": "#/components/schemas/EventAccountAdded"
  11066. },
  11067. {
  11068. "$ref": "#/components/schemas/EventAccountRemoved"
  11069. },
  11070. {
  11071. "$ref": "#/components/schemas/EventAccountSwitched"
  11072. },
  11073. {
  11074. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  11075. }
  11076. ]
  11077. },
  11078. "QuestionReplied": {
  11079. "type": "object",
  11080. "properties": {
  11081. "sessionID": {
  11082. "type": "string",
  11083. "pattern": "^ses"
  11084. },
  11085. "requestID": {
  11086. "type": "string",
  11087. "pattern": "^que"
  11088. },
  11089. "answers": {
  11090. "type": "array",
  11091. "items": {
  11092. "$ref": "#/components/schemas/QuestionAnswer"
  11093. }
  11094. }
  11095. },
  11096. "required": ["sessionID", "requestID", "answers"],
  11097. "additionalProperties": false
  11098. },
  11099. "QuestionRejected": {
  11100. "type": "object",
  11101. "properties": {
  11102. "sessionID": {
  11103. "type": "string",
  11104. "pattern": "^ses"
  11105. },
  11106. "requestID": {
  11107. "type": "string",
  11108. "pattern": "^que"
  11109. }
  11110. },
  11111. "required": ["sessionID", "requestID"],
  11112. "additionalProperties": false
  11113. },
  11114. "OAuth": {
  11115. "type": "object",
  11116. "properties": {
  11117. "type": {
  11118. "type": "string",
  11119. "enum": ["oauth"]
  11120. },
  11121. "refresh": {
  11122. "type": "string"
  11123. },
  11124. "access": {
  11125. "type": "string"
  11126. },
  11127. "expires": {
  11128. "type": "integer",
  11129. "minimum": 0
  11130. },
  11131. "accountId": {
  11132. "type": "string"
  11133. },
  11134. "enterpriseUrl": {
  11135. "type": "string"
  11136. }
  11137. },
  11138. "required": ["type", "refresh", "access", "expires"],
  11139. "additionalProperties": false
  11140. },
  11141. "ApiAuth": {
  11142. "type": "object",
  11143. "properties": {
  11144. "type": {
  11145. "type": "string",
  11146. "enum": ["api"]
  11147. },
  11148. "key": {
  11149. "type": "string"
  11150. },
  11151. "metadata": {
  11152. "type": "object",
  11153. "additionalProperties": {
  11154. "type": "string"
  11155. }
  11156. }
  11157. },
  11158. "required": ["type", "key"],
  11159. "additionalProperties": false
  11160. },
  11161. "WellKnownAuth": {
  11162. "type": "object",
  11163. "properties": {
  11164. "type": {
  11165. "type": "string",
  11166. "enum": ["wellknown"]
  11167. },
  11168. "key": {
  11169. "type": "string"
  11170. },
  11171. "token": {
  11172. "type": "string"
  11173. }
  11174. },
  11175. "required": ["type", "key", "token"],
  11176. "additionalProperties": false
  11177. },
  11178. "Auth": {
  11179. "anyOf": [
  11180. {
  11181. "$ref": "#/components/schemas/OAuth"
  11182. },
  11183. {
  11184. "$ref": "#/components/schemas/ApiAuth"
  11185. },
  11186. {
  11187. "$ref": "#/components/schemas/WellKnownAuth"
  11188. }
  11189. ]
  11190. },
  11191. "effect_HttpApiError_BadRequest": {
  11192. "type": "object",
  11193. "properties": {
  11194. "_tag": {
  11195. "type": "string",
  11196. "enum": ["BadRequest"]
  11197. }
  11198. },
  11199. "required": ["_tag"],
  11200. "additionalProperties": false
  11201. },
  11202. "InvalidRequestError": {
  11203. "type": "object",
  11204. "properties": {
  11205. "_tag": {
  11206. "type": "string",
  11207. "enum": ["InvalidRequestError"]
  11208. },
  11209. "message": {
  11210. "type": "string"
  11211. },
  11212. "kind": {
  11213. "type": "string"
  11214. },
  11215. "field": {
  11216. "type": "string"
  11217. }
  11218. },
  11219. "required": ["_tag", "message"],
  11220. "additionalProperties": false
  11221. },
  11222. "Prompt": {
  11223. "type": "object",
  11224. "properties": {
  11225. "text": {
  11226. "type": "string"
  11227. },
  11228. "files": {
  11229. "type": "array",
  11230. "items": {
  11231. "$ref": "#/components/schemas/PromptFileAttachment"
  11232. }
  11233. },
  11234. "agents": {
  11235. "type": "array",
  11236. "items": {
  11237. "$ref": "#/components/schemas/PromptAgentAttachment"
  11238. }
  11239. },
  11240. "references": {
  11241. "type": "array",
  11242. "items": {
  11243. "$ref": "#/components/schemas/PromptReferenceAttachment"
  11244. }
  11245. }
  11246. },
  11247. "required": ["text"],
  11248. "additionalProperties": false
  11249. },
  11250. "SnapshotFileDiff": {
  11251. "type": "object",
  11252. "properties": {
  11253. "file": {
  11254. "type": "string"
  11255. },
  11256. "patch": {
  11257. "type": "string"
  11258. },
  11259. "additions": {
  11260. "type": "number"
  11261. },
  11262. "deletions": {
  11263. "type": "number"
  11264. },
  11265. "status": {
  11266. "type": "string",
  11267. "enum": ["added", "deleted", "modified"]
  11268. }
  11269. },
  11270. "required": ["additions", "deletions"],
  11271. "additionalProperties": false
  11272. },
  11273. "PermissionAction": {
  11274. "type": "string",
  11275. "enum": ["allow", "deny", "ask"]
  11276. },
  11277. "PermissionRule": {
  11278. "type": "object",
  11279. "properties": {
  11280. "permission": {
  11281. "type": "string"
  11282. },
  11283. "pattern": {
  11284. "type": "string"
  11285. },
  11286. "action": {
  11287. "$ref": "#/components/schemas/PermissionAction"
  11288. }
  11289. },
  11290. "required": ["permission", "pattern", "action"],
  11291. "additionalProperties": false
  11292. },
  11293. "PermissionRuleset": {
  11294. "type": "array",
  11295. "items": {
  11296. "$ref": "#/components/schemas/PermissionRule"
  11297. }
  11298. },
  11299. "Session": {
  11300. "type": "object",
  11301. "properties": {
  11302. "id": {
  11303. "type": "string",
  11304. "pattern": "^ses"
  11305. },
  11306. "slug": {
  11307. "type": "string"
  11308. },
  11309. "projectID": {
  11310. "type": "string"
  11311. },
  11312. "workspaceID": {
  11313. "type": "string",
  11314. "pattern": "^wrk"
  11315. },
  11316. "directory": {
  11317. "type": "string"
  11318. },
  11319. "path": {
  11320. "type": "string"
  11321. },
  11322. "parentID": {
  11323. "type": "string",
  11324. "pattern": "^ses"
  11325. },
  11326. "summary": {
  11327. "type": "object",
  11328. "properties": {
  11329. "additions": {
  11330. "type": "number"
  11331. },
  11332. "deletions": {
  11333. "type": "number"
  11334. },
  11335. "files": {
  11336. "type": "number"
  11337. },
  11338. "diffs": {
  11339. "type": "array",
  11340. "items": {
  11341. "$ref": "#/components/schemas/SnapshotFileDiff"
  11342. }
  11343. }
  11344. },
  11345. "required": ["additions", "deletions", "files"],
  11346. "additionalProperties": false
  11347. },
  11348. "cost": {
  11349. "type": "number"
  11350. },
  11351. "tokens": {
  11352. "type": "object",
  11353. "properties": {
  11354. "input": {
  11355. "type": "number"
  11356. },
  11357. "output": {
  11358. "type": "number"
  11359. },
  11360. "reasoning": {
  11361. "type": "number"
  11362. },
  11363. "cache": {
  11364. "type": "object",
  11365. "properties": {
  11366. "read": {
  11367. "type": "number"
  11368. },
  11369. "write": {
  11370. "type": "number"
  11371. }
  11372. },
  11373. "required": ["read", "write"],
  11374. "additionalProperties": false
  11375. }
  11376. },
  11377. "required": ["input", "output", "reasoning", "cache"],
  11378. "additionalProperties": false
  11379. },
  11380. "share": {
  11381. "type": "object",
  11382. "properties": {
  11383. "url": {
  11384. "type": "string"
  11385. }
  11386. },
  11387. "required": ["url"],
  11388. "additionalProperties": false
  11389. },
  11390. "title": {
  11391. "type": "string"
  11392. },
  11393. "agent": {
  11394. "type": "string"
  11395. },
  11396. "model": {
  11397. "type": "object",
  11398. "properties": {
  11399. "id": {
  11400. "type": "string"
  11401. },
  11402. "providerID": {
  11403. "type": "string"
  11404. },
  11405. "variant": {
  11406. "type": "string"
  11407. }
  11408. },
  11409. "required": ["id", "providerID"],
  11410. "additionalProperties": false
  11411. },
  11412. "version": {
  11413. "type": "string"
  11414. },
  11415. "metadata": {
  11416. "type": "object"
  11417. },
  11418. "time": {
  11419. "type": "object",
  11420. "properties": {
  11421. "created": {
  11422. "type": "integer",
  11423. "minimum": 0
  11424. },
  11425. "updated": {
  11426. "type": "integer",
  11427. "minimum": 0
  11428. },
  11429. "compacting": {
  11430. "type": "integer",
  11431. "minimum": 0
  11432. },
  11433. "archived": {
  11434. "type": "number"
  11435. }
  11436. },
  11437. "required": ["created", "updated"],
  11438. "additionalProperties": false
  11439. },
  11440. "permission": {
  11441. "$ref": "#/components/schemas/PermissionRuleset"
  11442. },
  11443. "revert": {
  11444. "type": "object",
  11445. "properties": {
  11446. "messageID": {
  11447. "type": "string",
  11448. "pattern": "^msg"
  11449. },
  11450. "partID": {
  11451. "type": "string",
  11452. "pattern": "^prt"
  11453. },
  11454. "snapshot": {
  11455. "type": "string"
  11456. },
  11457. "diff": {
  11458. "type": "string"
  11459. }
  11460. },
  11461. "required": ["messageID"],
  11462. "additionalProperties": false
  11463. }
  11464. },
  11465. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11466. "additionalProperties": false
  11467. },
  11468. "OutputFormatText": {
  11469. "type": "object",
  11470. "properties": {
  11471. "type": {
  11472. "type": "string",
  11473. "enum": ["text"]
  11474. }
  11475. },
  11476. "required": ["type"],
  11477. "additionalProperties": false
  11478. },
  11479. "JSONSchema": {
  11480. "type": "object"
  11481. },
  11482. "OutputFormatJsonSchema": {
  11483. "type": "object",
  11484. "properties": {
  11485. "type": {
  11486. "type": "string",
  11487. "enum": ["json_schema"]
  11488. },
  11489. "schema": {
  11490. "$ref": "#/components/schemas/JSONSchema"
  11491. },
  11492. "retryCount": {
  11493. "type": "integer",
  11494. "minimum": 0
  11495. }
  11496. },
  11497. "required": ["type", "schema"],
  11498. "additionalProperties": false
  11499. },
  11500. "OutputFormat": {
  11501. "anyOf": [
  11502. {
  11503. "$ref": "#/components/schemas/OutputFormatText"
  11504. },
  11505. {
  11506. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11507. }
  11508. ]
  11509. },
  11510. "UserMessage": {
  11511. "type": "object",
  11512. "properties": {
  11513. "id": {
  11514. "type": "string",
  11515. "pattern": "^msg"
  11516. },
  11517. "sessionID": {
  11518. "type": "string",
  11519. "pattern": "^ses"
  11520. },
  11521. "role": {
  11522. "type": "string",
  11523. "enum": ["user"]
  11524. },
  11525. "time": {
  11526. "type": "object",
  11527. "properties": {
  11528. "created": {
  11529. "type": "integer",
  11530. "minimum": 0
  11531. }
  11532. },
  11533. "required": ["created"],
  11534. "additionalProperties": false
  11535. },
  11536. "format": {
  11537. "$ref": "#/components/schemas/OutputFormat"
  11538. },
  11539. "summary": {
  11540. "type": "object",
  11541. "properties": {
  11542. "title": {
  11543. "type": "string"
  11544. },
  11545. "body": {
  11546. "type": "string"
  11547. },
  11548. "diffs": {
  11549. "type": "array",
  11550. "items": {
  11551. "$ref": "#/components/schemas/SnapshotFileDiff"
  11552. }
  11553. }
  11554. },
  11555. "required": ["diffs"],
  11556. "additionalProperties": false
  11557. },
  11558. "agent": {
  11559. "type": "string"
  11560. },
  11561. "model": {
  11562. "type": "object",
  11563. "properties": {
  11564. "providerID": {
  11565. "type": "string"
  11566. },
  11567. "modelID": {
  11568. "type": "string"
  11569. },
  11570. "variant": {
  11571. "type": "string"
  11572. }
  11573. },
  11574. "required": ["providerID", "modelID"],
  11575. "additionalProperties": false
  11576. },
  11577. "system": {
  11578. "type": "string"
  11579. },
  11580. "tools": {
  11581. "type": "object",
  11582. "additionalProperties": {
  11583. "type": "boolean"
  11584. }
  11585. }
  11586. },
  11587. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11588. "additionalProperties": false
  11589. },
  11590. "ProviderAuthError": {
  11591. "type": "object",
  11592. "properties": {
  11593. "name": {
  11594. "type": "string",
  11595. "enum": ["ProviderAuthError"]
  11596. },
  11597. "data": {
  11598. "type": "object",
  11599. "properties": {
  11600. "providerID": {
  11601. "type": "string"
  11602. },
  11603. "message": {
  11604. "type": "string"
  11605. }
  11606. },
  11607. "required": ["providerID", "message"],
  11608. "additionalProperties": false
  11609. }
  11610. },
  11611. "required": ["name", "data"],
  11612. "additionalProperties": false
  11613. },
  11614. "UnknownError": {
  11615. "type": "object",
  11616. "properties": {
  11617. "name": {
  11618. "type": "string",
  11619. "enum": ["UnknownError"]
  11620. },
  11621. "data": {
  11622. "type": "object",
  11623. "properties": {
  11624. "message": {
  11625. "type": "string"
  11626. },
  11627. "ref": {
  11628. "type": "string"
  11629. }
  11630. },
  11631. "required": ["message"],
  11632. "additionalProperties": false
  11633. }
  11634. },
  11635. "required": ["name", "data"],
  11636. "additionalProperties": false
  11637. },
  11638. "MessageOutputLengthError": {
  11639. "type": "object",
  11640. "properties": {
  11641. "name": {
  11642. "type": "string",
  11643. "enum": ["MessageOutputLengthError"]
  11644. },
  11645. "data": {
  11646. "type": "object",
  11647. "properties": {}
  11648. }
  11649. },
  11650. "required": ["name", "data"],
  11651. "additionalProperties": false
  11652. },
  11653. "MessageAbortedError": {
  11654. "type": "object",
  11655. "properties": {
  11656. "name": {
  11657. "type": "string",
  11658. "enum": ["MessageAbortedError"]
  11659. },
  11660. "data": {
  11661. "type": "object",
  11662. "properties": {
  11663. "message": {
  11664. "type": "string"
  11665. }
  11666. },
  11667. "required": ["message"],
  11668. "additionalProperties": false
  11669. }
  11670. },
  11671. "required": ["name", "data"],
  11672. "additionalProperties": false
  11673. },
  11674. "StructuredOutputError": {
  11675. "type": "object",
  11676. "properties": {
  11677. "name": {
  11678. "type": "string",
  11679. "enum": ["StructuredOutputError"]
  11680. },
  11681. "data": {
  11682. "type": "object",
  11683. "properties": {
  11684. "message": {
  11685. "type": "string"
  11686. },
  11687. "retries": {
  11688. "type": "integer",
  11689. "minimum": 0
  11690. }
  11691. },
  11692. "required": ["message", "retries"],
  11693. "additionalProperties": false
  11694. }
  11695. },
  11696. "required": ["name", "data"],
  11697. "additionalProperties": false
  11698. },
  11699. "ContextOverflowError": {
  11700. "type": "object",
  11701. "properties": {
  11702. "name": {
  11703. "type": "string",
  11704. "enum": ["ContextOverflowError"]
  11705. },
  11706. "data": {
  11707. "type": "object",
  11708. "properties": {
  11709. "message": {
  11710. "type": "string"
  11711. },
  11712. "responseBody": {
  11713. "type": "string"
  11714. }
  11715. },
  11716. "required": ["message"],
  11717. "additionalProperties": false
  11718. }
  11719. },
  11720. "required": ["name", "data"],
  11721. "additionalProperties": false
  11722. },
  11723. "APIError": {
  11724. "type": "object",
  11725. "properties": {
  11726. "name": {
  11727. "type": "string",
  11728. "enum": ["APIError"]
  11729. },
  11730. "data": {
  11731. "type": "object",
  11732. "properties": {
  11733. "message": {
  11734. "type": "string"
  11735. },
  11736. "statusCode": {
  11737. "type": "integer",
  11738. "minimum": 0
  11739. },
  11740. "isRetryable": {
  11741. "type": "boolean"
  11742. },
  11743. "responseHeaders": {
  11744. "type": "object",
  11745. "additionalProperties": {
  11746. "type": "string"
  11747. }
  11748. },
  11749. "responseBody": {
  11750. "type": "string"
  11751. },
  11752. "metadata": {
  11753. "type": "object",
  11754. "additionalProperties": {
  11755. "type": "string"
  11756. }
  11757. }
  11758. },
  11759. "required": ["message", "isRetryable"],
  11760. "additionalProperties": false
  11761. }
  11762. },
  11763. "required": ["name", "data"],
  11764. "additionalProperties": false
  11765. },
  11766. "AssistantMessage": {
  11767. "type": "object",
  11768. "properties": {
  11769. "id": {
  11770. "type": "string",
  11771. "pattern": "^msg"
  11772. },
  11773. "sessionID": {
  11774. "type": "string",
  11775. "pattern": "^ses"
  11776. },
  11777. "role": {
  11778. "type": "string",
  11779. "enum": ["assistant"]
  11780. },
  11781. "time": {
  11782. "type": "object",
  11783. "properties": {
  11784. "created": {
  11785. "type": "integer",
  11786. "minimum": 0
  11787. },
  11788. "completed": {
  11789. "type": "integer",
  11790. "minimum": 0
  11791. }
  11792. },
  11793. "required": ["created"],
  11794. "additionalProperties": false
  11795. },
  11796. "error": {
  11797. "anyOf": [
  11798. {
  11799. "$ref": "#/components/schemas/ProviderAuthError"
  11800. },
  11801. {
  11802. "$ref": "#/components/schemas/UnknownError"
  11803. },
  11804. {
  11805. "$ref": "#/components/schemas/MessageOutputLengthError"
  11806. },
  11807. {
  11808. "$ref": "#/components/schemas/MessageAbortedError"
  11809. },
  11810. {
  11811. "$ref": "#/components/schemas/StructuredOutputError"
  11812. },
  11813. {
  11814. "$ref": "#/components/schemas/ContextOverflowError"
  11815. },
  11816. {
  11817. "$ref": "#/components/schemas/APIError"
  11818. }
  11819. ]
  11820. },
  11821. "parentID": {
  11822. "type": "string",
  11823. "pattern": "^msg"
  11824. },
  11825. "modelID": {
  11826. "type": "string"
  11827. },
  11828. "providerID": {
  11829. "type": "string"
  11830. },
  11831. "mode": {
  11832. "type": "string"
  11833. },
  11834. "agent": {
  11835. "type": "string"
  11836. },
  11837. "path": {
  11838. "type": "object",
  11839. "properties": {
  11840. "cwd": {
  11841. "type": "string"
  11842. },
  11843. "root": {
  11844. "type": "string"
  11845. }
  11846. },
  11847. "required": ["cwd", "root"],
  11848. "additionalProperties": false
  11849. },
  11850. "summary": {
  11851. "type": "boolean"
  11852. },
  11853. "cost": {
  11854. "type": "number"
  11855. },
  11856. "tokens": {
  11857. "type": "object",
  11858. "properties": {
  11859. "total": {
  11860. "type": "number"
  11861. },
  11862. "input": {
  11863. "type": "number"
  11864. },
  11865. "output": {
  11866. "type": "number"
  11867. },
  11868. "reasoning": {
  11869. "type": "number"
  11870. },
  11871. "cache": {
  11872. "type": "object",
  11873. "properties": {
  11874. "read": {
  11875. "type": "number"
  11876. },
  11877. "write": {
  11878. "type": "number"
  11879. }
  11880. },
  11881. "required": ["read", "write"],
  11882. "additionalProperties": false
  11883. }
  11884. },
  11885. "required": ["input", "output", "reasoning", "cache"],
  11886. "additionalProperties": false
  11887. },
  11888. "structured": {},
  11889. "variant": {
  11890. "type": "string"
  11891. },
  11892. "finish": {
  11893. "type": "string"
  11894. }
  11895. },
  11896. "required": [
  11897. "id",
  11898. "sessionID",
  11899. "role",
  11900. "time",
  11901. "parentID",
  11902. "modelID",
  11903. "providerID",
  11904. "mode",
  11905. "agent",
  11906. "path",
  11907. "cost",
  11908. "tokens"
  11909. ],
  11910. "additionalProperties": false
  11911. },
  11912. "Message": {
  11913. "anyOf": [
  11914. {
  11915. "$ref": "#/components/schemas/UserMessage"
  11916. },
  11917. {
  11918. "$ref": "#/components/schemas/AssistantMessage"
  11919. }
  11920. ]
  11921. },
  11922. "TextPart": {
  11923. "type": "object",
  11924. "properties": {
  11925. "id": {
  11926. "type": "string",
  11927. "pattern": "^prt"
  11928. },
  11929. "sessionID": {
  11930. "type": "string",
  11931. "pattern": "^ses"
  11932. },
  11933. "messageID": {
  11934. "type": "string",
  11935. "pattern": "^msg"
  11936. },
  11937. "type": {
  11938. "type": "string",
  11939. "enum": ["text"]
  11940. },
  11941. "text": {
  11942. "type": "string"
  11943. },
  11944. "synthetic": {
  11945. "type": "boolean"
  11946. },
  11947. "ignored": {
  11948. "type": "boolean"
  11949. },
  11950. "time": {
  11951. "type": "object",
  11952. "properties": {
  11953. "start": {
  11954. "type": "integer",
  11955. "minimum": 0
  11956. },
  11957. "end": {
  11958. "type": "integer",
  11959. "minimum": 0
  11960. }
  11961. },
  11962. "required": ["start"],
  11963. "additionalProperties": false
  11964. },
  11965. "metadata": {
  11966. "type": "object"
  11967. }
  11968. },
  11969. "required": ["id", "sessionID", "messageID", "type", "text"],
  11970. "additionalProperties": false
  11971. },
  11972. "SubtaskPart": {
  11973. "type": "object",
  11974. "properties": {
  11975. "id": {
  11976. "type": "string",
  11977. "pattern": "^prt"
  11978. },
  11979. "sessionID": {
  11980. "type": "string",
  11981. "pattern": "^ses"
  11982. },
  11983. "messageID": {
  11984. "type": "string",
  11985. "pattern": "^msg"
  11986. },
  11987. "type": {
  11988. "type": "string",
  11989. "enum": ["subtask"]
  11990. },
  11991. "prompt": {
  11992. "type": "string"
  11993. },
  11994. "description": {
  11995. "type": "string"
  11996. },
  11997. "agent": {
  11998. "type": "string"
  11999. },
  12000. "model": {
  12001. "type": "object",
  12002. "properties": {
  12003. "providerID": {
  12004. "type": "string"
  12005. },
  12006. "modelID": {
  12007. "type": "string"
  12008. }
  12009. },
  12010. "required": ["providerID", "modelID"],
  12011. "additionalProperties": false
  12012. },
  12013. "command": {
  12014. "type": "string"
  12015. }
  12016. },
  12017. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  12018. "additionalProperties": false
  12019. },
  12020. "ReasoningPart": {
  12021. "type": "object",
  12022. "properties": {
  12023. "id": {
  12024. "type": "string",
  12025. "pattern": "^prt"
  12026. },
  12027. "sessionID": {
  12028. "type": "string",
  12029. "pattern": "^ses"
  12030. },
  12031. "messageID": {
  12032. "type": "string",
  12033. "pattern": "^msg"
  12034. },
  12035. "type": {
  12036. "type": "string",
  12037. "enum": ["reasoning"]
  12038. },
  12039. "text": {
  12040. "type": "string"
  12041. },
  12042. "metadata": {
  12043. "type": "object"
  12044. },
  12045. "time": {
  12046. "type": "object",
  12047. "properties": {
  12048. "start": {
  12049. "type": "integer",
  12050. "minimum": 0
  12051. },
  12052. "end": {
  12053. "type": "integer",
  12054. "minimum": 0
  12055. }
  12056. },
  12057. "required": ["start"],
  12058. "additionalProperties": false
  12059. }
  12060. },
  12061. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  12062. "additionalProperties": false
  12063. },
  12064. "FilePartSourceText": {
  12065. "type": "object",
  12066. "properties": {
  12067. "value": {
  12068. "type": "string"
  12069. },
  12070. "start": {
  12071. "type": "number"
  12072. },
  12073. "end": {
  12074. "type": "number"
  12075. }
  12076. },
  12077. "required": ["value", "start", "end"],
  12078. "additionalProperties": false
  12079. },
  12080. "FileSource": {
  12081. "type": "object",
  12082. "properties": {
  12083. "text": {
  12084. "$ref": "#/components/schemas/FilePartSourceText"
  12085. },
  12086. "type": {
  12087. "type": "string",
  12088. "enum": ["file"]
  12089. },
  12090. "path": {
  12091. "type": "string"
  12092. }
  12093. },
  12094. "required": ["text", "type", "path"],
  12095. "additionalProperties": false
  12096. },
  12097. "Range": {
  12098. "type": "object",
  12099. "properties": {
  12100. "start": {
  12101. "type": "object",
  12102. "properties": {
  12103. "line": {
  12104. "type": "integer",
  12105. "minimum": 0
  12106. },
  12107. "character": {
  12108. "type": "integer",
  12109. "minimum": 0
  12110. }
  12111. },
  12112. "required": ["line", "character"],
  12113. "additionalProperties": false
  12114. },
  12115. "end": {
  12116. "type": "object",
  12117. "properties": {
  12118. "line": {
  12119. "type": "integer",
  12120. "minimum": 0
  12121. },
  12122. "character": {
  12123. "type": "integer",
  12124. "minimum": 0
  12125. }
  12126. },
  12127. "required": ["line", "character"],
  12128. "additionalProperties": false
  12129. }
  12130. },
  12131. "required": ["start", "end"],
  12132. "additionalProperties": false
  12133. },
  12134. "SymbolSource": {
  12135. "type": "object",
  12136. "properties": {
  12137. "text": {
  12138. "$ref": "#/components/schemas/FilePartSourceText"
  12139. },
  12140. "type": {
  12141. "type": "string",
  12142. "enum": ["symbol"]
  12143. },
  12144. "path": {
  12145. "type": "string"
  12146. },
  12147. "range": {
  12148. "$ref": "#/components/schemas/Range"
  12149. },
  12150. "name": {
  12151. "type": "string"
  12152. },
  12153. "kind": {
  12154. "type": "integer",
  12155. "minimum": 0
  12156. }
  12157. },
  12158. "required": ["text", "type", "path", "range", "name", "kind"],
  12159. "additionalProperties": false
  12160. },
  12161. "ResourceSource": {
  12162. "type": "object",
  12163. "properties": {
  12164. "text": {
  12165. "$ref": "#/components/schemas/FilePartSourceText"
  12166. },
  12167. "type": {
  12168. "type": "string",
  12169. "enum": ["resource"]
  12170. },
  12171. "clientName": {
  12172. "type": "string"
  12173. },
  12174. "uri": {
  12175. "type": "string"
  12176. }
  12177. },
  12178. "required": ["text", "type", "clientName", "uri"],
  12179. "additionalProperties": false
  12180. },
  12181. "FilePartSource": {
  12182. "anyOf": [
  12183. {
  12184. "$ref": "#/components/schemas/FileSource"
  12185. },
  12186. {
  12187. "$ref": "#/components/schemas/SymbolSource"
  12188. },
  12189. {
  12190. "$ref": "#/components/schemas/ResourceSource"
  12191. }
  12192. ]
  12193. },
  12194. "FilePart": {
  12195. "type": "object",
  12196. "properties": {
  12197. "id": {
  12198. "type": "string",
  12199. "pattern": "^prt"
  12200. },
  12201. "sessionID": {
  12202. "type": "string",
  12203. "pattern": "^ses"
  12204. },
  12205. "messageID": {
  12206. "type": "string",
  12207. "pattern": "^msg"
  12208. },
  12209. "type": {
  12210. "type": "string",
  12211. "enum": ["file"]
  12212. },
  12213. "mime": {
  12214. "type": "string"
  12215. },
  12216. "filename": {
  12217. "type": "string"
  12218. },
  12219. "url": {
  12220. "type": "string"
  12221. },
  12222. "source": {
  12223. "$ref": "#/components/schemas/FilePartSource"
  12224. }
  12225. },
  12226. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  12227. "additionalProperties": false
  12228. },
  12229. "ToolStatePending": {
  12230. "type": "object",
  12231. "properties": {
  12232. "status": {
  12233. "type": "string",
  12234. "enum": ["pending"]
  12235. },
  12236. "input": {
  12237. "type": "object"
  12238. },
  12239. "raw": {
  12240. "type": "string"
  12241. }
  12242. },
  12243. "required": ["status", "input", "raw"],
  12244. "additionalProperties": false
  12245. },
  12246. "ToolStateRunning": {
  12247. "type": "object",
  12248. "properties": {
  12249. "status": {
  12250. "type": "string",
  12251. "enum": ["running"]
  12252. },
  12253. "input": {
  12254. "type": "object"
  12255. },
  12256. "title": {
  12257. "type": "string"
  12258. },
  12259. "metadata": {
  12260. "type": "object"
  12261. },
  12262. "time": {
  12263. "type": "object",
  12264. "properties": {
  12265. "start": {
  12266. "type": "integer",
  12267. "minimum": 0
  12268. }
  12269. },
  12270. "required": ["start"],
  12271. "additionalProperties": false
  12272. }
  12273. },
  12274. "required": ["status", "input", "time"],
  12275. "additionalProperties": false
  12276. },
  12277. "ToolStateCompleted": {
  12278. "type": "object",
  12279. "properties": {
  12280. "status": {
  12281. "type": "string",
  12282. "enum": ["completed"]
  12283. },
  12284. "input": {
  12285. "type": "object"
  12286. },
  12287. "output": {
  12288. "type": "string"
  12289. },
  12290. "title": {
  12291. "type": "string"
  12292. },
  12293. "metadata": {
  12294. "type": "object"
  12295. },
  12296. "time": {
  12297. "type": "object",
  12298. "properties": {
  12299. "start": {
  12300. "type": "integer",
  12301. "minimum": 0
  12302. },
  12303. "end": {
  12304. "type": "integer",
  12305. "minimum": 0
  12306. },
  12307. "compacted": {
  12308. "type": "integer",
  12309. "minimum": 0
  12310. }
  12311. },
  12312. "required": ["start", "end"],
  12313. "additionalProperties": false
  12314. },
  12315. "attachments": {
  12316. "type": "array",
  12317. "items": {
  12318. "$ref": "#/components/schemas/FilePart"
  12319. }
  12320. }
  12321. },
  12322. "required": ["status", "input", "output", "title", "metadata", "time"],
  12323. "additionalProperties": false
  12324. },
  12325. "ToolStateError": {
  12326. "type": "object",
  12327. "properties": {
  12328. "status": {
  12329. "type": "string",
  12330. "enum": ["error"]
  12331. },
  12332. "input": {
  12333. "type": "object"
  12334. },
  12335. "error": {
  12336. "type": "string"
  12337. },
  12338. "metadata": {
  12339. "type": "object"
  12340. },
  12341. "time": {
  12342. "type": "object",
  12343. "properties": {
  12344. "start": {
  12345. "type": "integer",
  12346. "minimum": 0
  12347. },
  12348. "end": {
  12349. "type": "integer",
  12350. "minimum": 0
  12351. }
  12352. },
  12353. "required": ["start", "end"],
  12354. "additionalProperties": false
  12355. }
  12356. },
  12357. "required": ["status", "input", "error", "time"],
  12358. "additionalProperties": false
  12359. },
  12360. "ToolState": {
  12361. "anyOf": [
  12362. {
  12363. "$ref": "#/components/schemas/ToolStatePending"
  12364. },
  12365. {
  12366. "$ref": "#/components/schemas/ToolStateRunning"
  12367. },
  12368. {
  12369. "$ref": "#/components/schemas/ToolStateCompleted"
  12370. },
  12371. {
  12372. "$ref": "#/components/schemas/ToolStateError"
  12373. }
  12374. ]
  12375. },
  12376. "ToolPart": {
  12377. "type": "object",
  12378. "properties": {
  12379. "id": {
  12380. "type": "string",
  12381. "pattern": "^prt"
  12382. },
  12383. "sessionID": {
  12384. "type": "string",
  12385. "pattern": "^ses"
  12386. },
  12387. "messageID": {
  12388. "type": "string",
  12389. "pattern": "^msg"
  12390. },
  12391. "type": {
  12392. "type": "string",
  12393. "enum": ["tool"]
  12394. },
  12395. "callID": {
  12396. "type": "string"
  12397. },
  12398. "tool": {
  12399. "type": "string"
  12400. },
  12401. "state": {
  12402. "$ref": "#/components/schemas/ToolState"
  12403. },
  12404. "metadata": {
  12405. "type": "object"
  12406. }
  12407. },
  12408. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12409. "additionalProperties": false
  12410. },
  12411. "StepStartPart": {
  12412. "type": "object",
  12413. "properties": {
  12414. "id": {
  12415. "type": "string",
  12416. "pattern": "^prt"
  12417. },
  12418. "sessionID": {
  12419. "type": "string",
  12420. "pattern": "^ses"
  12421. },
  12422. "messageID": {
  12423. "type": "string",
  12424. "pattern": "^msg"
  12425. },
  12426. "type": {
  12427. "type": "string",
  12428. "enum": ["step-start"]
  12429. },
  12430. "snapshot": {
  12431. "type": "string"
  12432. }
  12433. },
  12434. "required": ["id", "sessionID", "messageID", "type"],
  12435. "additionalProperties": false
  12436. },
  12437. "StepFinishPart": {
  12438. "type": "object",
  12439. "properties": {
  12440. "id": {
  12441. "type": "string",
  12442. "pattern": "^prt"
  12443. },
  12444. "sessionID": {
  12445. "type": "string",
  12446. "pattern": "^ses"
  12447. },
  12448. "messageID": {
  12449. "type": "string",
  12450. "pattern": "^msg"
  12451. },
  12452. "type": {
  12453. "type": "string",
  12454. "enum": ["step-finish"]
  12455. },
  12456. "reason": {
  12457. "type": "string"
  12458. },
  12459. "snapshot": {
  12460. "type": "string"
  12461. },
  12462. "cost": {
  12463. "type": "number"
  12464. },
  12465. "tokens": {
  12466. "type": "object",
  12467. "properties": {
  12468. "total": {
  12469. "type": "number"
  12470. },
  12471. "input": {
  12472. "type": "number"
  12473. },
  12474. "output": {
  12475. "type": "number"
  12476. },
  12477. "reasoning": {
  12478. "type": "number"
  12479. },
  12480. "cache": {
  12481. "type": "object",
  12482. "properties": {
  12483. "read": {
  12484. "type": "number"
  12485. },
  12486. "write": {
  12487. "type": "number"
  12488. }
  12489. },
  12490. "required": ["read", "write"],
  12491. "additionalProperties": false
  12492. }
  12493. },
  12494. "required": ["input", "output", "reasoning", "cache"],
  12495. "additionalProperties": false
  12496. }
  12497. },
  12498. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12499. "additionalProperties": false
  12500. },
  12501. "SnapshotPart": {
  12502. "type": "object",
  12503. "properties": {
  12504. "id": {
  12505. "type": "string",
  12506. "pattern": "^prt"
  12507. },
  12508. "sessionID": {
  12509. "type": "string",
  12510. "pattern": "^ses"
  12511. },
  12512. "messageID": {
  12513. "type": "string",
  12514. "pattern": "^msg"
  12515. },
  12516. "type": {
  12517. "type": "string",
  12518. "enum": ["snapshot"]
  12519. },
  12520. "snapshot": {
  12521. "type": "string"
  12522. }
  12523. },
  12524. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12525. "additionalProperties": false
  12526. },
  12527. "PatchPart": {
  12528. "type": "object",
  12529. "properties": {
  12530. "id": {
  12531. "type": "string",
  12532. "pattern": "^prt"
  12533. },
  12534. "sessionID": {
  12535. "type": "string",
  12536. "pattern": "^ses"
  12537. },
  12538. "messageID": {
  12539. "type": "string",
  12540. "pattern": "^msg"
  12541. },
  12542. "type": {
  12543. "type": "string",
  12544. "enum": ["patch"]
  12545. },
  12546. "hash": {
  12547. "type": "string"
  12548. },
  12549. "files": {
  12550. "type": "array",
  12551. "items": {
  12552. "type": "string"
  12553. }
  12554. }
  12555. },
  12556. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12557. "additionalProperties": false
  12558. },
  12559. "AgentPart": {
  12560. "type": "object",
  12561. "properties": {
  12562. "id": {
  12563. "type": "string",
  12564. "pattern": "^prt"
  12565. },
  12566. "sessionID": {
  12567. "type": "string",
  12568. "pattern": "^ses"
  12569. },
  12570. "messageID": {
  12571. "type": "string",
  12572. "pattern": "^msg"
  12573. },
  12574. "type": {
  12575. "type": "string",
  12576. "enum": ["agent"]
  12577. },
  12578. "name": {
  12579. "type": "string"
  12580. },
  12581. "source": {
  12582. "type": "object",
  12583. "properties": {
  12584. "value": {
  12585. "type": "string"
  12586. },
  12587. "start": {
  12588. "type": "integer",
  12589. "minimum": 0
  12590. },
  12591. "end": {
  12592. "type": "integer",
  12593. "minimum": 0
  12594. }
  12595. },
  12596. "required": ["value", "start", "end"],
  12597. "additionalProperties": false
  12598. }
  12599. },
  12600. "required": ["id", "sessionID", "messageID", "type", "name"],
  12601. "additionalProperties": false
  12602. },
  12603. "RetryPart": {
  12604. "type": "object",
  12605. "properties": {
  12606. "id": {
  12607. "type": "string",
  12608. "pattern": "^prt"
  12609. },
  12610. "sessionID": {
  12611. "type": "string",
  12612. "pattern": "^ses"
  12613. },
  12614. "messageID": {
  12615. "type": "string",
  12616. "pattern": "^msg"
  12617. },
  12618. "type": {
  12619. "type": "string",
  12620. "enum": ["retry"]
  12621. },
  12622. "attempt": {
  12623. "type": "integer",
  12624. "minimum": 0
  12625. },
  12626. "error": {
  12627. "$ref": "#/components/schemas/APIError"
  12628. },
  12629. "time": {
  12630. "type": "object",
  12631. "properties": {
  12632. "created": {
  12633. "type": "integer",
  12634. "minimum": 0
  12635. }
  12636. },
  12637. "required": ["created"],
  12638. "additionalProperties": false
  12639. }
  12640. },
  12641. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12642. "additionalProperties": false
  12643. },
  12644. "CompactionPart": {
  12645. "type": "object",
  12646. "properties": {
  12647. "id": {
  12648. "type": "string",
  12649. "pattern": "^prt"
  12650. },
  12651. "sessionID": {
  12652. "type": "string",
  12653. "pattern": "^ses"
  12654. },
  12655. "messageID": {
  12656. "type": "string",
  12657. "pattern": "^msg"
  12658. },
  12659. "type": {
  12660. "type": "string",
  12661. "enum": ["compaction"]
  12662. },
  12663. "auto": {
  12664. "type": "boolean"
  12665. },
  12666. "overflow": {
  12667. "type": "boolean"
  12668. },
  12669. "tail_start_id": {
  12670. "type": "string",
  12671. "pattern": "^msg"
  12672. }
  12673. },
  12674. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12675. "additionalProperties": false
  12676. },
  12677. "Part": {
  12678. "anyOf": [
  12679. {
  12680. "$ref": "#/components/schemas/TextPart"
  12681. },
  12682. {
  12683. "$ref": "#/components/schemas/SubtaskPart"
  12684. },
  12685. {
  12686. "$ref": "#/components/schemas/ReasoningPart"
  12687. },
  12688. {
  12689. "$ref": "#/components/schemas/FilePart"
  12690. },
  12691. {
  12692. "$ref": "#/components/schemas/ToolPart"
  12693. },
  12694. {
  12695. "$ref": "#/components/schemas/StepStartPart"
  12696. },
  12697. {
  12698. "$ref": "#/components/schemas/StepFinishPart"
  12699. },
  12700. {
  12701. "$ref": "#/components/schemas/SnapshotPart"
  12702. },
  12703. {
  12704. "$ref": "#/components/schemas/PatchPart"
  12705. },
  12706. {
  12707. "$ref": "#/components/schemas/AgentPart"
  12708. },
  12709. {
  12710. "$ref": "#/components/schemas/RetryPart"
  12711. },
  12712. {
  12713. "$ref": "#/components/schemas/CompactionPart"
  12714. }
  12715. ]
  12716. },
  12717. "QuestionOption": {
  12718. "type": "object",
  12719. "properties": {
  12720. "label": {
  12721. "type": "string",
  12722. "description": "Display text (1-5 words, concise)"
  12723. },
  12724. "description": {
  12725. "type": "string",
  12726. "description": "Explanation of choice"
  12727. }
  12728. },
  12729. "required": ["label", "description"],
  12730. "additionalProperties": false
  12731. },
  12732. "QuestionInfo": {
  12733. "type": "object",
  12734. "properties": {
  12735. "question": {
  12736. "type": "string",
  12737. "description": "Complete question"
  12738. },
  12739. "header": {
  12740. "type": "string",
  12741. "description": "Very short label (max 30 chars)"
  12742. },
  12743. "options": {
  12744. "type": "array",
  12745. "items": {
  12746. "$ref": "#/components/schemas/QuestionOption"
  12747. },
  12748. "description": "Available choices"
  12749. },
  12750. "multiple": {
  12751. "type": "boolean"
  12752. },
  12753. "custom": {
  12754. "type": "boolean"
  12755. }
  12756. },
  12757. "required": ["question", "header", "options"],
  12758. "additionalProperties": false
  12759. },
  12760. "QuestionTool": {
  12761. "type": "object",
  12762. "properties": {
  12763. "messageID": {
  12764. "type": "string",
  12765. "pattern": "^msg"
  12766. },
  12767. "callID": {
  12768. "type": "string"
  12769. }
  12770. },
  12771. "required": ["messageID", "callID"],
  12772. "additionalProperties": false
  12773. },
  12774. "QuestionAnswer": {
  12775. "type": "array",
  12776. "items": {
  12777. "type": "string"
  12778. }
  12779. },
  12780. "Todo": {
  12781. "type": "object",
  12782. "properties": {
  12783. "content": {
  12784. "type": "string",
  12785. "description": "Brief description of the task"
  12786. },
  12787. "status": {
  12788. "type": "string",
  12789. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  12790. },
  12791. "priority": {
  12792. "type": "string",
  12793. "description": "Priority level of the task: high, medium, low"
  12794. }
  12795. },
  12796. "required": ["content", "status", "priority"],
  12797. "additionalProperties": false
  12798. },
  12799. "SessionStatus": {
  12800. "anyOf": [
  12801. {
  12802. "type": "object",
  12803. "properties": {
  12804. "type": {
  12805. "type": "string",
  12806. "enum": ["idle"]
  12807. }
  12808. },
  12809. "required": ["type"],
  12810. "additionalProperties": false
  12811. },
  12812. {
  12813. "type": "object",
  12814. "properties": {
  12815. "type": {
  12816. "type": "string",
  12817. "enum": ["retry"]
  12818. },
  12819. "attempt": {
  12820. "type": "integer",
  12821. "minimum": 0
  12822. },
  12823. "message": {
  12824. "type": "string"
  12825. },
  12826. "action": {
  12827. "type": "object",
  12828. "properties": {
  12829. "reason": {
  12830. "type": "string"
  12831. },
  12832. "provider": {
  12833. "type": "string"
  12834. },
  12835. "title": {
  12836. "type": "string"
  12837. },
  12838. "message": {
  12839. "type": "string"
  12840. },
  12841. "label": {
  12842. "type": "string"
  12843. },
  12844. "link": {
  12845. "type": "string"
  12846. }
  12847. },
  12848. "required": ["reason", "provider", "title", "message", "label"],
  12849. "additionalProperties": false
  12850. },
  12851. "next": {
  12852. "type": "integer",
  12853. "minimum": 0
  12854. }
  12855. },
  12856. "required": ["type", "attempt", "message", "next"],
  12857. "additionalProperties": false
  12858. },
  12859. {
  12860. "type": "object",
  12861. "properties": {
  12862. "type": {
  12863. "type": "string",
  12864. "enum": ["busy"]
  12865. }
  12866. },
  12867. "required": ["type"],
  12868. "additionalProperties": false
  12869. }
  12870. ]
  12871. },
  12872. "Pty": {
  12873. "type": "object",
  12874. "properties": {
  12875. "id": {
  12876. "type": "string",
  12877. "pattern": "^pty"
  12878. },
  12879. "title": {
  12880. "type": "string"
  12881. },
  12882. "command": {
  12883. "type": "string"
  12884. },
  12885. "args": {
  12886. "type": "array",
  12887. "items": {
  12888. "type": "string"
  12889. }
  12890. },
  12891. "cwd": {
  12892. "type": "string"
  12893. },
  12894. "status": {
  12895. "type": "string",
  12896. "enum": ["running", "exited"]
  12897. },
  12898. "pid": {
  12899. "type": "integer",
  12900. "minimum": 0
  12901. }
  12902. },
  12903. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  12904. "additionalProperties": false
  12905. },
  12906. "GlobalEvent": {
  12907. "type": "object",
  12908. "properties": {
  12909. "directory": {
  12910. "type": "string"
  12911. },
  12912. "project": {
  12913. "type": "string"
  12914. },
  12915. "workspace": {
  12916. "type": "string"
  12917. },
  12918. "payload": {
  12919. "anyOf": [
  12920. {
  12921. "type": "object",
  12922. "properties": {
  12923. "id": {
  12924. "type": "string"
  12925. },
  12926. "type": {
  12927. "type": "string",
  12928. "enum": ["models-dev.refreshed"]
  12929. },
  12930. "properties": {
  12931. "type": "object",
  12932. "properties": {}
  12933. }
  12934. },
  12935. "required": ["id", "type", "properties"],
  12936. "additionalProperties": false
  12937. },
  12938. {
  12939. "type": "object",
  12940. "properties": {
  12941. "id": {
  12942. "type": "string"
  12943. },
  12944. "type": {
  12945. "type": "string",
  12946. "enum": ["plugin.added"]
  12947. },
  12948. "properties": {
  12949. "type": "object",
  12950. "properties": {
  12951. "id": {
  12952. "type": "string"
  12953. }
  12954. },
  12955. "required": ["id"],
  12956. "additionalProperties": false
  12957. }
  12958. },
  12959. "required": ["id", "type", "properties"],
  12960. "additionalProperties": false
  12961. },
  12962. {
  12963. "type": "object",
  12964. "properties": {
  12965. "id": {
  12966. "type": "string"
  12967. },
  12968. "type": {
  12969. "type": "string",
  12970. "enum": ["catalog.model.updated"]
  12971. },
  12972. "properties": {
  12973. "type": "object",
  12974. "properties": {
  12975. "model": {
  12976. "$ref": "#/components/schemas/ModelV2Info"
  12977. }
  12978. },
  12979. "required": ["model"],
  12980. "additionalProperties": false
  12981. }
  12982. },
  12983. "required": ["id", "type", "properties"],
  12984. "additionalProperties": false
  12985. },
  12986. {
  12987. "type": "object",
  12988. "properties": {
  12989. "id": {
  12990. "type": "string"
  12991. },
  12992. "type": {
  12993. "type": "string",
  12994. "enum": ["file.edited"]
  12995. },
  12996. "properties": {
  12997. "type": "object",
  12998. "properties": {
  12999. "file": {
  13000. "type": "string"
  13001. }
  13002. },
  13003. "required": ["file"],
  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.agent.switched"]
  13019. },
  13020. "properties": {
  13021. "type": "object",
  13022. "properties": {
  13023. "timestamp": {
  13024. "type": "number"
  13025. },
  13026. "sessionID": {
  13027. "type": "string",
  13028. "pattern": "^ses"
  13029. },
  13030. "agent": {
  13031. "type": "string"
  13032. }
  13033. },
  13034. "required": ["timestamp", "sessionID", "agent"],
  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.model.switched"]
  13050. },
  13051. "properties": {
  13052. "type": "object",
  13053. "properties": {
  13054. "timestamp": {
  13055. "type": "number"
  13056. },
  13057. "sessionID": {
  13058. "type": "string",
  13059. "pattern": "^ses"
  13060. },
  13061. "model": {
  13062. "type": "object",
  13063. "properties": {
  13064. "id": {
  13065. "type": "string"
  13066. },
  13067. "providerID": {
  13068. "type": "string"
  13069. },
  13070. "variant": {
  13071. "type": "string"
  13072. }
  13073. },
  13074. "required": ["id", "providerID"],
  13075. "additionalProperties": false
  13076. }
  13077. },
  13078. "required": ["timestamp", "sessionID", "model"],
  13079. "additionalProperties": false
  13080. }
  13081. },
  13082. "required": ["id", "type", "properties"],
  13083. "additionalProperties": false
  13084. },
  13085. {
  13086. "type": "object",
  13087. "properties": {
  13088. "id": {
  13089. "type": "string"
  13090. },
  13091. "type": {
  13092. "type": "string",
  13093. "enum": ["session.next.prompted"]
  13094. },
  13095. "properties": {
  13096. "type": "object",
  13097. "properties": {
  13098. "timestamp": {
  13099. "type": "number"
  13100. },
  13101. "sessionID": {
  13102. "type": "string",
  13103. "pattern": "^ses"
  13104. },
  13105. "prompt": {
  13106. "$ref": "#/components/schemas/Prompt"
  13107. }
  13108. },
  13109. "required": ["timestamp", "sessionID", "prompt"],
  13110. "additionalProperties": false
  13111. }
  13112. },
  13113. "required": ["id", "type", "properties"],
  13114. "additionalProperties": false
  13115. },
  13116. {
  13117. "type": "object",
  13118. "properties": {
  13119. "id": {
  13120. "type": "string"
  13121. },
  13122. "type": {
  13123. "type": "string",
  13124. "enum": ["session.next.synthetic"]
  13125. },
  13126. "properties": {
  13127. "type": "object",
  13128. "properties": {
  13129. "timestamp": {
  13130. "type": "number"
  13131. },
  13132. "sessionID": {
  13133. "type": "string",
  13134. "pattern": "^ses"
  13135. },
  13136. "text": {
  13137. "type": "string"
  13138. }
  13139. },
  13140. "required": ["timestamp", "sessionID", "text"],
  13141. "additionalProperties": false
  13142. }
  13143. },
  13144. "required": ["id", "type", "properties"],
  13145. "additionalProperties": false
  13146. },
  13147. {
  13148. "type": "object",
  13149. "properties": {
  13150. "id": {
  13151. "type": "string"
  13152. },
  13153. "type": {
  13154. "type": "string",
  13155. "enum": ["session.next.shell.started"]
  13156. },
  13157. "properties": {
  13158. "type": "object",
  13159. "properties": {
  13160. "timestamp": {
  13161. "type": "number"
  13162. },
  13163. "sessionID": {
  13164. "type": "string",
  13165. "pattern": "^ses"
  13166. },
  13167. "callID": {
  13168. "type": "string"
  13169. },
  13170. "command": {
  13171. "type": "string"
  13172. }
  13173. },
  13174. "required": ["timestamp", "sessionID", "callID", "command"],
  13175. "additionalProperties": false
  13176. }
  13177. },
  13178. "required": ["id", "type", "properties"],
  13179. "additionalProperties": false
  13180. },
  13181. {
  13182. "type": "object",
  13183. "properties": {
  13184. "id": {
  13185. "type": "string"
  13186. },
  13187. "type": {
  13188. "type": "string",
  13189. "enum": ["session.next.shell.ended"]
  13190. },
  13191. "properties": {
  13192. "type": "object",
  13193. "properties": {
  13194. "timestamp": {
  13195. "type": "number"
  13196. },
  13197. "sessionID": {
  13198. "type": "string",
  13199. "pattern": "^ses"
  13200. },
  13201. "callID": {
  13202. "type": "string"
  13203. },
  13204. "output": {
  13205. "type": "string"
  13206. }
  13207. },
  13208. "required": ["timestamp", "sessionID", "callID", "output"],
  13209. "additionalProperties": false
  13210. }
  13211. },
  13212. "required": ["id", "type", "properties"],
  13213. "additionalProperties": false
  13214. },
  13215. {
  13216. "type": "object",
  13217. "properties": {
  13218. "id": {
  13219. "type": "string"
  13220. },
  13221. "type": {
  13222. "type": "string",
  13223. "enum": ["session.next.step.started"]
  13224. },
  13225. "properties": {
  13226. "type": "object",
  13227. "properties": {
  13228. "timestamp": {
  13229. "type": "number"
  13230. },
  13231. "sessionID": {
  13232. "type": "string",
  13233. "pattern": "^ses"
  13234. },
  13235. "agent": {
  13236. "type": "string"
  13237. },
  13238. "model": {
  13239. "type": "object",
  13240. "properties": {
  13241. "id": {
  13242. "type": "string"
  13243. },
  13244. "providerID": {
  13245. "type": "string"
  13246. },
  13247. "variant": {
  13248. "type": "string"
  13249. }
  13250. },
  13251. "required": ["id", "providerID"],
  13252. "additionalProperties": false
  13253. },
  13254. "snapshot": {
  13255. "type": "string"
  13256. }
  13257. },
  13258. "required": ["timestamp", "sessionID", "agent", "model"],
  13259. "additionalProperties": false
  13260. }
  13261. },
  13262. "required": ["id", "type", "properties"],
  13263. "additionalProperties": false
  13264. },
  13265. {
  13266. "type": "object",
  13267. "properties": {
  13268. "id": {
  13269. "type": "string"
  13270. },
  13271. "type": {
  13272. "type": "string",
  13273. "enum": ["session.next.step.ended"]
  13274. },
  13275. "properties": {
  13276. "type": "object",
  13277. "properties": {
  13278. "timestamp": {
  13279. "type": "number"
  13280. },
  13281. "sessionID": {
  13282. "type": "string",
  13283. "pattern": "^ses"
  13284. },
  13285. "finish": {
  13286. "type": "string"
  13287. },
  13288. "cost": {
  13289. "type": "number"
  13290. },
  13291. "tokens": {
  13292. "type": "object",
  13293. "properties": {
  13294. "input": {
  13295. "type": "number"
  13296. },
  13297. "output": {
  13298. "type": "number"
  13299. },
  13300. "reasoning": {
  13301. "type": "number"
  13302. },
  13303. "cache": {
  13304. "type": "object",
  13305. "properties": {
  13306. "read": {
  13307. "type": "number"
  13308. },
  13309. "write": {
  13310. "type": "number"
  13311. }
  13312. },
  13313. "required": ["read", "write"],
  13314. "additionalProperties": false
  13315. }
  13316. },
  13317. "required": ["input", "output", "reasoning", "cache"],
  13318. "additionalProperties": false
  13319. },
  13320. "snapshot": {
  13321. "type": "string"
  13322. }
  13323. },
  13324. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  13325. "additionalProperties": false
  13326. }
  13327. },
  13328. "required": ["id", "type", "properties"],
  13329. "additionalProperties": false
  13330. },
  13331. {
  13332. "type": "object",
  13333. "properties": {
  13334. "id": {
  13335. "type": "string"
  13336. },
  13337. "type": {
  13338. "type": "string",
  13339. "enum": ["session.next.step.failed"]
  13340. },
  13341. "properties": {
  13342. "type": "object",
  13343. "properties": {
  13344. "timestamp": {
  13345. "type": "number"
  13346. },
  13347. "sessionID": {
  13348. "type": "string",
  13349. "pattern": "^ses"
  13350. },
  13351. "error": {
  13352. "$ref": "#/components/schemas/SessionErrorUnknown"
  13353. }
  13354. },
  13355. "required": ["timestamp", "sessionID", "error"],
  13356. "additionalProperties": false
  13357. }
  13358. },
  13359. "required": ["id", "type", "properties"],
  13360. "additionalProperties": false
  13361. },
  13362. {
  13363. "type": "object",
  13364. "properties": {
  13365. "id": {
  13366. "type": "string"
  13367. },
  13368. "type": {
  13369. "type": "string",
  13370. "enum": ["session.next.text.started"]
  13371. },
  13372. "properties": {
  13373. "type": "object",
  13374. "properties": {
  13375. "timestamp": {
  13376. "type": "number"
  13377. },
  13378. "sessionID": {
  13379. "type": "string",
  13380. "pattern": "^ses"
  13381. }
  13382. },
  13383. "required": ["timestamp", "sessionID"],
  13384. "additionalProperties": false
  13385. }
  13386. },
  13387. "required": ["id", "type", "properties"],
  13388. "additionalProperties": false
  13389. },
  13390. {
  13391. "type": "object",
  13392. "properties": {
  13393. "id": {
  13394. "type": "string"
  13395. },
  13396. "type": {
  13397. "type": "string",
  13398. "enum": ["session.next.text.delta"]
  13399. },
  13400. "properties": {
  13401. "type": "object",
  13402. "properties": {
  13403. "timestamp": {
  13404. "type": "number"
  13405. },
  13406. "sessionID": {
  13407. "type": "string",
  13408. "pattern": "^ses"
  13409. },
  13410. "delta": {
  13411. "type": "string"
  13412. }
  13413. },
  13414. "required": ["timestamp", "sessionID", "delta"],
  13415. "additionalProperties": false
  13416. }
  13417. },
  13418. "required": ["id", "type", "properties"],
  13419. "additionalProperties": false
  13420. },
  13421. {
  13422. "type": "object",
  13423. "properties": {
  13424. "id": {
  13425. "type": "string"
  13426. },
  13427. "type": {
  13428. "type": "string",
  13429. "enum": ["session.next.text.ended"]
  13430. },
  13431. "properties": {
  13432. "type": "object",
  13433. "properties": {
  13434. "timestamp": {
  13435. "type": "number"
  13436. },
  13437. "sessionID": {
  13438. "type": "string",
  13439. "pattern": "^ses"
  13440. },
  13441. "text": {
  13442. "type": "string"
  13443. }
  13444. },
  13445. "required": ["timestamp", "sessionID", "text"],
  13446. "additionalProperties": false
  13447. }
  13448. },
  13449. "required": ["id", "type", "properties"],
  13450. "additionalProperties": false
  13451. },
  13452. {
  13453. "type": "object",
  13454. "properties": {
  13455. "id": {
  13456. "type": "string"
  13457. },
  13458. "type": {
  13459. "type": "string",
  13460. "enum": ["session.next.reasoning.started"]
  13461. },
  13462. "properties": {
  13463. "type": "object",
  13464. "properties": {
  13465. "timestamp": {
  13466. "type": "number"
  13467. },
  13468. "sessionID": {
  13469. "type": "string",
  13470. "pattern": "^ses"
  13471. },
  13472. "reasoningID": {
  13473. "type": "string"
  13474. }
  13475. },
  13476. "required": ["timestamp", "sessionID", "reasoningID"],
  13477. "additionalProperties": false
  13478. }
  13479. },
  13480. "required": ["id", "type", "properties"],
  13481. "additionalProperties": false
  13482. },
  13483. {
  13484. "type": "object",
  13485. "properties": {
  13486. "id": {
  13487. "type": "string"
  13488. },
  13489. "type": {
  13490. "type": "string",
  13491. "enum": ["session.next.reasoning.delta"]
  13492. },
  13493. "properties": {
  13494. "type": "object",
  13495. "properties": {
  13496. "timestamp": {
  13497. "type": "number"
  13498. },
  13499. "sessionID": {
  13500. "type": "string",
  13501. "pattern": "^ses"
  13502. },
  13503. "reasoningID": {
  13504. "type": "string"
  13505. },
  13506. "delta": {
  13507. "type": "string"
  13508. }
  13509. },
  13510. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  13511. "additionalProperties": false
  13512. }
  13513. },
  13514. "required": ["id", "type", "properties"],
  13515. "additionalProperties": false
  13516. },
  13517. {
  13518. "type": "object",
  13519. "properties": {
  13520. "id": {
  13521. "type": "string"
  13522. },
  13523. "type": {
  13524. "type": "string",
  13525. "enum": ["session.next.reasoning.ended"]
  13526. },
  13527. "properties": {
  13528. "type": "object",
  13529. "properties": {
  13530. "timestamp": {
  13531. "type": "number"
  13532. },
  13533. "sessionID": {
  13534. "type": "string",
  13535. "pattern": "^ses"
  13536. },
  13537. "reasoningID": {
  13538. "type": "string"
  13539. },
  13540. "text": {
  13541. "type": "string"
  13542. }
  13543. },
  13544. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  13545. "additionalProperties": false
  13546. }
  13547. },
  13548. "required": ["id", "type", "properties"],
  13549. "additionalProperties": false
  13550. },
  13551. {
  13552. "type": "object",
  13553. "properties": {
  13554. "id": {
  13555. "type": "string"
  13556. },
  13557. "type": {
  13558. "type": "string",
  13559. "enum": ["session.next.tool.input.started"]
  13560. },
  13561. "properties": {
  13562. "type": "object",
  13563. "properties": {
  13564. "timestamp": {
  13565. "type": "number"
  13566. },
  13567. "sessionID": {
  13568. "type": "string",
  13569. "pattern": "^ses"
  13570. },
  13571. "callID": {
  13572. "type": "string"
  13573. },
  13574. "name": {
  13575. "type": "string"
  13576. }
  13577. },
  13578. "required": ["timestamp", "sessionID", "callID", "name"],
  13579. "additionalProperties": false
  13580. }
  13581. },
  13582. "required": ["id", "type", "properties"],
  13583. "additionalProperties": false
  13584. },
  13585. {
  13586. "type": "object",
  13587. "properties": {
  13588. "id": {
  13589. "type": "string"
  13590. },
  13591. "type": {
  13592. "type": "string",
  13593. "enum": ["session.next.tool.input.delta"]
  13594. },
  13595. "properties": {
  13596. "type": "object",
  13597. "properties": {
  13598. "timestamp": {
  13599. "type": "number"
  13600. },
  13601. "sessionID": {
  13602. "type": "string",
  13603. "pattern": "^ses"
  13604. },
  13605. "callID": {
  13606. "type": "string"
  13607. },
  13608. "delta": {
  13609. "type": "string"
  13610. }
  13611. },
  13612. "required": ["timestamp", "sessionID", "callID", "delta"],
  13613. "additionalProperties": false
  13614. }
  13615. },
  13616. "required": ["id", "type", "properties"],
  13617. "additionalProperties": false
  13618. },
  13619. {
  13620. "type": "object",
  13621. "properties": {
  13622. "id": {
  13623. "type": "string"
  13624. },
  13625. "type": {
  13626. "type": "string",
  13627. "enum": ["session.next.tool.input.ended"]
  13628. },
  13629. "properties": {
  13630. "type": "object",
  13631. "properties": {
  13632. "timestamp": {
  13633. "type": "number"
  13634. },
  13635. "sessionID": {
  13636. "type": "string",
  13637. "pattern": "^ses"
  13638. },
  13639. "callID": {
  13640. "type": "string"
  13641. },
  13642. "text": {
  13643. "type": "string"
  13644. }
  13645. },
  13646. "required": ["timestamp", "sessionID", "callID", "text"],
  13647. "additionalProperties": false
  13648. }
  13649. },
  13650. "required": ["id", "type", "properties"],
  13651. "additionalProperties": false
  13652. },
  13653. {
  13654. "type": "object",
  13655. "properties": {
  13656. "id": {
  13657. "type": "string"
  13658. },
  13659. "type": {
  13660. "type": "string",
  13661. "enum": ["session.next.tool.called"]
  13662. },
  13663. "properties": {
  13664. "type": "object",
  13665. "properties": {
  13666. "timestamp": {
  13667. "type": "number"
  13668. },
  13669. "sessionID": {
  13670. "type": "string",
  13671. "pattern": "^ses"
  13672. },
  13673. "callID": {
  13674. "type": "string"
  13675. },
  13676. "tool": {
  13677. "type": "string"
  13678. },
  13679. "input": {
  13680. "type": "object"
  13681. },
  13682. "provider": {
  13683. "type": "object",
  13684. "properties": {
  13685. "executed": {
  13686. "type": "boolean"
  13687. },
  13688. "metadata": {
  13689. "type": "object"
  13690. }
  13691. },
  13692. "required": ["executed"],
  13693. "additionalProperties": false
  13694. }
  13695. },
  13696. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  13697. "additionalProperties": false
  13698. }
  13699. },
  13700. "required": ["id", "type", "properties"],
  13701. "additionalProperties": false
  13702. },
  13703. {
  13704. "type": "object",
  13705. "properties": {
  13706. "id": {
  13707. "type": "string"
  13708. },
  13709. "type": {
  13710. "type": "string",
  13711. "enum": ["session.next.tool.progress"]
  13712. },
  13713. "properties": {
  13714. "type": "object",
  13715. "properties": {
  13716. "timestamp": {
  13717. "type": "number"
  13718. },
  13719. "sessionID": {
  13720. "type": "string",
  13721. "pattern": "^ses"
  13722. },
  13723. "callID": {
  13724. "type": "string"
  13725. },
  13726. "structured": {
  13727. "type": "object"
  13728. },
  13729. "content": {
  13730. "type": "array",
  13731. "items": {
  13732. "anyOf": [
  13733. {
  13734. "$ref": "#/components/schemas/ToolTextContent"
  13735. },
  13736. {
  13737. "$ref": "#/components/schemas/ToolFileContent"
  13738. }
  13739. ]
  13740. }
  13741. }
  13742. },
  13743. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  13744. "additionalProperties": false
  13745. }
  13746. },
  13747. "required": ["id", "type", "properties"],
  13748. "additionalProperties": false
  13749. },
  13750. {
  13751. "type": "object",
  13752. "properties": {
  13753. "id": {
  13754. "type": "string"
  13755. },
  13756. "type": {
  13757. "type": "string",
  13758. "enum": ["session.next.tool.success"]
  13759. },
  13760. "properties": {
  13761. "type": "object",
  13762. "properties": {
  13763. "timestamp": {
  13764. "type": "number"
  13765. },
  13766. "sessionID": {
  13767. "type": "string",
  13768. "pattern": "^ses"
  13769. },
  13770. "callID": {
  13771. "type": "string"
  13772. },
  13773. "structured": {
  13774. "type": "object"
  13775. },
  13776. "content": {
  13777. "type": "array",
  13778. "items": {
  13779. "anyOf": [
  13780. {
  13781. "$ref": "#/components/schemas/ToolTextContent"
  13782. },
  13783. {
  13784. "$ref": "#/components/schemas/ToolFileContent"
  13785. }
  13786. ]
  13787. }
  13788. },
  13789. "provider": {
  13790. "type": "object",
  13791. "properties": {
  13792. "executed": {
  13793. "type": "boolean"
  13794. },
  13795. "metadata": {
  13796. "type": "object"
  13797. }
  13798. },
  13799. "required": ["executed"],
  13800. "additionalProperties": false
  13801. }
  13802. },
  13803. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  13804. "additionalProperties": false
  13805. }
  13806. },
  13807. "required": ["id", "type", "properties"],
  13808. "additionalProperties": false
  13809. },
  13810. {
  13811. "type": "object",
  13812. "properties": {
  13813. "id": {
  13814. "type": "string"
  13815. },
  13816. "type": {
  13817. "type": "string",
  13818. "enum": ["session.next.tool.failed"]
  13819. },
  13820. "properties": {
  13821. "type": "object",
  13822. "properties": {
  13823. "timestamp": {
  13824. "type": "number"
  13825. },
  13826. "sessionID": {
  13827. "type": "string",
  13828. "pattern": "^ses"
  13829. },
  13830. "callID": {
  13831. "type": "string"
  13832. },
  13833. "error": {
  13834. "$ref": "#/components/schemas/SessionErrorUnknown"
  13835. },
  13836. "provider": {
  13837. "type": "object",
  13838. "properties": {
  13839. "executed": {
  13840. "type": "boolean"
  13841. },
  13842. "metadata": {
  13843. "type": "object"
  13844. }
  13845. },
  13846. "required": ["executed"],
  13847. "additionalProperties": false
  13848. }
  13849. },
  13850. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  13851. "additionalProperties": false
  13852. }
  13853. },
  13854. "required": ["id", "type", "properties"],
  13855. "additionalProperties": false
  13856. },
  13857. {
  13858. "type": "object",
  13859. "properties": {
  13860. "id": {
  13861. "type": "string"
  13862. },
  13863. "type": {
  13864. "type": "string",
  13865. "enum": ["session.next.retried"]
  13866. },
  13867. "properties": {
  13868. "type": "object",
  13869. "properties": {
  13870. "timestamp": {
  13871. "type": "number"
  13872. },
  13873. "sessionID": {
  13874. "type": "string",
  13875. "pattern": "^ses"
  13876. },
  13877. "attempt": {
  13878. "type": "number"
  13879. },
  13880. "error": {
  13881. "$ref": "#/components/schemas/SessionNextRetry_error"
  13882. }
  13883. },
  13884. "required": ["timestamp", "sessionID", "attempt", "error"],
  13885. "additionalProperties": false
  13886. }
  13887. },
  13888. "required": ["id", "type", "properties"],
  13889. "additionalProperties": false
  13890. },
  13891. {
  13892. "type": "object",
  13893. "properties": {
  13894. "id": {
  13895. "type": "string"
  13896. },
  13897. "type": {
  13898. "type": "string",
  13899. "enum": ["session.next.compaction.started"]
  13900. },
  13901. "properties": {
  13902. "type": "object",
  13903. "properties": {
  13904. "timestamp": {
  13905. "type": "number"
  13906. },
  13907. "sessionID": {
  13908. "type": "string",
  13909. "pattern": "^ses"
  13910. },
  13911. "reason": {
  13912. "type": "string",
  13913. "enum": ["auto", "manual"]
  13914. }
  13915. },
  13916. "required": ["timestamp", "sessionID", "reason"],
  13917. "additionalProperties": false
  13918. }
  13919. },
  13920. "required": ["id", "type", "properties"],
  13921. "additionalProperties": false
  13922. },
  13923. {
  13924. "type": "object",
  13925. "properties": {
  13926. "id": {
  13927. "type": "string"
  13928. },
  13929. "type": {
  13930. "type": "string",
  13931. "enum": ["session.next.compaction.delta"]
  13932. },
  13933. "properties": {
  13934. "type": "object",
  13935. "properties": {
  13936. "timestamp": {
  13937. "type": "number"
  13938. },
  13939. "sessionID": {
  13940. "type": "string",
  13941. "pattern": "^ses"
  13942. },
  13943. "text": {
  13944. "type": "string"
  13945. }
  13946. },
  13947. "required": ["timestamp", "sessionID", "text"],
  13948. "additionalProperties": false
  13949. }
  13950. },
  13951. "required": ["id", "type", "properties"],
  13952. "additionalProperties": false
  13953. },
  13954. {
  13955. "type": "object",
  13956. "properties": {
  13957. "id": {
  13958. "type": "string"
  13959. },
  13960. "type": {
  13961. "type": "string",
  13962. "enum": ["session.next.compaction.ended"]
  13963. },
  13964. "properties": {
  13965. "type": "object",
  13966. "properties": {
  13967. "timestamp": {
  13968. "type": "number"
  13969. },
  13970. "sessionID": {
  13971. "type": "string",
  13972. "pattern": "^ses"
  13973. },
  13974. "text": {
  13975. "type": "string"
  13976. },
  13977. "include": {
  13978. "type": "string"
  13979. }
  13980. },
  13981. "required": ["timestamp", "sessionID", "text"],
  13982. "additionalProperties": false
  13983. }
  13984. },
  13985. "required": ["id", "type", "properties"],
  13986. "additionalProperties": false
  13987. },
  13988. {
  13989. "type": "object",
  13990. "properties": {
  13991. "id": {
  13992. "type": "string"
  13993. },
  13994. "type": {
  13995. "type": "string",
  13996. "enum": ["file.watcher.updated"]
  13997. },
  13998. "properties": {
  13999. "type": "object",
  14000. "properties": {
  14001. "file": {
  14002. "type": "string"
  14003. },
  14004. "event": {
  14005. "type": "string",
  14006. "enum": ["add", "change", "unlink"]
  14007. }
  14008. },
  14009. "required": ["file", "event"],
  14010. "additionalProperties": false
  14011. }
  14012. },
  14013. "required": ["id", "type", "properties"],
  14014. "additionalProperties": false
  14015. },
  14016. {
  14017. "type": "object",
  14018. "properties": {
  14019. "id": {
  14020. "type": "string"
  14021. },
  14022. "type": {
  14023. "type": "string",
  14024. "enum": ["session.created"]
  14025. },
  14026. "properties": {
  14027. "type": "object",
  14028. "properties": {
  14029. "sessionID": {
  14030. "type": "string",
  14031. "pattern": "^ses"
  14032. },
  14033. "info": {
  14034. "$ref": "#/components/schemas/Session"
  14035. }
  14036. },
  14037. "required": ["sessionID", "info"],
  14038. "additionalProperties": false
  14039. }
  14040. },
  14041. "required": ["id", "type", "properties"],
  14042. "additionalProperties": false
  14043. },
  14044. {
  14045. "type": "object",
  14046. "properties": {
  14047. "id": {
  14048. "type": "string"
  14049. },
  14050. "type": {
  14051. "type": "string",
  14052. "enum": ["session.updated"]
  14053. },
  14054. "properties": {
  14055. "type": "object",
  14056. "properties": {
  14057. "sessionID": {
  14058. "type": "string",
  14059. "pattern": "^ses"
  14060. },
  14061. "info": {
  14062. "$ref": "#/components/schemas/Session"
  14063. }
  14064. },
  14065. "required": ["sessionID", "info"],
  14066. "additionalProperties": false
  14067. }
  14068. },
  14069. "required": ["id", "type", "properties"],
  14070. "additionalProperties": false
  14071. },
  14072. {
  14073. "type": "object",
  14074. "properties": {
  14075. "id": {
  14076. "type": "string"
  14077. },
  14078. "type": {
  14079. "type": "string",
  14080. "enum": ["session.deleted"]
  14081. },
  14082. "properties": {
  14083. "type": "object",
  14084. "properties": {
  14085. "sessionID": {
  14086. "type": "string",
  14087. "pattern": "^ses"
  14088. },
  14089. "info": {
  14090. "$ref": "#/components/schemas/Session"
  14091. }
  14092. },
  14093. "required": ["sessionID", "info"],
  14094. "additionalProperties": false
  14095. }
  14096. },
  14097. "required": ["id", "type", "properties"],
  14098. "additionalProperties": false
  14099. },
  14100. {
  14101. "type": "object",
  14102. "properties": {
  14103. "id": {
  14104. "type": "string"
  14105. },
  14106. "type": {
  14107. "type": "string",
  14108. "enum": ["message.updated"]
  14109. },
  14110. "properties": {
  14111. "type": "object",
  14112. "properties": {
  14113. "sessionID": {
  14114. "type": "string",
  14115. "pattern": "^ses"
  14116. },
  14117. "info": {
  14118. "$ref": "#/components/schemas/Message"
  14119. }
  14120. },
  14121. "required": ["sessionID", "info"],
  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": ["message.removed"]
  14137. },
  14138. "properties": {
  14139. "type": "object",
  14140. "properties": {
  14141. "sessionID": {
  14142. "type": "string",
  14143. "pattern": "^ses"
  14144. },
  14145. "messageID": {
  14146. "type": "string",
  14147. "pattern": "^msg"
  14148. }
  14149. },
  14150. "required": ["sessionID", "messageID"],
  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": ["message.part.updated"]
  14166. },
  14167. "properties": {
  14168. "type": "object",
  14169. "properties": {
  14170. "sessionID": {
  14171. "type": "string",
  14172. "pattern": "^ses"
  14173. },
  14174. "part": {
  14175. "$ref": "#/components/schemas/Part"
  14176. },
  14177. "time": {
  14178. "type": "number"
  14179. }
  14180. },
  14181. "required": ["sessionID", "part", "time"],
  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": ["message.part.removed"]
  14197. },
  14198. "properties": {
  14199. "type": "object",
  14200. "properties": {
  14201. "sessionID": {
  14202. "type": "string",
  14203. "pattern": "^ses"
  14204. },
  14205. "messageID": {
  14206. "type": "string",
  14207. "pattern": "^msg"
  14208. },
  14209. "partID": {
  14210. "type": "string",
  14211. "pattern": "^prt"
  14212. }
  14213. },
  14214. "required": ["sessionID", "messageID", "partID"],
  14215. "additionalProperties": false
  14216. }
  14217. },
  14218. "required": ["id", "type", "properties"],
  14219. "additionalProperties": false
  14220. },
  14221. {
  14222. "type": "object",
  14223. "properties": {
  14224. "id": {
  14225. "type": "string"
  14226. },
  14227. "type": {
  14228. "type": "string",
  14229. "enum": ["message.part.delta"]
  14230. },
  14231. "properties": {
  14232. "type": "object",
  14233. "properties": {
  14234. "sessionID": {
  14235. "type": "string",
  14236. "pattern": "^ses"
  14237. },
  14238. "messageID": {
  14239. "type": "string",
  14240. "pattern": "^msg"
  14241. },
  14242. "partID": {
  14243. "type": "string",
  14244. "pattern": "^prt"
  14245. },
  14246. "field": {
  14247. "type": "string"
  14248. },
  14249. "delta": {
  14250. "type": "string"
  14251. }
  14252. },
  14253. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  14254. "additionalProperties": false
  14255. }
  14256. },
  14257. "required": ["id", "type", "properties"],
  14258. "additionalProperties": false
  14259. },
  14260. {
  14261. "type": "object",
  14262. "properties": {
  14263. "id": {
  14264. "type": "string"
  14265. },
  14266. "type": {
  14267. "type": "string",
  14268. "enum": ["session.diff"]
  14269. },
  14270. "properties": {
  14271. "type": "object",
  14272. "properties": {
  14273. "sessionID": {
  14274. "type": "string",
  14275. "pattern": "^ses"
  14276. },
  14277. "diff": {
  14278. "type": "array",
  14279. "items": {
  14280. "$ref": "#/components/schemas/SnapshotFileDiff"
  14281. }
  14282. }
  14283. },
  14284. "required": ["sessionID", "diff"],
  14285. "additionalProperties": false
  14286. }
  14287. },
  14288. "required": ["id", "type", "properties"],
  14289. "additionalProperties": false
  14290. },
  14291. {
  14292. "type": "object",
  14293. "properties": {
  14294. "id": {
  14295. "type": "string"
  14296. },
  14297. "type": {
  14298. "type": "string",
  14299. "enum": ["session.error"]
  14300. },
  14301. "properties": {
  14302. "type": "object",
  14303. "properties": {
  14304. "sessionID": {
  14305. "type": "string",
  14306. "pattern": "^ses"
  14307. },
  14308. "error": {
  14309. "anyOf": [
  14310. {
  14311. "$ref": "#/components/schemas/ProviderAuthError"
  14312. },
  14313. {
  14314. "$ref": "#/components/schemas/UnknownError"
  14315. },
  14316. {
  14317. "$ref": "#/components/schemas/MessageOutputLengthError"
  14318. },
  14319. {
  14320. "$ref": "#/components/schemas/MessageAbortedError"
  14321. },
  14322. {
  14323. "$ref": "#/components/schemas/StructuredOutputError"
  14324. },
  14325. {
  14326. "$ref": "#/components/schemas/ContextOverflowError"
  14327. },
  14328. {
  14329. "$ref": "#/components/schemas/APIError"
  14330. }
  14331. ]
  14332. }
  14333. },
  14334. "additionalProperties": false
  14335. }
  14336. },
  14337. "required": ["id", "type", "properties"],
  14338. "additionalProperties": false
  14339. },
  14340. {
  14341. "type": "object",
  14342. "properties": {
  14343. "id": {
  14344. "type": "string"
  14345. },
  14346. "type": {
  14347. "type": "string",
  14348. "enum": ["permission.asked"]
  14349. },
  14350. "properties": {
  14351. "type": "object",
  14352. "properties": {
  14353. "id": {
  14354. "type": "string",
  14355. "pattern": "^per"
  14356. },
  14357. "sessionID": {
  14358. "type": "string",
  14359. "pattern": "^ses"
  14360. },
  14361. "permission": {
  14362. "type": "string"
  14363. },
  14364. "patterns": {
  14365. "type": "array",
  14366. "items": {
  14367. "type": "string"
  14368. }
  14369. },
  14370. "metadata": {
  14371. "type": "object"
  14372. },
  14373. "always": {
  14374. "type": "array",
  14375. "items": {
  14376. "type": "string"
  14377. }
  14378. },
  14379. "tool": {
  14380. "type": "object",
  14381. "properties": {
  14382. "messageID": {
  14383. "type": "string"
  14384. },
  14385. "callID": {
  14386. "type": "string"
  14387. }
  14388. },
  14389. "required": ["messageID", "callID"],
  14390. "additionalProperties": false
  14391. }
  14392. },
  14393. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  14394. "additionalProperties": false
  14395. }
  14396. },
  14397. "required": ["id", "type", "properties"],
  14398. "additionalProperties": false
  14399. },
  14400. {
  14401. "type": "object",
  14402. "properties": {
  14403. "id": {
  14404. "type": "string"
  14405. },
  14406. "type": {
  14407. "type": "string",
  14408. "enum": ["permission.replied"]
  14409. },
  14410. "properties": {
  14411. "type": "object",
  14412. "properties": {
  14413. "sessionID": {
  14414. "type": "string",
  14415. "pattern": "^ses"
  14416. },
  14417. "requestID": {
  14418. "type": "string",
  14419. "pattern": "^per"
  14420. },
  14421. "reply": {
  14422. "type": "string",
  14423. "enum": ["once", "always", "reject"]
  14424. }
  14425. },
  14426. "required": ["sessionID", "requestID", "reply"],
  14427. "additionalProperties": false
  14428. }
  14429. },
  14430. "required": ["id", "type", "properties"],
  14431. "additionalProperties": false
  14432. },
  14433. {
  14434. "type": "object",
  14435. "properties": {
  14436. "id": {
  14437. "type": "string"
  14438. },
  14439. "type": {
  14440. "type": "string",
  14441. "enum": ["question.asked"]
  14442. },
  14443. "properties": {
  14444. "type": "object",
  14445. "properties": {
  14446. "id": {
  14447. "type": "string",
  14448. "pattern": "^que"
  14449. },
  14450. "sessionID": {
  14451. "type": "string",
  14452. "pattern": "^ses"
  14453. },
  14454. "questions": {
  14455. "type": "array",
  14456. "items": {
  14457. "$ref": "#/components/schemas/QuestionInfo"
  14458. },
  14459. "description": "Questions to ask"
  14460. },
  14461. "tool": {
  14462. "$ref": "#/components/schemas/QuestionTool"
  14463. }
  14464. },
  14465. "required": ["id", "sessionID", "questions"],
  14466. "additionalProperties": false
  14467. }
  14468. },
  14469. "required": ["id", "type", "properties"],
  14470. "additionalProperties": false
  14471. },
  14472. {
  14473. "type": "object",
  14474. "properties": {
  14475. "id": {
  14476. "type": "string"
  14477. },
  14478. "type": {
  14479. "type": "string",
  14480. "enum": ["question.replied"]
  14481. },
  14482. "properties": {
  14483. "type": "object",
  14484. "properties": {
  14485. "sessionID": {
  14486. "type": "string",
  14487. "pattern": "^ses"
  14488. },
  14489. "requestID": {
  14490. "type": "string",
  14491. "pattern": "^que"
  14492. },
  14493. "answers": {
  14494. "type": "array",
  14495. "items": {
  14496. "$ref": "#/components/schemas/QuestionAnswer"
  14497. }
  14498. }
  14499. },
  14500. "required": ["sessionID", "requestID", "answers"],
  14501. "additionalProperties": false
  14502. }
  14503. },
  14504. "required": ["id", "type", "properties"],
  14505. "additionalProperties": false
  14506. },
  14507. {
  14508. "type": "object",
  14509. "properties": {
  14510. "id": {
  14511. "type": "string"
  14512. },
  14513. "type": {
  14514. "type": "string",
  14515. "enum": ["question.rejected"]
  14516. },
  14517. "properties": {
  14518. "type": "object",
  14519. "properties": {
  14520. "sessionID": {
  14521. "type": "string",
  14522. "pattern": "^ses"
  14523. },
  14524. "requestID": {
  14525. "type": "string",
  14526. "pattern": "^que"
  14527. }
  14528. },
  14529. "required": ["sessionID", "requestID"],
  14530. "additionalProperties": false
  14531. }
  14532. },
  14533. "required": ["id", "type", "properties"],
  14534. "additionalProperties": false
  14535. },
  14536. {
  14537. "type": "object",
  14538. "properties": {
  14539. "id": {
  14540. "type": "string"
  14541. },
  14542. "type": {
  14543. "type": "string",
  14544. "enum": ["todo.updated"]
  14545. },
  14546. "properties": {
  14547. "type": "object",
  14548. "properties": {
  14549. "sessionID": {
  14550. "type": "string",
  14551. "pattern": "^ses"
  14552. },
  14553. "todos": {
  14554. "type": "array",
  14555. "items": {
  14556. "$ref": "#/components/schemas/Todo"
  14557. }
  14558. }
  14559. },
  14560. "required": ["sessionID", "todos"],
  14561. "additionalProperties": false
  14562. }
  14563. },
  14564. "required": ["id", "type", "properties"],
  14565. "additionalProperties": false
  14566. },
  14567. {
  14568. "type": "object",
  14569. "properties": {
  14570. "id": {
  14571. "type": "string"
  14572. },
  14573. "type": {
  14574. "type": "string",
  14575. "enum": ["session.status"]
  14576. },
  14577. "properties": {
  14578. "type": "object",
  14579. "properties": {
  14580. "sessionID": {
  14581. "type": "string",
  14582. "pattern": "^ses"
  14583. },
  14584. "status": {
  14585. "$ref": "#/components/schemas/SessionStatus"
  14586. }
  14587. },
  14588. "required": ["sessionID", "status"],
  14589. "additionalProperties": false
  14590. }
  14591. },
  14592. "required": ["id", "type", "properties"],
  14593. "additionalProperties": false
  14594. },
  14595. {
  14596. "type": "object",
  14597. "properties": {
  14598. "id": {
  14599. "type": "string"
  14600. },
  14601. "type": {
  14602. "type": "string",
  14603. "enum": ["session.idle"]
  14604. },
  14605. "properties": {
  14606. "type": "object",
  14607. "properties": {
  14608. "sessionID": {
  14609. "type": "string",
  14610. "pattern": "^ses"
  14611. }
  14612. },
  14613. "required": ["sessionID"],
  14614. "additionalProperties": false
  14615. }
  14616. },
  14617. "required": ["id", "type", "properties"],
  14618. "additionalProperties": false
  14619. },
  14620. {
  14621. "type": "object",
  14622. "properties": {
  14623. "id": {
  14624. "type": "string"
  14625. },
  14626. "type": {
  14627. "type": "string",
  14628. "enum": ["session.compacted"]
  14629. },
  14630. "properties": {
  14631. "type": "object",
  14632. "properties": {
  14633. "sessionID": {
  14634. "type": "string",
  14635. "pattern": "^ses"
  14636. }
  14637. },
  14638. "required": ["sessionID"],
  14639. "additionalProperties": false
  14640. }
  14641. },
  14642. "required": ["id", "type", "properties"],
  14643. "additionalProperties": false
  14644. },
  14645. {
  14646. "type": "object",
  14647. "properties": {
  14648. "id": {
  14649. "type": "string"
  14650. },
  14651. "type": {
  14652. "type": "string",
  14653. "enum": ["lsp.updated"]
  14654. },
  14655. "properties": {
  14656. "type": "object",
  14657. "properties": {}
  14658. }
  14659. },
  14660. "required": ["id", "type", "properties"],
  14661. "additionalProperties": false
  14662. },
  14663. {
  14664. "type": "object",
  14665. "properties": {
  14666. "id": {
  14667. "type": "string"
  14668. },
  14669. "type": {
  14670. "type": "string",
  14671. "enum": ["tui.prompt.append"]
  14672. },
  14673. "properties": {
  14674. "type": "object",
  14675. "properties": {
  14676. "text": {
  14677. "type": "string"
  14678. }
  14679. },
  14680. "required": ["text"],
  14681. "additionalProperties": false
  14682. }
  14683. },
  14684. "required": ["id", "type", "properties"],
  14685. "additionalProperties": false
  14686. },
  14687. {
  14688. "type": "object",
  14689. "properties": {
  14690. "id": {
  14691. "type": "string"
  14692. },
  14693. "type": {
  14694. "type": "string",
  14695. "enum": ["tui.command.execute"]
  14696. },
  14697. "properties": {
  14698. "type": "object",
  14699. "properties": {
  14700. "command": {
  14701. "anyOf": [
  14702. {
  14703. "type": "string",
  14704. "enum": [
  14705. "session.list",
  14706. "session.new",
  14707. "session.share",
  14708. "session.interrupt",
  14709. "session.compact",
  14710. "session.page.up",
  14711. "session.page.down",
  14712. "session.line.up",
  14713. "session.line.down",
  14714. "session.half.page.up",
  14715. "session.half.page.down",
  14716. "session.first",
  14717. "session.last",
  14718. "prompt.clear",
  14719. "prompt.submit",
  14720. "agent.cycle"
  14721. ]
  14722. },
  14723. {
  14724. "type": "string"
  14725. }
  14726. ]
  14727. }
  14728. },
  14729. "required": ["command"],
  14730. "additionalProperties": false
  14731. }
  14732. },
  14733. "required": ["id", "type", "properties"],
  14734. "additionalProperties": false
  14735. },
  14736. {
  14737. "type": "object",
  14738. "properties": {
  14739. "id": {
  14740. "type": "string"
  14741. },
  14742. "type": {
  14743. "type": "string",
  14744. "enum": ["tui.toast.show"]
  14745. },
  14746. "properties": {
  14747. "type": "object",
  14748. "properties": {
  14749. "title": {
  14750. "type": "string"
  14751. },
  14752. "message": {
  14753. "type": "string"
  14754. },
  14755. "variant": {
  14756. "type": "string",
  14757. "enum": ["info", "success", "warning", "error"]
  14758. },
  14759. "duration": {
  14760. "type": "integer",
  14761. "exclusiveMinimum": 0
  14762. }
  14763. },
  14764. "required": ["message", "variant"],
  14765. "additionalProperties": false
  14766. }
  14767. },
  14768. "required": ["id", "type", "properties"],
  14769. "additionalProperties": false
  14770. },
  14771. {
  14772. "type": "object",
  14773. "properties": {
  14774. "id": {
  14775. "type": "string"
  14776. },
  14777. "type": {
  14778. "type": "string",
  14779. "enum": ["tui.session.select"]
  14780. },
  14781. "properties": {
  14782. "type": "object",
  14783. "properties": {
  14784. "sessionID": {
  14785. "type": "string",
  14786. "pattern": "^ses",
  14787. "description": "Session ID to navigate to"
  14788. }
  14789. },
  14790. "required": ["sessionID"],
  14791. "additionalProperties": false
  14792. }
  14793. },
  14794. "required": ["id", "type", "properties"],
  14795. "additionalProperties": false
  14796. },
  14797. {
  14798. "type": "object",
  14799. "properties": {
  14800. "id": {
  14801. "type": "string"
  14802. },
  14803. "type": {
  14804. "type": "string",
  14805. "enum": ["mcp.tools.changed"]
  14806. },
  14807. "properties": {
  14808. "type": "object",
  14809. "properties": {
  14810. "server": {
  14811. "type": "string"
  14812. }
  14813. },
  14814. "required": ["server"],
  14815. "additionalProperties": false
  14816. }
  14817. },
  14818. "required": ["id", "type", "properties"],
  14819. "additionalProperties": false
  14820. },
  14821. {
  14822. "type": "object",
  14823. "properties": {
  14824. "id": {
  14825. "type": "string"
  14826. },
  14827. "type": {
  14828. "type": "string",
  14829. "enum": ["mcp.browser.open.failed"]
  14830. },
  14831. "properties": {
  14832. "type": "object",
  14833. "properties": {
  14834. "mcpName": {
  14835. "type": "string"
  14836. },
  14837. "url": {
  14838. "type": "string"
  14839. }
  14840. },
  14841. "required": ["mcpName", "url"],
  14842. "additionalProperties": false
  14843. }
  14844. },
  14845. "required": ["id", "type", "properties"],
  14846. "additionalProperties": false
  14847. },
  14848. {
  14849. "type": "object",
  14850. "properties": {
  14851. "id": {
  14852. "type": "string"
  14853. },
  14854. "type": {
  14855. "type": "string",
  14856. "enum": ["command.executed"]
  14857. },
  14858. "properties": {
  14859. "type": "object",
  14860. "properties": {
  14861. "name": {
  14862. "type": "string"
  14863. },
  14864. "sessionID": {
  14865. "type": "string",
  14866. "pattern": "^ses"
  14867. },
  14868. "arguments": {
  14869. "type": "string"
  14870. },
  14871. "messageID": {
  14872. "type": "string",
  14873. "pattern": "^msg"
  14874. }
  14875. },
  14876. "required": ["name", "sessionID", "arguments", "messageID"],
  14877. "additionalProperties": false
  14878. }
  14879. },
  14880. "required": ["id", "type", "properties"],
  14881. "additionalProperties": false
  14882. },
  14883. {
  14884. "type": "object",
  14885. "properties": {
  14886. "id": {
  14887. "type": "string"
  14888. },
  14889. "type": {
  14890. "type": "string",
  14891. "enum": ["project.updated"]
  14892. },
  14893. "properties": {
  14894. "type": "object",
  14895. "properties": {
  14896. "id": {
  14897. "type": "string"
  14898. },
  14899. "worktree": {
  14900. "type": "string"
  14901. },
  14902. "vcs": {
  14903. "type": "string",
  14904. "enum": ["git"]
  14905. },
  14906. "name": {
  14907. "type": "string"
  14908. },
  14909. "icon": {
  14910. "type": "object",
  14911. "properties": {
  14912. "url": {
  14913. "type": "string"
  14914. },
  14915. "override": {
  14916. "type": "string"
  14917. },
  14918. "color": {
  14919. "type": "string"
  14920. }
  14921. },
  14922. "additionalProperties": false
  14923. },
  14924. "commands": {
  14925. "type": "object",
  14926. "properties": {
  14927. "start": {
  14928. "type": "string",
  14929. "description": "Startup script to run when creating a new workspace (worktree)"
  14930. }
  14931. },
  14932. "additionalProperties": false
  14933. },
  14934. "time": {
  14935. "type": "object",
  14936. "properties": {
  14937. "created": {
  14938. "type": "integer",
  14939. "minimum": 0
  14940. },
  14941. "updated": {
  14942. "type": "integer",
  14943. "minimum": 0
  14944. },
  14945. "initialized": {
  14946. "type": "integer",
  14947. "minimum": 0
  14948. }
  14949. },
  14950. "required": ["created", "updated"],
  14951. "additionalProperties": false
  14952. },
  14953. "sandboxes": {
  14954. "type": "array",
  14955. "items": {
  14956. "type": "string"
  14957. }
  14958. }
  14959. },
  14960. "required": ["id", "worktree", "time", "sandboxes"],
  14961. "additionalProperties": false
  14962. }
  14963. },
  14964. "required": ["id", "type", "properties"],
  14965. "additionalProperties": false
  14966. },
  14967. {
  14968. "type": "object",
  14969. "properties": {
  14970. "id": {
  14971. "type": "string"
  14972. },
  14973. "type": {
  14974. "type": "string",
  14975. "enum": ["vcs.branch.updated"]
  14976. },
  14977. "properties": {
  14978. "type": "object",
  14979. "properties": {
  14980. "branch": {
  14981. "type": "string"
  14982. }
  14983. },
  14984. "additionalProperties": false
  14985. }
  14986. },
  14987. "required": ["id", "type", "properties"],
  14988. "additionalProperties": false
  14989. },
  14990. {
  14991. "type": "object",
  14992. "properties": {
  14993. "id": {
  14994. "type": "string"
  14995. },
  14996. "type": {
  14997. "type": "string",
  14998. "enum": ["workspace.ready"]
  14999. },
  15000. "properties": {
  15001. "type": "object",
  15002. "properties": {
  15003. "name": {
  15004. "type": "string"
  15005. }
  15006. },
  15007. "required": ["name"],
  15008. "additionalProperties": false
  15009. }
  15010. },
  15011. "required": ["id", "type", "properties"],
  15012. "additionalProperties": false
  15013. },
  15014. {
  15015. "type": "object",
  15016. "properties": {
  15017. "id": {
  15018. "type": "string"
  15019. },
  15020. "type": {
  15021. "type": "string",
  15022. "enum": ["workspace.failed"]
  15023. },
  15024. "properties": {
  15025. "type": "object",
  15026. "properties": {
  15027. "message": {
  15028. "type": "string"
  15029. }
  15030. },
  15031. "required": ["message"],
  15032. "additionalProperties": false
  15033. }
  15034. },
  15035. "required": ["id", "type", "properties"],
  15036. "additionalProperties": false
  15037. },
  15038. {
  15039. "type": "object",
  15040. "properties": {
  15041. "id": {
  15042. "type": "string"
  15043. },
  15044. "type": {
  15045. "type": "string",
  15046. "enum": ["workspace.status"]
  15047. },
  15048. "properties": {
  15049. "type": "object",
  15050. "properties": {
  15051. "workspaceID": {
  15052. "type": "string",
  15053. "pattern": "^wrk"
  15054. },
  15055. "status": {
  15056. "type": "string",
  15057. "enum": ["connected", "connecting", "disconnected", "error"]
  15058. }
  15059. },
  15060. "required": ["workspaceID", "status"],
  15061. "additionalProperties": false
  15062. }
  15063. },
  15064. "required": ["id", "type", "properties"],
  15065. "additionalProperties": false
  15066. },
  15067. {
  15068. "type": "object",
  15069. "properties": {
  15070. "id": {
  15071. "type": "string"
  15072. },
  15073. "type": {
  15074. "type": "string",
  15075. "enum": ["worktree.ready"]
  15076. },
  15077. "properties": {
  15078. "type": "object",
  15079. "properties": {
  15080. "name": {
  15081. "type": "string"
  15082. },
  15083. "branch": {
  15084. "type": "string"
  15085. }
  15086. },
  15087. "required": ["name"],
  15088. "additionalProperties": false
  15089. }
  15090. },
  15091. "required": ["id", "type", "properties"],
  15092. "additionalProperties": false
  15093. },
  15094. {
  15095. "type": "object",
  15096. "properties": {
  15097. "id": {
  15098. "type": "string"
  15099. },
  15100. "type": {
  15101. "type": "string",
  15102. "enum": ["worktree.failed"]
  15103. },
  15104. "properties": {
  15105. "type": "object",
  15106. "properties": {
  15107. "message": {
  15108. "type": "string"
  15109. }
  15110. },
  15111. "required": ["message"],
  15112. "additionalProperties": false
  15113. }
  15114. },
  15115. "required": ["id", "type", "properties"],
  15116. "additionalProperties": false
  15117. },
  15118. {
  15119. "type": "object",
  15120. "properties": {
  15121. "id": {
  15122. "type": "string"
  15123. },
  15124. "type": {
  15125. "type": "string",
  15126. "enum": ["pty.created"]
  15127. },
  15128. "properties": {
  15129. "type": "object",
  15130. "properties": {
  15131. "info": {
  15132. "$ref": "#/components/schemas/Pty"
  15133. }
  15134. },
  15135. "required": ["info"],
  15136. "additionalProperties": false
  15137. }
  15138. },
  15139. "required": ["id", "type", "properties"],
  15140. "additionalProperties": false
  15141. },
  15142. {
  15143. "type": "object",
  15144. "properties": {
  15145. "id": {
  15146. "type": "string"
  15147. },
  15148. "type": {
  15149. "type": "string",
  15150. "enum": ["pty.updated"]
  15151. },
  15152. "properties": {
  15153. "type": "object",
  15154. "properties": {
  15155. "info": {
  15156. "$ref": "#/components/schemas/Pty"
  15157. }
  15158. },
  15159. "required": ["info"],
  15160. "additionalProperties": false
  15161. }
  15162. },
  15163. "required": ["id", "type", "properties"],
  15164. "additionalProperties": false
  15165. },
  15166. {
  15167. "type": "object",
  15168. "properties": {
  15169. "id": {
  15170. "type": "string"
  15171. },
  15172. "type": {
  15173. "type": "string",
  15174. "enum": ["pty.exited"]
  15175. },
  15176. "properties": {
  15177. "type": "object",
  15178. "properties": {
  15179. "id": {
  15180. "type": "string",
  15181. "pattern": "^pty"
  15182. },
  15183. "exitCode": {
  15184. "type": "integer",
  15185. "minimum": 0
  15186. }
  15187. },
  15188. "required": ["id", "exitCode"],
  15189. "additionalProperties": false
  15190. }
  15191. },
  15192. "required": ["id", "type", "properties"],
  15193. "additionalProperties": false
  15194. },
  15195. {
  15196. "type": "object",
  15197. "properties": {
  15198. "id": {
  15199. "type": "string"
  15200. },
  15201. "type": {
  15202. "type": "string",
  15203. "enum": ["pty.deleted"]
  15204. },
  15205. "properties": {
  15206. "type": "object",
  15207. "properties": {
  15208. "id": {
  15209. "type": "string",
  15210. "pattern": "^pty"
  15211. }
  15212. },
  15213. "required": ["id"],
  15214. "additionalProperties": false
  15215. }
  15216. },
  15217. "required": ["id", "type", "properties"],
  15218. "additionalProperties": false
  15219. },
  15220. {
  15221. "type": "object",
  15222. "properties": {
  15223. "id": {
  15224. "type": "string"
  15225. },
  15226. "type": {
  15227. "type": "string",
  15228. "enum": ["installation.updated"]
  15229. },
  15230. "properties": {
  15231. "type": "object",
  15232. "properties": {
  15233. "version": {
  15234. "type": "string"
  15235. }
  15236. },
  15237. "required": ["version"],
  15238. "additionalProperties": false
  15239. }
  15240. },
  15241. "required": ["id", "type", "properties"],
  15242. "additionalProperties": false
  15243. },
  15244. {
  15245. "type": "object",
  15246. "properties": {
  15247. "id": {
  15248. "type": "string"
  15249. },
  15250. "type": {
  15251. "type": "string",
  15252. "enum": ["installation.update-available"]
  15253. },
  15254. "properties": {
  15255. "type": "object",
  15256. "properties": {
  15257. "version": {
  15258. "type": "string"
  15259. }
  15260. },
  15261. "required": ["version"],
  15262. "additionalProperties": false
  15263. }
  15264. },
  15265. "required": ["id", "type", "properties"],
  15266. "additionalProperties": false
  15267. },
  15268. {
  15269. "type": "object",
  15270. "properties": {
  15271. "id": {
  15272. "type": "string"
  15273. },
  15274. "type": {
  15275. "type": "string",
  15276. "enum": ["server.connected"]
  15277. },
  15278. "properties": {
  15279. "type": "object",
  15280. "properties": {}
  15281. }
  15282. },
  15283. "required": ["id", "type", "properties"],
  15284. "additionalProperties": false
  15285. },
  15286. {
  15287. "type": "object",
  15288. "properties": {
  15289. "id": {
  15290. "type": "string"
  15291. },
  15292. "type": {
  15293. "type": "string",
  15294. "enum": ["global.disposed"]
  15295. },
  15296. "properties": {
  15297. "type": "object",
  15298. "properties": {}
  15299. }
  15300. },
  15301. "required": ["id", "type", "properties"],
  15302. "additionalProperties": false
  15303. },
  15304. {
  15305. "type": "object",
  15306. "properties": {
  15307. "id": {
  15308. "type": "string"
  15309. },
  15310. "type": {
  15311. "type": "string",
  15312. "enum": ["permission.v2.asked"]
  15313. },
  15314. "properties": {
  15315. "type": "object",
  15316. "properties": {
  15317. "id": {
  15318. "type": "string",
  15319. "pattern": "^per"
  15320. },
  15321. "sessionID": {
  15322. "type": "string",
  15323. "pattern": "^ses"
  15324. },
  15325. "action": {
  15326. "type": "string"
  15327. },
  15328. "resources": {
  15329. "type": "array",
  15330. "items": {
  15331. "type": "string"
  15332. }
  15333. },
  15334. "save": {
  15335. "type": "array",
  15336. "items": {
  15337. "type": "string"
  15338. }
  15339. },
  15340. "metadata": {
  15341. "type": "object"
  15342. },
  15343. "source": {
  15344. "$ref": "#/components/schemas/PermissionV2Source"
  15345. }
  15346. },
  15347. "required": ["id", "sessionID", "action", "resources"],
  15348. "additionalProperties": false
  15349. }
  15350. },
  15351. "required": ["id", "type", "properties"],
  15352. "additionalProperties": false
  15353. },
  15354. {
  15355. "type": "object",
  15356. "properties": {
  15357. "id": {
  15358. "type": "string"
  15359. },
  15360. "type": {
  15361. "type": "string",
  15362. "enum": ["permission.v2.replied"]
  15363. },
  15364. "properties": {
  15365. "type": "object",
  15366. "properties": {
  15367. "sessionID": {
  15368. "type": "string",
  15369. "pattern": "^ses"
  15370. },
  15371. "requestID": {
  15372. "type": "string",
  15373. "pattern": "^per"
  15374. },
  15375. "reply": {
  15376. "$ref": "#/components/schemas/PermissionV2Reply"
  15377. }
  15378. },
  15379. "required": ["sessionID", "requestID", "reply"],
  15380. "additionalProperties": false
  15381. }
  15382. },
  15383. "required": ["id", "type", "properties"],
  15384. "additionalProperties": false
  15385. },
  15386. {
  15387. "type": "object",
  15388. "properties": {
  15389. "id": {
  15390. "type": "string"
  15391. },
  15392. "type": {
  15393. "type": "string",
  15394. "enum": ["account.added"]
  15395. },
  15396. "properties": {
  15397. "type": "object",
  15398. "properties": {
  15399. "account": {
  15400. "$ref": "#/components/schemas/AuthInfo"
  15401. }
  15402. },
  15403. "required": ["account"],
  15404. "additionalProperties": false
  15405. }
  15406. },
  15407. "required": ["id", "type", "properties"],
  15408. "additionalProperties": false
  15409. },
  15410. {
  15411. "type": "object",
  15412. "properties": {
  15413. "id": {
  15414. "type": "string"
  15415. },
  15416. "type": {
  15417. "type": "string",
  15418. "enum": ["account.removed"]
  15419. },
  15420. "properties": {
  15421. "type": "object",
  15422. "properties": {
  15423. "account": {
  15424. "$ref": "#/components/schemas/AuthInfo"
  15425. }
  15426. },
  15427. "required": ["account"],
  15428. "additionalProperties": false
  15429. }
  15430. },
  15431. "required": ["id", "type", "properties"],
  15432. "additionalProperties": false
  15433. },
  15434. {
  15435. "type": "object",
  15436. "properties": {
  15437. "id": {
  15438. "type": "string"
  15439. },
  15440. "type": {
  15441. "type": "string",
  15442. "enum": ["account.switched"]
  15443. },
  15444. "properties": {
  15445. "type": "object",
  15446. "properties": {
  15447. "serviceID": {
  15448. "type": "string"
  15449. },
  15450. "from": {
  15451. "type": "string"
  15452. },
  15453. "to": {
  15454. "type": "string"
  15455. }
  15456. },
  15457. "required": ["serviceID"],
  15458. "additionalProperties": false
  15459. }
  15460. },
  15461. "required": ["id", "type", "properties"],
  15462. "additionalProperties": false
  15463. },
  15464. {
  15465. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15466. },
  15467. {
  15468. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  15469. },
  15470. {
  15471. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  15472. },
  15473. {
  15474. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  15475. },
  15476. {
  15477. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  15478. },
  15479. {
  15480. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  15481. },
  15482. {
  15483. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  15484. },
  15485. {
  15486. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  15487. },
  15488. {
  15489. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  15490. },
  15491. {
  15492. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  15493. },
  15494. {
  15495. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  15496. },
  15497. {
  15498. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  15499. },
  15500. {
  15501. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  15502. },
  15503. {
  15504. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  15505. },
  15506. {
  15507. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  15508. },
  15509. {
  15510. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  15511. },
  15512. {
  15513. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  15514. },
  15515. {
  15516. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  15517. },
  15518. {
  15519. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  15520. },
  15521. {
  15522. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  15523. },
  15524. {
  15525. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  15526. },
  15527. {
  15528. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  15529. },
  15530. {
  15531. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  15532. },
  15533. {
  15534. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  15535. },
  15536. {
  15537. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  15538. },
  15539. {
  15540. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  15541. },
  15542. {
  15543. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  15544. },
  15545. {
  15546. "$ref": "#/components/schemas/SyncEventSessionCreated"
  15547. },
  15548. {
  15549. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  15550. },
  15551. {
  15552. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  15553. },
  15554. {
  15555. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  15556. },
  15557. {
  15558. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  15559. },
  15560. {
  15561. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  15562. },
  15563. {
  15564. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  15565. }
  15566. ]
  15567. }
  15568. },
  15569. "required": ["directory", "payload"],
  15570. "additionalProperties": false
  15571. },
  15572. "LogLevel": {
  15573. "type": "string",
  15574. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  15575. "description": "Log level"
  15576. },
  15577. "ServerConfig": {
  15578. "type": "object",
  15579. "properties": {
  15580. "port": {
  15581. "type": "integer",
  15582. "exclusiveMinimum": 0
  15583. },
  15584. "hostname": {
  15585. "type": "string"
  15586. },
  15587. "mdns": {
  15588. "type": "boolean"
  15589. },
  15590. "mdnsDomain": {
  15591. "type": "string"
  15592. },
  15593. "cors": {
  15594. "type": "array",
  15595. "items": {
  15596. "type": "string"
  15597. }
  15598. }
  15599. },
  15600. "additionalProperties": false,
  15601. "description": "Server configuration for opencode serve and web commands"
  15602. },
  15603. "ReferenceConfigEntry": {
  15604. "anyOf": [
  15605. {
  15606. "type": "string"
  15607. },
  15608. {
  15609. "type": "object",
  15610. "properties": {
  15611. "repository": {
  15612. "type": "string",
  15613. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  15614. },
  15615. "branch": {
  15616. "type": "string"
  15617. }
  15618. },
  15619. "required": ["repository"],
  15620. "additionalProperties": false
  15621. },
  15622. {
  15623. "type": "object",
  15624. "properties": {
  15625. "path": {
  15626. "type": "string",
  15627. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  15628. }
  15629. },
  15630. "required": ["path"],
  15631. "additionalProperties": false
  15632. }
  15633. ]
  15634. },
  15635. "ReferenceConfig": {
  15636. "type": "object",
  15637. "additionalProperties": {
  15638. "$ref": "#/components/schemas/ReferenceConfigEntry"
  15639. }
  15640. },
  15641. "PermissionActionConfig": {
  15642. "type": "string",
  15643. "enum": ["ask", "allow", "deny"]
  15644. },
  15645. "PermissionObjectConfig": {
  15646. "type": "object",
  15647. "additionalProperties": {
  15648. "$ref": "#/components/schemas/PermissionActionConfig"
  15649. }
  15650. },
  15651. "PermissionRuleConfig": {
  15652. "anyOf": [
  15653. {
  15654. "$ref": "#/components/schemas/PermissionActionConfig"
  15655. },
  15656. {
  15657. "$ref": "#/components/schemas/PermissionObjectConfig"
  15658. }
  15659. ]
  15660. },
  15661. "PermissionConfig": {
  15662. "anyOf": [
  15663. {
  15664. "$ref": "#/components/schemas/PermissionActionConfig"
  15665. },
  15666. {
  15667. "type": "object",
  15668. "properties": {
  15669. "read": {
  15670. "$ref": "#/components/schemas/PermissionRuleConfig"
  15671. },
  15672. "edit": {
  15673. "$ref": "#/components/schemas/PermissionRuleConfig"
  15674. },
  15675. "glob": {
  15676. "$ref": "#/components/schemas/PermissionRuleConfig"
  15677. },
  15678. "grep": {
  15679. "$ref": "#/components/schemas/PermissionRuleConfig"
  15680. },
  15681. "list": {
  15682. "$ref": "#/components/schemas/PermissionRuleConfig"
  15683. },
  15684. "bash": {
  15685. "$ref": "#/components/schemas/PermissionRuleConfig"
  15686. },
  15687. "task": {
  15688. "$ref": "#/components/schemas/PermissionRuleConfig"
  15689. },
  15690. "external_directory": {
  15691. "$ref": "#/components/schemas/PermissionRuleConfig"
  15692. },
  15693. "todowrite": {
  15694. "$ref": "#/components/schemas/PermissionActionConfig"
  15695. },
  15696. "question": {
  15697. "$ref": "#/components/schemas/PermissionActionConfig"
  15698. },
  15699. "webfetch": {
  15700. "$ref": "#/components/schemas/PermissionActionConfig"
  15701. },
  15702. "websearch": {
  15703. "$ref": "#/components/schemas/PermissionActionConfig"
  15704. },
  15705. "repo_clone": {
  15706. "$ref": "#/components/schemas/PermissionRuleConfig"
  15707. },
  15708. "repo_overview": {
  15709. "$ref": "#/components/schemas/PermissionRuleConfig"
  15710. },
  15711. "lsp": {
  15712. "$ref": "#/components/schemas/PermissionRuleConfig"
  15713. },
  15714. "doom_loop": {
  15715. "$ref": "#/components/schemas/PermissionActionConfig"
  15716. },
  15717. "skill": {
  15718. "$ref": "#/components/schemas/PermissionRuleConfig"
  15719. }
  15720. },
  15721. "additionalProperties": {
  15722. "$ref": "#/components/schemas/PermissionRuleConfig"
  15723. }
  15724. }
  15725. ]
  15726. },
  15727. "AgentConfig": {
  15728. "type": "object",
  15729. "properties": {
  15730. "model": {
  15731. "type": "string"
  15732. },
  15733. "variant": {
  15734. "type": "string"
  15735. },
  15736. "temperature": {
  15737. "type": "number"
  15738. },
  15739. "top_p": {
  15740. "type": "number"
  15741. },
  15742. "prompt": {
  15743. "type": "string"
  15744. },
  15745. "tools": {
  15746. "type": "object",
  15747. "additionalProperties": {
  15748. "type": "boolean"
  15749. }
  15750. },
  15751. "disable": {
  15752. "type": "boolean"
  15753. },
  15754. "description": {
  15755. "type": "string"
  15756. },
  15757. "mode": {
  15758. "type": "string",
  15759. "enum": ["subagent", "primary", "all"]
  15760. },
  15761. "hidden": {
  15762. "type": "boolean"
  15763. },
  15764. "options": {
  15765. "type": "object"
  15766. },
  15767. "color": {
  15768. "anyOf": [
  15769. {
  15770. "type": "string",
  15771. "pattern": "^#[0-9a-fA-F]{6}$"
  15772. },
  15773. {
  15774. "type": "string",
  15775. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  15776. }
  15777. ],
  15778. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  15779. },
  15780. "steps": {
  15781. "type": "integer",
  15782. "exclusiveMinimum": 0
  15783. },
  15784. "maxSteps": {
  15785. "type": "integer",
  15786. "exclusiveMinimum": 0
  15787. },
  15788. "permission": {
  15789. "$ref": "#/components/schemas/PermissionConfig"
  15790. }
  15791. },
  15792. "additionalProperties": {}
  15793. },
  15794. "ProviderConfig": {
  15795. "type": "object",
  15796. "properties": {
  15797. "api": {
  15798. "type": "string"
  15799. },
  15800. "name": {
  15801. "type": "string"
  15802. },
  15803. "env": {
  15804. "type": "array",
  15805. "items": {
  15806. "type": "string"
  15807. }
  15808. },
  15809. "id": {
  15810. "type": "string"
  15811. },
  15812. "npm": {
  15813. "type": "string"
  15814. },
  15815. "whitelist": {
  15816. "type": "array",
  15817. "items": {
  15818. "type": "string"
  15819. }
  15820. },
  15821. "blacklist": {
  15822. "type": "array",
  15823. "items": {
  15824. "type": "string"
  15825. }
  15826. },
  15827. "options": {
  15828. "type": "object",
  15829. "properties": {
  15830. "apiKey": {
  15831. "type": "string"
  15832. },
  15833. "baseURL": {
  15834. "type": "string"
  15835. },
  15836. "enterpriseUrl": {
  15837. "type": "string"
  15838. },
  15839. "setCacheKey": {
  15840. "type": "boolean"
  15841. },
  15842. "timeout": {
  15843. "anyOf": [
  15844. {
  15845. "type": "integer",
  15846. "exclusiveMinimum": 0
  15847. },
  15848. {
  15849. "type": "boolean",
  15850. "enum": [false]
  15851. }
  15852. ],
  15853. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  15854. },
  15855. "headerTimeout": {
  15856. "anyOf": [
  15857. {
  15858. "type": "integer",
  15859. "exclusiveMinimum": 0
  15860. },
  15861. {
  15862. "type": "boolean",
  15863. "enum": [false]
  15864. }
  15865. ],
  15866. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  15867. },
  15868. "chunkTimeout": {
  15869. "type": "integer",
  15870. "exclusiveMinimum": 0
  15871. }
  15872. },
  15873. "additionalProperties": {}
  15874. },
  15875. "models": {
  15876. "type": "object",
  15877. "additionalProperties": {
  15878. "type": "object",
  15879. "properties": {
  15880. "id": {
  15881. "type": "string"
  15882. },
  15883. "name": {
  15884. "type": "string"
  15885. },
  15886. "family": {
  15887. "type": "string"
  15888. },
  15889. "release_date": {
  15890. "type": "string"
  15891. },
  15892. "attachment": {
  15893. "type": "boolean"
  15894. },
  15895. "reasoning": {
  15896. "type": "boolean"
  15897. },
  15898. "temperature": {
  15899. "type": "boolean"
  15900. },
  15901. "tool_call": {
  15902. "type": "boolean"
  15903. },
  15904. "interleaved": {
  15905. "anyOf": [
  15906. {
  15907. "type": "boolean",
  15908. "enum": [true]
  15909. },
  15910. {
  15911. "type": "object",
  15912. "properties": {
  15913. "field": {
  15914. "type": "string",
  15915. "enum": ["reasoning_content", "reasoning_details"]
  15916. }
  15917. },
  15918. "required": ["field"],
  15919. "additionalProperties": false
  15920. }
  15921. ]
  15922. },
  15923. "cost": {
  15924. "type": "object",
  15925. "properties": {
  15926. "input": {
  15927. "type": "number"
  15928. },
  15929. "output": {
  15930. "type": "number"
  15931. },
  15932. "cache_read": {
  15933. "type": "number"
  15934. },
  15935. "cache_write": {
  15936. "type": "number"
  15937. },
  15938. "context_over_200k": {
  15939. "type": "object",
  15940. "properties": {
  15941. "input": {
  15942. "type": "number"
  15943. },
  15944. "output": {
  15945. "type": "number"
  15946. },
  15947. "cache_read": {
  15948. "type": "number"
  15949. },
  15950. "cache_write": {
  15951. "type": "number"
  15952. }
  15953. },
  15954. "required": ["input", "output"],
  15955. "additionalProperties": false
  15956. }
  15957. },
  15958. "required": ["input", "output"],
  15959. "additionalProperties": false
  15960. },
  15961. "limit": {
  15962. "type": "object",
  15963. "properties": {
  15964. "context": {
  15965. "type": "number"
  15966. },
  15967. "input": {
  15968. "type": "number"
  15969. },
  15970. "output": {
  15971. "type": "number"
  15972. }
  15973. },
  15974. "required": ["context", "output"],
  15975. "additionalProperties": false
  15976. },
  15977. "modalities": {
  15978. "type": "object",
  15979. "properties": {
  15980. "input": {
  15981. "type": "array",
  15982. "items": {
  15983. "type": "string",
  15984. "enum": ["text", "audio", "image", "video", "pdf"]
  15985. }
  15986. },
  15987. "output": {
  15988. "type": "array",
  15989. "items": {
  15990. "type": "string",
  15991. "enum": ["text", "audio", "image", "video", "pdf"]
  15992. }
  15993. }
  15994. },
  15995. "additionalProperties": false
  15996. },
  15997. "experimental": {
  15998. "type": "boolean"
  15999. },
  16000. "status": {
  16001. "type": "string",
  16002. "enum": ["alpha", "beta", "deprecated", "active"]
  16003. },
  16004. "provider": {
  16005. "type": "object",
  16006. "properties": {
  16007. "npm": {
  16008. "type": "string"
  16009. },
  16010. "api": {
  16011. "type": "string"
  16012. }
  16013. },
  16014. "additionalProperties": false
  16015. },
  16016. "options": {
  16017. "type": "object"
  16018. },
  16019. "headers": {
  16020. "type": "object",
  16021. "additionalProperties": {
  16022. "type": "string"
  16023. }
  16024. },
  16025. "variants": {
  16026. "type": "object",
  16027. "additionalProperties": {
  16028. "type": "object",
  16029. "properties": {
  16030. "disabled": {
  16031. "type": "boolean"
  16032. }
  16033. },
  16034. "additionalProperties": {}
  16035. },
  16036. "description": "Variant-specific configuration"
  16037. }
  16038. },
  16039. "additionalProperties": false
  16040. }
  16041. }
  16042. },
  16043. "additionalProperties": false
  16044. },
  16045. "McpLocalConfig": {
  16046. "type": "object",
  16047. "properties": {
  16048. "type": {
  16049. "type": "string",
  16050. "enum": ["local"],
  16051. "description": "Type of MCP server connection"
  16052. },
  16053. "command": {
  16054. "type": "array",
  16055. "items": {
  16056. "type": "string"
  16057. },
  16058. "description": "Command and arguments to run the MCP server"
  16059. },
  16060. "environment": {
  16061. "type": "object",
  16062. "additionalProperties": {
  16063. "type": "string"
  16064. }
  16065. },
  16066. "enabled": {
  16067. "type": "boolean"
  16068. },
  16069. "timeout": {
  16070. "type": "integer",
  16071. "exclusiveMinimum": 0
  16072. }
  16073. },
  16074. "required": ["type", "command"],
  16075. "additionalProperties": false
  16076. },
  16077. "McpOAuthConfig": {
  16078. "type": "object",
  16079. "properties": {
  16080. "clientId": {
  16081. "type": "string"
  16082. },
  16083. "clientSecret": {
  16084. "type": "string"
  16085. },
  16086. "scope": {
  16087. "type": "string"
  16088. },
  16089. "callbackPort": {
  16090. "type": "integer",
  16091. "minimum": 1,
  16092. "maximum": 65535
  16093. },
  16094. "redirectUri": {
  16095. "type": "string"
  16096. }
  16097. },
  16098. "additionalProperties": false
  16099. },
  16100. "McpRemoteConfig": {
  16101. "type": "object",
  16102. "properties": {
  16103. "type": {
  16104. "type": "string",
  16105. "enum": ["remote"],
  16106. "description": "Type of MCP server connection"
  16107. },
  16108. "url": {
  16109. "type": "string",
  16110. "description": "URL of the remote MCP server"
  16111. },
  16112. "enabled": {
  16113. "type": "boolean"
  16114. },
  16115. "headers": {
  16116. "type": "object",
  16117. "additionalProperties": {
  16118. "type": "string"
  16119. }
  16120. },
  16121. "oauth": {
  16122. "anyOf": [
  16123. {
  16124. "$ref": "#/components/schemas/McpOAuthConfig"
  16125. },
  16126. {
  16127. "type": "boolean",
  16128. "enum": [false]
  16129. }
  16130. ],
  16131. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  16132. },
  16133. "timeout": {
  16134. "type": "integer",
  16135. "exclusiveMinimum": 0
  16136. }
  16137. },
  16138. "required": ["type", "url"],
  16139. "additionalProperties": false
  16140. },
  16141. "LayoutConfig": {
  16142. "type": "string",
  16143. "enum": ["auto", "stretch"],
  16144. "description": "@deprecated Always uses stretch layout."
  16145. },
  16146. "ImageAttachmentConfig": {
  16147. "type": "object",
  16148. "properties": {
  16149. "auto_resize": {
  16150. "type": "boolean"
  16151. },
  16152. "max_width": {
  16153. "type": "integer",
  16154. "exclusiveMinimum": 0
  16155. },
  16156. "max_height": {
  16157. "type": "integer",
  16158. "exclusiveMinimum": 0
  16159. },
  16160. "max_base64_bytes": {
  16161. "type": "integer",
  16162. "exclusiveMinimum": 0
  16163. }
  16164. },
  16165. "additionalProperties": false
  16166. },
  16167. "AttachmentConfig": {
  16168. "type": "object",
  16169. "properties": {
  16170. "image": {
  16171. "$ref": "#/components/schemas/ImageAttachmentConfig"
  16172. }
  16173. },
  16174. "additionalProperties": false
  16175. },
  16176. "Config": {
  16177. "type": "object",
  16178. "properties": {
  16179. "$schema": {
  16180. "type": "string"
  16181. },
  16182. "shell": {
  16183. "type": "string"
  16184. },
  16185. "logLevel": {
  16186. "$ref": "#/components/schemas/LogLevel"
  16187. },
  16188. "server": {
  16189. "$ref": "#/components/schemas/ServerConfig"
  16190. },
  16191. "command": {
  16192. "type": "object",
  16193. "additionalProperties": {
  16194. "type": "object",
  16195. "properties": {
  16196. "template": {
  16197. "type": "string"
  16198. },
  16199. "description": {
  16200. "type": "string"
  16201. },
  16202. "agent": {
  16203. "type": "string"
  16204. },
  16205. "model": {
  16206. "type": "string"
  16207. },
  16208. "subtask": {
  16209. "type": "boolean"
  16210. }
  16211. },
  16212. "required": ["template"],
  16213. "additionalProperties": false
  16214. }
  16215. },
  16216. "skills": {
  16217. "type": "object",
  16218. "properties": {
  16219. "paths": {
  16220. "type": "array",
  16221. "items": {
  16222. "type": "string"
  16223. }
  16224. },
  16225. "urls": {
  16226. "type": "array",
  16227. "items": {
  16228. "type": "string"
  16229. }
  16230. }
  16231. },
  16232. "additionalProperties": false
  16233. },
  16234. "reference": {
  16235. "$ref": "#/components/schemas/ReferenceConfig"
  16236. },
  16237. "watcher": {
  16238. "type": "object",
  16239. "properties": {
  16240. "ignore": {
  16241. "type": "array",
  16242. "items": {
  16243. "type": "string"
  16244. }
  16245. }
  16246. },
  16247. "additionalProperties": false
  16248. },
  16249. "snapshot": {
  16250. "type": "boolean"
  16251. },
  16252. "plugin": {
  16253. "type": "array",
  16254. "items": {
  16255. "anyOf": [
  16256. {
  16257. "type": "string"
  16258. },
  16259. {
  16260. "type": "array",
  16261. "prefixItems": [
  16262. {
  16263. "type": "string"
  16264. },
  16265. {
  16266. "type": "object"
  16267. }
  16268. ],
  16269. "maxItems": 2,
  16270. "minItems": 2
  16271. }
  16272. ]
  16273. }
  16274. },
  16275. "share": {
  16276. "type": "string",
  16277. "enum": ["manual", "auto", "disabled"]
  16278. },
  16279. "autoshare": {
  16280. "type": "boolean"
  16281. },
  16282. "autoupdate": {
  16283. "anyOf": [
  16284. {
  16285. "type": "boolean"
  16286. },
  16287. {
  16288. "type": "string",
  16289. "enum": ["notify"]
  16290. }
  16291. ],
  16292. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  16293. },
  16294. "disabled_providers": {
  16295. "type": "array",
  16296. "items": {
  16297. "type": "string"
  16298. }
  16299. },
  16300. "enabled_providers": {
  16301. "type": "array",
  16302. "items": {
  16303. "type": "string"
  16304. }
  16305. },
  16306. "model": {
  16307. "type": "string"
  16308. },
  16309. "small_model": {
  16310. "type": "string"
  16311. },
  16312. "default_agent": {
  16313. "type": "string"
  16314. },
  16315. "username": {
  16316. "type": "string"
  16317. },
  16318. "mode": {
  16319. "type": "object",
  16320. "properties": {
  16321. "build": {
  16322. "$ref": "#/components/schemas/AgentConfig"
  16323. },
  16324. "plan": {
  16325. "$ref": "#/components/schemas/AgentConfig"
  16326. }
  16327. },
  16328. "additionalProperties": {
  16329. "$ref": "#/components/schemas/AgentConfig"
  16330. }
  16331. },
  16332. "agent": {
  16333. "type": "object",
  16334. "properties": {
  16335. "plan": {
  16336. "$ref": "#/components/schemas/AgentConfig"
  16337. },
  16338. "build": {
  16339. "$ref": "#/components/schemas/AgentConfig"
  16340. },
  16341. "general": {
  16342. "$ref": "#/components/schemas/AgentConfig"
  16343. },
  16344. "explore": {
  16345. "$ref": "#/components/schemas/AgentConfig"
  16346. },
  16347. "scout": {
  16348. "$ref": "#/components/schemas/AgentConfig"
  16349. },
  16350. "title": {
  16351. "$ref": "#/components/schemas/AgentConfig"
  16352. },
  16353. "summary": {
  16354. "$ref": "#/components/schemas/AgentConfig"
  16355. },
  16356. "compaction": {
  16357. "$ref": "#/components/schemas/AgentConfig"
  16358. }
  16359. },
  16360. "additionalProperties": {
  16361. "$ref": "#/components/schemas/AgentConfig"
  16362. }
  16363. },
  16364. "provider": {
  16365. "type": "object",
  16366. "additionalProperties": {
  16367. "$ref": "#/components/schemas/ProviderConfig"
  16368. }
  16369. },
  16370. "mcp": {
  16371. "type": "object",
  16372. "additionalProperties": {
  16373. "anyOf": [
  16374. {
  16375. "$ref": "#/components/schemas/McpLocalConfig"
  16376. },
  16377. {
  16378. "$ref": "#/components/schemas/McpRemoteConfig"
  16379. },
  16380. {
  16381. "type": "object",
  16382. "properties": {
  16383. "enabled": {
  16384. "type": "boolean"
  16385. }
  16386. },
  16387. "required": ["enabled"],
  16388. "additionalProperties": false
  16389. }
  16390. ]
  16391. }
  16392. },
  16393. "formatter": {
  16394. "anyOf": [
  16395. {
  16396. "type": "boolean"
  16397. },
  16398. {
  16399. "type": "object",
  16400. "additionalProperties": {
  16401. "type": "object",
  16402. "properties": {
  16403. "disabled": {
  16404. "type": "boolean"
  16405. },
  16406. "command": {
  16407. "type": "array",
  16408. "items": {
  16409. "type": "string"
  16410. }
  16411. },
  16412. "environment": {
  16413. "type": "object",
  16414. "additionalProperties": {
  16415. "type": "string"
  16416. }
  16417. },
  16418. "extensions": {
  16419. "type": "array",
  16420. "items": {
  16421. "type": "string"
  16422. }
  16423. }
  16424. },
  16425. "additionalProperties": false
  16426. }
  16427. }
  16428. ],
  16429. "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."
  16430. },
  16431. "lsp": {
  16432. "anyOf": [
  16433. {
  16434. "type": "boolean"
  16435. },
  16436. {
  16437. "type": "object",
  16438. "additionalProperties": {
  16439. "anyOf": [
  16440. {
  16441. "type": "object",
  16442. "properties": {
  16443. "disabled": {
  16444. "type": "boolean",
  16445. "enum": [true]
  16446. }
  16447. },
  16448. "required": ["disabled"],
  16449. "additionalProperties": false
  16450. },
  16451. {
  16452. "type": "object",
  16453. "properties": {
  16454. "command": {
  16455. "type": "array",
  16456. "items": {
  16457. "type": "string"
  16458. }
  16459. },
  16460. "extensions": {
  16461. "type": "array",
  16462. "items": {
  16463. "type": "string"
  16464. }
  16465. },
  16466. "disabled": {
  16467. "type": "boolean"
  16468. },
  16469. "env": {
  16470. "type": "object",
  16471. "additionalProperties": {
  16472. "type": "string"
  16473. }
  16474. },
  16475. "initialization": {
  16476. "type": "object"
  16477. }
  16478. },
  16479. "required": ["command"],
  16480. "additionalProperties": false
  16481. }
  16482. ]
  16483. }
  16484. }
  16485. ],
  16486. "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."
  16487. },
  16488. "instructions": {
  16489. "type": "array",
  16490. "items": {
  16491. "type": "string"
  16492. }
  16493. },
  16494. "layout": {
  16495. "$ref": "#/components/schemas/LayoutConfig"
  16496. },
  16497. "permission": {
  16498. "$ref": "#/components/schemas/PermissionConfig"
  16499. },
  16500. "tools": {
  16501. "type": "object",
  16502. "additionalProperties": {
  16503. "type": "boolean"
  16504. }
  16505. },
  16506. "attachment": {
  16507. "$ref": "#/components/schemas/AttachmentConfig"
  16508. },
  16509. "enterprise": {
  16510. "type": "object",
  16511. "properties": {
  16512. "url": {
  16513. "type": "string"
  16514. }
  16515. },
  16516. "additionalProperties": false
  16517. },
  16518. "tool_output": {
  16519. "type": "object",
  16520. "properties": {
  16521. "max_lines": {
  16522. "type": "integer",
  16523. "exclusiveMinimum": 0
  16524. },
  16525. "max_bytes": {
  16526. "type": "integer",
  16527. "exclusiveMinimum": 0
  16528. }
  16529. },
  16530. "additionalProperties": false
  16531. },
  16532. "compaction": {
  16533. "type": "object",
  16534. "properties": {
  16535. "auto": {
  16536. "type": "boolean"
  16537. },
  16538. "prune": {
  16539. "type": "boolean"
  16540. },
  16541. "tail_turns": {
  16542. "type": "integer",
  16543. "minimum": 0
  16544. },
  16545. "preserve_recent_tokens": {
  16546. "type": "integer",
  16547. "minimum": 0
  16548. },
  16549. "reserved": {
  16550. "type": "integer",
  16551. "minimum": 0
  16552. }
  16553. },
  16554. "additionalProperties": false
  16555. },
  16556. "experimental": {
  16557. "type": "object",
  16558. "properties": {
  16559. "disable_paste_summary": {
  16560. "type": "boolean"
  16561. },
  16562. "batch_tool": {
  16563. "type": "boolean"
  16564. },
  16565. "openTelemetry": {
  16566. "type": "boolean"
  16567. },
  16568. "primary_tools": {
  16569. "type": "array",
  16570. "items": {
  16571. "type": "string"
  16572. }
  16573. },
  16574. "continue_loop_on_deny": {
  16575. "type": "boolean"
  16576. },
  16577. "mcp_timeout": {
  16578. "type": "integer",
  16579. "exclusiveMinimum": 0
  16580. },
  16581. "policies": {
  16582. "type": "array",
  16583. "items": {
  16584. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  16585. }
  16586. }
  16587. },
  16588. "additionalProperties": false
  16589. }
  16590. },
  16591. "additionalProperties": false
  16592. },
  16593. "Model": {
  16594. "type": "object",
  16595. "properties": {
  16596. "id": {
  16597. "type": "string"
  16598. },
  16599. "providerID": {
  16600. "type": "string"
  16601. },
  16602. "api": {
  16603. "type": "object",
  16604. "properties": {
  16605. "id": {
  16606. "type": "string"
  16607. },
  16608. "url": {
  16609. "type": "string"
  16610. },
  16611. "npm": {
  16612. "type": "string"
  16613. }
  16614. },
  16615. "required": ["id", "url", "npm"],
  16616. "additionalProperties": false
  16617. },
  16618. "name": {
  16619. "type": "string"
  16620. },
  16621. "family": {
  16622. "type": "string"
  16623. },
  16624. "capabilities": {
  16625. "type": "object",
  16626. "properties": {
  16627. "temperature": {
  16628. "type": "boolean"
  16629. },
  16630. "reasoning": {
  16631. "type": "boolean"
  16632. },
  16633. "attachment": {
  16634. "type": "boolean"
  16635. },
  16636. "toolcall": {
  16637. "type": "boolean"
  16638. },
  16639. "input": {
  16640. "type": "object",
  16641. "properties": {
  16642. "text": {
  16643. "type": "boolean"
  16644. },
  16645. "audio": {
  16646. "type": "boolean"
  16647. },
  16648. "image": {
  16649. "type": "boolean"
  16650. },
  16651. "video": {
  16652. "type": "boolean"
  16653. },
  16654. "pdf": {
  16655. "type": "boolean"
  16656. }
  16657. },
  16658. "required": ["text", "audio", "image", "video", "pdf"],
  16659. "additionalProperties": false
  16660. },
  16661. "output": {
  16662. "type": "object",
  16663. "properties": {
  16664. "text": {
  16665. "type": "boolean"
  16666. },
  16667. "audio": {
  16668. "type": "boolean"
  16669. },
  16670. "image": {
  16671. "type": "boolean"
  16672. },
  16673. "video": {
  16674. "type": "boolean"
  16675. },
  16676. "pdf": {
  16677. "type": "boolean"
  16678. }
  16679. },
  16680. "required": ["text", "audio", "image", "video", "pdf"],
  16681. "additionalProperties": false
  16682. },
  16683. "interleaved": {
  16684. "anyOf": [
  16685. {
  16686. "type": "boolean"
  16687. },
  16688. {
  16689. "type": "object",
  16690. "properties": {
  16691. "field": {
  16692. "type": "string",
  16693. "enum": ["reasoning_content", "reasoning_details"]
  16694. }
  16695. },
  16696. "required": ["field"],
  16697. "additionalProperties": false
  16698. }
  16699. ]
  16700. }
  16701. },
  16702. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  16703. "additionalProperties": false
  16704. },
  16705. "cost": {
  16706. "type": "object",
  16707. "properties": {
  16708. "input": {
  16709. "type": "number"
  16710. },
  16711. "output": {
  16712. "type": "number"
  16713. },
  16714. "cache": {
  16715. "type": "object",
  16716. "properties": {
  16717. "read": {
  16718. "type": "number"
  16719. },
  16720. "write": {
  16721. "type": "number"
  16722. }
  16723. },
  16724. "required": ["read", "write"],
  16725. "additionalProperties": false
  16726. },
  16727. "tiers": {
  16728. "type": "array",
  16729. "items": {
  16730. "type": "object",
  16731. "properties": {
  16732. "input": {
  16733. "type": "number"
  16734. },
  16735. "output": {
  16736. "type": "number"
  16737. },
  16738. "cache": {
  16739. "type": "object",
  16740. "properties": {
  16741. "read": {
  16742. "type": "number"
  16743. },
  16744. "write": {
  16745. "type": "number"
  16746. }
  16747. },
  16748. "required": ["read", "write"],
  16749. "additionalProperties": false
  16750. },
  16751. "tier": {
  16752. "type": "object",
  16753. "properties": {
  16754. "type": {
  16755. "type": "string",
  16756. "enum": ["context"]
  16757. },
  16758. "size": {
  16759. "type": "number"
  16760. }
  16761. },
  16762. "required": ["type", "size"],
  16763. "additionalProperties": false
  16764. }
  16765. },
  16766. "required": ["input", "output", "cache", "tier"],
  16767. "additionalProperties": false
  16768. }
  16769. },
  16770. "experimentalOver200K": {
  16771. "type": "object",
  16772. "properties": {
  16773. "input": {
  16774. "type": "number"
  16775. },
  16776. "output": {
  16777. "type": "number"
  16778. },
  16779. "cache": {
  16780. "type": "object",
  16781. "properties": {
  16782. "read": {
  16783. "type": "number"
  16784. },
  16785. "write": {
  16786. "type": "number"
  16787. }
  16788. },
  16789. "required": ["read", "write"],
  16790. "additionalProperties": false
  16791. }
  16792. },
  16793. "required": ["input", "output", "cache"],
  16794. "additionalProperties": false
  16795. }
  16796. },
  16797. "required": ["input", "output", "cache"],
  16798. "additionalProperties": false
  16799. },
  16800. "limit": {
  16801. "type": "object",
  16802. "properties": {
  16803. "context": {
  16804. "type": "number"
  16805. },
  16806. "input": {
  16807. "type": "number"
  16808. },
  16809. "output": {
  16810. "type": "number"
  16811. }
  16812. },
  16813. "required": ["context", "output"],
  16814. "additionalProperties": false
  16815. },
  16816. "status": {
  16817. "type": "string",
  16818. "enum": ["alpha", "beta", "deprecated", "active"]
  16819. },
  16820. "options": {
  16821. "type": "object"
  16822. },
  16823. "headers": {
  16824. "type": "object",
  16825. "additionalProperties": {
  16826. "type": "string"
  16827. }
  16828. },
  16829. "release_date": {
  16830. "type": "string"
  16831. },
  16832. "variants": {
  16833. "type": "object",
  16834. "additionalProperties": {
  16835. "type": "object"
  16836. }
  16837. }
  16838. },
  16839. "required": [
  16840. "id",
  16841. "providerID",
  16842. "api",
  16843. "name",
  16844. "capabilities",
  16845. "cost",
  16846. "limit",
  16847. "status",
  16848. "options",
  16849. "headers",
  16850. "release_date"
  16851. ],
  16852. "additionalProperties": false
  16853. },
  16854. "Provider": {
  16855. "type": "object",
  16856. "properties": {
  16857. "id": {
  16858. "type": "string"
  16859. },
  16860. "name": {
  16861. "type": "string"
  16862. },
  16863. "source": {
  16864. "type": "string",
  16865. "enum": ["env", "config", "custom", "api"]
  16866. },
  16867. "env": {
  16868. "type": "array",
  16869. "items": {
  16870. "type": "string"
  16871. }
  16872. },
  16873. "key": {
  16874. "type": "string"
  16875. },
  16876. "options": {
  16877. "type": "object"
  16878. },
  16879. "models": {
  16880. "type": "object",
  16881. "additionalProperties": {
  16882. "$ref": "#/components/schemas/Model"
  16883. }
  16884. }
  16885. },
  16886. "required": ["id", "name", "source", "env", "options", "models"],
  16887. "additionalProperties": false
  16888. },
  16889. "ConsoleState": {
  16890. "type": "object",
  16891. "properties": {
  16892. "consoleManagedProviders": {
  16893. "type": "array",
  16894. "items": {
  16895. "type": "string"
  16896. }
  16897. },
  16898. "activeOrgName": {
  16899. "type": "string"
  16900. },
  16901. "switchableOrgCount": {
  16902. "type": "integer",
  16903. "minimum": 0
  16904. }
  16905. },
  16906. "required": ["consoleManagedProviders", "switchableOrgCount"],
  16907. "additionalProperties": false
  16908. },
  16909. "effect_HttpApiError_InternalServerError": {
  16910. "type": "object",
  16911. "properties": {
  16912. "_tag": {
  16913. "type": "string",
  16914. "enum": ["InternalServerError"]
  16915. }
  16916. },
  16917. "required": ["_tag"],
  16918. "additionalProperties": false
  16919. },
  16920. "ToolListItem": {
  16921. "type": "object",
  16922. "properties": {
  16923. "id": {
  16924. "type": "string"
  16925. },
  16926. "description": {
  16927. "type": "string"
  16928. },
  16929. "parameters": {}
  16930. },
  16931. "required": ["id", "description", "parameters"],
  16932. "additionalProperties": false
  16933. },
  16934. "ToolList": {
  16935. "type": "array",
  16936. "items": {
  16937. "$ref": "#/components/schemas/ToolListItem"
  16938. }
  16939. },
  16940. "ToolIDs": {
  16941. "type": "array",
  16942. "items": {
  16943. "type": "string"
  16944. }
  16945. },
  16946. "WorktreeError": {
  16947. "type": "object",
  16948. "properties": {
  16949. "name": {
  16950. "type": "string",
  16951. "enum": [
  16952. "WorktreeNotGitError",
  16953. "WorktreeNameGenerationFailedError",
  16954. "WorktreeCreateFailedError",
  16955. "WorktreeStartCommandFailedError",
  16956. "WorktreeRemoveFailedError",
  16957. "WorktreeResetFailedError",
  16958. "WorktreeListFailedError"
  16959. ]
  16960. },
  16961. "data": {
  16962. "type": "object",
  16963. "properties": {
  16964. "message": {
  16965. "type": "string"
  16966. }
  16967. },
  16968. "required": ["message"],
  16969. "additionalProperties": false
  16970. }
  16971. },
  16972. "required": ["name", "data"],
  16973. "additionalProperties": false
  16974. },
  16975. "WorktreeCreateInput": {
  16976. "type": "object",
  16977. "properties": {
  16978. "name": {
  16979. "type": "string"
  16980. },
  16981. "startCommand": {
  16982. "type": "string",
  16983. "description": "Additional startup script to run after the project's start command"
  16984. }
  16985. },
  16986. "additionalProperties": false
  16987. },
  16988. "Worktree": {
  16989. "type": "object",
  16990. "properties": {
  16991. "name": {
  16992. "type": "string"
  16993. },
  16994. "branch": {
  16995. "type": "string"
  16996. },
  16997. "directory": {
  16998. "type": "string"
  16999. }
  17000. },
  17001. "required": ["name", "directory"],
  17002. "additionalProperties": false
  17003. },
  17004. "WorktreeRemoveInput": {
  17005. "type": "object",
  17006. "properties": {
  17007. "directory": {
  17008. "type": "string"
  17009. }
  17010. },
  17011. "required": ["directory"],
  17012. "additionalProperties": false
  17013. },
  17014. "WorktreeResetInput": {
  17015. "type": "object",
  17016. "properties": {
  17017. "directory": {
  17018. "type": "string"
  17019. }
  17020. },
  17021. "required": ["directory"],
  17022. "additionalProperties": false
  17023. },
  17024. "ProjectSummary": {
  17025. "type": "object",
  17026. "properties": {
  17027. "id": {
  17028. "type": "string"
  17029. },
  17030. "name": {
  17031. "type": "string"
  17032. },
  17033. "worktree": {
  17034. "type": "string"
  17035. }
  17036. },
  17037. "required": ["id", "worktree"],
  17038. "additionalProperties": false
  17039. },
  17040. "GlobalSession": {
  17041. "type": "object",
  17042. "properties": {
  17043. "id": {
  17044. "type": "string",
  17045. "pattern": "^ses"
  17046. },
  17047. "slug": {
  17048. "type": "string"
  17049. },
  17050. "projectID": {
  17051. "type": "string"
  17052. },
  17053. "workspaceID": {
  17054. "type": "string",
  17055. "pattern": "^wrk"
  17056. },
  17057. "directory": {
  17058. "type": "string"
  17059. },
  17060. "path": {
  17061. "type": "string"
  17062. },
  17063. "parentID": {
  17064. "type": "string",
  17065. "pattern": "^ses"
  17066. },
  17067. "summary": {
  17068. "type": "object",
  17069. "properties": {
  17070. "additions": {
  17071. "type": "number"
  17072. },
  17073. "deletions": {
  17074. "type": "number"
  17075. },
  17076. "files": {
  17077. "type": "number"
  17078. },
  17079. "diffs": {
  17080. "type": "array",
  17081. "items": {
  17082. "$ref": "#/components/schemas/SnapshotFileDiff"
  17083. }
  17084. }
  17085. },
  17086. "required": ["additions", "deletions", "files"],
  17087. "additionalProperties": false
  17088. },
  17089. "cost": {
  17090. "type": "number"
  17091. },
  17092. "tokens": {
  17093. "type": "object",
  17094. "properties": {
  17095. "input": {
  17096. "type": "number"
  17097. },
  17098. "output": {
  17099. "type": "number"
  17100. },
  17101. "reasoning": {
  17102. "type": "number"
  17103. },
  17104. "cache": {
  17105. "type": "object",
  17106. "properties": {
  17107. "read": {
  17108. "type": "number"
  17109. },
  17110. "write": {
  17111. "type": "number"
  17112. }
  17113. },
  17114. "required": ["read", "write"],
  17115. "additionalProperties": false
  17116. }
  17117. },
  17118. "required": ["input", "output", "reasoning", "cache"],
  17119. "additionalProperties": false
  17120. },
  17121. "share": {
  17122. "type": "object",
  17123. "properties": {
  17124. "url": {
  17125. "type": "string"
  17126. }
  17127. },
  17128. "required": ["url"],
  17129. "additionalProperties": false
  17130. },
  17131. "title": {
  17132. "type": "string"
  17133. },
  17134. "agent": {
  17135. "type": "string"
  17136. },
  17137. "model": {
  17138. "type": "object",
  17139. "properties": {
  17140. "id": {
  17141. "type": "string"
  17142. },
  17143. "providerID": {
  17144. "type": "string"
  17145. },
  17146. "variant": {
  17147. "type": "string"
  17148. }
  17149. },
  17150. "required": ["id", "providerID"],
  17151. "additionalProperties": false
  17152. },
  17153. "version": {
  17154. "type": "string"
  17155. },
  17156. "metadata": {
  17157. "type": "object"
  17158. },
  17159. "time": {
  17160. "type": "object",
  17161. "properties": {
  17162. "created": {
  17163. "type": "integer",
  17164. "minimum": 0
  17165. },
  17166. "updated": {
  17167. "type": "integer",
  17168. "minimum": 0
  17169. },
  17170. "compacting": {
  17171. "type": "integer",
  17172. "minimum": 0
  17173. },
  17174. "archived": {
  17175. "type": "number"
  17176. }
  17177. },
  17178. "required": ["created", "updated"],
  17179. "additionalProperties": false
  17180. },
  17181. "permission": {
  17182. "$ref": "#/components/schemas/PermissionRuleset"
  17183. },
  17184. "revert": {
  17185. "type": "object",
  17186. "properties": {
  17187. "messageID": {
  17188. "type": "string",
  17189. "pattern": "^msg"
  17190. },
  17191. "partID": {
  17192. "type": "string",
  17193. "pattern": "^prt"
  17194. },
  17195. "snapshot": {
  17196. "type": "string"
  17197. },
  17198. "diff": {
  17199. "type": "string"
  17200. }
  17201. },
  17202. "required": ["messageID"],
  17203. "additionalProperties": false
  17204. },
  17205. "project": {
  17206. "anyOf": [
  17207. {
  17208. "$ref": "#/components/schemas/ProjectSummary"
  17209. },
  17210. {
  17211. "type": "null"
  17212. }
  17213. ]
  17214. }
  17215. },
  17216. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  17217. "additionalProperties": false
  17218. },
  17219. "McpResource": {
  17220. "type": "object",
  17221. "properties": {
  17222. "name": {
  17223. "type": "string"
  17224. },
  17225. "uri": {
  17226. "type": "string"
  17227. },
  17228. "description": {
  17229. "type": "string"
  17230. },
  17231. "mimeType": {
  17232. "type": "string"
  17233. },
  17234. "client": {
  17235. "type": "string"
  17236. }
  17237. },
  17238. "required": ["name", "uri", "client"],
  17239. "additionalProperties": false
  17240. },
  17241. "Symbol": {
  17242. "type": "object",
  17243. "properties": {
  17244. "name": {
  17245. "type": "string"
  17246. },
  17247. "kind": {
  17248. "type": "integer",
  17249. "minimum": 0
  17250. },
  17251. "location": {
  17252. "type": "object",
  17253. "properties": {
  17254. "uri": {
  17255. "type": "string"
  17256. },
  17257. "range": {
  17258. "$ref": "#/components/schemas/Range"
  17259. }
  17260. },
  17261. "required": ["uri", "range"],
  17262. "additionalProperties": false
  17263. }
  17264. },
  17265. "required": ["name", "kind", "location"],
  17266. "additionalProperties": false
  17267. },
  17268. "FileNode": {
  17269. "type": "object",
  17270. "properties": {
  17271. "name": {
  17272. "type": "string"
  17273. },
  17274. "path": {
  17275. "type": "string"
  17276. },
  17277. "absolute": {
  17278. "type": "string"
  17279. },
  17280. "type": {
  17281. "type": "string",
  17282. "enum": ["file", "directory"]
  17283. },
  17284. "ignored": {
  17285. "type": "boolean"
  17286. }
  17287. },
  17288. "required": ["name", "path", "absolute", "type", "ignored"],
  17289. "additionalProperties": false
  17290. },
  17291. "FileContent": {
  17292. "type": "object",
  17293. "properties": {
  17294. "type": {
  17295. "type": "string",
  17296. "enum": ["text", "binary"]
  17297. },
  17298. "content": {
  17299. "type": "string"
  17300. },
  17301. "diff": {
  17302. "type": "string"
  17303. },
  17304. "patch": {
  17305. "type": "object",
  17306. "properties": {
  17307. "oldFileName": {
  17308. "type": "string"
  17309. },
  17310. "newFileName": {
  17311. "type": "string"
  17312. },
  17313. "oldHeader": {
  17314. "type": "string"
  17315. },
  17316. "newHeader": {
  17317. "type": "string"
  17318. },
  17319. "hunks": {
  17320. "type": "array",
  17321. "items": {
  17322. "type": "object",
  17323. "properties": {
  17324. "oldStart": {
  17325. "type": "integer",
  17326. "minimum": 0
  17327. },
  17328. "oldLines": {
  17329. "type": "integer",
  17330. "minimum": 0
  17331. },
  17332. "newStart": {
  17333. "type": "integer",
  17334. "minimum": 0
  17335. },
  17336. "newLines": {
  17337. "type": "integer",
  17338. "minimum": 0
  17339. },
  17340. "lines": {
  17341. "type": "array",
  17342. "items": {
  17343. "type": "string"
  17344. }
  17345. }
  17346. },
  17347. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  17348. "additionalProperties": false
  17349. }
  17350. },
  17351. "index": {
  17352. "type": "string"
  17353. }
  17354. },
  17355. "required": ["oldFileName", "newFileName", "hunks"],
  17356. "additionalProperties": false
  17357. },
  17358. "encoding": {
  17359. "type": "string",
  17360. "enum": ["base64"]
  17361. },
  17362. "mimeType": {
  17363. "type": "string"
  17364. }
  17365. },
  17366. "required": ["type", "content"],
  17367. "additionalProperties": false
  17368. },
  17369. "File": {
  17370. "type": "object",
  17371. "properties": {
  17372. "path": {
  17373. "type": "string"
  17374. },
  17375. "added": {
  17376. "type": "integer",
  17377. "minimum": 0
  17378. },
  17379. "removed": {
  17380. "type": "integer",
  17381. "minimum": 0
  17382. },
  17383. "status": {
  17384. "type": "string",
  17385. "enum": ["added", "deleted", "modified"]
  17386. }
  17387. },
  17388. "required": ["path", "added", "removed", "status"],
  17389. "additionalProperties": false
  17390. },
  17391. "Path": {
  17392. "type": "object",
  17393. "properties": {
  17394. "home": {
  17395. "type": "string"
  17396. },
  17397. "state": {
  17398. "type": "string"
  17399. },
  17400. "config": {
  17401. "type": "string"
  17402. },
  17403. "worktree": {
  17404. "type": "string"
  17405. },
  17406. "directory": {
  17407. "type": "string"
  17408. }
  17409. },
  17410. "required": ["home", "state", "config", "worktree", "directory"],
  17411. "additionalProperties": false
  17412. },
  17413. "VcsInfo": {
  17414. "type": "object",
  17415. "properties": {
  17416. "branch": {
  17417. "type": "string"
  17418. },
  17419. "default_branch": {
  17420. "type": "string"
  17421. }
  17422. },
  17423. "additionalProperties": false
  17424. },
  17425. "VcsFileStatus": {
  17426. "type": "object",
  17427. "properties": {
  17428. "file": {
  17429. "type": "string"
  17430. },
  17431. "additions": {
  17432. "type": "number"
  17433. },
  17434. "deletions": {
  17435. "type": "number"
  17436. },
  17437. "status": {
  17438. "type": "string",
  17439. "enum": ["added", "deleted", "modified"]
  17440. }
  17441. },
  17442. "required": ["file", "additions", "deletions", "status"],
  17443. "additionalProperties": false
  17444. },
  17445. "VcsFileDiff": {
  17446. "type": "object",
  17447. "properties": {
  17448. "file": {
  17449. "type": "string"
  17450. },
  17451. "patch": {
  17452. "type": "string"
  17453. },
  17454. "additions": {
  17455. "type": "number"
  17456. },
  17457. "deletions": {
  17458. "type": "number"
  17459. },
  17460. "status": {
  17461. "type": "string",
  17462. "enum": ["added", "deleted", "modified"]
  17463. }
  17464. },
  17465. "required": ["file", "additions", "deletions"],
  17466. "additionalProperties": false
  17467. },
  17468. "VcsApplyError": {
  17469. "type": "object",
  17470. "properties": {
  17471. "name": {
  17472. "type": "string",
  17473. "enum": ["VcsApplyError"]
  17474. },
  17475. "data": {
  17476. "type": "object",
  17477. "properties": {
  17478. "message": {
  17479. "type": "string"
  17480. },
  17481. "reason": {
  17482. "type": "string",
  17483. "enum": ["non-git", "not-clean"]
  17484. }
  17485. },
  17486. "required": ["message", "reason"],
  17487. "additionalProperties": false
  17488. }
  17489. },
  17490. "required": ["name", "data"],
  17491. "additionalProperties": false
  17492. },
  17493. "Command": {
  17494. "type": "object",
  17495. "properties": {
  17496. "name": {
  17497. "type": "string"
  17498. },
  17499. "description": {
  17500. "type": "string"
  17501. },
  17502. "agent": {
  17503. "type": "string"
  17504. },
  17505. "model": {
  17506. "type": "string"
  17507. },
  17508. "source": {
  17509. "type": "string",
  17510. "enum": ["command", "mcp", "skill"]
  17511. },
  17512. "template": {
  17513. "type": "string"
  17514. },
  17515. "subtask": {
  17516. "type": "boolean"
  17517. },
  17518. "hints": {
  17519. "type": "array",
  17520. "items": {
  17521. "type": "string"
  17522. }
  17523. }
  17524. },
  17525. "required": ["name", "template", "hints"],
  17526. "additionalProperties": false
  17527. },
  17528. "Agent": {
  17529. "type": "object",
  17530. "properties": {
  17531. "name": {
  17532. "type": "string"
  17533. },
  17534. "description": {
  17535. "type": "string"
  17536. },
  17537. "mode": {
  17538. "type": "string",
  17539. "enum": ["subagent", "primary", "all"]
  17540. },
  17541. "native": {
  17542. "type": "boolean"
  17543. },
  17544. "hidden": {
  17545. "type": "boolean"
  17546. },
  17547. "topP": {
  17548. "type": "number"
  17549. },
  17550. "temperature": {
  17551. "type": "number"
  17552. },
  17553. "color": {
  17554. "type": "string"
  17555. },
  17556. "permission": {
  17557. "$ref": "#/components/schemas/PermissionRuleset"
  17558. },
  17559. "model": {
  17560. "type": "object",
  17561. "properties": {
  17562. "modelID": {
  17563. "type": "string"
  17564. },
  17565. "providerID": {
  17566. "type": "string"
  17567. }
  17568. },
  17569. "required": ["modelID", "providerID"],
  17570. "additionalProperties": false
  17571. },
  17572. "variant": {
  17573. "type": "string"
  17574. },
  17575. "prompt": {
  17576. "type": "string"
  17577. },
  17578. "options": {
  17579. "type": "object"
  17580. },
  17581. "steps": {
  17582. "type": "number"
  17583. }
  17584. },
  17585. "required": ["name", "mode", "permission", "options"],
  17586. "additionalProperties": false
  17587. },
  17588. "LSPStatus": {
  17589. "type": "object",
  17590. "properties": {
  17591. "id": {
  17592. "type": "string"
  17593. },
  17594. "name": {
  17595. "type": "string"
  17596. },
  17597. "root": {
  17598. "type": "string"
  17599. },
  17600. "status": {
  17601. "type": "string",
  17602. "enum": ["connected", "error"]
  17603. }
  17604. },
  17605. "required": ["id", "name", "root", "status"],
  17606. "additionalProperties": false
  17607. },
  17608. "FormatterStatus": {
  17609. "type": "object",
  17610. "properties": {
  17611. "name": {
  17612. "type": "string"
  17613. },
  17614. "extensions": {
  17615. "type": "array",
  17616. "items": {
  17617. "type": "string"
  17618. }
  17619. },
  17620. "enabled": {
  17621. "type": "boolean"
  17622. }
  17623. },
  17624. "required": ["name", "extensions", "enabled"],
  17625. "additionalProperties": false
  17626. },
  17627. "MCPStatusConnected": {
  17628. "type": "object",
  17629. "properties": {
  17630. "status": {
  17631. "type": "string",
  17632. "enum": ["connected"]
  17633. }
  17634. },
  17635. "required": ["status"],
  17636. "additionalProperties": false
  17637. },
  17638. "MCPStatusDisabled": {
  17639. "type": "object",
  17640. "properties": {
  17641. "status": {
  17642. "type": "string",
  17643. "enum": ["disabled"]
  17644. }
  17645. },
  17646. "required": ["status"],
  17647. "additionalProperties": false
  17648. },
  17649. "MCPStatusFailed": {
  17650. "type": "object",
  17651. "properties": {
  17652. "status": {
  17653. "type": "string",
  17654. "enum": ["failed"]
  17655. },
  17656. "error": {
  17657. "type": "string"
  17658. }
  17659. },
  17660. "required": ["status", "error"],
  17661. "additionalProperties": false
  17662. },
  17663. "MCPStatusNeedsAuth": {
  17664. "type": "object",
  17665. "properties": {
  17666. "status": {
  17667. "type": "string",
  17668. "enum": ["needs_auth"]
  17669. }
  17670. },
  17671. "required": ["status"],
  17672. "additionalProperties": false
  17673. },
  17674. "MCPStatusNeedsClientRegistration": {
  17675. "type": "object",
  17676. "properties": {
  17677. "status": {
  17678. "type": "string",
  17679. "enum": ["needs_client_registration"]
  17680. },
  17681. "error": {
  17682. "type": "string"
  17683. }
  17684. },
  17685. "required": ["status", "error"],
  17686. "additionalProperties": false
  17687. },
  17688. "MCPStatus": {
  17689. "anyOf": [
  17690. {
  17691. "$ref": "#/components/schemas/MCPStatusConnected"
  17692. },
  17693. {
  17694. "$ref": "#/components/schemas/MCPStatusDisabled"
  17695. },
  17696. {
  17697. "$ref": "#/components/schemas/MCPStatusFailed"
  17698. },
  17699. {
  17700. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  17701. },
  17702. {
  17703. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  17704. }
  17705. ]
  17706. },
  17707. "McpUnsupportedOAuthError": {
  17708. "type": "object",
  17709. "properties": {
  17710. "error": {
  17711. "type": "string"
  17712. }
  17713. },
  17714. "required": ["error"],
  17715. "additionalProperties": false
  17716. },
  17717. "McpServerNotFoundError": {
  17718. "type": "object",
  17719. "properties": {
  17720. "_tag": {
  17721. "type": "string",
  17722. "enum": ["McpServerNotFoundError"]
  17723. },
  17724. "name": {
  17725. "type": "string"
  17726. },
  17727. "message": {
  17728. "type": "string"
  17729. }
  17730. },
  17731. "required": ["_tag", "name", "message"],
  17732. "additionalProperties": false
  17733. },
  17734. "Project": {
  17735. "type": "object",
  17736. "properties": {
  17737. "id": {
  17738. "type": "string"
  17739. },
  17740. "worktree": {
  17741. "type": "string"
  17742. },
  17743. "vcs": {
  17744. "type": "string",
  17745. "enum": ["git"]
  17746. },
  17747. "name": {
  17748. "type": "string"
  17749. },
  17750. "icon": {
  17751. "type": "object",
  17752. "properties": {
  17753. "url": {
  17754. "type": "string"
  17755. },
  17756. "override": {
  17757. "type": "string"
  17758. },
  17759. "color": {
  17760. "type": "string"
  17761. }
  17762. },
  17763. "additionalProperties": false
  17764. },
  17765. "commands": {
  17766. "type": "object",
  17767. "properties": {
  17768. "start": {
  17769. "type": "string",
  17770. "description": "Startup script to run when creating a new workspace (worktree)"
  17771. }
  17772. },
  17773. "additionalProperties": false
  17774. },
  17775. "time": {
  17776. "type": "object",
  17777. "properties": {
  17778. "created": {
  17779. "type": "integer",
  17780. "minimum": 0
  17781. },
  17782. "updated": {
  17783. "type": "integer",
  17784. "minimum": 0
  17785. },
  17786. "initialized": {
  17787. "type": "integer",
  17788. "minimum": 0
  17789. }
  17790. },
  17791. "required": ["created", "updated"],
  17792. "additionalProperties": false
  17793. },
  17794. "sandboxes": {
  17795. "type": "array",
  17796. "items": {
  17797. "type": "string"
  17798. }
  17799. }
  17800. },
  17801. "required": ["id", "worktree", "time", "sandboxes"],
  17802. "additionalProperties": false
  17803. },
  17804. "ProjectNotFoundError": {
  17805. "type": "object",
  17806. "properties": {
  17807. "_tag": {
  17808. "type": "string",
  17809. "enum": ["ProjectNotFoundError"]
  17810. },
  17811. "projectID": {
  17812. "type": "string"
  17813. },
  17814. "message": {
  17815. "type": "string"
  17816. }
  17817. },
  17818. "required": ["_tag", "projectID", "message"],
  17819. "additionalProperties": false
  17820. },
  17821. "PtyNotFoundError": {
  17822. "type": "object",
  17823. "properties": {
  17824. "_tag": {
  17825. "type": "string",
  17826. "enum": ["PtyNotFoundError"]
  17827. },
  17828. "ptyID": {
  17829. "type": "string"
  17830. },
  17831. "message": {
  17832. "type": "string"
  17833. }
  17834. },
  17835. "required": ["_tag", "ptyID", "message"],
  17836. "additionalProperties": false
  17837. },
  17838. "PtyForbiddenError": {
  17839. "type": "object",
  17840. "properties": {
  17841. "_tag": {
  17842. "type": "string",
  17843. "enum": ["PtyForbiddenError"]
  17844. },
  17845. "message": {
  17846. "type": "string"
  17847. }
  17848. },
  17849. "required": ["_tag", "message"],
  17850. "additionalProperties": false
  17851. },
  17852. "QuestionRequest": {
  17853. "type": "object",
  17854. "properties": {
  17855. "id": {
  17856. "type": "string",
  17857. "pattern": "^que"
  17858. },
  17859. "sessionID": {
  17860. "type": "string",
  17861. "pattern": "^ses"
  17862. },
  17863. "questions": {
  17864. "type": "array",
  17865. "items": {
  17866. "$ref": "#/components/schemas/QuestionInfo"
  17867. },
  17868. "description": "Questions to ask"
  17869. },
  17870. "tool": {
  17871. "$ref": "#/components/schemas/QuestionTool"
  17872. }
  17873. },
  17874. "required": ["id", "sessionID", "questions"],
  17875. "additionalProperties": false
  17876. },
  17877. "QuestionNotFoundError": {
  17878. "type": "object",
  17879. "properties": {
  17880. "_tag": {
  17881. "type": "string",
  17882. "enum": ["QuestionNotFoundError"]
  17883. },
  17884. "requestID": {
  17885. "type": "string"
  17886. },
  17887. "message": {
  17888. "type": "string"
  17889. }
  17890. },
  17891. "required": ["_tag", "requestID", "message"],
  17892. "additionalProperties": false
  17893. },
  17894. "PermissionRequest": {
  17895. "type": "object",
  17896. "properties": {
  17897. "id": {
  17898. "type": "string",
  17899. "pattern": "^per"
  17900. },
  17901. "sessionID": {
  17902. "type": "string",
  17903. "pattern": "^ses"
  17904. },
  17905. "permission": {
  17906. "type": "string"
  17907. },
  17908. "patterns": {
  17909. "type": "array",
  17910. "items": {
  17911. "type": "string"
  17912. }
  17913. },
  17914. "metadata": {
  17915. "type": "object"
  17916. },
  17917. "always": {
  17918. "type": "array",
  17919. "items": {
  17920. "type": "string"
  17921. }
  17922. },
  17923. "tool": {
  17924. "type": "object",
  17925. "properties": {
  17926. "messageID": {
  17927. "type": "string"
  17928. },
  17929. "callID": {
  17930. "type": "string"
  17931. }
  17932. },
  17933. "required": ["messageID", "callID"],
  17934. "additionalProperties": false
  17935. }
  17936. },
  17937. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  17938. "additionalProperties": false
  17939. },
  17940. "PermissionNotFoundError": {
  17941. "type": "object",
  17942. "properties": {
  17943. "_tag": {
  17944. "type": "string",
  17945. "enum": ["PermissionNotFoundError"]
  17946. },
  17947. "requestID": {
  17948. "type": "string"
  17949. },
  17950. "message": {
  17951. "type": "string"
  17952. }
  17953. },
  17954. "required": ["_tag", "requestID", "message"],
  17955. "additionalProperties": false
  17956. },
  17957. "ProviderAuthMethod": {
  17958. "type": "object",
  17959. "properties": {
  17960. "type": {
  17961. "type": "string",
  17962. "enum": ["oauth", "api"]
  17963. },
  17964. "label": {
  17965. "type": "string"
  17966. },
  17967. "prompts": {
  17968. "type": "array",
  17969. "items": {
  17970. "anyOf": [
  17971. {
  17972. "type": "object",
  17973. "properties": {
  17974. "type": {
  17975. "type": "string",
  17976. "enum": ["text"]
  17977. },
  17978. "key": {
  17979. "type": "string"
  17980. },
  17981. "message": {
  17982. "type": "string"
  17983. },
  17984. "placeholder": {
  17985. "type": "string"
  17986. },
  17987. "when": {
  17988. "type": "object",
  17989. "properties": {
  17990. "key": {
  17991. "type": "string"
  17992. },
  17993. "op": {
  17994. "type": "string",
  17995. "enum": ["eq", "neq"]
  17996. },
  17997. "value": {
  17998. "type": "string"
  17999. }
  18000. },
  18001. "required": ["key", "op", "value"],
  18002. "additionalProperties": false
  18003. }
  18004. },
  18005. "required": ["type", "key", "message"],
  18006. "additionalProperties": false
  18007. },
  18008. {
  18009. "type": "object",
  18010. "properties": {
  18011. "type": {
  18012. "type": "string",
  18013. "enum": ["select"]
  18014. },
  18015. "key": {
  18016. "type": "string"
  18017. },
  18018. "message": {
  18019. "type": "string"
  18020. },
  18021. "options": {
  18022. "type": "array",
  18023. "items": {
  18024. "type": "object",
  18025. "properties": {
  18026. "label": {
  18027. "type": "string"
  18028. },
  18029. "value": {
  18030. "type": "string"
  18031. },
  18032. "hint": {
  18033. "type": "string"
  18034. }
  18035. },
  18036. "required": ["label", "value"],
  18037. "additionalProperties": false
  18038. }
  18039. },
  18040. "when": {
  18041. "type": "object",
  18042. "properties": {
  18043. "key": {
  18044. "type": "string"
  18045. },
  18046. "op": {
  18047. "type": "string",
  18048. "enum": ["eq", "neq"]
  18049. },
  18050. "value": {
  18051. "type": "string"
  18052. }
  18053. },
  18054. "required": ["key", "op", "value"],
  18055. "additionalProperties": false
  18056. }
  18057. },
  18058. "required": ["type", "key", "message", "options"],
  18059. "additionalProperties": false
  18060. }
  18061. ]
  18062. }
  18063. }
  18064. },
  18065. "required": ["type", "label"],
  18066. "additionalProperties": false
  18067. },
  18068. "ProviderAuthAuthorization": {
  18069. "type": "object",
  18070. "properties": {
  18071. "url": {
  18072. "type": "string"
  18073. },
  18074. "method": {
  18075. "type": "string",
  18076. "enum": ["auto", "code"]
  18077. },
  18078. "instructions": {
  18079. "type": "string"
  18080. }
  18081. },
  18082. "required": ["url", "method", "instructions"],
  18083. "additionalProperties": false
  18084. },
  18085. "ProviderAuthError1": {
  18086. "type": "object",
  18087. "properties": {
  18088. "name": {
  18089. "type": "string",
  18090. "enum": [
  18091. "BadRequest",
  18092. "ProviderAuthOauthMissing",
  18093. "ProviderAuthOauthCodeMissing",
  18094. "ProviderAuthOauthCallbackFailed",
  18095. "ProviderAuthValidationFailed"
  18096. ]
  18097. },
  18098. "data": {
  18099. "type": "object",
  18100. "properties": {
  18101. "providerID": {
  18102. "type": "string"
  18103. },
  18104. "field": {
  18105. "type": "string"
  18106. },
  18107. "message": {
  18108. "type": "string"
  18109. },
  18110. "kind": {
  18111. "type": "string"
  18112. }
  18113. },
  18114. "additionalProperties": false
  18115. }
  18116. },
  18117. "required": ["name", "data"],
  18118. "additionalProperties": false
  18119. },
  18120. "NotFoundError": {
  18121. "type": "object",
  18122. "required": ["name", "data"],
  18123. "properties": {
  18124. "name": {
  18125. "type": "string",
  18126. "enum": ["NotFoundError"]
  18127. },
  18128. "data": {
  18129. "type": "object",
  18130. "required": ["message"],
  18131. "properties": {
  18132. "message": {
  18133. "type": "string"
  18134. }
  18135. }
  18136. }
  18137. }
  18138. },
  18139. "TextPartInput": {
  18140. "type": "object",
  18141. "properties": {
  18142. "id": {
  18143. "type": "string",
  18144. "pattern": "^prt"
  18145. },
  18146. "type": {
  18147. "type": "string",
  18148. "enum": ["text"]
  18149. },
  18150. "text": {
  18151. "type": "string"
  18152. },
  18153. "synthetic": {
  18154. "type": "boolean"
  18155. },
  18156. "ignored": {
  18157. "type": "boolean"
  18158. },
  18159. "time": {
  18160. "type": "object",
  18161. "properties": {
  18162. "start": {
  18163. "type": "integer",
  18164. "minimum": 0
  18165. },
  18166. "end": {
  18167. "type": "integer",
  18168. "minimum": 0
  18169. }
  18170. },
  18171. "required": ["start"],
  18172. "additionalProperties": false
  18173. },
  18174. "metadata": {
  18175. "type": "object"
  18176. }
  18177. },
  18178. "required": ["type", "text"],
  18179. "additionalProperties": false
  18180. },
  18181. "FilePartInput": {
  18182. "type": "object",
  18183. "properties": {
  18184. "id": {
  18185. "type": "string",
  18186. "pattern": "^prt"
  18187. },
  18188. "type": {
  18189. "type": "string",
  18190. "enum": ["file"]
  18191. },
  18192. "mime": {
  18193. "type": "string"
  18194. },
  18195. "filename": {
  18196. "type": "string"
  18197. },
  18198. "url": {
  18199. "type": "string"
  18200. },
  18201. "source": {
  18202. "$ref": "#/components/schemas/FilePartSource"
  18203. }
  18204. },
  18205. "required": ["type", "mime", "url"],
  18206. "additionalProperties": false
  18207. },
  18208. "AgentPartInput": {
  18209. "type": "object",
  18210. "properties": {
  18211. "id": {
  18212. "type": "string",
  18213. "pattern": "^prt"
  18214. },
  18215. "type": {
  18216. "type": "string",
  18217. "enum": ["agent"]
  18218. },
  18219. "name": {
  18220. "type": "string"
  18221. },
  18222. "source": {
  18223. "type": "object",
  18224. "properties": {
  18225. "value": {
  18226. "type": "string"
  18227. },
  18228. "start": {
  18229. "type": "integer",
  18230. "minimum": 0
  18231. },
  18232. "end": {
  18233. "type": "integer",
  18234. "minimum": 0
  18235. }
  18236. },
  18237. "required": ["value", "start", "end"],
  18238. "additionalProperties": false
  18239. }
  18240. },
  18241. "required": ["type", "name"],
  18242. "additionalProperties": false
  18243. },
  18244. "SubtaskPartInput": {
  18245. "type": "object",
  18246. "properties": {
  18247. "id": {
  18248. "type": "string",
  18249. "pattern": "^prt"
  18250. },
  18251. "type": {
  18252. "type": "string",
  18253. "enum": ["subtask"]
  18254. },
  18255. "prompt": {
  18256. "type": "string"
  18257. },
  18258. "description": {
  18259. "type": "string"
  18260. },
  18261. "agent": {
  18262. "type": "string"
  18263. },
  18264. "model": {
  18265. "type": "object",
  18266. "properties": {
  18267. "providerID": {
  18268. "type": "string"
  18269. },
  18270. "modelID": {
  18271. "type": "string"
  18272. }
  18273. },
  18274. "required": ["providerID", "modelID"],
  18275. "additionalProperties": false
  18276. },
  18277. "command": {
  18278. "type": "string"
  18279. }
  18280. },
  18281. "required": ["type", "prompt", "description", "agent"],
  18282. "additionalProperties": false
  18283. },
  18284. "SessionBusyError": {
  18285. "type": "object",
  18286. "properties": {
  18287. "_tag": {
  18288. "type": "string",
  18289. "enum": ["SessionBusyError"]
  18290. },
  18291. "sessionID": {
  18292. "type": "string"
  18293. },
  18294. "message": {
  18295. "type": "string"
  18296. }
  18297. },
  18298. "required": ["_tag", "sessionID", "message"],
  18299. "additionalProperties": false
  18300. },
  18301. "V2SessionsResponse": {
  18302. "type": "object",
  18303. "properties": {
  18304. "items": {
  18305. "type": "array",
  18306. "items": {
  18307. "$ref": "#/components/schemas/SessionInfo"
  18308. }
  18309. },
  18310. "cursor": {
  18311. "type": "object",
  18312. "properties": {
  18313. "previous": {
  18314. "type": "string"
  18315. },
  18316. "next": {
  18317. "type": "string"
  18318. }
  18319. },
  18320. "additionalProperties": false
  18321. }
  18322. },
  18323. "required": ["items", "cursor"],
  18324. "additionalProperties": false
  18325. },
  18326. "InvalidCursorError": {
  18327. "type": "object",
  18328. "properties": {
  18329. "_tag": {
  18330. "type": "string",
  18331. "enum": ["InvalidCursorError"]
  18332. },
  18333. "message": {
  18334. "type": "string"
  18335. }
  18336. },
  18337. "required": ["_tag", "message"],
  18338. "additionalProperties": false
  18339. },
  18340. "UnauthorizedError": {
  18341. "type": "object",
  18342. "properties": {
  18343. "_tag": {
  18344. "type": "string",
  18345. "enum": ["UnauthorizedError"]
  18346. },
  18347. "message": {
  18348. "type": "string"
  18349. }
  18350. },
  18351. "required": ["_tag", "message"],
  18352. "additionalProperties": false
  18353. },
  18354. "SessionNotFoundError": {
  18355. "type": "object",
  18356. "properties": {
  18357. "_tag": {
  18358. "type": "string",
  18359. "enum": ["SessionNotFoundError"]
  18360. },
  18361. "sessionID": {
  18362. "type": "string"
  18363. },
  18364. "message": {
  18365. "type": "string"
  18366. }
  18367. },
  18368. "required": ["_tag", "sessionID", "message"],
  18369. "additionalProperties": false
  18370. },
  18371. "ServiceUnavailableError": {
  18372. "type": "object",
  18373. "properties": {
  18374. "_tag": {
  18375. "type": "string",
  18376. "enum": ["ServiceUnavailableError"]
  18377. },
  18378. "message": {
  18379. "type": "string"
  18380. },
  18381. "service": {
  18382. "type": "string"
  18383. }
  18384. },
  18385. "required": ["_tag", "message"],
  18386. "additionalProperties": false
  18387. },
  18388. "UnknownError1": {
  18389. "type": "object",
  18390. "properties": {
  18391. "_tag": {
  18392. "type": "string",
  18393. "enum": ["UnknownError"]
  18394. },
  18395. "message": {
  18396. "type": "string"
  18397. },
  18398. "ref": {
  18399. "type": "string"
  18400. }
  18401. },
  18402. "required": ["_tag", "message"],
  18403. "additionalProperties": false
  18404. },
  18405. "V2SessionMessagesResponse": {
  18406. "type": "object",
  18407. "properties": {
  18408. "items": {
  18409. "type": "array",
  18410. "items": {
  18411. "$ref": "#/components/schemas/SessionMessage"
  18412. }
  18413. },
  18414. "cursor": {
  18415. "type": "object",
  18416. "properties": {
  18417. "previous": {
  18418. "type": "string"
  18419. },
  18420. "next": {
  18421. "type": "string"
  18422. }
  18423. },
  18424. "additionalProperties": false
  18425. }
  18426. },
  18427. "required": ["items", "cursor"],
  18428. "additionalProperties": false
  18429. },
  18430. "ProviderNotFoundError": {
  18431. "type": "object",
  18432. "properties": {
  18433. "_tag": {
  18434. "type": "string",
  18435. "enum": ["ProviderNotFoundError"]
  18436. },
  18437. "providerID": {
  18438. "type": "string"
  18439. },
  18440. "message": {
  18441. "type": "string"
  18442. }
  18443. },
  18444. "required": ["_tag", "providerID", "message"],
  18445. "additionalProperties": false
  18446. },
  18447. "EventTuiPromptAppend": {
  18448. "type": "object",
  18449. "properties": {
  18450. "type": {
  18451. "type": "string",
  18452. "enum": ["tui.prompt.append"]
  18453. },
  18454. "properties": {
  18455. "type": "object",
  18456. "properties": {
  18457. "text": {
  18458. "type": "string"
  18459. }
  18460. },
  18461. "required": ["text"],
  18462. "additionalProperties": false
  18463. }
  18464. },
  18465. "required": ["type", "properties"],
  18466. "additionalProperties": false
  18467. },
  18468. "EventTuiCommandExecute": {
  18469. "type": "object",
  18470. "properties": {
  18471. "type": {
  18472. "type": "string",
  18473. "enum": ["tui.command.execute"]
  18474. },
  18475. "properties": {
  18476. "type": "object",
  18477. "properties": {
  18478. "command": {
  18479. "anyOf": [
  18480. {
  18481. "type": "string",
  18482. "enum": [
  18483. "session.list",
  18484. "session.new",
  18485. "session.share",
  18486. "session.interrupt",
  18487. "session.compact",
  18488. "session.page.up",
  18489. "session.page.down",
  18490. "session.line.up",
  18491. "session.line.down",
  18492. "session.half.page.up",
  18493. "session.half.page.down",
  18494. "session.first",
  18495. "session.last",
  18496. "prompt.clear",
  18497. "prompt.submit",
  18498. "agent.cycle"
  18499. ]
  18500. },
  18501. {
  18502. "type": "string"
  18503. }
  18504. ]
  18505. }
  18506. },
  18507. "required": ["command"],
  18508. "additionalProperties": false
  18509. }
  18510. },
  18511. "required": ["type", "properties"],
  18512. "additionalProperties": false
  18513. },
  18514. "EventTuiToastShow": {
  18515. "type": "object",
  18516. "properties": {
  18517. "type": {
  18518. "type": "string",
  18519. "enum": ["tui.toast.show"]
  18520. },
  18521. "properties": {
  18522. "type": "object",
  18523. "properties": {
  18524. "title": {
  18525. "type": "string"
  18526. },
  18527. "message": {
  18528. "type": "string"
  18529. },
  18530. "variant": {
  18531. "type": "string",
  18532. "enum": ["info", "success", "warning", "error"]
  18533. },
  18534. "duration": {
  18535. "type": "integer",
  18536. "exclusiveMinimum": 0
  18537. }
  18538. },
  18539. "required": ["message", "variant"],
  18540. "additionalProperties": false
  18541. }
  18542. },
  18543. "required": ["type", "properties"],
  18544. "additionalProperties": false
  18545. },
  18546. "EventTuiSessionSelect": {
  18547. "type": "object",
  18548. "properties": {
  18549. "type": {
  18550. "type": "string",
  18551. "enum": ["tui.session.select"]
  18552. },
  18553. "properties": {
  18554. "type": "object",
  18555. "properties": {
  18556. "sessionID": {
  18557. "type": "string",
  18558. "pattern": "^ses",
  18559. "description": "Session ID to navigate to"
  18560. }
  18561. },
  18562. "required": ["sessionID"],
  18563. "additionalProperties": false
  18564. }
  18565. },
  18566. "required": ["type", "properties"],
  18567. "additionalProperties": false
  18568. },
  18569. "Workspace": {
  18570. "type": "object",
  18571. "properties": {
  18572. "id": {
  18573. "type": "string",
  18574. "pattern": "^wrk"
  18575. },
  18576. "type": {
  18577. "type": "string"
  18578. },
  18579. "name": {
  18580. "type": "string"
  18581. },
  18582. "branch": {
  18583. "anyOf": [
  18584. {
  18585. "type": "string"
  18586. },
  18587. {
  18588. "type": "null"
  18589. }
  18590. ]
  18591. },
  18592. "directory": {
  18593. "anyOf": [
  18594. {
  18595. "type": "string"
  18596. },
  18597. {
  18598. "type": "null"
  18599. }
  18600. ]
  18601. },
  18602. "extra": {
  18603. "anyOf": [
  18604. {},
  18605. {
  18606. "type": "null"
  18607. }
  18608. ]
  18609. },
  18610. "projectID": {
  18611. "type": "string"
  18612. },
  18613. "timeUsed": {
  18614. "anyOf": [
  18615. {
  18616. "type": "number"
  18617. },
  18618. {
  18619. "type": "string",
  18620. "enum": ["NaN"]
  18621. },
  18622. {
  18623. "type": "string",
  18624. "enum": ["Infinity"]
  18625. },
  18626. {
  18627. "type": "string",
  18628. "enum": ["-Infinity"]
  18629. },
  18630. {
  18631. "type": "string",
  18632. "enum": ["Infinity", "-Infinity", "NaN"]
  18633. }
  18634. ]
  18635. }
  18636. },
  18637. "required": ["id", "type", "name", "projectID", "timeUsed"],
  18638. "additionalProperties": false
  18639. },
  18640. "WorkspaceCreateError": {
  18641. "type": "object",
  18642. "properties": {
  18643. "name": {
  18644. "type": "string",
  18645. "enum": ["WorkspaceCreateError"]
  18646. },
  18647. "data": {
  18648. "type": "object",
  18649. "properties": {
  18650. "message": {
  18651. "type": "string"
  18652. }
  18653. },
  18654. "required": ["message"],
  18655. "additionalProperties": false
  18656. }
  18657. },
  18658. "required": ["name", "data"],
  18659. "additionalProperties": false
  18660. },
  18661. "WorkspaceWarpError": {
  18662. "type": "object",
  18663. "properties": {
  18664. "name": {
  18665. "type": "string",
  18666. "enum": ["WorkspaceWarpError"]
  18667. },
  18668. "data": {
  18669. "type": "object",
  18670. "properties": {
  18671. "message": {
  18672. "type": "string"
  18673. }
  18674. },
  18675. "required": ["message"],
  18676. "additionalProperties": false
  18677. }
  18678. },
  18679. "required": ["name", "data"],
  18680. "additionalProperties": false
  18681. },
  18682. "effect_HttpApiError_Forbidden": {
  18683. "type": "object",
  18684. "properties": {
  18685. "_tag": {
  18686. "type": "string",
  18687. "enum": ["Forbidden"]
  18688. }
  18689. },
  18690. "required": ["_tag"],
  18691. "additionalProperties": false
  18692. },
  18693. "Event.tui.prompt.append": {
  18694. "type": "object",
  18695. "properties": {
  18696. "id": {
  18697. "type": "string"
  18698. },
  18699. "type": {
  18700. "type": "string",
  18701. "enum": ["tui.prompt.append"]
  18702. },
  18703. "properties": {
  18704. "type": "object",
  18705. "properties": {
  18706. "text": {
  18707. "type": "string"
  18708. }
  18709. },
  18710. "required": ["text"],
  18711. "additionalProperties": false
  18712. }
  18713. },
  18714. "required": ["id", "type", "properties"],
  18715. "additionalProperties": false
  18716. },
  18717. "Event.tui.command.execute": {
  18718. "type": "object",
  18719. "properties": {
  18720. "id": {
  18721. "type": "string"
  18722. },
  18723. "type": {
  18724. "type": "string",
  18725. "enum": ["tui.command.execute"]
  18726. },
  18727. "properties": {
  18728. "type": "object",
  18729. "properties": {
  18730. "command": {
  18731. "anyOf": [
  18732. {
  18733. "type": "string",
  18734. "enum": [
  18735. "session.list",
  18736. "session.new",
  18737. "session.share",
  18738. "session.interrupt",
  18739. "session.compact",
  18740. "session.page.up",
  18741. "session.page.down",
  18742. "session.line.up",
  18743. "session.line.down",
  18744. "session.half.page.up",
  18745. "session.half.page.down",
  18746. "session.first",
  18747. "session.last",
  18748. "prompt.clear",
  18749. "prompt.submit",
  18750. "agent.cycle"
  18751. ]
  18752. },
  18753. {
  18754. "type": "string"
  18755. }
  18756. ]
  18757. }
  18758. },
  18759. "required": ["command"],
  18760. "additionalProperties": false
  18761. }
  18762. },
  18763. "required": ["id", "type", "properties"],
  18764. "additionalProperties": false
  18765. },
  18766. "Event.tui.toast.show": {
  18767. "type": "object",
  18768. "properties": {
  18769. "id": {
  18770. "type": "string"
  18771. },
  18772. "type": {
  18773. "type": "string",
  18774. "enum": ["tui.toast.show"]
  18775. },
  18776. "properties": {
  18777. "type": "object",
  18778. "properties": {
  18779. "title": {
  18780. "type": "string"
  18781. },
  18782. "message": {
  18783. "type": "string"
  18784. },
  18785. "variant": {
  18786. "type": "string",
  18787. "enum": ["info", "success", "warning", "error"]
  18788. },
  18789. "duration": {
  18790. "type": "integer",
  18791. "exclusiveMinimum": 0
  18792. }
  18793. },
  18794. "required": ["message", "variant"],
  18795. "additionalProperties": false
  18796. }
  18797. },
  18798. "required": ["id", "type", "properties"],
  18799. "additionalProperties": false
  18800. },
  18801. "Event.tui.session.select": {
  18802. "type": "object",
  18803. "properties": {
  18804. "id": {
  18805. "type": "string"
  18806. },
  18807. "type": {
  18808. "type": "string",
  18809. "enum": ["tui.session.select"]
  18810. },
  18811. "properties": {
  18812. "type": "object",
  18813. "properties": {
  18814. "sessionID": {
  18815. "type": "string",
  18816. "pattern": "^ses",
  18817. "description": "Session ID to navigate to"
  18818. }
  18819. },
  18820. "required": ["sessionID"],
  18821. "additionalProperties": false
  18822. }
  18823. },
  18824. "required": ["id", "type", "properties"],
  18825. "additionalProperties": false
  18826. },
  18827. "ModelV2Info": {
  18828. "type": "object",
  18829. "properties": {
  18830. "id": {
  18831. "type": "string"
  18832. },
  18833. "apiID": {
  18834. "type": "string"
  18835. },
  18836. "providerID": {
  18837. "type": "string"
  18838. },
  18839. "family": {
  18840. "type": "string"
  18841. },
  18842. "name": {
  18843. "type": "string"
  18844. },
  18845. "endpoint": {
  18846. "anyOf": [
  18847. {
  18848. "type": "object",
  18849. "properties": {
  18850. "type": {
  18851. "type": "string",
  18852. "enum": ["unknown"]
  18853. }
  18854. },
  18855. "required": ["type"],
  18856. "additionalProperties": false
  18857. },
  18858. {
  18859. "type": "object",
  18860. "properties": {
  18861. "type": {
  18862. "type": "string",
  18863. "enum": ["openai/responses"]
  18864. },
  18865. "url": {
  18866. "type": "string"
  18867. },
  18868. "websocket": {
  18869. "type": "boolean"
  18870. }
  18871. },
  18872. "required": ["type", "url"],
  18873. "additionalProperties": false
  18874. },
  18875. {
  18876. "type": "object",
  18877. "properties": {
  18878. "type": {
  18879. "type": "string",
  18880. "enum": ["openai/completions"]
  18881. },
  18882. "url": {
  18883. "type": "string"
  18884. },
  18885. "reasoning": {
  18886. "anyOf": [
  18887. {
  18888. "type": "object",
  18889. "properties": {
  18890. "type": {
  18891. "type": "string",
  18892. "enum": ["reasoning_content"]
  18893. }
  18894. },
  18895. "required": ["type"],
  18896. "additionalProperties": false
  18897. },
  18898. {
  18899. "type": "object",
  18900. "properties": {
  18901. "type": {
  18902. "type": "string",
  18903. "enum": ["reasoning_details"]
  18904. }
  18905. },
  18906. "required": ["type"],
  18907. "additionalProperties": false
  18908. }
  18909. ]
  18910. }
  18911. },
  18912. "required": ["type", "url"],
  18913. "additionalProperties": false
  18914. },
  18915. {
  18916. "type": "object",
  18917. "properties": {
  18918. "type": {
  18919. "type": "string",
  18920. "enum": ["anthropic/messages"]
  18921. },
  18922. "url": {
  18923. "type": "string"
  18924. }
  18925. },
  18926. "required": ["type", "url"],
  18927. "additionalProperties": false
  18928. },
  18929. {
  18930. "type": "object",
  18931. "properties": {
  18932. "type": {
  18933. "type": "string",
  18934. "enum": ["aisdk"]
  18935. },
  18936. "package": {
  18937. "type": "string"
  18938. },
  18939. "url": {
  18940. "type": "string"
  18941. }
  18942. },
  18943. "required": ["type", "package"],
  18944. "additionalProperties": false
  18945. }
  18946. ]
  18947. },
  18948. "capabilities": {
  18949. "type": "object",
  18950. "properties": {
  18951. "tools": {
  18952. "type": "boolean"
  18953. },
  18954. "input": {
  18955. "type": "array",
  18956. "items": {
  18957. "type": "string"
  18958. }
  18959. },
  18960. "output": {
  18961. "type": "array",
  18962. "items": {
  18963. "type": "string"
  18964. }
  18965. }
  18966. },
  18967. "required": ["tools", "input", "output"],
  18968. "additionalProperties": false
  18969. },
  18970. "options": {
  18971. "type": "object",
  18972. "properties": {
  18973. "headers": {
  18974. "type": "object",
  18975. "additionalProperties": {
  18976. "type": "string"
  18977. }
  18978. },
  18979. "body": {
  18980. "type": "object"
  18981. },
  18982. "aisdk": {
  18983. "type": "object",
  18984. "properties": {
  18985. "provider": {
  18986. "type": "object"
  18987. },
  18988. "request": {
  18989. "type": "object"
  18990. }
  18991. },
  18992. "required": ["provider", "request"],
  18993. "additionalProperties": false
  18994. },
  18995. "variant": {
  18996. "type": "string"
  18997. }
  18998. },
  18999. "required": ["headers", "body", "aisdk"],
  19000. "additionalProperties": false
  19001. },
  19002. "variants": {
  19003. "type": "array",
  19004. "items": {
  19005. "type": "object",
  19006. "properties": {
  19007. "id": {
  19008. "type": "string"
  19009. },
  19010. "headers": {
  19011. "type": "object",
  19012. "additionalProperties": {
  19013. "type": "string"
  19014. }
  19015. },
  19016. "body": {
  19017. "type": "object"
  19018. },
  19019. "aisdk": {
  19020. "type": "object",
  19021. "properties": {
  19022. "provider": {
  19023. "type": "object"
  19024. },
  19025. "request": {
  19026. "type": "object"
  19027. }
  19028. },
  19029. "required": ["provider", "request"],
  19030. "additionalProperties": false
  19031. }
  19032. },
  19033. "required": ["id", "headers", "body", "aisdk"],
  19034. "additionalProperties": false
  19035. }
  19036. },
  19037. "time": {
  19038. "type": "object",
  19039. "properties": {
  19040. "released": {
  19041. "anyOf": [
  19042. {
  19043. "type": "number"
  19044. },
  19045. {
  19046. "type": "string",
  19047. "enum": ["NaN"]
  19048. },
  19049. {
  19050. "type": "string",
  19051. "enum": ["Infinity"]
  19052. },
  19053. {
  19054. "type": "string",
  19055. "enum": ["-Infinity"]
  19056. },
  19057. {
  19058. "type": "string",
  19059. "enum": ["Infinity", "-Infinity", "NaN"]
  19060. }
  19061. ]
  19062. }
  19063. },
  19064. "required": ["released"],
  19065. "additionalProperties": false
  19066. },
  19067. "cost": {
  19068. "type": "array",
  19069. "items": {
  19070. "type": "object",
  19071. "properties": {
  19072. "tier": {
  19073. "type": "object",
  19074. "properties": {
  19075. "type": {
  19076. "type": "string",
  19077. "enum": ["context"]
  19078. },
  19079. "size": {
  19080. "type": "integer"
  19081. }
  19082. },
  19083. "required": ["type", "size"],
  19084. "additionalProperties": false
  19085. },
  19086. "input": {
  19087. "type": "number"
  19088. },
  19089. "output": {
  19090. "type": "number"
  19091. },
  19092. "cache": {
  19093. "type": "object",
  19094. "properties": {
  19095. "read": {
  19096. "type": "number"
  19097. },
  19098. "write": {
  19099. "type": "number"
  19100. }
  19101. },
  19102. "required": ["read", "write"],
  19103. "additionalProperties": false
  19104. }
  19105. },
  19106. "required": ["input", "output", "cache"],
  19107. "additionalProperties": false
  19108. }
  19109. },
  19110. "status": {
  19111. "type": "string",
  19112. "enum": ["alpha", "beta", "deprecated", "active"]
  19113. },
  19114. "enabled": {
  19115. "type": "boolean"
  19116. },
  19117. "limit": {
  19118. "type": "object",
  19119. "properties": {
  19120. "context": {
  19121. "type": "integer"
  19122. },
  19123. "input": {
  19124. "type": "integer"
  19125. },
  19126. "output": {
  19127. "type": "integer"
  19128. }
  19129. },
  19130. "required": ["context", "output"],
  19131. "additionalProperties": false
  19132. }
  19133. },
  19134. "required": [
  19135. "id",
  19136. "apiID",
  19137. "providerID",
  19138. "name",
  19139. "endpoint",
  19140. "capabilities",
  19141. "options",
  19142. "variants",
  19143. "time",
  19144. "cost",
  19145. "status",
  19146. "enabled",
  19147. "limit"
  19148. ],
  19149. "additionalProperties": false
  19150. },
  19151. "PromptSource": {
  19152. "type": "object",
  19153. "properties": {
  19154. "start": {
  19155. "type": "number"
  19156. },
  19157. "end": {
  19158. "type": "number"
  19159. },
  19160. "text": {
  19161. "type": "string"
  19162. }
  19163. },
  19164. "required": ["start", "end", "text"],
  19165. "additionalProperties": false
  19166. },
  19167. "PromptFileAttachment": {
  19168. "type": "object",
  19169. "properties": {
  19170. "uri": {
  19171. "type": "string"
  19172. },
  19173. "mime": {
  19174. "type": "string"
  19175. },
  19176. "name": {
  19177. "type": "string"
  19178. },
  19179. "description": {
  19180. "type": "string"
  19181. },
  19182. "source": {
  19183. "$ref": "#/components/schemas/PromptSource"
  19184. }
  19185. },
  19186. "required": ["uri", "mime"],
  19187. "additionalProperties": false
  19188. },
  19189. "PromptAgentAttachment": {
  19190. "type": "object",
  19191. "properties": {
  19192. "name": {
  19193. "type": "string"
  19194. },
  19195. "source": {
  19196. "$ref": "#/components/schemas/PromptSource"
  19197. }
  19198. },
  19199. "required": ["name"],
  19200. "additionalProperties": false
  19201. },
  19202. "PromptReferenceAttachment": {
  19203. "type": "object",
  19204. "properties": {
  19205. "name": {
  19206. "type": "string"
  19207. },
  19208. "kind": {
  19209. "type": "string",
  19210. "enum": ["local", "git", "invalid"]
  19211. },
  19212. "uri": {
  19213. "type": "string"
  19214. },
  19215. "repository": {
  19216. "type": "string"
  19217. },
  19218. "branch": {
  19219. "type": "string"
  19220. },
  19221. "target": {
  19222. "type": "string"
  19223. },
  19224. "targetUri": {
  19225. "type": "string"
  19226. },
  19227. "problem": {
  19228. "type": "string"
  19229. },
  19230. "source": {
  19231. "$ref": "#/components/schemas/PromptSource"
  19232. }
  19233. },
  19234. "required": ["name", "kind"],
  19235. "additionalProperties": false
  19236. },
  19237. "SessionErrorUnknown": {
  19238. "type": "object",
  19239. "properties": {
  19240. "type": {
  19241. "type": "string",
  19242. "enum": ["unknown"]
  19243. },
  19244. "message": {
  19245. "type": "string"
  19246. }
  19247. },
  19248. "required": ["type", "message"],
  19249. "additionalProperties": false
  19250. },
  19251. "ToolTextContent": {
  19252. "type": "object",
  19253. "properties": {
  19254. "type": {
  19255. "type": "string",
  19256. "enum": ["text"]
  19257. },
  19258. "text": {
  19259. "type": "string"
  19260. }
  19261. },
  19262. "required": ["type", "text"],
  19263. "additionalProperties": false
  19264. },
  19265. "ToolFileContent": {
  19266. "type": "object",
  19267. "properties": {
  19268. "type": {
  19269. "type": "string",
  19270. "enum": ["file"]
  19271. },
  19272. "uri": {
  19273. "type": "string"
  19274. },
  19275. "mime": {
  19276. "type": "string"
  19277. },
  19278. "name": {
  19279. "type": "string"
  19280. }
  19281. },
  19282. "required": ["type", "uri", "mime"],
  19283. "additionalProperties": false
  19284. },
  19285. "SessionNextRetry_error": {
  19286. "type": "object",
  19287. "properties": {
  19288. "message": {
  19289. "type": "string"
  19290. },
  19291. "statusCode": {
  19292. "type": "number"
  19293. },
  19294. "isRetryable": {
  19295. "type": "boolean"
  19296. },
  19297. "responseHeaders": {
  19298. "type": "object",
  19299. "additionalProperties": {
  19300. "type": "string"
  19301. }
  19302. },
  19303. "responseBody": {
  19304. "type": "string"
  19305. },
  19306. "metadata": {
  19307. "type": "object",
  19308. "additionalProperties": {
  19309. "type": "string"
  19310. }
  19311. }
  19312. },
  19313. "required": ["message", "isRetryable"],
  19314. "additionalProperties": false
  19315. },
  19316. "PermissionV2Source": {
  19317. "type": "object",
  19318. "properties": {
  19319. "type": {
  19320. "type": "string",
  19321. "enum": ["tool"]
  19322. },
  19323. "messageID": {
  19324. "type": "string"
  19325. },
  19326. "callID": {
  19327. "type": "string"
  19328. }
  19329. },
  19330. "required": ["type", "messageID", "callID"],
  19331. "additionalProperties": false
  19332. },
  19333. "PermissionV2Reply": {
  19334. "type": "string",
  19335. "enum": ["once", "always", "reject"]
  19336. },
  19337. "AuthOAuthCredential": {
  19338. "type": "object",
  19339. "properties": {
  19340. "type": {
  19341. "type": "string",
  19342. "enum": ["oauth"]
  19343. },
  19344. "refresh": {
  19345. "type": "string"
  19346. },
  19347. "access": {
  19348. "type": "string"
  19349. },
  19350. "expires": {
  19351. "type": "integer",
  19352. "minimum": 0
  19353. }
  19354. },
  19355. "required": ["type", "refresh", "access", "expires"],
  19356. "additionalProperties": false
  19357. },
  19358. "AuthApiKeyCredential": {
  19359. "type": "object",
  19360. "properties": {
  19361. "type": {
  19362. "type": "string",
  19363. "enum": ["api"]
  19364. },
  19365. "key": {
  19366. "type": "string"
  19367. },
  19368. "metadata": {
  19369. "type": "object",
  19370. "additionalProperties": {
  19371. "type": "string"
  19372. }
  19373. }
  19374. },
  19375. "required": ["type", "key"],
  19376. "additionalProperties": false
  19377. },
  19378. "AuthCredential": {
  19379. "anyOf": [
  19380. {
  19381. "$ref": "#/components/schemas/AuthOAuthCredential"
  19382. },
  19383. {
  19384. "$ref": "#/components/schemas/AuthApiKeyCredential"
  19385. }
  19386. ]
  19387. },
  19388. "AuthInfo": {
  19389. "type": "object",
  19390. "properties": {
  19391. "id": {
  19392. "type": "string"
  19393. },
  19394. "serviceID": {
  19395. "type": "string"
  19396. },
  19397. "description": {
  19398. "type": "string"
  19399. },
  19400. "credential": {
  19401. "$ref": "#/components/schemas/AuthCredential"
  19402. }
  19403. },
  19404. "required": ["id", "serviceID", "description", "credential"],
  19405. "additionalProperties": false
  19406. },
  19407. "EventServerInstanceDisposed": {
  19408. "type": "object",
  19409. "properties": {
  19410. "id": {
  19411. "type": "string"
  19412. },
  19413. "type": {
  19414. "type": "string",
  19415. "enum": ["server.instance.disposed"]
  19416. },
  19417. "properties": {
  19418. "type": "object",
  19419. "properties": {
  19420. "directory": {
  19421. "type": "string"
  19422. }
  19423. },
  19424. "required": ["directory"],
  19425. "additionalProperties": false
  19426. }
  19427. },
  19428. "required": ["id", "type", "properties"],
  19429. "additionalProperties": false
  19430. },
  19431. "SyncEventSessionNextAgentSwitched": {
  19432. "type": "object",
  19433. "properties": {
  19434. "type": {
  19435. "type": "string",
  19436. "enum": ["sync"]
  19437. },
  19438. "name": {
  19439. "type": "string",
  19440. "enum": ["session.next.agent.switched.1"]
  19441. },
  19442. "id": {
  19443. "type": "string"
  19444. },
  19445. "seq": {
  19446. "type": "number"
  19447. },
  19448. "aggregateID": {
  19449. "type": "string",
  19450. "enum": ["sessionID"]
  19451. },
  19452. "data": {
  19453. "type": "object",
  19454. "properties": {
  19455. "timestamp": {
  19456. "type": "number"
  19457. },
  19458. "sessionID": {
  19459. "type": "string",
  19460. "pattern": "^ses"
  19461. },
  19462. "agent": {
  19463. "type": "string"
  19464. }
  19465. },
  19466. "required": ["timestamp", "sessionID", "agent"],
  19467. "additionalProperties": false
  19468. }
  19469. },
  19470. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19471. "additionalProperties": false
  19472. },
  19473. "SyncEventSessionNextModelSwitched": {
  19474. "type": "object",
  19475. "properties": {
  19476. "type": {
  19477. "type": "string",
  19478. "enum": ["sync"]
  19479. },
  19480. "name": {
  19481. "type": "string",
  19482. "enum": ["session.next.model.switched.1"]
  19483. },
  19484. "id": {
  19485. "type": "string"
  19486. },
  19487. "seq": {
  19488. "type": "number"
  19489. },
  19490. "aggregateID": {
  19491. "type": "string",
  19492. "enum": ["sessionID"]
  19493. },
  19494. "data": {
  19495. "type": "object",
  19496. "properties": {
  19497. "timestamp": {
  19498. "type": "number"
  19499. },
  19500. "sessionID": {
  19501. "type": "string",
  19502. "pattern": "^ses"
  19503. },
  19504. "model": {
  19505. "type": "object",
  19506. "properties": {
  19507. "id": {
  19508. "type": "string"
  19509. },
  19510. "providerID": {
  19511. "type": "string"
  19512. },
  19513. "variant": {
  19514. "type": "string"
  19515. }
  19516. },
  19517. "required": ["id", "providerID"],
  19518. "additionalProperties": false
  19519. }
  19520. },
  19521. "required": ["timestamp", "sessionID", "model"],
  19522. "additionalProperties": false
  19523. }
  19524. },
  19525. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19526. "additionalProperties": false
  19527. },
  19528. "SyncEventSessionNextPrompted": {
  19529. "type": "object",
  19530. "properties": {
  19531. "type": {
  19532. "type": "string",
  19533. "enum": ["sync"]
  19534. },
  19535. "name": {
  19536. "type": "string",
  19537. "enum": ["session.next.prompted.1"]
  19538. },
  19539. "id": {
  19540. "type": "string"
  19541. },
  19542. "seq": {
  19543. "type": "number"
  19544. },
  19545. "aggregateID": {
  19546. "type": "string",
  19547. "enum": ["sessionID"]
  19548. },
  19549. "data": {
  19550. "type": "object",
  19551. "properties": {
  19552. "timestamp": {
  19553. "type": "number"
  19554. },
  19555. "sessionID": {
  19556. "type": "string",
  19557. "pattern": "^ses"
  19558. },
  19559. "prompt": {
  19560. "$ref": "#/components/schemas/Prompt"
  19561. }
  19562. },
  19563. "required": ["timestamp", "sessionID", "prompt"],
  19564. "additionalProperties": false
  19565. }
  19566. },
  19567. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19568. "additionalProperties": false
  19569. },
  19570. "SyncEventSessionNextSynthetic": {
  19571. "type": "object",
  19572. "properties": {
  19573. "type": {
  19574. "type": "string",
  19575. "enum": ["sync"]
  19576. },
  19577. "name": {
  19578. "type": "string",
  19579. "enum": ["session.next.synthetic.1"]
  19580. },
  19581. "id": {
  19582. "type": "string"
  19583. },
  19584. "seq": {
  19585. "type": "number"
  19586. },
  19587. "aggregateID": {
  19588. "type": "string",
  19589. "enum": ["sessionID"]
  19590. },
  19591. "data": {
  19592. "type": "object",
  19593. "properties": {
  19594. "timestamp": {
  19595. "type": "number"
  19596. },
  19597. "sessionID": {
  19598. "type": "string",
  19599. "pattern": "^ses"
  19600. },
  19601. "text": {
  19602. "type": "string"
  19603. }
  19604. },
  19605. "required": ["timestamp", "sessionID", "text"],
  19606. "additionalProperties": false
  19607. }
  19608. },
  19609. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19610. "additionalProperties": false
  19611. },
  19612. "SyncEventSessionNextShellStarted": {
  19613. "type": "object",
  19614. "properties": {
  19615. "type": {
  19616. "type": "string",
  19617. "enum": ["sync"]
  19618. },
  19619. "name": {
  19620. "type": "string",
  19621. "enum": ["session.next.shell.started.1"]
  19622. },
  19623. "id": {
  19624. "type": "string"
  19625. },
  19626. "seq": {
  19627. "type": "number"
  19628. },
  19629. "aggregateID": {
  19630. "type": "string",
  19631. "enum": ["sessionID"]
  19632. },
  19633. "data": {
  19634. "type": "object",
  19635. "properties": {
  19636. "timestamp": {
  19637. "type": "number"
  19638. },
  19639. "sessionID": {
  19640. "type": "string",
  19641. "pattern": "^ses"
  19642. },
  19643. "callID": {
  19644. "type": "string"
  19645. },
  19646. "command": {
  19647. "type": "string"
  19648. }
  19649. },
  19650. "required": ["timestamp", "sessionID", "callID", "command"],
  19651. "additionalProperties": false
  19652. }
  19653. },
  19654. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19655. "additionalProperties": false
  19656. },
  19657. "SyncEventSessionNextShellEnded": {
  19658. "type": "object",
  19659. "properties": {
  19660. "type": {
  19661. "type": "string",
  19662. "enum": ["sync"]
  19663. },
  19664. "name": {
  19665. "type": "string",
  19666. "enum": ["session.next.shell.ended.1"]
  19667. },
  19668. "id": {
  19669. "type": "string"
  19670. },
  19671. "seq": {
  19672. "type": "number"
  19673. },
  19674. "aggregateID": {
  19675. "type": "string",
  19676. "enum": ["sessionID"]
  19677. },
  19678. "data": {
  19679. "type": "object",
  19680. "properties": {
  19681. "timestamp": {
  19682. "type": "number"
  19683. },
  19684. "sessionID": {
  19685. "type": "string",
  19686. "pattern": "^ses"
  19687. },
  19688. "callID": {
  19689. "type": "string"
  19690. },
  19691. "output": {
  19692. "type": "string"
  19693. }
  19694. },
  19695. "required": ["timestamp", "sessionID", "callID", "output"],
  19696. "additionalProperties": false
  19697. }
  19698. },
  19699. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19700. "additionalProperties": false
  19701. },
  19702. "SyncEventSessionNextStepStarted": {
  19703. "type": "object",
  19704. "properties": {
  19705. "type": {
  19706. "type": "string",
  19707. "enum": ["sync"]
  19708. },
  19709. "name": {
  19710. "type": "string",
  19711. "enum": ["session.next.step.started.1"]
  19712. },
  19713. "id": {
  19714. "type": "string"
  19715. },
  19716. "seq": {
  19717. "type": "number"
  19718. },
  19719. "aggregateID": {
  19720. "type": "string",
  19721. "enum": ["sessionID"]
  19722. },
  19723. "data": {
  19724. "type": "object",
  19725. "properties": {
  19726. "timestamp": {
  19727. "type": "number"
  19728. },
  19729. "sessionID": {
  19730. "type": "string",
  19731. "pattern": "^ses"
  19732. },
  19733. "agent": {
  19734. "type": "string"
  19735. },
  19736. "model": {
  19737. "type": "object",
  19738. "properties": {
  19739. "id": {
  19740. "type": "string"
  19741. },
  19742. "providerID": {
  19743. "type": "string"
  19744. },
  19745. "variant": {
  19746. "type": "string"
  19747. }
  19748. },
  19749. "required": ["id", "providerID"],
  19750. "additionalProperties": false
  19751. },
  19752. "snapshot": {
  19753. "type": "string"
  19754. }
  19755. },
  19756. "required": ["timestamp", "sessionID", "agent", "model"],
  19757. "additionalProperties": false
  19758. }
  19759. },
  19760. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19761. "additionalProperties": false
  19762. },
  19763. "SyncEventSessionNextStepEnded": {
  19764. "type": "object",
  19765. "properties": {
  19766. "type": {
  19767. "type": "string",
  19768. "enum": ["sync"]
  19769. },
  19770. "name": {
  19771. "type": "string",
  19772. "enum": ["session.next.step.ended.1"]
  19773. },
  19774. "id": {
  19775. "type": "string"
  19776. },
  19777. "seq": {
  19778. "type": "number"
  19779. },
  19780. "aggregateID": {
  19781. "type": "string",
  19782. "enum": ["sessionID"]
  19783. },
  19784. "data": {
  19785. "type": "object",
  19786. "properties": {
  19787. "timestamp": {
  19788. "type": "number"
  19789. },
  19790. "sessionID": {
  19791. "type": "string",
  19792. "pattern": "^ses"
  19793. },
  19794. "finish": {
  19795. "type": "string"
  19796. },
  19797. "cost": {
  19798. "type": "number"
  19799. },
  19800. "tokens": {
  19801. "type": "object",
  19802. "properties": {
  19803. "input": {
  19804. "type": "number"
  19805. },
  19806. "output": {
  19807. "type": "number"
  19808. },
  19809. "reasoning": {
  19810. "type": "number"
  19811. },
  19812. "cache": {
  19813. "type": "object",
  19814. "properties": {
  19815. "read": {
  19816. "type": "number"
  19817. },
  19818. "write": {
  19819. "type": "number"
  19820. }
  19821. },
  19822. "required": ["read", "write"],
  19823. "additionalProperties": false
  19824. }
  19825. },
  19826. "required": ["input", "output", "reasoning", "cache"],
  19827. "additionalProperties": false
  19828. },
  19829. "snapshot": {
  19830. "type": "string"
  19831. }
  19832. },
  19833. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19834. "additionalProperties": false
  19835. }
  19836. },
  19837. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19838. "additionalProperties": false
  19839. },
  19840. "SyncEventSessionNextStepFailed": {
  19841. "type": "object",
  19842. "properties": {
  19843. "type": {
  19844. "type": "string",
  19845. "enum": ["sync"]
  19846. },
  19847. "name": {
  19848. "type": "string",
  19849. "enum": ["session.next.step.failed.1"]
  19850. },
  19851. "id": {
  19852. "type": "string"
  19853. },
  19854. "seq": {
  19855. "type": "number"
  19856. },
  19857. "aggregateID": {
  19858. "type": "string",
  19859. "enum": ["sessionID"]
  19860. },
  19861. "data": {
  19862. "type": "object",
  19863. "properties": {
  19864. "timestamp": {
  19865. "type": "number"
  19866. },
  19867. "sessionID": {
  19868. "type": "string",
  19869. "pattern": "^ses"
  19870. },
  19871. "error": {
  19872. "$ref": "#/components/schemas/SessionErrorUnknown"
  19873. }
  19874. },
  19875. "required": ["timestamp", "sessionID", "error"],
  19876. "additionalProperties": false
  19877. }
  19878. },
  19879. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19880. "additionalProperties": false
  19881. },
  19882. "SyncEventSessionNextTextStarted": {
  19883. "type": "object",
  19884. "properties": {
  19885. "type": {
  19886. "type": "string",
  19887. "enum": ["sync"]
  19888. },
  19889. "name": {
  19890. "type": "string",
  19891. "enum": ["session.next.text.started.1"]
  19892. },
  19893. "id": {
  19894. "type": "string"
  19895. },
  19896. "seq": {
  19897. "type": "number"
  19898. },
  19899. "aggregateID": {
  19900. "type": "string",
  19901. "enum": ["sessionID"]
  19902. },
  19903. "data": {
  19904. "type": "object",
  19905. "properties": {
  19906. "timestamp": {
  19907. "type": "number"
  19908. },
  19909. "sessionID": {
  19910. "type": "string",
  19911. "pattern": "^ses"
  19912. }
  19913. },
  19914. "required": ["timestamp", "sessionID"],
  19915. "additionalProperties": false
  19916. }
  19917. },
  19918. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19919. "additionalProperties": false
  19920. },
  19921. "SyncEventSessionNextTextDelta": {
  19922. "type": "object",
  19923. "properties": {
  19924. "type": {
  19925. "type": "string",
  19926. "enum": ["sync"]
  19927. },
  19928. "name": {
  19929. "type": "string",
  19930. "enum": ["session.next.text.delta.1"]
  19931. },
  19932. "id": {
  19933. "type": "string"
  19934. },
  19935. "seq": {
  19936. "type": "number"
  19937. },
  19938. "aggregateID": {
  19939. "type": "string",
  19940. "enum": ["sessionID"]
  19941. },
  19942. "data": {
  19943. "type": "object",
  19944. "properties": {
  19945. "timestamp": {
  19946. "type": "number"
  19947. },
  19948. "sessionID": {
  19949. "type": "string",
  19950. "pattern": "^ses"
  19951. },
  19952. "delta": {
  19953. "type": "string"
  19954. }
  19955. },
  19956. "required": ["timestamp", "sessionID", "delta"],
  19957. "additionalProperties": false
  19958. }
  19959. },
  19960. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19961. "additionalProperties": false
  19962. },
  19963. "SyncEventSessionNextTextEnded": {
  19964. "type": "object",
  19965. "properties": {
  19966. "type": {
  19967. "type": "string",
  19968. "enum": ["sync"]
  19969. },
  19970. "name": {
  19971. "type": "string",
  19972. "enum": ["session.next.text.ended.1"]
  19973. },
  19974. "id": {
  19975. "type": "string"
  19976. },
  19977. "seq": {
  19978. "type": "number"
  19979. },
  19980. "aggregateID": {
  19981. "type": "string",
  19982. "enum": ["sessionID"]
  19983. },
  19984. "data": {
  19985. "type": "object",
  19986. "properties": {
  19987. "timestamp": {
  19988. "type": "number"
  19989. },
  19990. "sessionID": {
  19991. "type": "string",
  19992. "pattern": "^ses"
  19993. },
  19994. "text": {
  19995. "type": "string"
  19996. }
  19997. },
  19998. "required": ["timestamp", "sessionID", "text"],
  19999. "additionalProperties": false
  20000. }
  20001. },
  20002. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20003. "additionalProperties": false
  20004. },
  20005. "SyncEventSessionNextReasoningStarted": {
  20006. "type": "object",
  20007. "properties": {
  20008. "type": {
  20009. "type": "string",
  20010. "enum": ["sync"]
  20011. },
  20012. "name": {
  20013. "type": "string",
  20014. "enum": ["session.next.reasoning.started.1"]
  20015. },
  20016. "id": {
  20017. "type": "string"
  20018. },
  20019. "seq": {
  20020. "type": "number"
  20021. },
  20022. "aggregateID": {
  20023. "type": "string",
  20024. "enum": ["sessionID"]
  20025. },
  20026. "data": {
  20027. "type": "object",
  20028. "properties": {
  20029. "timestamp": {
  20030. "type": "number"
  20031. },
  20032. "sessionID": {
  20033. "type": "string",
  20034. "pattern": "^ses"
  20035. },
  20036. "reasoningID": {
  20037. "type": "string"
  20038. }
  20039. },
  20040. "required": ["timestamp", "sessionID", "reasoningID"],
  20041. "additionalProperties": false
  20042. }
  20043. },
  20044. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20045. "additionalProperties": false
  20046. },
  20047. "SyncEventSessionNextReasoningDelta": {
  20048. "type": "object",
  20049. "properties": {
  20050. "type": {
  20051. "type": "string",
  20052. "enum": ["sync"]
  20053. },
  20054. "name": {
  20055. "type": "string",
  20056. "enum": ["session.next.reasoning.delta.1"]
  20057. },
  20058. "id": {
  20059. "type": "string"
  20060. },
  20061. "seq": {
  20062. "type": "number"
  20063. },
  20064. "aggregateID": {
  20065. "type": "string",
  20066. "enum": ["sessionID"]
  20067. },
  20068. "data": {
  20069. "type": "object",
  20070. "properties": {
  20071. "timestamp": {
  20072. "type": "number"
  20073. },
  20074. "sessionID": {
  20075. "type": "string",
  20076. "pattern": "^ses"
  20077. },
  20078. "reasoningID": {
  20079. "type": "string"
  20080. },
  20081. "delta": {
  20082. "type": "string"
  20083. }
  20084. },
  20085. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  20086. "additionalProperties": false
  20087. }
  20088. },
  20089. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20090. "additionalProperties": false
  20091. },
  20092. "SyncEventSessionNextReasoningEnded": {
  20093. "type": "object",
  20094. "properties": {
  20095. "type": {
  20096. "type": "string",
  20097. "enum": ["sync"]
  20098. },
  20099. "name": {
  20100. "type": "string",
  20101. "enum": ["session.next.reasoning.ended.1"]
  20102. },
  20103. "id": {
  20104. "type": "string"
  20105. },
  20106. "seq": {
  20107. "type": "number"
  20108. },
  20109. "aggregateID": {
  20110. "type": "string",
  20111. "enum": ["sessionID"]
  20112. },
  20113. "data": {
  20114. "type": "object",
  20115. "properties": {
  20116. "timestamp": {
  20117. "type": "number"
  20118. },
  20119. "sessionID": {
  20120. "type": "string",
  20121. "pattern": "^ses"
  20122. },
  20123. "reasoningID": {
  20124. "type": "string"
  20125. },
  20126. "text": {
  20127. "type": "string"
  20128. }
  20129. },
  20130. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  20131. "additionalProperties": false
  20132. }
  20133. },
  20134. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20135. "additionalProperties": false
  20136. },
  20137. "SyncEventSessionNextToolInputStarted": {
  20138. "type": "object",
  20139. "properties": {
  20140. "type": {
  20141. "type": "string",
  20142. "enum": ["sync"]
  20143. },
  20144. "name": {
  20145. "type": "string",
  20146. "enum": ["session.next.tool.input.started.1"]
  20147. },
  20148. "id": {
  20149. "type": "string"
  20150. },
  20151. "seq": {
  20152. "type": "number"
  20153. },
  20154. "aggregateID": {
  20155. "type": "string",
  20156. "enum": ["sessionID"]
  20157. },
  20158. "data": {
  20159. "type": "object",
  20160. "properties": {
  20161. "timestamp": {
  20162. "type": "number"
  20163. },
  20164. "sessionID": {
  20165. "type": "string",
  20166. "pattern": "^ses"
  20167. },
  20168. "callID": {
  20169. "type": "string"
  20170. },
  20171. "name": {
  20172. "type": "string"
  20173. }
  20174. },
  20175. "required": ["timestamp", "sessionID", "callID", "name"],
  20176. "additionalProperties": false
  20177. }
  20178. },
  20179. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20180. "additionalProperties": false
  20181. },
  20182. "SyncEventSessionNextToolInputDelta": {
  20183. "type": "object",
  20184. "properties": {
  20185. "type": {
  20186. "type": "string",
  20187. "enum": ["sync"]
  20188. },
  20189. "name": {
  20190. "type": "string",
  20191. "enum": ["session.next.tool.input.delta.1"]
  20192. },
  20193. "id": {
  20194. "type": "string"
  20195. },
  20196. "seq": {
  20197. "type": "number"
  20198. },
  20199. "aggregateID": {
  20200. "type": "string",
  20201. "enum": ["sessionID"]
  20202. },
  20203. "data": {
  20204. "type": "object",
  20205. "properties": {
  20206. "timestamp": {
  20207. "type": "number"
  20208. },
  20209. "sessionID": {
  20210. "type": "string",
  20211. "pattern": "^ses"
  20212. },
  20213. "callID": {
  20214. "type": "string"
  20215. },
  20216. "delta": {
  20217. "type": "string"
  20218. }
  20219. },
  20220. "required": ["timestamp", "sessionID", "callID", "delta"],
  20221. "additionalProperties": false
  20222. }
  20223. },
  20224. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20225. "additionalProperties": false
  20226. },
  20227. "SyncEventSessionNextToolInputEnded": {
  20228. "type": "object",
  20229. "properties": {
  20230. "type": {
  20231. "type": "string",
  20232. "enum": ["sync"]
  20233. },
  20234. "name": {
  20235. "type": "string",
  20236. "enum": ["session.next.tool.input.ended.1"]
  20237. },
  20238. "id": {
  20239. "type": "string"
  20240. },
  20241. "seq": {
  20242. "type": "number"
  20243. },
  20244. "aggregateID": {
  20245. "type": "string",
  20246. "enum": ["sessionID"]
  20247. },
  20248. "data": {
  20249. "type": "object",
  20250. "properties": {
  20251. "timestamp": {
  20252. "type": "number"
  20253. },
  20254. "sessionID": {
  20255. "type": "string",
  20256. "pattern": "^ses"
  20257. },
  20258. "callID": {
  20259. "type": "string"
  20260. },
  20261. "text": {
  20262. "type": "string"
  20263. }
  20264. },
  20265. "required": ["timestamp", "sessionID", "callID", "text"],
  20266. "additionalProperties": false
  20267. }
  20268. },
  20269. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20270. "additionalProperties": false
  20271. },
  20272. "SyncEventSessionNextToolCalled": {
  20273. "type": "object",
  20274. "properties": {
  20275. "type": {
  20276. "type": "string",
  20277. "enum": ["sync"]
  20278. },
  20279. "name": {
  20280. "type": "string",
  20281. "enum": ["session.next.tool.called.1"]
  20282. },
  20283. "id": {
  20284. "type": "string"
  20285. },
  20286. "seq": {
  20287. "type": "number"
  20288. },
  20289. "aggregateID": {
  20290. "type": "string",
  20291. "enum": ["sessionID"]
  20292. },
  20293. "data": {
  20294. "type": "object",
  20295. "properties": {
  20296. "timestamp": {
  20297. "type": "number"
  20298. },
  20299. "sessionID": {
  20300. "type": "string",
  20301. "pattern": "^ses"
  20302. },
  20303. "callID": {
  20304. "type": "string"
  20305. },
  20306. "tool": {
  20307. "type": "string"
  20308. },
  20309. "input": {
  20310. "type": "object"
  20311. },
  20312. "provider": {
  20313. "type": "object",
  20314. "properties": {
  20315. "executed": {
  20316. "type": "boolean"
  20317. },
  20318. "metadata": {
  20319. "type": "object"
  20320. }
  20321. },
  20322. "required": ["executed"],
  20323. "additionalProperties": false
  20324. }
  20325. },
  20326. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  20327. "additionalProperties": false
  20328. }
  20329. },
  20330. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20331. "additionalProperties": false
  20332. },
  20333. "SyncEventSessionNextToolProgress": {
  20334. "type": "object",
  20335. "properties": {
  20336. "type": {
  20337. "type": "string",
  20338. "enum": ["sync"]
  20339. },
  20340. "name": {
  20341. "type": "string",
  20342. "enum": ["session.next.tool.progress.1"]
  20343. },
  20344. "id": {
  20345. "type": "string"
  20346. },
  20347. "seq": {
  20348. "type": "number"
  20349. },
  20350. "aggregateID": {
  20351. "type": "string",
  20352. "enum": ["sessionID"]
  20353. },
  20354. "data": {
  20355. "type": "object",
  20356. "properties": {
  20357. "timestamp": {
  20358. "type": "number"
  20359. },
  20360. "sessionID": {
  20361. "type": "string",
  20362. "pattern": "^ses"
  20363. },
  20364. "callID": {
  20365. "type": "string"
  20366. },
  20367. "structured": {
  20368. "type": "object"
  20369. },
  20370. "content": {
  20371. "type": "array",
  20372. "items": {
  20373. "anyOf": [
  20374. {
  20375. "$ref": "#/components/schemas/ToolTextContent"
  20376. },
  20377. {
  20378. "$ref": "#/components/schemas/ToolFileContent"
  20379. }
  20380. ]
  20381. }
  20382. }
  20383. },
  20384. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  20385. "additionalProperties": false
  20386. }
  20387. },
  20388. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20389. "additionalProperties": false
  20390. },
  20391. "SyncEventSessionNextToolSuccess": {
  20392. "type": "object",
  20393. "properties": {
  20394. "type": {
  20395. "type": "string",
  20396. "enum": ["sync"]
  20397. },
  20398. "name": {
  20399. "type": "string",
  20400. "enum": ["session.next.tool.success.1"]
  20401. },
  20402. "id": {
  20403. "type": "string"
  20404. },
  20405. "seq": {
  20406. "type": "number"
  20407. },
  20408. "aggregateID": {
  20409. "type": "string",
  20410. "enum": ["sessionID"]
  20411. },
  20412. "data": {
  20413. "type": "object",
  20414. "properties": {
  20415. "timestamp": {
  20416. "type": "number"
  20417. },
  20418. "sessionID": {
  20419. "type": "string",
  20420. "pattern": "^ses"
  20421. },
  20422. "callID": {
  20423. "type": "string"
  20424. },
  20425. "structured": {
  20426. "type": "object"
  20427. },
  20428. "content": {
  20429. "type": "array",
  20430. "items": {
  20431. "anyOf": [
  20432. {
  20433. "$ref": "#/components/schemas/ToolTextContent"
  20434. },
  20435. {
  20436. "$ref": "#/components/schemas/ToolFileContent"
  20437. }
  20438. ]
  20439. }
  20440. },
  20441. "provider": {
  20442. "type": "object",
  20443. "properties": {
  20444. "executed": {
  20445. "type": "boolean"
  20446. },
  20447. "metadata": {
  20448. "type": "object"
  20449. }
  20450. },
  20451. "required": ["executed"],
  20452. "additionalProperties": false
  20453. }
  20454. },
  20455. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  20456. "additionalProperties": false
  20457. }
  20458. },
  20459. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20460. "additionalProperties": false
  20461. },
  20462. "SyncEventSessionNextToolFailed": {
  20463. "type": "object",
  20464. "properties": {
  20465. "type": {
  20466. "type": "string",
  20467. "enum": ["sync"]
  20468. },
  20469. "name": {
  20470. "type": "string",
  20471. "enum": ["session.next.tool.failed.1"]
  20472. },
  20473. "id": {
  20474. "type": "string"
  20475. },
  20476. "seq": {
  20477. "type": "number"
  20478. },
  20479. "aggregateID": {
  20480. "type": "string",
  20481. "enum": ["sessionID"]
  20482. },
  20483. "data": {
  20484. "type": "object",
  20485. "properties": {
  20486. "timestamp": {
  20487. "type": "number"
  20488. },
  20489. "sessionID": {
  20490. "type": "string",
  20491. "pattern": "^ses"
  20492. },
  20493. "callID": {
  20494. "type": "string"
  20495. },
  20496. "error": {
  20497. "$ref": "#/components/schemas/SessionErrorUnknown"
  20498. },
  20499. "provider": {
  20500. "type": "object",
  20501. "properties": {
  20502. "executed": {
  20503. "type": "boolean"
  20504. },
  20505. "metadata": {
  20506. "type": "object"
  20507. }
  20508. },
  20509. "required": ["executed"],
  20510. "additionalProperties": false
  20511. }
  20512. },
  20513. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  20514. "additionalProperties": false
  20515. }
  20516. },
  20517. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20518. "additionalProperties": false
  20519. },
  20520. "SyncEventSessionNextRetried": {
  20521. "type": "object",
  20522. "properties": {
  20523. "type": {
  20524. "type": "string",
  20525. "enum": ["sync"]
  20526. },
  20527. "name": {
  20528. "type": "string",
  20529. "enum": ["session.next.retried.1"]
  20530. },
  20531. "id": {
  20532. "type": "string"
  20533. },
  20534. "seq": {
  20535. "type": "number"
  20536. },
  20537. "aggregateID": {
  20538. "type": "string",
  20539. "enum": ["sessionID"]
  20540. },
  20541. "data": {
  20542. "type": "object",
  20543. "properties": {
  20544. "timestamp": {
  20545. "type": "number"
  20546. },
  20547. "sessionID": {
  20548. "type": "string",
  20549. "pattern": "^ses"
  20550. },
  20551. "attempt": {
  20552. "type": "number"
  20553. },
  20554. "error": {
  20555. "$ref": "#/components/schemas/SessionNextRetry_error"
  20556. }
  20557. },
  20558. "required": ["timestamp", "sessionID", "attempt", "error"],
  20559. "additionalProperties": false
  20560. }
  20561. },
  20562. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20563. "additionalProperties": false
  20564. },
  20565. "SyncEventSessionNextCompactionStarted": {
  20566. "type": "object",
  20567. "properties": {
  20568. "type": {
  20569. "type": "string",
  20570. "enum": ["sync"]
  20571. },
  20572. "name": {
  20573. "type": "string",
  20574. "enum": ["session.next.compaction.started.1"]
  20575. },
  20576. "id": {
  20577. "type": "string"
  20578. },
  20579. "seq": {
  20580. "type": "number"
  20581. },
  20582. "aggregateID": {
  20583. "type": "string",
  20584. "enum": ["sessionID"]
  20585. },
  20586. "data": {
  20587. "type": "object",
  20588. "properties": {
  20589. "timestamp": {
  20590. "type": "number"
  20591. },
  20592. "sessionID": {
  20593. "type": "string",
  20594. "pattern": "^ses"
  20595. },
  20596. "reason": {
  20597. "type": "string",
  20598. "enum": ["auto", "manual"]
  20599. }
  20600. },
  20601. "required": ["timestamp", "sessionID", "reason"],
  20602. "additionalProperties": false
  20603. }
  20604. },
  20605. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20606. "additionalProperties": false
  20607. },
  20608. "SyncEventSessionNextCompactionDelta": {
  20609. "type": "object",
  20610. "properties": {
  20611. "type": {
  20612. "type": "string",
  20613. "enum": ["sync"]
  20614. },
  20615. "name": {
  20616. "type": "string",
  20617. "enum": ["session.next.compaction.delta.1"]
  20618. },
  20619. "id": {
  20620. "type": "string"
  20621. },
  20622. "seq": {
  20623. "type": "number"
  20624. },
  20625. "aggregateID": {
  20626. "type": "string",
  20627. "enum": ["sessionID"]
  20628. },
  20629. "data": {
  20630. "type": "object",
  20631. "properties": {
  20632. "timestamp": {
  20633. "type": "number"
  20634. },
  20635. "sessionID": {
  20636. "type": "string",
  20637. "pattern": "^ses"
  20638. },
  20639. "text": {
  20640. "type": "string"
  20641. }
  20642. },
  20643. "required": ["timestamp", "sessionID", "text"],
  20644. "additionalProperties": false
  20645. }
  20646. },
  20647. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20648. "additionalProperties": false
  20649. },
  20650. "SyncEventSessionNextCompactionEnded": {
  20651. "type": "object",
  20652. "properties": {
  20653. "type": {
  20654. "type": "string",
  20655. "enum": ["sync"]
  20656. },
  20657. "name": {
  20658. "type": "string",
  20659. "enum": ["session.next.compaction.ended.1"]
  20660. },
  20661. "id": {
  20662. "type": "string"
  20663. },
  20664. "seq": {
  20665. "type": "number"
  20666. },
  20667. "aggregateID": {
  20668. "type": "string",
  20669. "enum": ["sessionID"]
  20670. },
  20671. "data": {
  20672. "type": "object",
  20673. "properties": {
  20674. "timestamp": {
  20675. "type": "number"
  20676. },
  20677. "sessionID": {
  20678. "type": "string",
  20679. "pattern": "^ses"
  20680. },
  20681. "text": {
  20682. "type": "string"
  20683. },
  20684. "include": {
  20685. "type": "string"
  20686. }
  20687. },
  20688. "required": ["timestamp", "sessionID", "text"],
  20689. "additionalProperties": false
  20690. }
  20691. },
  20692. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20693. "additionalProperties": false
  20694. },
  20695. "SyncEventSessionCreated": {
  20696. "type": "object",
  20697. "properties": {
  20698. "type": {
  20699. "type": "string",
  20700. "enum": ["sync"]
  20701. },
  20702. "name": {
  20703. "type": "string",
  20704. "enum": ["session.created.1"]
  20705. },
  20706. "id": {
  20707. "type": "string"
  20708. },
  20709. "seq": {
  20710. "type": "number"
  20711. },
  20712. "aggregateID": {
  20713. "type": "string",
  20714. "enum": ["sessionID"]
  20715. },
  20716. "data": {
  20717. "type": "object",
  20718. "properties": {
  20719. "sessionID": {
  20720. "type": "string",
  20721. "pattern": "^ses"
  20722. },
  20723. "info": {
  20724. "$ref": "#/components/schemas/Session"
  20725. }
  20726. },
  20727. "required": ["sessionID", "info"],
  20728. "additionalProperties": false
  20729. }
  20730. },
  20731. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20732. "additionalProperties": false
  20733. },
  20734. "SyncEventSessionUpdated": {
  20735. "type": "object",
  20736. "properties": {
  20737. "type": {
  20738. "type": "string",
  20739. "enum": ["sync"]
  20740. },
  20741. "name": {
  20742. "type": "string",
  20743. "enum": ["session.updated.1"]
  20744. },
  20745. "id": {
  20746. "type": "string"
  20747. },
  20748. "seq": {
  20749. "type": "number"
  20750. },
  20751. "aggregateID": {
  20752. "type": "string",
  20753. "enum": ["sessionID"]
  20754. },
  20755. "data": {
  20756. "type": "object",
  20757. "properties": {
  20758. "sessionID": {
  20759. "type": "string",
  20760. "pattern": "^ses"
  20761. },
  20762. "info": {
  20763. "$ref": "#/components/schemas/Session"
  20764. }
  20765. },
  20766. "required": ["sessionID", "info"],
  20767. "additionalProperties": false
  20768. }
  20769. },
  20770. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20771. "additionalProperties": false
  20772. },
  20773. "SyncEventSessionDeleted": {
  20774. "type": "object",
  20775. "properties": {
  20776. "type": {
  20777. "type": "string",
  20778. "enum": ["sync"]
  20779. },
  20780. "name": {
  20781. "type": "string",
  20782. "enum": ["session.deleted.1"]
  20783. },
  20784. "id": {
  20785. "type": "string"
  20786. },
  20787. "seq": {
  20788. "type": "number"
  20789. },
  20790. "aggregateID": {
  20791. "type": "string",
  20792. "enum": ["sessionID"]
  20793. },
  20794. "data": {
  20795. "type": "object",
  20796. "properties": {
  20797. "sessionID": {
  20798. "type": "string",
  20799. "pattern": "^ses"
  20800. },
  20801. "info": {
  20802. "$ref": "#/components/schemas/Session"
  20803. }
  20804. },
  20805. "required": ["sessionID", "info"],
  20806. "additionalProperties": false
  20807. }
  20808. },
  20809. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20810. "additionalProperties": false
  20811. },
  20812. "SyncEventMessageUpdated": {
  20813. "type": "object",
  20814. "properties": {
  20815. "type": {
  20816. "type": "string",
  20817. "enum": ["sync"]
  20818. },
  20819. "name": {
  20820. "type": "string",
  20821. "enum": ["message.updated.1"]
  20822. },
  20823. "id": {
  20824. "type": "string"
  20825. },
  20826. "seq": {
  20827. "type": "number"
  20828. },
  20829. "aggregateID": {
  20830. "type": "string",
  20831. "enum": ["sessionID"]
  20832. },
  20833. "data": {
  20834. "type": "object",
  20835. "properties": {
  20836. "sessionID": {
  20837. "type": "string",
  20838. "pattern": "^ses"
  20839. },
  20840. "info": {
  20841. "$ref": "#/components/schemas/Message"
  20842. }
  20843. },
  20844. "required": ["sessionID", "info"],
  20845. "additionalProperties": false
  20846. }
  20847. },
  20848. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20849. "additionalProperties": false
  20850. },
  20851. "SyncEventMessageRemoved": {
  20852. "type": "object",
  20853. "properties": {
  20854. "type": {
  20855. "type": "string",
  20856. "enum": ["sync"]
  20857. },
  20858. "name": {
  20859. "type": "string",
  20860. "enum": ["message.removed.1"]
  20861. },
  20862. "id": {
  20863. "type": "string"
  20864. },
  20865. "seq": {
  20866. "type": "number"
  20867. },
  20868. "aggregateID": {
  20869. "type": "string",
  20870. "enum": ["sessionID"]
  20871. },
  20872. "data": {
  20873. "type": "object",
  20874. "properties": {
  20875. "sessionID": {
  20876. "type": "string",
  20877. "pattern": "^ses"
  20878. },
  20879. "messageID": {
  20880. "type": "string",
  20881. "pattern": "^msg"
  20882. }
  20883. },
  20884. "required": ["sessionID", "messageID"],
  20885. "additionalProperties": false
  20886. }
  20887. },
  20888. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20889. "additionalProperties": false
  20890. },
  20891. "SyncEventMessagePartUpdated": {
  20892. "type": "object",
  20893. "properties": {
  20894. "type": {
  20895. "type": "string",
  20896. "enum": ["sync"]
  20897. },
  20898. "name": {
  20899. "type": "string",
  20900. "enum": ["message.part.updated.1"]
  20901. },
  20902. "id": {
  20903. "type": "string"
  20904. },
  20905. "seq": {
  20906. "type": "number"
  20907. },
  20908. "aggregateID": {
  20909. "type": "string",
  20910. "enum": ["sessionID"]
  20911. },
  20912. "data": {
  20913. "type": "object",
  20914. "properties": {
  20915. "sessionID": {
  20916. "type": "string",
  20917. "pattern": "^ses"
  20918. },
  20919. "part": {
  20920. "$ref": "#/components/schemas/Part"
  20921. },
  20922. "time": {
  20923. "type": "number"
  20924. }
  20925. },
  20926. "required": ["sessionID", "part", "time"],
  20927. "additionalProperties": false
  20928. }
  20929. },
  20930. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20931. "additionalProperties": false
  20932. },
  20933. "SyncEventMessagePartRemoved": {
  20934. "type": "object",
  20935. "properties": {
  20936. "type": {
  20937. "type": "string",
  20938. "enum": ["sync"]
  20939. },
  20940. "name": {
  20941. "type": "string",
  20942. "enum": ["message.part.removed.1"]
  20943. },
  20944. "id": {
  20945. "type": "string"
  20946. },
  20947. "seq": {
  20948. "type": "number"
  20949. },
  20950. "aggregateID": {
  20951. "type": "string",
  20952. "enum": ["sessionID"]
  20953. },
  20954. "data": {
  20955. "type": "object",
  20956. "properties": {
  20957. "sessionID": {
  20958. "type": "string",
  20959. "pattern": "^ses"
  20960. },
  20961. "messageID": {
  20962. "type": "string",
  20963. "pattern": "^msg"
  20964. },
  20965. "partID": {
  20966. "type": "string",
  20967. "pattern": "^prt"
  20968. }
  20969. },
  20970. "required": ["sessionID", "messageID", "partID"],
  20971. "additionalProperties": false
  20972. }
  20973. },
  20974. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20975. "additionalProperties": false
  20976. },
  20977. "PolicyEffect": {
  20978. "type": "string",
  20979. "enum": ["allow", "deny"]
  20980. },
  20981. "ConfigV2ExperimentalPolicy": {
  20982. "type": "object",
  20983. "properties": {
  20984. "action": {
  20985. "type": "string",
  20986. "enum": ["provider.use"]
  20987. },
  20988. "effect": {
  20989. "$ref": "#/components/schemas/PolicyEffect"
  20990. },
  20991. "resource": {
  20992. "type": "string"
  20993. }
  20994. },
  20995. "required": ["action", "effect", "resource"],
  20996. "additionalProperties": false
  20997. },
  20998. "SessionInfo": {
  20999. "type": "object",
  21000. "properties": {
  21001. "id": {
  21002. "type": "string",
  21003. "pattern": "^ses"
  21004. },
  21005. "parentID": {
  21006. "type": "string",
  21007. "pattern": "^ses"
  21008. },
  21009. "projectID": {
  21010. "type": "string"
  21011. },
  21012. "workspaceID": {
  21013. "type": "string",
  21014. "pattern": "^wrk"
  21015. },
  21016. "path": {
  21017. "type": "string"
  21018. },
  21019. "agent": {
  21020. "type": "string"
  21021. },
  21022. "model": {
  21023. "type": "object",
  21024. "properties": {
  21025. "id": {
  21026. "type": "string"
  21027. },
  21028. "providerID": {
  21029. "type": "string"
  21030. },
  21031. "variant": {
  21032. "type": "string"
  21033. }
  21034. },
  21035. "required": ["id", "providerID"],
  21036. "additionalProperties": false
  21037. },
  21038. "cost": {
  21039. "type": "number"
  21040. },
  21041. "tokens": {
  21042. "type": "object",
  21043. "properties": {
  21044. "input": {
  21045. "type": "number"
  21046. },
  21047. "output": {
  21048. "type": "number"
  21049. },
  21050. "reasoning": {
  21051. "type": "number"
  21052. },
  21053. "cache": {
  21054. "type": "object",
  21055. "properties": {
  21056. "read": {
  21057. "type": "number"
  21058. },
  21059. "write": {
  21060. "type": "number"
  21061. }
  21062. },
  21063. "required": ["read", "write"],
  21064. "additionalProperties": false
  21065. }
  21066. },
  21067. "required": ["input", "output", "reasoning", "cache"],
  21068. "additionalProperties": false
  21069. },
  21070. "time": {
  21071. "type": "object",
  21072. "properties": {
  21073. "created": {
  21074. "type": "number"
  21075. },
  21076. "updated": {
  21077. "type": "number"
  21078. },
  21079. "archived": {
  21080. "type": "number"
  21081. }
  21082. },
  21083. "required": ["created", "updated"],
  21084. "additionalProperties": false
  21085. },
  21086. "title": {
  21087. "type": "string"
  21088. }
  21089. },
  21090. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  21091. "additionalProperties": false
  21092. },
  21093. "SessionDelivery": {
  21094. "type": "string",
  21095. "enum": ["immediate", "deferred"]
  21096. },
  21097. "SessionMessageAgentSwitched": {
  21098. "type": "object",
  21099. "properties": {
  21100. "id": {
  21101. "type": "string"
  21102. },
  21103. "metadata": {
  21104. "type": "object"
  21105. },
  21106. "time": {
  21107. "type": "object",
  21108. "properties": {
  21109. "created": {
  21110. "type": "number"
  21111. }
  21112. },
  21113. "required": ["created"],
  21114. "additionalProperties": false
  21115. },
  21116. "type": {
  21117. "type": "string",
  21118. "enum": ["agent-switched"]
  21119. },
  21120. "agent": {
  21121. "type": "string"
  21122. }
  21123. },
  21124. "required": ["id", "time", "type", "agent"],
  21125. "additionalProperties": false
  21126. },
  21127. "SessionMessageModelSwitched": {
  21128. "type": "object",
  21129. "properties": {
  21130. "id": {
  21131. "type": "string"
  21132. },
  21133. "metadata": {
  21134. "type": "object"
  21135. },
  21136. "time": {
  21137. "type": "object",
  21138. "properties": {
  21139. "created": {
  21140. "type": "number"
  21141. }
  21142. },
  21143. "required": ["created"],
  21144. "additionalProperties": false
  21145. },
  21146. "type": {
  21147. "type": "string",
  21148. "enum": ["model-switched"]
  21149. },
  21150. "model": {
  21151. "type": "object",
  21152. "properties": {
  21153. "id": {
  21154. "type": "string"
  21155. },
  21156. "providerID": {
  21157. "type": "string"
  21158. },
  21159. "variant": {
  21160. "type": "string"
  21161. }
  21162. },
  21163. "required": ["id", "providerID"],
  21164. "additionalProperties": false
  21165. }
  21166. },
  21167. "required": ["id", "time", "type", "model"],
  21168. "additionalProperties": false
  21169. },
  21170. "SessionMessageUser": {
  21171. "type": "object",
  21172. "properties": {
  21173. "id": {
  21174. "type": "string"
  21175. },
  21176. "metadata": {
  21177. "type": "object"
  21178. },
  21179. "time": {
  21180. "type": "object",
  21181. "properties": {
  21182. "created": {
  21183. "type": "number"
  21184. }
  21185. },
  21186. "required": ["created"],
  21187. "additionalProperties": false
  21188. },
  21189. "text": {
  21190. "type": "string"
  21191. },
  21192. "files": {
  21193. "type": "array",
  21194. "items": {
  21195. "$ref": "#/components/schemas/PromptFileAttachment"
  21196. }
  21197. },
  21198. "agents": {
  21199. "type": "array",
  21200. "items": {
  21201. "$ref": "#/components/schemas/PromptAgentAttachment"
  21202. }
  21203. },
  21204. "references": {
  21205. "type": "array",
  21206. "items": {
  21207. "$ref": "#/components/schemas/PromptReferenceAttachment"
  21208. }
  21209. },
  21210. "type": {
  21211. "type": "string",
  21212. "enum": ["user"]
  21213. }
  21214. },
  21215. "required": ["id", "time", "text", "type"],
  21216. "additionalProperties": false
  21217. },
  21218. "SessionMessageSynthetic": {
  21219. "type": "object",
  21220. "properties": {
  21221. "id": {
  21222. "type": "string"
  21223. },
  21224. "metadata": {
  21225. "type": "object"
  21226. },
  21227. "time": {
  21228. "type": "object",
  21229. "properties": {
  21230. "created": {
  21231. "type": "number"
  21232. }
  21233. },
  21234. "required": ["created"],
  21235. "additionalProperties": false
  21236. },
  21237. "sessionID": {
  21238. "type": "string",
  21239. "pattern": "^ses"
  21240. },
  21241. "text": {
  21242. "type": "string"
  21243. },
  21244. "type": {
  21245. "type": "string",
  21246. "enum": ["synthetic"]
  21247. }
  21248. },
  21249. "required": ["id", "time", "sessionID", "text", "type"],
  21250. "additionalProperties": false
  21251. },
  21252. "SessionMessageShell": {
  21253. "type": "object",
  21254. "properties": {
  21255. "id": {
  21256. "type": "string"
  21257. },
  21258. "metadata": {
  21259. "type": "object"
  21260. },
  21261. "time": {
  21262. "type": "object",
  21263. "properties": {
  21264. "created": {
  21265. "type": "number"
  21266. },
  21267. "completed": {
  21268. "type": "number"
  21269. }
  21270. },
  21271. "required": ["created"],
  21272. "additionalProperties": false
  21273. },
  21274. "type": {
  21275. "type": "string",
  21276. "enum": ["shell"]
  21277. },
  21278. "callID": {
  21279. "type": "string"
  21280. },
  21281. "command": {
  21282. "type": "string"
  21283. },
  21284. "output": {
  21285. "type": "string"
  21286. }
  21287. },
  21288. "required": ["id", "time", "type", "callID", "command", "output"],
  21289. "additionalProperties": false
  21290. },
  21291. "SessionMessageAssistantText": {
  21292. "type": "object",
  21293. "properties": {
  21294. "type": {
  21295. "type": "string",
  21296. "enum": ["text"]
  21297. },
  21298. "text": {
  21299. "type": "string"
  21300. }
  21301. },
  21302. "required": ["type", "text"],
  21303. "additionalProperties": false
  21304. },
  21305. "SessionMessageAssistantReasoning": {
  21306. "type": "object",
  21307. "properties": {
  21308. "type": {
  21309. "type": "string",
  21310. "enum": ["reasoning"]
  21311. },
  21312. "id": {
  21313. "type": "string"
  21314. },
  21315. "text": {
  21316. "type": "string"
  21317. }
  21318. },
  21319. "required": ["type", "id", "text"],
  21320. "additionalProperties": false
  21321. },
  21322. "SessionMessageToolStatePending": {
  21323. "type": "object",
  21324. "properties": {
  21325. "status": {
  21326. "type": "string",
  21327. "enum": ["pending"]
  21328. },
  21329. "input": {
  21330. "type": "string"
  21331. }
  21332. },
  21333. "required": ["status", "input"],
  21334. "additionalProperties": false
  21335. },
  21336. "SessionMessageToolStateRunning": {
  21337. "type": "object",
  21338. "properties": {
  21339. "status": {
  21340. "type": "string",
  21341. "enum": ["running"]
  21342. },
  21343. "input": {
  21344. "type": "object"
  21345. },
  21346. "structured": {
  21347. "type": "object"
  21348. },
  21349. "content": {
  21350. "type": "array",
  21351. "items": {
  21352. "anyOf": [
  21353. {
  21354. "$ref": "#/components/schemas/ToolTextContent"
  21355. },
  21356. {
  21357. "$ref": "#/components/schemas/ToolFileContent"
  21358. }
  21359. ]
  21360. }
  21361. }
  21362. },
  21363. "required": ["status", "input", "structured", "content"],
  21364. "additionalProperties": false
  21365. },
  21366. "SessionMessageToolStateCompleted": {
  21367. "type": "object",
  21368. "properties": {
  21369. "status": {
  21370. "type": "string",
  21371. "enum": ["completed"]
  21372. },
  21373. "input": {
  21374. "type": "object"
  21375. },
  21376. "attachments": {
  21377. "type": "array",
  21378. "items": {
  21379. "$ref": "#/components/schemas/PromptFileAttachment"
  21380. }
  21381. },
  21382. "content": {
  21383. "type": "array",
  21384. "items": {
  21385. "anyOf": [
  21386. {
  21387. "$ref": "#/components/schemas/ToolTextContent"
  21388. },
  21389. {
  21390. "$ref": "#/components/schemas/ToolFileContent"
  21391. }
  21392. ]
  21393. }
  21394. },
  21395. "structured": {
  21396. "type": "object"
  21397. }
  21398. },
  21399. "required": ["status", "input", "content", "structured"],
  21400. "additionalProperties": false
  21401. },
  21402. "SessionMessageToolStateError": {
  21403. "type": "object",
  21404. "properties": {
  21405. "status": {
  21406. "type": "string",
  21407. "enum": ["error"]
  21408. },
  21409. "input": {
  21410. "type": "object"
  21411. },
  21412. "content": {
  21413. "type": "array",
  21414. "items": {
  21415. "anyOf": [
  21416. {
  21417. "$ref": "#/components/schemas/ToolTextContent"
  21418. },
  21419. {
  21420. "$ref": "#/components/schemas/ToolFileContent"
  21421. }
  21422. ]
  21423. }
  21424. },
  21425. "structured": {
  21426. "type": "object"
  21427. },
  21428. "error": {
  21429. "$ref": "#/components/schemas/SessionErrorUnknown"
  21430. }
  21431. },
  21432. "required": ["status", "input", "content", "structured", "error"],
  21433. "additionalProperties": false
  21434. },
  21435. "SessionMessageAssistantTool": {
  21436. "type": "object",
  21437. "properties": {
  21438. "type": {
  21439. "type": "string",
  21440. "enum": ["tool"]
  21441. },
  21442. "id": {
  21443. "type": "string"
  21444. },
  21445. "name": {
  21446. "type": "string"
  21447. },
  21448. "provider": {
  21449. "type": "object",
  21450. "properties": {
  21451. "executed": {
  21452. "type": "boolean"
  21453. },
  21454. "metadata": {
  21455. "type": "object"
  21456. }
  21457. },
  21458. "required": ["executed"],
  21459. "additionalProperties": false
  21460. },
  21461. "state": {
  21462. "anyOf": [
  21463. {
  21464. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21465. },
  21466. {
  21467. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21468. },
  21469. {
  21470. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21471. },
  21472. {
  21473. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21474. }
  21475. ]
  21476. },
  21477. "time": {
  21478. "type": "object",
  21479. "properties": {
  21480. "created": {
  21481. "type": "number"
  21482. },
  21483. "ran": {
  21484. "type": "number"
  21485. },
  21486. "completed": {
  21487. "type": "number"
  21488. },
  21489. "pruned": {
  21490. "type": "number"
  21491. }
  21492. },
  21493. "required": ["created"],
  21494. "additionalProperties": false
  21495. }
  21496. },
  21497. "required": ["type", "id", "name", "state", "time"],
  21498. "additionalProperties": false
  21499. },
  21500. "SessionMessageAssistant": {
  21501. "type": "object",
  21502. "properties": {
  21503. "id": {
  21504. "type": "string"
  21505. },
  21506. "metadata": {
  21507. "type": "object"
  21508. },
  21509. "time": {
  21510. "type": "object",
  21511. "properties": {
  21512. "created": {
  21513. "type": "number"
  21514. },
  21515. "completed": {
  21516. "type": "number"
  21517. }
  21518. },
  21519. "required": ["created"],
  21520. "additionalProperties": false
  21521. },
  21522. "type": {
  21523. "type": "string",
  21524. "enum": ["assistant"]
  21525. },
  21526. "agent": {
  21527. "type": "string"
  21528. },
  21529. "model": {
  21530. "type": "object",
  21531. "properties": {
  21532. "id": {
  21533. "type": "string"
  21534. },
  21535. "providerID": {
  21536. "type": "string"
  21537. },
  21538. "variant": {
  21539. "type": "string"
  21540. }
  21541. },
  21542. "required": ["id", "providerID"],
  21543. "additionalProperties": false
  21544. },
  21545. "content": {
  21546. "type": "array",
  21547. "items": {
  21548. "anyOf": [
  21549. {
  21550. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21551. },
  21552. {
  21553. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21554. },
  21555. {
  21556. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21557. }
  21558. ]
  21559. }
  21560. },
  21561. "snapshot": {
  21562. "type": "object",
  21563. "properties": {
  21564. "start": {
  21565. "type": "string"
  21566. },
  21567. "end": {
  21568. "type": "string"
  21569. }
  21570. },
  21571. "additionalProperties": false
  21572. },
  21573. "finish": {
  21574. "type": "string"
  21575. },
  21576. "cost": {
  21577. "type": "number"
  21578. },
  21579. "tokens": {
  21580. "type": "object",
  21581. "properties": {
  21582. "input": {
  21583. "type": "number"
  21584. },
  21585. "output": {
  21586. "type": "number"
  21587. },
  21588. "reasoning": {
  21589. "type": "number"
  21590. },
  21591. "cache": {
  21592. "type": "object",
  21593. "properties": {
  21594. "read": {
  21595. "type": "number"
  21596. },
  21597. "write": {
  21598. "type": "number"
  21599. }
  21600. },
  21601. "required": ["read", "write"],
  21602. "additionalProperties": false
  21603. }
  21604. },
  21605. "required": ["input", "output", "reasoning", "cache"],
  21606. "additionalProperties": false
  21607. },
  21608. "error": {
  21609. "$ref": "#/components/schemas/SessionErrorUnknown"
  21610. }
  21611. },
  21612. "required": ["id", "time", "type", "agent", "model", "content"],
  21613. "additionalProperties": false
  21614. },
  21615. "SessionMessageCompaction": {
  21616. "type": "object",
  21617. "properties": {
  21618. "type": {
  21619. "type": "string",
  21620. "enum": ["compaction"]
  21621. },
  21622. "reason": {
  21623. "type": "string",
  21624. "enum": ["auto", "manual"]
  21625. },
  21626. "summary": {
  21627. "type": "string"
  21628. },
  21629. "include": {
  21630. "type": "string"
  21631. },
  21632. "id": {
  21633. "type": "string"
  21634. },
  21635. "metadata": {
  21636. "type": "object"
  21637. },
  21638. "time": {
  21639. "type": "object",
  21640. "properties": {
  21641. "created": {
  21642. "type": "number"
  21643. }
  21644. },
  21645. "required": ["created"],
  21646. "additionalProperties": false
  21647. }
  21648. },
  21649. "required": ["type", "reason", "summary", "id", "time"],
  21650. "additionalProperties": false
  21651. },
  21652. "SessionMessage": {
  21653. "anyOf": [
  21654. {
  21655. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21656. },
  21657. {
  21658. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21659. },
  21660. {
  21661. "$ref": "#/components/schemas/SessionMessageUser"
  21662. },
  21663. {
  21664. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21665. },
  21666. {
  21667. "$ref": "#/components/schemas/SessionMessageShell"
  21668. },
  21669. {
  21670. "$ref": "#/components/schemas/SessionMessageAssistant"
  21671. },
  21672. {
  21673. "$ref": "#/components/schemas/SessionMessageCompaction"
  21674. }
  21675. ]
  21676. },
  21677. "ProviderV2Info": {
  21678. "type": "object",
  21679. "properties": {
  21680. "id": {
  21681. "type": "string"
  21682. },
  21683. "name": {
  21684. "type": "string"
  21685. },
  21686. "enabled": {
  21687. "anyOf": [
  21688. {
  21689. "type": "boolean",
  21690. "enum": [false]
  21691. },
  21692. {
  21693. "type": "object",
  21694. "properties": {
  21695. "via": {
  21696. "type": "string",
  21697. "enum": ["env"]
  21698. },
  21699. "name": {
  21700. "type": "string"
  21701. }
  21702. },
  21703. "required": ["via", "name"],
  21704. "additionalProperties": false
  21705. },
  21706. {
  21707. "type": "object",
  21708. "properties": {
  21709. "via": {
  21710. "type": "string",
  21711. "enum": ["account"]
  21712. },
  21713. "service": {
  21714. "type": "string"
  21715. }
  21716. },
  21717. "required": ["via", "service"],
  21718. "additionalProperties": false
  21719. },
  21720. {
  21721. "type": "object",
  21722. "properties": {
  21723. "via": {
  21724. "type": "string",
  21725. "enum": ["custom"]
  21726. },
  21727. "data": {
  21728. "type": "object"
  21729. }
  21730. },
  21731. "required": ["via", "data"],
  21732. "additionalProperties": false
  21733. }
  21734. ]
  21735. },
  21736. "env": {
  21737. "type": "array",
  21738. "items": {
  21739. "type": "string"
  21740. }
  21741. },
  21742. "endpoint": {
  21743. "anyOf": [
  21744. {
  21745. "type": "object",
  21746. "properties": {
  21747. "type": {
  21748. "type": "string",
  21749. "enum": ["unknown"]
  21750. }
  21751. },
  21752. "required": ["type"],
  21753. "additionalProperties": false
  21754. },
  21755. {
  21756. "type": "object",
  21757. "properties": {
  21758. "type": {
  21759. "type": "string",
  21760. "enum": ["openai/responses"]
  21761. },
  21762. "url": {
  21763. "type": "string"
  21764. },
  21765. "websocket": {
  21766. "type": "boolean"
  21767. }
  21768. },
  21769. "required": ["type", "url"],
  21770. "additionalProperties": false
  21771. },
  21772. {
  21773. "type": "object",
  21774. "properties": {
  21775. "type": {
  21776. "type": "string",
  21777. "enum": ["openai/completions"]
  21778. },
  21779. "url": {
  21780. "type": "string"
  21781. },
  21782. "reasoning": {
  21783. "anyOf": [
  21784. {
  21785. "type": "object",
  21786. "properties": {
  21787. "type": {
  21788. "type": "string",
  21789. "enum": ["reasoning_content"]
  21790. }
  21791. },
  21792. "required": ["type"],
  21793. "additionalProperties": false
  21794. },
  21795. {
  21796. "type": "object",
  21797. "properties": {
  21798. "type": {
  21799. "type": "string",
  21800. "enum": ["reasoning_details"]
  21801. }
  21802. },
  21803. "required": ["type"],
  21804. "additionalProperties": false
  21805. }
  21806. ]
  21807. }
  21808. },
  21809. "required": ["type", "url"],
  21810. "additionalProperties": false
  21811. },
  21812. {
  21813. "type": "object",
  21814. "properties": {
  21815. "type": {
  21816. "type": "string",
  21817. "enum": ["anthropic/messages"]
  21818. },
  21819. "url": {
  21820. "type": "string"
  21821. }
  21822. },
  21823. "required": ["type", "url"],
  21824. "additionalProperties": false
  21825. },
  21826. {
  21827. "type": "object",
  21828. "properties": {
  21829. "type": {
  21830. "type": "string",
  21831. "enum": ["aisdk"]
  21832. },
  21833. "package": {
  21834. "type": "string"
  21835. },
  21836. "url": {
  21837. "type": "string"
  21838. }
  21839. },
  21840. "required": ["type", "package"],
  21841. "additionalProperties": false
  21842. }
  21843. ]
  21844. },
  21845. "options": {
  21846. "type": "object",
  21847. "properties": {
  21848. "headers": {
  21849. "type": "object",
  21850. "additionalProperties": {
  21851. "type": "string"
  21852. }
  21853. },
  21854. "body": {
  21855. "type": "object"
  21856. },
  21857. "aisdk": {
  21858. "type": "object",
  21859. "properties": {
  21860. "provider": {
  21861. "type": "object"
  21862. },
  21863. "request": {
  21864. "type": "object"
  21865. }
  21866. },
  21867. "required": ["provider", "request"],
  21868. "additionalProperties": false
  21869. }
  21870. },
  21871. "required": ["headers", "body", "aisdk"],
  21872. "additionalProperties": false
  21873. }
  21874. },
  21875. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21876. "additionalProperties": false
  21877. },
  21878. "PermissionV2Request": {
  21879. "type": "object",
  21880. "properties": {
  21881. "id": {
  21882. "type": "string",
  21883. "pattern": "^per"
  21884. },
  21885. "sessionID": {
  21886. "type": "string",
  21887. "pattern": "^ses"
  21888. },
  21889. "action": {
  21890. "type": "string"
  21891. },
  21892. "resources": {
  21893. "type": "array",
  21894. "items": {
  21895. "type": "string"
  21896. }
  21897. },
  21898. "save": {
  21899. "type": "array",
  21900. "items": {
  21901. "type": "string"
  21902. }
  21903. },
  21904. "metadata": {
  21905. "type": "object"
  21906. },
  21907. "source": {
  21908. "$ref": "#/components/schemas/PermissionV2Source"
  21909. }
  21910. },
  21911. "required": ["id", "sessionID", "action", "resources"],
  21912. "additionalProperties": false
  21913. },
  21914. "PermissionSavedInfo": {
  21915. "type": "object",
  21916. "properties": {
  21917. "id": {
  21918. "type": "string"
  21919. },
  21920. "projectID": {
  21921. "type": "string"
  21922. },
  21923. "action": {
  21924. "type": "string"
  21925. },
  21926. "resource": {
  21927. "type": "string"
  21928. }
  21929. },
  21930. "required": ["id", "projectID", "action", "resource"],
  21931. "additionalProperties": false
  21932. },
  21933. "EventModels-devRefreshed": {
  21934. "type": "object",
  21935. "properties": {
  21936. "id": {
  21937. "type": "string"
  21938. },
  21939. "type": {
  21940. "type": "string",
  21941. "enum": ["models-dev.refreshed"]
  21942. },
  21943. "properties": {
  21944. "type": "object",
  21945. "properties": {}
  21946. }
  21947. },
  21948. "required": ["id", "type", "properties"],
  21949. "additionalProperties": false
  21950. },
  21951. "EventPluginAdded": {
  21952. "type": "object",
  21953. "properties": {
  21954. "id": {
  21955. "type": "string"
  21956. },
  21957. "type": {
  21958. "type": "string",
  21959. "enum": ["plugin.added"]
  21960. },
  21961. "properties": {
  21962. "type": "object",
  21963. "properties": {
  21964. "id": {
  21965. "type": "string"
  21966. }
  21967. },
  21968. "required": ["id"],
  21969. "additionalProperties": false
  21970. }
  21971. },
  21972. "required": ["id", "type", "properties"],
  21973. "additionalProperties": false
  21974. },
  21975. "ModelV2Info1": {
  21976. "type": "object",
  21977. "properties": {
  21978. "id": {
  21979. "type": "string"
  21980. },
  21981. "apiID": {
  21982. "type": "string"
  21983. },
  21984. "providerID": {
  21985. "type": "string"
  21986. },
  21987. "family": {
  21988. "type": "string"
  21989. },
  21990. "name": {
  21991. "type": "string"
  21992. },
  21993. "endpoint": {
  21994. "anyOf": [
  21995. {
  21996. "type": "object",
  21997. "properties": {
  21998. "type": {
  21999. "type": "string",
  22000. "enum": ["unknown"]
  22001. }
  22002. },
  22003. "required": ["type"],
  22004. "additionalProperties": false
  22005. },
  22006. {
  22007. "type": "object",
  22008. "properties": {
  22009. "type": {
  22010. "type": "string",
  22011. "enum": ["openai/responses"]
  22012. },
  22013. "url": {
  22014. "type": "string"
  22015. },
  22016. "websocket": {
  22017. "type": "boolean"
  22018. }
  22019. },
  22020. "required": ["type", "url"],
  22021. "additionalProperties": false
  22022. },
  22023. {
  22024. "type": "object",
  22025. "properties": {
  22026. "type": {
  22027. "type": "string",
  22028. "enum": ["openai/completions"]
  22029. },
  22030. "url": {
  22031. "type": "string"
  22032. },
  22033. "reasoning": {
  22034. "anyOf": [
  22035. {
  22036. "type": "object",
  22037. "properties": {
  22038. "type": {
  22039. "type": "string",
  22040. "enum": ["reasoning_content"]
  22041. }
  22042. },
  22043. "required": ["type"],
  22044. "additionalProperties": false
  22045. },
  22046. {
  22047. "type": "object",
  22048. "properties": {
  22049. "type": {
  22050. "type": "string",
  22051. "enum": ["reasoning_details"]
  22052. }
  22053. },
  22054. "required": ["type"],
  22055. "additionalProperties": false
  22056. }
  22057. ]
  22058. }
  22059. },
  22060. "required": ["type", "url"],
  22061. "additionalProperties": false
  22062. },
  22063. {
  22064. "type": "object",
  22065. "properties": {
  22066. "type": {
  22067. "type": "string",
  22068. "enum": ["anthropic/messages"]
  22069. },
  22070. "url": {
  22071. "type": "string"
  22072. }
  22073. },
  22074. "required": ["type", "url"],
  22075. "additionalProperties": false
  22076. },
  22077. {
  22078. "type": "object",
  22079. "properties": {
  22080. "type": {
  22081. "type": "string",
  22082. "enum": ["aisdk"]
  22083. },
  22084. "package": {
  22085. "type": "string"
  22086. },
  22087. "url": {
  22088. "type": "string"
  22089. }
  22090. },
  22091. "required": ["type", "package"],
  22092. "additionalProperties": false
  22093. }
  22094. ]
  22095. },
  22096. "capabilities": {
  22097. "type": "object",
  22098. "properties": {
  22099. "tools": {
  22100. "type": "boolean"
  22101. },
  22102. "input": {
  22103. "type": "array",
  22104. "items": {
  22105. "type": "string"
  22106. }
  22107. },
  22108. "output": {
  22109. "type": "array",
  22110. "items": {
  22111. "type": "string"
  22112. }
  22113. }
  22114. },
  22115. "required": ["tools", "input", "output"],
  22116. "additionalProperties": false
  22117. },
  22118. "options": {
  22119. "type": "object",
  22120. "properties": {
  22121. "headers": {
  22122. "type": "object",
  22123. "additionalProperties": {
  22124. "type": "string"
  22125. }
  22126. },
  22127. "body": {
  22128. "type": "object"
  22129. },
  22130. "aisdk": {
  22131. "type": "object",
  22132. "properties": {
  22133. "provider": {
  22134. "type": "object"
  22135. },
  22136. "request": {
  22137. "type": "object"
  22138. }
  22139. },
  22140. "required": ["provider", "request"],
  22141. "additionalProperties": false
  22142. },
  22143. "variant": {
  22144. "type": "string"
  22145. }
  22146. },
  22147. "required": ["headers", "body", "aisdk"],
  22148. "additionalProperties": false
  22149. },
  22150. "variants": {
  22151. "type": "array",
  22152. "items": {
  22153. "type": "object",
  22154. "properties": {
  22155. "id": {
  22156. "type": "string"
  22157. },
  22158. "headers": {
  22159. "type": "object",
  22160. "additionalProperties": {
  22161. "type": "string"
  22162. }
  22163. },
  22164. "body": {
  22165. "type": "object"
  22166. },
  22167. "aisdk": {
  22168. "type": "object",
  22169. "properties": {
  22170. "provider": {
  22171. "type": "object"
  22172. },
  22173. "request": {
  22174. "type": "object"
  22175. }
  22176. },
  22177. "required": ["provider", "request"],
  22178. "additionalProperties": false
  22179. }
  22180. },
  22181. "required": ["id", "headers", "body", "aisdk"],
  22182. "additionalProperties": false
  22183. }
  22184. },
  22185. "time": {
  22186. "type": "object",
  22187. "properties": {
  22188. "released": {
  22189. "anyOf": [
  22190. {
  22191. "type": "number"
  22192. },
  22193. {
  22194. "type": "string",
  22195. "enum": ["NaN"]
  22196. },
  22197. {
  22198. "type": "string",
  22199. "enum": ["Infinity"]
  22200. },
  22201. {
  22202. "type": "string",
  22203. "enum": ["-Infinity"]
  22204. }
  22205. ]
  22206. }
  22207. },
  22208. "required": ["released"],
  22209. "additionalProperties": false
  22210. },
  22211. "cost": {
  22212. "type": "array",
  22213. "items": {
  22214. "type": "object",
  22215. "properties": {
  22216. "tier": {
  22217. "type": "object",
  22218. "properties": {
  22219. "type": {
  22220. "type": "string",
  22221. "enum": ["context"]
  22222. },
  22223. "size": {
  22224. "type": "integer"
  22225. }
  22226. },
  22227. "required": ["type", "size"],
  22228. "additionalProperties": false
  22229. },
  22230. "input": {
  22231. "type": "number"
  22232. },
  22233. "output": {
  22234. "type": "number"
  22235. },
  22236. "cache": {
  22237. "type": "object",
  22238. "properties": {
  22239. "read": {
  22240. "type": "number"
  22241. },
  22242. "write": {
  22243. "type": "number"
  22244. }
  22245. },
  22246. "required": ["read", "write"],
  22247. "additionalProperties": false
  22248. }
  22249. },
  22250. "required": ["input", "output", "cache"],
  22251. "additionalProperties": false
  22252. }
  22253. },
  22254. "status": {
  22255. "type": "string",
  22256. "enum": ["alpha", "beta", "deprecated", "active"]
  22257. },
  22258. "enabled": {
  22259. "type": "boolean"
  22260. },
  22261. "limit": {
  22262. "type": "object",
  22263. "properties": {
  22264. "context": {
  22265. "type": "integer"
  22266. },
  22267. "input": {
  22268. "type": "integer"
  22269. },
  22270. "output": {
  22271. "type": "integer"
  22272. }
  22273. },
  22274. "required": ["context", "output"],
  22275. "additionalProperties": false
  22276. }
  22277. },
  22278. "required": [
  22279. "id",
  22280. "apiID",
  22281. "providerID",
  22282. "name",
  22283. "endpoint",
  22284. "capabilities",
  22285. "options",
  22286. "variants",
  22287. "time",
  22288. "cost",
  22289. "status",
  22290. "enabled",
  22291. "limit"
  22292. ],
  22293. "additionalProperties": false
  22294. },
  22295. "EventCatalogModelUpdated": {
  22296. "type": "object",
  22297. "properties": {
  22298. "id": {
  22299. "type": "string"
  22300. },
  22301. "type": {
  22302. "type": "string",
  22303. "enum": ["catalog.model.updated"]
  22304. },
  22305. "properties": {
  22306. "type": "object",
  22307. "properties": {
  22308. "model": {
  22309. "$ref": "#/components/schemas/ModelV2Info1"
  22310. }
  22311. },
  22312. "required": ["model"],
  22313. "additionalProperties": false
  22314. }
  22315. },
  22316. "required": ["id", "type", "properties"],
  22317. "additionalProperties": false
  22318. },
  22319. "EventFileEdited": {
  22320. "type": "object",
  22321. "properties": {
  22322. "id": {
  22323. "type": "string"
  22324. },
  22325. "type": {
  22326. "type": "string",
  22327. "enum": ["file.edited"]
  22328. },
  22329. "properties": {
  22330. "type": "object",
  22331. "properties": {
  22332. "file": {
  22333. "type": "string"
  22334. }
  22335. },
  22336. "required": ["file"],
  22337. "additionalProperties": false
  22338. }
  22339. },
  22340. "required": ["id", "type", "properties"],
  22341. "additionalProperties": false
  22342. },
  22343. "EventSessionNextAgentSwitched": {
  22344. "type": "object",
  22345. "properties": {
  22346. "id": {
  22347. "type": "string"
  22348. },
  22349. "type": {
  22350. "type": "string",
  22351. "enum": ["session.next.agent.switched"]
  22352. },
  22353. "properties": {
  22354. "type": "object",
  22355. "properties": {
  22356. "timestamp": {
  22357. "type": "number"
  22358. },
  22359. "sessionID": {
  22360. "type": "string",
  22361. "pattern": "^ses"
  22362. },
  22363. "agent": {
  22364. "type": "string"
  22365. }
  22366. },
  22367. "required": ["timestamp", "sessionID", "agent"],
  22368. "additionalProperties": false
  22369. }
  22370. },
  22371. "required": ["id", "type", "properties"],
  22372. "additionalProperties": false
  22373. },
  22374. "EventSessionNextModelSwitched": {
  22375. "type": "object",
  22376. "properties": {
  22377. "id": {
  22378. "type": "string"
  22379. },
  22380. "type": {
  22381. "type": "string",
  22382. "enum": ["session.next.model.switched"]
  22383. },
  22384. "properties": {
  22385. "type": "object",
  22386. "properties": {
  22387. "timestamp": {
  22388. "type": "number"
  22389. },
  22390. "sessionID": {
  22391. "type": "string",
  22392. "pattern": "^ses"
  22393. },
  22394. "model": {
  22395. "type": "object",
  22396. "properties": {
  22397. "id": {
  22398. "type": "string"
  22399. },
  22400. "providerID": {
  22401. "type": "string"
  22402. },
  22403. "variant": {
  22404. "type": "string"
  22405. }
  22406. },
  22407. "required": ["id", "providerID"],
  22408. "additionalProperties": false
  22409. }
  22410. },
  22411. "required": ["timestamp", "sessionID", "model"],
  22412. "additionalProperties": false
  22413. }
  22414. },
  22415. "required": ["id", "type", "properties"],
  22416. "additionalProperties": false
  22417. },
  22418. "EventSessionNextPrompted": {
  22419. "type": "object",
  22420. "properties": {
  22421. "id": {
  22422. "type": "string"
  22423. },
  22424. "type": {
  22425. "type": "string",
  22426. "enum": ["session.next.prompted"]
  22427. },
  22428. "properties": {
  22429. "type": "object",
  22430. "properties": {
  22431. "timestamp": {
  22432. "type": "number"
  22433. },
  22434. "sessionID": {
  22435. "type": "string",
  22436. "pattern": "^ses"
  22437. },
  22438. "prompt": {
  22439. "$ref": "#/components/schemas/Prompt"
  22440. }
  22441. },
  22442. "required": ["timestamp", "sessionID", "prompt"],
  22443. "additionalProperties": false
  22444. }
  22445. },
  22446. "required": ["id", "type", "properties"],
  22447. "additionalProperties": false
  22448. },
  22449. "EventSessionNextSynthetic": {
  22450. "type": "object",
  22451. "properties": {
  22452. "id": {
  22453. "type": "string"
  22454. },
  22455. "type": {
  22456. "type": "string",
  22457. "enum": ["session.next.synthetic"]
  22458. },
  22459. "properties": {
  22460. "type": "object",
  22461. "properties": {
  22462. "timestamp": {
  22463. "type": "number"
  22464. },
  22465. "sessionID": {
  22466. "type": "string",
  22467. "pattern": "^ses"
  22468. },
  22469. "text": {
  22470. "type": "string"
  22471. }
  22472. },
  22473. "required": ["timestamp", "sessionID", "text"],
  22474. "additionalProperties": false
  22475. }
  22476. },
  22477. "required": ["id", "type", "properties"],
  22478. "additionalProperties": false
  22479. },
  22480. "EventSessionNextShellStarted": {
  22481. "type": "object",
  22482. "properties": {
  22483. "id": {
  22484. "type": "string"
  22485. },
  22486. "type": {
  22487. "type": "string",
  22488. "enum": ["session.next.shell.started"]
  22489. },
  22490. "properties": {
  22491. "type": "object",
  22492. "properties": {
  22493. "timestamp": {
  22494. "type": "number"
  22495. },
  22496. "sessionID": {
  22497. "type": "string",
  22498. "pattern": "^ses"
  22499. },
  22500. "callID": {
  22501. "type": "string"
  22502. },
  22503. "command": {
  22504. "type": "string"
  22505. }
  22506. },
  22507. "required": ["timestamp", "sessionID", "callID", "command"],
  22508. "additionalProperties": false
  22509. }
  22510. },
  22511. "required": ["id", "type", "properties"],
  22512. "additionalProperties": false
  22513. },
  22514. "EventSessionNextShellEnded": {
  22515. "type": "object",
  22516. "properties": {
  22517. "id": {
  22518. "type": "string"
  22519. },
  22520. "type": {
  22521. "type": "string",
  22522. "enum": ["session.next.shell.ended"]
  22523. },
  22524. "properties": {
  22525. "type": "object",
  22526. "properties": {
  22527. "timestamp": {
  22528. "type": "number"
  22529. },
  22530. "sessionID": {
  22531. "type": "string",
  22532. "pattern": "^ses"
  22533. },
  22534. "callID": {
  22535. "type": "string"
  22536. },
  22537. "output": {
  22538. "type": "string"
  22539. }
  22540. },
  22541. "required": ["timestamp", "sessionID", "callID", "output"],
  22542. "additionalProperties": false
  22543. }
  22544. },
  22545. "required": ["id", "type", "properties"],
  22546. "additionalProperties": false
  22547. },
  22548. "EventSessionNextStepStarted": {
  22549. "type": "object",
  22550. "properties": {
  22551. "id": {
  22552. "type": "string"
  22553. },
  22554. "type": {
  22555. "type": "string",
  22556. "enum": ["session.next.step.started"]
  22557. },
  22558. "properties": {
  22559. "type": "object",
  22560. "properties": {
  22561. "timestamp": {
  22562. "type": "number"
  22563. },
  22564. "sessionID": {
  22565. "type": "string",
  22566. "pattern": "^ses"
  22567. },
  22568. "agent": {
  22569. "type": "string"
  22570. },
  22571. "model": {
  22572. "type": "object",
  22573. "properties": {
  22574. "id": {
  22575. "type": "string"
  22576. },
  22577. "providerID": {
  22578. "type": "string"
  22579. },
  22580. "variant": {
  22581. "type": "string"
  22582. }
  22583. },
  22584. "required": ["id", "providerID"],
  22585. "additionalProperties": false
  22586. },
  22587. "snapshot": {
  22588. "type": "string"
  22589. }
  22590. },
  22591. "required": ["timestamp", "sessionID", "agent", "model"],
  22592. "additionalProperties": false
  22593. }
  22594. },
  22595. "required": ["id", "type", "properties"],
  22596. "additionalProperties": false
  22597. },
  22598. "EventSessionNextStepEnded": {
  22599. "type": "object",
  22600. "properties": {
  22601. "id": {
  22602. "type": "string"
  22603. },
  22604. "type": {
  22605. "type": "string",
  22606. "enum": ["session.next.step.ended"]
  22607. },
  22608. "properties": {
  22609. "type": "object",
  22610. "properties": {
  22611. "timestamp": {
  22612. "type": "number"
  22613. },
  22614. "sessionID": {
  22615. "type": "string",
  22616. "pattern": "^ses"
  22617. },
  22618. "finish": {
  22619. "type": "string"
  22620. },
  22621. "cost": {
  22622. "type": "number"
  22623. },
  22624. "tokens": {
  22625. "type": "object",
  22626. "properties": {
  22627. "input": {
  22628. "type": "number"
  22629. },
  22630. "output": {
  22631. "type": "number"
  22632. },
  22633. "reasoning": {
  22634. "type": "number"
  22635. },
  22636. "cache": {
  22637. "type": "object",
  22638. "properties": {
  22639. "read": {
  22640. "type": "number"
  22641. },
  22642. "write": {
  22643. "type": "number"
  22644. }
  22645. },
  22646. "required": ["read", "write"],
  22647. "additionalProperties": false
  22648. }
  22649. },
  22650. "required": ["input", "output", "reasoning", "cache"],
  22651. "additionalProperties": false
  22652. },
  22653. "snapshot": {
  22654. "type": "string"
  22655. }
  22656. },
  22657. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  22658. "additionalProperties": false
  22659. }
  22660. },
  22661. "required": ["id", "type", "properties"],
  22662. "additionalProperties": false
  22663. },
  22664. "EventSessionNextStepFailed": {
  22665. "type": "object",
  22666. "properties": {
  22667. "id": {
  22668. "type": "string"
  22669. },
  22670. "type": {
  22671. "type": "string",
  22672. "enum": ["session.next.step.failed"]
  22673. },
  22674. "properties": {
  22675. "type": "object",
  22676. "properties": {
  22677. "timestamp": {
  22678. "type": "number"
  22679. },
  22680. "sessionID": {
  22681. "type": "string",
  22682. "pattern": "^ses"
  22683. },
  22684. "error": {
  22685. "$ref": "#/components/schemas/SessionErrorUnknown"
  22686. }
  22687. },
  22688. "required": ["timestamp", "sessionID", "error"],
  22689. "additionalProperties": false
  22690. }
  22691. },
  22692. "required": ["id", "type", "properties"],
  22693. "additionalProperties": false
  22694. },
  22695. "EventSessionNextTextStarted": {
  22696. "type": "object",
  22697. "properties": {
  22698. "id": {
  22699. "type": "string"
  22700. },
  22701. "type": {
  22702. "type": "string",
  22703. "enum": ["session.next.text.started"]
  22704. },
  22705. "properties": {
  22706. "type": "object",
  22707. "properties": {
  22708. "timestamp": {
  22709. "type": "number"
  22710. },
  22711. "sessionID": {
  22712. "type": "string",
  22713. "pattern": "^ses"
  22714. }
  22715. },
  22716. "required": ["timestamp", "sessionID"],
  22717. "additionalProperties": false
  22718. }
  22719. },
  22720. "required": ["id", "type", "properties"],
  22721. "additionalProperties": false
  22722. },
  22723. "EventSessionNextTextDelta": {
  22724. "type": "object",
  22725. "properties": {
  22726. "id": {
  22727. "type": "string"
  22728. },
  22729. "type": {
  22730. "type": "string",
  22731. "enum": ["session.next.text.delta"]
  22732. },
  22733. "properties": {
  22734. "type": "object",
  22735. "properties": {
  22736. "timestamp": {
  22737. "type": "number"
  22738. },
  22739. "sessionID": {
  22740. "type": "string",
  22741. "pattern": "^ses"
  22742. },
  22743. "delta": {
  22744. "type": "string"
  22745. }
  22746. },
  22747. "required": ["timestamp", "sessionID", "delta"],
  22748. "additionalProperties": false
  22749. }
  22750. },
  22751. "required": ["id", "type", "properties"],
  22752. "additionalProperties": false
  22753. },
  22754. "EventSessionNextTextEnded": {
  22755. "type": "object",
  22756. "properties": {
  22757. "id": {
  22758. "type": "string"
  22759. },
  22760. "type": {
  22761. "type": "string",
  22762. "enum": ["session.next.text.ended"]
  22763. },
  22764. "properties": {
  22765. "type": "object",
  22766. "properties": {
  22767. "timestamp": {
  22768. "type": "number"
  22769. },
  22770. "sessionID": {
  22771. "type": "string",
  22772. "pattern": "^ses"
  22773. },
  22774. "text": {
  22775. "type": "string"
  22776. }
  22777. },
  22778. "required": ["timestamp", "sessionID", "text"],
  22779. "additionalProperties": false
  22780. }
  22781. },
  22782. "required": ["id", "type", "properties"],
  22783. "additionalProperties": false
  22784. },
  22785. "EventSessionNextReasoningStarted": {
  22786. "type": "object",
  22787. "properties": {
  22788. "id": {
  22789. "type": "string"
  22790. },
  22791. "type": {
  22792. "type": "string",
  22793. "enum": ["session.next.reasoning.started"]
  22794. },
  22795. "properties": {
  22796. "type": "object",
  22797. "properties": {
  22798. "timestamp": {
  22799. "type": "number"
  22800. },
  22801. "sessionID": {
  22802. "type": "string",
  22803. "pattern": "^ses"
  22804. },
  22805. "reasoningID": {
  22806. "type": "string"
  22807. }
  22808. },
  22809. "required": ["timestamp", "sessionID", "reasoningID"],
  22810. "additionalProperties": false
  22811. }
  22812. },
  22813. "required": ["id", "type", "properties"],
  22814. "additionalProperties": false
  22815. },
  22816. "EventSessionNextReasoningDelta": {
  22817. "type": "object",
  22818. "properties": {
  22819. "id": {
  22820. "type": "string"
  22821. },
  22822. "type": {
  22823. "type": "string",
  22824. "enum": ["session.next.reasoning.delta"]
  22825. },
  22826. "properties": {
  22827. "type": "object",
  22828. "properties": {
  22829. "timestamp": {
  22830. "type": "number"
  22831. },
  22832. "sessionID": {
  22833. "type": "string",
  22834. "pattern": "^ses"
  22835. },
  22836. "reasoningID": {
  22837. "type": "string"
  22838. },
  22839. "delta": {
  22840. "type": "string"
  22841. }
  22842. },
  22843. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  22844. "additionalProperties": false
  22845. }
  22846. },
  22847. "required": ["id", "type", "properties"],
  22848. "additionalProperties": false
  22849. },
  22850. "EventSessionNextReasoningEnded": {
  22851. "type": "object",
  22852. "properties": {
  22853. "id": {
  22854. "type": "string"
  22855. },
  22856. "type": {
  22857. "type": "string",
  22858. "enum": ["session.next.reasoning.ended"]
  22859. },
  22860. "properties": {
  22861. "type": "object",
  22862. "properties": {
  22863. "timestamp": {
  22864. "type": "number"
  22865. },
  22866. "sessionID": {
  22867. "type": "string",
  22868. "pattern": "^ses"
  22869. },
  22870. "reasoningID": {
  22871. "type": "string"
  22872. },
  22873. "text": {
  22874. "type": "string"
  22875. }
  22876. },
  22877. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  22878. "additionalProperties": false
  22879. }
  22880. },
  22881. "required": ["id", "type", "properties"],
  22882. "additionalProperties": false
  22883. },
  22884. "EventSessionNextToolInputStarted": {
  22885. "type": "object",
  22886. "properties": {
  22887. "id": {
  22888. "type": "string"
  22889. },
  22890. "type": {
  22891. "type": "string",
  22892. "enum": ["session.next.tool.input.started"]
  22893. },
  22894. "properties": {
  22895. "type": "object",
  22896. "properties": {
  22897. "timestamp": {
  22898. "type": "number"
  22899. },
  22900. "sessionID": {
  22901. "type": "string",
  22902. "pattern": "^ses"
  22903. },
  22904. "callID": {
  22905. "type": "string"
  22906. },
  22907. "name": {
  22908. "type": "string"
  22909. }
  22910. },
  22911. "required": ["timestamp", "sessionID", "callID", "name"],
  22912. "additionalProperties": false
  22913. }
  22914. },
  22915. "required": ["id", "type", "properties"],
  22916. "additionalProperties": false
  22917. },
  22918. "EventSessionNextToolInputDelta": {
  22919. "type": "object",
  22920. "properties": {
  22921. "id": {
  22922. "type": "string"
  22923. },
  22924. "type": {
  22925. "type": "string",
  22926. "enum": ["session.next.tool.input.delta"]
  22927. },
  22928. "properties": {
  22929. "type": "object",
  22930. "properties": {
  22931. "timestamp": {
  22932. "type": "number"
  22933. },
  22934. "sessionID": {
  22935. "type": "string",
  22936. "pattern": "^ses"
  22937. },
  22938. "callID": {
  22939. "type": "string"
  22940. },
  22941. "delta": {
  22942. "type": "string"
  22943. }
  22944. },
  22945. "required": ["timestamp", "sessionID", "callID", "delta"],
  22946. "additionalProperties": false
  22947. }
  22948. },
  22949. "required": ["id", "type", "properties"],
  22950. "additionalProperties": false
  22951. },
  22952. "EventSessionNextToolInputEnded": {
  22953. "type": "object",
  22954. "properties": {
  22955. "id": {
  22956. "type": "string"
  22957. },
  22958. "type": {
  22959. "type": "string",
  22960. "enum": ["session.next.tool.input.ended"]
  22961. },
  22962. "properties": {
  22963. "type": "object",
  22964. "properties": {
  22965. "timestamp": {
  22966. "type": "number"
  22967. },
  22968. "sessionID": {
  22969. "type": "string",
  22970. "pattern": "^ses"
  22971. },
  22972. "callID": {
  22973. "type": "string"
  22974. },
  22975. "text": {
  22976. "type": "string"
  22977. }
  22978. },
  22979. "required": ["timestamp", "sessionID", "callID", "text"],
  22980. "additionalProperties": false
  22981. }
  22982. },
  22983. "required": ["id", "type", "properties"],
  22984. "additionalProperties": false
  22985. },
  22986. "EventSessionNextToolCalled": {
  22987. "type": "object",
  22988. "properties": {
  22989. "id": {
  22990. "type": "string"
  22991. },
  22992. "type": {
  22993. "type": "string",
  22994. "enum": ["session.next.tool.called"]
  22995. },
  22996. "properties": {
  22997. "type": "object",
  22998. "properties": {
  22999. "timestamp": {
  23000. "type": "number"
  23001. },
  23002. "sessionID": {
  23003. "type": "string",
  23004. "pattern": "^ses"
  23005. },
  23006. "callID": {
  23007. "type": "string"
  23008. },
  23009. "tool": {
  23010. "type": "string"
  23011. },
  23012. "input": {
  23013. "type": "object"
  23014. },
  23015. "provider": {
  23016. "type": "object",
  23017. "properties": {
  23018. "executed": {
  23019. "type": "boolean"
  23020. },
  23021. "metadata": {
  23022. "type": "object"
  23023. }
  23024. },
  23025. "required": ["executed"],
  23026. "additionalProperties": false
  23027. }
  23028. },
  23029. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  23030. "additionalProperties": false
  23031. }
  23032. },
  23033. "required": ["id", "type", "properties"],
  23034. "additionalProperties": false
  23035. },
  23036. "EventSessionNextToolProgress": {
  23037. "type": "object",
  23038. "properties": {
  23039. "id": {
  23040. "type": "string"
  23041. },
  23042. "type": {
  23043. "type": "string",
  23044. "enum": ["session.next.tool.progress"]
  23045. },
  23046. "properties": {
  23047. "type": "object",
  23048. "properties": {
  23049. "timestamp": {
  23050. "type": "number"
  23051. },
  23052. "sessionID": {
  23053. "type": "string",
  23054. "pattern": "^ses"
  23055. },
  23056. "callID": {
  23057. "type": "string"
  23058. },
  23059. "structured": {
  23060. "type": "object"
  23061. },
  23062. "content": {
  23063. "type": "array",
  23064. "items": {
  23065. "anyOf": [
  23066. {
  23067. "$ref": "#/components/schemas/ToolTextContent"
  23068. },
  23069. {
  23070. "$ref": "#/components/schemas/ToolFileContent"
  23071. }
  23072. ]
  23073. }
  23074. }
  23075. },
  23076. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  23077. "additionalProperties": false
  23078. }
  23079. },
  23080. "required": ["id", "type", "properties"],
  23081. "additionalProperties": false
  23082. },
  23083. "EventSessionNextToolSuccess": {
  23084. "type": "object",
  23085. "properties": {
  23086. "id": {
  23087. "type": "string"
  23088. },
  23089. "type": {
  23090. "type": "string",
  23091. "enum": ["session.next.tool.success"]
  23092. },
  23093. "properties": {
  23094. "type": "object",
  23095. "properties": {
  23096. "timestamp": {
  23097. "type": "number"
  23098. },
  23099. "sessionID": {
  23100. "type": "string",
  23101. "pattern": "^ses"
  23102. },
  23103. "callID": {
  23104. "type": "string"
  23105. },
  23106. "structured": {
  23107. "type": "object"
  23108. },
  23109. "content": {
  23110. "type": "array",
  23111. "items": {
  23112. "anyOf": [
  23113. {
  23114. "$ref": "#/components/schemas/ToolTextContent"
  23115. },
  23116. {
  23117. "$ref": "#/components/schemas/ToolFileContent"
  23118. }
  23119. ]
  23120. }
  23121. },
  23122. "provider": {
  23123. "type": "object",
  23124. "properties": {
  23125. "executed": {
  23126. "type": "boolean"
  23127. },
  23128. "metadata": {
  23129. "type": "object"
  23130. }
  23131. },
  23132. "required": ["executed"],
  23133. "additionalProperties": false
  23134. }
  23135. },
  23136. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  23137. "additionalProperties": false
  23138. }
  23139. },
  23140. "required": ["id", "type", "properties"],
  23141. "additionalProperties": false
  23142. },
  23143. "EventSessionNextToolFailed": {
  23144. "type": "object",
  23145. "properties": {
  23146. "id": {
  23147. "type": "string"
  23148. },
  23149. "type": {
  23150. "type": "string",
  23151. "enum": ["session.next.tool.failed"]
  23152. },
  23153. "properties": {
  23154. "type": "object",
  23155. "properties": {
  23156. "timestamp": {
  23157. "type": "number"
  23158. },
  23159. "sessionID": {
  23160. "type": "string",
  23161. "pattern": "^ses"
  23162. },
  23163. "callID": {
  23164. "type": "string"
  23165. },
  23166. "error": {
  23167. "$ref": "#/components/schemas/SessionErrorUnknown"
  23168. },
  23169. "provider": {
  23170. "type": "object",
  23171. "properties": {
  23172. "executed": {
  23173. "type": "boolean"
  23174. },
  23175. "metadata": {
  23176. "type": "object"
  23177. }
  23178. },
  23179. "required": ["executed"],
  23180. "additionalProperties": false
  23181. }
  23182. },
  23183. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  23184. "additionalProperties": false
  23185. }
  23186. },
  23187. "required": ["id", "type", "properties"],
  23188. "additionalProperties": false
  23189. },
  23190. "EventSessionNextRetried": {
  23191. "type": "object",
  23192. "properties": {
  23193. "id": {
  23194. "type": "string"
  23195. },
  23196. "type": {
  23197. "type": "string",
  23198. "enum": ["session.next.retried"]
  23199. },
  23200. "properties": {
  23201. "type": "object",
  23202. "properties": {
  23203. "timestamp": {
  23204. "type": "number"
  23205. },
  23206. "sessionID": {
  23207. "type": "string",
  23208. "pattern": "^ses"
  23209. },
  23210. "attempt": {
  23211. "type": "number"
  23212. },
  23213. "error": {
  23214. "$ref": "#/components/schemas/SessionNextRetry_error"
  23215. }
  23216. },
  23217. "required": ["timestamp", "sessionID", "attempt", "error"],
  23218. "additionalProperties": false
  23219. }
  23220. },
  23221. "required": ["id", "type", "properties"],
  23222. "additionalProperties": false
  23223. },
  23224. "EventSessionNextCompactionStarted": {
  23225. "type": "object",
  23226. "properties": {
  23227. "id": {
  23228. "type": "string"
  23229. },
  23230. "type": {
  23231. "type": "string",
  23232. "enum": ["session.next.compaction.started"]
  23233. },
  23234. "properties": {
  23235. "type": "object",
  23236. "properties": {
  23237. "timestamp": {
  23238. "type": "number"
  23239. },
  23240. "sessionID": {
  23241. "type": "string",
  23242. "pattern": "^ses"
  23243. },
  23244. "reason": {
  23245. "type": "string",
  23246. "enum": ["auto", "manual"]
  23247. }
  23248. },
  23249. "required": ["timestamp", "sessionID", "reason"],
  23250. "additionalProperties": false
  23251. }
  23252. },
  23253. "required": ["id", "type", "properties"],
  23254. "additionalProperties": false
  23255. },
  23256. "EventSessionNextCompactionDelta": {
  23257. "type": "object",
  23258. "properties": {
  23259. "id": {
  23260. "type": "string"
  23261. },
  23262. "type": {
  23263. "type": "string",
  23264. "enum": ["session.next.compaction.delta"]
  23265. },
  23266. "properties": {
  23267. "type": "object",
  23268. "properties": {
  23269. "timestamp": {
  23270. "type": "number"
  23271. },
  23272. "sessionID": {
  23273. "type": "string",
  23274. "pattern": "^ses"
  23275. },
  23276. "text": {
  23277. "type": "string"
  23278. }
  23279. },
  23280. "required": ["timestamp", "sessionID", "text"],
  23281. "additionalProperties": false
  23282. }
  23283. },
  23284. "required": ["id", "type", "properties"],
  23285. "additionalProperties": false
  23286. },
  23287. "EventSessionNextCompactionEnded": {
  23288. "type": "object",
  23289. "properties": {
  23290. "id": {
  23291. "type": "string"
  23292. },
  23293. "type": {
  23294. "type": "string",
  23295. "enum": ["session.next.compaction.ended"]
  23296. },
  23297. "properties": {
  23298. "type": "object",
  23299. "properties": {
  23300. "timestamp": {
  23301. "type": "number"
  23302. },
  23303. "sessionID": {
  23304. "type": "string",
  23305. "pattern": "^ses"
  23306. },
  23307. "text": {
  23308. "type": "string"
  23309. },
  23310. "include": {
  23311. "type": "string"
  23312. }
  23313. },
  23314. "required": ["timestamp", "sessionID", "text"],
  23315. "additionalProperties": false
  23316. }
  23317. },
  23318. "required": ["id", "type", "properties"],
  23319. "additionalProperties": false
  23320. },
  23321. "EventFileWatcherUpdated": {
  23322. "type": "object",
  23323. "properties": {
  23324. "id": {
  23325. "type": "string"
  23326. },
  23327. "type": {
  23328. "type": "string",
  23329. "enum": ["file.watcher.updated"]
  23330. },
  23331. "properties": {
  23332. "type": "object",
  23333. "properties": {
  23334. "file": {
  23335. "type": "string"
  23336. },
  23337. "event": {
  23338. "type": "string",
  23339. "enum": ["add", "change", "unlink"]
  23340. }
  23341. },
  23342. "required": ["file", "event"],
  23343. "additionalProperties": false
  23344. }
  23345. },
  23346. "required": ["id", "type", "properties"],
  23347. "additionalProperties": false
  23348. },
  23349. "EventSessionCreated": {
  23350. "type": "object",
  23351. "properties": {
  23352. "id": {
  23353. "type": "string"
  23354. },
  23355. "type": {
  23356. "type": "string",
  23357. "enum": ["session.created"]
  23358. },
  23359. "properties": {
  23360. "type": "object",
  23361. "properties": {
  23362. "sessionID": {
  23363. "type": "string",
  23364. "pattern": "^ses"
  23365. },
  23366. "info": {
  23367. "$ref": "#/components/schemas/Session"
  23368. }
  23369. },
  23370. "required": ["sessionID", "info"],
  23371. "additionalProperties": false
  23372. }
  23373. },
  23374. "required": ["id", "type", "properties"],
  23375. "additionalProperties": false
  23376. },
  23377. "EventSessionUpdated": {
  23378. "type": "object",
  23379. "properties": {
  23380. "id": {
  23381. "type": "string"
  23382. },
  23383. "type": {
  23384. "type": "string",
  23385. "enum": ["session.updated"]
  23386. },
  23387. "properties": {
  23388. "type": "object",
  23389. "properties": {
  23390. "sessionID": {
  23391. "type": "string",
  23392. "pattern": "^ses"
  23393. },
  23394. "info": {
  23395. "$ref": "#/components/schemas/Session"
  23396. }
  23397. },
  23398. "required": ["sessionID", "info"],
  23399. "additionalProperties": false
  23400. }
  23401. },
  23402. "required": ["id", "type", "properties"],
  23403. "additionalProperties": false
  23404. },
  23405. "EventSessionDeleted": {
  23406. "type": "object",
  23407. "properties": {
  23408. "id": {
  23409. "type": "string"
  23410. },
  23411. "type": {
  23412. "type": "string",
  23413. "enum": ["session.deleted"]
  23414. },
  23415. "properties": {
  23416. "type": "object",
  23417. "properties": {
  23418. "sessionID": {
  23419. "type": "string",
  23420. "pattern": "^ses"
  23421. },
  23422. "info": {
  23423. "$ref": "#/components/schemas/Session"
  23424. }
  23425. },
  23426. "required": ["sessionID", "info"],
  23427. "additionalProperties": false
  23428. }
  23429. },
  23430. "required": ["id", "type", "properties"],
  23431. "additionalProperties": false
  23432. },
  23433. "EventMessageUpdated": {
  23434. "type": "object",
  23435. "properties": {
  23436. "id": {
  23437. "type": "string"
  23438. },
  23439. "type": {
  23440. "type": "string",
  23441. "enum": ["message.updated"]
  23442. },
  23443. "properties": {
  23444. "type": "object",
  23445. "properties": {
  23446. "sessionID": {
  23447. "type": "string",
  23448. "pattern": "^ses"
  23449. },
  23450. "info": {
  23451. "$ref": "#/components/schemas/Message"
  23452. }
  23453. },
  23454. "required": ["sessionID", "info"],
  23455. "additionalProperties": false
  23456. }
  23457. },
  23458. "required": ["id", "type", "properties"],
  23459. "additionalProperties": false
  23460. },
  23461. "EventMessageRemoved": {
  23462. "type": "object",
  23463. "properties": {
  23464. "id": {
  23465. "type": "string"
  23466. },
  23467. "type": {
  23468. "type": "string",
  23469. "enum": ["message.removed"]
  23470. },
  23471. "properties": {
  23472. "type": "object",
  23473. "properties": {
  23474. "sessionID": {
  23475. "type": "string",
  23476. "pattern": "^ses"
  23477. },
  23478. "messageID": {
  23479. "type": "string",
  23480. "pattern": "^msg"
  23481. }
  23482. },
  23483. "required": ["sessionID", "messageID"],
  23484. "additionalProperties": false
  23485. }
  23486. },
  23487. "required": ["id", "type", "properties"],
  23488. "additionalProperties": false
  23489. },
  23490. "EventMessagePartUpdated": {
  23491. "type": "object",
  23492. "properties": {
  23493. "id": {
  23494. "type": "string"
  23495. },
  23496. "type": {
  23497. "type": "string",
  23498. "enum": ["message.part.updated"]
  23499. },
  23500. "properties": {
  23501. "type": "object",
  23502. "properties": {
  23503. "sessionID": {
  23504. "type": "string",
  23505. "pattern": "^ses"
  23506. },
  23507. "part": {
  23508. "$ref": "#/components/schemas/Part"
  23509. },
  23510. "time": {
  23511. "type": "number"
  23512. }
  23513. },
  23514. "required": ["sessionID", "part", "time"],
  23515. "additionalProperties": false
  23516. }
  23517. },
  23518. "required": ["id", "type", "properties"],
  23519. "additionalProperties": false
  23520. },
  23521. "EventMessagePartRemoved": {
  23522. "type": "object",
  23523. "properties": {
  23524. "id": {
  23525. "type": "string"
  23526. },
  23527. "type": {
  23528. "type": "string",
  23529. "enum": ["message.part.removed"]
  23530. },
  23531. "properties": {
  23532. "type": "object",
  23533. "properties": {
  23534. "sessionID": {
  23535. "type": "string",
  23536. "pattern": "^ses"
  23537. },
  23538. "messageID": {
  23539. "type": "string",
  23540. "pattern": "^msg"
  23541. },
  23542. "partID": {
  23543. "type": "string",
  23544. "pattern": "^prt"
  23545. }
  23546. },
  23547. "required": ["sessionID", "messageID", "partID"],
  23548. "additionalProperties": false
  23549. }
  23550. },
  23551. "required": ["id", "type", "properties"],
  23552. "additionalProperties": false
  23553. },
  23554. "EventMessagePartDelta": {
  23555. "type": "object",
  23556. "properties": {
  23557. "id": {
  23558. "type": "string"
  23559. },
  23560. "type": {
  23561. "type": "string",
  23562. "enum": ["message.part.delta"]
  23563. },
  23564. "properties": {
  23565. "type": "object",
  23566. "properties": {
  23567. "sessionID": {
  23568. "type": "string",
  23569. "pattern": "^ses"
  23570. },
  23571. "messageID": {
  23572. "type": "string",
  23573. "pattern": "^msg"
  23574. },
  23575. "partID": {
  23576. "type": "string",
  23577. "pattern": "^prt"
  23578. },
  23579. "field": {
  23580. "type": "string"
  23581. },
  23582. "delta": {
  23583. "type": "string"
  23584. }
  23585. },
  23586. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  23587. "additionalProperties": false
  23588. }
  23589. },
  23590. "required": ["id", "type", "properties"],
  23591. "additionalProperties": false
  23592. },
  23593. "EventSessionDiff": {
  23594. "type": "object",
  23595. "properties": {
  23596. "id": {
  23597. "type": "string"
  23598. },
  23599. "type": {
  23600. "type": "string",
  23601. "enum": ["session.diff"]
  23602. },
  23603. "properties": {
  23604. "type": "object",
  23605. "properties": {
  23606. "sessionID": {
  23607. "type": "string",
  23608. "pattern": "^ses"
  23609. },
  23610. "diff": {
  23611. "type": "array",
  23612. "items": {
  23613. "$ref": "#/components/schemas/SnapshotFileDiff"
  23614. }
  23615. }
  23616. },
  23617. "required": ["sessionID", "diff"],
  23618. "additionalProperties": false
  23619. }
  23620. },
  23621. "required": ["id", "type", "properties"],
  23622. "additionalProperties": false
  23623. },
  23624. "EventSessionError": {
  23625. "type": "object",
  23626. "properties": {
  23627. "id": {
  23628. "type": "string"
  23629. },
  23630. "type": {
  23631. "type": "string",
  23632. "enum": ["session.error"]
  23633. },
  23634. "properties": {
  23635. "type": "object",
  23636. "properties": {
  23637. "sessionID": {
  23638. "type": "string",
  23639. "pattern": "^ses"
  23640. },
  23641. "error": {
  23642. "anyOf": [
  23643. {
  23644. "$ref": "#/components/schemas/ProviderAuthError"
  23645. },
  23646. {
  23647. "$ref": "#/components/schemas/UnknownError"
  23648. },
  23649. {
  23650. "$ref": "#/components/schemas/MessageOutputLengthError"
  23651. },
  23652. {
  23653. "$ref": "#/components/schemas/MessageAbortedError"
  23654. },
  23655. {
  23656. "$ref": "#/components/schemas/StructuredOutputError"
  23657. },
  23658. {
  23659. "$ref": "#/components/schemas/ContextOverflowError"
  23660. },
  23661. {
  23662. "$ref": "#/components/schemas/APIError"
  23663. }
  23664. ]
  23665. }
  23666. },
  23667. "additionalProperties": false
  23668. }
  23669. },
  23670. "required": ["id", "type", "properties"],
  23671. "additionalProperties": false
  23672. },
  23673. "EventPermissionAsked": {
  23674. "type": "object",
  23675. "properties": {
  23676. "id": {
  23677. "type": "string"
  23678. },
  23679. "type": {
  23680. "type": "string",
  23681. "enum": ["permission.asked"]
  23682. },
  23683. "properties": {
  23684. "type": "object",
  23685. "properties": {
  23686. "id": {
  23687. "type": "string",
  23688. "pattern": "^per"
  23689. },
  23690. "sessionID": {
  23691. "type": "string",
  23692. "pattern": "^ses"
  23693. },
  23694. "permission": {
  23695. "type": "string"
  23696. },
  23697. "patterns": {
  23698. "type": "array",
  23699. "items": {
  23700. "type": "string"
  23701. }
  23702. },
  23703. "metadata": {
  23704. "type": "object"
  23705. },
  23706. "always": {
  23707. "type": "array",
  23708. "items": {
  23709. "type": "string"
  23710. }
  23711. },
  23712. "tool": {
  23713. "type": "object",
  23714. "properties": {
  23715. "messageID": {
  23716. "type": "string"
  23717. },
  23718. "callID": {
  23719. "type": "string"
  23720. }
  23721. },
  23722. "required": ["messageID", "callID"],
  23723. "additionalProperties": false
  23724. }
  23725. },
  23726. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  23727. "additionalProperties": false
  23728. }
  23729. },
  23730. "required": ["id", "type", "properties"],
  23731. "additionalProperties": false
  23732. },
  23733. "EventPermissionReplied": {
  23734. "type": "object",
  23735. "properties": {
  23736. "id": {
  23737. "type": "string"
  23738. },
  23739. "type": {
  23740. "type": "string",
  23741. "enum": ["permission.replied"]
  23742. },
  23743. "properties": {
  23744. "type": "object",
  23745. "properties": {
  23746. "sessionID": {
  23747. "type": "string",
  23748. "pattern": "^ses"
  23749. },
  23750. "requestID": {
  23751. "type": "string",
  23752. "pattern": "^per"
  23753. },
  23754. "reply": {
  23755. "type": "string",
  23756. "enum": ["once", "always", "reject"]
  23757. }
  23758. },
  23759. "required": ["sessionID", "requestID", "reply"],
  23760. "additionalProperties": false
  23761. }
  23762. },
  23763. "required": ["id", "type", "properties"],
  23764. "additionalProperties": false
  23765. },
  23766. "EventQuestionAsked": {
  23767. "type": "object",
  23768. "properties": {
  23769. "id": {
  23770. "type": "string"
  23771. },
  23772. "type": {
  23773. "type": "string",
  23774. "enum": ["question.asked"]
  23775. },
  23776. "properties": {
  23777. "type": "object",
  23778. "properties": {
  23779. "id": {
  23780. "type": "string",
  23781. "pattern": "^que"
  23782. },
  23783. "sessionID": {
  23784. "type": "string",
  23785. "pattern": "^ses"
  23786. },
  23787. "questions": {
  23788. "type": "array",
  23789. "items": {
  23790. "$ref": "#/components/schemas/QuestionInfo"
  23791. },
  23792. "description": "Questions to ask"
  23793. },
  23794. "tool": {
  23795. "$ref": "#/components/schemas/QuestionTool"
  23796. }
  23797. },
  23798. "required": ["id", "sessionID", "questions"],
  23799. "additionalProperties": false
  23800. }
  23801. },
  23802. "required": ["id", "type", "properties"],
  23803. "additionalProperties": false
  23804. },
  23805. "EventQuestionReplied": {
  23806. "type": "object",
  23807. "properties": {
  23808. "id": {
  23809. "type": "string"
  23810. },
  23811. "type": {
  23812. "type": "string",
  23813. "enum": ["question.replied"]
  23814. },
  23815. "properties": {
  23816. "type": "object",
  23817. "properties": {
  23818. "sessionID": {
  23819. "type": "string",
  23820. "pattern": "^ses"
  23821. },
  23822. "requestID": {
  23823. "type": "string",
  23824. "pattern": "^que"
  23825. },
  23826. "answers": {
  23827. "type": "array",
  23828. "items": {
  23829. "$ref": "#/components/schemas/QuestionAnswer"
  23830. }
  23831. }
  23832. },
  23833. "required": ["sessionID", "requestID", "answers"],
  23834. "additionalProperties": false
  23835. }
  23836. },
  23837. "required": ["id", "type", "properties"],
  23838. "additionalProperties": false
  23839. },
  23840. "EventQuestionRejected": {
  23841. "type": "object",
  23842. "properties": {
  23843. "id": {
  23844. "type": "string"
  23845. },
  23846. "type": {
  23847. "type": "string",
  23848. "enum": ["question.rejected"]
  23849. },
  23850. "properties": {
  23851. "type": "object",
  23852. "properties": {
  23853. "sessionID": {
  23854. "type": "string",
  23855. "pattern": "^ses"
  23856. },
  23857. "requestID": {
  23858. "type": "string",
  23859. "pattern": "^que"
  23860. }
  23861. },
  23862. "required": ["sessionID", "requestID"],
  23863. "additionalProperties": false
  23864. }
  23865. },
  23866. "required": ["id", "type", "properties"],
  23867. "additionalProperties": false
  23868. },
  23869. "EventTodoUpdated": {
  23870. "type": "object",
  23871. "properties": {
  23872. "id": {
  23873. "type": "string"
  23874. },
  23875. "type": {
  23876. "type": "string",
  23877. "enum": ["todo.updated"]
  23878. },
  23879. "properties": {
  23880. "type": "object",
  23881. "properties": {
  23882. "sessionID": {
  23883. "type": "string",
  23884. "pattern": "^ses"
  23885. },
  23886. "todos": {
  23887. "type": "array",
  23888. "items": {
  23889. "$ref": "#/components/schemas/Todo"
  23890. }
  23891. }
  23892. },
  23893. "required": ["sessionID", "todos"],
  23894. "additionalProperties": false
  23895. }
  23896. },
  23897. "required": ["id", "type", "properties"],
  23898. "additionalProperties": false
  23899. },
  23900. "EventSessionStatus": {
  23901. "type": "object",
  23902. "properties": {
  23903. "id": {
  23904. "type": "string"
  23905. },
  23906. "type": {
  23907. "type": "string",
  23908. "enum": ["session.status"]
  23909. },
  23910. "properties": {
  23911. "type": "object",
  23912. "properties": {
  23913. "sessionID": {
  23914. "type": "string",
  23915. "pattern": "^ses"
  23916. },
  23917. "status": {
  23918. "$ref": "#/components/schemas/SessionStatus"
  23919. }
  23920. },
  23921. "required": ["sessionID", "status"],
  23922. "additionalProperties": false
  23923. }
  23924. },
  23925. "required": ["id", "type", "properties"],
  23926. "additionalProperties": false
  23927. },
  23928. "EventSessionIdle": {
  23929. "type": "object",
  23930. "properties": {
  23931. "id": {
  23932. "type": "string"
  23933. },
  23934. "type": {
  23935. "type": "string",
  23936. "enum": ["session.idle"]
  23937. },
  23938. "properties": {
  23939. "type": "object",
  23940. "properties": {
  23941. "sessionID": {
  23942. "type": "string",
  23943. "pattern": "^ses"
  23944. }
  23945. },
  23946. "required": ["sessionID"],
  23947. "additionalProperties": false
  23948. }
  23949. },
  23950. "required": ["id", "type", "properties"],
  23951. "additionalProperties": false
  23952. },
  23953. "EventSessionCompacted": {
  23954. "type": "object",
  23955. "properties": {
  23956. "id": {
  23957. "type": "string"
  23958. },
  23959. "type": {
  23960. "type": "string",
  23961. "enum": ["session.compacted"]
  23962. },
  23963. "properties": {
  23964. "type": "object",
  23965. "properties": {
  23966. "sessionID": {
  23967. "type": "string",
  23968. "pattern": "^ses"
  23969. }
  23970. },
  23971. "required": ["sessionID"],
  23972. "additionalProperties": false
  23973. }
  23974. },
  23975. "required": ["id", "type", "properties"],
  23976. "additionalProperties": false
  23977. },
  23978. "EventLspUpdated": {
  23979. "type": "object",
  23980. "properties": {
  23981. "id": {
  23982. "type": "string"
  23983. },
  23984. "type": {
  23985. "type": "string",
  23986. "enum": ["lsp.updated"]
  23987. },
  23988. "properties": {
  23989. "type": "object",
  23990. "properties": {}
  23991. }
  23992. },
  23993. "required": ["id", "type", "properties"],
  23994. "additionalProperties": false
  23995. },
  23996. "EventMcpToolsChanged": {
  23997. "type": "object",
  23998. "properties": {
  23999. "id": {
  24000. "type": "string"
  24001. },
  24002. "type": {
  24003. "type": "string",
  24004. "enum": ["mcp.tools.changed"]
  24005. },
  24006. "properties": {
  24007. "type": "object",
  24008. "properties": {
  24009. "server": {
  24010. "type": "string"
  24011. }
  24012. },
  24013. "required": ["server"],
  24014. "additionalProperties": false
  24015. }
  24016. },
  24017. "required": ["id", "type", "properties"],
  24018. "additionalProperties": false
  24019. },
  24020. "EventMcpBrowserOpenFailed": {
  24021. "type": "object",
  24022. "properties": {
  24023. "id": {
  24024. "type": "string"
  24025. },
  24026. "type": {
  24027. "type": "string",
  24028. "enum": ["mcp.browser.open.failed"]
  24029. },
  24030. "properties": {
  24031. "type": "object",
  24032. "properties": {
  24033. "mcpName": {
  24034. "type": "string"
  24035. },
  24036. "url": {
  24037. "type": "string"
  24038. }
  24039. },
  24040. "required": ["mcpName", "url"],
  24041. "additionalProperties": false
  24042. }
  24043. },
  24044. "required": ["id", "type", "properties"],
  24045. "additionalProperties": false
  24046. },
  24047. "EventCommandExecuted": {
  24048. "type": "object",
  24049. "properties": {
  24050. "id": {
  24051. "type": "string"
  24052. },
  24053. "type": {
  24054. "type": "string",
  24055. "enum": ["command.executed"]
  24056. },
  24057. "properties": {
  24058. "type": "object",
  24059. "properties": {
  24060. "name": {
  24061. "type": "string"
  24062. },
  24063. "sessionID": {
  24064. "type": "string",
  24065. "pattern": "^ses"
  24066. },
  24067. "arguments": {
  24068. "type": "string"
  24069. },
  24070. "messageID": {
  24071. "type": "string",
  24072. "pattern": "^msg"
  24073. }
  24074. },
  24075. "required": ["name", "sessionID", "arguments", "messageID"],
  24076. "additionalProperties": false
  24077. }
  24078. },
  24079. "required": ["id", "type", "properties"],
  24080. "additionalProperties": false
  24081. },
  24082. "EventProjectUpdated": {
  24083. "type": "object",
  24084. "properties": {
  24085. "id": {
  24086. "type": "string"
  24087. },
  24088. "type": {
  24089. "type": "string",
  24090. "enum": ["project.updated"]
  24091. },
  24092. "properties": {
  24093. "type": "object",
  24094. "properties": {
  24095. "id": {
  24096. "type": "string"
  24097. },
  24098. "worktree": {
  24099. "type": "string"
  24100. },
  24101. "vcs": {
  24102. "type": "string",
  24103. "enum": ["git"]
  24104. },
  24105. "name": {
  24106. "type": "string"
  24107. },
  24108. "icon": {
  24109. "type": "object",
  24110. "properties": {
  24111. "url": {
  24112. "type": "string"
  24113. },
  24114. "override": {
  24115. "type": "string"
  24116. },
  24117. "color": {
  24118. "type": "string"
  24119. }
  24120. },
  24121. "additionalProperties": false
  24122. },
  24123. "commands": {
  24124. "type": "object",
  24125. "properties": {
  24126. "start": {
  24127. "type": "string",
  24128. "description": "Startup script to run when creating a new workspace (worktree)"
  24129. }
  24130. },
  24131. "additionalProperties": false
  24132. },
  24133. "time": {
  24134. "type": "object",
  24135. "properties": {
  24136. "created": {
  24137. "type": "integer",
  24138. "minimum": 0
  24139. },
  24140. "updated": {
  24141. "type": "integer",
  24142. "minimum": 0
  24143. },
  24144. "initialized": {
  24145. "type": "integer",
  24146. "minimum": 0
  24147. }
  24148. },
  24149. "required": ["created", "updated"],
  24150. "additionalProperties": false
  24151. },
  24152. "sandboxes": {
  24153. "type": "array",
  24154. "items": {
  24155. "type": "string"
  24156. }
  24157. }
  24158. },
  24159. "required": ["id", "worktree", "time", "sandboxes"],
  24160. "additionalProperties": false
  24161. }
  24162. },
  24163. "required": ["id", "type", "properties"],
  24164. "additionalProperties": false
  24165. },
  24166. "EventVcsBranchUpdated": {
  24167. "type": "object",
  24168. "properties": {
  24169. "id": {
  24170. "type": "string"
  24171. },
  24172. "type": {
  24173. "type": "string",
  24174. "enum": ["vcs.branch.updated"]
  24175. },
  24176. "properties": {
  24177. "type": "object",
  24178. "properties": {
  24179. "branch": {
  24180. "type": "string"
  24181. }
  24182. },
  24183. "additionalProperties": false
  24184. }
  24185. },
  24186. "required": ["id", "type", "properties"],
  24187. "additionalProperties": false
  24188. },
  24189. "EventWorkspaceReady": {
  24190. "type": "object",
  24191. "properties": {
  24192. "id": {
  24193. "type": "string"
  24194. },
  24195. "type": {
  24196. "type": "string",
  24197. "enum": ["workspace.ready"]
  24198. },
  24199. "properties": {
  24200. "type": "object",
  24201. "properties": {
  24202. "name": {
  24203. "type": "string"
  24204. }
  24205. },
  24206. "required": ["name"],
  24207. "additionalProperties": false
  24208. }
  24209. },
  24210. "required": ["id", "type", "properties"],
  24211. "additionalProperties": false
  24212. },
  24213. "EventWorkspaceFailed": {
  24214. "type": "object",
  24215. "properties": {
  24216. "id": {
  24217. "type": "string"
  24218. },
  24219. "type": {
  24220. "type": "string",
  24221. "enum": ["workspace.failed"]
  24222. },
  24223. "properties": {
  24224. "type": "object",
  24225. "properties": {
  24226. "message": {
  24227. "type": "string"
  24228. }
  24229. },
  24230. "required": ["message"],
  24231. "additionalProperties": false
  24232. }
  24233. },
  24234. "required": ["id", "type", "properties"],
  24235. "additionalProperties": false
  24236. },
  24237. "EventWorkspaceStatus": {
  24238. "type": "object",
  24239. "properties": {
  24240. "id": {
  24241. "type": "string"
  24242. },
  24243. "type": {
  24244. "type": "string",
  24245. "enum": ["workspace.status"]
  24246. },
  24247. "properties": {
  24248. "type": "object",
  24249. "properties": {
  24250. "workspaceID": {
  24251. "type": "string",
  24252. "pattern": "^wrk"
  24253. },
  24254. "status": {
  24255. "type": "string",
  24256. "enum": ["connected", "connecting", "disconnected", "error"]
  24257. }
  24258. },
  24259. "required": ["workspaceID", "status"],
  24260. "additionalProperties": false
  24261. }
  24262. },
  24263. "required": ["id", "type", "properties"],
  24264. "additionalProperties": false
  24265. },
  24266. "EventWorktreeReady": {
  24267. "type": "object",
  24268. "properties": {
  24269. "id": {
  24270. "type": "string"
  24271. },
  24272. "type": {
  24273. "type": "string",
  24274. "enum": ["worktree.ready"]
  24275. },
  24276. "properties": {
  24277. "type": "object",
  24278. "properties": {
  24279. "name": {
  24280. "type": "string"
  24281. },
  24282. "branch": {
  24283. "type": "string"
  24284. }
  24285. },
  24286. "required": ["name"],
  24287. "additionalProperties": false
  24288. }
  24289. },
  24290. "required": ["id", "type", "properties"],
  24291. "additionalProperties": false
  24292. },
  24293. "EventWorktreeFailed": {
  24294. "type": "object",
  24295. "properties": {
  24296. "id": {
  24297. "type": "string"
  24298. },
  24299. "type": {
  24300. "type": "string",
  24301. "enum": ["worktree.failed"]
  24302. },
  24303. "properties": {
  24304. "type": "object",
  24305. "properties": {
  24306. "message": {
  24307. "type": "string"
  24308. }
  24309. },
  24310. "required": ["message"],
  24311. "additionalProperties": false
  24312. }
  24313. },
  24314. "required": ["id", "type", "properties"],
  24315. "additionalProperties": false
  24316. },
  24317. "EventPtyCreated": {
  24318. "type": "object",
  24319. "properties": {
  24320. "id": {
  24321. "type": "string"
  24322. },
  24323. "type": {
  24324. "type": "string",
  24325. "enum": ["pty.created"]
  24326. },
  24327. "properties": {
  24328. "type": "object",
  24329. "properties": {
  24330. "info": {
  24331. "$ref": "#/components/schemas/Pty"
  24332. }
  24333. },
  24334. "required": ["info"],
  24335. "additionalProperties": false
  24336. }
  24337. },
  24338. "required": ["id", "type", "properties"],
  24339. "additionalProperties": false
  24340. },
  24341. "EventPtyUpdated": {
  24342. "type": "object",
  24343. "properties": {
  24344. "id": {
  24345. "type": "string"
  24346. },
  24347. "type": {
  24348. "type": "string",
  24349. "enum": ["pty.updated"]
  24350. },
  24351. "properties": {
  24352. "type": "object",
  24353. "properties": {
  24354. "info": {
  24355. "$ref": "#/components/schemas/Pty"
  24356. }
  24357. },
  24358. "required": ["info"],
  24359. "additionalProperties": false
  24360. }
  24361. },
  24362. "required": ["id", "type", "properties"],
  24363. "additionalProperties": false
  24364. },
  24365. "EventPtyExited": {
  24366. "type": "object",
  24367. "properties": {
  24368. "id": {
  24369. "type": "string"
  24370. },
  24371. "type": {
  24372. "type": "string",
  24373. "enum": ["pty.exited"]
  24374. },
  24375. "properties": {
  24376. "type": "object",
  24377. "properties": {
  24378. "id": {
  24379. "type": "string",
  24380. "pattern": "^pty"
  24381. },
  24382. "exitCode": {
  24383. "type": "integer",
  24384. "minimum": 0
  24385. }
  24386. },
  24387. "required": ["id", "exitCode"],
  24388. "additionalProperties": false
  24389. }
  24390. },
  24391. "required": ["id", "type", "properties"],
  24392. "additionalProperties": false
  24393. },
  24394. "EventPtyDeleted": {
  24395. "type": "object",
  24396. "properties": {
  24397. "id": {
  24398. "type": "string"
  24399. },
  24400. "type": {
  24401. "type": "string",
  24402. "enum": ["pty.deleted"]
  24403. },
  24404. "properties": {
  24405. "type": "object",
  24406. "properties": {
  24407. "id": {
  24408. "type": "string",
  24409. "pattern": "^pty"
  24410. }
  24411. },
  24412. "required": ["id"],
  24413. "additionalProperties": false
  24414. }
  24415. },
  24416. "required": ["id", "type", "properties"],
  24417. "additionalProperties": false
  24418. },
  24419. "EventInstallationUpdated": {
  24420. "type": "object",
  24421. "properties": {
  24422. "id": {
  24423. "type": "string"
  24424. },
  24425. "type": {
  24426. "type": "string",
  24427. "enum": ["installation.updated"]
  24428. },
  24429. "properties": {
  24430. "type": "object",
  24431. "properties": {
  24432. "version": {
  24433. "type": "string"
  24434. }
  24435. },
  24436. "required": ["version"],
  24437. "additionalProperties": false
  24438. }
  24439. },
  24440. "required": ["id", "type", "properties"],
  24441. "additionalProperties": false
  24442. },
  24443. "EventInstallationUpdate-available": {
  24444. "type": "object",
  24445. "properties": {
  24446. "id": {
  24447. "type": "string"
  24448. },
  24449. "type": {
  24450. "type": "string",
  24451. "enum": ["installation.update-available"]
  24452. },
  24453. "properties": {
  24454. "type": "object",
  24455. "properties": {
  24456. "version": {
  24457. "type": "string"
  24458. }
  24459. },
  24460. "required": ["version"],
  24461. "additionalProperties": false
  24462. }
  24463. },
  24464. "required": ["id", "type", "properties"],
  24465. "additionalProperties": false
  24466. },
  24467. "EventServerConnected": {
  24468. "type": "object",
  24469. "properties": {
  24470. "id": {
  24471. "type": "string"
  24472. },
  24473. "type": {
  24474. "type": "string",
  24475. "enum": ["server.connected"]
  24476. },
  24477. "properties": {
  24478. "type": "object",
  24479. "properties": {}
  24480. }
  24481. },
  24482. "required": ["id", "type", "properties"],
  24483. "additionalProperties": false
  24484. },
  24485. "EventGlobalDisposed": {
  24486. "type": "object",
  24487. "properties": {
  24488. "id": {
  24489. "type": "string"
  24490. },
  24491. "type": {
  24492. "type": "string",
  24493. "enum": ["global.disposed"]
  24494. },
  24495. "properties": {
  24496. "type": "object",
  24497. "properties": {}
  24498. }
  24499. },
  24500. "required": ["id", "type", "properties"],
  24501. "additionalProperties": false
  24502. },
  24503. "EventPermissionV2Asked": {
  24504. "type": "object",
  24505. "properties": {
  24506. "id": {
  24507. "type": "string"
  24508. },
  24509. "type": {
  24510. "type": "string",
  24511. "enum": ["permission.v2.asked"]
  24512. },
  24513. "properties": {
  24514. "type": "object",
  24515. "properties": {
  24516. "id": {
  24517. "type": "string",
  24518. "pattern": "^per"
  24519. },
  24520. "sessionID": {
  24521. "type": "string",
  24522. "pattern": "^ses"
  24523. },
  24524. "action": {
  24525. "type": "string"
  24526. },
  24527. "resources": {
  24528. "type": "array",
  24529. "items": {
  24530. "type": "string"
  24531. }
  24532. },
  24533. "save": {
  24534. "type": "array",
  24535. "items": {
  24536. "type": "string"
  24537. }
  24538. },
  24539. "metadata": {
  24540. "type": "object"
  24541. },
  24542. "source": {
  24543. "$ref": "#/components/schemas/PermissionV2Source"
  24544. }
  24545. },
  24546. "required": ["id", "sessionID", "action", "resources"],
  24547. "additionalProperties": false
  24548. }
  24549. },
  24550. "required": ["id", "type", "properties"],
  24551. "additionalProperties": false
  24552. },
  24553. "EventPermissionV2Replied": {
  24554. "type": "object",
  24555. "properties": {
  24556. "id": {
  24557. "type": "string"
  24558. },
  24559. "type": {
  24560. "type": "string",
  24561. "enum": ["permission.v2.replied"]
  24562. },
  24563. "properties": {
  24564. "type": "object",
  24565. "properties": {
  24566. "sessionID": {
  24567. "type": "string",
  24568. "pattern": "^ses"
  24569. },
  24570. "requestID": {
  24571. "type": "string",
  24572. "pattern": "^per"
  24573. },
  24574. "reply": {
  24575. "$ref": "#/components/schemas/PermissionV2Reply"
  24576. }
  24577. },
  24578. "required": ["sessionID", "requestID", "reply"],
  24579. "additionalProperties": false
  24580. }
  24581. },
  24582. "required": ["id", "type", "properties"],
  24583. "additionalProperties": false
  24584. },
  24585. "EventAccountAdded": {
  24586. "type": "object",
  24587. "properties": {
  24588. "id": {
  24589. "type": "string"
  24590. },
  24591. "type": {
  24592. "type": "string",
  24593. "enum": ["account.added"]
  24594. },
  24595. "properties": {
  24596. "type": "object",
  24597. "properties": {
  24598. "account": {
  24599. "$ref": "#/components/schemas/AuthInfo"
  24600. }
  24601. },
  24602. "required": ["account"],
  24603. "additionalProperties": false
  24604. }
  24605. },
  24606. "required": ["id", "type", "properties"],
  24607. "additionalProperties": false
  24608. },
  24609. "EventAccountRemoved": {
  24610. "type": "object",
  24611. "properties": {
  24612. "id": {
  24613. "type": "string"
  24614. },
  24615. "type": {
  24616. "type": "string",
  24617. "enum": ["account.removed"]
  24618. },
  24619. "properties": {
  24620. "type": "object",
  24621. "properties": {
  24622. "account": {
  24623. "$ref": "#/components/schemas/AuthInfo"
  24624. }
  24625. },
  24626. "required": ["account"],
  24627. "additionalProperties": false
  24628. }
  24629. },
  24630. "required": ["id", "type", "properties"],
  24631. "additionalProperties": false
  24632. },
  24633. "EventAccountSwitched": {
  24634. "type": "object",
  24635. "properties": {
  24636. "id": {
  24637. "type": "string"
  24638. },
  24639. "type": {
  24640. "type": "string",
  24641. "enum": ["account.switched"]
  24642. },
  24643. "properties": {
  24644. "type": "object",
  24645. "properties": {
  24646. "serviceID": {
  24647. "type": "string"
  24648. },
  24649. "from": {
  24650. "type": "string"
  24651. },
  24652. "to": {
  24653. "type": "string"
  24654. }
  24655. },
  24656. "required": ["serviceID"],
  24657. "additionalProperties": false
  24658. }
  24659. },
  24660. "required": ["id", "type", "properties"],
  24661. "additionalProperties": false
  24662. },
  24663. "BadRequestError": {
  24664. "type": "object",
  24665. "required": ["name", "data"],
  24666. "properties": {
  24667. "name": {
  24668. "type": "string",
  24669. "enum": ["BadRequest"]
  24670. },
  24671. "data": {
  24672. "type": "object",
  24673. "required": ["message"],
  24674. "properties": {
  24675. "message": {
  24676. "type": "string"
  24677. },
  24678. "kind": {
  24679. "type": "string",
  24680. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  24681. }
  24682. }
  24683. }
  24684. }
  24685. }
  24686. }
  24687. },
  24688. "security": [],
  24689. "tags": [
  24690. {
  24691. "name": "control",
  24692. "description": "Control plane routes."
  24693. },
  24694. {
  24695. "name": "global",
  24696. "description": "Global server routes."
  24697. },
  24698. {
  24699. "name": "event",
  24700. "description": "Instance event stream route."
  24701. },
  24702. {
  24703. "name": "config",
  24704. "description": "Experimental HttpApi config routes."
  24705. },
  24706. {
  24707. "name": "experimental",
  24708. "description": "Experimental HttpApi read-only routes."
  24709. },
  24710. {
  24711. "name": "file",
  24712. "description": "Experimental HttpApi file routes."
  24713. },
  24714. {
  24715. "name": "instance",
  24716. "description": "Experimental HttpApi instance read routes."
  24717. },
  24718. {
  24719. "name": "mcp",
  24720. "description": "Experimental HttpApi MCP routes."
  24721. },
  24722. {
  24723. "name": "project",
  24724. "description": "Experimental HttpApi project routes."
  24725. },
  24726. {
  24727. "name": "pty",
  24728. "description": "Experimental HttpApi PTY routes."
  24729. },
  24730. {
  24731. "name": "question",
  24732. "description": "Question routes."
  24733. },
  24734. {
  24735. "name": "permission",
  24736. "description": "Experimental HttpApi permission routes."
  24737. },
  24738. {
  24739. "name": "provider",
  24740. "description": "Experimental HttpApi provider routes."
  24741. },
  24742. {
  24743. "name": "session",
  24744. "description": "Experimental HttpApi session routes."
  24745. },
  24746. {
  24747. "name": "sync",
  24748. "description": "Experimental HttpApi sync routes."
  24749. },
  24750. {
  24751. "name": "v2",
  24752. "description": "Experimental v2 routes."
  24753. },
  24754. {
  24755. "name": "v2 messages",
  24756. "description": "Experimental v2 message routes."
  24757. },
  24758. {
  24759. "name": "v2 models",
  24760. "description": "Experimental v2 model routes."
  24761. },
  24762. {
  24763. "name": "v2 providers",
  24764. "description": "Experimental v2 provider routes."
  24765. },
  24766. {
  24767. "name": "v2 permissions",
  24768. "description": "Experimental v2 permission routes."
  24769. },
  24770. {
  24771. "name": "v2 session permissions",
  24772. "description": "Experimental v2 session permission routes."
  24773. },
  24774. {
  24775. "name": "v2 saved permissions",
  24776. "description": "Experimental v2 saved permission routes."
  24777. },
  24778. {
  24779. "name": "tui",
  24780. "description": "Experimental HttpApi TUI routes."
  24781. },
  24782. {
  24783. "name": "workspace",
  24784. "description": "Experimental HttpApi workspace routes."
  24785. },
  24786. {
  24787. "name": "pty",
  24788. "description": "PTY websocket route."
  24789. }
  24790. ]
  24791. }