openapi.json 544 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936
  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": "Bad request",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "$ref": "#/components/schemas/BadRequestError"
  41. }
  42. }
  43. }
  44. }
  45. },
  46. "description": "Set authentication credentials",
  47. "summary": "Set auth credentials",
  48. "requestBody": {
  49. "content": {
  50. "application/json": {
  51. "schema": {
  52. "$ref": "#/components/schemas/Auth"
  53. }
  54. }
  55. }
  56. },
  57. "x-codeSamples": [
  58. {
  59. "lang": "js",
  60. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  61. }
  62. ]
  63. },
  64. "delete": {
  65. "tags": ["control"],
  66. "operationId": "auth.remove",
  67. "parameters": [
  68. {
  69. "name": "providerID",
  70. "in": "path",
  71. "schema": {
  72. "type": "string"
  73. },
  74. "required": true
  75. }
  76. ],
  77. "responses": {
  78. "200": {
  79. "description": "Successfully removed authentication credentials",
  80. "content": {
  81. "application/json": {
  82. "schema": {
  83. "type": "boolean",
  84. "description": "Successfully removed authentication credentials"
  85. }
  86. }
  87. }
  88. },
  89. "400": {
  90. "description": "Bad request",
  91. "content": {
  92. "application/json": {
  93. "schema": {
  94. "$ref": "#/components/schemas/BadRequestError"
  95. }
  96. }
  97. }
  98. }
  99. },
  100. "description": "Remove authentication credentials",
  101. "summary": "Remove auth credentials",
  102. "x-codeSamples": [
  103. {
  104. "lang": "js",
  105. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  106. }
  107. ]
  108. }
  109. },
  110. "/log": {
  111. "post": {
  112. "tags": ["control"],
  113. "operationId": "app.log",
  114. "parameters": [
  115. {
  116. "name": "directory",
  117. "in": "query",
  118. "schema": {
  119. "type": "string"
  120. },
  121. "required": false
  122. },
  123. {
  124. "name": "workspace",
  125. "in": "query",
  126. "schema": {
  127. "type": "string"
  128. },
  129. "required": false
  130. }
  131. ],
  132. "responses": {
  133. "200": {
  134. "description": "Log entry written successfully",
  135. "content": {
  136. "application/json": {
  137. "schema": {
  138. "type": "boolean",
  139. "description": "Log entry written successfully"
  140. }
  141. }
  142. }
  143. },
  144. "400": {
  145. "description": "Bad request",
  146. "content": {
  147. "application/json": {
  148. "schema": {
  149. "$ref": "#/components/schemas/BadRequestError"
  150. }
  151. }
  152. }
  153. }
  154. },
  155. "description": "Write a log entry to the server logs with specified level and metadata.",
  156. "summary": "Write log",
  157. "requestBody": {
  158. "content": {
  159. "application/json": {
  160. "schema": {
  161. "type": "object",
  162. "properties": {
  163. "service": {
  164. "type": "string",
  165. "description": "Service name for the log entry"
  166. },
  167. "level": {
  168. "type": "string",
  169. "enum": ["debug", "info", "error", "warn"],
  170. "description": "Log level"
  171. },
  172. "message": {
  173. "type": "string",
  174. "description": "Log message"
  175. },
  176. "extra": {
  177. "type": "object"
  178. }
  179. },
  180. "required": ["service", "level", "message"],
  181. "additionalProperties": false
  182. }
  183. }
  184. }
  185. },
  186. "x-codeSamples": [
  187. {
  188. "lang": "js",
  189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  190. }
  191. ]
  192. }
  193. },
  194. "/global/health": {
  195. "get": {
  196. "tags": ["global"],
  197. "operationId": "global.health",
  198. "parameters": [],
  199. "responses": {
  200. "200": {
  201. "description": "Health information",
  202. "content": {
  203. "application/json": {
  204. "schema": {
  205. "type": "object",
  206. "properties": {
  207. "healthy": {
  208. "type": "boolean",
  209. "enum": [true]
  210. },
  211. "version": {
  212. "type": "string"
  213. }
  214. },
  215. "required": ["healthy", "version"],
  216. "additionalProperties": false,
  217. "description": "Health information"
  218. }
  219. }
  220. }
  221. }
  222. },
  223. "description": "Get health information about the OpenCode server.",
  224. "summary": "Get health",
  225. "x-codeSamples": [
  226. {
  227. "lang": "js",
  228. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  229. }
  230. ]
  231. }
  232. },
  233. "/global/event": {
  234. "get": {
  235. "tags": ["global"],
  236. "operationId": "global.event",
  237. "parameters": [],
  238. "responses": {
  239. "200": {
  240. "description": "Event stream",
  241. "content": {
  242. "text/event-stream": {
  243. "schema": {
  244. "$ref": "#/components/schemas/GlobalEvent"
  245. }
  246. }
  247. }
  248. }
  249. },
  250. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  251. "summary": "Get global events",
  252. "x-codeSamples": [
  253. {
  254. "lang": "js",
  255. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  256. }
  257. ]
  258. }
  259. },
  260. "/global/config": {
  261. "get": {
  262. "tags": ["global"],
  263. "operationId": "global.config.get",
  264. "parameters": [],
  265. "responses": {
  266. "200": {
  267. "description": "Get global config info",
  268. "content": {
  269. "application/json": {
  270. "schema": {
  271. "$ref": "#/components/schemas/Config"
  272. }
  273. }
  274. }
  275. }
  276. },
  277. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  278. "summary": "Get global configuration",
  279. "x-codeSamples": [
  280. {
  281. "lang": "js",
  282. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  283. }
  284. ]
  285. },
  286. "patch": {
  287. "tags": ["global"],
  288. "operationId": "global.config.update",
  289. "parameters": [],
  290. "responses": {
  291. "200": {
  292. "description": "Successfully updated global config",
  293. "content": {
  294. "application/json": {
  295. "schema": {
  296. "$ref": "#/components/schemas/Config"
  297. }
  298. }
  299. }
  300. },
  301. "400": {
  302. "description": "Bad request",
  303. "content": {
  304. "application/json": {
  305. "schema": {
  306. "$ref": "#/components/schemas/BadRequestError"
  307. }
  308. }
  309. }
  310. }
  311. },
  312. "description": "Update global OpenCode configuration settings and preferences.",
  313. "summary": "Update global configuration",
  314. "requestBody": {
  315. "content": {
  316. "application/json": {
  317. "schema": {
  318. "$ref": "#/components/schemas/Config"
  319. }
  320. }
  321. }
  322. },
  323. "x-codeSamples": [
  324. {
  325. "lang": "js",
  326. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  327. }
  328. ]
  329. }
  330. },
  331. "/global/dispose": {
  332. "post": {
  333. "tags": ["global"],
  334. "operationId": "global.dispose",
  335. "parameters": [],
  336. "responses": {
  337. "200": {
  338. "description": "Global disposed",
  339. "content": {
  340. "application/json": {
  341. "schema": {
  342. "type": "boolean",
  343. "description": "Global disposed"
  344. }
  345. }
  346. }
  347. }
  348. },
  349. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  350. "summary": "Dispose instance",
  351. "x-codeSamples": [
  352. {
  353. "lang": "js",
  354. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  355. }
  356. ]
  357. }
  358. },
  359. "/global/upgrade": {
  360. "post": {
  361. "tags": ["global"],
  362. "operationId": "global.upgrade",
  363. "parameters": [],
  364. "responses": {
  365. "200": {
  366. "description": "Upgrade result",
  367. "content": {
  368. "application/json": {
  369. "schema": {
  370. "anyOf": [
  371. {
  372. "type": "object",
  373. "properties": {
  374. "success": {
  375. "type": "boolean",
  376. "enum": [true]
  377. },
  378. "version": {
  379. "type": "string"
  380. }
  381. },
  382. "required": ["success", "version"],
  383. "additionalProperties": false
  384. },
  385. {
  386. "type": "object",
  387. "properties": {
  388. "success": {
  389. "type": "boolean",
  390. "enum": [false]
  391. },
  392. "error": {
  393. "type": "string"
  394. }
  395. },
  396. "required": ["success", "error"],
  397. "additionalProperties": false
  398. }
  399. ],
  400. "description": "Upgrade result"
  401. }
  402. }
  403. }
  404. },
  405. "400": {
  406. "description": "Bad request",
  407. "content": {
  408. "application/json": {
  409. "schema": {
  410. "$ref": "#/components/schemas/BadRequestError"
  411. }
  412. }
  413. }
  414. }
  415. },
  416. "description": "Upgrade opencode to the specified version or latest if not specified.",
  417. "summary": "Upgrade opencode",
  418. "requestBody": {
  419. "content": {
  420. "application/json": {
  421. "schema": {
  422. "type": "object",
  423. "properties": {
  424. "target": {
  425. "type": "string"
  426. }
  427. },
  428. "additionalProperties": false
  429. }
  430. }
  431. }
  432. },
  433. "x-codeSamples": [
  434. {
  435. "lang": "js",
  436. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  437. }
  438. ]
  439. }
  440. },
  441. "/event": {
  442. "get": {
  443. "tags": ["event"],
  444. "operationId": "event.subscribe",
  445. "parameters": [
  446. {
  447. "name": "directory",
  448. "in": "query",
  449. "schema": {
  450. "type": "string"
  451. },
  452. "required": false
  453. },
  454. {
  455. "name": "workspace",
  456. "in": "query",
  457. "schema": {
  458. "type": "string"
  459. },
  460. "required": false
  461. }
  462. ],
  463. "responses": {
  464. "200": {
  465. "description": "Event stream",
  466. "content": {
  467. "text/event-stream": {
  468. "schema": {
  469. "$ref": "#/components/schemas/Event"
  470. }
  471. }
  472. }
  473. }
  474. },
  475. "description": "Get events",
  476. "summary": "Subscribe to events",
  477. "x-codeSamples": [
  478. {
  479. "lang": "js",
  480. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  481. }
  482. ]
  483. }
  484. },
  485. "/config": {
  486. "get": {
  487. "tags": ["config"],
  488. "operationId": "config.get",
  489. "parameters": [
  490. {
  491. "name": "directory",
  492. "in": "query",
  493. "schema": {
  494. "type": "string"
  495. },
  496. "required": false
  497. },
  498. {
  499. "name": "workspace",
  500. "in": "query",
  501. "schema": {
  502. "type": "string"
  503. },
  504. "required": false
  505. }
  506. ],
  507. "responses": {
  508. "200": {
  509. "description": "Get config info",
  510. "content": {
  511. "application/json": {
  512. "schema": {
  513. "$ref": "#/components/schemas/Config"
  514. }
  515. }
  516. }
  517. }
  518. },
  519. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  520. "summary": "Get configuration",
  521. "x-codeSamples": [
  522. {
  523. "lang": "js",
  524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  525. }
  526. ]
  527. },
  528. "patch": {
  529. "tags": ["config"],
  530. "operationId": "config.update",
  531. "parameters": [
  532. {
  533. "name": "directory",
  534. "in": "query",
  535. "schema": {
  536. "type": "string"
  537. },
  538. "required": false
  539. },
  540. {
  541. "name": "workspace",
  542. "in": "query",
  543. "schema": {
  544. "type": "string"
  545. },
  546. "required": false
  547. }
  548. ],
  549. "responses": {
  550. "200": {
  551. "description": "Successfully updated config",
  552. "content": {
  553. "application/json": {
  554. "schema": {
  555. "$ref": "#/components/schemas/Config"
  556. }
  557. }
  558. }
  559. },
  560. "400": {
  561. "description": "Bad request",
  562. "content": {
  563. "application/json": {
  564. "schema": {
  565. "$ref": "#/components/schemas/BadRequestError"
  566. }
  567. }
  568. }
  569. }
  570. },
  571. "description": "Update OpenCode configuration settings and preferences.",
  572. "summary": "Update configuration",
  573. "requestBody": {
  574. "content": {
  575. "application/json": {
  576. "schema": {
  577. "$ref": "#/components/schemas/Config"
  578. }
  579. }
  580. }
  581. },
  582. "x-codeSamples": [
  583. {
  584. "lang": "js",
  585. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  586. }
  587. ]
  588. }
  589. },
  590. "/config/providers": {
  591. "get": {
  592. "tags": ["config"],
  593. "operationId": "config.providers",
  594. "parameters": [
  595. {
  596. "name": "directory",
  597. "in": "query",
  598. "schema": {
  599. "type": "string"
  600. },
  601. "required": false
  602. },
  603. {
  604. "name": "workspace",
  605. "in": "query",
  606. "schema": {
  607. "type": "string"
  608. },
  609. "required": false
  610. }
  611. ],
  612. "responses": {
  613. "200": {
  614. "description": "List of providers",
  615. "content": {
  616. "application/json": {
  617. "schema": {
  618. "type": "object",
  619. "properties": {
  620. "providers": {
  621. "type": "array",
  622. "items": {
  623. "$ref": "#/components/schemas/Provider"
  624. }
  625. },
  626. "default": {
  627. "type": "object",
  628. "additionalProperties": {
  629. "type": "string"
  630. }
  631. }
  632. },
  633. "required": ["providers", "default"],
  634. "additionalProperties": false,
  635. "description": "List of providers"
  636. }
  637. }
  638. }
  639. }
  640. },
  641. "description": "Get a list of all configured AI providers and their default models.",
  642. "summary": "List config providers",
  643. "x-codeSamples": [
  644. {
  645. "lang": "js",
  646. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  647. }
  648. ]
  649. }
  650. },
  651. "/experimental/console": {
  652. "get": {
  653. "tags": ["experimental"],
  654. "operationId": "experimental.console.get",
  655. "parameters": [
  656. {
  657. "name": "directory",
  658. "in": "query",
  659. "schema": {
  660. "type": "string"
  661. },
  662. "required": false
  663. },
  664. {
  665. "name": "workspace",
  666. "in": "query",
  667. "schema": {
  668. "type": "string"
  669. },
  670. "required": false
  671. }
  672. ],
  673. "responses": {
  674. "200": {
  675. "description": "Active Console provider metadata",
  676. "content": {
  677. "application/json": {
  678. "schema": {
  679. "$ref": "#/components/schemas/ConsoleState"
  680. }
  681. }
  682. }
  683. },
  684. "500": {
  685. "description": "InternalServerError",
  686. "content": {
  687. "application/json": {
  688. "schema": {
  689. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  690. }
  691. }
  692. }
  693. }
  694. },
  695. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  696. "summary": "Get active Console provider metadata",
  697. "x-codeSamples": [
  698. {
  699. "lang": "js",
  700. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  701. }
  702. ]
  703. }
  704. },
  705. "/experimental/console/orgs": {
  706. "get": {
  707. "tags": ["experimental"],
  708. "operationId": "experimental.console.listOrgs",
  709. "parameters": [
  710. {
  711. "name": "directory",
  712. "in": "query",
  713. "schema": {
  714. "type": "string"
  715. },
  716. "required": false
  717. },
  718. {
  719. "name": "workspace",
  720. "in": "query",
  721. "schema": {
  722. "type": "string"
  723. },
  724. "required": false
  725. }
  726. ],
  727. "responses": {
  728. "200": {
  729. "description": "Switchable Console orgs",
  730. "content": {
  731. "application/json": {
  732. "schema": {
  733. "type": "object",
  734. "properties": {
  735. "orgs": {
  736. "type": "array",
  737. "items": {
  738. "type": "object",
  739. "properties": {
  740. "accountID": {
  741. "type": "string"
  742. },
  743. "accountEmail": {
  744. "type": "string"
  745. },
  746. "accountUrl": {
  747. "type": "string"
  748. },
  749. "orgID": {
  750. "type": "string"
  751. },
  752. "orgName": {
  753. "type": "string"
  754. },
  755. "active": {
  756. "type": "boolean"
  757. }
  758. },
  759. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  760. "additionalProperties": false
  761. }
  762. }
  763. },
  764. "required": ["orgs"],
  765. "additionalProperties": false,
  766. "description": "Switchable Console orgs"
  767. }
  768. }
  769. }
  770. },
  771. "500": {
  772. "description": "InternalServerError",
  773. "content": {
  774. "application/json": {
  775. "schema": {
  776. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  777. }
  778. }
  779. }
  780. }
  781. },
  782. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  783. "summary": "List switchable Console orgs",
  784. "x-codeSamples": [
  785. {
  786. "lang": "js",
  787. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  788. }
  789. ]
  790. }
  791. },
  792. "/experimental/console/switch": {
  793. "post": {
  794. "tags": ["experimental"],
  795. "operationId": "experimental.console.switchOrg",
  796. "parameters": [
  797. {
  798. "name": "directory",
  799. "in": "query",
  800. "schema": {
  801. "type": "string"
  802. },
  803. "required": false
  804. },
  805. {
  806. "name": "workspace",
  807. "in": "query",
  808. "schema": {
  809. "type": "string"
  810. },
  811. "required": false
  812. }
  813. ],
  814. "responses": {
  815. "200": {
  816. "description": "Switch success",
  817. "content": {
  818. "application/json": {
  819. "schema": {
  820. "type": "boolean",
  821. "description": "Switch success"
  822. }
  823. }
  824. }
  825. }
  826. },
  827. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  828. "summary": "Switch active Console org",
  829. "requestBody": {
  830. "content": {
  831. "application/json": {
  832. "schema": {
  833. "type": "object",
  834. "properties": {
  835. "accountID": {
  836. "type": "string"
  837. },
  838. "orgID": {
  839. "type": "string"
  840. }
  841. },
  842. "required": ["accountID", "orgID"],
  843. "additionalProperties": false
  844. }
  845. }
  846. }
  847. },
  848. "x-codeSamples": [
  849. {
  850. "lang": "js",
  851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  852. }
  853. ]
  854. }
  855. },
  856. "/experimental/tool": {
  857. "get": {
  858. "tags": ["experimental"],
  859. "operationId": "tool.list",
  860. "parameters": [
  861. {
  862. "name": "directory",
  863. "in": "query",
  864. "schema": {
  865. "type": "string"
  866. },
  867. "required": false
  868. },
  869. {
  870. "name": "workspace",
  871. "in": "query",
  872. "schema": {
  873. "type": "string"
  874. },
  875. "required": false
  876. },
  877. {
  878. "name": "provider",
  879. "in": "query",
  880. "schema": {
  881. "type": "string"
  882. },
  883. "required": true
  884. },
  885. {
  886. "name": "model",
  887. "in": "query",
  888. "schema": {
  889. "type": "string"
  890. },
  891. "required": true
  892. }
  893. ],
  894. "responses": {
  895. "200": {
  896. "description": "Tools",
  897. "content": {
  898. "application/json": {
  899. "schema": {
  900. "$ref": "#/components/schemas/ToolList"
  901. }
  902. }
  903. }
  904. },
  905. "400": {
  906. "description": "Bad request",
  907. "content": {
  908. "application/json": {
  909. "schema": {
  910. "$ref": "#/components/schemas/BadRequestError"
  911. }
  912. }
  913. }
  914. }
  915. },
  916. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  917. "summary": "List tools",
  918. "x-codeSamples": [
  919. {
  920. "lang": "js",
  921. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  922. }
  923. ]
  924. }
  925. },
  926. "/experimental/tool/ids": {
  927. "get": {
  928. "tags": ["experimental"],
  929. "operationId": "tool.ids",
  930. "parameters": [
  931. {
  932. "name": "directory",
  933. "in": "query",
  934. "schema": {
  935. "type": "string"
  936. },
  937. "required": false
  938. },
  939. {
  940. "name": "workspace",
  941. "in": "query",
  942. "schema": {
  943. "type": "string"
  944. },
  945. "required": false
  946. }
  947. ],
  948. "responses": {
  949. "200": {
  950. "description": "Tool IDs",
  951. "content": {
  952. "application/json": {
  953. "schema": {
  954. "$ref": "#/components/schemas/ToolIDs"
  955. }
  956. }
  957. }
  958. },
  959. "400": {
  960. "description": "Bad request",
  961. "content": {
  962. "application/json": {
  963. "schema": {
  964. "$ref": "#/components/schemas/BadRequestError"
  965. }
  966. }
  967. }
  968. }
  969. },
  970. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  971. "summary": "List tool IDs",
  972. "x-codeSamples": [
  973. {
  974. "lang": "js",
  975. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  976. }
  977. ]
  978. }
  979. },
  980. "/experimental/worktree": {
  981. "get": {
  982. "tags": ["experimental"],
  983. "operationId": "worktree.list",
  984. "parameters": [
  985. {
  986. "name": "directory",
  987. "in": "query",
  988. "schema": {
  989. "type": "string"
  990. },
  991. "required": false
  992. },
  993. {
  994. "name": "workspace",
  995. "in": "query",
  996. "schema": {
  997. "type": "string"
  998. },
  999. "required": false
  1000. }
  1001. ],
  1002. "responses": {
  1003. "200": {
  1004. "description": "List of worktree directories",
  1005. "content": {
  1006. "application/json": {
  1007. "schema": {
  1008. "type": "array",
  1009. "items": {
  1010. "type": "string"
  1011. },
  1012. "description": "List of worktree directories"
  1013. }
  1014. }
  1015. }
  1016. },
  1017. "400": {
  1018. "description": "WorktreeError",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/WorktreeError"
  1023. }
  1024. }
  1025. }
  1026. }
  1027. },
  1028. "description": "List all sandbox worktrees for the current project.",
  1029. "summary": "List worktrees",
  1030. "x-codeSamples": [
  1031. {
  1032. "lang": "js",
  1033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1034. }
  1035. ]
  1036. },
  1037. "post": {
  1038. "tags": ["experimental"],
  1039. "operationId": "worktree.create",
  1040. "parameters": [
  1041. {
  1042. "name": "directory",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. },
  1049. {
  1050. "name": "workspace",
  1051. "in": "query",
  1052. "schema": {
  1053. "type": "string"
  1054. },
  1055. "required": false
  1056. }
  1057. ],
  1058. "responses": {
  1059. "200": {
  1060. "description": "Worktree created",
  1061. "content": {
  1062. "application/json": {
  1063. "schema": {
  1064. "$ref": "#/components/schemas/Worktree"
  1065. }
  1066. }
  1067. }
  1068. },
  1069. "400": {
  1070. "description": "WorktreeError",
  1071. "content": {
  1072. "application/json": {
  1073. "schema": {
  1074. "$ref": "#/components/schemas/WorktreeError"
  1075. }
  1076. }
  1077. }
  1078. }
  1079. },
  1080. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1081. "summary": "Create worktree",
  1082. "requestBody": {
  1083. "content": {
  1084. "application/json": {
  1085. "schema": {
  1086. "$ref": "#/components/schemas/WorktreeCreateInput"
  1087. }
  1088. }
  1089. }
  1090. },
  1091. "x-codeSamples": [
  1092. {
  1093. "lang": "js",
  1094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1095. }
  1096. ]
  1097. },
  1098. "delete": {
  1099. "tags": ["experimental"],
  1100. "operationId": "worktree.remove",
  1101. "parameters": [
  1102. {
  1103. "name": "directory",
  1104. "in": "query",
  1105. "schema": {
  1106. "type": "string"
  1107. },
  1108. "required": false
  1109. },
  1110. {
  1111. "name": "workspace",
  1112. "in": "query",
  1113. "schema": {
  1114. "type": "string"
  1115. },
  1116. "required": false
  1117. }
  1118. ],
  1119. "responses": {
  1120. "200": {
  1121. "description": "Worktree removed",
  1122. "content": {
  1123. "application/json": {
  1124. "schema": {
  1125. "type": "boolean",
  1126. "description": "Worktree removed"
  1127. }
  1128. }
  1129. }
  1130. },
  1131. "400": {
  1132. "description": "WorktreeError",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/WorktreeError"
  1137. }
  1138. }
  1139. }
  1140. }
  1141. },
  1142. "description": "Remove a git worktree and delete its branch.",
  1143. "summary": "Remove worktree",
  1144. "requestBody": {
  1145. "content": {
  1146. "application/json": {
  1147. "schema": {
  1148. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "x-codeSamples": [
  1154. {
  1155. "lang": "js",
  1156. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1157. }
  1158. ]
  1159. }
  1160. },
  1161. "/experimental/worktree/reset": {
  1162. "post": {
  1163. "tags": ["experimental"],
  1164. "operationId": "worktree.reset",
  1165. "parameters": [
  1166. {
  1167. "name": "directory",
  1168. "in": "query",
  1169. "schema": {
  1170. "type": "string"
  1171. },
  1172. "required": false
  1173. },
  1174. {
  1175. "name": "workspace",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. }
  1182. ],
  1183. "responses": {
  1184. "200": {
  1185. "description": "Worktree reset",
  1186. "content": {
  1187. "application/json": {
  1188. "schema": {
  1189. "type": "boolean",
  1190. "description": "Worktree reset"
  1191. }
  1192. }
  1193. }
  1194. },
  1195. "400": {
  1196. "description": "WorktreeError",
  1197. "content": {
  1198. "application/json": {
  1199. "schema": {
  1200. "$ref": "#/components/schemas/WorktreeError"
  1201. }
  1202. }
  1203. }
  1204. }
  1205. },
  1206. "description": "Reset a worktree branch to the primary default branch.",
  1207. "summary": "Reset worktree",
  1208. "requestBody": {
  1209. "content": {
  1210. "application/json": {
  1211. "schema": {
  1212. "$ref": "#/components/schemas/WorktreeResetInput"
  1213. }
  1214. }
  1215. }
  1216. },
  1217. "x-codeSamples": [
  1218. {
  1219. "lang": "js",
  1220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1221. }
  1222. ]
  1223. }
  1224. },
  1225. "/experimental/session": {
  1226. "get": {
  1227. "tags": ["experimental"],
  1228. "operationId": "experimental.session.list",
  1229. "parameters": [
  1230. {
  1231. "name": "directory",
  1232. "in": "query",
  1233. "schema": {
  1234. "type": "string"
  1235. },
  1236. "required": false
  1237. },
  1238. {
  1239. "name": "workspace",
  1240. "in": "query",
  1241. "schema": {
  1242. "type": "string"
  1243. },
  1244. "required": false
  1245. },
  1246. {
  1247. "name": "roots",
  1248. "in": "query",
  1249. "schema": {
  1250. "anyOf": [
  1251. {
  1252. "type": "boolean"
  1253. },
  1254. {
  1255. "type": "string",
  1256. "enum": ["true", "false"]
  1257. }
  1258. ]
  1259. },
  1260. "required": false
  1261. },
  1262. {
  1263. "name": "start",
  1264. "in": "query",
  1265. "schema": {
  1266. "type": "number"
  1267. },
  1268. "required": false
  1269. },
  1270. {
  1271. "name": "cursor",
  1272. "in": "query",
  1273. "schema": {
  1274. "type": "number"
  1275. },
  1276. "required": false
  1277. },
  1278. {
  1279. "name": "search",
  1280. "in": "query",
  1281. "schema": {
  1282. "type": "string"
  1283. },
  1284. "required": false
  1285. },
  1286. {
  1287. "name": "limit",
  1288. "in": "query",
  1289. "schema": {
  1290. "type": "number"
  1291. },
  1292. "required": false
  1293. },
  1294. {
  1295. "name": "archived",
  1296. "in": "query",
  1297. "schema": {
  1298. "anyOf": [
  1299. {
  1300. "type": "boolean"
  1301. },
  1302. {
  1303. "type": "string",
  1304. "enum": ["true", "false"]
  1305. }
  1306. ]
  1307. },
  1308. "required": false
  1309. }
  1310. ],
  1311. "responses": {
  1312. "200": {
  1313. "description": "List of sessions",
  1314. "content": {
  1315. "application/json": {
  1316. "schema": {
  1317. "type": "array",
  1318. "items": {
  1319. "$ref": "#/components/schemas/GlobalSession"
  1320. },
  1321. "description": "List of sessions"
  1322. }
  1323. }
  1324. }
  1325. }
  1326. },
  1327. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1328. "summary": "List sessions",
  1329. "x-codeSamples": [
  1330. {
  1331. "lang": "js",
  1332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1333. }
  1334. ]
  1335. }
  1336. },
  1337. "/experimental/resource": {
  1338. "get": {
  1339. "tags": ["experimental"],
  1340. "operationId": "experimental.resource.list",
  1341. "parameters": [
  1342. {
  1343. "name": "directory",
  1344. "in": "query",
  1345. "schema": {
  1346. "type": "string"
  1347. },
  1348. "required": false
  1349. },
  1350. {
  1351. "name": "workspace",
  1352. "in": "query",
  1353. "schema": {
  1354. "type": "string"
  1355. },
  1356. "required": false
  1357. }
  1358. ],
  1359. "responses": {
  1360. "200": {
  1361. "description": "MCP resources",
  1362. "content": {
  1363. "application/json": {
  1364. "schema": {
  1365. "type": "object",
  1366. "additionalProperties": {
  1367. "$ref": "#/components/schemas/McpResource"
  1368. },
  1369. "description": "MCP resources"
  1370. }
  1371. }
  1372. }
  1373. }
  1374. },
  1375. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1376. "summary": "Get MCP resources",
  1377. "x-codeSamples": [
  1378. {
  1379. "lang": "js",
  1380. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1381. }
  1382. ]
  1383. }
  1384. },
  1385. "/find": {
  1386. "get": {
  1387. "tags": ["file"],
  1388. "operationId": "find.text",
  1389. "parameters": [
  1390. {
  1391. "name": "directory",
  1392. "in": "query",
  1393. "schema": {
  1394. "type": "string"
  1395. },
  1396. "required": false
  1397. },
  1398. {
  1399. "name": "workspace",
  1400. "in": "query",
  1401. "schema": {
  1402. "type": "string"
  1403. },
  1404. "required": false
  1405. },
  1406. {
  1407. "name": "pattern",
  1408. "in": "query",
  1409. "schema": {
  1410. "type": "string"
  1411. },
  1412. "required": true
  1413. }
  1414. ],
  1415. "responses": {
  1416. "200": {
  1417. "description": "Matches",
  1418. "content": {
  1419. "application/json": {
  1420. "schema": {
  1421. "type": "array",
  1422. "items": {
  1423. "type": "object",
  1424. "properties": {
  1425. "path": {
  1426. "type": "object",
  1427. "properties": {
  1428. "text": {
  1429. "type": "string"
  1430. }
  1431. },
  1432. "required": ["text"],
  1433. "additionalProperties": false
  1434. },
  1435. "lines": {
  1436. "type": "object",
  1437. "properties": {
  1438. "text": {
  1439. "type": "string"
  1440. }
  1441. },
  1442. "required": ["text"],
  1443. "additionalProperties": false
  1444. },
  1445. "line_number": {
  1446. "type": "integer",
  1447. "minimum": 0
  1448. },
  1449. "absolute_offset": {
  1450. "type": "integer",
  1451. "minimum": 0
  1452. },
  1453. "submatches": {
  1454. "type": "array",
  1455. "items": {
  1456. "type": "object",
  1457. "properties": {
  1458. "match": {
  1459. "type": "object",
  1460. "properties": {
  1461. "text": {
  1462. "type": "string"
  1463. }
  1464. },
  1465. "required": ["text"],
  1466. "additionalProperties": false
  1467. },
  1468. "start": {
  1469. "type": "integer",
  1470. "minimum": 0
  1471. },
  1472. "end": {
  1473. "type": "integer",
  1474. "minimum": 0
  1475. }
  1476. },
  1477. "required": ["match", "start", "end"],
  1478. "additionalProperties": false
  1479. }
  1480. }
  1481. },
  1482. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1483. "additionalProperties": false
  1484. },
  1485. "description": "Matches"
  1486. }
  1487. }
  1488. }
  1489. }
  1490. },
  1491. "description": "Search for text patterns across files in the project using ripgrep.",
  1492. "summary": "Find text",
  1493. "x-codeSamples": [
  1494. {
  1495. "lang": "js",
  1496. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1497. }
  1498. ]
  1499. }
  1500. },
  1501. "/find/file": {
  1502. "get": {
  1503. "tags": ["file"],
  1504. "operationId": "find.files",
  1505. "parameters": [
  1506. {
  1507. "name": "directory",
  1508. "in": "query",
  1509. "schema": {
  1510. "type": "string"
  1511. },
  1512. "required": false
  1513. },
  1514. {
  1515. "name": "workspace",
  1516. "in": "query",
  1517. "schema": {
  1518. "type": "string"
  1519. },
  1520. "required": false
  1521. },
  1522. {
  1523. "name": "query",
  1524. "in": "query",
  1525. "schema": {
  1526. "type": "string"
  1527. },
  1528. "required": true
  1529. },
  1530. {
  1531. "name": "dirs",
  1532. "in": "query",
  1533. "schema": {
  1534. "type": "string",
  1535. "enum": ["true", "false"]
  1536. },
  1537. "required": false
  1538. },
  1539. {
  1540. "name": "type",
  1541. "in": "query",
  1542. "schema": {
  1543. "type": "string",
  1544. "enum": ["file", "directory"]
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "limit",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "integer",
  1553. "minimum": 1,
  1554. "maximum": 200
  1555. },
  1556. "required": false
  1557. }
  1558. ],
  1559. "responses": {
  1560. "200": {
  1561. "description": "File paths",
  1562. "content": {
  1563. "application/json": {
  1564. "schema": {
  1565. "type": "array",
  1566. "items": {
  1567. "type": "string"
  1568. },
  1569. "description": "File paths"
  1570. }
  1571. }
  1572. }
  1573. }
  1574. },
  1575. "description": "Search for files or directories by name or pattern in the project directory.",
  1576. "summary": "Find files",
  1577. "x-codeSamples": [
  1578. {
  1579. "lang": "js",
  1580. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1581. }
  1582. ]
  1583. }
  1584. },
  1585. "/find/symbol": {
  1586. "get": {
  1587. "tags": ["file"],
  1588. "operationId": "find.symbols",
  1589. "parameters": [
  1590. {
  1591. "name": "directory",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": false
  1597. },
  1598. {
  1599. "name": "workspace",
  1600. "in": "query",
  1601. "schema": {
  1602. "type": "string"
  1603. },
  1604. "required": false
  1605. },
  1606. {
  1607. "name": "query",
  1608. "in": "query",
  1609. "schema": {
  1610. "type": "string"
  1611. },
  1612. "required": true
  1613. }
  1614. ],
  1615. "responses": {
  1616. "200": {
  1617. "description": "Symbols",
  1618. "content": {
  1619. "application/json": {
  1620. "schema": {
  1621. "type": "array",
  1622. "items": {
  1623. "$ref": "#/components/schemas/Symbol"
  1624. },
  1625. "description": "Symbols"
  1626. }
  1627. }
  1628. }
  1629. }
  1630. },
  1631. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1632. "summary": "Find symbols",
  1633. "x-codeSamples": [
  1634. {
  1635. "lang": "js",
  1636. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1637. }
  1638. ]
  1639. }
  1640. },
  1641. "/file": {
  1642. "get": {
  1643. "tags": ["file"],
  1644. "operationId": "file.list",
  1645. "parameters": [
  1646. {
  1647. "name": "directory",
  1648. "in": "query",
  1649. "schema": {
  1650. "type": "string"
  1651. },
  1652. "required": false
  1653. },
  1654. {
  1655. "name": "workspace",
  1656. "in": "query",
  1657. "schema": {
  1658. "type": "string"
  1659. },
  1660. "required": false
  1661. },
  1662. {
  1663. "name": "path",
  1664. "in": "query",
  1665. "schema": {
  1666. "type": "string"
  1667. },
  1668. "required": true
  1669. }
  1670. ],
  1671. "responses": {
  1672. "200": {
  1673. "description": "Files and directories",
  1674. "content": {
  1675. "application/json": {
  1676. "schema": {
  1677. "type": "array",
  1678. "items": {
  1679. "$ref": "#/components/schemas/FileNode"
  1680. },
  1681. "description": "Files and directories"
  1682. }
  1683. }
  1684. }
  1685. }
  1686. },
  1687. "description": "List files and directories in a specified path.",
  1688. "summary": "List files",
  1689. "x-codeSamples": [
  1690. {
  1691. "lang": "js",
  1692. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1693. }
  1694. ]
  1695. }
  1696. },
  1697. "/file/content": {
  1698. "get": {
  1699. "tags": ["file"],
  1700. "operationId": "file.read",
  1701. "parameters": [
  1702. {
  1703. "name": "directory",
  1704. "in": "query",
  1705. "schema": {
  1706. "type": "string"
  1707. },
  1708. "required": false
  1709. },
  1710. {
  1711. "name": "workspace",
  1712. "in": "query",
  1713. "schema": {
  1714. "type": "string"
  1715. },
  1716. "required": false
  1717. },
  1718. {
  1719. "name": "path",
  1720. "in": "query",
  1721. "schema": {
  1722. "type": "string"
  1723. },
  1724. "required": true
  1725. }
  1726. ],
  1727. "responses": {
  1728. "200": {
  1729. "description": "File content",
  1730. "content": {
  1731. "application/json": {
  1732. "schema": {
  1733. "$ref": "#/components/schemas/FileContent"
  1734. }
  1735. }
  1736. }
  1737. }
  1738. },
  1739. "description": "Read the content of a specified file.",
  1740. "summary": "Read file",
  1741. "x-codeSamples": [
  1742. {
  1743. "lang": "js",
  1744. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1745. }
  1746. ]
  1747. }
  1748. },
  1749. "/file/status": {
  1750. "get": {
  1751. "tags": ["file"],
  1752. "operationId": "file.status",
  1753. "parameters": [
  1754. {
  1755. "name": "directory",
  1756. "in": "query",
  1757. "schema": {
  1758. "type": "string"
  1759. },
  1760. "required": false
  1761. },
  1762. {
  1763. "name": "workspace",
  1764. "in": "query",
  1765. "schema": {
  1766. "type": "string"
  1767. },
  1768. "required": false
  1769. }
  1770. ],
  1771. "responses": {
  1772. "200": {
  1773. "description": "File status",
  1774. "content": {
  1775. "application/json": {
  1776. "schema": {
  1777. "type": "array",
  1778. "items": {
  1779. "$ref": "#/components/schemas/File"
  1780. },
  1781. "description": "File status"
  1782. }
  1783. }
  1784. }
  1785. }
  1786. },
  1787. "description": "Get the git status of all files in the project.",
  1788. "summary": "Get file status",
  1789. "x-codeSamples": [
  1790. {
  1791. "lang": "js",
  1792. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  1793. }
  1794. ]
  1795. }
  1796. },
  1797. "/instance/dispose": {
  1798. "post": {
  1799. "tags": ["instance"],
  1800. "operationId": "instance.dispose",
  1801. "parameters": [
  1802. {
  1803. "name": "directory",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "workspace",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": false
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Instance disposed",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "boolean",
  1826. "description": "Instance disposed"
  1827. }
  1828. }
  1829. }
  1830. }
  1831. },
  1832. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  1833. "summary": "Dispose instance",
  1834. "x-codeSamples": [
  1835. {
  1836. "lang": "js",
  1837. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  1838. }
  1839. ]
  1840. }
  1841. },
  1842. "/path": {
  1843. "get": {
  1844. "tags": ["instance"],
  1845. "operationId": "path.get",
  1846. "parameters": [
  1847. {
  1848. "name": "directory",
  1849. "in": "query",
  1850. "schema": {
  1851. "type": "string"
  1852. },
  1853. "required": false
  1854. },
  1855. {
  1856. "name": "workspace",
  1857. "in": "query",
  1858. "schema": {
  1859. "type": "string"
  1860. },
  1861. "required": false
  1862. }
  1863. ],
  1864. "responses": {
  1865. "200": {
  1866. "description": "Path",
  1867. "content": {
  1868. "application/json": {
  1869. "schema": {
  1870. "$ref": "#/components/schemas/Path"
  1871. }
  1872. }
  1873. }
  1874. }
  1875. },
  1876. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  1877. "summary": "Get paths",
  1878. "x-codeSamples": [
  1879. {
  1880. "lang": "js",
  1881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  1882. }
  1883. ]
  1884. }
  1885. },
  1886. "/vcs": {
  1887. "get": {
  1888. "tags": ["instance"],
  1889. "operationId": "vcs.get",
  1890. "parameters": [
  1891. {
  1892. "name": "directory",
  1893. "in": "query",
  1894. "schema": {
  1895. "type": "string"
  1896. },
  1897. "required": false
  1898. },
  1899. {
  1900. "name": "workspace",
  1901. "in": "query",
  1902. "schema": {
  1903. "type": "string"
  1904. },
  1905. "required": false
  1906. }
  1907. ],
  1908. "responses": {
  1909. "200": {
  1910. "description": "VCS info",
  1911. "content": {
  1912. "application/json": {
  1913. "schema": {
  1914. "$ref": "#/components/schemas/VcsInfo"
  1915. }
  1916. }
  1917. }
  1918. }
  1919. },
  1920. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  1921. "summary": "Get VCS info",
  1922. "x-codeSamples": [
  1923. {
  1924. "lang": "js",
  1925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  1926. }
  1927. ]
  1928. }
  1929. },
  1930. "/vcs/status": {
  1931. "get": {
  1932. "tags": ["instance"],
  1933. "operationId": "vcs.status",
  1934. "parameters": [
  1935. {
  1936. "name": "directory",
  1937. "in": "query",
  1938. "schema": {
  1939. "type": "string"
  1940. },
  1941. "required": false
  1942. },
  1943. {
  1944. "name": "workspace",
  1945. "in": "query",
  1946. "schema": {
  1947. "type": "string"
  1948. },
  1949. "required": false
  1950. }
  1951. ],
  1952. "responses": {
  1953. "200": {
  1954. "description": "VCS status",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "type": "array",
  1959. "items": {
  1960. "$ref": "#/components/schemas/VcsFileStatus"
  1961. },
  1962. "description": "VCS status"
  1963. }
  1964. }
  1965. }
  1966. }
  1967. },
  1968. "description": "Retrieve changed files in the current working tree without patches.",
  1969. "summary": "Get VCS status",
  1970. "x-codeSamples": [
  1971. {
  1972. "lang": "js",
  1973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  1974. }
  1975. ]
  1976. }
  1977. },
  1978. "/vcs/diff": {
  1979. "get": {
  1980. "tags": ["instance"],
  1981. "operationId": "vcs.diff",
  1982. "parameters": [
  1983. {
  1984. "name": "directory",
  1985. "in": "query",
  1986. "schema": {
  1987. "type": "string"
  1988. },
  1989. "required": false
  1990. },
  1991. {
  1992. "name": "workspace",
  1993. "in": "query",
  1994. "schema": {
  1995. "type": "string"
  1996. },
  1997. "required": false
  1998. },
  1999. {
  2000. "name": "mode",
  2001. "in": "query",
  2002. "schema": {
  2003. "type": "string",
  2004. "enum": ["git", "branch"]
  2005. },
  2006. "required": true
  2007. }
  2008. ],
  2009. "responses": {
  2010. "200": {
  2011. "description": "VCS diff",
  2012. "content": {
  2013. "application/json": {
  2014. "schema": {
  2015. "type": "array",
  2016. "items": {
  2017. "$ref": "#/components/schemas/VcsFileDiff"
  2018. },
  2019. "description": "VCS diff"
  2020. }
  2021. }
  2022. }
  2023. }
  2024. },
  2025. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2026. "summary": "Get VCS diff",
  2027. "x-codeSamples": [
  2028. {
  2029. "lang": "js",
  2030. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2031. }
  2032. ]
  2033. }
  2034. },
  2035. "/vcs/diff/raw": {
  2036. "get": {
  2037. "tags": ["instance"],
  2038. "operationId": "vcs.diff.raw",
  2039. "parameters": [
  2040. {
  2041. "name": "directory",
  2042. "in": "query",
  2043. "schema": {
  2044. "type": "string"
  2045. },
  2046. "required": false
  2047. },
  2048. {
  2049. "name": "workspace",
  2050. "in": "query",
  2051. "schema": {
  2052. "type": "string"
  2053. },
  2054. "required": false
  2055. }
  2056. ],
  2057. "responses": {
  2058. "200": {
  2059. "description": "Raw VCS diff",
  2060. "content": {
  2061. "text/x-diff; charset=utf-8": {
  2062. "schema": {
  2063. "type": "string"
  2064. }
  2065. }
  2066. }
  2067. }
  2068. },
  2069. "description": "Retrieve a raw patch for current uncommitted changes.",
  2070. "summary": "Get raw VCS diff",
  2071. "x-codeSamples": [
  2072. {
  2073. "lang": "js",
  2074. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2075. }
  2076. ]
  2077. }
  2078. },
  2079. "/vcs/apply": {
  2080. "post": {
  2081. "tags": ["instance"],
  2082. "operationId": "vcs.apply",
  2083. "parameters": [
  2084. {
  2085. "name": "directory",
  2086. "in": "query",
  2087. "schema": {
  2088. "type": "string"
  2089. },
  2090. "required": false
  2091. },
  2092. {
  2093. "name": "workspace",
  2094. "in": "query",
  2095. "schema": {
  2096. "type": "string"
  2097. },
  2098. "required": false
  2099. }
  2100. ],
  2101. "responses": {
  2102. "200": {
  2103. "description": "VCS patch applied",
  2104. "content": {
  2105. "application/json": {
  2106. "schema": {
  2107. "type": "object",
  2108. "properties": {
  2109. "applied": {
  2110. "type": "boolean"
  2111. }
  2112. },
  2113. "required": ["applied"],
  2114. "additionalProperties": false,
  2115. "description": "VCS patch applied"
  2116. }
  2117. }
  2118. }
  2119. },
  2120. "400": {
  2121. "description": "VcsApplyError",
  2122. "content": {
  2123. "application/json": {
  2124. "schema": {
  2125. "$ref": "#/components/schemas/VcsApplyError"
  2126. }
  2127. }
  2128. }
  2129. }
  2130. },
  2131. "description": "Apply a raw patch to the current working tree.",
  2132. "summary": "Apply VCS patch",
  2133. "requestBody": {
  2134. "content": {
  2135. "application/json": {
  2136. "schema": {
  2137. "type": "object",
  2138. "properties": {
  2139. "patch": {
  2140. "type": "string"
  2141. }
  2142. },
  2143. "required": ["patch"],
  2144. "additionalProperties": false
  2145. }
  2146. }
  2147. }
  2148. },
  2149. "x-codeSamples": [
  2150. {
  2151. "lang": "js",
  2152. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2153. }
  2154. ]
  2155. }
  2156. },
  2157. "/command": {
  2158. "get": {
  2159. "tags": ["instance"],
  2160. "operationId": "command.list",
  2161. "parameters": [
  2162. {
  2163. "name": "directory",
  2164. "in": "query",
  2165. "schema": {
  2166. "type": "string"
  2167. },
  2168. "required": false
  2169. },
  2170. {
  2171. "name": "workspace",
  2172. "in": "query",
  2173. "schema": {
  2174. "type": "string"
  2175. },
  2176. "required": false
  2177. }
  2178. ],
  2179. "responses": {
  2180. "200": {
  2181. "description": "List of commands",
  2182. "content": {
  2183. "application/json": {
  2184. "schema": {
  2185. "type": "array",
  2186. "items": {
  2187. "$ref": "#/components/schemas/Command"
  2188. },
  2189. "description": "List of commands"
  2190. }
  2191. }
  2192. }
  2193. }
  2194. },
  2195. "description": "Get a list of all available commands in the OpenCode system.",
  2196. "summary": "List commands",
  2197. "x-codeSamples": [
  2198. {
  2199. "lang": "js",
  2200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2201. }
  2202. ]
  2203. }
  2204. },
  2205. "/agent": {
  2206. "get": {
  2207. "tags": ["instance"],
  2208. "operationId": "app.agents",
  2209. "parameters": [
  2210. {
  2211. "name": "directory",
  2212. "in": "query",
  2213. "schema": {
  2214. "type": "string"
  2215. },
  2216. "required": false
  2217. },
  2218. {
  2219. "name": "workspace",
  2220. "in": "query",
  2221. "schema": {
  2222. "type": "string"
  2223. },
  2224. "required": false
  2225. }
  2226. ],
  2227. "responses": {
  2228. "200": {
  2229. "description": "List of agents",
  2230. "content": {
  2231. "application/json": {
  2232. "schema": {
  2233. "type": "array",
  2234. "items": {
  2235. "$ref": "#/components/schemas/Agent"
  2236. },
  2237. "description": "List of agents"
  2238. }
  2239. }
  2240. }
  2241. }
  2242. },
  2243. "description": "Get a list of all available AI agents in the OpenCode system.",
  2244. "summary": "List agents",
  2245. "x-codeSamples": [
  2246. {
  2247. "lang": "js",
  2248. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2249. }
  2250. ]
  2251. }
  2252. },
  2253. "/skill": {
  2254. "get": {
  2255. "tags": ["instance"],
  2256. "operationId": "app.skills",
  2257. "parameters": [
  2258. {
  2259. "name": "directory",
  2260. "in": "query",
  2261. "schema": {
  2262. "type": "string"
  2263. },
  2264. "required": false
  2265. },
  2266. {
  2267. "name": "workspace",
  2268. "in": "query",
  2269. "schema": {
  2270. "type": "string"
  2271. },
  2272. "required": false
  2273. }
  2274. ],
  2275. "responses": {
  2276. "200": {
  2277. "description": "List of skills",
  2278. "content": {
  2279. "application/json": {
  2280. "schema": {
  2281. "type": "array",
  2282. "items": {
  2283. "type": "object",
  2284. "properties": {
  2285. "name": {
  2286. "type": "string"
  2287. },
  2288. "description": {
  2289. "type": "string"
  2290. },
  2291. "location": {
  2292. "type": "string"
  2293. },
  2294. "content": {
  2295. "type": "string"
  2296. }
  2297. },
  2298. "required": ["name", "location", "content"],
  2299. "additionalProperties": false
  2300. },
  2301. "description": "List of skills"
  2302. }
  2303. }
  2304. }
  2305. }
  2306. },
  2307. "description": "Get a list of all available skills in the OpenCode system.",
  2308. "summary": "List skills",
  2309. "x-codeSamples": [
  2310. {
  2311. "lang": "js",
  2312. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2313. }
  2314. ]
  2315. }
  2316. },
  2317. "/lsp": {
  2318. "get": {
  2319. "tags": ["instance"],
  2320. "operationId": "lsp.status",
  2321. "parameters": [
  2322. {
  2323. "name": "directory",
  2324. "in": "query",
  2325. "schema": {
  2326. "type": "string"
  2327. },
  2328. "required": false
  2329. },
  2330. {
  2331. "name": "workspace",
  2332. "in": "query",
  2333. "schema": {
  2334. "type": "string"
  2335. },
  2336. "required": false
  2337. }
  2338. ],
  2339. "responses": {
  2340. "200": {
  2341. "description": "LSP server status",
  2342. "content": {
  2343. "application/json": {
  2344. "schema": {
  2345. "type": "array",
  2346. "items": {
  2347. "$ref": "#/components/schemas/LSPStatus"
  2348. },
  2349. "description": "LSP server status"
  2350. }
  2351. }
  2352. }
  2353. }
  2354. },
  2355. "description": "Get LSP server status",
  2356. "summary": "Get LSP status",
  2357. "x-codeSamples": [
  2358. {
  2359. "lang": "js",
  2360. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2361. }
  2362. ]
  2363. }
  2364. },
  2365. "/formatter": {
  2366. "get": {
  2367. "tags": ["instance"],
  2368. "operationId": "formatter.status",
  2369. "parameters": [
  2370. {
  2371. "name": "directory",
  2372. "in": "query",
  2373. "schema": {
  2374. "type": "string"
  2375. },
  2376. "required": false
  2377. },
  2378. {
  2379. "name": "workspace",
  2380. "in": "query",
  2381. "schema": {
  2382. "type": "string"
  2383. },
  2384. "required": false
  2385. }
  2386. ],
  2387. "responses": {
  2388. "200": {
  2389. "description": "Formatter status",
  2390. "content": {
  2391. "application/json": {
  2392. "schema": {
  2393. "type": "array",
  2394. "items": {
  2395. "$ref": "#/components/schemas/FormatterStatus"
  2396. },
  2397. "description": "Formatter status"
  2398. }
  2399. }
  2400. }
  2401. }
  2402. },
  2403. "description": "Get formatter status",
  2404. "summary": "Get formatter status",
  2405. "x-codeSamples": [
  2406. {
  2407. "lang": "js",
  2408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2409. }
  2410. ]
  2411. }
  2412. },
  2413. "/mcp": {
  2414. "get": {
  2415. "tags": ["mcp"],
  2416. "operationId": "mcp.status",
  2417. "parameters": [
  2418. {
  2419. "name": "directory",
  2420. "in": "query",
  2421. "schema": {
  2422. "type": "string"
  2423. },
  2424. "required": false
  2425. },
  2426. {
  2427. "name": "workspace",
  2428. "in": "query",
  2429. "schema": {
  2430. "type": "string"
  2431. },
  2432. "required": false
  2433. }
  2434. ],
  2435. "responses": {
  2436. "200": {
  2437. "description": "MCP server status",
  2438. "content": {
  2439. "application/json": {
  2440. "schema": {
  2441. "type": "object",
  2442. "additionalProperties": {
  2443. "$ref": "#/components/schemas/MCPStatus"
  2444. },
  2445. "description": "MCP server status"
  2446. }
  2447. }
  2448. }
  2449. }
  2450. },
  2451. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2452. "summary": "Get MCP status",
  2453. "x-codeSamples": [
  2454. {
  2455. "lang": "js",
  2456. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2457. }
  2458. ]
  2459. },
  2460. "post": {
  2461. "tags": ["mcp"],
  2462. "operationId": "mcp.add",
  2463. "parameters": [
  2464. {
  2465. "name": "directory",
  2466. "in": "query",
  2467. "schema": {
  2468. "type": "string"
  2469. },
  2470. "required": false
  2471. },
  2472. {
  2473. "name": "workspace",
  2474. "in": "query",
  2475. "schema": {
  2476. "type": "string"
  2477. },
  2478. "required": false
  2479. }
  2480. ],
  2481. "responses": {
  2482. "200": {
  2483. "description": "MCP server added successfully",
  2484. "content": {
  2485. "application/json": {
  2486. "schema": {
  2487. "type": "object",
  2488. "additionalProperties": {
  2489. "$ref": "#/components/schemas/MCPStatus"
  2490. },
  2491. "description": "MCP server added successfully"
  2492. }
  2493. }
  2494. }
  2495. },
  2496. "400": {
  2497. "description": "Bad request",
  2498. "content": {
  2499. "application/json": {
  2500. "schema": {
  2501. "$ref": "#/components/schemas/BadRequestError"
  2502. }
  2503. }
  2504. }
  2505. }
  2506. },
  2507. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2508. "summary": "Add MCP server",
  2509. "requestBody": {
  2510. "content": {
  2511. "application/json": {
  2512. "schema": {
  2513. "type": "object",
  2514. "properties": {
  2515. "name": {
  2516. "type": "string"
  2517. },
  2518. "config": {
  2519. "anyOf": [
  2520. {
  2521. "$ref": "#/components/schemas/McpLocalConfig"
  2522. },
  2523. {
  2524. "$ref": "#/components/schemas/McpRemoteConfig"
  2525. }
  2526. ]
  2527. }
  2528. },
  2529. "required": ["name", "config"],
  2530. "additionalProperties": false
  2531. }
  2532. }
  2533. }
  2534. },
  2535. "x-codeSamples": [
  2536. {
  2537. "lang": "js",
  2538. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2539. }
  2540. ]
  2541. }
  2542. },
  2543. "/mcp/{name}/auth": {
  2544. "post": {
  2545. "tags": ["mcp"],
  2546. "operationId": "mcp.auth.start",
  2547. "parameters": [
  2548. {
  2549. "name": "name",
  2550. "in": "path",
  2551. "schema": {
  2552. "type": "string"
  2553. },
  2554. "required": true
  2555. },
  2556. {
  2557. "name": "directory",
  2558. "in": "query",
  2559. "schema": {
  2560. "type": "string"
  2561. },
  2562. "required": false
  2563. },
  2564. {
  2565. "name": "workspace",
  2566. "in": "query",
  2567. "schema": {
  2568. "type": "string"
  2569. },
  2570. "required": false
  2571. }
  2572. ],
  2573. "responses": {
  2574. "200": {
  2575. "description": "OAuth flow started",
  2576. "content": {
  2577. "application/json": {
  2578. "schema": {
  2579. "type": "object",
  2580. "properties": {
  2581. "authorizationUrl": {
  2582. "type": "string"
  2583. },
  2584. "oauthState": {
  2585. "type": "string"
  2586. }
  2587. },
  2588. "required": ["authorizationUrl", "oauthState"],
  2589. "additionalProperties": false,
  2590. "description": "OAuth flow started"
  2591. }
  2592. }
  2593. }
  2594. },
  2595. "400": {
  2596. "description": "McpUnsupportedOAuthError",
  2597. "content": {
  2598. "application/json": {
  2599. "schema": {
  2600. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2601. }
  2602. }
  2603. }
  2604. },
  2605. "404": {
  2606. "description": "Not found",
  2607. "content": {
  2608. "application/json": {
  2609. "schema": {
  2610. "$ref": "#/components/schemas/NotFoundError"
  2611. }
  2612. }
  2613. }
  2614. }
  2615. },
  2616. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  2617. "summary": "Start MCP OAuth",
  2618. "x-codeSamples": [
  2619. {
  2620. "lang": "js",
  2621. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  2622. }
  2623. ]
  2624. },
  2625. "delete": {
  2626. "tags": ["mcp"],
  2627. "operationId": "mcp.auth.remove",
  2628. "parameters": [
  2629. {
  2630. "name": "name",
  2631. "in": "path",
  2632. "schema": {
  2633. "type": "string"
  2634. },
  2635. "required": true
  2636. },
  2637. {
  2638. "name": "directory",
  2639. "in": "query",
  2640. "schema": {
  2641. "type": "string"
  2642. },
  2643. "required": false
  2644. },
  2645. {
  2646. "name": "workspace",
  2647. "in": "query",
  2648. "schema": {
  2649. "type": "string"
  2650. },
  2651. "required": false
  2652. }
  2653. ],
  2654. "responses": {
  2655. "200": {
  2656. "description": "OAuth credentials removed",
  2657. "content": {
  2658. "application/json": {
  2659. "schema": {
  2660. "type": "object",
  2661. "properties": {
  2662. "success": {
  2663. "type": "boolean",
  2664. "enum": [true]
  2665. }
  2666. },
  2667. "required": ["success"],
  2668. "additionalProperties": false,
  2669. "description": "OAuth credentials removed"
  2670. }
  2671. }
  2672. }
  2673. },
  2674. "404": {
  2675. "description": "Not found",
  2676. "content": {
  2677. "application/json": {
  2678. "schema": {
  2679. "$ref": "#/components/schemas/NotFoundError"
  2680. }
  2681. }
  2682. }
  2683. }
  2684. },
  2685. "description": "Remove OAuth credentials for an MCP server.",
  2686. "summary": "Remove MCP OAuth",
  2687. "x-codeSamples": [
  2688. {
  2689. "lang": "js",
  2690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  2691. }
  2692. ]
  2693. }
  2694. },
  2695. "/mcp/{name}/auth/callback": {
  2696. "post": {
  2697. "tags": ["mcp"],
  2698. "operationId": "mcp.auth.callback",
  2699. "parameters": [
  2700. {
  2701. "name": "name",
  2702. "in": "path",
  2703. "schema": {
  2704. "type": "string"
  2705. },
  2706. "required": true
  2707. },
  2708. {
  2709. "name": "directory",
  2710. "in": "query",
  2711. "schema": {
  2712. "type": "string"
  2713. },
  2714. "required": false
  2715. },
  2716. {
  2717. "name": "workspace",
  2718. "in": "query",
  2719. "schema": {
  2720. "type": "string"
  2721. },
  2722. "required": false
  2723. }
  2724. ],
  2725. "responses": {
  2726. "200": {
  2727. "description": "OAuth authentication completed",
  2728. "content": {
  2729. "application/json": {
  2730. "schema": {
  2731. "$ref": "#/components/schemas/MCPStatus"
  2732. }
  2733. }
  2734. }
  2735. },
  2736. "400": {
  2737. "description": "Bad request",
  2738. "content": {
  2739. "application/json": {
  2740. "schema": {
  2741. "$ref": "#/components/schemas/BadRequestError"
  2742. }
  2743. }
  2744. }
  2745. },
  2746. "404": {
  2747. "description": "Not found",
  2748. "content": {
  2749. "application/json": {
  2750. "schema": {
  2751. "$ref": "#/components/schemas/NotFoundError"
  2752. }
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  2758. "summary": "Complete MCP OAuth",
  2759. "requestBody": {
  2760. "content": {
  2761. "application/json": {
  2762. "schema": {
  2763. "type": "object",
  2764. "properties": {
  2765. "code": {
  2766. "type": "string"
  2767. }
  2768. },
  2769. "required": ["code"],
  2770. "additionalProperties": false
  2771. }
  2772. }
  2773. }
  2774. },
  2775. "x-codeSamples": [
  2776. {
  2777. "lang": "js",
  2778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  2779. }
  2780. ]
  2781. }
  2782. },
  2783. "/mcp/{name}/auth/authenticate": {
  2784. "post": {
  2785. "tags": ["mcp"],
  2786. "operationId": "mcp.auth.authenticate",
  2787. "parameters": [
  2788. {
  2789. "name": "name",
  2790. "in": "path",
  2791. "schema": {
  2792. "type": "string"
  2793. },
  2794. "required": true
  2795. },
  2796. {
  2797. "name": "directory",
  2798. "in": "query",
  2799. "schema": {
  2800. "type": "string"
  2801. },
  2802. "required": false
  2803. },
  2804. {
  2805. "name": "workspace",
  2806. "in": "query",
  2807. "schema": {
  2808. "type": "string"
  2809. },
  2810. "required": false
  2811. }
  2812. ],
  2813. "responses": {
  2814. "200": {
  2815. "description": "OAuth authentication completed",
  2816. "content": {
  2817. "application/json": {
  2818. "schema": {
  2819. "$ref": "#/components/schemas/MCPStatus"
  2820. }
  2821. }
  2822. }
  2823. },
  2824. "400": {
  2825. "description": "McpUnsupportedOAuthError",
  2826. "content": {
  2827. "application/json": {
  2828. "schema": {
  2829. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2830. }
  2831. }
  2832. }
  2833. },
  2834. "404": {
  2835. "description": "Not found",
  2836. "content": {
  2837. "application/json": {
  2838. "schema": {
  2839. "$ref": "#/components/schemas/NotFoundError"
  2840. }
  2841. }
  2842. }
  2843. }
  2844. },
  2845. "description": "Start OAuth flow and wait for callback (opens browser).",
  2846. "summary": "Authenticate MCP OAuth",
  2847. "x-codeSamples": [
  2848. {
  2849. "lang": "js",
  2850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  2851. }
  2852. ]
  2853. }
  2854. },
  2855. "/mcp/{name}/connect": {
  2856. "post": {
  2857. "tags": ["mcp"],
  2858. "operationId": "mcp.connect",
  2859. "parameters": [
  2860. {
  2861. "name": "name",
  2862. "in": "path",
  2863. "schema": {
  2864. "type": "string"
  2865. },
  2866. "required": true
  2867. },
  2868. {
  2869. "name": "directory",
  2870. "in": "query",
  2871. "schema": {
  2872. "type": "string"
  2873. },
  2874. "required": false
  2875. },
  2876. {
  2877. "name": "workspace",
  2878. "in": "query",
  2879. "schema": {
  2880. "type": "string"
  2881. },
  2882. "required": false
  2883. }
  2884. ],
  2885. "responses": {
  2886. "200": {
  2887. "description": "MCP server connected successfully",
  2888. "content": {
  2889. "application/json": {
  2890. "schema": {
  2891. "type": "boolean",
  2892. "description": "MCP server connected successfully"
  2893. }
  2894. }
  2895. }
  2896. }
  2897. },
  2898. "description": "Connect an MCP server.",
  2899. "x-codeSamples": [
  2900. {
  2901. "lang": "js",
  2902. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  2903. }
  2904. ]
  2905. }
  2906. },
  2907. "/mcp/{name}/disconnect": {
  2908. "post": {
  2909. "tags": ["mcp"],
  2910. "operationId": "mcp.disconnect",
  2911. "parameters": [
  2912. {
  2913. "name": "name",
  2914. "in": "path",
  2915. "schema": {
  2916. "type": "string"
  2917. },
  2918. "required": true
  2919. },
  2920. {
  2921. "name": "directory",
  2922. "in": "query",
  2923. "schema": {
  2924. "type": "string"
  2925. },
  2926. "required": false
  2927. },
  2928. {
  2929. "name": "workspace",
  2930. "in": "query",
  2931. "schema": {
  2932. "type": "string"
  2933. },
  2934. "required": false
  2935. }
  2936. ],
  2937. "responses": {
  2938. "200": {
  2939. "description": "MCP server disconnected successfully",
  2940. "content": {
  2941. "application/json": {
  2942. "schema": {
  2943. "type": "boolean",
  2944. "description": "MCP server disconnected successfully"
  2945. }
  2946. }
  2947. }
  2948. }
  2949. },
  2950. "description": "Disconnect an MCP server.",
  2951. "x-codeSamples": [
  2952. {
  2953. "lang": "js",
  2954. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  2955. }
  2956. ]
  2957. }
  2958. },
  2959. "/project": {
  2960. "get": {
  2961. "tags": ["project"],
  2962. "operationId": "project.list",
  2963. "parameters": [
  2964. {
  2965. "name": "directory",
  2966. "in": "query",
  2967. "schema": {
  2968. "type": "string"
  2969. },
  2970. "required": false
  2971. },
  2972. {
  2973. "name": "workspace",
  2974. "in": "query",
  2975. "schema": {
  2976. "type": "string"
  2977. },
  2978. "required": false
  2979. }
  2980. ],
  2981. "responses": {
  2982. "200": {
  2983. "description": "List of projects",
  2984. "content": {
  2985. "application/json": {
  2986. "schema": {
  2987. "type": "array",
  2988. "items": {
  2989. "$ref": "#/components/schemas/Project"
  2990. },
  2991. "description": "List of projects"
  2992. }
  2993. }
  2994. }
  2995. }
  2996. },
  2997. "description": "Get a list of projects that have been opened with OpenCode.",
  2998. "summary": "List all projects",
  2999. "x-codeSamples": [
  3000. {
  3001. "lang": "js",
  3002. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3003. }
  3004. ]
  3005. }
  3006. },
  3007. "/project/current": {
  3008. "get": {
  3009. "tags": ["project"],
  3010. "operationId": "project.current",
  3011. "parameters": [
  3012. {
  3013. "name": "directory",
  3014. "in": "query",
  3015. "schema": {
  3016. "type": "string"
  3017. },
  3018. "required": false
  3019. },
  3020. {
  3021. "name": "workspace",
  3022. "in": "query",
  3023. "schema": {
  3024. "type": "string"
  3025. },
  3026. "required": false
  3027. }
  3028. ],
  3029. "responses": {
  3030. "200": {
  3031. "description": "Current project information",
  3032. "content": {
  3033. "application/json": {
  3034. "schema": {
  3035. "$ref": "#/components/schemas/Project"
  3036. }
  3037. }
  3038. }
  3039. }
  3040. },
  3041. "description": "Retrieve the currently active project that OpenCode is working with.",
  3042. "summary": "Get current project",
  3043. "x-codeSamples": [
  3044. {
  3045. "lang": "js",
  3046. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3047. }
  3048. ]
  3049. }
  3050. },
  3051. "/project/git/init": {
  3052. "post": {
  3053. "tags": ["project"],
  3054. "operationId": "project.initGit",
  3055. "parameters": [
  3056. {
  3057. "name": "directory",
  3058. "in": "query",
  3059. "schema": {
  3060. "type": "string"
  3061. },
  3062. "required": false
  3063. },
  3064. {
  3065. "name": "workspace",
  3066. "in": "query",
  3067. "schema": {
  3068. "type": "string"
  3069. },
  3070. "required": false
  3071. }
  3072. ],
  3073. "responses": {
  3074. "200": {
  3075. "description": "Project information after git initialization",
  3076. "content": {
  3077. "application/json": {
  3078. "schema": {
  3079. "$ref": "#/components/schemas/Project"
  3080. }
  3081. }
  3082. }
  3083. }
  3084. },
  3085. "description": "Create a git repository for the current project and return the refreshed project info.",
  3086. "summary": "Initialize git repository",
  3087. "x-codeSamples": [
  3088. {
  3089. "lang": "js",
  3090. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3091. }
  3092. ]
  3093. }
  3094. },
  3095. "/project/{projectID}": {
  3096. "patch": {
  3097. "tags": ["project"],
  3098. "operationId": "project.update",
  3099. "parameters": [
  3100. {
  3101. "name": "projectID",
  3102. "in": "path",
  3103. "schema": {
  3104. "type": "string"
  3105. },
  3106. "required": true
  3107. },
  3108. {
  3109. "name": "directory",
  3110. "in": "query",
  3111. "schema": {
  3112. "type": "string"
  3113. },
  3114. "required": false
  3115. },
  3116. {
  3117. "name": "workspace",
  3118. "in": "query",
  3119. "schema": {
  3120. "type": "string"
  3121. },
  3122. "required": false
  3123. }
  3124. ],
  3125. "responses": {
  3126. "200": {
  3127. "description": "Updated project information",
  3128. "content": {
  3129. "application/json": {
  3130. "schema": {
  3131. "$ref": "#/components/schemas/Project"
  3132. }
  3133. }
  3134. }
  3135. },
  3136. "400": {
  3137. "description": "Bad request",
  3138. "content": {
  3139. "application/json": {
  3140. "schema": {
  3141. "$ref": "#/components/schemas/BadRequestError"
  3142. }
  3143. }
  3144. }
  3145. },
  3146. "404": {
  3147. "description": "Not found",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "$ref": "#/components/schemas/NotFoundError"
  3152. }
  3153. }
  3154. }
  3155. }
  3156. },
  3157. "description": "Update project properties such as name, icon, and commands.",
  3158. "summary": "Update project",
  3159. "requestBody": {
  3160. "content": {
  3161. "application/json": {
  3162. "schema": {
  3163. "type": "object",
  3164. "properties": {
  3165. "name": {
  3166. "type": "string"
  3167. },
  3168. "icon": {
  3169. "type": "object",
  3170. "properties": {
  3171. "url": {
  3172. "type": "string"
  3173. },
  3174. "override": {
  3175. "type": "string"
  3176. },
  3177. "color": {
  3178. "type": "string"
  3179. }
  3180. },
  3181. "additionalProperties": false
  3182. },
  3183. "commands": {
  3184. "type": "object",
  3185. "properties": {
  3186. "start": {
  3187. "type": "string",
  3188. "description": "Startup script to run when creating a new workspace (worktree)"
  3189. }
  3190. },
  3191. "additionalProperties": false
  3192. }
  3193. },
  3194. "additionalProperties": false
  3195. }
  3196. }
  3197. }
  3198. },
  3199. "x-codeSamples": [
  3200. {
  3201. "lang": "js",
  3202. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3203. }
  3204. ]
  3205. }
  3206. },
  3207. "/pty/shells": {
  3208. "get": {
  3209. "tags": ["pty"],
  3210. "operationId": "pty.shells",
  3211. "parameters": [
  3212. {
  3213. "name": "directory",
  3214. "in": "query",
  3215. "schema": {
  3216. "type": "string"
  3217. },
  3218. "required": false
  3219. },
  3220. {
  3221. "name": "workspace",
  3222. "in": "query",
  3223. "schema": {
  3224. "type": "string"
  3225. },
  3226. "required": false
  3227. }
  3228. ],
  3229. "responses": {
  3230. "200": {
  3231. "description": "List of shells",
  3232. "content": {
  3233. "application/json": {
  3234. "schema": {
  3235. "type": "array",
  3236. "items": {
  3237. "type": "object",
  3238. "properties": {
  3239. "path": {
  3240. "type": "string"
  3241. },
  3242. "name": {
  3243. "type": "string"
  3244. },
  3245. "acceptable": {
  3246. "type": "boolean"
  3247. }
  3248. },
  3249. "required": ["path", "name", "acceptable"],
  3250. "additionalProperties": false
  3251. },
  3252. "description": "List of shells"
  3253. }
  3254. }
  3255. }
  3256. }
  3257. },
  3258. "description": "Get a list of available shells on the system.",
  3259. "summary": "List available shells",
  3260. "x-codeSamples": [
  3261. {
  3262. "lang": "js",
  3263. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3264. }
  3265. ]
  3266. }
  3267. },
  3268. "/pty": {
  3269. "get": {
  3270. "tags": ["pty"],
  3271. "operationId": "pty.list",
  3272. "parameters": [
  3273. {
  3274. "name": "directory",
  3275. "in": "query",
  3276. "schema": {
  3277. "type": "string"
  3278. },
  3279. "required": false
  3280. },
  3281. {
  3282. "name": "workspace",
  3283. "in": "query",
  3284. "schema": {
  3285. "type": "string"
  3286. },
  3287. "required": false
  3288. }
  3289. ],
  3290. "responses": {
  3291. "200": {
  3292. "description": "List of sessions",
  3293. "content": {
  3294. "application/json": {
  3295. "schema": {
  3296. "type": "array",
  3297. "items": {
  3298. "$ref": "#/components/schemas/Pty"
  3299. },
  3300. "description": "List of sessions"
  3301. }
  3302. }
  3303. }
  3304. }
  3305. },
  3306. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3307. "summary": "List PTY sessions",
  3308. "x-codeSamples": [
  3309. {
  3310. "lang": "js",
  3311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3312. }
  3313. ]
  3314. },
  3315. "post": {
  3316. "tags": ["pty"],
  3317. "operationId": "pty.create",
  3318. "parameters": [
  3319. {
  3320. "name": "directory",
  3321. "in": "query",
  3322. "schema": {
  3323. "type": "string"
  3324. },
  3325. "required": false
  3326. },
  3327. {
  3328. "name": "workspace",
  3329. "in": "query",
  3330. "schema": {
  3331. "type": "string"
  3332. },
  3333. "required": false
  3334. }
  3335. ],
  3336. "responses": {
  3337. "200": {
  3338. "description": "Created session",
  3339. "content": {
  3340. "application/json": {
  3341. "schema": {
  3342. "$ref": "#/components/schemas/Pty"
  3343. }
  3344. }
  3345. }
  3346. },
  3347. "400": {
  3348. "description": "Bad request",
  3349. "content": {
  3350. "application/json": {
  3351. "schema": {
  3352. "$ref": "#/components/schemas/BadRequestError"
  3353. }
  3354. }
  3355. }
  3356. }
  3357. },
  3358. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3359. "summary": "Create PTY session",
  3360. "requestBody": {
  3361. "content": {
  3362. "application/json": {
  3363. "schema": {
  3364. "type": "object",
  3365. "properties": {
  3366. "command": {
  3367. "type": "string"
  3368. },
  3369. "args": {
  3370. "type": "array",
  3371. "items": {
  3372. "type": "string"
  3373. }
  3374. },
  3375. "cwd": {
  3376. "type": "string"
  3377. },
  3378. "title": {
  3379. "type": "string"
  3380. },
  3381. "env": {
  3382. "type": "object",
  3383. "additionalProperties": {
  3384. "type": "string"
  3385. }
  3386. }
  3387. },
  3388. "additionalProperties": false
  3389. }
  3390. }
  3391. }
  3392. },
  3393. "x-codeSamples": [
  3394. {
  3395. "lang": "js",
  3396. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3397. }
  3398. ]
  3399. }
  3400. },
  3401. "/pty/{ptyID}": {
  3402. "get": {
  3403. "tags": ["pty"],
  3404. "operationId": "pty.get",
  3405. "parameters": [
  3406. {
  3407. "name": "ptyID",
  3408. "in": "path",
  3409. "schema": {
  3410. "type": "string",
  3411. "pattern": "^pty"
  3412. },
  3413. "required": true
  3414. },
  3415. {
  3416. "name": "directory",
  3417. "in": "query",
  3418. "schema": {
  3419. "type": "string"
  3420. },
  3421. "required": false
  3422. },
  3423. {
  3424. "name": "workspace",
  3425. "in": "query",
  3426. "schema": {
  3427. "type": "string"
  3428. },
  3429. "required": false
  3430. }
  3431. ],
  3432. "responses": {
  3433. "200": {
  3434. "description": "Session info",
  3435. "content": {
  3436. "application/json": {
  3437. "schema": {
  3438. "$ref": "#/components/schemas/Pty"
  3439. }
  3440. }
  3441. }
  3442. },
  3443. "404": {
  3444. "description": "NotFoundError",
  3445. "content": {
  3446. "application/json": {
  3447. "schema": {
  3448. "$ref": "#/components/schemas/NotFoundError"
  3449. }
  3450. }
  3451. }
  3452. }
  3453. },
  3454. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3455. "summary": "Get PTY session",
  3456. "x-codeSamples": [
  3457. {
  3458. "lang": "js",
  3459. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3460. }
  3461. ]
  3462. },
  3463. "put": {
  3464. "tags": ["pty"],
  3465. "operationId": "pty.update",
  3466. "parameters": [
  3467. {
  3468. "name": "ptyID",
  3469. "in": "path",
  3470. "schema": {
  3471. "type": "string",
  3472. "pattern": "^pty"
  3473. },
  3474. "required": true
  3475. },
  3476. {
  3477. "name": "directory",
  3478. "in": "query",
  3479. "schema": {
  3480. "type": "string"
  3481. },
  3482. "required": false
  3483. },
  3484. {
  3485. "name": "workspace",
  3486. "in": "query",
  3487. "schema": {
  3488. "type": "string"
  3489. },
  3490. "required": false
  3491. }
  3492. ],
  3493. "responses": {
  3494. "200": {
  3495. "description": "Updated session",
  3496. "content": {
  3497. "application/json": {
  3498. "schema": {
  3499. "$ref": "#/components/schemas/Pty"
  3500. }
  3501. }
  3502. }
  3503. },
  3504. "400": {
  3505. "description": "Bad request",
  3506. "content": {
  3507. "application/json": {
  3508. "schema": {
  3509. "$ref": "#/components/schemas/BadRequestError"
  3510. }
  3511. }
  3512. }
  3513. }
  3514. },
  3515. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  3516. "summary": "Update PTY session",
  3517. "requestBody": {
  3518. "content": {
  3519. "application/json": {
  3520. "schema": {
  3521. "type": "object",
  3522. "properties": {
  3523. "title": {
  3524. "type": "string"
  3525. },
  3526. "size": {
  3527. "type": "object",
  3528. "properties": {
  3529. "rows": {
  3530. "type": "integer",
  3531. "exclusiveMinimum": 0
  3532. },
  3533. "cols": {
  3534. "type": "integer",
  3535. "exclusiveMinimum": 0
  3536. }
  3537. },
  3538. "required": ["rows", "cols"],
  3539. "additionalProperties": false
  3540. }
  3541. },
  3542. "additionalProperties": false
  3543. }
  3544. }
  3545. }
  3546. },
  3547. "x-codeSamples": [
  3548. {
  3549. "lang": "js",
  3550. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  3551. }
  3552. ]
  3553. },
  3554. "delete": {
  3555. "tags": ["pty"],
  3556. "operationId": "pty.remove",
  3557. "parameters": [
  3558. {
  3559. "name": "ptyID",
  3560. "in": "path",
  3561. "schema": {
  3562. "type": "string",
  3563. "pattern": "^pty"
  3564. },
  3565. "required": true
  3566. },
  3567. {
  3568. "name": "directory",
  3569. "in": "query",
  3570. "schema": {
  3571. "type": "string"
  3572. },
  3573. "required": false
  3574. },
  3575. {
  3576. "name": "workspace",
  3577. "in": "query",
  3578. "schema": {
  3579. "type": "string"
  3580. },
  3581. "required": false
  3582. }
  3583. ],
  3584. "responses": {
  3585. "200": {
  3586. "description": "Session removed",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "type": "boolean",
  3591. "description": "Session removed"
  3592. }
  3593. }
  3594. }
  3595. },
  3596. "404": {
  3597. "description": "NotFoundError",
  3598. "content": {
  3599. "application/json": {
  3600. "schema": {
  3601. "$ref": "#/components/schemas/NotFoundError"
  3602. }
  3603. }
  3604. }
  3605. }
  3606. },
  3607. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  3608. "summary": "Remove PTY session",
  3609. "x-codeSamples": [
  3610. {
  3611. "lang": "js",
  3612. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  3613. }
  3614. ]
  3615. }
  3616. },
  3617. "/pty/{ptyID}/connect-token": {
  3618. "post": {
  3619. "tags": ["pty"],
  3620. "operationId": "pty.connectToken",
  3621. "parameters": [
  3622. {
  3623. "name": "ptyID",
  3624. "in": "path",
  3625. "schema": {
  3626. "type": "string",
  3627. "pattern": "^pty"
  3628. },
  3629. "required": true
  3630. },
  3631. {
  3632. "name": "directory",
  3633. "in": "query",
  3634. "schema": {
  3635. "type": "string"
  3636. },
  3637. "required": false
  3638. },
  3639. {
  3640. "name": "workspace",
  3641. "in": "query",
  3642. "schema": {
  3643. "type": "string"
  3644. },
  3645. "required": false
  3646. }
  3647. ],
  3648. "responses": {
  3649. "200": {
  3650. "description": "WebSocket connect token",
  3651. "content": {
  3652. "application/json": {
  3653. "schema": {
  3654. "type": "object",
  3655. "properties": {
  3656. "ticket": {
  3657. "type": "string"
  3658. },
  3659. "expires_in": {
  3660. "type": "integer",
  3661. "exclusiveMinimum": 0
  3662. }
  3663. },
  3664. "required": ["ticket", "expires_in"],
  3665. "additionalProperties": false,
  3666. "description": "WebSocket connect token"
  3667. }
  3668. }
  3669. }
  3670. },
  3671. "403": {
  3672. "description": "Forbidden",
  3673. "content": {
  3674. "application/json": {
  3675. "schema": {
  3676. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  3677. }
  3678. }
  3679. }
  3680. },
  3681. "404": {
  3682. "description": "NotFoundError",
  3683. "content": {
  3684. "application/json": {
  3685. "schema": {
  3686. "$ref": "#/components/schemas/NotFoundError"
  3687. }
  3688. }
  3689. }
  3690. }
  3691. },
  3692. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  3693. "summary": "Create PTY WebSocket token",
  3694. "x-codeSamples": [
  3695. {
  3696. "lang": "js",
  3697. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  3698. }
  3699. ]
  3700. }
  3701. },
  3702. "/question": {
  3703. "get": {
  3704. "tags": ["question"],
  3705. "operationId": "question.list",
  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 pending questions",
  3727. "content": {
  3728. "application/json": {
  3729. "schema": {
  3730. "type": "array",
  3731. "items": {
  3732. "$ref": "#/components/schemas/QuestionRequest"
  3733. },
  3734. "description": "List of pending questions"
  3735. }
  3736. }
  3737. }
  3738. }
  3739. },
  3740. "description": "Get all pending question requests across all sessions.",
  3741. "summary": "List pending questions",
  3742. "x-codeSamples": [
  3743. {
  3744. "lang": "js",
  3745. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  3746. }
  3747. ]
  3748. }
  3749. },
  3750. "/question/{requestID}/reply": {
  3751. "post": {
  3752. "tags": ["question"],
  3753. "operationId": "question.reply",
  3754. "parameters": [
  3755. {
  3756. "name": "requestID",
  3757. "in": "path",
  3758. "schema": {
  3759. "type": "string",
  3760. "pattern": "^que"
  3761. },
  3762. "required": true
  3763. },
  3764. {
  3765. "name": "directory",
  3766. "in": "query",
  3767. "schema": {
  3768. "type": "string"
  3769. },
  3770. "required": false
  3771. },
  3772. {
  3773. "name": "workspace",
  3774. "in": "query",
  3775. "schema": {
  3776. "type": "string"
  3777. },
  3778. "required": false
  3779. }
  3780. ],
  3781. "responses": {
  3782. "200": {
  3783. "description": "Question answered successfully",
  3784. "content": {
  3785. "application/json": {
  3786. "schema": {
  3787. "type": "boolean",
  3788. "description": "Question answered successfully"
  3789. }
  3790. }
  3791. }
  3792. },
  3793. "400": {
  3794. "description": "Bad request",
  3795. "content": {
  3796. "application/json": {
  3797. "schema": {
  3798. "$ref": "#/components/schemas/BadRequestError"
  3799. }
  3800. }
  3801. }
  3802. },
  3803. "404": {
  3804. "description": "Not found",
  3805. "content": {
  3806. "application/json": {
  3807. "schema": {
  3808. "$ref": "#/components/schemas/NotFoundError"
  3809. }
  3810. }
  3811. }
  3812. }
  3813. },
  3814. "description": "Provide answers to a question request from the AI assistant.",
  3815. "summary": "Reply to question request",
  3816. "requestBody": {
  3817. "content": {
  3818. "application/json": {
  3819. "schema": {
  3820. "type": "object",
  3821. "properties": {
  3822. "answers": {
  3823. "type": "array",
  3824. "items": {
  3825. "$ref": "#/components/schemas/QuestionAnswer"
  3826. },
  3827. "description": "User answers in order of questions (each answer is an array of selected labels)"
  3828. }
  3829. },
  3830. "required": ["answers"],
  3831. "additionalProperties": false
  3832. }
  3833. }
  3834. }
  3835. },
  3836. "x-codeSamples": [
  3837. {
  3838. "lang": "js",
  3839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  3840. }
  3841. ]
  3842. }
  3843. },
  3844. "/question/{requestID}/reject": {
  3845. "post": {
  3846. "tags": ["question"],
  3847. "operationId": "question.reject",
  3848. "parameters": [
  3849. {
  3850. "name": "requestID",
  3851. "in": "path",
  3852. "schema": {
  3853. "type": "string",
  3854. "pattern": "^que"
  3855. },
  3856. "required": true
  3857. },
  3858. {
  3859. "name": "directory",
  3860. "in": "query",
  3861. "schema": {
  3862. "type": "string"
  3863. },
  3864. "required": false
  3865. },
  3866. {
  3867. "name": "workspace",
  3868. "in": "query",
  3869. "schema": {
  3870. "type": "string"
  3871. },
  3872. "required": false
  3873. }
  3874. ],
  3875. "responses": {
  3876. "200": {
  3877. "description": "Question rejected successfully",
  3878. "content": {
  3879. "application/json": {
  3880. "schema": {
  3881. "type": "boolean",
  3882. "description": "Question rejected successfully"
  3883. }
  3884. }
  3885. }
  3886. },
  3887. "400": {
  3888. "description": "Bad request",
  3889. "content": {
  3890. "application/json": {
  3891. "schema": {
  3892. "$ref": "#/components/schemas/BadRequestError"
  3893. }
  3894. }
  3895. }
  3896. },
  3897. "404": {
  3898. "description": "Not found",
  3899. "content": {
  3900. "application/json": {
  3901. "schema": {
  3902. "$ref": "#/components/schemas/NotFoundError"
  3903. }
  3904. }
  3905. }
  3906. }
  3907. },
  3908. "description": "Reject a question request from the AI assistant.",
  3909. "summary": "Reject question request",
  3910. "x-codeSamples": [
  3911. {
  3912. "lang": "js",
  3913. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  3914. }
  3915. ]
  3916. }
  3917. },
  3918. "/permission": {
  3919. "get": {
  3920. "tags": ["permission"],
  3921. "operationId": "permission.list",
  3922. "parameters": [
  3923. {
  3924. "name": "directory",
  3925. "in": "query",
  3926. "schema": {
  3927. "type": "string"
  3928. },
  3929. "required": false
  3930. },
  3931. {
  3932. "name": "workspace",
  3933. "in": "query",
  3934. "schema": {
  3935. "type": "string"
  3936. },
  3937. "required": false
  3938. }
  3939. ],
  3940. "responses": {
  3941. "200": {
  3942. "description": "List of pending permissions",
  3943. "content": {
  3944. "application/json": {
  3945. "schema": {
  3946. "type": "array",
  3947. "items": {
  3948. "$ref": "#/components/schemas/PermissionRequest"
  3949. },
  3950. "description": "List of pending permissions"
  3951. }
  3952. }
  3953. }
  3954. }
  3955. },
  3956. "description": "Get all pending permission requests across all sessions.",
  3957. "summary": "List pending permissions",
  3958. "x-codeSamples": [
  3959. {
  3960. "lang": "js",
  3961. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  3962. }
  3963. ]
  3964. }
  3965. },
  3966. "/permission/{requestID}/reply": {
  3967. "post": {
  3968. "tags": ["permission"],
  3969. "operationId": "permission.reply",
  3970. "parameters": [
  3971. {
  3972. "name": "requestID",
  3973. "in": "path",
  3974. "schema": {
  3975. "type": "string",
  3976. "pattern": "^per"
  3977. },
  3978. "required": true
  3979. },
  3980. {
  3981. "name": "directory",
  3982. "in": "query",
  3983. "schema": {
  3984. "type": "string"
  3985. },
  3986. "required": false
  3987. },
  3988. {
  3989. "name": "workspace",
  3990. "in": "query",
  3991. "schema": {
  3992. "type": "string"
  3993. },
  3994. "required": false
  3995. }
  3996. ],
  3997. "responses": {
  3998. "200": {
  3999. "description": "Permission processed successfully",
  4000. "content": {
  4001. "application/json": {
  4002. "schema": {
  4003. "type": "boolean",
  4004. "description": "Permission processed successfully"
  4005. }
  4006. }
  4007. }
  4008. },
  4009. "400": {
  4010. "description": "Bad request",
  4011. "content": {
  4012. "application/json": {
  4013. "schema": {
  4014. "$ref": "#/components/schemas/BadRequestError"
  4015. }
  4016. }
  4017. }
  4018. },
  4019. "404": {
  4020. "description": "Not found",
  4021. "content": {
  4022. "application/json": {
  4023. "schema": {
  4024. "$ref": "#/components/schemas/NotFoundError"
  4025. }
  4026. }
  4027. }
  4028. }
  4029. },
  4030. "description": "Approve or deny a permission request from the AI assistant.",
  4031. "summary": "Respond to permission request",
  4032. "requestBody": {
  4033. "content": {
  4034. "application/json": {
  4035. "schema": {
  4036. "type": "object",
  4037. "properties": {
  4038. "reply": {
  4039. "type": "string",
  4040. "enum": ["once", "always", "reject"]
  4041. },
  4042. "message": {
  4043. "type": "string"
  4044. }
  4045. },
  4046. "required": ["reply"],
  4047. "additionalProperties": false
  4048. }
  4049. }
  4050. }
  4051. },
  4052. "x-codeSamples": [
  4053. {
  4054. "lang": "js",
  4055. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4056. }
  4057. ]
  4058. }
  4059. },
  4060. "/provider": {
  4061. "get": {
  4062. "tags": ["provider"],
  4063. "operationId": "provider.list",
  4064. "parameters": [
  4065. {
  4066. "name": "directory",
  4067. "in": "query",
  4068. "schema": {
  4069. "type": "string"
  4070. },
  4071. "required": false
  4072. },
  4073. {
  4074. "name": "workspace",
  4075. "in": "query",
  4076. "schema": {
  4077. "type": "string"
  4078. },
  4079. "required": false
  4080. }
  4081. ],
  4082. "responses": {
  4083. "200": {
  4084. "description": "List of providers",
  4085. "content": {
  4086. "application/json": {
  4087. "schema": {
  4088. "type": "object",
  4089. "properties": {
  4090. "all": {
  4091. "type": "array",
  4092. "items": {
  4093. "$ref": "#/components/schemas/Provider"
  4094. }
  4095. },
  4096. "default": {
  4097. "type": "object",
  4098. "additionalProperties": {
  4099. "type": "string"
  4100. }
  4101. },
  4102. "connected": {
  4103. "type": "array",
  4104. "items": {
  4105. "type": "string"
  4106. }
  4107. }
  4108. },
  4109. "required": ["all", "default", "connected"],
  4110. "additionalProperties": false,
  4111. "description": "List of providers"
  4112. }
  4113. }
  4114. }
  4115. }
  4116. },
  4117. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4118. "summary": "List providers",
  4119. "x-codeSamples": [
  4120. {
  4121. "lang": "js",
  4122. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4123. }
  4124. ]
  4125. }
  4126. },
  4127. "/provider/auth": {
  4128. "get": {
  4129. "tags": ["provider"],
  4130. "operationId": "provider.auth",
  4131. "parameters": [
  4132. {
  4133. "name": "directory",
  4134. "in": "query",
  4135. "schema": {
  4136. "type": "string"
  4137. },
  4138. "required": false
  4139. },
  4140. {
  4141. "name": "workspace",
  4142. "in": "query",
  4143. "schema": {
  4144. "type": "string"
  4145. },
  4146. "required": false
  4147. }
  4148. ],
  4149. "responses": {
  4150. "200": {
  4151. "description": "Provider auth methods",
  4152. "content": {
  4153. "application/json": {
  4154. "schema": {
  4155. "type": "object",
  4156. "additionalProperties": {
  4157. "type": "array",
  4158. "items": {
  4159. "$ref": "#/components/schemas/ProviderAuthMethod"
  4160. }
  4161. },
  4162. "description": "Provider auth methods"
  4163. }
  4164. }
  4165. }
  4166. }
  4167. },
  4168. "description": "Retrieve available authentication methods for all AI providers.",
  4169. "summary": "Get provider auth methods",
  4170. "x-codeSamples": [
  4171. {
  4172. "lang": "js",
  4173. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4174. }
  4175. ]
  4176. }
  4177. },
  4178. "/provider/{providerID}/oauth/authorize": {
  4179. "post": {
  4180. "tags": ["provider"],
  4181. "operationId": "provider.oauth.authorize",
  4182. "parameters": [
  4183. {
  4184. "name": "providerID",
  4185. "in": "path",
  4186. "schema": {
  4187. "type": "string"
  4188. },
  4189. "required": true
  4190. },
  4191. {
  4192. "name": "directory",
  4193. "in": "query",
  4194. "schema": {
  4195. "type": "string"
  4196. },
  4197. "required": false
  4198. },
  4199. {
  4200. "name": "workspace",
  4201. "in": "query",
  4202. "schema": {
  4203. "type": "string"
  4204. },
  4205. "required": false
  4206. }
  4207. ],
  4208. "responses": {
  4209. "200": {
  4210. "description": "Authorization URL and method",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4215. }
  4216. }
  4217. }
  4218. },
  4219. "400": {
  4220. "description": "ProviderAuthError",
  4221. "content": {
  4222. "application/json": {
  4223. "schema": {
  4224. "$ref": "#/components/schemas/ProviderAuthError1"
  4225. }
  4226. }
  4227. }
  4228. }
  4229. },
  4230. "description": "Start the OAuth authorization flow for a provider.",
  4231. "summary": "Start OAuth authorization",
  4232. "requestBody": {
  4233. "content": {
  4234. "application/json": {
  4235. "schema": {
  4236. "type": "object",
  4237. "properties": {
  4238. "method": {
  4239. "type": "number",
  4240. "description": "Auth method index"
  4241. },
  4242. "inputs": {
  4243. "type": "object",
  4244. "additionalProperties": {
  4245. "type": "string"
  4246. }
  4247. }
  4248. },
  4249. "required": ["method"],
  4250. "additionalProperties": false
  4251. }
  4252. }
  4253. }
  4254. },
  4255. "x-codeSamples": [
  4256. {
  4257. "lang": "js",
  4258. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4259. }
  4260. ]
  4261. }
  4262. },
  4263. "/provider/{providerID}/oauth/callback": {
  4264. "post": {
  4265. "tags": ["provider"],
  4266. "operationId": "provider.oauth.callback",
  4267. "parameters": [
  4268. {
  4269. "name": "providerID",
  4270. "in": "path",
  4271. "schema": {
  4272. "type": "string"
  4273. },
  4274. "required": true
  4275. },
  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": "OAuth callback processed successfully",
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "boolean",
  4300. "description": "OAuth callback processed successfully"
  4301. }
  4302. }
  4303. }
  4304. },
  4305. "400": {
  4306. "description": "ProviderAuthError",
  4307. "content": {
  4308. "application/json": {
  4309. "schema": {
  4310. "$ref": "#/components/schemas/ProviderAuthError1"
  4311. }
  4312. }
  4313. }
  4314. }
  4315. },
  4316. "description": "Handle the OAuth callback from a provider after user authorization.",
  4317. "summary": "Handle OAuth callback",
  4318. "requestBody": {
  4319. "content": {
  4320. "application/json": {
  4321. "schema": {
  4322. "type": "object",
  4323. "properties": {
  4324. "method": {
  4325. "type": "number",
  4326. "description": "Auth method index"
  4327. },
  4328. "code": {
  4329. "type": "string"
  4330. }
  4331. },
  4332. "required": ["method"],
  4333. "additionalProperties": false
  4334. }
  4335. }
  4336. }
  4337. },
  4338. "x-codeSamples": [
  4339. {
  4340. "lang": "js",
  4341. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4342. }
  4343. ]
  4344. }
  4345. },
  4346. "/session": {
  4347. "get": {
  4348. "tags": ["session"],
  4349. "operationId": "session.list",
  4350. "parameters": [
  4351. {
  4352. "name": "directory",
  4353. "in": "query",
  4354. "schema": {
  4355. "type": "string"
  4356. },
  4357. "required": false
  4358. },
  4359. {
  4360. "name": "workspace",
  4361. "in": "query",
  4362. "schema": {
  4363. "type": "string"
  4364. },
  4365. "required": false
  4366. },
  4367. {
  4368. "name": "scope",
  4369. "in": "query",
  4370. "schema": {
  4371. "type": "string",
  4372. "enum": ["project"]
  4373. },
  4374. "required": false
  4375. },
  4376. {
  4377. "name": "path",
  4378. "in": "query",
  4379. "schema": {
  4380. "type": "string"
  4381. },
  4382. "required": false
  4383. },
  4384. {
  4385. "name": "roots",
  4386. "in": "query",
  4387. "schema": {
  4388. "anyOf": [
  4389. {
  4390. "type": "boolean"
  4391. },
  4392. {
  4393. "type": "string",
  4394. "enum": ["true", "false"]
  4395. }
  4396. ]
  4397. },
  4398. "required": false
  4399. },
  4400. {
  4401. "name": "start",
  4402. "in": "query",
  4403. "schema": {
  4404. "type": "number"
  4405. },
  4406. "required": false
  4407. },
  4408. {
  4409. "name": "search",
  4410. "in": "query",
  4411. "schema": {
  4412. "type": "string"
  4413. },
  4414. "required": false
  4415. },
  4416. {
  4417. "name": "limit",
  4418. "in": "query",
  4419. "schema": {
  4420. "type": "number"
  4421. },
  4422. "required": false
  4423. }
  4424. ],
  4425. "responses": {
  4426. "200": {
  4427. "description": "List of sessions",
  4428. "content": {
  4429. "application/json": {
  4430. "schema": {
  4431. "type": "array",
  4432. "items": {
  4433. "$ref": "#/components/schemas/Session"
  4434. },
  4435. "description": "List of sessions"
  4436. }
  4437. }
  4438. }
  4439. }
  4440. },
  4441. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  4442. "summary": "List sessions",
  4443. "x-codeSamples": [
  4444. {
  4445. "lang": "js",
  4446. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  4447. }
  4448. ]
  4449. },
  4450. "post": {
  4451. "tags": ["session"],
  4452. "operationId": "session.create",
  4453. "parameters": [
  4454. {
  4455. "name": "directory",
  4456. "in": "query",
  4457. "schema": {
  4458. "type": "string"
  4459. },
  4460. "required": false
  4461. },
  4462. {
  4463. "name": "workspace",
  4464. "in": "query",
  4465. "schema": {
  4466. "type": "string"
  4467. },
  4468. "required": false
  4469. }
  4470. ],
  4471. "responses": {
  4472. "200": {
  4473. "description": "Successfully created session",
  4474. "content": {
  4475. "application/json": {
  4476. "schema": {
  4477. "$ref": "#/components/schemas/Session"
  4478. }
  4479. }
  4480. }
  4481. },
  4482. "400": {
  4483. "description": "Bad request",
  4484. "content": {
  4485. "application/json": {
  4486. "schema": {
  4487. "$ref": "#/components/schemas/BadRequestError"
  4488. }
  4489. }
  4490. }
  4491. }
  4492. },
  4493. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  4494. "summary": "Create session",
  4495. "requestBody": {
  4496. "content": {
  4497. "application/json": {
  4498. "schema": {
  4499. "type": "object",
  4500. "properties": {
  4501. "parentID": {
  4502. "type": "string",
  4503. "pattern": "^ses"
  4504. },
  4505. "title": {
  4506. "type": "string"
  4507. },
  4508. "agent": {
  4509. "type": "string"
  4510. },
  4511. "model": {
  4512. "type": "object",
  4513. "properties": {
  4514. "id": {
  4515. "type": "string"
  4516. },
  4517. "providerID": {
  4518. "type": "string"
  4519. },
  4520. "variant": {
  4521. "type": "string"
  4522. }
  4523. },
  4524. "required": ["id", "providerID"],
  4525. "additionalProperties": false
  4526. },
  4527. "permission": {
  4528. "$ref": "#/components/schemas/PermissionRuleset"
  4529. },
  4530. "workspaceID": {
  4531. "type": "string",
  4532. "pattern": "^wrk"
  4533. }
  4534. },
  4535. "additionalProperties": false
  4536. }
  4537. }
  4538. }
  4539. },
  4540. "x-codeSamples": [
  4541. {
  4542. "lang": "js",
  4543. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  4544. }
  4545. ]
  4546. }
  4547. },
  4548. "/session/status": {
  4549. "get": {
  4550. "tags": ["session"],
  4551. "operationId": "session.status",
  4552. "parameters": [
  4553. {
  4554. "name": "directory",
  4555. "in": "query",
  4556. "schema": {
  4557. "type": "string"
  4558. },
  4559. "required": false
  4560. },
  4561. {
  4562. "name": "workspace",
  4563. "in": "query",
  4564. "schema": {
  4565. "type": "string"
  4566. },
  4567. "required": false
  4568. }
  4569. ],
  4570. "responses": {
  4571. "200": {
  4572. "description": "Get session status",
  4573. "content": {
  4574. "application/json": {
  4575. "schema": {
  4576. "type": "object",
  4577. "additionalProperties": {
  4578. "$ref": "#/components/schemas/SessionStatus"
  4579. },
  4580. "description": "Get session status"
  4581. }
  4582. }
  4583. }
  4584. },
  4585. "400": {
  4586. "description": "Bad request",
  4587. "content": {
  4588. "application/json": {
  4589. "schema": {
  4590. "$ref": "#/components/schemas/BadRequestError"
  4591. }
  4592. }
  4593. }
  4594. }
  4595. },
  4596. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  4597. "summary": "Get session status",
  4598. "x-codeSamples": [
  4599. {
  4600. "lang": "js",
  4601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  4602. }
  4603. ]
  4604. }
  4605. },
  4606. "/session/{sessionID}": {
  4607. "get": {
  4608. "tags": ["session"],
  4609. "operationId": "session.get",
  4610. "parameters": [
  4611. {
  4612. "name": "sessionID",
  4613. "in": "path",
  4614. "schema": {
  4615. "type": "string",
  4616. "pattern": "^ses"
  4617. },
  4618. "required": true
  4619. },
  4620. {
  4621. "name": "directory",
  4622. "in": "query",
  4623. "schema": {
  4624. "type": "string"
  4625. },
  4626. "required": false
  4627. },
  4628. {
  4629. "name": "workspace",
  4630. "in": "query",
  4631. "schema": {
  4632. "type": "string"
  4633. },
  4634. "required": false
  4635. }
  4636. ],
  4637. "responses": {
  4638. "200": {
  4639. "description": "Get session",
  4640. "content": {
  4641. "application/json": {
  4642. "schema": {
  4643. "$ref": "#/components/schemas/Session"
  4644. }
  4645. }
  4646. }
  4647. },
  4648. "400": {
  4649. "description": "Bad request",
  4650. "content": {
  4651. "application/json": {
  4652. "schema": {
  4653. "$ref": "#/components/schemas/BadRequestError"
  4654. }
  4655. }
  4656. }
  4657. },
  4658. "404": {
  4659. "description": "NotFoundError",
  4660. "content": {
  4661. "application/json": {
  4662. "schema": {
  4663. "$ref": "#/components/schemas/NotFoundError"
  4664. }
  4665. }
  4666. }
  4667. }
  4668. },
  4669. "description": "Retrieve detailed information about a specific OpenCode session.",
  4670. "summary": "Get session",
  4671. "x-codeSamples": [
  4672. {
  4673. "lang": "js",
  4674. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  4675. }
  4676. ]
  4677. },
  4678. "delete": {
  4679. "tags": ["session"],
  4680. "operationId": "session.delete",
  4681. "parameters": [
  4682. {
  4683. "name": "sessionID",
  4684. "in": "path",
  4685. "schema": {
  4686. "type": "string",
  4687. "pattern": "^ses"
  4688. },
  4689. "required": true
  4690. },
  4691. {
  4692. "name": "directory",
  4693. "in": "query",
  4694. "schema": {
  4695. "type": "string"
  4696. },
  4697. "required": false
  4698. },
  4699. {
  4700. "name": "workspace",
  4701. "in": "query",
  4702. "schema": {
  4703. "type": "string"
  4704. },
  4705. "required": false
  4706. }
  4707. ],
  4708. "responses": {
  4709. "200": {
  4710. "description": "Successfully deleted session",
  4711. "content": {
  4712. "application/json": {
  4713. "schema": {
  4714. "type": "boolean",
  4715. "description": "Successfully deleted session"
  4716. }
  4717. }
  4718. }
  4719. },
  4720. "400": {
  4721. "description": "Bad request",
  4722. "content": {
  4723. "application/json": {
  4724. "schema": {
  4725. "$ref": "#/components/schemas/BadRequestError"
  4726. }
  4727. }
  4728. }
  4729. },
  4730. "404": {
  4731. "description": "NotFoundError",
  4732. "content": {
  4733. "application/json": {
  4734. "schema": {
  4735. "$ref": "#/components/schemas/NotFoundError"
  4736. }
  4737. }
  4738. }
  4739. }
  4740. },
  4741. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  4742. "summary": "Delete session",
  4743. "x-codeSamples": [
  4744. {
  4745. "lang": "js",
  4746. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  4747. }
  4748. ]
  4749. },
  4750. "patch": {
  4751. "tags": ["session"],
  4752. "operationId": "session.update",
  4753. "parameters": [
  4754. {
  4755. "name": "sessionID",
  4756. "in": "path",
  4757. "schema": {
  4758. "type": "string",
  4759. "pattern": "^ses"
  4760. },
  4761. "required": true
  4762. },
  4763. {
  4764. "name": "directory",
  4765. "in": "query",
  4766. "schema": {
  4767. "type": "string"
  4768. },
  4769. "required": false
  4770. },
  4771. {
  4772. "name": "workspace",
  4773. "in": "query",
  4774. "schema": {
  4775. "type": "string"
  4776. },
  4777. "required": false
  4778. }
  4779. ],
  4780. "responses": {
  4781. "200": {
  4782. "description": "Successfully updated session",
  4783. "content": {
  4784. "application/json": {
  4785. "schema": {
  4786. "$ref": "#/components/schemas/Session"
  4787. }
  4788. }
  4789. }
  4790. },
  4791. "400": {
  4792. "description": "Bad request",
  4793. "content": {
  4794. "application/json": {
  4795. "schema": {
  4796. "$ref": "#/components/schemas/BadRequestError"
  4797. }
  4798. }
  4799. }
  4800. },
  4801. "404": {
  4802. "description": "NotFoundError",
  4803. "content": {
  4804. "application/json": {
  4805. "schema": {
  4806. "$ref": "#/components/schemas/NotFoundError"
  4807. }
  4808. }
  4809. }
  4810. }
  4811. },
  4812. "description": "Update properties of an existing session, such as title or other metadata.",
  4813. "summary": "Update session",
  4814. "requestBody": {
  4815. "content": {
  4816. "application/json": {
  4817. "schema": {
  4818. "type": "object",
  4819. "properties": {
  4820. "title": {
  4821. "type": "string"
  4822. },
  4823. "permission": {
  4824. "$ref": "#/components/schemas/PermissionRuleset"
  4825. },
  4826. "time": {
  4827. "type": "object",
  4828. "properties": {
  4829. "archived": {
  4830. "type": "number"
  4831. }
  4832. },
  4833. "additionalProperties": false
  4834. }
  4835. },
  4836. "additionalProperties": false
  4837. }
  4838. }
  4839. }
  4840. },
  4841. "x-codeSamples": [
  4842. {
  4843. "lang": "js",
  4844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  4845. }
  4846. ]
  4847. }
  4848. },
  4849. "/session/{sessionID}/children": {
  4850. "get": {
  4851. "tags": ["session"],
  4852. "operationId": "session.children",
  4853. "parameters": [
  4854. {
  4855. "name": "sessionID",
  4856. "in": "path",
  4857. "schema": {
  4858. "type": "string",
  4859. "pattern": "^ses"
  4860. },
  4861. "required": true
  4862. },
  4863. {
  4864. "name": "directory",
  4865. "in": "query",
  4866. "schema": {
  4867. "type": "string"
  4868. },
  4869. "required": false
  4870. },
  4871. {
  4872. "name": "workspace",
  4873. "in": "query",
  4874. "schema": {
  4875. "type": "string"
  4876. },
  4877. "required": false
  4878. }
  4879. ],
  4880. "responses": {
  4881. "200": {
  4882. "description": "List of children",
  4883. "content": {
  4884. "application/json": {
  4885. "schema": {
  4886. "type": "array",
  4887. "items": {
  4888. "$ref": "#/components/schemas/Session"
  4889. },
  4890. "description": "List of children"
  4891. }
  4892. }
  4893. }
  4894. },
  4895. "400": {
  4896. "description": "Bad request",
  4897. "content": {
  4898. "application/json": {
  4899. "schema": {
  4900. "$ref": "#/components/schemas/BadRequestError"
  4901. }
  4902. }
  4903. }
  4904. },
  4905. "404": {
  4906. "description": "NotFoundError",
  4907. "content": {
  4908. "application/json": {
  4909. "schema": {
  4910. "$ref": "#/components/schemas/NotFoundError"
  4911. }
  4912. }
  4913. }
  4914. }
  4915. },
  4916. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  4917. "summary": "Get session children",
  4918. "x-codeSamples": [
  4919. {
  4920. "lang": "js",
  4921. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  4922. }
  4923. ]
  4924. }
  4925. },
  4926. "/session/{sessionID}/todo": {
  4927. "get": {
  4928. "tags": ["session"],
  4929. "operationId": "session.todo",
  4930. "parameters": [
  4931. {
  4932. "name": "sessionID",
  4933. "in": "path",
  4934. "schema": {
  4935. "type": "string",
  4936. "pattern": "^ses"
  4937. },
  4938. "required": true
  4939. },
  4940. {
  4941. "name": "directory",
  4942. "in": "query",
  4943. "schema": {
  4944. "type": "string"
  4945. },
  4946. "required": false
  4947. },
  4948. {
  4949. "name": "workspace",
  4950. "in": "query",
  4951. "schema": {
  4952. "type": "string"
  4953. },
  4954. "required": false
  4955. }
  4956. ],
  4957. "responses": {
  4958. "200": {
  4959. "description": "Todo list",
  4960. "content": {
  4961. "application/json": {
  4962. "schema": {
  4963. "type": "array",
  4964. "items": {
  4965. "$ref": "#/components/schemas/Todo"
  4966. },
  4967. "description": "Todo list"
  4968. }
  4969. }
  4970. }
  4971. },
  4972. "400": {
  4973. "description": "Bad request",
  4974. "content": {
  4975. "application/json": {
  4976. "schema": {
  4977. "$ref": "#/components/schemas/BadRequestError"
  4978. }
  4979. }
  4980. }
  4981. },
  4982. "404": {
  4983. "description": "NotFoundError",
  4984. "content": {
  4985. "application/json": {
  4986. "schema": {
  4987. "$ref": "#/components/schemas/NotFoundError"
  4988. }
  4989. }
  4990. }
  4991. }
  4992. },
  4993. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  4994. "summary": "Get session todos",
  4995. "x-codeSamples": [
  4996. {
  4997. "lang": "js",
  4998. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  4999. }
  5000. ]
  5001. }
  5002. },
  5003. "/session/{sessionID}/diff": {
  5004. "get": {
  5005. "tags": ["session"],
  5006. "operationId": "session.diff",
  5007. "parameters": [
  5008. {
  5009. "name": "sessionID",
  5010. "in": "path",
  5011. "schema": {
  5012. "type": "string",
  5013. "pattern": "^ses"
  5014. },
  5015. "required": true
  5016. },
  5017. {
  5018. "name": "directory",
  5019. "in": "query",
  5020. "schema": {
  5021. "type": "string"
  5022. },
  5023. "required": false
  5024. },
  5025. {
  5026. "name": "workspace",
  5027. "in": "query",
  5028. "schema": {
  5029. "type": "string"
  5030. },
  5031. "required": false
  5032. },
  5033. {
  5034. "name": "messageID",
  5035. "in": "query",
  5036. "schema": {
  5037. "type": "string",
  5038. "pattern": "^msg"
  5039. },
  5040. "required": false
  5041. }
  5042. ],
  5043. "responses": {
  5044. "200": {
  5045. "description": "Successfully retrieved diff",
  5046. "content": {
  5047. "application/json": {
  5048. "schema": {
  5049. "type": "array",
  5050. "items": {
  5051. "$ref": "#/components/schemas/SnapshotFileDiff"
  5052. },
  5053. "description": "Successfully retrieved diff"
  5054. }
  5055. }
  5056. }
  5057. }
  5058. },
  5059. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5060. "summary": "Get message diff",
  5061. "x-codeSamples": [
  5062. {
  5063. "lang": "js",
  5064. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5065. }
  5066. ]
  5067. }
  5068. },
  5069. "/session/{sessionID}/message": {
  5070. "get": {
  5071. "tags": ["session"],
  5072. "operationId": "session.messages",
  5073. "parameters": [
  5074. {
  5075. "name": "sessionID",
  5076. "in": "path",
  5077. "schema": {
  5078. "type": "string",
  5079. "pattern": "^ses"
  5080. },
  5081. "required": true
  5082. },
  5083. {
  5084. "name": "directory",
  5085. "in": "query",
  5086. "schema": {
  5087. "type": "string"
  5088. },
  5089. "required": false
  5090. },
  5091. {
  5092. "name": "workspace",
  5093. "in": "query",
  5094. "schema": {
  5095. "type": "string"
  5096. },
  5097. "required": false
  5098. },
  5099. {
  5100. "name": "limit",
  5101. "in": "query",
  5102. "schema": {
  5103. "type": "integer",
  5104. "minimum": 0,
  5105. "maximum": 9007199254740991
  5106. },
  5107. "required": false
  5108. },
  5109. {
  5110. "name": "before",
  5111. "in": "query",
  5112. "schema": {
  5113. "type": "string"
  5114. },
  5115. "required": false
  5116. }
  5117. ],
  5118. "responses": {
  5119. "200": {
  5120. "description": "List of messages",
  5121. "content": {
  5122. "application/json": {
  5123. "schema": {
  5124. "type": "array",
  5125. "items": {
  5126. "type": "object",
  5127. "properties": {
  5128. "info": {
  5129. "$ref": "#/components/schemas/Message"
  5130. },
  5131. "parts": {
  5132. "type": "array",
  5133. "items": {
  5134. "$ref": "#/components/schemas/Part"
  5135. }
  5136. }
  5137. },
  5138. "required": ["info", "parts"],
  5139. "additionalProperties": false
  5140. },
  5141. "description": "List of messages"
  5142. }
  5143. }
  5144. }
  5145. },
  5146. "400": {
  5147. "description": "Bad request",
  5148. "content": {
  5149. "application/json": {
  5150. "schema": {
  5151. "$ref": "#/components/schemas/BadRequestError"
  5152. }
  5153. }
  5154. }
  5155. },
  5156. "404": {
  5157. "description": "NotFoundError",
  5158. "content": {
  5159. "application/json": {
  5160. "schema": {
  5161. "$ref": "#/components/schemas/NotFoundError"
  5162. }
  5163. }
  5164. }
  5165. }
  5166. },
  5167. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5168. "summary": "Get session messages",
  5169. "x-codeSamples": [
  5170. {
  5171. "lang": "js",
  5172. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5173. }
  5174. ]
  5175. },
  5176. "post": {
  5177. "tags": ["session"],
  5178. "operationId": "session.prompt",
  5179. "parameters": [
  5180. {
  5181. "name": "sessionID",
  5182. "in": "path",
  5183. "schema": {
  5184. "type": "string",
  5185. "pattern": "^ses"
  5186. },
  5187. "required": true
  5188. },
  5189. {
  5190. "name": "directory",
  5191. "in": "query",
  5192. "schema": {
  5193. "type": "string"
  5194. },
  5195. "required": false
  5196. },
  5197. {
  5198. "name": "workspace",
  5199. "in": "query",
  5200. "schema": {
  5201. "type": "string"
  5202. },
  5203. "required": false
  5204. }
  5205. ],
  5206. "responses": {
  5207. "200": {
  5208. "description": "Created message",
  5209. "content": {
  5210. "application/json": {
  5211. "schema": {
  5212. "type": "object",
  5213. "required": ["info", "parts"],
  5214. "properties": {
  5215. "info": {
  5216. "$ref": "#/components/schemas/AssistantMessage"
  5217. },
  5218. "parts": {
  5219. "type": "array",
  5220. "items": {
  5221. "$ref": "#/components/schemas/Part"
  5222. }
  5223. }
  5224. }
  5225. }
  5226. }
  5227. }
  5228. },
  5229. "400": {
  5230. "description": "Bad request",
  5231. "content": {
  5232. "application/json": {
  5233. "schema": {
  5234. "$ref": "#/components/schemas/BadRequestError"
  5235. }
  5236. }
  5237. }
  5238. },
  5239. "404": {
  5240. "description": "NotFoundError",
  5241. "content": {
  5242. "application/json": {
  5243. "schema": {
  5244. "$ref": "#/components/schemas/NotFoundError"
  5245. }
  5246. }
  5247. }
  5248. }
  5249. },
  5250. "description": "Create and send a new message to a session, streaming the AI response.",
  5251. "summary": "Send message",
  5252. "requestBody": {
  5253. "content": {
  5254. "application/json": {
  5255. "schema": {
  5256. "type": "object",
  5257. "properties": {
  5258. "messageID": {
  5259. "type": "string",
  5260. "pattern": "^msg"
  5261. },
  5262. "model": {
  5263. "type": "object",
  5264. "properties": {
  5265. "providerID": {
  5266. "type": "string"
  5267. },
  5268. "modelID": {
  5269. "type": "string"
  5270. }
  5271. },
  5272. "required": ["providerID", "modelID"],
  5273. "additionalProperties": false
  5274. },
  5275. "agent": {
  5276. "type": "string"
  5277. },
  5278. "noReply": {
  5279. "type": "boolean"
  5280. },
  5281. "tools": {
  5282. "type": "object",
  5283. "additionalProperties": {
  5284. "type": "boolean"
  5285. }
  5286. },
  5287. "format": {
  5288. "$ref": "#/components/schemas/OutputFormat"
  5289. },
  5290. "system": {
  5291. "type": "string"
  5292. },
  5293. "variant": {
  5294. "type": "string"
  5295. },
  5296. "parts": {
  5297. "type": "array",
  5298. "items": {
  5299. "anyOf": [
  5300. {
  5301. "$ref": "#/components/schemas/TextPartInput"
  5302. },
  5303. {
  5304. "$ref": "#/components/schemas/FilePartInput"
  5305. },
  5306. {
  5307. "$ref": "#/components/schemas/AgentPartInput"
  5308. },
  5309. {
  5310. "$ref": "#/components/schemas/SubtaskPartInput"
  5311. }
  5312. ]
  5313. }
  5314. }
  5315. },
  5316. "required": ["parts"],
  5317. "additionalProperties": false
  5318. }
  5319. }
  5320. }
  5321. },
  5322. "x-codeSamples": [
  5323. {
  5324. "lang": "js",
  5325. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  5326. }
  5327. ]
  5328. }
  5329. },
  5330. "/session/{sessionID}/message/{messageID}": {
  5331. "get": {
  5332. "tags": ["session"],
  5333. "operationId": "session.message",
  5334. "parameters": [
  5335. {
  5336. "name": "sessionID",
  5337. "in": "path",
  5338. "schema": {
  5339. "type": "string",
  5340. "pattern": "^ses"
  5341. },
  5342. "required": true
  5343. },
  5344. {
  5345. "name": "messageID",
  5346. "in": "path",
  5347. "schema": {
  5348. "type": "string",
  5349. "pattern": "^msg"
  5350. },
  5351. "required": true
  5352. },
  5353. {
  5354. "name": "directory",
  5355. "in": "query",
  5356. "schema": {
  5357. "type": "string"
  5358. },
  5359. "required": false
  5360. },
  5361. {
  5362. "name": "workspace",
  5363. "in": "query",
  5364. "schema": {
  5365. "type": "string"
  5366. },
  5367. "required": false
  5368. }
  5369. ],
  5370. "responses": {
  5371. "200": {
  5372. "description": "Message",
  5373. "content": {
  5374. "application/json": {
  5375. "schema": {
  5376. "type": "object",
  5377. "properties": {
  5378. "info": {
  5379. "$ref": "#/components/schemas/Message"
  5380. },
  5381. "parts": {
  5382. "type": "array",
  5383. "items": {
  5384. "$ref": "#/components/schemas/Part"
  5385. }
  5386. }
  5387. },
  5388. "required": ["info", "parts"],
  5389. "additionalProperties": false,
  5390. "description": "Message"
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "400": {
  5396. "description": "Bad request",
  5397. "content": {
  5398. "application/json": {
  5399. "schema": {
  5400. "$ref": "#/components/schemas/BadRequestError"
  5401. }
  5402. }
  5403. }
  5404. },
  5405. "404": {
  5406. "description": "NotFoundError",
  5407. "content": {
  5408. "application/json": {
  5409. "schema": {
  5410. "$ref": "#/components/schemas/NotFoundError"
  5411. }
  5412. }
  5413. }
  5414. }
  5415. },
  5416. "description": "Retrieve a specific message from a session by its message ID.",
  5417. "summary": "Get message",
  5418. "x-codeSamples": [
  5419. {
  5420. "lang": "js",
  5421. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  5422. }
  5423. ]
  5424. },
  5425. "delete": {
  5426. "tags": ["session"],
  5427. "operationId": "session.deleteMessage",
  5428. "parameters": [
  5429. {
  5430. "name": "sessionID",
  5431. "in": "path",
  5432. "schema": {
  5433. "type": "string",
  5434. "pattern": "^ses"
  5435. },
  5436. "required": true
  5437. },
  5438. {
  5439. "name": "messageID",
  5440. "in": "path",
  5441. "schema": {
  5442. "type": "string",
  5443. "pattern": "^msg"
  5444. },
  5445. "required": true
  5446. },
  5447. {
  5448. "name": "directory",
  5449. "in": "query",
  5450. "schema": {
  5451. "type": "string"
  5452. },
  5453. "required": false
  5454. },
  5455. {
  5456. "name": "workspace",
  5457. "in": "query",
  5458. "schema": {
  5459. "type": "string"
  5460. },
  5461. "required": false
  5462. }
  5463. ],
  5464. "responses": {
  5465. "200": {
  5466. "description": "Successfully deleted message",
  5467. "content": {
  5468. "application/json": {
  5469. "schema": {
  5470. "type": "boolean",
  5471. "description": "Successfully deleted message"
  5472. }
  5473. }
  5474. }
  5475. },
  5476. "400": {
  5477. "description": "Bad request",
  5478. "content": {
  5479. "application/json": {
  5480. "schema": {
  5481. "$ref": "#/components/schemas/BadRequestError"
  5482. }
  5483. }
  5484. }
  5485. },
  5486. "404": {
  5487. "description": "NotFoundError",
  5488. "content": {
  5489. "application/json": {
  5490. "schema": {
  5491. "$ref": "#/components/schemas/NotFoundError"
  5492. }
  5493. }
  5494. }
  5495. }
  5496. },
  5497. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  5498. "summary": "Delete message",
  5499. "x-codeSamples": [
  5500. {
  5501. "lang": "js",
  5502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  5503. }
  5504. ]
  5505. }
  5506. },
  5507. "/session/{sessionID}/fork": {
  5508. "post": {
  5509. "tags": ["session"],
  5510. "operationId": "session.fork",
  5511. "parameters": [
  5512. {
  5513. "name": "sessionID",
  5514. "in": "path",
  5515. "schema": {
  5516. "type": "string",
  5517. "pattern": "^ses"
  5518. },
  5519. "required": true
  5520. },
  5521. {
  5522. "name": "directory",
  5523. "in": "query",
  5524. "schema": {
  5525. "type": "string"
  5526. },
  5527. "required": false
  5528. },
  5529. {
  5530. "name": "workspace",
  5531. "in": "query",
  5532. "schema": {
  5533. "type": "string"
  5534. },
  5535. "required": false
  5536. }
  5537. ],
  5538. "responses": {
  5539. "200": {
  5540. "description": "200",
  5541. "content": {
  5542. "application/json": {
  5543. "schema": {
  5544. "$ref": "#/components/schemas/Session"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "Bad request",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "$ref": "#/components/schemas/BadRequestError"
  5555. }
  5556. }
  5557. }
  5558. },
  5559. "404": {
  5560. "description": "NotFoundError",
  5561. "content": {
  5562. "application/json": {
  5563. "schema": {
  5564. "$ref": "#/components/schemas/NotFoundError"
  5565. }
  5566. }
  5567. }
  5568. }
  5569. },
  5570. "description": "Create a new session by forking an existing session at a specific message point.",
  5571. "summary": "Fork session",
  5572. "requestBody": {
  5573. "content": {
  5574. "application/json": {
  5575. "schema": {
  5576. "type": "object",
  5577. "properties": {
  5578. "messageID": {
  5579. "type": "string",
  5580. "pattern": "^msg"
  5581. }
  5582. },
  5583. "additionalProperties": false
  5584. }
  5585. }
  5586. }
  5587. },
  5588. "x-codeSamples": [
  5589. {
  5590. "lang": "js",
  5591. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  5592. }
  5593. ]
  5594. }
  5595. },
  5596. "/session/{sessionID}/abort": {
  5597. "post": {
  5598. "tags": ["session"],
  5599. "operationId": "session.abort",
  5600. "parameters": [
  5601. {
  5602. "name": "sessionID",
  5603. "in": "path",
  5604. "schema": {
  5605. "type": "string",
  5606. "pattern": "^ses"
  5607. },
  5608. "required": true
  5609. },
  5610. {
  5611. "name": "directory",
  5612. "in": "query",
  5613. "schema": {
  5614. "type": "string"
  5615. },
  5616. "required": false
  5617. },
  5618. {
  5619. "name": "workspace",
  5620. "in": "query",
  5621. "schema": {
  5622. "type": "string"
  5623. },
  5624. "required": false
  5625. }
  5626. ],
  5627. "responses": {
  5628. "200": {
  5629. "description": "Aborted session",
  5630. "content": {
  5631. "application/json": {
  5632. "schema": {
  5633. "type": "boolean",
  5634. "description": "Aborted session"
  5635. }
  5636. }
  5637. }
  5638. },
  5639. "400": {
  5640. "description": "Bad request",
  5641. "content": {
  5642. "application/json": {
  5643. "schema": {
  5644. "$ref": "#/components/schemas/BadRequestError"
  5645. }
  5646. }
  5647. }
  5648. }
  5649. },
  5650. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  5651. "summary": "Abort session",
  5652. "x-codeSamples": [
  5653. {
  5654. "lang": "js",
  5655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  5656. }
  5657. ]
  5658. }
  5659. },
  5660. "/session/{sessionID}/init": {
  5661. "post": {
  5662. "tags": ["session"],
  5663. "operationId": "session.init",
  5664. "parameters": [
  5665. {
  5666. "name": "sessionID",
  5667. "in": "path",
  5668. "schema": {
  5669. "type": "string",
  5670. "pattern": "^ses"
  5671. },
  5672. "required": true
  5673. },
  5674. {
  5675. "name": "directory",
  5676. "in": "query",
  5677. "schema": {
  5678. "type": "string"
  5679. },
  5680. "required": false
  5681. },
  5682. {
  5683. "name": "workspace",
  5684. "in": "query",
  5685. "schema": {
  5686. "type": "string"
  5687. },
  5688. "required": false
  5689. }
  5690. ],
  5691. "responses": {
  5692. "200": {
  5693. "description": "200",
  5694. "content": {
  5695. "application/json": {
  5696. "schema": {
  5697. "type": "boolean",
  5698. "description": "200"
  5699. }
  5700. }
  5701. }
  5702. },
  5703. "400": {
  5704. "description": "Bad request",
  5705. "content": {
  5706. "application/json": {
  5707. "schema": {
  5708. "$ref": "#/components/schemas/BadRequestError"
  5709. }
  5710. }
  5711. }
  5712. },
  5713. "404": {
  5714. "description": "NotFoundError",
  5715. "content": {
  5716. "application/json": {
  5717. "schema": {
  5718. "$ref": "#/components/schemas/NotFoundError"
  5719. }
  5720. }
  5721. }
  5722. }
  5723. },
  5724. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  5725. "summary": "Initialize session",
  5726. "requestBody": {
  5727. "content": {
  5728. "application/json": {
  5729. "schema": {
  5730. "type": "object",
  5731. "properties": {
  5732. "modelID": {
  5733. "type": "string"
  5734. },
  5735. "providerID": {
  5736. "type": "string"
  5737. },
  5738. "messageID": {
  5739. "type": "string",
  5740. "pattern": "^msg"
  5741. }
  5742. },
  5743. "required": ["modelID", "providerID", "messageID"],
  5744. "additionalProperties": false
  5745. }
  5746. }
  5747. }
  5748. },
  5749. "x-codeSamples": [
  5750. {
  5751. "lang": "js",
  5752. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  5753. }
  5754. ]
  5755. }
  5756. },
  5757. "/session/{sessionID}/share": {
  5758. "post": {
  5759. "tags": ["session"],
  5760. "operationId": "session.share",
  5761. "parameters": [
  5762. {
  5763. "name": "sessionID",
  5764. "in": "path",
  5765. "schema": {
  5766. "type": "string",
  5767. "pattern": "^ses"
  5768. },
  5769. "required": true
  5770. },
  5771. {
  5772. "name": "directory",
  5773. "in": "query",
  5774. "schema": {
  5775. "type": "string"
  5776. },
  5777. "required": false
  5778. },
  5779. {
  5780. "name": "workspace",
  5781. "in": "query",
  5782. "schema": {
  5783. "type": "string"
  5784. },
  5785. "required": false
  5786. }
  5787. ],
  5788. "responses": {
  5789. "200": {
  5790. "description": "Successfully shared session",
  5791. "content": {
  5792. "application/json": {
  5793. "schema": {
  5794. "$ref": "#/components/schemas/Session"
  5795. }
  5796. }
  5797. }
  5798. },
  5799. "404": {
  5800. "description": "NotFoundError",
  5801. "content": {
  5802. "application/json": {
  5803. "schema": {
  5804. "$ref": "#/components/schemas/NotFoundError"
  5805. }
  5806. }
  5807. }
  5808. },
  5809. "500": {
  5810. "description": "InternalServerError",
  5811. "content": {
  5812. "application/json": {
  5813. "schema": {
  5814. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5815. }
  5816. }
  5817. }
  5818. }
  5819. },
  5820. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  5821. "summary": "Share session",
  5822. "x-codeSamples": [
  5823. {
  5824. "lang": "js",
  5825. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  5826. }
  5827. ]
  5828. },
  5829. "delete": {
  5830. "tags": ["session"],
  5831. "operationId": "session.unshare",
  5832. "parameters": [
  5833. {
  5834. "name": "sessionID",
  5835. "in": "path",
  5836. "schema": {
  5837. "type": "string",
  5838. "pattern": "^ses"
  5839. },
  5840. "required": true
  5841. },
  5842. {
  5843. "name": "directory",
  5844. "in": "query",
  5845. "schema": {
  5846. "type": "string"
  5847. },
  5848. "required": false
  5849. },
  5850. {
  5851. "name": "workspace",
  5852. "in": "query",
  5853. "schema": {
  5854. "type": "string"
  5855. },
  5856. "required": false
  5857. }
  5858. ],
  5859. "responses": {
  5860. "200": {
  5861. "description": "Successfully unshared session",
  5862. "content": {
  5863. "application/json": {
  5864. "schema": {
  5865. "$ref": "#/components/schemas/Session"
  5866. }
  5867. }
  5868. }
  5869. },
  5870. "404": {
  5871. "description": "NotFoundError",
  5872. "content": {
  5873. "application/json": {
  5874. "schema": {
  5875. "$ref": "#/components/schemas/NotFoundError"
  5876. }
  5877. }
  5878. }
  5879. },
  5880. "500": {
  5881. "description": "InternalServerError",
  5882. "content": {
  5883. "application/json": {
  5884. "schema": {
  5885. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5886. }
  5887. }
  5888. }
  5889. }
  5890. },
  5891. "description": "Remove the shareable link for a session, making it private again.",
  5892. "summary": "Unshare session",
  5893. "x-codeSamples": [
  5894. {
  5895. "lang": "js",
  5896. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  5897. }
  5898. ]
  5899. }
  5900. },
  5901. "/session/{sessionID}/summarize": {
  5902. "post": {
  5903. "tags": ["session"],
  5904. "operationId": "session.summarize",
  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": "Summarized session",
  5935. "content": {
  5936. "application/json": {
  5937. "schema": {
  5938. "type": "boolean",
  5939. "description": "Summarized session"
  5940. }
  5941. }
  5942. }
  5943. },
  5944. "400": {
  5945. "description": "Bad request",
  5946. "content": {
  5947. "application/json": {
  5948. "schema": {
  5949. "$ref": "#/components/schemas/BadRequestError"
  5950. }
  5951. }
  5952. }
  5953. },
  5954. "404": {
  5955. "description": "NotFoundError",
  5956. "content": {
  5957. "application/json": {
  5958. "schema": {
  5959. "$ref": "#/components/schemas/NotFoundError"
  5960. }
  5961. }
  5962. }
  5963. }
  5964. },
  5965. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  5966. "summary": "Summarize session",
  5967. "requestBody": {
  5968. "content": {
  5969. "application/json": {
  5970. "schema": {
  5971. "type": "object",
  5972. "properties": {
  5973. "providerID": {
  5974. "type": "string"
  5975. },
  5976. "modelID": {
  5977. "type": "string"
  5978. },
  5979. "auto": {
  5980. "type": "boolean"
  5981. }
  5982. },
  5983. "required": ["providerID", "modelID"],
  5984. "additionalProperties": false
  5985. }
  5986. }
  5987. }
  5988. },
  5989. "x-codeSamples": [
  5990. {
  5991. "lang": "js",
  5992. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  5993. }
  5994. ]
  5995. }
  5996. },
  5997. "/session/{sessionID}/prompt_async": {
  5998. "post": {
  5999. "tags": ["session"],
  6000. "operationId": "session.prompt_async",
  6001. "parameters": [
  6002. {
  6003. "name": "sessionID",
  6004. "in": "path",
  6005. "schema": {
  6006. "type": "string",
  6007. "pattern": "^ses"
  6008. },
  6009. "required": true
  6010. },
  6011. {
  6012. "name": "directory",
  6013. "in": "query",
  6014. "schema": {
  6015. "type": "string"
  6016. },
  6017. "required": false
  6018. },
  6019. {
  6020. "name": "workspace",
  6021. "in": "query",
  6022. "schema": {
  6023. "type": "string"
  6024. },
  6025. "required": false
  6026. }
  6027. ],
  6028. "responses": {
  6029. "204": {
  6030. "description": "Prompt accepted"
  6031. },
  6032. "400": {
  6033. "description": "Bad request",
  6034. "content": {
  6035. "application/json": {
  6036. "schema": {
  6037. "$ref": "#/components/schemas/BadRequestError"
  6038. }
  6039. }
  6040. }
  6041. },
  6042. "404": {
  6043. "description": "NotFoundError",
  6044. "content": {
  6045. "application/json": {
  6046. "schema": {
  6047. "$ref": "#/components/schemas/NotFoundError"
  6048. }
  6049. }
  6050. }
  6051. }
  6052. },
  6053. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6054. "summary": "Send async message",
  6055. "requestBody": {
  6056. "content": {
  6057. "application/json": {
  6058. "schema": {
  6059. "type": "object",
  6060. "properties": {
  6061. "messageID": {
  6062. "type": "string",
  6063. "pattern": "^msg"
  6064. },
  6065. "model": {
  6066. "type": "object",
  6067. "properties": {
  6068. "providerID": {
  6069. "type": "string"
  6070. },
  6071. "modelID": {
  6072. "type": "string"
  6073. }
  6074. },
  6075. "required": ["providerID", "modelID"],
  6076. "additionalProperties": false
  6077. },
  6078. "agent": {
  6079. "type": "string"
  6080. },
  6081. "noReply": {
  6082. "type": "boolean"
  6083. },
  6084. "tools": {
  6085. "type": "object",
  6086. "additionalProperties": {
  6087. "type": "boolean"
  6088. }
  6089. },
  6090. "format": {
  6091. "$ref": "#/components/schemas/OutputFormat"
  6092. },
  6093. "system": {
  6094. "type": "string"
  6095. },
  6096. "variant": {
  6097. "type": "string"
  6098. },
  6099. "parts": {
  6100. "type": "array",
  6101. "items": {
  6102. "anyOf": [
  6103. {
  6104. "$ref": "#/components/schemas/TextPartInput"
  6105. },
  6106. {
  6107. "$ref": "#/components/schemas/FilePartInput"
  6108. },
  6109. {
  6110. "$ref": "#/components/schemas/AgentPartInput"
  6111. },
  6112. {
  6113. "$ref": "#/components/schemas/SubtaskPartInput"
  6114. }
  6115. ]
  6116. }
  6117. }
  6118. },
  6119. "required": ["parts"],
  6120. "additionalProperties": false
  6121. }
  6122. }
  6123. }
  6124. },
  6125. "x-codeSamples": [
  6126. {
  6127. "lang": "js",
  6128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6129. }
  6130. ]
  6131. }
  6132. },
  6133. "/session/{sessionID}/command": {
  6134. "post": {
  6135. "tags": ["session"],
  6136. "operationId": "session.command",
  6137. "parameters": [
  6138. {
  6139. "name": "sessionID",
  6140. "in": "path",
  6141. "schema": {
  6142. "type": "string",
  6143. "pattern": "^ses"
  6144. },
  6145. "required": true
  6146. },
  6147. {
  6148. "name": "directory",
  6149. "in": "query",
  6150. "schema": {
  6151. "type": "string"
  6152. },
  6153. "required": false
  6154. },
  6155. {
  6156. "name": "workspace",
  6157. "in": "query",
  6158. "schema": {
  6159. "type": "string"
  6160. },
  6161. "required": false
  6162. }
  6163. ],
  6164. "responses": {
  6165. "200": {
  6166. "description": "Created message",
  6167. "content": {
  6168. "application/json": {
  6169. "schema": {
  6170. "type": "object",
  6171. "required": ["info", "parts"],
  6172. "properties": {
  6173. "info": {
  6174. "$ref": "#/components/schemas/AssistantMessage"
  6175. },
  6176. "parts": {
  6177. "type": "array",
  6178. "items": {
  6179. "$ref": "#/components/schemas/Part"
  6180. }
  6181. }
  6182. }
  6183. }
  6184. }
  6185. }
  6186. },
  6187. "400": {
  6188. "description": "Bad request",
  6189. "content": {
  6190. "application/json": {
  6191. "schema": {
  6192. "$ref": "#/components/schemas/BadRequestError"
  6193. }
  6194. }
  6195. }
  6196. },
  6197. "404": {
  6198. "description": "NotFoundError",
  6199. "content": {
  6200. "application/json": {
  6201. "schema": {
  6202. "$ref": "#/components/schemas/NotFoundError"
  6203. }
  6204. }
  6205. }
  6206. }
  6207. },
  6208. "description": "Send a new command to a session for execution by the AI assistant.",
  6209. "summary": "Send command",
  6210. "requestBody": {
  6211. "content": {
  6212. "application/json": {
  6213. "schema": {
  6214. "type": "object",
  6215. "properties": {
  6216. "messageID": {
  6217. "type": "string",
  6218. "pattern": "^msg"
  6219. },
  6220. "agent": {
  6221. "type": "string"
  6222. },
  6223. "model": {
  6224. "type": "string"
  6225. },
  6226. "arguments": {
  6227. "type": "string"
  6228. },
  6229. "command": {
  6230. "type": "string"
  6231. },
  6232. "variant": {
  6233. "type": "string"
  6234. },
  6235. "parts": {
  6236. "type": "array",
  6237. "items": {
  6238. "type": "object",
  6239. "properties": {
  6240. "id": {
  6241. "type": "string",
  6242. "pattern": "^prt"
  6243. },
  6244. "type": {
  6245. "type": "string",
  6246. "enum": ["file"]
  6247. },
  6248. "mime": {
  6249. "type": "string"
  6250. },
  6251. "filename": {
  6252. "type": "string"
  6253. },
  6254. "url": {
  6255. "type": "string"
  6256. },
  6257. "source": {
  6258. "$ref": "#/components/schemas/FilePartSource"
  6259. }
  6260. },
  6261. "required": ["type", "mime", "url"],
  6262. "additionalProperties": false
  6263. }
  6264. }
  6265. },
  6266. "required": ["arguments", "command"],
  6267. "additionalProperties": false
  6268. }
  6269. }
  6270. }
  6271. },
  6272. "x-codeSamples": [
  6273. {
  6274. "lang": "js",
  6275. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  6276. }
  6277. ]
  6278. }
  6279. },
  6280. "/session/{sessionID}/shell": {
  6281. "post": {
  6282. "tags": ["session"],
  6283. "operationId": "session.shell",
  6284. "parameters": [
  6285. {
  6286. "name": "sessionID",
  6287. "in": "path",
  6288. "schema": {
  6289. "type": "string",
  6290. "pattern": "^ses"
  6291. },
  6292. "required": true
  6293. },
  6294. {
  6295. "name": "directory",
  6296. "in": "query",
  6297. "schema": {
  6298. "type": "string"
  6299. },
  6300. "required": false
  6301. },
  6302. {
  6303. "name": "workspace",
  6304. "in": "query",
  6305. "schema": {
  6306. "type": "string"
  6307. },
  6308. "required": false
  6309. }
  6310. ],
  6311. "responses": {
  6312. "200": {
  6313. "description": "Created message",
  6314. "content": {
  6315. "application/json": {
  6316. "schema": {
  6317. "type": "object",
  6318. "properties": {
  6319. "info": {
  6320. "$ref": "#/components/schemas/Message"
  6321. },
  6322. "parts": {
  6323. "type": "array",
  6324. "items": {
  6325. "$ref": "#/components/schemas/Part"
  6326. }
  6327. }
  6328. },
  6329. "required": ["info", "parts"],
  6330. "additionalProperties": false,
  6331. "description": "Created message"
  6332. }
  6333. }
  6334. }
  6335. },
  6336. "400": {
  6337. "description": "Bad request",
  6338. "content": {
  6339. "application/json": {
  6340. "schema": {
  6341. "$ref": "#/components/schemas/BadRequestError"
  6342. }
  6343. }
  6344. }
  6345. },
  6346. "404": {
  6347. "description": "NotFoundError",
  6348. "content": {
  6349. "application/json": {
  6350. "schema": {
  6351. "$ref": "#/components/schemas/NotFoundError"
  6352. }
  6353. }
  6354. }
  6355. }
  6356. },
  6357. "description": "Execute a shell command within the session context and return the AI's response.",
  6358. "summary": "Run shell command",
  6359. "requestBody": {
  6360. "content": {
  6361. "application/json": {
  6362. "schema": {
  6363. "type": "object",
  6364. "properties": {
  6365. "messageID": {
  6366. "type": "string",
  6367. "pattern": "^msg"
  6368. },
  6369. "agent": {
  6370. "type": "string"
  6371. },
  6372. "model": {
  6373. "type": "object",
  6374. "properties": {
  6375. "providerID": {
  6376. "type": "string"
  6377. },
  6378. "modelID": {
  6379. "type": "string"
  6380. }
  6381. },
  6382. "required": ["providerID", "modelID"],
  6383. "additionalProperties": false
  6384. },
  6385. "command": {
  6386. "type": "string"
  6387. }
  6388. },
  6389. "required": ["agent", "command"],
  6390. "additionalProperties": false
  6391. }
  6392. }
  6393. }
  6394. },
  6395. "x-codeSamples": [
  6396. {
  6397. "lang": "js",
  6398. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  6399. }
  6400. ]
  6401. }
  6402. },
  6403. "/session/{sessionID}/revert": {
  6404. "post": {
  6405. "tags": ["session"],
  6406. "operationId": "session.revert",
  6407. "parameters": [
  6408. {
  6409. "name": "sessionID",
  6410. "in": "path",
  6411. "schema": {
  6412. "type": "string",
  6413. "pattern": "^ses"
  6414. },
  6415. "required": true
  6416. },
  6417. {
  6418. "name": "directory",
  6419. "in": "query",
  6420. "schema": {
  6421. "type": "string"
  6422. },
  6423. "required": false
  6424. },
  6425. {
  6426. "name": "workspace",
  6427. "in": "query",
  6428. "schema": {
  6429. "type": "string"
  6430. },
  6431. "required": false
  6432. }
  6433. ],
  6434. "responses": {
  6435. "200": {
  6436. "description": "Updated session",
  6437. "content": {
  6438. "application/json": {
  6439. "schema": {
  6440. "$ref": "#/components/schemas/Session"
  6441. }
  6442. }
  6443. }
  6444. },
  6445. "400": {
  6446. "description": "Bad request",
  6447. "content": {
  6448. "application/json": {
  6449. "schema": {
  6450. "$ref": "#/components/schemas/BadRequestError"
  6451. }
  6452. }
  6453. }
  6454. },
  6455. "404": {
  6456. "description": "NotFoundError",
  6457. "content": {
  6458. "application/json": {
  6459. "schema": {
  6460. "$ref": "#/components/schemas/NotFoundError"
  6461. }
  6462. }
  6463. }
  6464. }
  6465. },
  6466. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  6467. "summary": "Revert message",
  6468. "requestBody": {
  6469. "content": {
  6470. "application/json": {
  6471. "schema": {
  6472. "type": "object",
  6473. "properties": {
  6474. "messageID": {
  6475. "type": "string",
  6476. "pattern": "^msg"
  6477. },
  6478. "partID": {
  6479. "type": "string",
  6480. "pattern": "^prt"
  6481. }
  6482. },
  6483. "required": ["messageID"],
  6484. "additionalProperties": false
  6485. }
  6486. }
  6487. }
  6488. },
  6489. "x-codeSamples": [
  6490. {
  6491. "lang": "js",
  6492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  6493. }
  6494. ]
  6495. }
  6496. },
  6497. "/session/{sessionID}/unrevert": {
  6498. "post": {
  6499. "tags": ["session"],
  6500. "operationId": "session.unrevert",
  6501. "parameters": [
  6502. {
  6503. "name": "sessionID",
  6504. "in": "path",
  6505. "schema": {
  6506. "type": "string",
  6507. "pattern": "^ses"
  6508. },
  6509. "required": true
  6510. },
  6511. {
  6512. "name": "directory",
  6513. "in": "query",
  6514. "schema": {
  6515. "type": "string"
  6516. },
  6517. "required": false
  6518. },
  6519. {
  6520. "name": "workspace",
  6521. "in": "query",
  6522. "schema": {
  6523. "type": "string"
  6524. },
  6525. "required": false
  6526. }
  6527. ],
  6528. "responses": {
  6529. "200": {
  6530. "description": "Updated session",
  6531. "content": {
  6532. "application/json": {
  6533. "schema": {
  6534. "$ref": "#/components/schemas/Session"
  6535. }
  6536. }
  6537. }
  6538. },
  6539. "400": {
  6540. "description": "Bad request",
  6541. "content": {
  6542. "application/json": {
  6543. "schema": {
  6544. "$ref": "#/components/schemas/BadRequestError"
  6545. }
  6546. }
  6547. }
  6548. },
  6549. "404": {
  6550. "description": "NotFoundError",
  6551. "content": {
  6552. "application/json": {
  6553. "schema": {
  6554. "$ref": "#/components/schemas/NotFoundError"
  6555. }
  6556. }
  6557. }
  6558. }
  6559. },
  6560. "description": "Restore all previously reverted messages in a session.",
  6561. "summary": "Restore reverted messages",
  6562. "x-codeSamples": [
  6563. {
  6564. "lang": "js",
  6565. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  6566. }
  6567. ]
  6568. }
  6569. },
  6570. "/session/{sessionID}/permissions/{permissionID}": {
  6571. "post": {
  6572. "tags": ["session"],
  6573. "operationId": "permission.respond",
  6574. "parameters": [
  6575. {
  6576. "name": "sessionID",
  6577. "in": "path",
  6578. "schema": {
  6579. "type": "string",
  6580. "pattern": "^ses"
  6581. },
  6582. "required": true
  6583. },
  6584. {
  6585. "name": "permissionID",
  6586. "in": "path",
  6587. "schema": {
  6588. "type": "string",
  6589. "pattern": "^per"
  6590. },
  6591. "required": true
  6592. },
  6593. {
  6594. "name": "directory",
  6595. "in": "query",
  6596. "schema": {
  6597. "type": "string"
  6598. },
  6599. "required": false
  6600. },
  6601. {
  6602. "name": "workspace",
  6603. "in": "query",
  6604. "schema": {
  6605. "type": "string"
  6606. },
  6607. "required": false
  6608. }
  6609. ],
  6610. "responses": {
  6611. "200": {
  6612. "description": "Permission processed successfully",
  6613. "content": {
  6614. "application/json": {
  6615. "schema": {
  6616. "type": "boolean",
  6617. "description": "Permission processed successfully"
  6618. }
  6619. }
  6620. }
  6621. },
  6622. "400": {
  6623. "description": "Bad request",
  6624. "content": {
  6625. "application/json": {
  6626. "schema": {
  6627. "$ref": "#/components/schemas/BadRequestError"
  6628. }
  6629. }
  6630. }
  6631. },
  6632. "404": {
  6633. "description": "NotFoundError",
  6634. "content": {
  6635. "application/json": {
  6636. "schema": {
  6637. "$ref": "#/components/schemas/NotFoundError"
  6638. }
  6639. }
  6640. }
  6641. }
  6642. },
  6643. "description": "Approve or deny a permission request from the AI assistant.",
  6644. "summary": "Respond to permission",
  6645. "deprecated": true,
  6646. "requestBody": {
  6647. "content": {
  6648. "application/json": {
  6649. "schema": {
  6650. "type": "object",
  6651. "properties": {
  6652. "response": {
  6653. "type": "string",
  6654. "enum": ["once", "always", "reject"]
  6655. }
  6656. },
  6657. "required": ["response"],
  6658. "additionalProperties": false
  6659. }
  6660. }
  6661. }
  6662. },
  6663. "x-codeSamples": [
  6664. {
  6665. "lang": "js",
  6666. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  6667. }
  6668. ]
  6669. }
  6670. },
  6671. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  6672. "delete": {
  6673. "tags": ["session"],
  6674. "operationId": "part.delete",
  6675. "parameters": [
  6676. {
  6677. "name": "sessionID",
  6678. "in": "path",
  6679. "schema": {
  6680. "type": "string",
  6681. "pattern": "^ses"
  6682. },
  6683. "required": true
  6684. },
  6685. {
  6686. "name": "messageID",
  6687. "in": "path",
  6688. "schema": {
  6689. "type": "string",
  6690. "pattern": "^msg"
  6691. },
  6692. "required": true
  6693. },
  6694. {
  6695. "name": "partID",
  6696. "in": "path",
  6697. "schema": {
  6698. "type": "string",
  6699. "pattern": "^prt"
  6700. },
  6701. "required": true
  6702. },
  6703. {
  6704. "name": "directory",
  6705. "in": "query",
  6706. "schema": {
  6707. "type": "string"
  6708. },
  6709. "required": false
  6710. },
  6711. {
  6712. "name": "workspace",
  6713. "in": "query",
  6714. "schema": {
  6715. "type": "string"
  6716. },
  6717. "required": false
  6718. }
  6719. ],
  6720. "responses": {
  6721. "200": {
  6722. "description": "Successfully deleted part",
  6723. "content": {
  6724. "application/json": {
  6725. "schema": {
  6726. "type": "boolean",
  6727. "description": "Successfully deleted part"
  6728. }
  6729. }
  6730. }
  6731. },
  6732. "400": {
  6733. "description": "Bad request",
  6734. "content": {
  6735. "application/json": {
  6736. "schema": {
  6737. "$ref": "#/components/schemas/BadRequestError"
  6738. }
  6739. }
  6740. }
  6741. },
  6742. "404": {
  6743. "description": "NotFoundError",
  6744. "content": {
  6745. "application/json": {
  6746. "schema": {
  6747. "$ref": "#/components/schemas/NotFoundError"
  6748. }
  6749. }
  6750. }
  6751. }
  6752. },
  6753. "description": "Delete a part from a message.",
  6754. "x-codeSamples": [
  6755. {
  6756. "lang": "js",
  6757. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  6758. }
  6759. ]
  6760. },
  6761. "patch": {
  6762. "tags": ["session"],
  6763. "operationId": "part.update",
  6764. "parameters": [
  6765. {
  6766. "name": "sessionID",
  6767. "in": "path",
  6768. "schema": {
  6769. "type": "string",
  6770. "pattern": "^ses"
  6771. },
  6772. "required": true
  6773. },
  6774. {
  6775. "name": "messageID",
  6776. "in": "path",
  6777. "schema": {
  6778. "type": "string",
  6779. "pattern": "^msg"
  6780. },
  6781. "required": true
  6782. },
  6783. {
  6784. "name": "partID",
  6785. "in": "path",
  6786. "schema": {
  6787. "type": "string",
  6788. "pattern": "^prt"
  6789. },
  6790. "required": true
  6791. },
  6792. {
  6793. "name": "directory",
  6794. "in": "query",
  6795. "schema": {
  6796. "type": "string"
  6797. },
  6798. "required": false
  6799. },
  6800. {
  6801. "name": "workspace",
  6802. "in": "query",
  6803. "schema": {
  6804. "type": "string"
  6805. },
  6806. "required": false
  6807. }
  6808. ],
  6809. "responses": {
  6810. "200": {
  6811. "description": "Successfully updated part",
  6812. "content": {
  6813. "application/json": {
  6814. "schema": {
  6815. "$ref": "#/components/schemas/Part"
  6816. }
  6817. }
  6818. }
  6819. },
  6820. "400": {
  6821. "description": "Bad request",
  6822. "content": {
  6823. "application/json": {
  6824. "schema": {
  6825. "$ref": "#/components/schemas/BadRequestError"
  6826. }
  6827. }
  6828. }
  6829. },
  6830. "404": {
  6831. "description": "NotFoundError",
  6832. "content": {
  6833. "application/json": {
  6834. "schema": {
  6835. "$ref": "#/components/schemas/NotFoundError"
  6836. }
  6837. }
  6838. }
  6839. }
  6840. },
  6841. "description": "Update a part in a message.",
  6842. "requestBody": {
  6843. "content": {
  6844. "application/json": {
  6845. "schema": {
  6846. "$ref": "#/components/schemas/Part"
  6847. }
  6848. }
  6849. }
  6850. },
  6851. "x-codeSamples": [
  6852. {
  6853. "lang": "js",
  6854. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  6855. }
  6856. ]
  6857. }
  6858. },
  6859. "/sync/start": {
  6860. "post": {
  6861. "tags": ["sync"],
  6862. "operationId": "sync.start",
  6863. "parameters": [
  6864. {
  6865. "name": "directory",
  6866. "in": "query",
  6867. "schema": {
  6868. "type": "string"
  6869. },
  6870. "required": false
  6871. },
  6872. {
  6873. "name": "workspace",
  6874. "in": "query",
  6875. "schema": {
  6876. "type": "string"
  6877. },
  6878. "required": false
  6879. }
  6880. ],
  6881. "responses": {
  6882. "200": {
  6883. "description": "Workspace sync started",
  6884. "content": {
  6885. "application/json": {
  6886. "schema": {
  6887. "type": "boolean",
  6888. "description": "Workspace sync started"
  6889. }
  6890. }
  6891. }
  6892. }
  6893. },
  6894. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  6895. "summary": "Start workspace sync",
  6896. "x-codeSamples": [
  6897. {
  6898. "lang": "js",
  6899. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  6900. }
  6901. ]
  6902. }
  6903. },
  6904. "/sync/replay": {
  6905. "post": {
  6906. "tags": ["sync"],
  6907. "operationId": "sync.replay",
  6908. "parameters": [
  6909. {
  6910. "name": "directory",
  6911. "in": "query",
  6912. "schema": {
  6913. "type": "string"
  6914. },
  6915. "required": false
  6916. },
  6917. {
  6918. "name": "workspace",
  6919. "in": "query",
  6920. "schema": {
  6921. "type": "string"
  6922. },
  6923. "required": false
  6924. }
  6925. ],
  6926. "responses": {
  6927. "200": {
  6928. "description": "Replayed sync events",
  6929. "content": {
  6930. "application/json": {
  6931. "schema": {
  6932. "type": "object",
  6933. "properties": {
  6934. "sessionID": {
  6935. "type": "string"
  6936. }
  6937. },
  6938. "required": ["sessionID"],
  6939. "additionalProperties": false,
  6940. "description": "Replayed sync events"
  6941. }
  6942. }
  6943. }
  6944. },
  6945. "400": {
  6946. "description": "Bad request",
  6947. "content": {
  6948. "application/json": {
  6949. "schema": {
  6950. "$ref": "#/components/schemas/BadRequestError"
  6951. }
  6952. }
  6953. }
  6954. }
  6955. },
  6956. "description": "Validate and replay a complete sync event history.",
  6957. "summary": "Replay sync events",
  6958. "requestBody": {
  6959. "content": {
  6960. "application/json": {
  6961. "schema": {
  6962. "type": "object",
  6963. "properties": {
  6964. "directory": {
  6965. "type": "string"
  6966. },
  6967. "events": {
  6968. "type": "array",
  6969. "minItems": 1,
  6970. "items": {
  6971. "type": "object",
  6972. "properties": {
  6973. "id": {
  6974. "type": "string"
  6975. },
  6976. "aggregateID": {
  6977. "type": "string"
  6978. },
  6979. "seq": {
  6980. "type": "integer",
  6981. "minimum": 0
  6982. },
  6983. "type": {
  6984. "type": "string"
  6985. },
  6986. "data": {
  6987. "type": "object"
  6988. }
  6989. },
  6990. "required": ["id", "aggregateID", "seq", "type", "data"],
  6991. "additionalProperties": false
  6992. }
  6993. }
  6994. },
  6995. "required": ["directory", "events"],
  6996. "additionalProperties": false
  6997. }
  6998. }
  6999. }
  7000. },
  7001. "x-codeSamples": [
  7002. {
  7003. "lang": "js",
  7004. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7005. }
  7006. ]
  7007. }
  7008. },
  7009. "/sync/steal": {
  7010. "post": {
  7011. "tags": ["sync"],
  7012. "operationId": "sync.steal",
  7013. "parameters": [
  7014. {
  7015. "name": "directory",
  7016. "in": "query",
  7017. "schema": {
  7018. "type": "string"
  7019. },
  7020. "required": false
  7021. },
  7022. {
  7023. "name": "workspace",
  7024. "in": "query",
  7025. "schema": {
  7026. "type": "string"
  7027. },
  7028. "required": false
  7029. }
  7030. ],
  7031. "responses": {
  7032. "200": {
  7033. "description": "Session stolen into workspace",
  7034. "content": {
  7035. "application/json": {
  7036. "schema": {
  7037. "type": "object",
  7038. "properties": {
  7039. "sessionID": {
  7040. "type": "string",
  7041. "pattern": "^ses"
  7042. }
  7043. },
  7044. "required": ["sessionID"],
  7045. "additionalProperties": false,
  7046. "description": "Session stolen into workspace"
  7047. }
  7048. }
  7049. }
  7050. },
  7051. "400": {
  7052. "description": "Bad request",
  7053. "content": {
  7054. "application/json": {
  7055. "schema": {
  7056. "$ref": "#/components/schemas/BadRequestError"
  7057. }
  7058. }
  7059. }
  7060. }
  7061. },
  7062. "description": "Update a session to belong to the current workspace through the sync event system.",
  7063. "summary": "Steal session into workspace",
  7064. "requestBody": {
  7065. "content": {
  7066. "application/json": {
  7067. "schema": {
  7068. "type": "object",
  7069. "properties": {
  7070. "sessionID": {
  7071. "type": "string",
  7072. "pattern": "^ses"
  7073. }
  7074. },
  7075. "required": ["sessionID"],
  7076. "additionalProperties": false
  7077. }
  7078. }
  7079. }
  7080. },
  7081. "x-codeSamples": [
  7082. {
  7083. "lang": "js",
  7084. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7085. }
  7086. ]
  7087. }
  7088. },
  7089. "/sync/history": {
  7090. "post": {
  7091. "tags": ["sync"],
  7092. "operationId": "sync.history.list",
  7093. "parameters": [
  7094. {
  7095. "name": "directory",
  7096. "in": "query",
  7097. "schema": {
  7098. "type": "string"
  7099. },
  7100. "required": false
  7101. },
  7102. {
  7103. "name": "workspace",
  7104. "in": "query",
  7105. "schema": {
  7106. "type": "string"
  7107. },
  7108. "required": false
  7109. }
  7110. ],
  7111. "responses": {
  7112. "200": {
  7113. "description": "Sync events",
  7114. "content": {
  7115. "application/json": {
  7116. "schema": {
  7117. "type": "array",
  7118. "items": {
  7119. "type": "object",
  7120. "properties": {
  7121. "id": {
  7122. "type": "string"
  7123. },
  7124. "aggregate_id": {
  7125. "type": "string"
  7126. },
  7127. "seq": {
  7128. "type": "integer",
  7129. "minimum": 0
  7130. },
  7131. "type": {
  7132. "type": "string"
  7133. },
  7134. "data": {
  7135. "type": "object"
  7136. }
  7137. },
  7138. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7139. "additionalProperties": false
  7140. },
  7141. "description": "Sync events"
  7142. }
  7143. }
  7144. }
  7145. },
  7146. "400": {
  7147. "description": "Bad request",
  7148. "content": {
  7149. "application/json": {
  7150. "schema": {
  7151. "$ref": "#/components/schemas/BadRequestError"
  7152. }
  7153. }
  7154. }
  7155. }
  7156. },
  7157. "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.",
  7158. "summary": "List sync events",
  7159. "requestBody": {
  7160. "content": {
  7161. "application/json": {
  7162. "schema": {
  7163. "type": "object",
  7164. "additionalProperties": {
  7165. "type": "integer",
  7166. "minimum": 0
  7167. }
  7168. }
  7169. }
  7170. }
  7171. },
  7172. "x-codeSamples": [
  7173. {
  7174. "lang": "js",
  7175. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  7176. }
  7177. ]
  7178. }
  7179. },
  7180. "/api/session": {
  7181. "get": {
  7182. "tags": ["v2"],
  7183. "operationId": "v2.session.list",
  7184. "parameters": [
  7185. {
  7186. "name": "directory",
  7187. "in": "query",
  7188. "schema": {
  7189. "type": "string"
  7190. },
  7191. "required": false
  7192. },
  7193. {
  7194. "name": "workspace",
  7195. "in": "query",
  7196. "schema": {
  7197. "type": "string"
  7198. },
  7199. "required": false
  7200. },
  7201. {
  7202. "name": "limit",
  7203. "in": "query",
  7204. "schema": {
  7205. "type": "number"
  7206. },
  7207. "required": false
  7208. },
  7209. {
  7210. "name": "order",
  7211. "in": "query",
  7212. "schema": {
  7213. "type": "string",
  7214. "enum": ["asc", "desc"]
  7215. },
  7216. "required": false
  7217. },
  7218. {
  7219. "name": "path",
  7220. "in": "query",
  7221. "schema": {
  7222. "type": "string"
  7223. },
  7224. "required": false
  7225. },
  7226. {
  7227. "name": "roots",
  7228. "in": "query",
  7229. "schema": {
  7230. "anyOf": [
  7231. {
  7232. "type": "boolean"
  7233. },
  7234. {
  7235. "type": "string",
  7236. "enum": ["true", "false"]
  7237. }
  7238. ]
  7239. },
  7240. "required": false
  7241. },
  7242. {
  7243. "name": "start",
  7244. "in": "query",
  7245. "schema": {
  7246. "type": "number"
  7247. },
  7248. "required": false
  7249. },
  7250. {
  7251. "name": "search",
  7252. "in": "query",
  7253. "schema": {
  7254. "type": "string"
  7255. },
  7256. "required": false
  7257. },
  7258. {
  7259. "name": "cursor",
  7260. "in": "query",
  7261. "schema": {
  7262. "type": "string",
  7263. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  7264. },
  7265. "required": false
  7266. }
  7267. ],
  7268. "responses": {
  7269. "200": {
  7270. "description": "V2SessionsResponse",
  7271. "content": {
  7272. "application/json": {
  7273. "schema": {
  7274. "$ref": "#/components/schemas/V2SessionsResponse"
  7275. }
  7276. }
  7277. }
  7278. },
  7279. "400": {
  7280. "description": "Bad request",
  7281. "content": {
  7282. "application/json": {
  7283. "schema": {
  7284. "$ref": "#/components/schemas/BadRequestError"
  7285. }
  7286. }
  7287. }
  7288. }
  7289. },
  7290. "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.",
  7291. "summary": "List v2 sessions",
  7292. "x-codeSamples": [
  7293. {
  7294. "lang": "js",
  7295. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  7296. }
  7297. ]
  7298. }
  7299. },
  7300. "/api/session/{sessionID}/prompt": {
  7301. "post": {
  7302. "tags": ["v2"],
  7303. "operationId": "v2.session.prompt",
  7304. "parameters": [
  7305. {
  7306. "name": "sessionID",
  7307. "in": "path",
  7308. "schema": {
  7309. "type": "string",
  7310. "pattern": "^ses"
  7311. },
  7312. "required": true
  7313. },
  7314. {
  7315. "name": "directory",
  7316. "in": "query",
  7317. "schema": {
  7318. "type": "string"
  7319. },
  7320. "required": false
  7321. },
  7322. {
  7323. "name": "workspace",
  7324. "in": "query",
  7325. "schema": {
  7326. "type": "string"
  7327. },
  7328. "required": false
  7329. }
  7330. ],
  7331. "responses": {
  7332. "200": {
  7333. "description": "Session.Message",
  7334. "content": {
  7335. "application/json": {
  7336. "schema": {
  7337. "$ref": "#/components/schemas/SessionMessage"
  7338. }
  7339. }
  7340. }
  7341. }
  7342. },
  7343. "description": "Create a v2 session message and queue it for the agent loop.",
  7344. "summary": "Send v2 message",
  7345. "requestBody": {
  7346. "content": {
  7347. "application/json": {
  7348. "schema": {
  7349. "type": "object",
  7350. "properties": {
  7351. "prompt": {
  7352. "$ref": "#/components/schemas/Prompt"
  7353. },
  7354. "delivery": {
  7355. "$ref": "#/components/schemas/SessionDelivery"
  7356. }
  7357. },
  7358. "required": ["prompt"],
  7359. "additionalProperties": false
  7360. }
  7361. }
  7362. }
  7363. },
  7364. "x-codeSamples": [
  7365. {
  7366. "lang": "js",
  7367. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  7368. }
  7369. ]
  7370. }
  7371. },
  7372. "/api/session/{sessionID}/compact": {
  7373. "post": {
  7374. "tags": ["v2"],
  7375. "operationId": "v2.session.compact",
  7376. "parameters": [
  7377. {
  7378. "name": "sessionID",
  7379. "in": "path",
  7380. "schema": {
  7381. "type": "string",
  7382. "pattern": "^ses"
  7383. },
  7384. "required": true
  7385. },
  7386. {
  7387. "name": "directory",
  7388. "in": "query",
  7389. "schema": {
  7390. "type": "string"
  7391. },
  7392. "required": false
  7393. },
  7394. {
  7395. "name": "workspace",
  7396. "in": "query",
  7397. "schema": {
  7398. "type": "string"
  7399. },
  7400. "required": false
  7401. }
  7402. ],
  7403. "responses": {
  7404. "204": {
  7405. "description": "<No Content>"
  7406. }
  7407. },
  7408. "description": "Compact a v2 session conversation.",
  7409. "summary": "Compact v2 session",
  7410. "x-codeSamples": [
  7411. {
  7412. "lang": "js",
  7413. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  7414. }
  7415. ]
  7416. }
  7417. },
  7418. "/api/session/{sessionID}/wait": {
  7419. "post": {
  7420. "tags": ["v2"],
  7421. "operationId": "v2.session.wait",
  7422. "parameters": [
  7423. {
  7424. "name": "sessionID",
  7425. "in": "path",
  7426. "schema": {
  7427. "type": "string",
  7428. "pattern": "^ses"
  7429. },
  7430. "required": true
  7431. },
  7432. {
  7433. "name": "directory",
  7434. "in": "query",
  7435. "schema": {
  7436. "type": "string"
  7437. },
  7438. "required": false
  7439. },
  7440. {
  7441. "name": "workspace",
  7442. "in": "query",
  7443. "schema": {
  7444. "type": "string"
  7445. },
  7446. "required": false
  7447. }
  7448. ],
  7449. "responses": {
  7450. "204": {
  7451. "description": "<No Content>"
  7452. }
  7453. },
  7454. "description": "Wait for a v2 session agent loop to become idle.",
  7455. "summary": "Wait for v2 session",
  7456. "x-codeSamples": [
  7457. {
  7458. "lang": "js",
  7459. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  7460. }
  7461. ]
  7462. }
  7463. },
  7464. "/api/session/{sessionID}/context": {
  7465. "get": {
  7466. "tags": ["v2"],
  7467. "operationId": "v2.session.context",
  7468. "parameters": [
  7469. {
  7470. "name": "sessionID",
  7471. "in": "path",
  7472. "schema": {
  7473. "type": "string",
  7474. "pattern": "^ses"
  7475. },
  7476. "required": true
  7477. },
  7478. {
  7479. "name": "directory",
  7480. "in": "query",
  7481. "schema": {
  7482. "type": "string"
  7483. },
  7484. "required": false
  7485. },
  7486. {
  7487. "name": "workspace",
  7488. "in": "query",
  7489. "schema": {
  7490. "type": "string"
  7491. },
  7492. "required": false
  7493. }
  7494. ],
  7495. "responses": {
  7496. "200": {
  7497. "description": "Success",
  7498. "content": {
  7499. "application/json": {
  7500. "schema": {
  7501. "type": "array",
  7502. "items": {
  7503. "$ref": "#/components/schemas/SessionMessage"
  7504. }
  7505. }
  7506. }
  7507. }
  7508. }
  7509. },
  7510. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  7511. "summary": "Get v2 session context",
  7512. "x-codeSamples": [
  7513. {
  7514. "lang": "js",
  7515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  7516. }
  7517. ]
  7518. }
  7519. },
  7520. "/api/session/{sessionID}/message": {
  7521. "get": {
  7522. "tags": ["v2 messages"],
  7523. "operationId": "v2.session.messages",
  7524. "parameters": [
  7525. {
  7526. "name": "sessionID",
  7527. "in": "path",
  7528. "schema": {
  7529. "type": "string",
  7530. "pattern": "^ses"
  7531. },
  7532. "required": true
  7533. },
  7534. {
  7535. "name": "directory",
  7536. "in": "query",
  7537. "schema": {
  7538. "type": "string"
  7539. },
  7540. "required": false
  7541. },
  7542. {
  7543. "name": "workspace",
  7544. "in": "query",
  7545. "schema": {
  7546. "type": "string"
  7547. },
  7548. "required": false
  7549. },
  7550. {
  7551. "name": "limit",
  7552. "in": "query",
  7553. "schema": {
  7554. "type": "number"
  7555. },
  7556. "required": false
  7557. },
  7558. {
  7559. "name": "order",
  7560. "in": "query",
  7561. "schema": {
  7562. "type": "string",
  7563. "enum": ["asc", "desc"]
  7564. },
  7565. "required": false
  7566. },
  7567. {
  7568. "name": "cursor",
  7569. "in": "query",
  7570. "schema": {
  7571. "type": "string",
  7572. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  7573. },
  7574. "required": false
  7575. }
  7576. ],
  7577. "responses": {
  7578. "200": {
  7579. "description": "V2SessionMessagesResponse",
  7580. "content": {
  7581. "application/json": {
  7582. "schema": {
  7583. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  7584. }
  7585. }
  7586. }
  7587. },
  7588. "400": {
  7589. "description": "Bad request",
  7590. "content": {
  7591. "application/json": {
  7592. "schema": {
  7593. "$ref": "#/components/schemas/BadRequestError"
  7594. }
  7595. }
  7596. }
  7597. }
  7598. },
  7599. "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.",
  7600. "summary": "Get v2 session messages",
  7601. "x-codeSamples": [
  7602. {
  7603. "lang": "js",
  7604. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  7605. }
  7606. ]
  7607. }
  7608. },
  7609. "/api/model": {
  7610. "get": {
  7611. "tags": ["v2 models"],
  7612. "operationId": "v2.model.list",
  7613. "parameters": [
  7614. {
  7615. "name": "location",
  7616. "in": "query",
  7617. "schema": {
  7618. "type": "object",
  7619. "properties": {
  7620. "directory": {
  7621. "type": "string"
  7622. },
  7623. "workspace": {
  7624. "type": "string"
  7625. }
  7626. },
  7627. "additionalProperties": false
  7628. },
  7629. "required": false,
  7630. "style": "deepObject",
  7631. "explode": true
  7632. }
  7633. ],
  7634. "responses": {
  7635. "200": {
  7636. "description": "Success",
  7637. "content": {
  7638. "application/json": {
  7639. "schema": {
  7640. "type": "array",
  7641. "items": {
  7642. "$ref": "#/components/schemas/ModelV2Info"
  7643. }
  7644. }
  7645. }
  7646. }
  7647. }
  7648. },
  7649. "description": "Retrieve available v2 models ordered by release date.",
  7650. "summary": "List v2 models",
  7651. "x-codeSamples": [
  7652. {
  7653. "lang": "js",
  7654. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  7655. }
  7656. ]
  7657. }
  7658. },
  7659. "/api/provider": {
  7660. "get": {
  7661. "tags": ["v2 providers"],
  7662. "operationId": "v2.provider.list",
  7663. "parameters": [
  7664. {
  7665. "name": "location",
  7666. "in": "query",
  7667. "schema": {
  7668. "type": "object",
  7669. "properties": {
  7670. "directory": {
  7671. "type": "string"
  7672. },
  7673. "workspace": {
  7674. "type": "string"
  7675. }
  7676. },
  7677. "additionalProperties": false
  7678. },
  7679. "required": false,
  7680. "style": "deepObject",
  7681. "explode": true
  7682. }
  7683. ],
  7684. "responses": {
  7685. "200": {
  7686. "description": "Success",
  7687. "content": {
  7688. "application/json": {
  7689. "schema": {
  7690. "type": "array",
  7691. "items": {
  7692. "$ref": "#/components/schemas/ProviderV2Info"
  7693. }
  7694. }
  7695. }
  7696. }
  7697. }
  7698. },
  7699. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  7700. "summary": "List v2 providers",
  7701. "x-codeSamples": [
  7702. {
  7703. "lang": "js",
  7704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  7705. }
  7706. ]
  7707. }
  7708. },
  7709. "/api/provider/{providerID}": {
  7710. "get": {
  7711. "tags": ["v2 providers"],
  7712. "operationId": "v2.provider.get",
  7713. "parameters": [
  7714. {
  7715. "name": "providerID",
  7716. "in": "path",
  7717. "schema": {
  7718. "type": "string"
  7719. },
  7720. "required": true
  7721. },
  7722. {
  7723. "name": "location",
  7724. "in": "query",
  7725. "schema": {
  7726. "type": "object",
  7727. "properties": {
  7728. "directory": {
  7729. "type": "string"
  7730. },
  7731. "workspace": {
  7732. "type": "string"
  7733. }
  7734. },
  7735. "additionalProperties": false
  7736. },
  7737. "required": false,
  7738. "style": "deepObject",
  7739. "explode": true
  7740. }
  7741. ],
  7742. "responses": {
  7743. "200": {
  7744. "description": "ProviderV2.Info",
  7745. "content": {
  7746. "application/json": {
  7747. "schema": {
  7748. "$ref": "#/components/schemas/ProviderV2Info"
  7749. }
  7750. }
  7751. }
  7752. },
  7753. "404": {
  7754. "description": "NotFoundError",
  7755. "content": {
  7756. "application/json": {
  7757. "schema": {
  7758. "$ref": "#/components/schemas/NotFoundError"
  7759. }
  7760. }
  7761. }
  7762. }
  7763. },
  7764. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  7765. "summary": "Get v2 provider",
  7766. "x-codeSamples": [
  7767. {
  7768. "lang": "js",
  7769. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  7770. }
  7771. ]
  7772. }
  7773. },
  7774. "/tui/append-prompt": {
  7775. "post": {
  7776. "tags": ["tui"],
  7777. "operationId": "tui.appendPrompt",
  7778. "parameters": [
  7779. {
  7780. "name": "directory",
  7781. "in": "query",
  7782. "schema": {
  7783. "type": "string"
  7784. },
  7785. "required": false
  7786. },
  7787. {
  7788. "name": "workspace",
  7789. "in": "query",
  7790. "schema": {
  7791. "type": "string"
  7792. },
  7793. "required": false
  7794. }
  7795. ],
  7796. "responses": {
  7797. "200": {
  7798. "description": "Prompt processed successfully",
  7799. "content": {
  7800. "application/json": {
  7801. "schema": {
  7802. "type": "boolean",
  7803. "description": "Prompt processed successfully"
  7804. }
  7805. }
  7806. }
  7807. },
  7808. "400": {
  7809. "description": "Bad request",
  7810. "content": {
  7811. "application/json": {
  7812. "schema": {
  7813. "$ref": "#/components/schemas/BadRequestError"
  7814. }
  7815. }
  7816. }
  7817. }
  7818. },
  7819. "description": "Append prompt to the TUI.",
  7820. "summary": "Append TUI prompt",
  7821. "requestBody": {
  7822. "content": {
  7823. "application/json": {
  7824. "schema": {
  7825. "type": "object",
  7826. "properties": {
  7827. "text": {
  7828. "type": "string"
  7829. }
  7830. },
  7831. "required": ["text"],
  7832. "additionalProperties": false
  7833. }
  7834. }
  7835. }
  7836. },
  7837. "x-codeSamples": [
  7838. {
  7839. "lang": "js",
  7840. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  7841. }
  7842. ]
  7843. }
  7844. },
  7845. "/tui/open-help": {
  7846. "post": {
  7847. "tags": ["tui"],
  7848. "operationId": "tui.openHelp",
  7849. "parameters": [
  7850. {
  7851. "name": "directory",
  7852. "in": "query",
  7853. "schema": {
  7854. "type": "string"
  7855. },
  7856. "required": false
  7857. },
  7858. {
  7859. "name": "workspace",
  7860. "in": "query",
  7861. "schema": {
  7862. "type": "string"
  7863. },
  7864. "required": false
  7865. }
  7866. ],
  7867. "responses": {
  7868. "200": {
  7869. "description": "Help dialog opened successfully",
  7870. "content": {
  7871. "application/json": {
  7872. "schema": {
  7873. "type": "boolean",
  7874. "description": "Help dialog opened successfully"
  7875. }
  7876. }
  7877. }
  7878. }
  7879. },
  7880. "description": "Open the help dialog in the TUI to display user assistance information.",
  7881. "summary": "Open help dialog",
  7882. "x-codeSamples": [
  7883. {
  7884. "lang": "js",
  7885. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  7886. }
  7887. ]
  7888. }
  7889. },
  7890. "/tui/open-sessions": {
  7891. "post": {
  7892. "tags": ["tui"],
  7893. "operationId": "tui.openSessions",
  7894. "parameters": [
  7895. {
  7896. "name": "directory",
  7897. "in": "query",
  7898. "schema": {
  7899. "type": "string"
  7900. },
  7901. "required": false
  7902. },
  7903. {
  7904. "name": "workspace",
  7905. "in": "query",
  7906. "schema": {
  7907. "type": "string"
  7908. },
  7909. "required": false
  7910. }
  7911. ],
  7912. "responses": {
  7913. "200": {
  7914. "description": "Session dialog opened successfully",
  7915. "content": {
  7916. "application/json": {
  7917. "schema": {
  7918. "type": "boolean",
  7919. "description": "Session dialog opened successfully"
  7920. }
  7921. }
  7922. }
  7923. }
  7924. },
  7925. "description": "Open the session dialog.",
  7926. "summary": "Open sessions dialog",
  7927. "x-codeSamples": [
  7928. {
  7929. "lang": "js",
  7930. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  7931. }
  7932. ]
  7933. }
  7934. },
  7935. "/tui/open-themes": {
  7936. "post": {
  7937. "tags": ["tui"],
  7938. "operationId": "tui.openThemes",
  7939. "parameters": [
  7940. {
  7941. "name": "directory",
  7942. "in": "query",
  7943. "schema": {
  7944. "type": "string"
  7945. },
  7946. "required": false
  7947. },
  7948. {
  7949. "name": "workspace",
  7950. "in": "query",
  7951. "schema": {
  7952. "type": "string"
  7953. },
  7954. "required": false
  7955. }
  7956. ],
  7957. "responses": {
  7958. "200": {
  7959. "description": "Theme dialog opened successfully",
  7960. "content": {
  7961. "application/json": {
  7962. "schema": {
  7963. "type": "boolean",
  7964. "description": "Theme dialog opened successfully"
  7965. }
  7966. }
  7967. }
  7968. }
  7969. },
  7970. "description": "Open the theme dialog.",
  7971. "summary": "Open themes dialog",
  7972. "x-codeSamples": [
  7973. {
  7974. "lang": "js",
  7975. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  7976. }
  7977. ]
  7978. }
  7979. },
  7980. "/tui/open-models": {
  7981. "post": {
  7982. "tags": ["tui"],
  7983. "operationId": "tui.openModels",
  7984. "parameters": [
  7985. {
  7986. "name": "directory",
  7987. "in": "query",
  7988. "schema": {
  7989. "type": "string"
  7990. },
  7991. "required": false
  7992. },
  7993. {
  7994. "name": "workspace",
  7995. "in": "query",
  7996. "schema": {
  7997. "type": "string"
  7998. },
  7999. "required": false
  8000. }
  8001. ],
  8002. "responses": {
  8003. "200": {
  8004. "description": "Model dialog opened successfully",
  8005. "content": {
  8006. "application/json": {
  8007. "schema": {
  8008. "type": "boolean",
  8009. "description": "Model dialog opened successfully"
  8010. }
  8011. }
  8012. }
  8013. }
  8014. },
  8015. "description": "Open the model dialog.",
  8016. "summary": "Open models dialog",
  8017. "x-codeSamples": [
  8018. {
  8019. "lang": "js",
  8020. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8021. }
  8022. ]
  8023. }
  8024. },
  8025. "/tui/submit-prompt": {
  8026. "post": {
  8027. "tags": ["tui"],
  8028. "operationId": "tui.submitPrompt",
  8029. "parameters": [
  8030. {
  8031. "name": "directory",
  8032. "in": "query",
  8033. "schema": {
  8034. "type": "string"
  8035. },
  8036. "required": false
  8037. },
  8038. {
  8039. "name": "workspace",
  8040. "in": "query",
  8041. "schema": {
  8042. "type": "string"
  8043. },
  8044. "required": false
  8045. }
  8046. ],
  8047. "responses": {
  8048. "200": {
  8049. "description": "Prompt submitted successfully",
  8050. "content": {
  8051. "application/json": {
  8052. "schema": {
  8053. "type": "boolean",
  8054. "description": "Prompt submitted successfully"
  8055. }
  8056. }
  8057. }
  8058. }
  8059. },
  8060. "description": "Submit the prompt.",
  8061. "summary": "Submit TUI prompt",
  8062. "x-codeSamples": [
  8063. {
  8064. "lang": "js",
  8065. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8066. }
  8067. ]
  8068. }
  8069. },
  8070. "/tui/clear-prompt": {
  8071. "post": {
  8072. "tags": ["tui"],
  8073. "operationId": "tui.clearPrompt",
  8074. "parameters": [
  8075. {
  8076. "name": "directory",
  8077. "in": "query",
  8078. "schema": {
  8079. "type": "string"
  8080. },
  8081. "required": false
  8082. },
  8083. {
  8084. "name": "workspace",
  8085. "in": "query",
  8086. "schema": {
  8087. "type": "string"
  8088. },
  8089. "required": false
  8090. }
  8091. ],
  8092. "responses": {
  8093. "200": {
  8094. "description": "Prompt cleared successfully",
  8095. "content": {
  8096. "application/json": {
  8097. "schema": {
  8098. "type": "boolean",
  8099. "description": "Prompt cleared successfully"
  8100. }
  8101. }
  8102. }
  8103. }
  8104. },
  8105. "description": "Clear the prompt.",
  8106. "summary": "Clear TUI prompt",
  8107. "x-codeSamples": [
  8108. {
  8109. "lang": "js",
  8110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8111. }
  8112. ]
  8113. }
  8114. },
  8115. "/tui/execute-command": {
  8116. "post": {
  8117. "tags": ["tui"],
  8118. "operationId": "tui.executeCommand",
  8119. "parameters": [
  8120. {
  8121. "name": "directory",
  8122. "in": "query",
  8123. "schema": {
  8124. "type": "string"
  8125. },
  8126. "required": false
  8127. },
  8128. {
  8129. "name": "workspace",
  8130. "in": "query",
  8131. "schema": {
  8132. "type": "string"
  8133. },
  8134. "required": false
  8135. }
  8136. ],
  8137. "responses": {
  8138. "200": {
  8139. "description": "Command executed successfully",
  8140. "content": {
  8141. "application/json": {
  8142. "schema": {
  8143. "type": "boolean",
  8144. "description": "Command executed successfully"
  8145. }
  8146. }
  8147. }
  8148. },
  8149. "400": {
  8150. "description": "Bad request",
  8151. "content": {
  8152. "application/json": {
  8153. "schema": {
  8154. "$ref": "#/components/schemas/BadRequestError"
  8155. }
  8156. }
  8157. }
  8158. }
  8159. },
  8160. "description": "Execute a TUI command.",
  8161. "summary": "Execute TUI command",
  8162. "requestBody": {
  8163. "content": {
  8164. "application/json": {
  8165. "schema": {
  8166. "type": "object",
  8167. "properties": {
  8168. "command": {
  8169. "type": "string"
  8170. }
  8171. },
  8172. "required": ["command"],
  8173. "additionalProperties": false
  8174. }
  8175. }
  8176. }
  8177. },
  8178. "x-codeSamples": [
  8179. {
  8180. "lang": "js",
  8181. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8182. }
  8183. ]
  8184. }
  8185. },
  8186. "/tui/show-toast": {
  8187. "post": {
  8188. "tags": ["tui"],
  8189. "operationId": "tui.showToast",
  8190. "parameters": [
  8191. {
  8192. "name": "directory",
  8193. "in": "query",
  8194. "schema": {
  8195. "type": "string"
  8196. },
  8197. "required": false
  8198. },
  8199. {
  8200. "name": "workspace",
  8201. "in": "query",
  8202. "schema": {
  8203. "type": "string"
  8204. },
  8205. "required": false
  8206. }
  8207. ],
  8208. "responses": {
  8209. "200": {
  8210. "description": "Toast notification shown successfully",
  8211. "content": {
  8212. "application/json": {
  8213. "schema": {
  8214. "type": "boolean",
  8215. "description": "Toast notification shown successfully"
  8216. }
  8217. }
  8218. }
  8219. }
  8220. },
  8221. "description": "Show a toast notification in the TUI.",
  8222. "summary": "Show TUI toast",
  8223. "requestBody": {
  8224. "content": {
  8225. "application/json": {
  8226. "schema": {
  8227. "type": "object",
  8228. "properties": {
  8229. "title": {
  8230. "type": "string"
  8231. },
  8232. "message": {
  8233. "type": "string"
  8234. },
  8235. "variant": {
  8236. "type": "string",
  8237. "enum": ["info", "success", "warning", "error"]
  8238. },
  8239. "duration": {
  8240. "type": "integer",
  8241. "exclusiveMinimum": 0
  8242. }
  8243. },
  8244. "required": ["message", "variant"],
  8245. "additionalProperties": false
  8246. }
  8247. }
  8248. }
  8249. },
  8250. "x-codeSamples": [
  8251. {
  8252. "lang": "js",
  8253. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8254. }
  8255. ]
  8256. }
  8257. },
  8258. "/tui/publish": {
  8259. "post": {
  8260. "tags": ["tui"],
  8261. "operationId": "tui.publish",
  8262. "parameters": [
  8263. {
  8264. "name": "directory",
  8265. "in": "query",
  8266. "schema": {
  8267. "type": "string"
  8268. },
  8269. "required": false
  8270. },
  8271. {
  8272. "name": "workspace",
  8273. "in": "query",
  8274. "schema": {
  8275. "type": "string"
  8276. },
  8277. "required": false
  8278. }
  8279. ],
  8280. "responses": {
  8281. "200": {
  8282. "description": "Event published successfully",
  8283. "content": {
  8284. "application/json": {
  8285. "schema": {
  8286. "type": "boolean",
  8287. "description": "Event published successfully"
  8288. }
  8289. }
  8290. }
  8291. },
  8292. "400": {
  8293. "description": "Bad request",
  8294. "content": {
  8295. "application/json": {
  8296. "schema": {
  8297. "$ref": "#/components/schemas/BadRequestError"
  8298. }
  8299. }
  8300. }
  8301. }
  8302. },
  8303. "description": "Publish a TUI event.",
  8304. "summary": "Publish TUI event",
  8305. "requestBody": {
  8306. "content": {
  8307. "application/json": {
  8308. "schema": {
  8309. "anyOf": [
  8310. {
  8311. "$ref": "#/components/schemas/EventTuiPromptAppend"
  8312. },
  8313. {
  8314. "$ref": "#/components/schemas/EventTuiCommandExecute"
  8315. },
  8316. {
  8317. "$ref": "#/components/schemas/EventTuiToastShow"
  8318. },
  8319. {
  8320. "$ref": "#/components/schemas/EventTuiSessionSelect"
  8321. }
  8322. ]
  8323. }
  8324. }
  8325. }
  8326. },
  8327. "x-codeSamples": [
  8328. {
  8329. "lang": "js",
  8330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  8331. }
  8332. ]
  8333. }
  8334. },
  8335. "/tui/select-session": {
  8336. "post": {
  8337. "tags": ["tui"],
  8338. "operationId": "tui.selectSession",
  8339. "parameters": [
  8340. {
  8341. "name": "directory",
  8342. "in": "query",
  8343. "schema": {
  8344. "type": "string"
  8345. },
  8346. "required": false
  8347. },
  8348. {
  8349. "name": "workspace",
  8350. "in": "query",
  8351. "schema": {
  8352. "type": "string"
  8353. },
  8354. "required": false
  8355. }
  8356. ],
  8357. "responses": {
  8358. "200": {
  8359. "description": "Session selected successfully",
  8360. "content": {
  8361. "application/json": {
  8362. "schema": {
  8363. "type": "boolean",
  8364. "description": "Session selected successfully"
  8365. }
  8366. }
  8367. }
  8368. },
  8369. "400": {
  8370. "description": "Bad request",
  8371. "content": {
  8372. "application/json": {
  8373. "schema": {
  8374. "$ref": "#/components/schemas/BadRequestError"
  8375. }
  8376. }
  8377. }
  8378. },
  8379. "404": {
  8380. "description": "NotFoundError",
  8381. "content": {
  8382. "application/json": {
  8383. "schema": {
  8384. "$ref": "#/components/schemas/NotFoundError"
  8385. }
  8386. }
  8387. }
  8388. }
  8389. },
  8390. "description": "Navigate the TUI to display the specified session.",
  8391. "summary": "Select session",
  8392. "requestBody": {
  8393. "content": {
  8394. "application/json": {
  8395. "schema": {
  8396. "type": "object",
  8397. "properties": {
  8398. "sessionID": {
  8399. "type": "string",
  8400. "pattern": "^ses",
  8401. "description": "Session ID to navigate to"
  8402. }
  8403. },
  8404. "required": ["sessionID"],
  8405. "additionalProperties": false
  8406. }
  8407. }
  8408. }
  8409. },
  8410. "x-codeSamples": [
  8411. {
  8412. "lang": "js",
  8413. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  8414. }
  8415. ]
  8416. }
  8417. },
  8418. "/tui/control/next": {
  8419. "get": {
  8420. "tags": ["tui"],
  8421. "operationId": "tui.control.next",
  8422. "parameters": [
  8423. {
  8424. "name": "directory",
  8425. "in": "query",
  8426. "schema": {
  8427. "type": "string"
  8428. },
  8429. "required": false
  8430. },
  8431. {
  8432. "name": "workspace",
  8433. "in": "query",
  8434. "schema": {
  8435. "type": "string"
  8436. },
  8437. "required": false
  8438. }
  8439. ],
  8440. "responses": {
  8441. "200": {
  8442. "description": "Next TUI request",
  8443. "content": {
  8444. "application/json": {
  8445. "schema": {
  8446. "type": "object",
  8447. "properties": {
  8448. "path": {
  8449. "type": "string"
  8450. },
  8451. "body": {}
  8452. },
  8453. "required": ["path", "body"],
  8454. "additionalProperties": false,
  8455. "description": "Next TUI request"
  8456. }
  8457. }
  8458. }
  8459. }
  8460. },
  8461. "description": "Retrieve the next TUI request from the queue for processing.",
  8462. "summary": "Get next TUI request",
  8463. "x-codeSamples": [
  8464. {
  8465. "lang": "js",
  8466. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  8467. }
  8468. ]
  8469. }
  8470. },
  8471. "/tui/control/response": {
  8472. "post": {
  8473. "tags": ["tui"],
  8474. "operationId": "tui.control.response",
  8475. "parameters": [
  8476. {
  8477. "name": "directory",
  8478. "in": "query",
  8479. "schema": {
  8480. "type": "string"
  8481. },
  8482. "required": false
  8483. },
  8484. {
  8485. "name": "workspace",
  8486. "in": "query",
  8487. "schema": {
  8488. "type": "string"
  8489. },
  8490. "required": false
  8491. }
  8492. ],
  8493. "responses": {
  8494. "200": {
  8495. "description": "Response submitted successfully",
  8496. "content": {
  8497. "application/json": {
  8498. "schema": {
  8499. "type": "boolean",
  8500. "description": "Response submitted successfully"
  8501. }
  8502. }
  8503. }
  8504. }
  8505. },
  8506. "description": "Submit a response to the TUI request queue to complete a pending request.",
  8507. "summary": "Submit TUI response",
  8508. "requestBody": {
  8509. "content": {
  8510. "application/json": {
  8511. "schema": {}
  8512. }
  8513. }
  8514. },
  8515. "x-codeSamples": [
  8516. {
  8517. "lang": "js",
  8518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  8519. }
  8520. ]
  8521. }
  8522. },
  8523. "/experimental/workspace/adapter": {
  8524. "get": {
  8525. "tags": ["workspace"],
  8526. "operationId": "experimental.workspace.adapter.list",
  8527. "parameters": [
  8528. {
  8529. "name": "directory",
  8530. "in": "query",
  8531. "schema": {
  8532. "type": "string"
  8533. },
  8534. "required": false
  8535. },
  8536. {
  8537. "name": "workspace",
  8538. "in": "query",
  8539. "schema": {
  8540. "type": "string"
  8541. },
  8542. "required": false
  8543. }
  8544. ],
  8545. "responses": {
  8546. "200": {
  8547. "description": "Workspace adapters",
  8548. "content": {
  8549. "application/json": {
  8550. "schema": {
  8551. "type": "array",
  8552. "items": {
  8553. "type": "object",
  8554. "properties": {
  8555. "type": {
  8556. "type": "string"
  8557. },
  8558. "name": {
  8559. "type": "string"
  8560. },
  8561. "description": {
  8562. "type": "string"
  8563. }
  8564. },
  8565. "required": ["type", "name", "description"],
  8566. "additionalProperties": false
  8567. },
  8568. "description": "Workspace adapters"
  8569. }
  8570. }
  8571. }
  8572. }
  8573. },
  8574. "description": "List all available workspace adapters for the current project.",
  8575. "summary": "List workspace adapters",
  8576. "x-codeSamples": [
  8577. {
  8578. "lang": "js",
  8579. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  8580. }
  8581. ]
  8582. }
  8583. },
  8584. "/experimental/workspace": {
  8585. "get": {
  8586. "tags": ["workspace"],
  8587. "operationId": "experimental.workspace.list",
  8588. "parameters": [
  8589. {
  8590. "name": "directory",
  8591. "in": "query",
  8592. "schema": {
  8593. "type": "string"
  8594. },
  8595. "required": false
  8596. },
  8597. {
  8598. "name": "workspace",
  8599. "in": "query",
  8600. "schema": {
  8601. "type": "string"
  8602. },
  8603. "required": false
  8604. }
  8605. ],
  8606. "responses": {
  8607. "200": {
  8608. "description": "Workspaces",
  8609. "content": {
  8610. "application/json": {
  8611. "schema": {
  8612. "type": "array",
  8613. "items": {
  8614. "$ref": "#/components/schemas/Workspace"
  8615. },
  8616. "description": "Workspaces"
  8617. }
  8618. }
  8619. }
  8620. }
  8621. },
  8622. "description": "List all workspaces.",
  8623. "summary": "List workspaces",
  8624. "x-codeSamples": [
  8625. {
  8626. "lang": "js",
  8627. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  8628. }
  8629. ]
  8630. },
  8631. "post": {
  8632. "tags": ["workspace"],
  8633. "operationId": "experimental.workspace.create",
  8634. "parameters": [
  8635. {
  8636. "name": "directory",
  8637. "in": "query",
  8638. "schema": {
  8639. "type": "string"
  8640. },
  8641. "required": false
  8642. },
  8643. {
  8644. "name": "workspace",
  8645. "in": "query",
  8646. "schema": {
  8647. "type": "string"
  8648. },
  8649. "required": false
  8650. }
  8651. ],
  8652. "responses": {
  8653. "200": {
  8654. "description": "Workspace created",
  8655. "content": {
  8656. "application/json": {
  8657. "schema": {
  8658. "$ref": "#/components/schemas/Workspace"
  8659. }
  8660. }
  8661. }
  8662. },
  8663. "400": {
  8664. "description": "Bad request",
  8665. "content": {
  8666. "application/json": {
  8667. "schema": {
  8668. "$ref": "#/components/schemas/BadRequestError"
  8669. }
  8670. }
  8671. }
  8672. }
  8673. },
  8674. "description": "Create a workspace for the current project.",
  8675. "summary": "Create workspace",
  8676. "requestBody": {
  8677. "content": {
  8678. "application/json": {
  8679. "schema": {
  8680. "type": "object",
  8681. "properties": {
  8682. "id": {
  8683. "type": "string",
  8684. "pattern": "^wrk"
  8685. },
  8686. "type": {
  8687. "type": "string"
  8688. },
  8689. "branch": {
  8690. "anyOf": [
  8691. {
  8692. "type": "string"
  8693. },
  8694. {
  8695. "type": "null"
  8696. }
  8697. ]
  8698. },
  8699. "extra": {
  8700. "anyOf": [
  8701. {},
  8702. {
  8703. "type": "null"
  8704. }
  8705. ]
  8706. }
  8707. },
  8708. "required": ["type"],
  8709. "additionalProperties": false
  8710. }
  8711. }
  8712. }
  8713. },
  8714. "x-codeSamples": [
  8715. {
  8716. "lang": "js",
  8717. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  8718. }
  8719. ]
  8720. }
  8721. },
  8722. "/experimental/workspace/sync-list": {
  8723. "post": {
  8724. "tags": ["workspace"],
  8725. "operationId": "experimental.workspace.syncList",
  8726. "parameters": [
  8727. {
  8728. "name": "directory",
  8729. "in": "query",
  8730. "schema": {
  8731. "type": "string"
  8732. },
  8733. "required": false
  8734. },
  8735. {
  8736. "name": "workspace",
  8737. "in": "query",
  8738. "schema": {
  8739. "type": "string"
  8740. },
  8741. "required": false
  8742. }
  8743. ],
  8744. "responses": {
  8745. "204": {
  8746. "description": "Workspace list synced"
  8747. }
  8748. },
  8749. "description": "Register missing workspaces returned by workspace adapters.",
  8750. "summary": "Sync workspace list",
  8751. "x-codeSamples": [
  8752. {
  8753. "lang": "js",
  8754. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  8755. }
  8756. ]
  8757. }
  8758. },
  8759. "/experimental/workspace/status": {
  8760. "get": {
  8761. "tags": ["workspace"],
  8762. "operationId": "experimental.workspace.status",
  8763. "parameters": [
  8764. {
  8765. "name": "directory",
  8766. "in": "query",
  8767. "schema": {
  8768. "type": "string"
  8769. },
  8770. "required": false
  8771. },
  8772. {
  8773. "name": "workspace",
  8774. "in": "query",
  8775. "schema": {
  8776. "type": "string"
  8777. },
  8778. "required": false
  8779. }
  8780. ],
  8781. "responses": {
  8782. "200": {
  8783. "description": "Workspace status",
  8784. "content": {
  8785. "application/json": {
  8786. "schema": {
  8787. "type": "array",
  8788. "items": {
  8789. "type": "object",
  8790. "properties": {
  8791. "workspaceID": {
  8792. "type": "string",
  8793. "pattern": "^wrk"
  8794. },
  8795. "status": {
  8796. "type": "string",
  8797. "enum": ["connected", "connecting", "disconnected", "error"]
  8798. }
  8799. },
  8800. "required": ["workspaceID", "status"],
  8801. "additionalProperties": false
  8802. },
  8803. "description": "Workspace status"
  8804. }
  8805. }
  8806. }
  8807. }
  8808. },
  8809. "description": "Get connection status for workspaces in the current project.",
  8810. "summary": "Workspace status",
  8811. "x-codeSamples": [
  8812. {
  8813. "lang": "js",
  8814. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  8815. }
  8816. ]
  8817. }
  8818. },
  8819. "/experimental/workspace/{id}": {
  8820. "delete": {
  8821. "tags": ["workspace"],
  8822. "operationId": "experimental.workspace.remove",
  8823. "parameters": [
  8824. {
  8825. "name": "id",
  8826. "in": "path",
  8827. "schema": {
  8828. "type": "string",
  8829. "pattern": "^wrk"
  8830. },
  8831. "required": true
  8832. },
  8833. {
  8834. "name": "directory",
  8835. "in": "query",
  8836. "schema": {
  8837. "type": "string"
  8838. },
  8839. "required": false
  8840. },
  8841. {
  8842. "name": "workspace",
  8843. "in": "query",
  8844. "schema": {
  8845. "type": "string"
  8846. },
  8847. "required": false
  8848. }
  8849. ],
  8850. "responses": {
  8851. "200": {
  8852. "description": "Workspace removed",
  8853. "content": {
  8854. "application/json": {
  8855. "schema": {
  8856. "$ref": "#/components/schemas/Workspace"
  8857. }
  8858. }
  8859. }
  8860. },
  8861. "400": {
  8862. "description": "Bad request",
  8863. "content": {
  8864. "application/json": {
  8865. "schema": {
  8866. "$ref": "#/components/schemas/BadRequestError"
  8867. }
  8868. }
  8869. }
  8870. }
  8871. },
  8872. "description": "Remove an existing workspace.",
  8873. "summary": "Remove workspace",
  8874. "x-codeSamples": [
  8875. {
  8876. "lang": "js",
  8877. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  8878. }
  8879. ]
  8880. }
  8881. },
  8882. "/experimental/workspace/warp": {
  8883. "post": {
  8884. "tags": ["workspace"],
  8885. "operationId": "experimental.workspace.warp",
  8886. "parameters": [
  8887. {
  8888. "name": "directory",
  8889. "in": "query",
  8890. "schema": {
  8891. "type": "string"
  8892. },
  8893. "required": false
  8894. },
  8895. {
  8896. "name": "workspace",
  8897. "in": "query",
  8898. "schema": {
  8899. "type": "string"
  8900. },
  8901. "required": false
  8902. }
  8903. ],
  8904. "responses": {
  8905. "204": {
  8906. "description": "Session warped"
  8907. },
  8908. "400": {
  8909. "description": "WorkspaceWarpError | VcsApplyError",
  8910. "content": {
  8911. "application/json": {
  8912. "schema": {
  8913. "anyOf": [
  8914. {
  8915. "$ref": "#/components/schemas/WorkspaceWarpError"
  8916. },
  8917. {
  8918. "$ref": "#/components/schemas/VcsApplyError"
  8919. }
  8920. ]
  8921. }
  8922. }
  8923. }
  8924. }
  8925. },
  8926. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  8927. "summary": "Warp session into workspace",
  8928. "requestBody": {
  8929. "content": {
  8930. "application/json": {
  8931. "schema": {
  8932. "type": "object",
  8933. "properties": {
  8934. "id": {
  8935. "anyOf": [
  8936. {
  8937. "type": "string",
  8938. "pattern": "^wrk"
  8939. },
  8940. {
  8941. "type": "null"
  8942. }
  8943. ]
  8944. },
  8945. "sessionID": {
  8946. "type": "string",
  8947. "pattern": "^ses"
  8948. },
  8949. "copyChanges": {
  8950. "type": "boolean"
  8951. }
  8952. },
  8953. "required": ["id", "sessionID"],
  8954. "additionalProperties": false
  8955. }
  8956. }
  8957. }
  8958. },
  8959. "x-codeSamples": [
  8960. {
  8961. "lang": "js",
  8962. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  8963. }
  8964. ]
  8965. }
  8966. },
  8967. "/pty/{ptyID}/connect": {
  8968. "get": {
  8969. "tags": ["pty"],
  8970. "operationId": "pty.connect",
  8971. "parameters": [
  8972. {
  8973. "name": "ptyID",
  8974. "in": "path",
  8975. "schema": {
  8976. "type": "string",
  8977. "pattern": "^pty"
  8978. },
  8979. "required": true
  8980. },
  8981. {
  8982. "name": "directory",
  8983. "in": "query",
  8984. "schema": {
  8985. "type": "string"
  8986. },
  8987. "required": false
  8988. },
  8989. {
  8990. "name": "workspace",
  8991. "in": "query",
  8992. "schema": {
  8993. "type": "string"
  8994. },
  8995. "required": false
  8996. }
  8997. ],
  8998. "responses": {
  8999. "200": {
  9000. "description": "Connected session",
  9001. "content": {
  9002. "application/json": {
  9003. "schema": {
  9004. "type": "boolean",
  9005. "description": "Connected session"
  9006. }
  9007. }
  9008. }
  9009. },
  9010. "403": {
  9011. "description": "Forbidden",
  9012. "content": {
  9013. "application/json": {
  9014. "schema": {
  9015. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  9016. }
  9017. }
  9018. }
  9019. },
  9020. "404": {
  9021. "description": "Not found",
  9022. "content": {
  9023. "application/json": {
  9024. "schema": {
  9025. "$ref": "#/components/schemas/NotFoundError"
  9026. }
  9027. }
  9028. }
  9029. }
  9030. },
  9031. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  9032. "summary": "Connect to PTY session",
  9033. "x-codeSamples": [
  9034. {
  9035. "lang": "js",
  9036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  9037. }
  9038. ]
  9039. }
  9040. }
  9041. },
  9042. "components": {
  9043. "schemas": {
  9044. "Event": {
  9045. "anyOf": [
  9046. {
  9047. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  9048. },
  9049. {
  9050. "$ref": "#/components/schemas/EventFileEdited"
  9051. },
  9052. {
  9053. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  9054. },
  9055. {
  9056. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  9057. },
  9058. {
  9059. "$ref": "#/components/schemas/EventLspUpdated"
  9060. },
  9061. {
  9062. "$ref": "#/components/schemas/EventMessagePartDelta"
  9063. },
  9064. {
  9065. "$ref": "#/components/schemas/EventPermissionAsked"
  9066. },
  9067. {
  9068. "$ref": "#/components/schemas/EventPermissionReplied"
  9069. },
  9070. {
  9071. "$ref": "#/components/schemas/EventSessionDiff"
  9072. },
  9073. {
  9074. "$ref": "#/components/schemas/EventSessionError"
  9075. },
  9076. {
  9077. "$ref": "#/components/schemas/EventQuestionAsked"
  9078. },
  9079. {
  9080. "$ref": "#/components/schemas/EventQuestionReplied"
  9081. },
  9082. {
  9083. "$ref": "#/components/schemas/EventQuestionRejected"
  9084. },
  9085. {
  9086. "$ref": "#/components/schemas/EventTodoUpdated"
  9087. },
  9088. {
  9089. "$ref": "#/components/schemas/EventSessionStatus"
  9090. },
  9091. {
  9092. "$ref": "#/components/schemas/EventSessionIdle"
  9093. },
  9094. {
  9095. "$ref": "#/components/schemas/Event.tui.prompt.append"
  9096. },
  9097. {
  9098. "$ref": "#/components/schemas/Event.tui.command.execute"
  9099. },
  9100. {
  9101. "$ref": "#/components/schemas/EventTuiToastShow1"
  9102. },
  9103. {
  9104. "$ref": "#/components/schemas/Event.tui.session.select"
  9105. },
  9106. {
  9107. "$ref": "#/components/schemas/EventMcpToolsChanged"
  9108. },
  9109. {
  9110. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  9111. },
  9112. {
  9113. "$ref": "#/components/schemas/EventCommandExecuted"
  9114. },
  9115. {
  9116. "$ref": "#/components/schemas/EventProjectUpdated"
  9117. },
  9118. {
  9119. "$ref": "#/components/schemas/EventSessionCompacted"
  9120. },
  9121. {
  9122. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  9123. },
  9124. {
  9125. "$ref": "#/components/schemas/EventWorkspaceReady"
  9126. },
  9127. {
  9128. "$ref": "#/components/schemas/EventWorkspaceFailed"
  9129. },
  9130. {
  9131. "$ref": "#/components/schemas/EventWorkspaceStatus"
  9132. },
  9133. {
  9134. "$ref": "#/components/schemas/EventWorktreeReady"
  9135. },
  9136. {
  9137. "$ref": "#/components/schemas/EventWorktreeFailed"
  9138. },
  9139. {
  9140. "$ref": "#/components/schemas/EventPtyCreated"
  9141. },
  9142. {
  9143. "$ref": "#/components/schemas/EventPtyUpdated"
  9144. },
  9145. {
  9146. "$ref": "#/components/schemas/EventPtyExited"
  9147. },
  9148. {
  9149. "$ref": "#/components/schemas/EventPtyDeleted"
  9150. },
  9151. {
  9152. "$ref": "#/components/schemas/EventInstallationUpdated"
  9153. },
  9154. {
  9155. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  9156. },
  9157. {
  9158. "$ref": "#/components/schemas/EventServerConnected"
  9159. },
  9160. {
  9161. "$ref": "#/components/schemas/EventGlobalDisposed"
  9162. },
  9163. {
  9164. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  9165. },
  9166. {
  9167. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  9168. },
  9169. {
  9170. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  9171. },
  9172. {
  9173. "$ref": "#/components/schemas/EventSessionNextPrompted"
  9174. },
  9175. {
  9176. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  9177. },
  9178. {
  9179. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  9180. },
  9181. {
  9182. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  9183. },
  9184. {
  9185. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  9186. },
  9187. {
  9188. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  9189. },
  9190. {
  9191. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  9192. },
  9193. {
  9194. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  9195. },
  9196. {
  9197. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  9198. },
  9199. {
  9200. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  9201. },
  9202. {
  9203. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  9204. },
  9205. {
  9206. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  9207. },
  9208. {
  9209. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  9210. },
  9211. {
  9212. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  9213. },
  9214. {
  9215. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  9216. },
  9217. {
  9218. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  9219. },
  9220. {
  9221. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  9222. },
  9223. {
  9224. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  9225. },
  9226. {
  9227. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  9228. },
  9229. {
  9230. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  9231. },
  9232. {
  9233. "$ref": "#/components/schemas/EventSessionNextRetried"
  9234. },
  9235. {
  9236. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  9237. },
  9238. {
  9239. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  9240. },
  9241. {
  9242. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  9243. }
  9244. ]
  9245. },
  9246. "OAuth": {
  9247. "type": "object",
  9248. "properties": {
  9249. "type": {
  9250. "type": "string",
  9251. "enum": ["oauth"]
  9252. },
  9253. "refresh": {
  9254. "type": "string"
  9255. },
  9256. "access": {
  9257. "type": "string"
  9258. },
  9259. "expires": {
  9260. "type": "integer",
  9261. "minimum": 0
  9262. },
  9263. "accountId": {
  9264. "type": "string"
  9265. },
  9266. "enterpriseUrl": {
  9267. "type": "string"
  9268. }
  9269. },
  9270. "required": ["type", "refresh", "access", "expires"],
  9271. "additionalProperties": false
  9272. },
  9273. "ApiAuth": {
  9274. "type": "object",
  9275. "properties": {
  9276. "type": {
  9277. "type": "string",
  9278. "enum": ["api"]
  9279. },
  9280. "key": {
  9281. "type": "string"
  9282. },
  9283. "metadata": {
  9284. "type": "object",
  9285. "additionalProperties": {
  9286. "type": "string"
  9287. }
  9288. }
  9289. },
  9290. "required": ["type", "key"],
  9291. "additionalProperties": false
  9292. },
  9293. "WellKnownAuth": {
  9294. "type": "object",
  9295. "properties": {
  9296. "type": {
  9297. "type": "string",
  9298. "enum": ["wellknown"]
  9299. },
  9300. "key": {
  9301. "type": "string"
  9302. },
  9303. "token": {
  9304. "type": "string"
  9305. }
  9306. },
  9307. "required": ["type", "key", "token"],
  9308. "additionalProperties": false
  9309. },
  9310. "Auth": {
  9311. "anyOf": [
  9312. {
  9313. "$ref": "#/components/schemas/OAuth"
  9314. },
  9315. {
  9316. "$ref": "#/components/schemas/ApiAuth"
  9317. },
  9318. {
  9319. "$ref": "#/components/schemas/WellKnownAuth"
  9320. }
  9321. ]
  9322. },
  9323. "PermissionRequest": {
  9324. "type": "object",
  9325. "properties": {
  9326. "id": {
  9327. "type": "string",
  9328. "pattern": "^per"
  9329. },
  9330. "sessionID": {
  9331. "type": "string",
  9332. "pattern": "^ses"
  9333. },
  9334. "permission": {
  9335. "type": "string"
  9336. },
  9337. "patterns": {
  9338. "type": "array",
  9339. "items": {
  9340. "type": "string"
  9341. }
  9342. },
  9343. "metadata": {
  9344. "type": "object"
  9345. },
  9346. "always": {
  9347. "type": "array",
  9348. "items": {
  9349. "type": "string"
  9350. }
  9351. },
  9352. "tool": {
  9353. "type": "object",
  9354. "properties": {
  9355. "messageID": {
  9356. "type": "string",
  9357. "pattern": "^msg"
  9358. },
  9359. "callID": {
  9360. "type": "string"
  9361. }
  9362. },
  9363. "required": ["messageID", "callID"],
  9364. "additionalProperties": false
  9365. }
  9366. },
  9367. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  9368. "additionalProperties": false
  9369. },
  9370. "SnapshotFileDiff": {
  9371. "type": "object",
  9372. "properties": {
  9373. "file": {
  9374. "type": "string"
  9375. },
  9376. "patch": {
  9377. "type": "string"
  9378. },
  9379. "additions": {
  9380. "type": "number"
  9381. },
  9382. "deletions": {
  9383. "type": "number"
  9384. },
  9385. "status": {
  9386. "type": "string",
  9387. "enum": ["added", "deleted", "modified"]
  9388. }
  9389. },
  9390. "required": ["additions", "deletions"],
  9391. "additionalProperties": false
  9392. },
  9393. "ProviderAuthError": {
  9394. "type": "object",
  9395. "properties": {
  9396. "name": {
  9397. "type": "string",
  9398. "enum": ["ProviderAuthError"]
  9399. },
  9400. "data": {
  9401. "type": "object",
  9402. "properties": {
  9403. "providerID": {
  9404. "type": "string"
  9405. },
  9406. "message": {
  9407. "type": "string"
  9408. }
  9409. },
  9410. "required": ["providerID", "message"],
  9411. "additionalProperties": false
  9412. }
  9413. },
  9414. "required": ["name", "data"],
  9415. "additionalProperties": false
  9416. },
  9417. "UnknownError": {
  9418. "type": "object",
  9419. "properties": {
  9420. "name": {
  9421. "type": "string",
  9422. "enum": ["UnknownError"]
  9423. },
  9424. "data": {
  9425. "type": "object",
  9426. "properties": {
  9427. "message": {
  9428. "type": "string"
  9429. }
  9430. },
  9431. "required": ["message"],
  9432. "additionalProperties": false
  9433. }
  9434. },
  9435. "required": ["name", "data"],
  9436. "additionalProperties": false
  9437. },
  9438. "MessageOutputLengthError": {
  9439. "type": "object",
  9440. "properties": {
  9441. "name": {
  9442. "type": "string",
  9443. "enum": ["MessageOutputLengthError"]
  9444. },
  9445. "data": {
  9446. "type": "object",
  9447. "properties": {}
  9448. }
  9449. },
  9450. "required": ["name", "data"],
  9451. "additionalProperties": false
  9452. },
  9453. "MessageAbortedError": {
  9454. "type": "object",
  9455. "properties": {
  9456. "name": {
  9457. "type": "string",
  9458. "enum": ["MessageAbortedError"]
  9459. },
  9460. "data": {
  9461. "type": "object",
  9462. "properties": {
  9463. "message": {
  9464. "type": "string"
  9465. }
  9466. },
  9467. "required": ["message"],
  9468. "additionalProperties": false
  9469. }
  9470. },
  9471. "required": ["name", "data"],
  9472. "additionalProperties": false
  9473. },
  9474. "StructuredOutputError": {
  9475. "type": "object",
  9476. "properties": {
  9477. "name": {
  9478. "type": "string",
  9479. "enum": ["StructuredOutputError"]
  9480. },
  9481. "data": {
  9482. "type": "object",
  9483. "properties": {
  9484. "message": {
  9485. "type": "string"
  9486. },
  9487. "retries": {
  9488. "type": "integer",
  9489. "minimum": 0
  9490. }
  9491. },
  9492. "required": ["message", "retries"],
  9493. "additionalProperties": false
  9494. }
  9495. },
  9496. "required": ["name", "data"],
  9497. "additionalProperties": false
  9498. },
  9499. "ContextOverflowError": {
  9500. "type": "object",
  9501. "properties": {
  9502. "name": {
  9503. "type": "string",
  9504. "enum": ["ContextOverflowError"]
  9505. },
  9506. "data": {
  9507. "type": "object",
  9508. "properties": {
  9509. "message": {
  9510. "type": "string"
  9511. },
  9512. "responseBody": {
  9513. "type": "string"
  9514. }
  9515. },
  9516. "required": ["message"],
  9517. "additionalProperties": false
  9518. }
  9519. },
  9520. "required": ["name", "data"],
  9521. "additionalProperties": false
  9522. },
  9523. "APIError": {
  9524. "type": "object",
  9525. "properties": {
  9526. "name": {
  9527. "type": "string",
  9528. "enum": ["APIError"]
  9529. },
  9530. "data": {
  9531. "type": "object",
  9532. "properties": {
  9533. "message": {
  9534. "type": "string"
  9535. },
  9536. "statusCode": {
  9537. "type": "integer",
  9538. "minimum": 0
  9539. },
  9540. "isRetryable": {
  9541. "type": "boolean"
  9542. },
  9543. "responseHeaders": {
  9544. "type": "object",
  9545. "additionalProperties": {
  9546. "type": "string"
  9547. }
  9548. },
  9549. "responseBody": {
  9550. "type": "string"
  9551. },
  9552. "metadata": {
  9553. "type": "object",
  9554. "additionalProperties": {
  9555. "type": "string"
  9556. }
  9557. }
  9558. },
  9559. "required": ["message", "isRetryable"],
  9560. "additionalProperties": false
  9561. }
  9562. },
  9563. "required": ["name", "data"],
  9564. "additionalProperties": false
  9565. },
  9566. "QuestionOption": {
  9567. "type": "object",
  9568. "properties": {
  9569. "label": {
  9570. "type": "string",
  9571. "description": "Display text (1-5 words, concise)"
  9572. },
  9573. "description": {
  9574. "type": "string",
  9575. "description": "Explanation of choice"
  9576. }
  9577. },
  9578. "required": ["label", "description"],
  9579. "additionalProperties": false
  9580. },
  9581. "QuestionInfo": {
  9582. "type": "object",
  9583. "properties": {
  9584. "question": {
  9585. "type": "string",
  9586. "description": "Complete question"
  9587. },
  9588. "header": {
  9589. "type": "string",
  9590. "description": "Very short label (max 30 chars)"
  9591. },
  9592. "options": {
  9593. "type": "array",
  9594. "items": {
  9595. "$ref": "#/components/schemas/QuestionOption"
  9596. },
  9597. "description": "Available choices"
  9598. },
  9599. "multiple": {
  9600. "type": "boolean"
  9601. },
  9602. "custom": {
  9603. "type": "boolean"
  9604. }
  9605. },
  9606. "required": ["question", "header", "options"],
  9607. "additionalProperties": false
  9608. },
  9609. "QuestionTool": {
  9610. "type": "object",
  9611. "properties": {
  9612. "messageID": {
  9613. "type": "string",
  9614. "pattern": "^msg"
  9615. },
  9616. "callID": {
  9617. "type": "string"
  9618. }
  9619. },
  9620. "required": ["messageID", "callID"],
  9621. "additionalProperties": false
  9622. },
  9623. "QuestionRequest": {
  9624. "type": "object",
  9625. "properties": {
  9626. "id": {
  9627. "type": "string",
  9628. "pattern": "^que"
  9629. },
  9630. "sessionID": {
  9631. "type": "string",
  9632. "pattern": "^ses"
  9633. },
  9634. "questions": {
  9635. "type": "array",
  9636. "items": {
  9637. "$ref": "#/components/schemas/QuestionInfo"
  9638. },
  9639. "description": "Questions to ask"
  9640. },
  9641. "tool": {
  9642. "$ref": "#/components/schemas/QuestionTool"
  9643. }
  9644. },
  9645. "required": ["id", "sessionID", "questions"],
  9646. "additionalProperties": false
  9647. },
  9648. "QuestionAnswer": {
  9649. "type": "array",
  9650. "items": {
  9651. "type": "string"
  9652. }
  9653. },
  9654. "QuestionReplied": {
  9655. "type": "object",
  9656. "properties": {
  9657. "sessionID": {
  9658. "type": "string",
  9659. "pattern": "^ses"
  9660. },
  9661. "requestID": {
  9662. "type": "string",
  9663. "pattern": "^que"
  9664. },
  9665. "answers": {
  9666. "type": "array",
  9667. "items": {
  9668. "$ref": "#/components/schemas/QuestionAnswer"
  9669. }
  9670. }
  9671. },
  9672. "required": ["sessionID", "requestID", "answers"],
  9673. "additionalProperties": false
  9674. },
  9675. "QuestionRejected": {
  9676. "type": "object",
  9677. "properties": {
  9678. "sessionID": {
  9679. "type": "string",
  9680. "pattern": "^ses"
  9681. },
  9682. "requestID": {
  9683. "type": "string",
  9684. "pattern": "^que"
  9685. }
  9686. },
  9687. "required": ["sessionID", "requestID"],
  9688. "additionalProperties": false
  9689. },
  9690. "Todo": {
  9691. "type": "object",
  9692. "properties": {
  9693. "content": {
  9694. "type": "string",
  9695. "description": "Brief description of the task"
  9696. },
  9697. "status": {
  9698. "type": "string",
  9699. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  9700. },
  9701. "priority": {
  9702. "type": "string",
  9703. "description": "Priority level of the task: high, medium, low"
  9704. }
  9705. },
  9706. "required": ["content", "status", "priority"],
  9707. "additionalProperties": false
  9708. },
  9709. "SessionStatus": {
  9710. "anyOf": [
  9711. {
  9712. "type": "object",
  9713. "properties": {
  9714. "type": {
  9715. "type": "string",
  9716. "enum": ["idle"]
  9717. }
  9718. },
  9719. "required": ["type"],
  9720. "additionalProperties": false
  9721. },
  9722. {
  9723. "type": "object",
  9724. "properties": {
  9725. "type": {
  9726. "type": "string",
  9727. "enum": ["retry"]
  9728. },
  9729. "attempt": {
  9730. "type": "integer",
  9731. "minimum": 0
  9732. },
  9733. "message": {
  9734. "type": "string"
  9735. },
  9736. "action": {
  9737. "type": "object",
  9738. "properties": {
  9739. "reason": {
  9740. "type": "string"
  9741. },
  9742. "provider": {
  9743. "type": "string"
  9744. },
  9745. "title": {
  9746. "type": "string"
  9747. },
  9748. "message": {
  9749. "type": "string"
  9750. },
  9751. "label": {
  9752. "type": "string"
  9753. },
  9754. "link": {
  9755. "type": "string"
  9756. }
  9757. },
  9758. "required": ["reason", "provider", "title", "message", "label"],
  9759. "additionalProperties": false
  9760. },
  9761. "next": {
  9762. "type": "integer",
  9763. "minimum": 0
  9764. }
  9765. },
  9766. "required": ["type", "attempt", "message", "next"],
  9767. "additionalProperties": false
  9768. },
  9769. {
  9770. "type": "object",
  9771. "properties": {
  9772. "type": {
  9773. "type": "string",
  9774. "enum": ["busy"]
  9775. }
  9776. },
  9777. "required": ["type"],
  9778. "additionalProperties": false
  9779. }
  9780. ]
  9781. },
  9782. "Event.tui.prompt.append": {
  9783. "type": "object",
  9784. "properties": {
  9785. "id": {
  9786. "type": "string"
  9787. },
  9788. "type": {
  9789. "type": "string",
  9790. "enum": ["tui.prompt.append"]
  9791. },
  9792. "properties": {
  9793. "type": "object",
  9794. "properties": {
  9795. "text": {
  9796. "type": "string"
  9797. }
  9798. },
  9799. "required": ["text"],
  9800. "additionalProperties": false
  9801. }
  9802. },
  9803. "required": ["id", "type", "properties"],
  9804. "additionalProperties": false
  9805. },
  9806. "Event.tui.command.execute": {
  9807. "type": "object",
  9808. "properties": {
  9809. "id": {
  9810. "type": "string"
  9811. },
  9812. "type": {
  9813. "type": "string",
  9814. "enum": ["tui.command.execute"]
  9815. },
  9816. "properties": {
  9817. "type": "object",
  9818. "properties": {
  9819. "command": {
  9820. "anyOf": [
  9821. {
  9822. "type": "string",
  9823. "enum": [
  9824. "session.list",
  9825. "session.new",
  9826. "session.share",
  9827. "session.interrupt",
  9828. "session.compact",
  9829. "session.page.up",
  9830. "session.page.down",
  9831. "session.line.up",
  9832. "session.line.down",
  9833. "session.half.page.up",
  9834. "session.half.page.down",
  9835. "session.first",
  9836. "session.last",
  9837. "prompt.clear",
  9838. "prompt.submit",
  9839. "agent.cycle"
  9840. ]
  9841. },
  9842. {
  9843. "type": "string"
  9844. }
  9845. ]
  9846. }
  9847. },
  9848. "required": ["command"],
  9849. "additionalProperties": false
  9850. }
  9851. },
  9852. "required": ["id", "type", "properties"],
  9853. "additionalProperties": false
  9854. },
  9855. "Event.tui.toast.show": {
  9856. "type": "object",
  9857. "properties": {
  9858. "id": {
  9859. "type": "string"
  9860. },
  9861. "type": {
  9862. "type": "string",
  9863. "enum": ["tui.toast.show"]
  9864. },
  9865. "properties": {
  9866. "type": "object",
  9867. "properties": {
  9868. "title": {
  9869. "type": "string"
  9870. },
  9871. "message": {
  9872. "type": "string"
  9873. },
  9874. "variant": {
  9875. "type": "string",
  9876. "enum": ["info", "success", "warning", "error"]
  9877. },
  9878. "duration": {
  9879. "type": "integer",
  9880. "exclusiveMinimum": 0
  9881. }
  9882. },
  9883. "required": ["message", "variant"],
  9884. "additionalProperties": false
  9885. }
  9886. },
  9887. "required": ["id", "type", "properties"],
  9888. "additionalProperties": false
  9889. },
  9890. "Event.tui.session.select": {
  9891. "type": "object",
  9892. "properties": {
  9893. "id": {
  9894. "type": "string"
  9895. },
  9896. "type": {
  9897. "type": "string",
  9898. "enum": ["tui.session.select"]
  9899. },
  9900. "properties": {
  9901. "type": "object",
  9902. "properties": {
  9903. "sessionID": {
  9904. "type": "string",
  9905. "pattern": "^ses",
  9906. "description": "Session ID to navigate to"
  9907. }
  9908. },
  9909. "required": ["sessionID"],
  9910. "additionalProperties": false
  9911. }
  9912. },
  9913. "required": ["id", "type", "properties"],
  9914. "additionalProperties": false
  9915. },
  9916. "Project": {
  9917. "type": "object",
  9918. "properties": {
  9919. "id": {
  9920. "type": "string"
  9921. },
  9922. "worktree": {
  9923. "type": "string"
  9924. },
  9925. "vcs": {
  9926. "type": "string",
  9927. "enum": ["git"]
  9928. },
  9929. "name": {
  9930. "type": "string"
  9931. },
  9932. "icon": {
  9933. "type": "object",
  9934. "properties": {
  9935. "url": {
  9936. "type": "string"
  9937. },
  9938. "override": {
  9939. "type": "string"
  9940. },
  9941. "color": {
  9942. "type": "string"
  9943. }
  9944. },
  9945. "additionalProperties": false
  9946. },
  9947. "commands": {
  9948. "type": "object",
  9949. "properties": {
  9950. "start": {
  9951. "type": "string",
  9952. "description": "Startup script to run when creating a new workspace (worktree)"
  9953. }
  9954. },
  9955. "additionalProperties": false
  9956. },
  9957. "time": {
  9958. "type": "object",
  9959. "properties": {
  9960. "created": {
  9961. "type": "integer",
  9962. "minimum": 0
  9963. },
  9964. "updated": {
  9965. "type": "integer",
  9966. "minimum": 0
  9967. },
  9968. "initialized": {
  9969. "type": "integer",
  9970. "minimum": 0
  9971. }
  9972. },
  9973. "required": ["created", "updated"],
  9974. "additionalProperties": false
  9975. },
  9976. "sandboxes": {
  9977. "type": "array",
  9978. "items": {
  9979. "type": "string"
  9980. }
  9981. }
  9982. },
  9983. "required": ["id", "worktree", "time", "sandboxes"],
  9984. "additionalProperties": false
  9985. },
  9986. "Pty": {
  9987. "type": "object",
  9988. "properties": {
  9989. "id": {
  9990. "type": "string",
  9991. "pattern": "^pty"
  9992. },
  9993. "title": {
  9994. "type": "string"
  9995. },
  9996. "command": {
  9997. "type": "string"
  9998. },
  9999. "args": {
  10000. "type": "array",
  10001. "items": {
  10002. "type": "string"
  10003. }
  10004. },
  10005. "cwd": {
  10006. "type": "string"
  10007. },
  10008. "status": {
  10009. "type": "string",
  10010. "enum": ["running", "exited"]
  10011. },
  10012. "pid": {
  10013. "type": "integer",
  10014. "exclusiveMinimum": 0
  10015. }
  10016. },
  10017. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  10018. "additionalProperties": false
  10019. },
  10020. "Prompt": {
  10021. "type": "object",
  10022. "properties": {
  10023. "text": {
  10024. "type": "string"
  10025. },
  10026. "files": {
  10027. "type": "array",
  10028. "items": {
  10029. "$ref": "#/components/schemas/PromptFileAttachment"
  10030. }
  10031. },
  10032. "agents": {
  10033. "type": "array",
  10034. "items": {
  10035. "$ref": "#/components/schemas/PromptAgentAttachment"
  10036. }
  10037. },
  10038. "references": {
  10039. "type": "array",
  10040. "items": {
  10041. "$ref": "#/components/schemas/PromptReferenceAttachment"
  10042. }
  10043. }
  10044. },
  10045. "required": ["text"],
  10046. "additionalProperties": false
  10047. },
  10048. "OutputFormatText": {
  10049. "type": "object",
  10050. "properties": {
  10051. "type": {
  10052. "type": "string",
  10053. "enum": ["text"]
  10054. }
  10055. },
  10056. "required": ["type"],
  10057. "additionalProperties": false
  10058. },
  10059. "JSONSchema": {
  10060. "type": "object"
  10061. },
  10062. "OutputFormatJsonSchema": {
  10063. "type": "object",
  10064. "properties": {
  10065. "type": {
  10066. "type": "string",
  10067. "enum": ["json_schema"]
  10068. },
  10069. "schema": {
  10070. "$ref": "#/components/schemas/JSONSchema"
  10071. },
  10072. "retryCount": {
  10073. "type": "integer",
  10074. "minimum": 0
  10075. }
  10076. },
  10077. "required": ["type", "schema"],
  10078. "additionalProperties": false
  10079. },
  10080. "OutputFormat": {
  10081. "anyOf": [
  10082. {
  10083. "$ref": "#/components/schemas/OutputFormatText"
  10084. },
  10085. {
  10086. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  10087. }
  10088. ]
  10089. },
  10090. "UserMessage": {
  10091. "type": "object",
  10092. "properties": {
  10093. "id": {
  10094. "type": "string",
  10095. "pattern": "^msg"
  10096. },
  10097. "sessionID": {
  10098. "type": "string",
  10099. "pattern": "^ses"
  10100. },
  10101. "role": {
  10102. "type": "string",
  10103. "enum": ["user"]
  10104. },
  10105. "time": {
  10106. "type": "object",
  10107. "properties": {
  10108. "created": {
  10109. "type": "integer",
  10110. "minimum": 0
  10111. }
  10112. },
  10113. "required": ["created"],
  10114. "additionalProperties": false
  10115. },
  10116. "format": {
  10117. "$ref": "#/components/schemas/OutputFormat"
  10118. },
  10119. "summary": {
  10120. "type": "object",
  10121. "properties": {
  10122. "title": {
  10123. "type": "string"
  10124. },
  10125. "body": {
  10126. "type": "string"
  10127. },
  10128. "diffs": {
  10129. "type": "array",
  10130. "items": {
  10131. "$ref": "#/components/schemas/SnapshotFileDiff"
  10132. }
  10133. }
  10134. },
  10135. "required": ["diffs"],
  10136. "additionalProperties": false
  10137. },
  10138. "agent": {
  10139. "type": "string"
  10140. },
  10141. "model": {
  10142. "type": "object",
  10143. "properties": {
  10144. "providerID": {
  10145. "type": "string"
  10146. },
  10147. "modelID": {
  10148. "type": "string"
  10149. },
  10150. "variant": {
  10151. "type": "string"
  10152. }
  10153. },
  10154. "required": ["providerID", "modelID"],
  10155. "additionalProperties": false
  10156. },
  10157. "system": {
  10158. "type": "string"
  10159. },
  10160. "tools": {
  10161. "type": "object",
  10162. "additionalProperties": {
  10163. "type": "boolean"
  10164. }
  10165. }
  10166. },
  10167. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  10168. "additionalProperties": false
  10169. },
  10170. "AssistantMessage": {
  10171. "type": "object",
  10172. "properties": {
  10173. "id": {
  10174. "type": "string",
  10175. "pattern": "^msg"
  10176. },
  10177. "sessionID": {
  10178. "type": "string",
  10179. "pattern": "^ses"
  10180. },
  10181. "role": {
  10182. "type": "string",
  10183. "enum": ["assistant"]
  10184. },
  10185. "time": {
  10186. "type": "object",
  10187. "properties": {
  10188. "created": {
  10189. "type": "integer",
  10190. "minimum": 0
  10191. },
  10192. "completed": {
  10193. "type": "integer",
  10194. "minimum": 0
  10195. }
  10196. },
  10197. "required": ["created"],
  10198. "additionalProperties": false
  10199. },
  10200. "error": {
  10201. "anyOf": [
  10202. {
  10203. "$ref": "#/components/schemas/ProviderAuthError"
  10204. },
  10205. {
  10206. "$ref": "#/components/schemas/UnknownError"
  10207. },
  10208. {
  10209. "$ref": "#/components/schemas/MessageOutputLengthError"
  10210. },
  10211. {
  10212. "$ref": "#/components/schemas/MessageAbortedError"
  10213. },
  10214. {
  10215. "$ref": "#/components/schemas/StructuredOutputError"
  10216. },
  10217. {
  10218. "$ref": "#/components/schemas/ContextOverflowError"
  10219. },
  10220. {
  10221. "$ref": "#/components/schemas/APIError"
  10222. }
  10223. ]
  10224. },
  10225. "parentID": {
  10226. "type": "string",
  10227. "pattern": "^msg"
  10228. },
  10229. "modelID": {
  10230. "type": "string"
  10231. },
  10232. "providerID": {
  10233. "type": "string"
  10234. },
  10235. "mode": {
  10236. "type": "string"
  10237. },
  10238. "agent": {
  10239. "type": "string"
  10240. },
  10241. "path": {
  10242. "type": "object",
  10243. "properties": {
  10244. "cwd": {
  10245. "type": "string"
  10246. },
  10247. "root": {
  10248. "type": "string"
  10249. }
  10250. },
  10251. "required": ["cwd", "root"],
  10252. "additionalProperties": false
  10253. },
  10254. "summary": {
  10255. "type": "boolean"
  10256. },
  10257. "cost": {
  10258. "type": "number"
  10259. },
  10260. "tokens": {
  10261. "type": "object",
  10262. "properties": {
  10263. "total": {
  10264. "type": "number"
  10265. },
  10266. "input": {
  10267. "type": "number"
  10268. },
  10269. "output": {
  10270. "type": "number"
  10271. },
  10272. "reasoning": {
  10273. "type": "number"
  10274. },
  10275. "cache": {
  10276. "type": "object",
  10277. "properties": {
  10278. "read": {
  10279. "type": "number"
  10280. },
  10281. "write": {
  10282. "type": "number"
  10283. }
  10284. },
  10285. "required": ["read", "write"],
  10286. "additionalProperties": false
  10287. }
  10288. },
  10289. "required": ["input", "output", "reasoning", "cache"],
  10290. "additionalProperties": false
  10291. },
  10292. "structured": {},
  10293. "variant": {
  10294. "type": "string"
  10295. },
  10296. "finish": {
  10297. "type": "string"
  10298. }
  10299. },
  10300. "required": [
  10301. "id",
  10302. "sessionID",
  10303. "role",
  10304. "time",
  10305. "parentID",
  10306. "modelID",
  10307. "providerID",
  10308. "mode",
  10309. "agent",
  10310. "path",
  10311. "cost",
  10312. "tokens"
  10313. ],
  10314. "additionalProperties": false
  10315. },
  10316. "Message": {
  10317. "anyOf": [
  10318. {
  10319. "$ref": "#/components/schemas/UserMessage"
  10320. },
  10321. {
  10322. "$ref": "#/components/schemas/AssistantMessage"
  10323. }
  10324. ]
  10325. },
  10326. "TextPart": {
  10327. "type": "object",
  10328. "properties": {
  10329. "id": {
  10330. "type": "string",
  10331. "pattern": "^prt"
  10332. },
  10333. "sessionID": {
  10334. "type": "string",
  10335. "pattern": "^ses"
  10336. },
  10337. "messageID": {
  10338. "type": "string",
  10339. "pattern": "^msg"
  10340. },
  10341. "type": {
  10342. "type": "string",
  10343. "enum": ["text"]
  10344. },
  10345. "text": {
  10346. "type": "string"
  10347. },
  10348. "synthetic": {
  10349. "type": "boolean"
  10350. },
  10351. "ignored": {
  10352. "type": "boolean"
  10353. },
  10354. "time": {
  10355. "type": "object",
  10356. "properties": {
  10357. "start": {
  10358. "type": "integer",
  10359. "minimum": 0
  10360. },
  10361. "end": {
  10362. "type": "integer",
  10363. "minimum": 0
  10364. }
  10365. },
  10366. "required": ["start"],
  10367. "additionalProperties": false
  10368. },
  10369. "metadata": {
  10370. "type": "object"
  10371. }
  10372. },
  10373. "required": ["id", "sessionID", "messageID", "type", "text"],
  10374. "additionalProperties": false
  10375. },
  10376. "SubtaskPart": {
  10377. "type": "object",
  10378. "properties": {
  10379. "id": {
  10380. "type": "string",
  10381. "pattern": "^prt"
  10382. },
  10383. "sessionID": {
  10384. "type": "string",
  10385. "pattern": "^ses"
  10386. },
  10387. "messageID": {
  10388. "type": "string",
  10389. "pattern": "^msg"
  10390. },
  10391. "type": {
  10392. "type": "string",
  10393. "enum": ["subtask"]
  10394. },
  10395. "prompt": {
  10396. "type": "string"
  10397. },
  10398. "description": {
  10399. "type": "string"
  10400. },
  10401. "agent": {
  10402. "type": "string"
  10403. },
  10404. "model": {
  10405. "type": "object",
  10406. "properties": {
  10407. "providerID": {
  10408. "type": "string"
  10409. },
  10410. "modelID": {
  10411. "type": "string"
  10412. }
  10413. },
  10414. "required": ["providerID", "modelID"],
  10415. "additionalProperties": false
  10416. },
  10417. "command": {
  10418. "type": "string"
  10419. }
  10420. },
  10421. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  10422. "additionalProperties": false
  10423. },
  10424. "ReasoningPart": {
  10425. "type": "object",
  10426. "properties": {
  10427. "id": {
  10428. "type": "string",
  10429. "pattern": "^prt"
  10430. },
  10431. "sessionID": {
  10432. "type": "string",
  10433. "pattern": "^ses"
  10434. },
  10435. "messageID": {
  10436. "type": "string",
  10437. "pattern": "^msg"
  10438. },
  10439. "type": {
  10440. "type": "string",
  10441. "enum": ["reasoning"]
  10442. },
  10443. "text": {
  10444. "type": "string"
  10445. },
  10446. "metadata": {
  10447. "type": "object"
  10448. },
  10449. "time": {
  10450. "type": "object",
  10451. "properties": {
  10452. "start": {
  10453. "type": "integer",
  10454. "minimum": 0
  10455. },
  10456. "end": {
  10457. "type": "integer",
  10458. "minimum": 0
  10459. }
  10460. },
  10461. "required": ["start"],
  10462. "additionalProperties": false
  10463. }
  10464. },
  10465. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  10466. "additionalProperties": false
  10467. },
  10468. "FilePartSourceText": {
  10469. "type": "object",
  10470. "properties": {
  10471. "value": {
  10472. "type": "string"
  10473. },
  10474. "start": {
  10475. "type": "number"
  10476. },
  10477. "end": {
  10478. "type": "number"
  10479. }
  10480. },
  10481. "required": ["value", "start", "end"],
  10482. "additionalProperties": false
  10483. },
  10484. "FileSource": {
  10485. "type": "object",
  10486. "properties": {
  10487. "text": {
  10488. "$ref": "#/components/schemas/FilePartSourceText"
  10489. },
  10490. "type": {
  10491. "type": "string",
  10492. "enum": ["file"]
  10493. },
  10494. "path": {
  10495. "type": "string"
  10496. }
  10497. },
  10498. "required": ["text", "type", "path"],
  10499. "additionalProperties": false
  10500. },
  10501. "Range": {
  10502. "type": "object",
  10503. "properties": {
  10504. "start": {
  10505. "type": "object",
  10506. "properties": {
  10507. "line": {
  10508. "type": "integer",
  10509. "minimum": 0
  10510. },
  10511. "character": {
  10512. "type": "integer",
  10513. "minimum": 0
  10514. }
  10515. },
  10516. "required": ["line", "character"],
  10517. "additionalProperties": false
  10518. },
  10519. "end": {
  10520. "type": "object",
  10521. "properties": {
  10522. "line": {
  10523. "type": "integer",
  10524. "minimum": 0
  10525. },
  10526. "character": {
  10527. "type": "integer",
  10528. "minimum": 0
  10529. }
  10530. },
  10531. "required": ["line", "character"],
  10532. "additionalProperties": false
  10533. }
  10534. },
  10535. "required": ["start", "end"],
  10536. "additionalProperties": false
  10537. },
  10538. "SymbolSource": {
  10539. "type": "object",
  10540. "properties": {
  10541. "text": {
  10542. "$ref": "#/components/schemas/FilePartSourceText"
  10543. },
  10544. "type": {
  10545. "type": "string",
  10546. "enum": ["symbol"]
  10547. },
  10548. "path": {
  10549. "type": "string"
  10550. },
  10551. "range": {
  10552. "$ref": "#/components/schemas/Range"
  10553. },
  10554. "name": {
  10555. "type": "string"
  10556. },
  10557. "kind": {
  10558. "type": "integer",
  10559. "minimum": 0
  10560. }
  10561. },
  10562. "required": ["text", "type", "path", "range", "name", "kind"],
  10563. "additionalProperties": false
  10564. },
  10565. "ResourceSource": {
  10566. "type": "object",
  10567. "properties": {
  10568. "text": {
  10569. "$ref": "#/components/schemas/FilePartSourceText"
  10570. },
  10571. "type": {
  10572. "type": "string",
  10573. "enum": ["resource"]
  10574. },
  10575. "clientName": {
  10576. "type": "string"
  10577. },
  10578. "uri": {
  10579. "type": "string"
  10580. }
  10581. },
  10582. "required": ["text", "type", "clientName", "uri"],
  10583. "additionalProperties": false
  10584. },
  10585. "FilePartSource": {
  10586. "anyOf": [
  10587. {
  10588. "$ref": "#/components/schemas/FileSource"
  10589. },
  10590. {
  10591. "$ref": "#/components/schemas/SymbolSource"
  10592. },
  10593. {
  10594. "$ref": "#/components/schemas/ResourceSource"
  10595. }
  10596. ]
  10597. },
  10598. "FilePart": {
  10599. "type": "object",
  10600. "properties": {
  10601. "id": {
  10602. "type": "string",
  10603. "pattern": "^prt"
  10604. },
  10605. "sessionID": {
  10606. "type": "string",
  10607. "pattern": "^ses"
  10608. },
  10609. "messageID": {
  10610. "type": "string",
  10611. "pattern": "^msg"
  10612. },
  10613. "type": {
  10614. "type": "string",
  10615. "enum": ["file"]
  10616. },
  10617. "mime": {
  10618. "type": "string"
  10619. },
  10620. "filename": {
  10621. "type": "string"
  10622. },
  10623. "url": {
  10624. "type": "string"
  10625. },
  10626. "source": {
  10627. "$ref": "#/components/schemas/FilePartSource"
  10628. }
  10629. },
  10630. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  10631. "additionalProperties": false
  10632. },
  10633. "ToolStatePending": {
  10634. "type": "object",
  10635. "properties": {
  10636. "status": {
  10637. "type": "string",
  10638. "enum": ["pending"]
  10639. },
  10640. "input": {
  10641. "type": "object"
  10642. },
  10643. "raw": {
  10644. "type": "string"
  10645. }
  10646. },
  10647. "required": ["status", "input", "raw"],
  10648. "additionalProperties": false
  10649. },
  10650. "ToolStateRunning": {
  10651. "type": "object",
  10652. "properties": {
  10653. "status": {
  10654. "type": "string",
  10655. "enum": ["running"]
  10656. },
  10657. "input": {
  10658. "type": "object"
  10659. },
  10660. "title": {
  10661. "type": "string"
  10662. },
  10663. "metadata": {
  10664. "type": "object"
  10665. },
  10666. "time": {
  10667. "type": "object",
  10668. "properties": {
  10669. "start": {
  10670. "type": "integer",
  10671. "minimum": 0
  10672. }
  10673. },
  10674. "required": ["start"],
  10675. "additionalProperties": false
  10676. }
  10677. },
  10678. "required": ["status", "input", "time"],
  10679. "additionalProperties": false
  10680. },
  10681. "ToolStateCompleted": {
  10682. "type": "object",
  10683. "properties": {
  10684. "status": {
  10685. "type": "string",
  10686. "enum": ["completed"]
  10687. },
  10688. "input": {
  10689. "type": "object"
  10690. },
  10691. "output": {
  10692. "type": "string"
  10693. },
  10694. "title": {
  10695. "type": "string"
  10696. },
  10697. "metadata": {
  10698. "type": "object"
  10699. },
  10700. "time": {
  10701. "type": "object",
  10702. "properties": {
  10703. "start": {
  10704. "type": "integer",
  10705. "minimum": 0
  10706. },
  10707. "end": {
  10708. "type": "integer",
  10709. "minimum": 0
  10710. },
  10711. "compacted": {
  10712. "type": "integer",
  10713. "minimum": 0
  10714. }
  10715. },
  10716. "required": ["start", "end"],
  10717. "additionalProperties": false
  10718. },
  10719. "attachments": {
  10720. "type": "array",
  10721. "items": {
  10722. "$ref": "#/components/schemas/FilePart"
  10723. }
  10724. }
  10725. },
  10726. "required": ["status", "input", "output", "title", "metadata", "time"],
  10727. "additionalProperties": false
  10728. },
  10729. "ToolStateError": {
  10730. "type": "object",
  10731. "properties": {
  10732. "status": {
  10733. "type": "string",
  10734. "enum": ["error"]
  10735. },
  10736. "input": {
  10737. "type": "object"
  10738. },
  10739. "error": {
  10740. "type": "string"
  10741. },
  10742. "metadata": {
  10743. "type": "object"
  10744. },
  10745. "time": {
  10746. "type": "object",
  10747. "properties": {
  10748. "start": {
  10749. "type": "integer",
  10750. "minimum": 0
  10751. },
  10752. "end": {
  10753. "type": "integer",
  10754. "minimum": 0
  10755. }
  10756. },
  10757. "required": ["start", "end"],
  10758. "additionalProperties": false
  10759. }
  10760. },
  10761. "required": ["status", "input", "error", "time"],
  10762. "additionalProperties": false
  10763. },
  10764. "ToolState": {
  10765. "anyOf": [
  10766. {
  10767. "$ref": "#/components/schemas/ToolStatePending"
  10768. },
  10769. {
  10770. "$ref": "#/components/schemas/ToolStateRunning"
  10771. },
  10772. {
  10773. "$ref": "#/components/schemas/ToolStateCompleted"
  10774. },
  10775. {
  10776. "$ref": "#/components/schemas/ToolStateError"
  10777. }
  10778. ]
  10779. },
  10780. "ToolPart": {
  10781. "type": "object",
  10782. "properties": {
  10783. "id": {
  10784. "type": "string",
  10785. "pattern": "^prt"
  10786. },
  10787. "sessionID": {
  10788. "type": "string",
  10789. "pattern": "^ses"
  10790. },
  10791. "messageID": {
  10792. "type": "string",
  10793. "pattern": "^msg"
  10794. },
  10795. "type": {
  10796. "type": "string",
  10797. "enum": ["tool"]
  10798. },
  10799. "callID": {
  10800. "type": "string"
  10801. },
  10802. "tool": {
  10803. "type": "string"
  10804. },
  10805. "state": {
  10806. "$ref": "#/components/schemas/ToolState"
  10807. },
  10808. "metadata": {
  10809. "type": "object"
  10810. }
  10811. },
  10812. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  10813. "additionalProperties": false
  10814. },
  10815. "StepStartPart": {
  10816. "type": "object",
  10817. "properties": {
  10818. "id": {
  10819. "type": "string",
  10820. "pattern": "^prt"
  10821. },
  10822. "sessionID": {
  10823. "type": "string",
  10824. "pattern": "^ses"
  10825. },
  10826. "messageID": {
  10827. "type": "string",
  10828. "pattern": "^msg"
  10829. },
  10830. "type": {
  10831. "type": "string",
  10832. "enum": ["step-start"]
  10833. },
  10834. "snapshot": {
  10835. "type": "string"
  10836. }
  10837. },
  10838. "required": ["id", "sessionID", "messageID", "type"],
  10839. "additionalProperties": false
  10840. },
  10841. "StepFinishPart": {
  10842. "type": "object",
  10843. "properties": {
  10844. "id": {
  10845. "type": "string",
  10846. "pattern": "^prt"
  10847. },
  10848. "sessionID": {
  10849. "type": "string",
  10850. "pattern": "^ses"
  10851. },
  10852. "messageID": {
  10853. "type": "string",
  10854. "pattern": "^msg"
  10855. },
  10856. "type": {
  10857. "type": "string",
  10858. "enum": ["step-finish"]
  10859. },
  10860. "reason": {
  10861. "type": "string"
  10862. },
  10863. "snapshot": {
  10864. "type": "string"
  10865. },
  10866. "cost": {
  10867. "type": "number"
  10868. },
  10869. "tokens": {
  10870. "type": "object",
  10871. "properties": {
  10872. "total": {
  10873. "type": "number"
  10874. },
  10875. "input": {
  10876. "type": "number"
  10877. },
  10878. "output": {
  10879. "type": "number"
  10880. },
  10881. "reasoning": {
  10882. "type": "number"
  10883. },
  10884. "cache": {
  10885. "type": "object",
  10886. "properties": {
  10887. "read": {
  10888. "type": "number"
  10889. },
  10890. "write": {
  10891. "type": "number"
  10892. }
  10893. },
  10894. "required": ["read", "write"],
  10895. "additionalProperties": false
  10896. }
  10897. },
  10898. "required": ["input", "output", "reasoning", "cache"],
  10899. "additionalProperties": false
  10900. }
  10901. },
  10902. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  10903. "additionalProperties": false
  10904. },
  10905. "SnapshotPart": {
  10906. "type": "object",
  10907. "properties": {
  10908. "id": {
  10909. "type": "string",
  10910. "pattern": "^prt"
  10911. },
  10912. "sessionID": {
  10913. "type": "string",
  10914. "pattern": "^ses"
  10915. },
  10916. "messageID": {
  10917. "type": "string",
  10918. "pattern": "^msg"
  10919. },
  10920. "type": {
  10921. "type": "string",
  10922. "enum": ["snapshot"]
  10923. },
  10924. "snapshot": {
  10925. "type": "string"
  10926. }
  10927. },
  10928. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  10929. "additionalProperties": false
  10930. },
  10931. "PatchPart": {
  10932. "type": "object",
  10933. "properties": {
  10934. "id": {
  10935. "type": "string",
  10936. "pattern": "^prt"
  10937. },
  10938. "sessionID": {
  10939. "type": "string",
  10940. "pattern": "^ses"
  10941. },
  10942. "messageID": {
  10943. "type": "string",
  10944. "pattern": "^msg"
  10945. },
  10946. "type": {
  10947. "type": "string",
  10948. "enum": ["patch"]
  10949. },
  10950. "hash": {
  10951. "type": "string"
  10952. },
  10953. "files": {
  10954. "type": "array",
  10955. "items": {
  10956. "type": "string"
  10957. }
  10958. }
  10959. },
  10960. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  10961. "additionalProperties": false
  10962. },
  10963. "AgentPart": {
  10964. "type": "object",
  10965. "properties": {
  10966. "id": {
  10967. "type": "string",
  10968. "pattern": "^prt"
  10969. },
  10970. "sessionID": {
  10971. "type": "string",
  10972. "pattern": "^ses"
  10973. },
  10974. "messageID": {
  10975. "type": "string",
  10976. "pattern": "^msg"
  10977. },
  10978. "type": {
  10979. "type": "string",
  10980. "enum": ["agent"]
  10981. },
  10982. "name": {
  10983. "type": "string"
  10984. },
  10985. "source": {
  10986. "type": "object",
  10987. "properties": {
  10988. "value": {
  10989. "type": "string"
  10990. },
  10991. "start": {
  10992. "type": "integer",
  10993. "minimum": 0
  10994. },
  10995. "end": {
  10996. "type": "integer",
  10997. "minimum": 0
  10998. }
  10999. },
  11000. "required": ["value", "start", "end"],
  11001. "additionalProperties": false
  11002. }
  11003. },
  11004. "required": ["id", "sessionID", "messageID", "type", "name"],
  11005. "additionalProperties": false
  11006. },
  11007. "RetryPart": {
  11008. "type": "object",
  11009. "properties": {
  11010. "id": {
  11011. "type": "string",
  11012. "pattern": "^prt"
  11013. },
  11014. "sessionID": {
  11015. "type": "string",
  11016. "pattern": "^ses"
  11017. },
  11018. "messageID": {
  11019. "type": "string",
  11020. "pattern": "^msg"
  11021. },
  11022. "type": {
  11023. "type": "string",
  11024. "enum": ["retry"]
  11025. },
  11026. "attempt": {
  11027. "type": "integer",
  11028. "minimum": 0
  11029. },
  11030. "error": {
  11031. "$ref": "#/components/schemas/APIError"
  11032. },
  11033. "time": {
  11034. "type": "object",
  11035. "properties": {
  11036. "created": {
  11037. "type": "integer",
  11038. "minimum": 0
  11039. }
  11040. },
  11041. "required": ["created"],
  11042. "additionalProperties": false
  11043. }
  11044. },
  11045. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  11046. "additionalProperties": false
  11047. },
  11048. "CompactionPart": {
  11049. "type": "object",
  11050. "properties": {
  11051. "id": {
  11052. "type": "string",
  11053. "pattern": "^prt"
  11054. },
  11055. "sessionID": {
  11056. "type": "string",
  11057. "pattern": "^ses"
  11058. },
  11059. "messageID": {
  11060. "type": "string",
  11061. "pattern": "^msg"
  11062. },
  11063. "type": {
  11064. "type": "string",
  11065. "enum": ["compaction"]
  11066. },
  11067. "auto": {
  11068. "type": "boolean"
  11069. },
  11070. "overflow": {
  11071. "type": "boolean"
  11072. },
  11073. "tail_start_id": {
  11074. "type": "string",
  11075. "pattern": "^msg"
  11076. }
  11077. },
  11078. "required": ["id", "sessionID", "messageID", "type", "auto"],
  11079. "additionalProperties": false
  11080. },
  11081. "Part": {
  11082. "anyOf": [
  11083. {
  11084. "$ref": "#/components/schemas/TextPart"
  11085. },
  11086. {
  11087. "$ref": "#/components/schemas/SubtaskPart"
  11088. },
  11089. {
  11090. "$ref": "#/components/schemas/ReasoningPart"
  11091. },
  11092. {
  11093. "$ref": "#/components/schemas/FilePart"
  11094. },
  11095. {
  11096. "$ref": "#/components/schemas/ToolPart"
  11097. },
  11098. {
  11099. "$ref": "#/components/schemas/StepStartPart"
  11100. },
  11101. {
  11102. "$ref": "#/components/schemas/StepFinishPart"
  11103. },
  11104. {
  11105. "$ref": "#/components/schemas/SnapshotPart"
  11106. },
  11107. {
  11108. "$ref": "#/components/schemas/PatchPart"
  11109. },
  11110. {
  11111. "$ref": "#/components/schemas/AgentPart"
  11112. },
  11113. {
  11114. "$ref": "#/components/schemas/RetryPart"
  11115. },
  11116. {
  11117. "$ref": "#/components/schemas/CompactionPart"
  11118. }
  11119. ]
  11120. },
  11121. "PermissionAction": {
  11122. "type": "string",
  11123. "enum": ["allow", "deny", "ask"]
  11124. },
  11125. "PermissionRule": {
  11126. "type": "object",
  11127. "properties": {
  11128. "permission": {
  11129. "type": "string"
  11130. },
  11131. "pattern": {
  11132. "type": "string"
  11133. },
  11134. "action": {
  11135. "$ref": "#/components/schemas/PermissionAction"
  11136. }
  11137. },
  11138. "required": ["permission", "pattern", "action"],
  11139. "additionalProperties": false
  11140. },
  11141. "PermissionRuleset": {
  11142. "type": "array",
  11143. "items": {
  11144. "$ref": "#/components/schemas/PermissionRule"
  11145. }
  11146. },
  11147. "Session": {
  11148. "type": "object",
  11149. "properties": {
  11150. "id": {
  11151. "type": "string",
  11152. "pattern": "^ses"
  11153. },
  11154. "slug": {
  11155. "type": "string"
  11156. },
  11157. "projectID": {
  11158. "type": "string"
  11159. },
  11160. "workspaceID": {
  11161. "type": "string",
  11162. "pattern": "^wrk"
  11163. },
  11164. "directory": {
  11165. "type": "string"
  11166. },
  11167. "path": {
  11168. "type": "string"
  11169. },
  11170. "parentID": {
  11171. "type": "string",
  11172. "pattern": "^ses"
  11173. },
  11174. "summary": {
  11175. "type": "object",
  11176. "properties": {
  11177. "additions": {
  11178. "type": "number"
  11179. },
  11180. "deletions": {
  11181. "type": "number"
  11182. },
  11183. "files": {
  11184. "type": "number"
  11185. },
  11186. "diffs": {
  11187. "type": "array",
  11188. "items": {
  11189. "$ref": "#/components/schemas/SnapshotFileDiff"
  11190. }
  11191. }
  11192. },
  11193. "required": ["additions", "deletions", "files"],
  11194. "additionalProperties": false
  11195. },
  11196. "cost": {
  11197. "type": "number"
  11198. },
  11199. "tokens": {
  11200. "type": "object",
  11201. "properties": {
  11202. "input": {
  11203. "type": "number"
  11204. },
  11205. "output": {
  11206. "type": "number"
  11207. },
  11208. "reasoning": {
  11209. "type": "number"
  11210. },
  11211. "cache": {
  11212. "type": "object",
  11213. "properties": {
  11214. "read": {
  11215. "type": "number"
  11216. },
  11217. "write": {
  11218. "type": "number"
  11219. }
  11220. },
  11221. "required": ["read", "write"],
  11222. "additionalProperties": false
  11223. }
  11224. },
  11225. "required": ["input", "output", "reasoning", "cache"],
  11226. "additionalProperties": false
  11227. },
  11228. "share": {
  11229. "type": "object",
  11230. "properties": {
  11231. "url": {
  11232. "type": "string"
  11233. }
  11234. },
  11235. "required": ["url"],
  11236. "additionalProperties": false
  11237. },
  11238. "title": {
  11239. "type": "string"
  11240. },
  11241. "agent": {
  11242. "type": "string"
  11243. },
  11244. "model": {
  11245. "type": "object",
  11246. "properties": {
  11247. "id": {
  11248. "type": "string"
  11249. },
  11250. "providerID": {
  11251. "type": "string"
  11252. },
  11253. "variant": {
  11254. "type": "string"
  11255. }
  11256. },
  11257. "required": ["id", "providerID"],
  11258. "additionalProperties": false
  11259. },
  11260. "version": {
  11261. "type": "string"
  11262. },
  11263. "time": {
  11264. "type": "object",
  11265. "properties": {
  11266. "created": {
  11267. "type": "integer",
  11268. "minimum": 0
  11269. },
  11270. "updated": {
  11271. "type": "integer",
  11272. "minimum": 0
  11273. },
  11274. "compacting": {
  11275. "type": "integer",
  11276. "minimum": 0
  11277. },
  11278. "archived": {
  11279. "type": "number"
  11280. }
  11281. },
  11282. "required": ["created", "updated"],
  11283. "additionalProperties": false
  11284. },
  11285. "permission": {
  11286. "$ref": "#/components/schemas/PermissionRuleset"
  11287. },
  11288. "revert": {
  11289. "type": "object",
  11290. "properties": {
  11291. "messageID": {
  11292. "type": "string",
  11293. "pattern": "^msg"
  11294. },
  11295. "partID": {
  11296. "type": "string",
  11297. "pattern": "^prt"
  11298. },
  11299. "snapshot": {
  11300. "type": "string"
  11301. },
  11302. "diff": {
  11303. "type": "string"
  11304. }
  11305. },
  11306. "required": ["messageID"],
  11307. "additionalProperties": false
  11308. }
  11309. },
  11310. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11311. "additionalProperties": false
  11312. },
  11313. "GlobalEvent": {
  11314. "type": "object",
  11315. "properties": {
  11316. "directory": {
  11317. "type": "string"
  11318. },
  11319. "project": {
  11320. "type": "string"
  11321. },
  11322. "workspace": {
  11323. "type": "string"
  11324. },
  11325. "payload": {
  11326. "anyOf": [
  11327. {
  11328. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  11329. },
  11330. {
  11331. "$ref": "#/components/schemas/EventFileEdited"
  11332. },
  11333. {
  11334. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  11335. },
  11336. {
  11337. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  11338. },
  11339. {
  11340. "$ref": "#/components/schemas/EventLspUpdated"
  11341. },
  11342. {
  11343. "$ref": "#/components/schemas/EventMessagePartDelta"
  11344. },
  11345. {
  11346. "$ref": "#/components/schemas/EventPermissionAsked"
  11347. },
  11348. {
  11349. "$ref": "#/components/schemas/EventPermissionReplied"
  11350. },
  11351. {
  11352. "$ref": "#/components/schemas/EventSessionDiff"
  11353. },
  11354. {
  11355. "$ref": "#/components/schemas/EventSessionError"
  11356. },
  11357. {
  11358. "$ref": "#/components/schemas/EventQuestionAsked"
  11359. },
  11360. {
  11361. "$ref": "#/components/schemas/EventQuestionReplied"
  11362. },
  11363. {
  11364. "$ref": "#/components/schemas/EventQuestionRejected"
  11365. },
  11366. {
  11367. "$ref": "#/components/schemas/EventTodoUpdated"
  11368. },
  11369. {
  11370. "$ref": "#/components/schemas/EventSessionStatus"
  11371. },
  11372. {
  11373. "$ref": "#/components/schemas/EventSessionIdle"
  11374. },
  11375. {
  11376. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11377. },
  11378. {
  11379. "$ref": "#/components/schemas/Event.tui.command.execute"
  11380. },
  11381. {
  11382. "$ref": "#/components/schemas/Event.tui.toast.show"
  11383. },
  11384. {
  11385. "$ref": "#/components/schemas/Event.tui.session.select"
  11386. },
  11387. {
  11388. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11389. },
  11390. {
  11391. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11392. },
  11393. {
  11394. "$ref": "#/components/schemas/EventCommandExecuted"
  11395. },
  11396. {
  11397. "$ref": "#/components/schemas/EventProjectUpdated"
  11398. },
  11399. {
  11400. "$ref": "#/components/schemas/EventSessionCompacted"
  11401. },
  11402. {
  11403. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11404. },
  11405. {
  11406. "$ref": "#/components/schemas/EventWorkspaceReady"
  11407. },
  11408. {
  11409. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11410. },
  11411. {
  11412. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11413. },
  11414. {
  11415. "$ref": "#/components/schemas/EventWorktreeReady"
  11416. },
  11417. {
  11418. "$ref": "#/components/schemas/EventWorktreeFailed"
  11419. },
  11420. {
  11421. "$ref": "#/components/schemas/EventPtyCreated"
  11422. },
  11423. {
  11424. "$ref": "#/components/schemas/EventPtyUpdated"
  11425. },
  11426. {
  11427. "$ref": "#/components/schemas/EventPtyExited"
  11428. },
  11429. {
  11430. "$ref": "#/components/schemas/EventPtyDeleted"
  11431. },
  11432. {
  11433. "$ref": "#/components/schemas/EventInstallationUpdated"
  11434. },
  11435. {
  11436. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11437. },
  11438. {
  11439. "$ref": "#/components/schemas/EventServerConnected"
  11440. },
  11441. {
  11442. "$ref": "#/components/schemas/EventGlobalDisposed"
  11443. },
  11444. {
  11445. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  11446. },
  11447. {
  11448. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11449. },
  11450. {
  11451. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11452. },
  11453. {
  11454. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11455. },
  11456. {
  11457. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11458. },
  11459. {
  11460. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11461. },
  11462. {
  11463. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11464. },
  11465. {
  11466. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11467. },
  11468. {
  11469. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11470. },
  11471. {
  11472. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11473. },
  11474. {
  11475. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11476. },
  11477. {
  11478. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11479. },
  11480. {
  11481. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11482. },
  11483. {
  11484. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11485. },
  11486. {
  11487. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11488. },
  11489. {
  11490. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11491. },
  11492. {
  11493. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11494. },
  11495. {
  11496. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11497. },
  11498. {
  11499. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11500. },
  11501. {
  11502. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11503. },
  11504. {
  11505. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11506. },
  11507. {
  11508. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11509. },
  11510. {
  11511. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11512. },
  11513. {
  11514. "$ref": "#/components/schemas/EventSessionNextRetried"
  11515. },
  11516. {
  11517. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11518. },
  11519. {
  11520. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11521. },
  11522. {
  11523. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11524. },
  11525. {
  11526. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  11527. },
  11528. {
  11529. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  11530. },
  11531. {
  11532. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  11533. },
  11534. {
  11535. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  11536. },
  11537. {
  11538. "$ref": "#/components/schemas/SyncEventSessionCreated"
  11539. },
  11540. {
  11541. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  11542. },
  11543. {
  11544. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  11545. },
  11546. {
  11547. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  11548. },
  11549. {
  11550. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  11551. },
  11552. {
  11553. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  11554. },
  11555. {
  11556. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  11557. },
  11558. {
  11559. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  11560. },
  11561. {
  11562. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  11563. },
  11564. {
  11565. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  11566. },
  11567. {
  11568. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  11569. },
  11570. {
  11571. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  11572. },
  11573. {
  11574. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  11575. },
  11576. {
  11577. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  11578. },
  11579. {
  11580. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  11581. },
  11582. {
  11583. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  11584. },
  11585. {
  11586. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  11587. },
  11588. {
  11589. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  11590. },
  11591. {
  11592. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  11593. },
  11594. {
  11595. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  11596. },
  11597. {
  11598. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  11599. },
  11600. {
  11601. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  11602. },
  11603. {
  11604. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  11605. },
  11606. {
  11607. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  11608. },
  11609. {
  11610. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  11611. },
  11612. {
  11613. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  11614. },
  11615. {
  11616. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  11617. },
  11618. {
  11619. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  11620. },
  11621. {
  11622. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  11623. }
  11624. ]
  11625. }
  11626. },
  11627. "required": ["directory", "payload"],
  11628. "additionalProperties": false
  11629. },
  11630. "LogLevel": {
  11631. "type": "string",
  11632. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  11633. "description": "Log level"
  11634. },
  11635. "ServerConfig": {
  11636. "type": "object",
  11637. "properties": {
  11638. "port": {
  11639. "type": "integer",
  11640. "exclusiveMinimum": 0
  11641. },
  11642. "hostname": {
  11643. "type": "string"
  11644. },
  11645. "mdns": {
  11646. "type": "boolean"
  11647. },
  11648. "mdnsDomain": {
  11649. "type": "string"
  11650. },
  11651. "cors": {
  11652. "type": "array",
  11653. "items": {
  11654. "type": "string"
  11655. }
  11656. }
  11657. },
  11658. "additionalProperties": false,
  11659. "description": "Server configuration for opencode serve and web commands"
  11660. },
  11661. "ReferenceConfigEntry": {
  11662. "anyOf": [
  11663. {
  11664. "type": "string"
  11665. },
  11666. {
  11667. "type": "object",
  11668. "properties": {
  11669. "repository": {
  11670. "type": "string",
  11671. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  11672. },
  11673. "branch": {
  11674. "type": "string"
  11675. }
  11676. },
  11677. "required": ["repository"],
  11678. "additionalProperties": false
  11679. },
  11680. {
  11681. "type": "object",
  11682. "properties": {
  11683. "path": {
  11684. "type": "string",
  11685. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  11686. }
  11687. },
  11688. "required": ["path"],
  11689. "additionalProperties": false
  11690. }
  11691. ]
  11692. },
  11693. "ReferenceConfig": {
  11694. "type": "object",
  11695. "additionalProperties": {
  11696. "$ref": "#/components/schemas/ReferenceConfigEntry"
  11697. }
  11698. },
  11699. "PermissionActionConfig": {
  11700. "type": "string",
  11701. "enum": ["ask", "allow", "deny"]
  11702. },
  11703. "PermissionObjectConfig": {
  11704. "type": "object",
  11705. "additionalProperties": {
  11706. "$ref": "#/components/schemas/PermissionActionConfig"
  11707. }
  11708. },
  11709. "PermissionRuleConfig": {
  11710. "anyOf": [
  11711. {
  11712. "$ref": "#/components/schemas/PermissionActionConfig"
  11713. },
  11714. {
  11715. "$ref": "#/components/schemas/PermissionObjectConfig"
  11716. }
  11717. ]
  11718. },
  11719. "PermissionConfig": {
  11720. "anyOf": [
  11721. {
  11722. "$ref": "#/components/schemas/PermissionActionConfig"
  11723. },
  11724. {
  11725. "type": "object",
  11726. "properties": {
  11727. "read": {
  11728. "$ref": "#/components/schemas/PermissionRuleConfig"
  11729. },
  11730. "edit": {
  11731. "$ref": "#/components/schemas/PermissionRuleConfig"
  11732. },
  11733. "glob": {
  11734. "$ref": "#/components/schemas/PermissionRuleConfig"
  11735. },
  11736. "grep": {
  11737. "$ref": "#/components/schemas/PermissionRuleConfig"
  11738. },
  11739. "list": {
  11740. "$ref": "#/components/schemas/PermissionRuleConfig"
  11741. },
  11742. "bash": {
  11743. "$ref": "#/components/schemas/PermissionRuleConfig"
  11744. },
  11745. "task": {
  11746. "$ref": "#/components/schemas/PermissionRuleConfig"
  11747. },
  11748. "external_directory": {
  11749. "$ref": "#/components/schemas/PermissionRuleConfig"
  11750. },
  11751. "todowrite": {
  11752. "$ref": "#/components/schemas/PermissionActionConfig"
  11753. },
  11754. "question": {
  11755. "$ref": "#/components/schemas/PermissionActionConfig"
  11756. },
  11757. "webfetch": {
  11758. "$ref": "#/components/schemas/PermissionActionConfig"
  11759. },
  11760. "websearch": {
  11761. "$ref": "#/components/schemas/PermissionActionConfig"
  11762. },
  11763. "repo_clone": {
  11764. "$ref": "#/components/schemas/PermissionRuleConfig"
  11765. },
  11766. "repo_overview": {
  11767. "$ref": "#/components/schemas/PermissionRuleConfig"
  11768. },
  11769. "lsp": {
  11770. "$ref": "#/components/schemas/PermissionRuleConfig"
  11771. },
  11772. "doom_loop": {
  11773. "$ref": "#/components/schemas/PermissionActionConfig"
  11774. },
  11775. "skill": {
  11776. "$ref": "#/components/schemas/PermissionRuleConfig"
  11777. }
  11778. },
  11779. "additionalProperties": {
  11780. "$ref": "#/components/schemas/PermissionRuleConfig"
  11781. }
  11782. }
  11783. ]
  11784. },
  11785. "AgentConfig": {
  11786. "type": "object",
  11787. "properties": {
  11788. "model": {
  11789. "type": "string"
  11790. },
  11791. "variant": {
  11792. "type": "string"
  11793. },
  11794. "temperature": {
  11795. "type": "number"
  11796. },
  11797. "top_p": {
  11798. "type": "number"
  11799. },
  11800. "prompt": {
  11801. "type": "string"
  11802. },
  11803. "tools": {
  11804. "type": "object",
  11805. "additionalProperties": {
  11806. "type": "boolean"
  11807. }
  11808. },
  11809. "disable": {
  11810. "type": "boolean"
  11811. },
  11812. "description": {
  11813. "type": "string"
  11814. },
  11815. "mode": {
  11816. "type": "string",
  11817. "enum": ["subagent", "primary", "all"]
  11818. },
  11819. "hidden": {
  11820. "type": "boolean"
  11821. },
  11822. "options": {
  11823. "type": "object"
  11824. },
  11825. "color": {
  11826. "anyOf": [
  11827. {
  11828. "type": "string",
  11829. "pattern": "^#[0-9a-fA-F]{6}$"
  11830. },
  11831. {
  11832. "type": "string",
  11833. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11834. }
  11835. ],
  11836. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  11837. },
  11838. "steps": {
  11839. "type": "integer",
  11840. "exclusiveMinimum": 0
  11841. },
  11842. "maxSteps": {
  11843. "type": "integer",
  11844. "exclusiveMinimum": 0
  11845. },
  11846. "permission": {
  11847. "$ref": "#/components/schemas/PermissionConfig"
  11848. }
  11849. },
  11850. "additionalProperties": {}
  11851. },
  11852. "ProviderConfig": {
  11853. "type": "object",
  11854. "properties": {
  11855. "api": {
  11856. "type": "string"
  11857. },
  11858. "name": {
  11859. "type": "string"
  11860. },
  11861. "env": {
  11862. "type": "array",
  11863. "items": {
  11864. "type": "string"
  11865. }
  11866. },
  11867. "id": {
  11868. "type": "string"
  11869. },
  11870. "npm": {
  11871. "type": "string"
  11872. },
  11873. "whitelist": {
  11874. "type": "array",
  11875. "items": {
  11876. "type": "string"
  11877. }
  11878. },
  11879. "blacklist": {
  11880. "type": "array",
  11881. "items": {
  11882. "type": "string"
  11883. }
  11884. },
  11885. "options": {
  11886. "type": "object",
  11887. "properties": {
  11888. "apiKey": {
  11889. "type": "string"
  11890. },
  11891. "baseURL": {
  11892. "type": "string"
  11893. },
  11894. "enterpriseUrl": {
  11895. "type": "string"
  11896. },
  11897. "setCacheKey": {
  11898. "type": "boolean"
  11899. },
  11900. "timeout": {
  11901. "anyOf": [
  11902. {
  11903. "type": "integer",
  11904. "exclusiveMinimum": 0
  11905. },
  11906. {
  11907. "type": "boolean",
  11908. "enum": [false]
  11909. }
  11910. ],
  11911. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  11912. },
  11913. "chunkTimeout": {
  11914. "type": "integer",
  11915. "exclusiveMinimum": 0
  11916. }
  11917. },
  11918. "additionalProperties": {}
  11919. },
  11920. "models": {
  11921. "type": "object",
  11922. "additionalProperties": {
  11923. "type": "object",
  11924. "properties": {
  11925. "id": {
  11926. "type": "string"
  11927. },
  11928. "name": {
  11929. "type": "string"
  11930. },
  11931. "family": {
  11932. "type": "string"
  11933. },
  11934. "release_date": {
  11935. "type": "string"
  11936. },
  11937. "attachment": {
  11938. "type": "boolean"
  11939. },
  11940. "reasoning": {
  11941. "type": "boolean"
  11942. },
  11943. "temperature": {
  11944. "type": "boolean"
  11945. },
  11946. "tool_call": {
  11947. "type": "boolean"
  11948. },
  11949. "interleaved": {
  11950. "anyOf": [
  11951. {
  11952. "type": "boolean",
  11953. "enum": [true]
  11954. },
  11955. {
  11956. "type": "object",
  11957. "properties": {
  11958. "field": {
  11959. "type": "string",
  11960. "enum": ["reasoning_content", "reasoning_details"]
  11961. }
  11962. },
  11963. "required": ["field"],
  11964. "additionalProperties": false
  11965. }
  11966. ]
  11967. },
  11968. "cost": {
  11969. "type": "object",
  11970. "properties": {
  11971. "input": {
  11972. "type": "number"
  11973. },
  11974. "output": {
  11975. "type": "number"
  11976. },
  11977. "cache_read": {
  11978. "type": "number"
  11979. },
  11980. "cache_write": {
  11981. "type": "number"
  11982. },
  11983. "context_over_200k": {
  11984. "type": "object",
  11985. "properties": {
  11986. "input": {
  11987. "type": "number"
  11988. },
  11989. "output": {
  11990. "type": "number"
  11991. },
  11992. "cache_read": {
  11993. "type": "number"
  11994. },
  11995. "cache_write": {
  11996. "type": "number"
  11997. }
  11998. },
  11999. "required": ["input", "output"],
  12000. "additionalProperties": false
  12001. }
  12002. },
  12003. "required": ["input", "output"],
  12004. "additionalProperties": false
  12005. },
  12006. "limit": {
  12007. "type": "object",
  12008. "properties": {
  12009. "context": {
  12010. "type": "number"
  12011. },
  12012. "input": {
  12013. "type": "number"
  12014. },
  12015. "output": {
  12016. "type": "number"
  12017. }
  12018. },
  12019. "required": ["context", "output"],
  12020. "additionalProperties": false
  12021. },
  12022. "modalities": {
  12023. "type": "object",
  12024. "properties": {
  12025. "input": {
  12026. "type": "array",
  12027. "items": {
  12028. "type": "string",
  12029. "enum": ["text", "audio", "image", "video", "pdf"]
  12030. }
  12031. },
  12032. "output": {
  12033. "type": "array",
  12034. "items": {
  12035. "type": "string",
  12036. "enum": ["text", "audio", "image", "video", "pdf"]
  12037. }
  12038. }
  12039. },
  12040. "required": ["input", "output"],
  12041. "additionalProperties": false
  12042. },
  12043. "experimental": {
  12044. "type": "boolean"
  12045. },
  12046. "status": {
  12047. "type": "string",
  12048. "enum": ["alpha", "beta", "deprecated", "active"]
  12049. },
  12050. "provider": {
  12051. "type": "object",
  12052. "properties": {
  12053. "npm": {
  12054. "type": "string"
  12055. },
  12056. "api": {
  12057. "type": "string"
  12058. }
  12059. },
  12060. "additionalProperties": false
  12061. },
  12062. "options": {
  12063. "type": "object"
  12064. },
  12065. "headers": {
  12066. "type": "object",
  12067. "additionalProperties": {
  12068. "type": "string"
  12069. }
  12070. },
  12071. "variants": {
  12072. "type": "object",
  12073. "additionalProperties": {
  12074. "type": "object",
  12075. "properties": {
  12076. "disabled": {
  12077. "type": "boolean"
  12078. }
  12079. },
  12080. "additionalProperties": {}
  12081. },
  12082. "description": "Variant-specific configuration"
  12083. }
  12084. },
  12085. "additionalProperties": false
  12086. }
  12087. }
  12088. },
  12089. "additionalProperties": false
  12090. },
  12091. "McpLocalConfig": {
  12092. "type": "object",
  12093. "properties": {
  12094. "type": {
  12095. "type": "string",
  12096. "enum": ["local"],
  12097. "description": "Type of MCP server connection"
  12098. },
  12099. "command": {
  12100. "type": "array",
  12101. "items": {
  12102. "type": "string"
  12103. },
  12104. "description": "Command and arguments to run the MCP server"
  12105. },
  12106. "environment": {
  12107. "type": "object",
  12108. "additionalProperties": {
  12109. "type": "string"
  12110. }
  12111. },
  12112. "enabled": {
  12113. "type": "boolean"
  12114. },
  12115. "timeout": {
  12116. "type": "integer",
  12117. "exclusiveMinimum": 0
  12118. }
  12119. },
  12120. "required": ["type", "command"],
  12121. "additionalProperties": false
  12122. },
  12123. "McpOAuthConfig": {
  12124. "type": "object",
  12125. "properties": {
  12126. "clientId": {
  12127. "type": "string"
  12128. },
  12129. "clientSecret": {
  12130. "type": "string"
  12131. },
  12132. "scope": {
  12133. "type": "string"
  12134. },
  12135. "redirectUri": {
  12136. "type": "string"
  12137. }
  12138. },
  12139. "additionalProperties": false
  12140. },
  12141. "McpRemoteConfig": {
  12142. "type": "object",
  12143. "properties": {
  12144. "type": {
  12145. "type": "string",
  12146. "enum": ["remote"],
  12147. "description": "Type of MCP server connection"
  12148. },
  12149. "url": {
  12150. "type": "string",
  12151. "description": "URL of the remote MCP server"
  12152. },
  12153. "enabled": {
  12154. "type": "boolean"
  12155. },
  12156. "headers": {
  12157. "type": "object",
  12158. "additionalProperties": {
  12159. "type": "string"
  12160. }
  12161. },
  12162. "oauth": {
  12163. "anyOf": [
  12164. {
  12165. "$ref": "#/components/schemas/McpOAuthConfig"
  12166. },
  12167. {
  12168. "type": "boolean",
  12169. "enum": [false]
  12170. }
  12171. ],
  12172. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  12173. },
  12174. "timeout": {
  12175. "type": "integer",
  12176. "exclusiveMinimum": 0
  12177. }
  12178. },
  12179. "required": ["type", "url"],
  12180. "additionalProperties": false
  12181. },
  12182. "LayoutConfig": {
  12183. "type": "string",
  12184. "enum": ["auto", "stretch"],
  12185. "description": "@deprecated Always uses stretch layout."
  12186. },
  12187. "ImageAttachmentConfig": {
  12188. "type": "object",
  12189. "properties": {
  12190. "auto_resize": {
  12191. "type": "boolean"
  12192. },
  12193. "max_width": {
  12194. "type": "integer",
  12195. "exclusiveMinimum": 0
  12196. },
  12197. "max_height": {
  12198. "type": "integer",
  12199. "exclusiveMinimum": 0
  12200. },
  12201. "max_base64_bytes": {
  12202. "type": "integer",
  12203. "exclusiveMinimum": 0
  12204. }
  12205. },
  12206. "additionalProperties": false
  12207. },
  12208. "AttachmentConfig": {
  12209. "type": "object",
  12210. "properties": {
  12211. "image": {
  12212. "$ref": "#/components/schemas/ImageAttachmentConfig"
  12213. }
  12214. },
  12215. "additionalProperties": false
  12216. },
  12217. "Config": {
  12218. "type": "object",
  12219. "properties": {
  12220. "$schema": {
  12221. "type": "string"
  12222. },
  12223. "shell": {
  12224. "type": "string"
  12225. },
  12226. "logLevel": {
  12227. "$ref": "#/components/schemas/LogLevel"
  12228. },
  12229. "server": {
  12230. "$ref": "#/components/schemas/ServerConfig"
  12231. },
  12232. "command": {
  12233. "type": "object",
  12234. "additionalProperties": {
  12235. "type": "object",
  12236. "properties": {
  12237. "template": {
  12238. "type": "string"
  12239. },
  12240. "description": {
  12241. "type": "string"
  12242. },
  12243. "agent": {
  12244. "type": "string"
  12245. },
  12246. "model": {
  12247. "type": "string"
  12248. },
  12249. "subtask": {
  12250. "type": "boolean"
  12251. }
  12252. },
  12253. "required": ["template"],
  12254. "additionalProperties": false
  12255. }
  12256. },
  12257. "skills": {
  12258. "type": "object",
  12259. "properties": {
  12260. "paths": {
  12261. "type": "array",
  12262. "items": {
  12263. "type": "string"
  12264. }
  12265. },
  12266. "urls": {
  12267. "type": "array",
  12268. "items": {
  12269. "type": "string"
  12270. }
  12271. }
  12272. },
  12273. "additionalProperties": false
  12274. },
  12275. "reference": {
  12276. "$ref": "#/components/schemas/ReferenceConfig"
  12277. },
  12278. "watcher": {
  12279. "type": "object",
  12280. "properties": {
  12281. "ignore": {
  12282. "type": "array",
  12283. "items": {
  12284. "type": "string"
  12285. }
  12286. }
  12287. },
  12288. "additionalProperties": false
  12289. },
  12290. "snapshot": {
  12291. "type": "boolean"
  12292. },
  12293. "plugin": {
  12294. "type": "array",
  12295. "items": {
  12296. "anyOf": [
  12297. {
  12298. "type": "string"
  12299. },
  12300. {
  12301. "type": "array",
  12302. "prefixItems": [
  12303. {
  12304. "type": "string"
  12305. },
  12306. {
  12307. "type": "object"
  12308. }
  12309. ],
  12310. "maxItems": 2,
  12311. "minItems": 2
  12312. }
  12313. ]
  12314. }
  12315. },
  12316. "share": {
  12317. "type": "string",
  12318. "enum": ["manual", "auto", "disabled"]
  12319. },
  12320. "autoshare": {
  12321. "type": "boolean"
  12322. },
  12323. "autoupdate": {
  12324. "anyOf": [
  12325. {
  12326. "type": "boolean"
  12327. },
  12328. {
  12329. "type": "string",
  12330. "enum": ["notify"]
  12331. }
  12332. ],
  12333. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  12334. },
  12335. "disabled_providers": {
  12336. "type": "array",
  12337. "items": {
  12338. "type": "string"
  12339. }
  12340. },
  12341. "enabled_providers": {
  12342. "type": "array",
  12343. "items": {
  12344. "type": "string"
  12345. }
  12346. },
  12347. "model": {
  12348. "type": "string"
  12349. },
  12350. "small_model": {
  12351. "type": "string"
  12352. },
  12353. "default_agent": {
  12354. "type": "string"
  12355. },
  12356. "username": {
  12357. "type": "string"
  12358. },
  12359. "mode": {
  12360. "type": "object",
  12361. "properties": {
  12362. "build": {
  12363. "$ref": "#/components/schemas/AgentConfig"
  12364. },
  12365. "plan": {
  12366. "$ref": "#/components/schemas/AgentConfig"
  12367. }
  12368. },
  12369. "additionalProperties": {
  12370. "$ref": "#/components/schemas/AgentConfig"
  12371. }
  12372. },
  12373. "agent": {
  12374. "type": "object",
  12375. "properties": {
  12376. "plan": {
  12377. "$ref": "#/components/schemas/AgentConfig"
  12378. },
  12379. "build": {
  12380. "$ref": "#/components/schemas/AgentConfig"
  12381. },
  12382. "general": {
  12383. "$ref": "#/components/schemas/AgentConfig"
  12384. },
  12385. "explore": {
  12386. "$ref": "#/components/schemas/AgentConfig"
  12387. },
  12388. "scout": {
  12389. "$ref": "#/components/schemas/AgentConfig"
  12390. },
  12391. "title": {
  12392. "$ref": "#/components/schemas/AgentConfig"
  12393. },
  12394. "summary": {
  12395. "$ref": "#/components/schemas/AgentConfig"
  12396. },
  12397. "compaction": {
  12398. "$ref": "#/components/schemas/AgentConfig"
  12399. }
  12400. },
  12401. "additionalProperties": {
  12402. "$ref": "#/components/schemas/AgentConfig"
  12403. }
  12404. },
  12405. "provider": {
  12406. "type": "object",
  12407. "additionalProperties": {
  12408. "$ref": "#/components/schemas/ProviderConfig"
  12409. }
  12410. },
  12411. "mcp": {
  12412. "type": "object",
  12413. "additionalProperties": {
  12414. "anyOf": [
  12415. {
  12416. "$ref": "#/components/schemas/McpLocalConfig"
  12417. },
  12418. {
  12419. "$ref": "#/components/schemas/McpRemoteConfig"
  12420. },
  12421. {
  12422. "type": "object",
  12423. "properties": {
  12424. "enabled": {
  12425. "type": "boolean"
  12426. }
  12427. },
  12428. "required": ["enabled"],
  12429. "additionalProperties": false
  12430. }
  12431. ]
  12432. }
  12433. },
  12434. "formatter": {
  12435. "anyOf": [
  12436. {
  12437. "type": "boolean"
  12438. },
  12439. {
  12440. "type": "object",
  12441. "additionalProperties": {
  12442. "type": "object",
  12443. "properties": {
  12444. "disabled": {
  12445. "type": "boolean"
  12446. },
  12447. "command": {
  12448. "type": "array",
  12449. "items": {
  12450. "type": "string"
  12451. }
  12452. },
  12453. "environment": {
  12454. "type": "object",
  12455. "additionalProperties": {
  12456. "type": "string"
  12457. }
  12458. },
  12459. "extensions": {
  12460. "type": "array",
  12461. "items": {
  12462. "type": "string"
  12463. }
  12464. }
  12465. },
  12466. "additionalProperties": false
  12467. }
  12468. }
  12469. ],
  12470. "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."
  12471. },
  12472. "lsp": {
  12473. "anyOf": [
  12474. {
  12475. "type": "boolean"
  12476. },
  12477. {
  12478. "type": "object",
  12479. "additionalProperties": {
  12480. "anyOf": [
  12481. {
  12482. "type": "object",
  12483. "properties": {
  12484. "disabled": {
  12485. "type": "boolean",
  12486. "enum": [true]
  12487. }
  12488. },
  12489. "required": ["disabled"],
  12490. "additionalProperties": false
  12491. },
  12492. {
  12493. "type": "object",
  12494. "properties": {
  12495. "command": {
  12496. "type": "array",
  12497. "items": {
  12498. "type": "string"
  12499. }
  12500. },
  12501. "extensions": {
  12502. "type": "array",
  12503. "items": {
  12504. "type": "string"
  12505. }
  12506. },
  12507. "disabled": {
  12508. "type": "boolean"
  12509. },
  12510. "env": {
  12511. "type": "object",
  12512. "additionalProperties": {
  12513. "type": "string"
  12514. }
  12515. },
  12516. "initialization": {
  12517. "type": "object"
  12518. }
  12519. },
  12520. "required": ["command"],
  12521. "additionalProperties": false
  12522. }
  12523. ]
  12524. }
  12525. }
  12526. ],
  12527. "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."
  12528. },
  12529. "instructions": {
  12530. "type": "array",
  12531. "items": {
  12532. "type": "string"
  12533. }
  12534. },
  12535. "layout": {
  12536. "$ref": "#/components/schemas/LayoutConfig"
  12537. },
  12538. "permission": {
  12539. "$ref": "#/components/schemas/PermissionConfig"
  12540. },
  12541. "tools": {
  12542. "type": "object",
  12543. "additionalProperties": {
  12544. "type": "boolean"
  12545. }
  12546. },
  12547. "attachment": {
  12548. "$ref": "#/components/schemas/AttachmentConfig"
  12549. },
  12550. "enterprise": {
  12551. "type": "object",
  12552. "properties": {
  12553. "url": {
  12554. "type": "string"
  12555. }
  12556. },
  12557. "additionalProperties": false
  12558. },
  12559. "tool_output": {
  12560. "type": "object",
  12561. "properties": {
  12562. "max_lines": {
  12563. "type": "integer",
  12564. "exclusiveMinimum": 0
  12565. },
  12566. "max_bytes": {
  12567. "type": "integer",
  12568. "exclusiveMinimum": 0
  12569. }
  12570. },
  12571. "additionalProperties": false
  12572. },
  12573. "compaction": {
  12574. "type": "object",
  12575. "properties": {
  12576. "auto": {
  12577. "type": "boolean"
  12578. },
  12579. "prune": {
  12580. "type": "boolean"
  12581. },
  12582. "tail_turns": {
  12583. "type": "integer",
  12584. "minimum": 0
  12585. },
  12586. "preserve_recent_tokens": {
  12587. "type": "integer",
  12588. "minimum": 0
  12589. },
  12590. "reserved": {
  12591. "type": "integer",
  12592. "minimum": 0
  12593. }
  12594. },
  12595. "additionalProperties": false
  12596. },
  12597. "experimental": {
  12598. "type": "object",
  12599. "properties": {
  12600. "disable_paste_summary": {
  12601. "type": "boolean"
  12602. },
  12603. "batch_tool": {
  12604. "type": "boolean"
  12605. },
  12606. "openTelemetry": {
  12607. "type": "boolean"
  12608. },
  12609. "primary_tools": {
  12610. "type": "array",
  12611. "items": {
  12612. "type": "string"
  12613. }
  12614. },
  12615. "continue_loop_on_deny": {
  12616. "type": "boolean"
  12617. },
  12618. "mcp_timeout": {
  12619. "type": "integer",
  12620. "exclusiveMinimum": 0
  12621. }
  12622. },
  12623. "additionalProperties": false
  12624. }
  12625. },
  12626. "additionalProperties": false
  12627. },
  12628. "Model": {
  12629. "type": "object",
  12630. "properties": {
  12631. "id": {
  12632. "type": "string"
  12633. },
  12634. "providerID": {
  12635. "type": "string"
  12636. },
  12637. "api": {
  12638. "type": "object",
  12639. "properties": {
  12640. "id": {
  12641. "type": "string"
  12642. },
  12643. "url": {
  12644. "type": "string"
  12645. },
  12646. "npm": {
  12647. "type": "string"
  12648. }
  12649. },
  12650. "required": ["id", "url", "npm"],
  12651. "additionalProperties": false
  12652. },
  12653. "name": {
  12654. "type": "string"
  12655. },
  12656. "family": {
  12657. "type": "string"
  12658. },
  12659. "capabilities": {
  12660. "type": "object",
  12661. "properties": {
  12662. "temperature": {
  12663. "type": "boolean"
  12664. },
  12665. "reasoning": {
  12666. "type": "boolean"
  12667. },
  12668. "attachment": {
  12669. "type": "boolean"
  12670. },
  12671. "toolcall": {
  12672. "type": "boolean"
  12673. },
  12674. "input": {
  12675. "type": "object",
  12676. "properties": {
  12677. "text": {
  12678. "type": "boolean"
  12679. },
  12680. "audio": {
  12681. "type": "boolean"
  12682. },
  12683. "image": {
  12684. "type": "boolean"
  12685. },
  12686. "video": {
  12687. "type": "boolean"
  12688. },
  12689. "pdf": {
  12690. "type": "boolean"
  12691. }
  12692. },
  12693. "required": ["text", "audio", "image", "video", "pdf"],
  12694. "additionalProperties": false
  12695. },
  12696. "output": {
  12697. "type": "object",
  12698. "properties": {
  12699. "text": {
  12700. "type": "boolean"
  12701. },
  12702. "audio": {
  12703. "type": "boolean"
  12704. },
  12705. "image": {
  12706. "type": "boolean"
  12707. },
  12708. "video": {
  12709. "type": "boolean"
  12710. },
  12711. "pdf": {
  12712. "type": "boolean"
  12713. }
  12714. },
  12715. "required": ["text", "audio", "image", "video", "pdf"],
  12716. "additionalProperties": false
  12717. },
  12718. "interleaved": {
  12719. "anyOf": [
  12720. {
  12721. "type": "boolean"
  12722. },
  12723. {
  12724. "type": "object",
  12725. "properties": {
  12726. "field": {
  12727. "type": "string",
  12728. "enum": ["reasoning_content", "reasoning_details"]
  12729. }
  12730. },
  12731. "required": ["field"],
  12732. "additionalProperties": false
  12733. }
  12734. ]
  12735. }
  12736. },
  12737. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  12738. "additionalProperties": false
  12739. },
  12740. "cost": {
  12741. "type": "object",
  12742. "properties": {
  12743. "input": {
  12744. "type": "number"
  12745. },
  12746. "output": {
  12747. "type": "number"
  12748. },
  12749. "cache": {
  12750. "type": "object",
  12751. "properties": {
  12752. "read": {
  12753. "type": "number"
  12754. },
  12755. "write": {
  12756. "type": "number"
  12757. }
  12758. },
  12759. "required": ["read", "write"],
  12760. "additionalProperties": false
  12761. },
  12762. "tiers": {
  12763. "type": "array",
  12764. "items": {
  12765. "type": "object",
  12766. "properties": {
  12767. "input": {
  12768. "type": "number"
  12769. },
  12770. "output": {
  12771. "type": "number"
  12772. },
  12773. "cache": {
  12774. "type": "object",
  12775. "properties": {
  12776. "read": {
  12777. "type": "number"
  12778. },
  12779. "write": {
  12780. "type": "number"
  12781. }
  12782. },
  12783. "required": ["read", "write"],
  12784. "additionalProperties": false
  12785. },
  12786. "tier": {
  12787. "type": "object",
  12788. "properties": {
  12789. "type": {
  12790. "type": "string",
  12791. "enum": ["context"]
  12792. },
  12793. "size": {
  12794. "type": "number"
  12795. }
  12796. },
  12797. "required": ["type", "size"],
  12798. "additionalProperties": false
  12799. }
  12800. },
  12801. "required": ["input", "output", "cache", "tier"],
  12802. "additionalProperties": false
  12803. }
  12804. },
  12805. "experimentalOver200K": {
  12806. "type": "object",
  12807. "properties": {
  12808. "input": {
  12809. "type": "number"
  12810. },
  12811. "output": {
  12812. "type": "number"
  12813. },
  12814. "cache": {
  12815. "type": "object",
  12816. "properties": {
  12817. "read": {
  12818. "type": "number"
  12819. },
  12820. "write": {
  12821. "type": "number"
  12822. }
  12823. },
  12824. "required": ["read", "write"],
  12825. "additionalProperties": false
  12826. }
  12827. },
  12828. "required": ["input", "output", "cache"],
  12829. "additionalProperties": false
  12830. }
  12831. },
  12832. "required": ["input", "output", "cache"],
  12833. "additionalProperties": false
  12834. },
  12835. "limit": {
  12836. "type": "object",
  12837. "properties": {
  12838. "context": {
  12839. "type": "number"
  12840. },
  12841. "input": {
  12842. "type": "number"
  12843. },
  12844. "output": {
  12845. "type": "number"
  12846. }
  12847. },
  12848. "required": ["context", "output"],
  12849. "additionalProperties": false
  12850. },
  12851. "status": {
  12852. "type": "string",
  12853. "enum": ["alpha", "beta", "deprecated", "active"]
  12854. },
  12855. "options": {
  12856. "type": "object"
  12857. },
  12858. "headers": {
  12859. "type": "object",
  12860. "additionalProperties": {
  12861. "type": "string"
  12862. }
  12863. },
  12864. "release_date": {
  12865. "type": "string"
  12866. },
  12867. "variants": {
  12868. "type": "object",
  12869. "additionalProperties": {
  12870. "type": "object"
  12871. }
  12872. }
  12873. },
  12874. "required": [
  12875. "id",
  12876. "providerID",
  12877. "api",
  12878. "name",
  12879. "capabilities",
  12880. "cost",
  12881. "limit",
  12882. "status",
  12883. "options",
  12884. "headers",
  12885. "release_date"
  12886. ],
  12887. "additionalProperties": false
  12888. },
  12889. "Provider": {
  12890. "type": "object",
  12891. "properties": {
  12892. "id": {
  12893. "type": "string"
  12894. },
  12895. "name": {
  12896. "type": "string"
  12897. },
  12898. "source": {
  12899. "type": "string",
  12900. "enum": ["env", "config", "custom", "api"]
  12901. },
  12902. "env": {
  12903. "type": "array",
  12904. "items": {
  12905. "type": "string"
  12906. }
  12907. },
  12908. "key": {
  12909. "type": "string"
  12910. },
  12911. "options": {
  12912. "type": "object"
  12913. },
  12914. "models": {
  12915. "type": "object",
  12916. "additionalProperties": {
  12917. "$ref": "#/components/schemas/Model"
  12918. }
  12919. }
  12920. },
  12921. "required": ["id", "name", "source", "env", "options", "models"],
  12922. "additionalProperties": false
  12923. },
  12924. "ConsoleState": {
  12925. "type": "object",
  12926. "properties": {
  12927. "consoleManagedProviders": {
  12928. "type": "array",
  12929. "items": {
  12930. "type": "string"
  12931. }
  12932. },
  12933. "activeOrgName": {
  12934. "type": "string"
  12935. },
  12936. "switchableOrgCount": {
  12937. "type": "integer",
  12938. "minimum": 0
  12939. }
  12940. },
  12941. "required": ["consoleManagedProviders", "switchableOrgCount"],
  12942. "additionalProperties": false
  12943. },
  12944. "effect_HttpApiError_InternalServerError": {
  12945. "type": "object",
  12946. "properties": {
  12947. "_tag": {
  12948. "type": "string",
  12949. "enum": ["InternalServerError"]
  12950. }
  12951. },
  12952. "required": ["_tag"],
  12953. "additionalProperties": false
  12954. },
  12955. "ToolListItem": {
  12956. "type": "object",
  12957. "properties": {
  12958. "id": {
  12959. "type": "string"
  12960. },
  12961. "description": {
  12962. "type": "string"
  12963. },
  12964. "parameters": {}
  12965. },
  12966. "required": ["id", "description", "parameters"],
  12967. "additionalProperties": false
  12968. },
  12969. "ToolList": {
  12970. "type": "array",
  12971. "items": {
  12972. "$ref": "#/components/schemas/ToolListItem"
  12973. }
  12974. },
  12975. "ToolIDs": {
  12976. "type": "array",
  12977. "items": {
  12978. "type": "string"
  12979. }
  12980. },
  12981. "WorktreeError": {
  12982. "type": "object",
  12983. "properties": {
  12984. "name": {
  12985. "type": "string",
  12986. "enum": [
  12987. "WorktreeNotGitError",
  12988. "WorktreeNameGenerationFailedError",
  12989. "WorktreeCreateFailedError",
  12990. "WorktreeStartCommandFailedError",
  12991. "WorktreeRemoveFailedError",
  12992. "WorktreeResetFailedError",
  12993. "WorktreeListFailedError"
  12994. ]
  12995. },
  12996. "data": {
  12997. "type": "object",
  12998. "properties": {
  12999. "message": {
  13000. "type": "string"
  13001. }
  13002. },
  13003. "required": ["message"],
  13004. "additionalProperties": false
  13005. }
  13006. },
  13007. "required": ["name", "data"],
  13008. "additionalProperties": false
  13009. },
  13010. "WorktreeCreateInput": {
  13011. "type": "object",
  13012. "properties": {
  13013. "name": {
  13014. "type": "string"
  13015. },
  13016. "startCommand": {
  13017. "type": "string",
  13018. "description": "Additional startup script to run after the project's start command"
  13019. }
  13020. },
  13021. "additionalProperties": false
  13022. },
  13023. "Worktree": {
  13024. "type": "object",
  13025. "properties": {
  13026. "name": {
  13027. "type": "string"
  13028. },
  13029. "branch": {
  13030. "type": "string"
  13031. },
  13032. "directory": {
  13033. "type": "string"
  13034. }
  13035. },
  13036. "required": ["name", "directory"],
  13037. "additionalProperties": false
  13038. },
  13039. "WorktreeRemoveInput": {
  13040. "type": "object",
  13041. "properties": {
  13042. "directory": {
  13043. "type": "string"
  13044. }
  13045. },
  13046. "required": ["directory"],
  13047. "additionalProperties": false
  13048. },
  13049. "WorktreeResetInput": {
  13050. "type": "object",
  13051. "properties": {
  13052. "directory": {
  13053. "type": "string"
  13054. }
  13055. },
  13056. "required": ["directory"],
  13057. "additionalProperties": false
  13058. },
  13059. "ProjectSummary": {
  13060. "type": "object",
  13061. "properties": {
  13062. "id": {
  13063. "type": "string"
  13064. },
  13065. "name": {
  13066. "type": "string"
  13067. },
  13068. "worktree": {
  13069. "type": "string"
  13070. }
  13071. },
  13072. "required": ["id", "worktree"],
  13073. "additionalProperties": false
  13074. },
  13075. "GlobalSession": {
  13076. "type": "object",
  13077. "properties": {
  13078. "id": {
  13079. "type": "string",
  13080. "pattern": "^ses"
  13081. },
  13082. "slug": {
  13083. "type": "string"
  13084. },
  13085. "projectID": {
  13086. "type": "string"
  13087. },
  13088. "workspaceID": {
  13089. "type": "string",
  13090. "pattern": "^wrk"
  13091. },
  13092. "directory": {
  13093. "type": "string"
  13094. },
  13095. "path": {
  13096. "type": "string"
  13097. },
  13098. "parentID": {
  13099. "type": "string",
  13100. "pattern": "^ses"
  13101. },
  13102. "summary": {
  13103. "type": "object",
  13104. "properties": {
  13105. "additions": {
  13106. "type": "number"
  13107. },
  13108. "deletions": {
  13109. "type": "number"
  13110. },
  13111. "files": {
  13112. "type": "number"
  13113. },
  13114. "diffs": {
  13115. "type": "array",
  13116. "items": {
  13117. "$ref": "#/components/schemas/SnapshotFileDiff"
  13118. }
  13119. }
  13120. },
  13121. "required": ["additions", "deletions", "files"],
  13122. "additionalProperties": false
  13123. },
  13124. "cost": {
  13125. "type": "number"
  13126. },
  13127. "tokens": {
  13128. "type": "object",
  13129. "properties": {
  13130. "input": {
  13131. "type": "number"
  13132. },
  13133. "output": {
  13134. "type": "number"
  13135. },
  13136. "reasoning": {
  13137. "type": "number"
  13138. },
  13139. "cache": {
  13140. "type": "object",
  13141. "properties": {
  13142. "read": {
  13143. "type": "number"
  13144. },
  13145. "write": {
  13146. "type": "number"
  13147. }
  13148. },
  13149. "required": ["read", "write"],
  13150. "additionalProperties": false
  13151. }
  13152. },
  13153. "required": ["input", "output", "reasoning", "cache"],
  13154. "additionalProperties": false
  13155. },
  13156. "share": {
  13157. "type": "object",
  13158. "properties": {
  13159. "url": {
  13160. "type": "string"
  13161. }
  13162. },
  13163. "required": ["url"],
  13164. "additionalProperties": false
  13165. },
  13166. "title": {
  13167. "type": "string"
  13168. },
  13169. "agent": {
  13170. "type": "string"
  13171. },
  13172. "model": {
  13173. "type": "object",
  13174. "properties": {
  13175. "id": {
  13176. "type": "string"
  13177. },
  13178. "providerID": {
  13179. "type": "string"
  13180. },
  13181. "variant": {
  13182. "type": "string"
  13183. }
  13184. },
  13185. "required": ["id", "providerID"],
  13186. "additionalProperties": false
  13187. },
  13188. "version": {
  13189. "type": "string"
  13190. },
  13191. "time": {
  13192. "type": "object",
  13193. "properties": {
  13194. "created": {
  13195. "type": "integer",
  13196. "minimum": 0
  13197. },
  13198. "updated": {
  13199. "type": "integer",
  13200. "minimum": 0
  13201. },
  13202. "compacting": {
  13203. "type": "integer",
  13204. "minimum": 0
  13205. },
  13206. "archived": {
  13207. "type": "number"
  13208. }
  13209. },
  13210. "required": ["created", "updated"],
  13211. "additionalProperties": false
  13212. },
  13213. "permission": {
  13214. "$ref": "#/components/schemas/PermissionRuleset"
  13215. },
  13216. "revert": {
  13217. "type": "object",
  13218. "properties": {
  13219. "messageID": {
  13220. "type": "string",
  13221. "pattern": "^msg"
  13222. },
  13223. "partID": {
  13224. "type": "string",
  13225. "pattern": "^prt"
  13226. },
  13227. "snapshot": {
  13228. "type": "string"
  13229. },
  13230. "diff": {
  13231. "type": "string"
  13232. }
  13233. },
  13234. "required": ["messageID"],
  13235. "additionalProperties": false
  13236. },
  13237. "project": {
  13238. "anyOf": [
  13239. {
  13240. "$ref": "#/components/schemas/ProjectSummary"
  13241. },
  13242. {
  13243. "type": "null"
  13244. }
  13245. ]
  13246. }
  13247. },
  13248. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  13249. "additionalProperties": false
  13250. },
  13251. "McpResource": {
  13252. "type": "object",
  13253. "properties": {
  13254. "name": {
  13255. "type": "string"
  13256. },
  13257. "uri": {
  13258. "type": "string"
  13259. },
  13260. "description": {
  13261. "type": "string"
  13262. },
  13263. "mimeType": {
  13264. "type": "string"
  13265. },
  13266. "client": {
  13267. "type": "string"
  13268. }
  13269. },
  13270. "required": ["name", "uri", "client"],
  13271. "additionalProperties": false
  13272. },
  13273. "Symbol": {
  13274. "type": "object",
  13275. "properties": {
  13276. "name": {
  13277. "type": "string"
  13278. },
  13279. "kind": {
  13280. "type": "integer",
  13281. "minimum": 0
  13282. },
  13283. "location": {
  13284. "type": "object",
  13285. "properties": {
  13286. "uri": {
  13287. "type": "string"
  13288. },
  13289. "range": {
  13290. "$ref": "#/components/schemas/Range"
  13291. }
  13292. },
  13293. "required": ["uri", "range"],
  13294. "additionalProperties": false
  13295. }
  13296. },
  13297. "required": ["name", "kind", "location"],
  13298. "additionalProperties": false
  13299. },
  13300. "FileNode": {
  13301. "type": "object",
  13302. "properties": {
  13303. "name": {
  13304. "type": "string"
  13305. },
  13306. "path": {
  13307. "type": "string"
  13308. },
  13309. "absolute": {
  13310. "type": "string"
  13311. },
  13312. "type": {
  13313. "type": "string",
  13314. "enum": ["file", "directory"]
  13315. },
  13316. "ignored": {
  13317. "type": "boolean"
  13318. }
  13319. },
  13320. "required": ["name", "path", "absolute", "type", "ignored"],
  13321. "additionalProperties": false
  13322. },
  13323. "FileContent": {
  13324. "type": "object",
  13325. "properties": {
  13326. "type": {
  13327. "type": "string",
  13328. "enum": ["text", "binary"]
  13329. },
  13330. "content": {
  13331. "type": "string"
  13332. },
  13333. "diff": {
  13334. "type": "string"
  13335. },
  13336. "patch": {
  13337. "type": "object",
  13338. "properties": {
  13339. "oldFileName": {
  13340. "type": "string"
  13341. },
  13342. "newFileName": {
  13343. "type": "string"
  13344. },
  13345. "oldHeader": {
  13346. "type": "string"
  13347. },
  13348. "newHeader": {
  13349. "type": "string"
  13350. },
  13351. "hunks": {
  13352. "type": "array",
  13353. "items": {
  13354. "type": "object",
  13355. "properties": {
  13356. "oldStart": {
  13357. "type": "integer",
  13358. "minimum": 0
  13359. },
  13360. "oldLines": {
  13361. "type": "integer",
  13362. "minimum": 0
  13363. },
  13364. "newStart": {
  13365. "type": "integer",
  13366. "minimum": 0
  13367. },
  13368. "newLines": {
  13369. "type": "integer",
  13370. "minimum": 0
  13371. },
  13372. "lines": {
  13373. "type": "array",
  13374. "items": {
  13375. "type": "string"
  13376. }
  13377. }
  13378. },
  13379. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  13380. "additionalProperties": false
  13381. }
  13382. },
  13383. "index": {
  13384. "type": "string"
  13385. }
  13386. },
  13387. "required": ["oldFileName", "newFileName", "hunks"],
  13388. "additionalProperties": false
  13389. },
  13390. "encoding": {
  13391. "type": "string",
  13392. "enum": ["base64"]
  13393. },
  13394. "mimeType": {
  13395. "type": "string"
  13396. }
  13397. },
  13398. "required": ["type", "content"],
  13399. "additionalProperties": false
  13400. },
  13401. "File": {
  13402. "type": "object",
  13403. "properties": {
  13404. "path": {
  13405. "type": "string"
  13406. },
  13407. "added": {
  13408. "type": "integer",
  13409. "minimum": 0
  13410. },
  13411. "removed": {
  13412. "type": "integer",
  13413. "minimum": 0
  13414. },
  13415. "status": {
  13416. "type": "string",
  13417. "enum": ["added", "deleted", "modified"]
  13418. }
  13419. },
  13420. "required": ["path", "added", "removed", "status"],
  13421. "additionalProperties": false
  13422. },
  13423. "Path": {
  13424. "type": "object",
  13425. "properties": {
  13426. "home": {
  13427. "type": "string"
  13428. },
  13429. "state": {
  13430. "type": "string"
  13431. },
  13432. "config": {
  13433. "type": "string"
  13434. },
  13435. "worktree": {
  13436. "type": "string"
  13437. },
  13438. "directory": {
  13439. "type": "string"
  13440. }
  13441. },
  13442. "required": ["home", "state", "config", "worktree", "directory"],
  13443. "additionalProperties": false
  13444. },
  13445. "VcsInfo": {
  13446. "type": "object",
  13447. "properties": {
  13448. "branch": {
  13449. "type": "string"
  13450. },
  13451. "default_branch": {
  13452. "type": "string"
  13453. }
  13454. },
  13455. "additionalProperties": false
  13456. },
  13457. "VcsFileStatus": {
  13458. "type": "object",
  13459. "properties": {
  13460. "file": {
  13461. "type": "string"
  13462. },
  13463. "additions": {
  13464. "type": "number"
  13465. },
  13466. "deletions": {
  13467. "type": "number"
  13468. },
  13469. "status": {
  13470. "type": "string",
  13471. "enum": ["added", "deleted", "modified"]
  13472. }
  13473. },
  13474. "required": ["file", "additions", "deletions", "status"],
  13475. "additionalProperties": false
  13476. },
  13477. "VcsFileDiff": {
  13478. "type": "object",
  13479. "properties": {
  13480. "file": {
  13481. "type": "string"
  13482. },
  13483. "patch": {
  13484. "type": "string"
  13485. },
  13486. "additions": {
  13487. "type": "number"
  13488. },
  13489. "deletions": {
  13490. "type": "number"
  13491. },
  13492. "status": {
  13493. "type": "string",
  13494. "enum": ["added", "deleted", "modified"]
  13495. }
  13496. },
  13497. "required": ["file", "additions", "deletions"],
  13498. "additionalProperties": false
  13499. },
  13500. "VcsApplyError": {
  13501. "type": "object",
  13502. "properties": {
  13503. "name": {
  13504. "type": "string",
  13505. "enum": ["VcsApplyError"]
  13506. },
  13507. "data": {
  13508. "type": "object",
  13509. "properties": {
  13510. "message": {
  13511. "type": "string"
  13512. },
  13513. "reason": {
  13514. "type": "string",
  13515. "enum": ["non-git", "not-clean"]
  13516. }
  13517. },
  13518. "required": ["message", "reason"],
  13519. "additionalProperties": false
  13520. }
  13521. },
  13522. "required": ["name", "data"],
  13523. "additionalProperties": false
  13524. },
  13525. "Command": {
  13526. "type": "object",
  13527. "properties": {
  13528. "name": {
  13529. "type": "string"
  13530. },
  13531. "description": {
  13532. "type": "string"
  13533. },
  13534. "agent": {
  13535. "type": "string"
  13536. },
  13537. "model": {
  13538. "type": "string"
  13539. },
  13540. "source": {
  13541. "type": "string",
  13542. "enum": ["command", "mcp", "skill"]
  13543. },
  13544. "template": {
  13545. "type": "string"
  13546. },
  13547. "subtask": {
  13548. "type": "boolean"
  13549. },
  13550. "hints": {
  13551. "type": "array",
  13552. "items": {
  13553. "type": "string"
  13554. }
  13555. }
  13556. },
  13557. "required": ["name", "template", "hints"],
  13558. "additionalProperties": false
  13559. },
  13560. "Agent": {
  13561. "type": "object",
  13562. "properties": {
  13563. "name": {
  13564. "type": "string"
  13565. },
  13566. "description": {
  13567. "type": "string"
  13568. },
  13569. "mode": {
  13570. "type": "string",
  13571. "enum": ["subagent", "primary", "all"]
  13572. },
  13573. "native": {
  13574. "type": "boolean"
  13575. },
  13576. "hidden": {
  13577. "type": "boolean"
  13578. },
  13579. "topP": {
  13580. "type": "number"
  13581. },
  13582. "temperature": {
  13583. "type": "number"
  13584. },
  13585. "color": {
  13586. "type": "string"
  13587. },
  13588. "permission": {
  13589. "$ref": "#/components/schemas/PermissionRuleset"
  13590. },
  13591. "model": {
  13592. "type": "object",
  13593. "properties": {
  13594. "modelID": {
  13595. "type": "string"
  13596. },
  13597. "providerID": {
  13598. "type": "string"
  13599. }
  13600. },
  13601. "required": ["modelID", "providerID"],
  13602. "additionalProperties": false
  13603. },
  13604. "variant": {
  13605. "type": "string"
  13606. },
  13607. "prompt": {
  13608. "type": "string"
  13609. },
  13610. "options": {
  13611. "type": "object"
  13612. },
  13613. "steps": {
  13614. "type": "number"
  13615. }
  13616. },
  13617. "required": ["name", "mode", "permission", "options"],
  13618. "additionalProperties": false
  13619. },
  13620. "LSPStatus": {
  13621. "type": "object",
  13622. "properties": {
  13623. "id": {
  13624. "type": "string"
  13625. },
  13626. "name": {
  13627. "type": "string"
  13628. },
  13629. "root": {
  13630. "type": "string"
  13631. },
  13632. "status": {
  13633. "type": "string",
  13634. "enum": ["connected", "error"]
  13635. }
  13636. },
  13637. "required": ["id", "name", "root", "status"],
  13638. "additionalProperties": false
  13639. },
  13640. "FormatterStatus": {
  13641. "type": "object",
  13642. "properties": {
  13643. "name": {
  13644. "type": "string"
  13645. },
  13646. "extensions": {
  13647. "type": "array",
  13648. "items": {
  13649. "type": "string"
  13650. }
  13651. },
  13652. "enabled": {
  13653. "type": "boolean"
  13654. }
  13655. },
  13656. "required": ["name", "extensions", "enabled"],
  13657. "additionalProperties": false
  13658. },
  13659. "MCPStatusConnected": {
  13660. "type": "object",
  13661. "properties": {
  13662. "status": {
  13663. "type": "string",
  13664. "enum": ["connected"]
  13665. }
  13666. },
  13667. "required": ["status"],
  13668. "additionalProperties": false
  13669. },
  13670. "MCPStatusDisabled": {
  13671. "type": "object",
  13672. "properties": {
  13673. "status": {
  13674. "type": "string",
  13675. "enum": ["disabled"]
  13676. }
  13677. },
  13678. "required": ["status"],
  13679. "additionalProperties": false
  13680. },
  13681. "MCPStatusFailed": {
  13682. "type": "object",
  13683. "properties": {
  13684. "status": {
  13685. "type": "string",
  13686. "enum": ["failed"]
  13687. },
  13688. "error": {
  13689. "type": "string"
  13690. }
  13691. },
  13692. "required": ["status", "error"],
  13693. "additionalProperties": false
  13694. },
  13695. "MCPStatusNeedsAuth": {
  13696. "type": "object",
  13697. "properties": {
  13698. "status": {
  13699. "type": "string",
  13700. "enum": ["needs_auth"]
  13701. }
  13702. },
  13703. "required": ["status"],
  13704. "additionalProperties": false
  13705. },
  13706. "MCPStatusNeedsClientRegistration": {
  13707. "type": "object",
  13708. "properties": {
  13709. "status": {
  13710. "type": "string",
  13711. "enum": ["needs_client_registration"]
  13712. },
  13713. "error": {
  13714. "type": "string"
  13715. }
  13716. },
  13717. "required": ["status", "error"],
  13718. "additionalProperties": false
  13719. },
  13720. "MCPStatus": {
  13721. "anyOf": [
  13722. {
  13723. "$ref": "#/components/schemas/MCPStatusConnected"
  13724. },
  13725. {
  13726. "$ref": "#/components/schemas/MCPStatusDisabled"
  13727. },
  13728. {
  13729. "$ref": "#/components/schemas/MCPStatusFailed"
  13730. },
  13731. {
  13732. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13733. },
  13734. {
  13735. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13736. }
  13737. ]
  13738. },
  13739. "McpUnsupportedOAuthError": {
  13740. "type": "object",
  13741. "properties": {
  13742. "error": {
  13743. "type": "string"
  13744. }
  13745. },
  13746. "required": ["error"],
  13747. "additionalProperties": false
  13748. },
  13749. "NotFoundError": {
  13750. "type": "object",
  13751. "required": ["name", "data"],
  13752. "properties": {
  13753. "name": {
  13754. "type": "string",
  13755. "enum": ["NotFoundError"]
  13756. },
  13757. "data": {
  13758. "type": "object",
  13759. "required": ["message"],
  13760. "properties": {
  13761. "message": {
  13762. "type": "string"
  13763. }
  13764. }
  13765. }
  13766. }
  13767. },
  13768. "effect_HttpApiError_Forbidden": {
  13769. "type": "object",
  13770. "properties": {
  13771. "_tag": {
  13772. "type": "string",
  13773. "enum": ["Forbidden"]
  13774. }
  13775. },
  13776. "required": ["_tag"],
  13777. "additionalProperties": false
  13778. },
  13779. "ProviderAuthMethod": {
  13780. "type": "object",
  13781. "properties": {
  13782. "type": {
  13783. "type": "string",
  13784. "enum": ["oauth", "api"]
  13785. },
  13786. "label": {
  13787. "type": "string"
  13788. },
  13789. "prompts": {
  13790. "type": "array",
  13791. "items": {
  13792. "anyOf": [
  13793. {
  13794. "type": "object",
  13795. "properties": {
  13796. "type": {
  13797. "type": "string",
  13798. "enum": ["text"]
  13799. },
  13800. "key": {
  13801. "type": "string"
  13802. },
  13803. "message": {
  13804. "type": "string"
  13805. },
  13806. "placeholder": {
  13807. "type": "string"
  13808. },
  13809. "when": {
  13810. "type": "object",
  13811. "properties": {
  13812. "key": {
  13813. "type": "string"
  13814. },
  13815. "op": {
  13816. "type": "string",
  13817. "enum": ["eq", "neq"]
  13818. },
  13819. "value": {
  13820. "type": "string"
  13821. }
  13822. },
  13823. "required": ["key", "op", "value"],
  13824. "additionalProperties": false
  13825. }
  13826. },
  13827. "required": ["type", "key", "message"],
  13828. "additionalProperties": false
  13829. },
  13830. {
  13831. "type": "object",
  13832. "properties": {
  13833. "type": {
  13834. "type": "string",
  13835. "enum": ["select"]
  13836. },
  13837. "key": {
  13838. "type": "string"
  13839. },
  13840. "message": {
  13841. "type": "string"
  13842. },
  13843. "options": {
  13844. "type": "array",
  13845. "items": {
  13846. "type": "object",
  13847. "properties": {
  13848. "label": {
  13849. "type": "string"
  13850. },
  13851. "value": {
  13852. "type": "string"
  13853. },
  13854. "hint": {
  13855. "type": "string"
  13856. }
  13857. },
  13858. "required": ["label", "value"],
  13859. "additionalProperties": false
  13860. }
  13861. },
  13862. "when": {
  13863. "type": "object",
  13864. "properties": {
  13865. "key": {
  13866. "type": "string"
  13867. },
  13868. "op": {
  13869. "type": "string",
  13870. "enum": ["eq", "neq"]
  13871. },
  13872. "value": {
  13873. "type": "string"
  13874. }
  13875. },
  13876. "required": ["key", "op", "value"],
  13877. "additionalProperties": false
  13878. }
  13879. },
  13880. "required": ["type", "key", "message", "options"],
  13881. "additionalProperties": false
  13882. }
  13883. ]
  13884. }
  13885. }
  13886. },
  13887. "required": ["type", "label"],
  13888. "additionalProperties": false
  13889. },
  13890. "ProviderAuthAuthorization": {
  13891. "type": "object",
  13892. "properties": {
  13893. "url": {
  13894. "type": "string"
  13895. },
  13896. "method": {
  13897. "type": "string",
  13898. "enum": ["auto", "code"]
  13899. },
  13900. "instructions": {
  13901. "type": "string"
  13902. }
  13903. },
  13904. "required": ["url", "method", "instructions"],
  13905. "additionalProperties": false
  13906. },
  13907. "ProviderAuthError1": {
  13908. "type": "object",
  13909. "properties": {
  13910. "name": {
  13911. "type": "string",
  13912. "enum": [
  13913. "BadRequest",
  13914. "ProviderAuthOauthMissing",
  13915. "ProviderAuthOauthCodeMissing",
  13916. "ProviderAuthOauthCallbackFailed",
  13917. "ProviderAuthValidationFailed"
  13918. ]
  13919. },
  13920. "data": {
  13921. "type": "object",
  13922. "properties": {
  13923. "providerID": {
  13924. "type": "string"
  13925. },
  13926. "field": {
  13927. "type": "string"
  13928. },
  13929. "message": {
  13930. "type": "string"
  13931. },
  13932. "kind": {
  13933. "type": "string"
  13934. }
  13935. },
  13936. "additionalProperties": false
  13937. }
  13938. },
  13939. "required": ["name", "data"],
  13940. "additionalProperties": false
  13941. },
  13942. "TextPartInput": {
  13943. "type": "object",
  13944. "properties": {
  13945. "id": {
  13946. "type": "string",
  13947. "pattern": "^prt"
  13948. },
  13949. "type": {
  13950. "type": "string",
  13951. "enum": ["text"]
  13952. },
  13953. "text": {
  13954. "type": "string"
  13955. },
  13956. "synthetic": {
  13957. "type": "boolean"
  13958. },
  13959. "ignored": {
  13960. "type": "boolean"
  13961. },
  13962. "time": {
  13963. "type": "object",
  13964. "properties": {
  13965. "start": {
  13966. "type": "integer",
  13967. "minimum": 0
  13968. },
  13969. "end": {
  13970. "type": "integer",
  13971. "minimum": 0
  13972. }
  13973. },
  13974. "required": ["start"],
  13975. "additionalProperties": false
  13976. },
  13977. "metadata": {
  13978. "type": "object"
  13979. }
  13980. },
  13981. "required": ["type", "text"],
  13982. "additionalProperties": false
  13983. },
  13984. "FilePartInput": {
  13985. "type": "object",
  13986. "properties": {
  13987. "id": {
  13988. "type": "string",
  13989. "pattern": "^prt"
  13990. },
  13991. "type": {
  13992. "type": "string",
  13993. "enum": ["file"]
  13994. },
  13995. "mime": {
  13996. "type": "string"
  13997. },
  13998. "filename": {
  13999. "type": "string"
  14000. },
  14001. "url": {
  14002. "type": "string"
  14003. },
  14004. "source": {
  14005. "$ref": "#/components/schemas/FilePartSource"
  14006. }
  14007. },
  14008. "required": ["type", "mime", "url"],
  14009. "additionalProperties": false
  14010. },
  14011. "AgentPartInput": {
  14012. "type": "object",
  14013. "properties": {
  14014. "id": {
  14015. "type": "string",
  14016. "pattern": "^prt"
  14017. },
  14018. "type": {
  14019. "type": "string",
  14020. "enum": ["agent"]
  14021. },
  14022. "name": {
  14023. "type": "string"
  14024. },
  14025. "source": {
  14026. "type": "object",
  14027. "properties": {
  14028. "value": {
  14029. "type": "string"
  14030. },
  14031. "start": {
  14032. "type": "integer",
  14033. "minimum": 0
  14034. },
  14035. "end": {
  14036. "type": "integer",
  14037. "minimum": 0
  14038. }
  14039. },
  14040. "required": ["value", "start", "end"],
  14041. "additionalProperties": false
  14042. }
  14043. },
  14044. "required": ["type", "name"],
  14045. "additionalProperties": false
  14046. },
  14047. "SubtaskPartInput": {
  14048. "type": "object",
  14049. "properties": {
  14050. "id": {
  14051. "type": "string",
  14052. "pattern": "^prt"
  14053. },
  14054. "type": {
  14055. "type": "string",
  14056. "enum": ["subtask"]
  14057. },
  14058. "prompt": {
  14059. "type": "string"
  14060. },
  14061. "description": {
  14062. "type": "string"
  14063. },
  14064. "agent": {
  14065. "type": "string"
  14066. },
  14067. "model": {
  14068. "type": "object",
  14069. "properties": {
  14070. "providerID": {
  14071. "type": "string"
  14072. },
  14073. "modelID": {
  14074. "type": "string"
  14075. }
  14076. },
  14077. "required": ["providerID", "modelID"],
  14078. "additionalProperties": false
  14079. },
  14080. "command": {
  14081. "type": "string"
  14082. }
  14083. },
  14084. "required": ["type", "prompt", "description", "agent"],
  14085. "additionalProperties": false
  14086. },
  14087. "V2SessionsResponse": {
  14088. "type": "object",
  14089. "properties": {
  14090. "items": {
  14091. "type": "array",
  14092. "items": {
  14093. "$ref": "#/components/schemas/SessionInfo"
  14094. }
  14095. },
  14096. "cursor": {
  14097. "type": "object",
  14098. "properties": {
  14099. "previous": {
  14100. "type": "string"
  14101. },
  14102. "next": {
  14103. "type": "string"
  14104. }
  14105. },
  14106. "additionalProperties": false
  14107. }
  14108. },
  14109. "required": ["items", "cursor"],
  14110. "additionalProperties": false
  14111. },
  14112. "V2SessionMessagesResponse": {
  14113. "type": "object",
  14114. "properties": {
  14115. "items": {
  14116. "type": "array",
  14117. "items": {
  14118. "$ref": "#/components/schemas/SessionMessage"
  14119. }
  14120. },
  14121. "cursor": {
  14122. "type": "object",
  14123. "properties": {
  14124. "previous": {
  14125. "type": "string"
  14126. },
  14127. "next": {
  14128. "type": "string"
  14129. }
  14130. },
  14131. "additionalProperties": false
  14132. }
  14133. },
  14134. "required": ["items", "cursor"],
  14135. "additionalProperties": false
  14136. },
  14137. "EventTuiPromptAppend": {
  14138. "type": "object",
  14139. "properties": {
  14140. "type": {
  14141. "type": "string",
  14142. "enum": ["tui.prompt.append"]
  14143. },
  14144. "properties": {
  14145. "type": "object",
  14146. "properties": {
  14147. "text": {
  14148. "type": "string"
  14149. }
  14150. },
  14151. "required": ["text"],
  14152. "additionalProperties": false
  14153. }
  14154. },
  14155. "required": ["type", "properties"],
  14156. "additionalProperties": false
  14157. },
  14158. "EventTuiCommandExecute": {
  14159. "type": "object",
  14160. "properties": {
  14161. "type": {
  14162. "type": "string",
  14163. "enum": ["tui.command.execute"]
  14164. },
  14165. "properties": {
  14166. "type": "object",
  14167. "properties": {
  14168. "command": {
  14169. "anyOf": [
  14170. {
  14171. "type": "string",
  14172. "enum": [
  14173. "session.list",
  14174. "session.new",
  14175. "session.share",
  14176. "session.interrupt",
  14177. "session.compact",
  14178. "session.page.up",
  14179. "session.page.down",
  14180. "session.line.up",
  14181. "session.line.down",
  14182. "session.half.page.up",
  14183. "session.half.page.down",
  14184. "session.first",
  14185. "session.last",
  14186. "prompt.clear",
  14187. "prompt.submit",
  14188. "agent.cycle"
  14189. ]
  14190. },
  14191. {
  14192. "type": "string"
  14193. }
  14194. ]
  14195. }
  14196. },
  14197. "required": ["command"],
  14198. "additionalProperties": false
  14199. }
  14200. },
  14201. "required": ["type", "properties"],
  14202. "additionalProperties": false
  14203. },
  14204. "EventTuiToastShow": {
  14205. "type": "object",
  14206. "properties": {
  14207. "type": {
  14208. "type": "string",
  14209. "enum": ["tui.toast.show"]
  14210. },
  14211. "properties": {
  14212. "type": "object",
  14213. "properties": {
  14214. "title": {
  14215. "type": "string"
  14216. },
  14217. "message": {
  14218. "type": "string"
  14219. },
  14220. "variant": {
  14221. "type": "string",
  14222. "enum": ["info", "success", "warning", "error"]
  14223. },
  14224. "duration": {
  14225. "type": "integer",
  14226. "exclusiveMinimum": 0
  14227. }
  14228. },
  14229. "required": ["message", "variant"],
  14230. "additionalProperties": false
  14231. }
  14232. },
  14233. "required": ["type", "properties"],
  14234. "additionalProperties": false
  14235. },
  14236. "EventTuiSessionSelect": {
  14237. "type": "object",
  14238. "properties": {
  14239. "type": {
  14240. "type": "string",
  14241. "enum": ["tui.session.select"]
  14242. },
  14243. "properties": {
  14244. "type": "object",
  14245. "properties": {
  14246. "sessionID": {
  14247. "type": "string",
  14248. "pattern": "^ses",
  14249. "description": "Session ID to navigate to"
  14250. }
  14251. },
  14252. "required": ["sessionID"],
  14253. "additionalProperties": false
  14254. }
  14255. },
  14256. "required": ["type", "properties"],
  14257. "additionalProperties": false
  14258. },
  14259. "Workspace": {
  14260. "type": "object",
  14261. "properties": {
  14262. "id": {
  14263. "type": "string",
  14264. "pattern": "^wrk"
  14265. },
  14266. "type": {
  14267. "type": "string"
  14268. },
  14269. "name": {
  14270. "type": "string"
  14271. },
  14272. "branch": {
  14273. "anyOf": [
  14274. {
  14275. "type": "string"
  14276. },
  14277. {
  14278. "type": "null"
  14279. }
  14280. ]
  14281. },
  14282. "directory": {
  14283. "anyOf": [
  14284. {
  14285. "type": "string"
  14286. },
  14287. {
  14288. "type": "null"
  14289. }
  14290. ]
  14291. },
  14292. "extra": {
  14293. "anyOf": [
  14294. {},
  14295. {
  14296. "type": "null"
  14297. }
  14298. ]
  14299. },
  14300. "projectID": {
  14301. "type": "string"
  14302. },
  14303. "timeUsed": {
  14304. "anyOf": [
  14305. {
  14306. "type": "number"
  14307. },
  14308. {
  14309. "type": "string",
  14310. "enum": ["NaN"]
  14311. },
  14312. {
  14313. "type": "string",
  14314. "enum": ["Infinity"]
  14315. },
  14316. {
  14317. "type": "string",
  14318. "enum": ["-Infinity"]
  14319. },
  14320. {
  14321. "type": "string",
  14322. "enum": ["Infinity", "-Infinity", "NaN"]
  14323. }
  14324. ]
  14325. }
  14326. },
  14327. "required": ["id", "type", "name", "projectID", "timeUsed"],
  14328. "additionalProperties": false
  14329. },
  14330. "WorkspaceWarpError": {
  14331. "type": "object",
  14332. "properties": {
  14333. "name": {
  14334. "type": "string",
  14335. "enum": ["WorkspaceWarpError"]
  14336. },
  14337. "data": {
  14338. "type": "object",
  14339. "properties": {
  14340. "message": {
  14341. "type": "string"
  14342. }
  14343. },
  14344. "required": ["message"],
  14345. "additionalProperties": false
  14346. }
  14347. },
  14348. "required": ["name", "data"],
  14349. "additionalProperties": false
  14350. },
  14351. "SyncEventMessageUpdated": {
  14352. "type": "object",
  14353. "properties": {
  14354. "type": {
  14355. "type": "string",
  14356. "enum": ["sync"]
  14357. },
  14358. "name": {
  14359. "type": "string",
  14360. "enum": ["message.updated.1"]
  14361. },
  14362. "id": {
  14363. "type": "string"
  14364. },
  14365. "seq": {
  14366. "type": "number"
  14367. },
  14368. "aggregateID": {
  14369. "type": "string",
  14370. "enum": ["sessionID"]
  14371. },
  14372. "data": {
  14373. "type": "object",
  14374. "properties": {
  14375. "sessionID": {
  14376. "type": "string",
  14377. "pattern": "^ses"
  14378. },
  14379. "info": {
  14380. "$ref": "#/components/schemas/Message"
  14381. }
  14382. },
  14383. "required": ["sessionID", "info"],
  14384. "additionalProperties": false
  14385. }
  14386. },
  14387. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14388. "additionalProperties": false
  14389. },
  14390. "SyncEventMessageRemoved": {
  14391. "type": "object",
  14392. "properties": {
  14393. "type": {
  14394. "type": "string",
  14395. "enum": ["sync"]
  14396. },
  14397. "name": {
  14398. "type": "string",
  14399. "enum": ["message.removed.1"]
  14400. },
  14401. "id": {
  14402. "type": "string"
  14403. },
  14404. "seq": {
  14405. "type": "number"
  14406. },
  14407. "aggregateID": {
  14408. "type": "string",
  14409. "enum": ["sessionID"]
  14410. },
  14411. "data": {
  14412. "type": "object",
  14413. "properties": {
  14414. "sessionID": {
  14415. "type": "string",
  14416. "pattern": "^ses"
  14417. },
  14418. "messageID": {
  14419. "type": "string",
  14420. "pattern": "^msg"
  14421. }
  14422. },
  14423. "required": ["sessionID", "messageID"],
  14424. "additionalProperties": false
  14425. }
  14426. },
  14427. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14428. "additionalProperties": false
  14429. },
  14430. "SyncEventMessagePartUpdated": {
  14431. "type": "object",
  14432. "properties": {
  14433. "type": {
  14434. "type": "string",
  14435. "enum": ["sync"]
  14436. },
  14437. "name": {
  14438. "type": "string",
  14439. "enum": ["message.part.updated.1"]
  14440. },
  14441. "id": {
  14442. "type": "string"
  14443. },
  14444. "seq": {
  14445. "type": "number"
  14446. },
  14447. "aggregateID": {
  14448. "type": "string",
  14449. "enum": ["sessionID"]
  14450. },
  14451. "data": {
  14452. "type": "object",
  14453. "properties": {
  14454. "sessionID": {
  14455. "type": "string",
  14456. "pattern": "^ses"
  14457. },
  14458. "part": {
  14459. "$ref": "#/components/schemas/Part"
  14460. },
  14461. "time": {
  14462. "type": "integer",
  14463. "minimum": 0
  14464. }
  14465. },
  14466. "required": ["sessionID", "part", "time"],
  14467. "additionalProperties": false
  14468. }
  14469. },
  14470. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14471. "additionalProperties": false
  14472. },
  14473. "SyncEventMessagePartRemoved": {
  14474. "type": "object",
  14475. "properties": {
  14476. "type": {
  14477. "type": "string",
  14478. "enum": ["sync"]
  14479. },
  14480. "name": {
  14481. "type": "string",
  14482. "enum": ["message.part.removed.1"]
  14483. },
  14484. "id": {
  14485. "type": "string"
  14486. },
  14487. "seq": {
  14488. "type": "number"
  14489. },
  14490. "aggregateID": {
  14491. "type": "string",
  14492. "enum": ["sessionID"]
  14493. },
  14494. "data": {
  14495. "type": "object",
  14496. "properties": {
  14497. "sessionID": {
  14498. "type": "string",
  14499. "pattern": "^ses"
  14500. },
  14501. "messageID": {
  14502. "type": "string",
  14503. "pattern": "^msg"
  14504. },
  14505. "partID": {
  14506. "type": "string",
  14507. "pattern": "^prt"
  14508. }
  14509. },
  14510. "required": ["sessionID", "messageID", "partID"],
  14511. "additionalProperties": false
  14512. }
  14513. },
  14514. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14515. "additionalProperties": false
  14516. },
  14517. "SyncEventSessionCreated": {
  14518. "type": "object",
  14519. "properties": {
  14520. "type": {
  14521. "type": "string",
  14522. "enum": ["sync"]
  14523. },
  14524. "name": {
  14525. "type": "string",
  14526. "enum": ["session.created.1"]
  14527. },
  14528. "id": {
  14529. "type": "string"
  14530. },
  14531. "seq": {
  14532. "type": "number"
  14533. },
  14534. "aggregateID": {
  14535. "type": "string",
  14536. "enum": ["sessionID"]
  14537. },
  14538. "data": {
  14539. "type": "object",
  14540. "properties": {
  14541. "sessionID": {
  14542. "type": "string",
  14543. "pattern": "^ses"
  14544. },
  14545. "info": {
  14546. "$ref": "#/components/schemas/Session"
  14547. }
  14548. },
  14549. "required": ["sessionID", "info"],
  14550. "additionalProperties": false
  14551. }
  14552. },
  14553. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14554. "additionalProperties": false
  14555. },
  14556. "SyncEventSessionUpdated": {
  14557. "type": "object",
  14558. "properties": {
  14559. "type": {
  14560. "type": "string",
  14561. "enum": ["sync"]
  14562. },
  14563. "name": {
  14564. "type": "string",
  14565. "enum": ["session.updated.1"]
  14566. },
  14567. "id": {
  14568. "type": "string"
  14569. },
  14570. "seq": {
  14571. "type": "number"
  14572. },
  14573. "aggregateID": {
  14574. "type": "string",
  14575. "enum": ["sessionID"]
  14576. },
  14577. "data": {
  14578. "type": "object",
  14579. "properties": {
  14580. "sessionID": {
  14581. "type": "string",
  14582. "pattern": "^ses"
  14583. },
  14584. "info": {
  14585. "type": "object",
  14586. "properties": {
  14587. "id": {
  14588. "anyOf": [
  14589. {
  14590. "type": "string",
  14591. "pattern": "^ses"
  14592. },
  14593. {
  14594. "type": "null"
  14595. }
  14596. ]
  14597. },
  14598. "slug": {
  14599. "anyOf": [
  14600. {
  14601. "type": "string"
  14602. },
  14603. {
  14604. "type": "null"
  14605. }
  14606. ]
  14607. },
  14608. "projectID": {
  14609. "anyOf": [
  14610. {
  14611. "type": "string"
  14612. },
  14613. {
  14614. "type": "null"
  14615. }
  14616. ]
  14617. },
  14618. "workspaceID": {
  14619. "anyOf": [
  14620. {
  14621. "type": "string",
  14622. "pattern": "^wrk"
  14623. },
  14624. {
  14625. "type": "null"
  14626. }
  14627. ]
  14628. },
  14629. "directory": {
  14630. "anyOf": [
  14631. {
  14632. "type": "string"
  14633. },
  14634. {
  14635. "type": "null"
  14636. }
  14637. ]
  14638. },
  14639. "path": {
  14640. "anyOf": [
  14641. {
  14642. "type": "string"
  14643. },
  14644. {
  14645. "type": "null"
  14646. }
  14647. ]
  14648. },
  14649. "parentID": {
  14650. "anyOf": [
  14651. {
  14652. "type": "string",
  14653. "pattern": "^ses"
  14654. },
  14655. {
  14656. "type": "null"
  14657. }
  14658. ]
  14659. },
  14660. "summary": {
  14661. "anyOf": [
  14662. {
  14663. "type": "object",
  14664. "properties": {
  14665. "additions": {
  14666. "type": "number"
  14667. },
  14668. "deletions": {
  14669. "type": "number"
  14670. },
  14671. "files": {
  14672. "type": "number"
  14673. },
  14674. "diffs": {
  14675. "type": "array",
  14676. "items": {
  14677. "$ref": "#/components/schemas/SnapshotFileDiff"
  14678. }
  14679. }
  14680. },
  14681. "required": ["additions", "deletions", "files"],
  14682. "additionalProperties": false
  14683. },
  14684. {
  14685. "type": "null"
  14686. }
  14687. ]
  14688. },
  14689. "cost": {
  14690. "anyOf": [
  14691. {
  14692. "type": "number"
  14693. },
  14694. {
  14695. "type": "null"
  14696. }
  14697. ]
  14698. },
  14699. "tokens": {
  14700. "anyOf": [
  14701. {
  14702. "type": "object",
  14703. "properties": {
  14704. "input": {
  14705. "type": "number"
  14706. },
  14707. "output": {
  14708. "type": "number"
  14709. },
  14710. "reasoning": {
  14711. "type": "number"
  14712. },
  14713. "cache": {
  14714. "type": "object",
  14715. "properties": {
  14716. "read": {
  14717. "type": "number"
  14718. },
  14719. "write": {
  14720. "type": "number"
  14721. }
  14722. },
  14723. "required": ["read", "write"],
  14724. "additionalProperties": false
  14725. }
  14726. },
  14727. "required": ["input", "output", "reasoning", "cache"],
  14728. "additionalProperties": false
  14729. },
  14730. {
  14731. "type": "null"
  14732. }
  14733. ]
  14734. },
  14735. "share": {
  14736. "type": "object",
  14737. "properties": {
  14738. "url": {
  14739. "anyOf": [
  14740. {
  14741. "type": "string"
  14742. },
  14743. {
  14744. "type": "null"
  14745. }
  14746. ]
  14747. }
  14748. },
  14749. "additionalProperties": false
  14750. },
  14751. "title": {
  14752. "anyOf": [
  14753. {
  14754. "type": "string"
  14755. },
  14756. {
  14757. "type": "null"
  14758. }
  14759. ]
  14760. },
  14761. "agent": {
  14762. "anyOf": [
  14763. {
  14764. "type": "string"
  14765. },
  14766. {
  14767. "type": "null"
  14768. }
  14769. ]
  14770. },
  14771. "model": {
  14772. "anyOf": [
  14773. {
  14774. "type": "object",
  14775. "properties": {
  14776. "id": {
  14777. "type": "string"
  14778. },
  14779. "providerID": {
  14780. "type": "string"
  14781. },
  14782. "variant": {
  14783. "type": "string"
  14784. }
  14785. },
  14786. "required": ["id", "providerID"],
  14787. "additionalProperties": false
  14788. },
  14789. {
  14790. "type": "null"
  14791. }
  14792. ]
  14793. },
  14794. "version": {
  14795. "anyOf": [
  14796. {
  14797. "type": "string"
  14798. },
  14799. {
  14800. "type": "null"
  14801. }
  14802. ]
  14803. },
  14804. "time": {
  14805. "type": "object",
  14806. "properties": {
  14807. "created": {
  14808. "anyOf": [
  14809. {
  14810. "type": "integer",
  14811. "minimum": 0
  14812. },
  14813. {
  14814. "type": "null"
  14815. }
  14816. ]
  14817. },
  14818. "updated": {
  14819. "anyOf": [
  14820. {
  14821. "type": "integer",
  14822. "minimum": 0
  14823. },
  14824. {
  14825. "type": "null"
  14826. }
  14827. ]
  14828. },
  14829. "compacting": {
  14830. "anyOf": [
  14831. {
  14832. "type": "integer",
  14833. "minimum": 0
  14834. },
  14835. {
  14836. "type": "null"
  14837. }
  14838. ]
  14839. },
  14840. "archived": {
  14841. "anyOf": [
  14842. {
  14843. "type": "number"
  14844. },
  14845. {
  14846. "type": "null"
  14847. }
  14848. ]
  14849. }
  14850. },
  14851. "additionalProperties": false
  14852. },
  14853. "permission": {
  14854. "anyOf": [
  14855. {
  14856. "$ref": "#/components/schemas/PermissionRuleset"
  14857. },
  14858. {
  14859. "type": "null"
  14860. }
  14861. ]
  14862. },
  14863. "revert": {
  14864. "anyOf": [
  14865. {
  14866. "type": "object",
  14867. "properties": {
  14868. "messageID": {
  14869. "type": "string",
  14870. "pattern": "^msg"
  14871. },
  14872. "partID": {
  14873. "type": "string",
  14874. "pattern": "^prt"
  14875. },
  14876. "snapshot": {
  14877. "type": "string"
  14878. },
  14879. "diff": {
  14880. "type": "string"
  14881. }
  14882. },
  14883. "required": ["messageID"],
  14884. "additionalProperties": false
  14885. },
  14886. {
  14887. "type": "null"
  14888. }
  14889. ]
  14890. }
  14891. },
  14892. "additionalProperties": false
  14893. }
  14894. },
  14895. "required": ["sessionID", "info"],
  14896. "additionalProperties": false
  14897. }
  14898. },
  14899. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14900. "additionalProperties": false
  14901. },
  14902. "SyncEventSessionDeleted": {
  14903. "type": "object",
  14904. "properties": {
  14905. "type": {
  14906. "type": "string",
  14907. "enum": ["sync"]
  14908. },
  14909. "name": {
  14910. "type": "string",
  14911. "enum": ["session.deleted.1"]
  14912. },
  14913. "id": {
  14914. "type": "string"
  14915. },
  14916. "seq": {
  14917. "type": "number"
  14918. },
  14919. "aggregateID": {
  14920. "type": "string",
  14921. "enum": ["sessionID"]
  14922. },
  14923. "data": {
  14924. "type": "object",
  14925. "properties": {
  14926. "sessionID": {
  14927. "type": "string",
  14928. "pattern": "^ses"
  14929. },
  14930. "info": {
  14931. "$ref": "#/components/schemas/Session"
  14932. }
  14933. },
  14934. "required": ["sessionID", "info"],
  14935. "additionalProperties": false
  14936. }
  14937. },
  14938. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14939. "additionalProperties": false
  14940. },
  14941. "SyncEventSessionNextAgentSwitched": {
  14942. "type": "object",
  14943. "properties": {
  14944. "type": {
  14945. "type": "string",
  14946. "enum": ["sync"]
  14947. },
  14948. "name": {
  14949. "type": "string",
  14950. "enum": ["session.next.agent.switched.1"]
  14951. },
  14952. "id": {
  14953. "type": "string"
  14954. },
  14955. "seq": {
  14956. "type": "number"
  14957. },
  14958. "aggregateID": {
  14959. "type": "string",
  14960. "enum": ["sessionID"]
  14961. },
  14962. "data": {
  14963. "type": "object",
  14964. "properties": {
  14965. "timestamp": {
  14966. "type": "number"
  14967. },
  14968. "sessionID": {
  14969. "type": "string",
  14970. "pattern": "^ses"
  14971. },
  14972. "agent": {
  14973. "type": "string"
  14974. }
  14975. },
  14976. "required": ["timestamp", "sessionID", "agent"],
  14977. "additionalProperties": false
  14978. }
  14979. },
  14980. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14981. "additionalProperties": false
  14982. },
  14983. "SyncEventSessionNextModelSwitched": {
  14984. "type": "object",
  14985. "properties": {
  14986. "type": {
  14987. "type": "string",
  14988. "enum": ["sync"]
  14989. },
  14990. "name": {
  14991. "type": "string",
  14992. "enum": ["session.next.model.switched.1"]
  14993. },
  14994. "id": {
  14995. "type": "string"
  14996. },
  14997. "seq": {
  14998. "type": "number"
  14999. },
  15000. "aggregateID": {
  15001. "type": "string",
  15002. "enum": ["sessionID"]
  15003. },
  15004. "data": {
  15005. "type": "object",
  15006. "properties": {
  15007. "timestamp": {
  15008. "type": "number"
  15009. },
  15010. "sessionID": {
  15011. "type": "string",
  15012. "pattern": "^ses"
  15013. },
  15014. "model": {
  15015. "type": "object",
  15016. "properties": {
  15017. "id": {
  15018. "type": "string"
  15019. },
  15020. "providerID": {
  15021. "type": "string"
  15022. },
  15023. "variant": {
  15024. "type": "string"
  15025. }
  15026. },
  15027. "required": ["id", "providerID", "variant"],
  15028. "additionalProperties": false
  15029. }
  15030. },
  15031. "required": ["timestamp", "sessionID", "model"],
  15032. "additionalProperties": false
  15033. }
  15034. },
  15035. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15036. "additionalProperties": false
  15037. },
  15038. "SyncEventSessionNextPrompted": {
  15039. "type": "object",
  15040. "properties": {
  15041. "type": {
  15042. "type": "string",
  15043. "enum": ["sync"]
  15044. },
  15045. "name": {
  15046. "type": "string",
  15047. "enum": ["session.next.prompted.1"]
  15048. },
  15049. "id": {
  15050. "type": "string"
  15051. },
  15052. "seq": {
  15053. "type": "number"
  15054. },
  15055. "aggregateID": {
  15056. "type": "string",
  15057. "enum": ["sessionID"]
  15058. },
  15059. "data": {
  15060. "type": "object",
  15061. "properties": {
  15062. "timestamp": {
  15063. "type": "number"
  15064. },
  15065. "sessionID": {
  15066. "type": "string",
  15067. "pattern": "^ses"
  15068. },
  15069. "prompt": {
  15070. "$ref": "#/components/schemas/Prompt"
  15071. }
  15072. },
  15073. "required": ["timestamp", "sessionID", "prompt"],
  15074. "additionalProperties": false
  15075. }
  15076. },
  15077. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15078. "additionalProperties": false
  15079. },
  15080. "SyncEventSessionNextSynthetic": {
  15081. "type": "object",
  15082. "properties": {
  15083. "type": {
  15084. "type": "string",
  15085. "enum": ["sync"]
  15086. },
  15087. "name": {
  15088. "type": "string",
  15089. "enum": ["session.next.synthetic.1"]
  15090. },
  15091. "id": {
  15092. "type": "string"
  15093. },
  15094. "seq": {
  15095. "type": "number"
  15096. },
  15097. "aggregateID": {
  15098. "type": "string",
  15099. "enum": ["sessionID"]
  15100. },
  15101. "data": {
  15102. "type": "object",
  15103. "properties": {
  15104. "timestamp": {
  15105. "type": "number"
  15106. },
  15107. "sessionID": {
  15108. "type": "string",
  15109. "pattern": "^ses"
  15110. },
  15111. "text": {
  15112. "type": "string"
  15113. }
  15114. },
  15115. "required": ["timestamp", "sessionID", "text"],
  15116. "additionalProperties": false
  15117. }
  15118. },
  15119. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15120. "additionalProperties": false
  15121. },
  15122. "SyncEventSessionNextShellStarted": {
  15123. "type": "object",
  15124. "properties": {
  15125. "type": {
  15126. "type": "string",
  15127. "enum": ["sync"]
  15128. },
  15129. "name": {
  15130. "type": "string",
  15131. "enum": ["session.next.shell.started.1"]
  15132. },
  15133. "id": {
  15134. "type": "string"
  15135. },
  15136. "seq": {
  15137. "type": "number"
  15138. },
  15139. "aggregateID": {
  15140. "type": "string",
  15141. "enum": ["sessionID"]
  15142. },
  15143. "data": {
  15144. "type": "object",
  15145. "properties": {
  15146. "timestamp": {
  15147. "type": "number"
  15148. },
  15149. "sessionID": {
  15150. "type": "string",
  15151. "pattern": "^ses"
  15152. },
  15153. "callID": {
  15154. "type": "string"
  15155. },
  15156. "command": {
  15157. "type": "string"
  15158. }
  15159. },
  15160. "required": ["timestamp", "sessionID", "callID", "command"],
  15161. "additionalProperties": false
  15162. }
  15163. },
  15164. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15165. "additionalProperties": false
  15166. },
  15167. "SyncEventSessionNextShellEnded": {
  15168. "type": "object",
  15169. "properties": {
  15170. "type": {
  15171. "type": "string",
  15172. "enum": ["sync"]
  15173. },
  15174. "name": {
  15175. "type": "string",
  15176. "enum": ["session.next.shell.ended.1"]
  15177. },
  15178. "id": {
  15179. "type": "string"
  15180. },
  15181. "seq": {
  15182. "type": "number"
  15183. },
  15184. "aggregateID": {
  15185. "type": "string",
  15186. "enum": ["sessionID"]
  15187. },
  15188. "data": {
  15189. "type": "object",
  15190. "properties": {
  15191. "timestamp": {
  15192. "type": "number"
  15193. },
  15194. "sessionID": {
  15195. "type": "string",
  15196. "pattern": "^ses"
  15197. },
  15198. "callID": {
  15199. "type": "string"
  15200. },
  15201. "output": {
  15202. "type": "string"
  15203. }
  15204. },
  15205. "required": ["timestamp", "sessionID", "callID", "output"],
  15206. "additionalProperties": false
  15207. }
  15208. },
  15209. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15210. "additionalProperties": false
  15211. },
  15212. "SyncEventSessionNextStepStarted": {
  15213. "type": "object",
  15214. "properties": {
  15215. "type": {
  15216. "type": "string",
  15217. "enum": ["sync"]
  15218. },
  15219. "name": {
  15220. "type": "string",
  15221. "enum": ["session.next.step.started.1"]
  15222. },
  15223. "id": {
  15224. "type": "string"
  15225. },
  15226. "seq": {
  15227. "type": "number"
  15228. },
  15229. "aggregateID": {
  15230. "type": "string",
  15231. "enum": ["sessionID"]
  15232. },
  15233. "data": {
  15234. "type": "object",
  15235. "properties": {
  15236. "timestamp": {
  15237. "type": "number"
  15238. },
  15239. "sessionID": {
  15240. "type": "string",
  15241. "pattern": "^ses"
  15242. },
  15243. "agent": {
  15244. "type": "string"
  15245. },
  15246. "model": {
  15247. "type": "object",
  15248. "properties": {
  15249. "id": {
  15250. "type": "string"
  15251. },
  15252. "providerID": {
  15253. "type": "string"
  15254. },
  15255. "variant": {
  15256. "type": "string"
  15257. }
  15258. },
  15259. "required": ["id", "providerID", "variant"],
  15260. "additionalProperties": false
  15261. },
  15262. "snapshot": {
  15263. "type": "string"
  15264. }
  15265. },
  15266. "required": ["timestamp", "sessionID", "agent", "model"],
  15267. "additionalProperties": false
  15268. }
  15269. },
  15270. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15271. "additionalProperties": false
  15272. },
  15273. "SyncEventSessionNextStepEnded": {
  15274. "type": "object",
  15275. "properties": {
  15276. "type": {
  15277. "type": "string",
  15278. "enum": ["sync"]
  15279. },
  15280. "name": {
  15281. "type": "string",
  15282. "enum": ["session.next.step.ended.1"]
  15283. },
  15284. "id": {
  15285. "type": "string"
  15286. },
  15287. "seq": {
  15288. "type": "number"
  15289. },
  15290. "aggregateID": {
  15291. "type": "string",
  15292. "enum": ["sessionID"]
  15293. },
  15294. "data": {
  15295. "type": "object",
  15296. "properties": {
  15297. "timestamp": {
  15298. "type": "number"
  15299. },
  15300. "sessionID": {
  15301. "type": "string",
  15302. "pattern": "^ses"
  15303. },
  15304. "finish": {
  15305. "type": "string"
  15306. },
  15307. "cost": {
  15308. "type": "number"
  15309. },
  15310. "tokens": {
  15311. "type": "object",
  15312. "properties": {
  15313. "input": {
  15314. "type": "number"
  15315. },
  15316. "output": {
  15317. "type": "number"
  15318. },
  15319. "reasoning": {
  15320. "type": "number"
  15321. },
  15322. "cache": {
  15323. "type": "object",
  15324. "properties": {
  15325. "read": {
  15326. "type": "number"
  15327. },
  15328. "write": {
  15329. "type": "number"
  15330. }
  15331. },
  15332. "required": ["read", "write"],
  15333. "additionalProperties": false
  15334. }
  15335. },
  15336. "required": ["input", "output", "reasoning", "cache"],
  15337. "additionalProperties": false
  15338. },
  15339. "snapshot": {
  15340. "type": "string"
  15341. }
  15342. },
  15343. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  15344. "additionalProperties": false
  15345. }
  15346. },
  15347. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15348. "additionalProperties": false
  15349. },
  15350. "SyncEventSessionNextStepFailed": {
  15351. "type": "object",
  15352. "properties": {
  15353. "type": {
  15354. "type": "string",
  15355. "enum": ["sync"]
  15356. },
  15357. "name": {
  15358. "type": "string",
  15359. "enum": ["session.next.step.failed.1"]
  15360. },
  15361. "id": {
  15362. "type": "string"
  15363. },
  15364. "seq": {
  15365. "type": "number"
  15366. },
  15367. "aggregateID": {
  15368. "type": "string",
  15369. "enum": ["sessionID"]
  15370. },
  15371. "data": {
  15372. "type": "object",
  15373. "properties": {
  15374. "timestamp": {
  15375. "type": "number"
  15376. },
  15377. "sessionID": {
  15378. "type": "string",
  15379. "pattern": "^ses"
  15380. },
  15381. "error": {
  15382. "$ref": "#/components/schemas/SessionErrorUnknown"
  15383. }
  15384. },
  15385. "required": ["timestamp", "sessionID", "error"],
  15386. "additionalProperties": false
  15387. }
  15388. },
  15389. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15390. "additionalProperties": false
  15391. },
  15392. "SyncEventSessionNextTextStarted": {
  15393. "type": "object",
  15394. "properties": {
  15395. "type": {
  15396. "type": "string",
  15397. "enum": ["sync"]
  15398. },
  15399. "name": {
  15400. "type": "string",
  15401. "enum": ["session.next.text.started.1"]
  15402. },
  15403. "id": {
  15404. "type": "string"
  15405. },
  15406. "seq": {
  15407. "type": "number"
  15408. },
  15409. "aggregateID": {
  15410. "type": "string",
  15411. "enum": ["sessionID"]
  15412. },
  15413. "data": {
  15414. "type": "object",
  15415. "properties": {
  15416. "timestamp": {
  15417. "type": "number"
  15418. },
  15419. "sessionID": {
  15420. "type": "string",
  15421. "pattern": "^ses"
  15422. }
  15423. },
  15424. "required": ["timestamp", "sessionID"],
  15425. "additionalProperties": false
  15426. }
  15427. },
  15428. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15429. "additionalProperties": false
  15430. },
  15431. "SyncEventSessionNextTextDelta": {
  15432. "type": "object",
  15433. "properties": {
  15434. "type": {
  15435. "type": "string",
  15436. "enum": ["sync"]
  15437. },
  15438. "name": {
  15439. "type": "string",
  15440. "enum": ["session.next.text.delta.1"]
  15441. },
  15442. "id": {
  15443. "type": "string"
  15444. },
  15445. "seq": {
  15446. "type": "number"
  15447. },
  15448. "aggregateID": {
  15449. "type": "string",
  15450. "enum": ["sessionID"]
  15451. },
  15452. "data": {
  15453. "type": "object",
  15454. "properties": {
  15455. "timestamp": {
  15456. "type": "number"
  15457. },
  15458. "sessionID": {
  15459. "type": "string",
  15460. "pattern": "^ses"
  15461. },
  15462. "delta": {
  15463. "type": "string"
  15464. }
  15465. },
  15466. "required": ["timestamp", "sessionID", "delta"],
  15467. "additionalProperties": false
  15468. }
  15469. },
  15470. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15471. "additionalProperties": false
  15472. },
  15473. "SyncEventSessionNextTextEnded": {
  15474. "type": "object",
  15475. "properties": {
  15476. "type": {
  15477. "type": "string",
  15478. "enum": ["sync"]
  15479. },
  15480. "name": {
  15481. "type": "string",
  15482. "enum": ["session.next.text.ended.1"]
  15483. },
  15484. "id": {
  15485. "type": "string"
  15486. },
  15487. "seq": {
  15488. "type": "number"
  15489. },
  15490. "aggregateID": {
  15491. "type": "string",
  15492. "enum": ["sessionID"]
  15493. },
  15494. "data": {
  15495. "type": "object",
  15496. "properties": {
  15497. "timestamp": {
  15498. "type": "number"
  15499. },
  15500. "sessionID": {
  15501. "type": "string",
  15502. "pattern": "^ses"
  15503. },
  15504. "text": {
  15505. "type": "string"
  15506. }
  15507. },
  15508. "required": ["timestamp", "sessionID", "text"],
  15509. "additionalProperties": false
  15510. }
  15511. },
  15512. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15513. "additionalProperties": false
  15514. },
  15515. "SyncEventSessionNextToolInputStarted": {
  15516. "type": "object",
  15517. "properties": {
  15518. "type": {
  15519. "type": "string",
  15520. "enum": ["sync"]
  15521. },
  15522. "name": {
  15523. "type": "string",
  15524. "enum": ["session.next.tool.input.started.1"]
  15525. },
  15526. "id": {
  15527. "type": "string"
  15528. },
  15529. "seq": {
  15530. "type": "number"
  15531. },
  15532. "aggregateID": {
  15533. "type": "string",
  15534. "enum": ["sessionID"]
  15535. },
  15536. "data": {
  15537. "type": "object",
  15538. "properties": {
  15539. "timestamp": {
  15540. "type": "number"
  15541. },
  15542. "sessionID": {
  15543. "type": "string",
  15544. "pattern": "^ses"
  15545. },
  15546. "callID": {
  15547. "type": "string"
  15548. },
  15549. "name": {
  15550. "type": "string"
  15551. }
  15552. },
  15553. "required": ["timestamp", "sessionID", "callID", "name"],
  15554. "additionalProperties": false
  15555. }
  15556. },
  15557. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15558. "additionalProperties": false
  15559. },
  15560. "SyncEventSessionNextToolInputDelta": {
  15561. "type": "object",
  15562. "properties": {
  15563. "type": {
  15564. "type": "string",
  15565. "enum": ["sync"]
  15566. },
  15567. "name": {
  15568. "type": "string",
  15569. "enum": ["session.next.tool.input.delta.1"]
  15570. },
  15571. "id": {
  15572. "type": "string"
  15573. },
  15574. "seq": {
  15575. "type": "number"
  15576. },
  15577. "aggregateID": {
  15578. "type": "string",
  15579. "enum": ["sessionID"]
  15580. },
  15581. "data": {
  15582. "type": "object",
  15583. "properties": {
  15584. "timestamp": {
  15585. "type": "number"
  15586. },
  15587. "sessionID": {
  15588. "type": "string",
  15589. "pattern": "^ses"
  15590. },
  15591. "callID": {
  15592. "type": "string"
  15593. },
  15594. "delta": {
  15595. "type": "string"
  15596. }
  15597. },
  15598. "required": ["timestamp", "sessionID", "callID", "delta"],
  15599. "additionalProperties": false
  15600. }
  15601. },
  15602. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15603. "additionalProperties": false
  15604. },
  15605. "SyncEventSessionNextToolInputEnded": {
  15606. "type": "object",
  15607. "properties": {
  15608. "type": {
  15609. "type": "string",
  15610. "enum": ["sync"]
  15611. },
  15612. "name": {
  15613. "type": "string",
  15614. "enum": ["session.next.tool.input.ended.1"]
  15615. },
  15616. "id": {
  15617. "type": "string"
  15618. },
  15619. "seq": {
  15620. "type": "number"
  15621. },
  15622. "aggregateID": {
  15623. "type": "string",
  15624. "enum": ["sessionID"]
  15625. },
  15626. "data": {
  15627. "type": "object",
  15628. "properties": {
  15629. "timestamp": {
  15630. "type": "number"
  15631. },
  15632. "sessionID": {
  15633. "type": "string",
  15634. "pattern": "^ses"
  15635. },
  15636. "callID": {
  15637. "type": "string"
  15638. },
  15639. "text": {
  15640. "type": "string"
  15641. }
  15642. },
  15643. "required": ["timestamp", "sessionID", "callID", "text"],
  15644. "additionalProperties": false
  15645. }
  15646. },
  15647. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15648. "additionalProperties": false
  15649. },
  15650. "SyncEventSessionNextToolCalled": {
  15651. "type": "object",
  15652. "properties": {
  15653. "type": {
  15654. "type": "string",
  15655. "enum": ["sync"]
  15656. },
  15657. "name": {
  15658. "type": "string",
  15659. "enum": ["session.next.tool.called.1"]
  15660. },
  15661. "id": {
  15662. "type": "string"
  15663. },
  15664. "seq": {
  15665. "type": "number"
  15666. },
  15667. "aggregateID": {
  15668. "type": "string",
  15669. "enum": ["sessionID"]
  15670. },
  15671. "data": {
  15672. "type": "object",
  15673. "properties": {
  15674. "timestamp": {
  15675. "type": "number"
  15676. },
  15677. "sessionID": {
  15678. "type": "string",
  15679. "pattern": "^ses"
  15680. },
  15681. "callID": {
  15682. "type": "string"
  15683. },
  15684. "tool": {
  15685. "type": "string"
  15686. },
  15687. "input": {
  15688. "type": "object"
  15689. },
  15690. "provider": {
  15691. "type": "object",
  15692. "properties": {
  15693. "executed": {
  15694. "type": "boolean"
  15695. },
  15696. "metadata": {
  15697. "type": "object"
  15698. }
  15699. },
  15700. "required": ["executed"],
  15701. "additionalProperties": false
  15702. }
  15703. },
  15704. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  15705. "additionalProperties": false
  15706. }
  15707. },
  15708. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15709. "additionalProperties": false
  15710. },
  15711. "SyncEventSessionNextToolSuccess": {
  15712. "type": "object",
  15713. "properties": {
  15714. "type": {
  15715. "type": "string",
  15716. "enum": ["sync"]
  15717. },
  15718. "name": {
  15719. "type": "string",
  15720. "enum": ["session.next.tool.success.1"]
  15721. },
  15722. "id": {
  15723. "type": "string"
  15724. },
  15725. "seq": {
  15726. "type": "number"
  15727. },
  15728. "aggregateID": {
  15729. "type": "string",
  15730. "enum": ["sessionID"]
  15731. },
  15732. "data": {
  15733. "type": "object",
  15734. "properties": {
  15735. "timestamp": {
  15736. "type": "number"
  15737. },
  15738. "sessionID": {
  15739. "type": "string",
  15740. "pattern": "^ses"
  15741. },
  15742. "callID": {
  15743. "type": "string"
  15744. },
  15745. "structured": {
  15746. "type": "object"
  15747. },
  15748. "content": {
  15749. "type": "array",
  15750. "items": {
  15751. "anyOf": [
  15752. {
  15753. "$ref": "#/components/schemas/ToolTextContent"
  15754. },
  15755. {
  15756. "$ref": "#/components/schemas/ToolFileContent"
  15757. }
  15758. ]
  15759. }
  15760. },
  15761. "provider": {
  15762. "type": "object",
  15763. "properties": {
  15764. "executed": {
  15765. "type": "boolean"
  15766. },
  15767. "metadata": {
  15768. "type": "object"
  15769. }
  15770. },
  15771. "required": ["executed"],
  15772. "additionalProperties": false
  15773. }
  15774. },
  15775. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  15776. "additionalProperties": false
  15777. }
  15778. },
  15779. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15780. "additionalProperties": false
  15781. },
  15782. "SyncEventSessionNextToolFailed": {
  15783. "type": "object",
  15784. "properties": {
  15785. "type": {
  15786. "type": "string",
  15787. "enum": ["sync"]
  15788. },
  15789. "name": {
  15790. "type": "string",
  15791. "enum": ["session.next.tool.failed.1"]
  15792. },
  15793. "id": {
  15794. "type": "string"
  15795. },
  15796. "seq": {
  15797. "type": "number"
  15798. },
  15799. "aggregateID": {
  15800. "type": "string",
  15801. "enum": ["sessionID"]
  15802. },
  15803. "data": {
  15804. "type": "object",
  15805. "properties": {
  15806. "timestamp": {
  15807. "type": "number"
  15808. },
  15809. "sessionID": {
  15810. "type": "string",
  15811. "pattern": "^ses"
  15812. },
  15813. "callID": {
  15814. "type": "string"
  15815. },
  15816. "error": {
  15817. "$ref": "#/components/schemas/SessionErrorUnknown"
  15818. },
  15819. "provider": {
  15820. "type": "object",
  15821. "properties": {
  15822. "executed": {
  15823. "type": "boolean"
  15824. },
  15825. "metadata": {
  15826. "type": "object"
  15827. }
  15828. },
  15829. "required": ["executed"],
  15830. "additionalProperties": false
  15831. }
  15832. },
  15833. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  15834. "additionalProperties": false
  15835. }
  15836. },
  15837. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15838. "additionalProperties": false
  15839. },
  15840. "SyncEventSessionNextReasoningStarted": {
  15841. "type": "object",
  15842. "properties": {
  15843. "type": {
  15844. "type": "string",
  15845. "enum": ["sync"]
  15846. },
  15847. "name": {
  15848. "type": "string",
  15849. "enum": ["session.next.reasoning.started.1"]
  15850. },
  15851. "id": {
  15852. "type": "string"
  15853. },
  15854. "seq": {
  15855. "type": "number"
  15856. },
  15857. "aggregateID": {
  15858. "type": "string",
  15859. "enum": ["sessionID"]
  15860. },
  15861. "data": {
  15862. "type": "object",
  15863. "properties": {
  15864. "timestamp": {
  15865. "type": "number"
  15866. },
  15867. "sessionID": {
  15868. "type": "string",
  15869. "pattern": "^ses"
  15870. },
  15871. "reasoningID": {
  15872. "type": "string"
  15873. }
  15874. },
  15875. "required": ["timestamp", "sessionID", "reasoningID"],
  15876. "additionalProperties": false
  15877. }
  15878. },
  15879. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15880. "additionalProperties": false
  15881. },
  15882. "SyncEventSessionNextReasoningDelta": {
  15883. "type": "object",
  15884. "properties": {
  15885. "type": {
  15886. "type": "string",
  15887. "enum": ["sync"]
  15888. },
  15889. "name": {
  15890. "type": "string",
  15891. "enum": ["session.next.reasoning.delta.1"]
  15892. },
  15893. "id": {
  15894. "type": "string"
  15895. },
  15896. "seq": {
  15897. "type": "number"
  15898. },
  15899. "aggregateID": {
  15900. "type": "string",
  15901. "enum": ["sessionID"]
  15902. },
  15903. "data": {
  15904. "type": "object",
  15905. "properties": {
  15906. "timestamp": {
  15907. "type": "number"
  15908. },
  15909. "sessionID": {
  15910. "type": "string",
  15911. "pattern": "^ses"
  15912. },
  15913. "reasoningID": {
  15914. "type": "string"
  15915. },
  15916. "delta": {
  15917. "type": "string"
  15918. }
  15919. },
  15920. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  15921. "additionalProperties": false
  15922. }
  15923. },
  15924. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15925. "additionalProperties": false
  15926. },
  15927. "SyncEventSessionNextReasoningEnded": {
  15928. "type": "object",
  15929. "properties": {
  15930. "type": {
  15931. "type": "string",
  15932. "enum": ["sync"]
  15933. },
  15934. "name": {
  15935. "type": "string",
  15936. "enum": ["session.next.reasoning.ended.1"]
  15937. },
  15938. "id": {
  15939. "type": "string"
  15940. },
  15941. "seq": {
  15942. "type": "number"
  15943. },
  15944. "aggregateID": {
  15945. "type": "string",
  15946. "enum": ["sessionID"]
  15947. },
  15948. "data": {
  15949. "type": "object",
  15950. "properties": {
  15951. "timestamp": {
  15952. "type": "number"
  15953. },
  15954. "sessionID": {
  15955. "type": "string",
  15956. "pattern": "^ses"
  15957. },
  15958. "reasoningID": {
  15959. "type": "string"
  15960. },
  15961. "text": {
  15962. "type": "string"
  15963. }
  15964. },
  15965. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  15966. "additionalProperties": false
  15967. }
  15968. },
  15969. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15970. "additionalProperties": false
  15971. },
  15972. "SyncEventSessionNextRetried": {
  15973. "type": "object",
  15974. "properties": {
  15975. "type": {
  15976. "type": "string",
  15977. "enum": ["sync"]
  15978. },
  15979. "name": {
  15980. "type": "string",
  15981. "enum": ["session.next.retried.1"]
  15982. },
  15983. "id": {
  15984. "type": "string"
  15985. },
  15986. "seq": {
  15987. "type": "number"
  15988. },
  15989. "aggregateID": {
  15990. "type": "string",
  15991. "enum": ["sessionID"]
  15992. },
  15993. "data": {
  15994. "type": "object",
  15995. "properties": {
  15996. "timestamp": {
  15997. "type": "number"
  15998. },
  15999. "sessionID": {
  16000. "type": "string",
  16001. "pattern": "^ses"
  16002. },
  16003. "attempt": {
  16004. "type": "number"
  16005. },
  16006. "error": {
  16007. "$ref": "#/components/schemas/SessionNextRetry_error"
  16008. }
  16009. },
  16010. "required": ["timestamp", "sessionID", "attempt", "error"],
  16011. "additionalProperties": false
  16012. }
  16013. },
  16014. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16015. "additionalProperties": false
  16016. },
  16017. "SyncEventSessionNextCompactionStarted": {
  16018. "type": "object",
  16019. "properties": {
  16020. "type": {
  16021. "type": "string",
  16022. "enum": ["sync"]
  16023. },
  16024. "name": {
  16025. "type": "string",
  16026. "enum": ["session.next.compaction.started.1"]
  16027. },
  16028. "id": {
  16029. "type": "string"
  16030. },
  16031. "seq": {
  16032. "type": "number"
  16033. },
  16034. "aggregateID": {
  16035. "type": "string",
  16036. "enum": ["sessionID"]
  16037. },
  16038. "data": {
  16039. "type": "object",
  16040. "properties": {
  16041. "timestamp": {
  16042. "type": "number"
  16043. },
  16044. "sessionID": {
  16045. "type": "string",
  16046. "pattern": "^ses"
  16047. },
  16048. "reason": {
  16049. "type": "string",
  16050. "enum": ["auto", "manual"]
  16051. }
  16052. },
  16053. "required": ["timestamp", "sessionID", "reason"],
  16054. "additionalProperties": false
  16055. }
  16056. },
  16057. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16058. "additionalProperties": false
  16059. },
  16060. "SyncEventSessionNextCompactionDelta": {
  16061. "type": "object",
  16062. "properties": {
  16063. "type": {
  16064. "type": "string",
  16065. "enum": ["sync"]
  16066. },
  16067. "name": {
  16068. "type": "string",
  16069. "enum": ["session.next.compaction.delta.1"]
  16070. },
  16071. "id": {
  16072. "type": "string"
  16073. },
  16074. "seq": {
  16075. "type": "number"
  16076. },
  16077. "aggregateID": {
  16078. "type": "string",
  16079. "enum": ["sessionID"]
  16080. },
  16081. "data": {
  16082. "type": "object",
  16083. "properties": {
  16084. "timestamp": {
  16085. "type": "number"
  16086. },
  16087. "sessionID": {
  16088. "type": "string",
  16089. "pattern": "^ses"
  16090. },
  16091. "text": {
  16092. "type": "string"
  16093. }
  16094. },
  16095. "required": ["timestamp", "sessionID", "text"],
  16096. "additionalProperties": false
  16097. }
  16098. },
  16099. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16100. "additionalProperties": false
  16101. },
  16102. "SyncEventSessionNextCompactionEnded": {
  16103. "type": "object",
  16104. "properties": {
  16105. "type": {
  16106. "type": "string",
  16107. "enum": ["sync"]
  16108. },
  16109. "name": {
  16110. "type": "string",
  16111. "enum": ["session.next.compaction.ended.1"]
  16112. },
  16113. "id": {
  16114. "type": "string"
  16115. },
  16116. "seq": {
  16117. "type": "number"
  16118. },
  16119. "aggregateID": {
  16120. "type": "string",
  16121. "enum": ["sessionID"]
  16122. },
  16123. "data": {
  16124. "type": "object",
  16125. "properties": {
  16126. "timestamp": {
  16127. "type": "number"
  16128. },
  16129. "sessionID": {
  16130. "type": "string",
  16131. "pattern": "^ses"
  16132. },
  16133. "text": {
  16134. "type": "string"
  16135. },
  16136. "include": {
  16137. "type": "string"
  16138. }
  16139. },
  16140. "required": ["timestamp", "sessionID", "text"],
  16141. "additionalProperties": false
  16142. }
  16143. },
  16144. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16145. "additionalProperties": false
  16146. },
  16147. "SyncEventSessionNextToolProgress": {
  16148. "type": "object",
  16149. "properties": {
  16150. "type": {
  16151. "type": "string",
  16152. "enum": ["sync"]
  16153. },
  16154. "name": {
  16155. "type": "string",
  16156. "enum": ["session.next.tool.progress.1"]
  16157. },
  16158. "id": {
  16159. "type": "string"
  16160. },
  16161. "seq": {
  16162. "type": "number"
  16163. },
  16164. "aggregateID": {
  16165. "type": "string"
  16166. },
  16167. "data": {
  16168. "type": "object",
  16169. "properties": {
  16170. "timestamp": {
  16171. "type": "number"
  16172. },
  16173. "sessionID": {
  16174. "type": "string",
  16175. "pattern": "^ses"
  16176. },
  16177. "callID": {
  16178. "type": "string"
  16179. },
  16180. "structured": {
  16181. "type": "object"
  16182. },
  16183. "content": {
  16184. "type": "array",
  16185. "items": {
  16186. "anyOf": [
  16187. {
  16188. "$ref": "#/components/schemas/ToolTextContent"
  16189. },
  16190. {
  16191. "$ref": "#/components/schemas/ToolFileContent"
  16192. }
  16193. ]
  16194. }
  16195. }
  16196. },
  16197. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  16198. "additionalProperties": false
  16199. }
  16200. },
  16201. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16202. "additionalProperties": false
  16203. },
  16204. "EventServerInstanceDisposed": {
  16205. "type": "object",
  16206. "properties": {
  16207. "id": {
  16208. "type": "string"
  16209. },
  16210. "type": {
  16211. "type": "string",
  16212. "enum": ["server.instance.disposed"]
  16213. },
  16214. "properties": {
  16215. "type": "object",
  16216. "properties": {
  16217. "directory": {
  16218. "type": "string"
  16219. }
  16220. },
  16221. "required": ["directory"],
  16222. "additionalProperties": false
  16223. }
  16224. },
  16225. "required": ["id", "type", "properties"],
  16226. "additionalProperties": false
  16227. },
  16228. "EventFileEdited": {
  16229. "type": "object",
  16230. "properties": {
  16231. "id": {
  16232. "type": "string"
  16233. },
  16234. "type": {
  16235. "type": "string",
  16236. "enum": ["file.edited"]
  16237. },
  16238. "properties": {
  16239. "type": "object",
  16240. "properties": {
  16241. "file": {
  16242. "type": "string"
  16243. }
  16244. },
  16245. "required": ["file"],
  16246. "additionalProperties": false
  16247. }
  16248. },
  16249. "required": ["id", "type", "properties"],
  16250. "additionalProperties": false
  16251. },
  16252. "EventFileWatcherUpdated": {
  16253. "type": "object",
  16254. "properties": {
  16255. "id": {
  16256. "type": "string"
  16257. },
  16258. "type": {
  16259. "type": "string",
  16260. "enum": ["file.watcher.updated"]
  16261. },
  16262. "properties": {
  16263. "type": "object",
  16264. "properties": {
  16265. "file": {
  16266. "type": "string"
  16267. },
  16268. "event": {
  16269. "type": "string",
  16270. "enum": ["add", "change", "unlink"]
  16271. }
  16272. },
  16273. "required": ["file", "event"],
  16274. "additionalProperties": false
  16275. }
  16276. },
  16277. "required": ["id", "type", "properties"],
  16278. "additionalProperties": false
  16279. },
  16280. "EventLspClientDiagnostics": {
  16281. "type": "object",
  16282. "properties": {
  16283. "id": {
  16284. "type": "string"
  16285. },
  16286. "type": {
  16287. "type": "string",
  16288. "enum": ["lsp.client.diagnostics"]
  16289. },
  16290. "properties": {
  16291. "type": "object",
  16292. "properties": {
  16293. "serverID": {
  16294. "type": "string"
  16295. },
  16296. "path": {
  16297. "type": "string"
  16298. }
  16299. },
  16300. "required": ["serverID", "path"],
  16301. "additionalProperties": false
  16302. }
  16303. },
  16304. "required": ["id", "type", "properties"],
  16305. "additionalProperties": false
  16306. },
  16307. "EventLspUpdated": {
  16308. "type": "object",
  16309. "properties": {
  16310. "id": {
  16311. "type": "string"
  16312. },
  16313. "type": {
  16314. "type": "string",
  16315. "enum": ["lsp.updated"]
  16316. },
  16317. "properties": {
  16318. "type": "object",
  16319. "properties": {}
  16320. }
  16321. },
  16322. "required": ["id", "type", "properties"],
  16323. "additionalProperties": false
  16324. },
  16325. "EventMessagePartDelta": {
  16326. "type": "object",
  16327. "properties": {
  16328. "id": {
  16329. "type": "string"
  16330. },
  16331. "type": {
  16332. "type": "string",
  16333. "enum": ["message.part.delta"]
  16334. },
  16335. "properties": {
  16336. "type": "object",
  16337. "properties": {
  16338. "sessionID": {
  16339. "type": "string",
  16340. "pattern": "^ses"
  16341. },
  16342. "messageID": {
  16343. "type": "string",
  16344. "pattern": "^msg"
  16345. },
  16346. "partID": {
  16347. "type": "string",
  16348. "pattern": "^prt"
  16349. },
  16350. "field": {
  16351. "type": "string"
  16352. },
  16353. "delta": {
  16354. "type": "string"
  16355. }
  16356. },
  16357. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  16358. "additionalProperties": false
  16359. }
  16360. },
  16361. "required": ["id", "type", "properties"],
  16362. "additionalProperties": false
  16363. },
  16364. "EventPermissionAsked": {
  16365. "type": "object",
  16366. "properties": {
  16367. "id": {
  16368. "type": "string"
  16369. },
  16370. "type": {
  16371. "type": "string",
  16372. "enum": ["permission.asked"]
  16373. },
  16374. "properties": {
  16375. "$ref": "#/components/schemas/PermissionRequest"
  16376. }
  16377. },
  16378. "required": ["id", "type", "properties"],
  16379. "additionalProperties": false
  16380. },
  16381. "EventPermissionReplied": {
  16382. "type": "object",
  16383. "properties": {
  16384. "id": {
  16385. "type": "string"
  16386. },
  16387. "type": {
  16388. "type": "string",
  16389. "enum": ["permission.replied"]
  16390. },
  16391. "properties": {
  16392. "type": "object",
  16393. "properties": {
  16394. "sessionID": {
  16395. "type": "string",
  16396. "pattern": "^ses"
  16397. },
  16398. "requestID": {
  16399. "type": "string",
  16400. "pattern": "^per"
  16401. },
  16402. "reply": {
  16403. "type": "string",
  16404. "enum": ["once", "always", "reject"]
  16405. }
  16406. },
  16407. "required": ["sessionID", "requestID", "reply"],
  16408. "additionalProperties": false
  16409. }
  16410. },
  16411. "required": ["id", "type", "properties"],
  16412. "additionalProperties": false
  16413. },
  16414. "EventSessionDiff": {
  16415. "type": "object",
  16416. "properties": {
  16417. "id": {
  16418. "type": "string"
  16419. },
  16420. "type": {
  16421. "type": "string",
  16422. "enum": ["session.diff"]
  16423. },
  16424. "properties": {
  16425. "type": "object",
  16426. "properties": {
  16427. "sessionID": {
  16428. "type": "string",
  16429. "pattern": "^ses"
  16430. },
  16431. "diff": {
  16432. "type": "array",
  16433. "items": {
  16434. "$ref": "#/components/schemas/SnapshotFileDiff"
  16435. }
  16436. }
  16437. },
  16438. "required": ["sessionID", "diff"],
  16439. "additionalProperties": false
  16440. }
  16441. },
  16442. "required": ["id", "type", "properties"],
  16443. "additionalProperties": false
  16444. },
  16445. "EventSessionError": {
  16446. "type": "object",
  16447. "properties": {
  16448. "id": {
  16449. "type": "string"
  16450. },
  16451. "type": {
  16452. "type": "string",
  16453. "enum": ["session.error"]
  16454. },
  16455. "properties": {
  16456. "type": "object",
  16457. "properties": {
  16458. "sessionID": {
  16459. "type": "string",
  16460. "pattern": "^ses"
  16461. },
  16462. "error": {
  16463. "anyOf": [
  16464. {
  16465. "$ref": "#/components/schemas/ProviderAuthError"
  16466. },
  16467. {
  16468. "$ref": "#/components/schemas/UnknownError"
  16469. },
  16470. {
  16471. "$ref": "#/components/schemas/MessageOutputLengthError"
  16472. },
  16473. {
  16474. "$ref": "#/components/schemas/MessageAbortedError"
  16475. },
  16476. {
  16477. "$ref": "#/components/schemas/StructuredOutputError"
  16478. },
  16479. {
  16480. "$ref": "#/components/schemas/ContextOverflowError"
  16481. },
  16482. {
  16483. "$ref": "#/components/schemas/APIError"
  16484. }
  16485. ]
  16486. }
  16487. },
  16488. "additionalProperties": false
  16489. }
  16490. },
  16491. "required": ["id", "type", "properties"],
  16492. "additionalProperties": false
  16493. },
  16494. "EventQuestionAsked": {
  16495. "type": "object",
  16496. "properties": {
  16497. "id": {
  16498. "type": "string"
  16499. },
  16500. "type": {
  16501. "type": "string",
  16502. "enum": ["question.asked"]
  16503. },
  16504. "properties": {
  16505. "$ref": "#/components/schemas/QuestionRequest"
  16506. }
  16507. },
  16508. "required": ["id", "type", "properties"],
  16509. "additionalProperties": false
  16510. },
  16511. "EventQuestionReplied": {
  16512. "type": "object",
  16513. "properties": {
  16514. "id": {
  16515. "type": "string"
  16516. },
  16517. "type": {
  16518. "type": "string",
  16519. "enum": ["question.replied"]
  16520. },
  16521. "properties": {
  16522. "$ref": "#/components/schemas/QuestionReplied"
  16523. }
  16524. },
  16525. "required": ["id", "type", "properties"],
  16526. "additionalProperties": false
  16527. },
  16528. "EventQuestionRejected": {
  16529. "type": "object",
  16530. "properties": {
  16531. "id": {
  16532. "type": "string"
  16533. },
  16534. "type": {
  16535. "type": "string",
  16536. "enum": ["question.rejected"]
  16537. },
  16538. "properties": {
  16539. "$ref": "#/components/schemas/QuestionRejected"
  16540. }
  16541. },
  16542. "required": ["id", "type", "properties"],
  16543. "additionalProperties": false
  16544. },
  16545. "EventTodoUpdated": {
  16546. "type": "object",
  16547. "properties": {
  16548. "id": {
  16549. "type": "string"
  16550. },
  16551. "type": {
  16552. "type": "string",
  16553. "enum": ["todo.updated"]
  16554. },
  16555. "properties": {
  16556. "type": "object",
  16557. "properties": {
  16558. "sessionID": {
  16559. "type": "string",
  16560. "pattern": "^ses"
  16561. },
  16562. "todos": {
  16563. "type": "array",
  16564. "items": {
  16565. "$ref": "#/components/schemas/Todo"
  16566. }
  16567. }
  16568. },
  16569. "required": ["sessionID", "todos"],
  16570. "additionalProperties": false
  16571. }
  16572. },
  16573. "required": ["id", "type", "properties"],
  16574. "additionalProperties": false
  16575. },
  16576. "EventSessionStatus": {
  16577. "type": "object",
  16578. "properties": {
  16579. "id": {
  16580. "type": "string"
  16581. },
  16582. "type": {
  16583. "type": "string",
  16584. "enum": ["session.status"]
  16585. },
  16586. "properties": {
  16587. "type": "object",
  16588. "properties": {
  16589. "sessionID": {
  16590. "type": "string",
  16591. "pattern": "^ses"
  16592. },
  16593. "status": {
  16594. "$ref": "#/components/schemas/SessionStatus"
  16595. }
  16596. },
  16597. "required": ["sessionID", "status"],
  16598. "additionalProperties": false
  16599. }
  16600. },
  16601. "required": ["id", "type", "properties"],
  16602. "additionalProperties": false
  16603. },
  16604. "EventSessionIdle": {
  16605. "type": "object",
  16606. "properties": {
  16607. "id": {
  16608. "type": "string"
  16609. },
  16610. "type": {
  16611. "type": "string",
  16612. "enum": ["session.idle"]
  16613. },
  16614. "properties": {
  16615. "type": "object",
  16616. "properties": {
  16617. "sessionID": {
  16618. "type": "string",
  16619. "pattern": "^ses"
  16620. }
  16621. },
  16622. "required": ["sessionID"],
  16623. "additionalProperties": false
  16624. }
  16625. },
  16626. "required": ["id", "type", "properties"],
  16627. "additionalProperties": false
  16628. },
  16629. "EventMcpToolsChanged": {
  16630. "type": "object",
  16631. "properties": {
  16632. "id": {
  16633. "type": "string"
  16634. },
  16635. "type": {
  16636. "type": "string",
  16637. "enum": ["mcp.tools.changed"]
  16638. },
  16639. "properties": {
  16640. "type": "object",
  16641. "properties": {
  16642. "server": {
  16643. "type": "string"
  16644. }
  16645. },
  16646. "required": ["server"],
  16647. "additionalProperties": false
  16648. }
  16649. },
  16650. "required": ["id", "type", "properties"],
  16651. "additionalProperties": false
  16652. },
  16653. "EventMcpBrowserOpenFailed": {
  16654. "type": "object",
  16655. "properties": {
  16656. "id": {
  16657. "type": "string"
  16658. },
  16659. "type": {
  16660. "type": "string",
  16661. "enum": ["mcp.browser.open.failed"]
  16662. },
  16663. "properties": {
  16664. "type": "object",
  16665. "properties": {
  16666. "mcpName": {
  16667. "type": "string"
  16668. },
  16669. "url": {
  16670. "type": "string"
  16671. }
  16672. },
  16673. "required": ["mcpName", "url"],
  16674. "additionalProperties": false
  16675. }
  16676. },
  16677. "required": ["id", "type", "properties"],
  16678. "additionalProperties": false
  16679. },
  16680. "EventCommandExecuted": {
  16681. "type": "object",
  16682. "properties": {
  16683. "id": {
  16684. "type": "string"
  16685. },
  16686. "type": {
  16687. "type": "string",
  16688. "enum": ["command.executed"]
  16689. },
  16690. "properties": {
  16691. "type": "object",
  16692. "properties": {
  16693. "name": {
  16694. "type": "string"
  16695. },
  16696. "sessionID": {
  16697. "type": "string",
  16698. "pattern": "^ses"
  16699. },
  16700. "arguments": {
  16701. "type": "string"
  16702. },
  16703. "messageID": {
  16704. "type": "string",
  16705. "pattern": "^msg"
  16706. }
  16707. },
  16708. "required": ["name", "sessionID", "arguments", "messageID"],
  16709. "additionalProperties": false
  16710. }
  16711. },
  16712. "required": ["id", "type", "properties"],
  16713. "additionalProperties": false
  16714. },
  16715. "EventProjectUpdated": {
  16716. "type": "object",
  16717. "properties": {
  16718. "id": {
  16719. "type": "string"
  16720. },
  16721. "type": {
  16722. "type": "string",
  16723. "enum": ["project.updated"]
  16724. },
  16725. "properties": {
  16726. "$ref": "#/components/schemas/Project"
  16727. }
  16728. },
  16729. "required": ["id", "type", "properties"],
  16730. "additionalProperties": false
  16731. },
  16732. "EventSessionCompacted": {
  16733. "type": "object",
  16734. "properties": {
  16735. "id": {
  16736. "type": "string"
  16737. },
  16738. "type": {
  16739. "type": "string",
  16740. "enum": ["session.compacted"]
  16741. },
  16742. "properties": {
  16743. "type": "object",
  16744. "properties": {
  16745. "sessionID": {
  16746. "type": "string",
  16747. "pattern": "^ses"
  16748. }
  16749. },
  16750. "required": ["sessionID"],
  16751. "additionalProperties": false
  16752. }
  16753. },
  16754. "required": ["id", "type", "properties"],
  16755. "additionalProperties": false
  16756. },
  16757. "EventVcsBranchUpdated": {
  16758. "type": "object",
  16759. "properties": {
  16760. "id": {
  16761. "type": "string"
  16762. },
  16763. "type": {
  16764. "type": "string",
  16765. "enum": ["vcs.branch.updated"]
  16766. },
  16767. "properties": {
  16768. "type": "object",
  16769. "properties": {
  16770. "branch": {
  16771. "type": "string"
  16772. }
  16773. },
  16774. "additionalProperties": false
  16775. }
  16776. },
  16777. "required": ["id", "type", "properties"],
  16778. "additionalProperties": false
  16779. },
  16780. "EventWorkspaceReady": {
  16781. "type": "object",
  16782. "properties": {
  16783. "id": {
  16784. "type": "string"
  16785. },
  16786. "type": {
  16787. "type": "string",
  16788. "enum": ["workspace.ready"]
  16789. },
  16790. "properties": {
  16791. "type": "object",
  16792. "properties": {
  16793. "name": {
  16794. "type": "string"
  16795. }
  16796. },
  16797. "required": ["name"],
  16798. "additionalProperties": false
  16799. }
  16800. },
  16801. "required": ["id", "type", "properties"],
  16802. "additionalProperties": false
  16803. },
  16804. "EventWorkspaceFailed": {
  16805. "type": "object",
  16806. "properties": {
  16807. "id": {
  16808. "type": "string"
  16809. },
  16810. "type": {
  16811. "type": "string",
  16812. "enum": ["workspace.failed"]
  16813. },
  16814. "properties": {
  16815. "type": "object",
  16816. "properties": {
  16817. "message": {
  16818. "type": "string"
  16819. }
  16820. },
  16821. "required": ["message"],
  16822. "additionalProperties": false
  16823. }
  16824. },
  16825. "required": ["id", "type", "properties"],
  16826. "additionalProperties": false
  16827. },
  16828. "EventWorkspaceStatus": {
  16829. "type": "object",
  16830. "properties": {
  16831. "id": {
  16832. "type": "string"
  16833. },
  16834. "type": {
  16835. "type": "string",
  16836. "enum": ["workspace.status"]
  16837. },
  16838. "properties": {
  16839. "type": "object",
  16840. "properties": {
  16841. "workspaceID": {
  16842. "type": "string",
  16843. "pattern": "^wrk"
  16844. },
  16845. "status": {
  16846. "type": "string",
  16847. "enum": ["connected", "connecting", "disconnected", "error"]
  16848. }
  16849. },
  16850. "required": ["workspaceID", "status"],
  16851. "additionalProperties": false
  16852. }
  16853. },
  16854. "required": ["id", "type", "properties"],
  16855. "additionalProperties": false
  16856. },
  16857. "EventWorktreeReady": {
  16858. "type": "object",
  16859. "properties": {
  16860. "id": {
  16861. "type": "string"
  16862. },
  16863. "type": {
  16864. "type": "string",
  16865. "enum": ["worktree.ready"]
  16866. },
  16867. "properties": {
  16868. "type": "object",
  16869. "properties": {
  16870. "name": {
  16871. "type": "string"
  16872. },
  16873. "branch": {
  16874. "type": "string"
  16875. }
  16876. },
  16877. "required": ["name"],
  16878. "additionalProperties": false
  16879. }
  16880. },
  16881. "required": ["id", "type", "properties"],
  16882. "additionalProperties": false
  16883. },
  16884. "EventWorktreeFailed": {
  16885. "type": "object",
  16886. "properties": {
  16887. "id": {
  16888. "type": "string"
  16889. },
  16890. "type": {
  16891. "type": "string",
  16892. "enum": ["worktree.failed"]
  16893. },
  16894. "properties": {
  16895. "type": "object",
  16896. "properties": {
  16897. "message": {
  16898. "type": "string"
  16899. }
  16900. },
  16901. "required": ["message"],
  16902. "additionalProperties": false
  16903. }
  16904. },
  16905. "required": ["id", "type", "properties"],
  16906. "additionalProperties": false
  16907. },
  16908. "EventPtyCreated": {
  16909. "type": "object",
  16910. "properties": {
  16911. "id": {
  16912. "type": "string"
  16913. },
  16914. "type": {
  16915. "type": "string",
  16916. "enum": ["pty.created"]
  16917. },
  16918. "properties": {
  16919. "type": "object",
  16920. "properties": {
  16921. "info": {
  16922. "$ref": "#/components/schemas/Pty"
  16923. }
  16924. },
  16925. "required": ["info"],
  16926. "additionalProperties": false
  16927. }
  16928. },
  16929. "required": ["id", "type", "properties"],
  16930. "additionalProperties": false
  16931. },
  16932. "EventPtyUpdated": {
  16933. "type": "object",
  16934. "properties": {
  16935. "id": {
  16936. "type": "string"
  16937. },
  16938. "type": {
  16939. "type": "string",
  16940. "enum": ["pty.updated"]
  16941. },
  16942. "properties": {
  16943. "type": "object",
  16944. "properties": {
  16945. "info": {
  16946. "$ref": "#/components/schemas/Pty"
  16947. }
  16948. },
  16949. "required": ["info"],
  16950. "additionalProperties": false
  16951. }
  16952. },
  16953. "required": ["id", "type", "properties"],
  16954. "additionalProperties": false
  16955. },
  16956. "EventPtyExited": {
  16957. "type": "object",
  16958. "properties": {
  16959. "id": {
  16960. "type": "string"
  16961. },
  16962. "type": {
  16963. "type": "string",
  16964. "enum": ["pty.exited"]
  16965. },
  16966. "properties": {
  16967. "type": "object",
  16968. "properties": {
  16969. "id": {
  16970. "type": "string",
  16971. "pattern": "^pty"
  16972. },
  16973. "exitCode": {
  16974. "type": "integer",
  16975. "minimum": 0
  16976. }
  16977. },
  16978. "required": ["id", "exitCode"],
  16979. "additionalProperties": false
  16980. }
  16981. },
  16982. "required": ["id", "type", "properties"],
  16983. "additionalProperties": false
  16984. },
  16985. "EventPtyDeleted": {
  16986. "type": "object",
  16987. "properties": {
  16988. "id": {
  16989. "type": "string"
  16990. },
  16991. "type": {
  16992. "type": "string",
  16993. "enum": ["pty.deleted"]
  16994. },
  16995. "properties": {
  16996. "type": "object",
  16997. "properties": {
  16998. "id": {
  16999. "type": "string",
  17000. "pattern": "^pty"
  17001. }
  17002. },
  17003. "required": ["id"],
  17004. "additionalProperties": false
  17005. }
  17006. },
  17007. "required": ["id", "type", "properties"],
  17008. "additionalProperties": false
  17009. },
  17010. "EventInstallationUpdated": {
  17011. "type": "object",
  17012. "properties": {
  17013. "id": {
  17014. "type": "string"
  17015. },
  17016. "type": {
  17017. "type": "string",
  17018. "enum": ["installation.updated"]
  17019. },
  17020. "properties": {
  17021. "type": "object",
  17022. "properties": {
  17023. "version": {
  17024. "type": "string"
  17025. }
  17026. },
  17027. "required": ["version"],
  17028. "additionalProperties": false
  17029. }
  17030. },
  17031. "required": ["id", "type", "properties"],
  17032. "additionalProperties": false
  17033. },
  17034. "EventInstallationUpdate-available": {
  17035. "type": "object",
  17036. "properties": {
  17037. "id": {
  17038. "type": "string"
  17039. },
  17040. "type": {
  17041. "type": "string",
  17042. "enum": ["installation.update-available"]
  17043. },
  17044. "properties": {
  17045. "type": "object",
  17046. "properties": {
  17047. "version": {
  17048. "type": "string"
  17049. }
  17050. },
  17051. "required": ["version"],
  17052. "additionalProperties": false
  17053. }
  17054. },
  17055. "required": ["id", "type", "properties"],
  17056. "additionalProperties": false
  17057. },
  17058. "EventServerConnected": {
  17059. "type": "object",
  17060. "properties": {
  17061. "id": {
  17062. "type": "string"
  17063. },
  17064. "type": {
  17065. "type": "string",
  17066. "enum": ["server.connected"]
  17067. },
  17068. "properties": {
  17069. "type": "object",
  17070. "properties": {}
  17071. }
  17072. },
  17073. "required": ["id", "type", "properties"],
  17074. "additionalProperties": false
  17075. },
  17076. "EventGlobalDisposed": {
  17077. "type": "object",
  17078. "properties": {
  17079. "id": {
  17080. "type": "string"
  17081. },
  17082. "type": {
  17083. "type": "string",
  17084. "enum": ["global.disposed"]
  17085. },
  17086. "properties": {
  17087. "type": "object",
  17088. "properties": {}
  17089. }
  17090. },
  17091. "required": ["id", "type", "properties"],
  17092. "additionalProperties": false
  17093. },
  17094. "ModelV2Info": {
  17095. "type": "object",
  17096. "properties": {
  17097. "id": {
  17098. "type": "string"
  17099. },
  17100. "apiID": {
  17101. "type": "string"
  17102. },
  17103. "providerID": {
  17104. "type": "string"
  17105. },
  17106. "family": {
  17107. "type": "string"
  17108. },
  17109. "name": {
  17110. "type": "string"
  17111. },
  17112. "endpoint": {
  17113. "anyOf": [
  17114. {
  17115. "type": "object",
  17116. "properties": {
  17117. "type": {
  17118. "type": "string",
  17119. "enum": ["unknown"]
  17120. }
  17121. },
  17122. "required": ["type"],
  17123. "additionalProperties": false
  17124. },
  17125. {
  17126. "type": "object",
  17127. "properties": {
  17128. "type": {
  17129. "type": "string",
  17130. "enum": ["openai/responses"]
  17131. },
  17132. "url": {
  17133. "type": "string"
  17134. },
  17135. "websocket": {
  17136. "type": "boolean"
  17137. }
  17138. },
  17139. "required": ["type", "url"],
  17140. "additionalProperties": false
  17141. },
  17142. {
  17143. "type": "object",
  17144. "properties": {
  17145. "type": {
  17146. "type": "string",
  17147. "enum": ["openai/completions"]
  17148. },
  17149. "url": {
  17150. "type": "string"
  17151. },
  17152. "reasoning": {
  17153. "anyOf": [
  17154. {
  17155. "type": "object",
  17156. "properties": {
  17157. "type": {
  17158. "type": "string",
  17159. "enum": ["reasoning_content"]
  17160. }
  17161. },
  17162. "required": ["type"],
  17163. "additionalProperties": false
  17164. },
  17165. {
  17166. "type": "object",
  17167. "properties": {
  17168. "type": {
  17169. "type": "string",
  17170. "enum": ["reasoning_details"]
  17171. }
  17172. },
  17173. "required": ["type"],
  17174. "additionalProperties": false
  17175. }
  17176. ]
  17177. }
  17178. },
  17179. "required": ["type", "url"],
  17180. "additionalProperties": false
  17181. },
  17182. {
  17183. "type": "object",
  17184. "properties": {
  17185. "type": {
  17186. "type": "string",
  17187. "enum": ["anthropic/messages"]
  17188. },
  17189. "url": {
  17190. "type": "string"
  17191. }
  17192. },
  17193. "required": ["type", "url"],
  17194. "additionalProperties": false
  17195. },
  17196. {
  17197. "type": "object",
  17198. "properties": {
  17199. "type": {
  17200. "type": "string",
  17201. "enum": ["aisdk"]
  17202. },
  17203. "package": {
  17204. "type": "string"
  17205. },
  17206. "url": {
  17207. "type": "string"
  17208. }
  17209. },
  17210. "required": ["type", "package"],
  17211. "additionalProperties": false
  17212. }
  17213. ]
  17214. },
  17215. "capabilities": {
  17216. "type": "object",
  17217. "properties": {
  17218. "tools": {
  17219. "type": "boolean"
  17220. },
  17221. "input": {
  17222. "type": "array",
  17223. "items": {
  17224. "type": "string"
  17225. }
  17226. },
  17227. "output": {
  17228. "type": "array",
  17229. "items": {
  17230. "type": "string"
  17231. }
  17232. }
  17233. },
  17234. "required": ["tools", "input", "output"],
  17235. "additionalProperties": false
  17236. },
  17237. "options": {
  17238. "type": "object",
  17239. "properties": {
  17240. "headers": {
  17241. "type": "object",
  17242. "additionalProperties": {
  17243. "type": "string"
  17244. }
  17245. },
  17246. "body": {
  17247. "type": "object"
  17248. },
  17249. "aisdk": {
  17250. "type": "object",
  17251. "properties": {
  17252. "provider": {
  17253. "type": "object"
  17254. },
  17255. "request": {
  17256. "type": "object"
  17257. }
  17258. },
  17259. "required": ["provider", "request"],
  17260. "additionalProperties": false
  17261. },
  17262. "variant": {
  17263. "type": "string"
  17264. }
  17265. },
  17266. "required": ["headers", "body", "aisdk"],
  17267. "additionalProperties": false
  17268. },
  17269. "variants": {
  17270. "type": "array",
  17271. "items": {
  17272. "type": "object",
  17273. "properties": {
  17274. "id": {
  17275. "type": "string"
  17276. },
  17277. "headers": {
  17278. "type": "object",
  17279. "additionalProperties": {
  17280. "type": "string"
  17281. }
  17282. },
  17283. "body": {
  17284. "type": "object"
  17285. },
  17286. "aisdk": {
  17287. "type": "object",
  17288. "properties": {
  17289. "provider": {
  17290. "type": "object"
  17291. },
  17292. "request": {
  17293. "type": "object"
  17294. }
  17295. },
  17296. "required": ["provider", "request"],
  17297. "additionalProperties": false
  17298. }
  17299. },
  17300. "required": ["id", "headers", "body", "aisdk"],
  17301. "additionalProperties": false
  17302. }
  17303. },
  17304. "time": {
  17305. "type": "object",
  17306. "properties": {
  17307. "released": {
  17308. "anyOf": [
  17309. {
  17310. "type": "number"
  17311. },
  17312. {
  17313. "type": "string",
  17314. "enum": ["NaN"]
  17315. },
  17316. {
  17317. "type": "string",
  17318. "enum": ["Infinity"]
  17319. },
  17320. {
  17321. "type": "string",
  17322. "enum": ["-Infinity"]
  17323. },
  17324. {
  17325. "type": "string",
  17326. "enum": ["Infinity", "-Infinity", "NaN"]
  17327. }
  17328. ]
  17329. }
  17330. },
  17331. "required": ["released"],
  17332. "additionalProperties": false
  17333. },
  17334. "cost": {
  17335. "type": "array",
  17336. "items": {
  17337. "type": "object",
  17338. "properties": {
  17339. "tier": {
  17340. "type": "object",
  17341. "properties": {
  17342. "type": {
  17343. "type": "string",
  17344. "enum": ["context"]
  17345. },
  17346. "size": {
  17347. "type": "integer"
  17348. }
  17349. },
  17350. "required": ["type", "size"],
  17351. "additionalProperties": false
  17352. },
  17353. "input": {
  17354. "type": "number"
  17355. },
  17356. "output": {
  17357. "type": "number"
  17358. },
  17359. "cache": {
  17360. "type": "object",
  17361. "properties": {
  17362. "read": {
  17363. "type": "number"
  17364. },
  17365. "write": {
  17366. "type": "number"
  17367. }
  17368. },
  17369. "required": ["read", "write"],
  17370. "additionalProperties": false
  17371. }
  17372. },
  17373. "required": ["input", "output", "cache"],
  17374. "additionalProperties": false
  17375. }
  17376. },
  17377. "status": {
  17378. "type": "string",
  17379. "enum": ["alpha", "beta", "deprecated", "active"]
  17380. },
  17381. "enabled": {
  17382. "type": "boolean"
  17383. },
  17384. "limit": {
  17385. "type": "object",
  17386. "properties": {
  17387. "context": {
  17388. "type": "integer"
  17389. },
  17390. "input": {
  17391. "type": "integer"
  17392. },
  17393. "output": {
  17394. "type": "integer"
  17395. }
  17396. },
  17397. "required": ["context", "output"],
  17398. "additionalProperties": false
  17399. }
  17400. },
  17401. "required": [
  17402. "id",
  17403. "apiID",
  17404. "providerID",
  17405. "name",
  17406. "endpoint",
  17407. "capabilities",
  17408. "options",
  17409. "variants",
  17410. "time",
  17411. "cost",
  17412. "status",
  17413. "enabled",
  17414. "limit"
  17415. ],
  17416. "additionalProperties": false
  17417. },
  17418. "EventCatalogModelUpdated": {
  17419. "type": "object",
  17420. "properties": {
  17421. "id": {
  17422. "type": "string"
  17423. },
  17424. "type": {
  17425. "type": "string",
  17426. "enum": ["catalog.model.updated"]
  17427. },
  17428. "properties": {
  17429. "type": "object",
  17430. "properties": {
  17431. "model": {
  17432. "$ref": "#/components/schemas/ModelV2Info"
  17433. }
  17434. },
  17435. "required": ["model"],
  17436. "additionalProperties": false
  17437. }
  17438. },
  17439. "required": ["id", "type", "properties"],
  17440. "additionalProperties": false
  17441. },
  17442. "EventSessionNextAgentSwitched": {
  17443. "type": "object",
  17444. "properties": {
  17445. "id": {
  17446. "type": "string"
  17447. },
  17448. "type": {
  17449. "type": "string",
  17450. "enum": ["session.next.agent.switched"]
  17451. },
  17452. "properties": {
  17453. "type": "object",
  17454. "properties": {
  17455. "timestamp": {
  17456. "type": "number"
  17457. },
  17458. "sessionID": {
  17459. "type": "string",
  17460. "pattern": "^ses"
  17461. },
  17462. "agent": {
  17463. "type": "string"
  17464. }
  17465. },
  17466. "required": ["timestamp", "sessionID", "agent"],
  17467. "additionalProperties": false
  17468. }
  17469. },
  17470. "required": ["id", "type", "properties"],
  17471. "additionalProperties": false
  17472. },
  17473. "EventSessionNextModelSwitched": {
  17474. "type": "object",
  17475. "properties": {
  17476. "id": {
  17477. "type": "string"
  17478. },
  17479. "type": {
  17480. "type": "string",
  17481. "enum": ["session.next.model.switched"]
  17482. },
  17483. "properties": {
  17484. "type": "object",
  17485. "properties": {
  17486. "timestamp": {
  17487. "type": "number"
  17488. },
  17489. "sessionID": {
  17490. "type": "string",
  17491. "pattern": "^ses"
  17492. },
  17493. "model": {
  17494. "type": "object",
  17495. "properties": {
  17496. "id": {
  17497. "type": "string"
  17498. },
  17499. "providerID": {
  17500. "type": "string"
  17501. },
  17502. "variant": {
  17503. "type": "string"
  17504. }
  17505. },
  17506. "required": ["id", "providerID", "variant"],
  17507. "additionalProperties": false
  17508. }
  17509. },
  17510. "required": ["timestamp", "sessionID", "model"],
  17511. "additionalProperties": false
  17512. }
  17513. },
  17514. "required": ["id", "type", "properties"],
  17515. "additionalProperties": false
  17516. },
  17517. "PromptSource": {
  17518. "type": "object",
  17519. "properties": {
  17520. "start": {
  17521. "type": "number"
  17522. },
  17523. "end": {
  17524. "type": "number"
  17525. },
  17526. "text": {
  17527. "type": "string"
  17528. }
  17529. },
  17530. "required": ["start", "end", "text"],
  17531. "additionalProperties": false
  17532. },
  17533. "PromptFileAttachment": {
  17534. "type": "object",
  17535. "properties": {
  17536. "uri": {
  17537. "type": "string"
  17538. },
  17539. "mime": {
  17540. "type": "string"
  17541. },
  17542. "name": {
  17543. "type": "string"
  17544. },
  17545. "description": {
  17546. "type": "string"
  17547. },
  17548. "source": {
  17549. "$ref": "#/components/schemas/PromptSource"
  17550. }
  17551. },
  17552. "required": ["uri", "mime"],
  17553. "additionalProperties": false
  17554. },
  17555. "PromptAgentAttachment": {
  17556. "type": "object",
  17557. "properties": {
  17558. "name": {
  17559. "type": "string"
  17560. },
  17561. "source": {
  17562. "$ref": "#/components/schemas/PromptSource"
  17563. }
  17564. },
  17565. "required": ["name"],
  17566. "additionalProperties": false
  17567. },
  17568. "PromptReferenceAttachment": {
  17569. "type": "object",
  17570. "properties": {
  17571. "name": {
  17572. "type": "string"
  17573. },
  17574. "kind": {
  17575. "type": "string",
  17576. "enum": ["local", "git", "invalid"]
  17577. },
  17578. "uri": {
  17579. "type": "string"
  17580. },
  17581. "repository": {
  17582. "type": "string"
  17583. },
  17584. "branch": {
  17585. "type": "string"
  17586. },
  17587. "target": {
  17588. "type": "string"
  17589. },
  17590. "targetUri": {
  17591. "type": "string"
  17592. },
  17593. "problem": {
  17594. "type": "string"
  17595. },
  17596. "source": {
  17597. "$ref": "#/components/schemas/PromptSource"
  17598. }
  17599. },
  17600. "required": ["name", "kind"],
  17601. "additionalProperties": false
  17602. },
  17603. "EventSessionNextPrompted": {
  17604. "type": "object",
  17605. "properties": {
  17606. "id": {
  17607. "type": "string"
  17608. },
  17609. "type": {
  17610. "type": "string",
  17611. "enum": ["session.next.prompted"]
  17612. },
  17613. "properties": {
  17614. "type": "object",
  17615. "properties": {
  17616. "timestamp": {
  17617. "type": "number"
  17618. },
  17619. "sessionID": {
  17620. "type": "string",
  17621. "pattern": "^ses"
  17622. },
  17623. "prompt": {
  17624. "$ref": "#/components/schemas/Prompt"
  17625. }
  17626. },
  17627. "required": ["timestamp", "sessionID", "prompt"],
  17628. "additionalProperties": false
  17629. }
  17630. },
  17631. "required": ["id", "type", "properties"],
  17632. "additionalProperties": false
  17633. },
  17634. "EventSessionNextSynthetic": {
  17635. "type": "object",
  17636. "properties": {
  17637. "id": {
  17638. "type": "string"
  17639. },
  17640. "type": {
  17641. "type": "string",
  17642. "enum": ["session.next.synthetic"]
  17643. },
  17644. "properties": {
  17645. "type": "object",
  17646. "properties": {
  17647. "timestamp": {
  17648. "type": "number"
  17649. },
  17650. "sessionID": {
  17651. "type": "string",
  17652. "pattern": "^ses"
  17653. },
  17654. "text": {
  17655. "type": "string"
  17656. }
  17657. },
  17658. "required": ["timestamp", "sessionID", "text"],
  17659. "additionalProperties": false
  17660. }
  17661. },
  17662. "required": ["id", "type", "properties"],
  17663. "additionalProperties": false
  17664. },
  17665. "EventSessionNextShellStarted": {
  17666. "type": "object",
  17667. "properties": {
  17668. "id": {
  17669. "type": "string"
  17670. },
  17671. "type": {
  17672. "type": "string",
  17673. "enum": ["session.next.shell.started"]
  17674. },
  17675. "properties": {
  17676. "type": "object",
  17677. "properties": {
  17678. "timestamp": {
  17679. "type": "number"
  17680. },
  17681. "sessionID": {
  17682. "type": "string",
  17683. "pattern": "^ses"
  17684. },
  17685. "callID": {
  17686. "type": "string"
  17687. },
  17688. "command": {
  17689. "type": "string"
  17690. }
  17691. },
  17692. "required": ["timestamp", "sessionID", "callID", "command"],
  17693. "additionalProperties": false
  17694. }
  17695. },
  17696. "required": ["id", "type", "properties"],
  17697. "additionalProperties": false
  17698. },
  17699. "EventSessionNextShellEnded": {
  17700. "type": "object",
  17701. "properties": {
  17702. "id": {
  17703. "type": "string"
  17704. },
  17705. "type": {
  17706. "type": "string",
  17707. "enum": ["session.next.shell.ended"]
  17708. },
  17709. "properties": {
  17710. "type": "object",
  17711. "properties": {
  17712. "timestamp": {
  17713. "type": "number"
  17714. },
  17715. "sessionID": {
  17716. "type": "string",
  17717. "pattern": "^ses"
  17718. },
  17719. "callID": {
  17720. "type": "string"
  17721. },
  17722. "output": {
  17723. "type": "string"
  17724. }
  17725. },
  17726. "required": ["timestamp", "sessionID", "callID", "output"],
  17727. "additionalProperties": false
  17728. }
  17729. },
  17730. "required": ["id", "type", "properties"],
  17731. "additionalProperties": false
  17732. },
  17733. "EventSessionNextStepStarted": {
  17734. "type": "object",
  17735. "properties": {
  17736. "id": {
  17737. "type": "string"
  17738. },
  17739. "type": {
  17740. "type": "string",
  17741. "enum": ["session.next.step.started"]
  17742. },
  17743. "properties": {
  17744. "type": "object",
  17745. "properties": {
  17746. "timestamp": {
  17747. "type": "number"
  17748. },
  17749. "sessionID": {
  17750. "type": "string",
  17751. "pattern": "^ses"
  17752. },
  17753. "agent": {
  17754. "type": "string"
  17755. },
  17756. "model": {
  17757. "type": "object",
  17758. "properties": {
  17759. "id": {
  17760. "type": "string"
  17761. },
  17762. "providerID": {
  17763. "type": "string"
  17764. },
  17765. "variant": {
  17766. "type": "string"
  17767. }
  17768. },
  17769. "required": ["id", "providerID", "variant"],
  17770. "additionalProperties": false
  17771. },
  17772. "snapshot": {
  17773. "type": "string"
  17774. }
  17775. },
  17776. "required": ["timestamp", "sessionID", "agent", "model"],
  17777. "additionalProperties": false
  17778. }
  17779. },
  17780. "required": ["id", "type", "properties"],
  17781. "additionalProperties": false
  17782. },
  17783. "EventSessionNextStepEnded": {
  17784. "type": "object",
  17785. "properties": {
  17786. "id": {
  17787. "type": "string"
  17788. },
  17789. "type": {
  17790. "type": "string",
  17791. "enum": ["session.next.step.ended"]
  17792. },
  17793. "properties": {
  17794. "type": "object",
  17795. "properties": {
  17796. "timestamp": {
  17797. "type": "number"
  17798. },
  17799. "sessionID": {
  17800. "type": "string",
  17801. "pattern": "^ses"
  17802. },
  17803. "finish": {
  17804. "type": "string"
  17805. },
  17806. "cost": {
  17807. "type": "number"
  17808. },
  17809. "tokens": {
  17810. "type": "object",
  17811. "properties": {
  17812. "input": {
  17813. "type": "number"
  17814. },
  17815. "output": {
  17816. "type": "number"
  17817. },
  17818. "reasoning": {
  17819. "type": "number"
  17820. },
  17821. "cache": {
  17822. "type": "object",
  17823. "properties": {
  17824. "read": {
  17825. "type": "number"
  17826. },
  17827. "write": {
  17828. "type": "number"
  17829. }
  17830. },
  17831. "required": ["read", "write"],
  17832. "additionalProperties": false
  17833. }
  17834. },
  17835. "required": ["input", "output", "reasoning", "cache"],
  17836. "additionalProperties": false
  17837. },
  17838. "snapshot": {
  17839. "type": "string"
  17840. }
  17841. },
  17842. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17843. "additionalProperties": false
  17844. }
  17845. },
  17846. "required": ["id", "type", "properties"],
  17847. "additionalProperties": false
  17848. },
  17849. "SessionErrorUnknown": {
  17850. "type": "object",
  17851. "properties": {
  17852. "type": {
  17853. "type": "string",
  17854. "enum": ["unknown"]
  17855. },
  17856. "message": {
  17857. "type": "string"
  17858. }
  17859. },
  17860. "required": ["type", "message"],
  17861. "additionalProperties": false
  17862. },
  17863. "EventSessionNextStepFailed": {
  17864. "type": "object",
  17865. "properties": {
  17866. "id": {
  17867. "type": "string"
  17868. },
  17869. "type": {
  17870. "type": "string",
  17871. "enum": ["session.next.step.failed"]
  17872. },
  17873. "properties": {
  17874. "type": "object",
  17875. "properties": {
  17876. "timestamp": {
  17877. "type": "number"
  17878. },
  17879. "sessionID": {
  17880. "type": "string",
  17881. "pattern": "^ses"
  17882. },
  17883. "error": {
  17884. "$ref": "#/components/schemas/SessionErrorUnknown"
  17885. }
  17886. },
  17887. "required": ["timestamp", "sessionID", "error"],
  17888. "additionalProperties": false
  17889. }
  17890. },
  17891. "required": ["id", "type", "properties"],
  17892. "additionalProperties": false
  17893. },
  17894. "EventSessionNextTextStarted": {
  17895. "type": "object",
  17896. "properties": {
  17897. "id": {
  17898. "type": "string"
  17899. },
  17900. "type": {
  17901. "type": "string",
  17902. "enum": ["session.next.text.started"]
  17903. },
  17904. "properties": {
  17905. "type": "object",
  17906. "properties": {
  17907. "timestamp": {
  17908. "type": "number"
  17909. },
  17910. "sessionID": {
  17911. "type": "string",
  17912. "pattern": "^ses"
  17913. }
  17914. },
  17915. "required": ["timestamp", "sessionID"],
  17916. "additionalProperties": false
  17917. }
  17918. },
  17919. "required": ["id", "type", "properties"],
  17920. "additionalProperties": false
  17921. },
  17922. "EventSessionNextTextDelta": {
  17923. "type": "object",
  17924. "properties": {
  17925. "id": {
  17926. "type": "string"
  17927. },
  17928. "type": {
  17929. "type": "string",
  17930. "enum": ["session.next.text.delta"]
  17931. },
  17932. "properties": {
  17933. "type": "object",
  17934. "properties": {
  17935. "timestamp": {
  17936. "type": "number"
  17937. },
  17938. "sessionID": {
  17939. "type": "string",
  17940. "pattern": "^ses"
  17941. },
  17942. "delta": {
  17943. "type": "string"
  17944. }
  17945. },
  17946. "required": ["timestamp", "sessionID", "delta"],
  17947. "additionalProperties": false
  17948. }
  17949. },
  17950. "required": ["id", "type", "properties"],
  17951. "additionalProperties": false
  17952. },
  17953. "EventSessionNextTextEnded": {
  17954. "type": "object",
  17955. "properties": {
  17956. "id": {
  17957. "type": "string"
  17958. },
  17959. "type": {
  17960. "type": "string",
  17961. "enum": ["session.next.text.ended"]
  17962. },
  17963. "properties": {
  17964. "type": "object",
  17965. "properties": {
  17966. "timestamp": {
  17967. "type": "number"
  17968. },
  17969. "sessionID": {
  17970. "type": "string",
  17971. "pattern": "^ses"
  17972. },
  17973. "text": {
  17974. "type": "string"
  17975. }
  17976. },
  17977. "required": ["timestamp", "sessionID", "text"],
  17978. "additionalProperties": false
  17979. }
  17980. },
  17981. "required": ["id", "type", "properties"],
  17982. "additionalProperties": false
  17983. },
  17984. "EventSessionNextReasoningStarted": {
  17985. "type": "object",
  17986. "properties": {
  17987. "id": {
  17988. "type": "string"
  17989. },
  17990. "type": {
  17991. "type": "string",
  17992. "enum": ["session.next.reasoning.started"]
  17993. },
  17994. "properties": {
  17995. "type": "object",
  17996. "properties": {
  17997. "timestamp": {
  17998. "type": "number"
  17999. },
  18000. "sessionID": {
  18001. "type": "string",
  18002. "pattern": "^ses"
  18003. },
  18004. "reasoningID": {
  18005. "type": "string"
  18006. }
  18007. },
  18008. "required": ["timestamp", "sessionID", "reasoningID"],
  18009. "additionalProperties": false
  18010. }
  18011. },
  18012. "required": ["id", "type", "properties"],
  18013. "additionalProperties": false
  18014. },
  18015. "EventSessionNextReasoningDelta": {
  18016. "type": "object",
  18017. "properties": {
  18018. "id": {
  18019. "type": "string"
  18020. },
  18021. "type": {
  18022. "type": "string",
  18023. "enum": ["session.next.reasoning.delta"]
  18024. },
  18025. "properties": {
  18026. "type": "object",
  18027. "properties": {
  18028. "timestamp": {
  18029. "type": "number"
  18030. },
  18031. "sessionID": {
  18032. "type": "string",
  18033. "pattern": "^ses"
  18034. },
  18035. "reasoningID": {
  18036. "type": "string"
  18037. },
  18038. "delta": {
  18039. "type": "string"
  18040. }
  18041. },
  18042. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  18043. "additionalProperties": false
  18044. }
  18045. },
  18046. "required": ["id", "type", "properties"],
  18047. "additionalProperties": false
  18048. },
  18049. "EventSessionNextReasoningEnded": {
  18050. "type": "object",
  18051. "properties": {
  18052. "id": {
  18053. "type": "string"
  18054. },
  18055. "type": {
  18056. "type": "string",
  18057. "enum": ["session.next.reasoning.ended"]
  18058. },
  18059. "properties": {
  18060. "type": "object",
  18061. "properties": {
  18062. "timestamp": {
  18063. "type": "number"
  18064. },
  18065. "sessionID": {
  18066. "type": "string",
  18067. "pattern": "^ses"
  18068. },
  18069. "reasoningID": {
  18070. "type": "string"
  18071. },
  18072. "text": {
  18073. "type": "string"
  18074. }
  18075. },
  18076. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  18077. "additionalProperties": false
  18078. }
  18079. },
  18080. "required": ["id", "type", "properties"],
  18081. "additionalProperties": false
  18082. },
  18083. "EventSessionNextToolInputStarted": {
  18084. "type": "object",
  18085. "properties": {
  18086. "id": {
  18087. "type": "string"
  18088. },
  18089. "type": {
  18090. "type": "string",
  18091. "enum": ["session.next.tool.input.started"]
  18092. },
  18093. "properties": {
  18094. "type": "object",
  18095. "properties": {
  18096. "timestamp": {
  18097. "type": "number"
  18098. },
  18099. "sessionID": {
  18100. "type": "string",
  18101. "pattern": "^ses"
  18102. },
  18103. "callID": {
  18104. "type": "string"
  18105. },
  18106. "name": {
  18107. "type": "string"
  18108. }
  18109. },
  18110. "required": ["timestamp", "sessionID", "callID", "name"],
  18111. "additionalProperties": false
  18112. }
  18113. },
  18114. "required": ["id", "type", "properties"],
  18115. "additionalProperties": false
  18116. },
  18117. "EventSessionNextToolInputDelta": {
  18118. "type": "object",
  18119. "properties": {
  18120. "id": {
  18121. "type": "string"
  18122. },
  18123. "type": {
  18124. "type": "string",
  18125. "enum": ["session.next.tool.input.delta"]
  18126. },
  18127. "properties": {
  18128. "type": "object",
  18129. "properties": {
  18130. "timestamp": {
  18131. "type": "number"
  18132. },
  18133. "sessionID": {
  18134. "type": "string",
  18135. "pattern": "^ses"
  18136. },
  18137. "callID": {
  18138. "type": "string"
  18139. },
  18140. "delta": {
  18141. "type": "string"
  18142. }
  18143. },
  18144. "required": ["timestamp", "sessionID", "callID", "delta"],
  18145. "additionalProperties": false
  18146. }
  18147. },
  18148. "required": ["id", "type", "properties"],
  18149. "additionalProperties": false
  18150. },
  18151. "EventSessionNextToolInputEnded": {
  18152. "type": "object",
  18153. "properties": {
  18154. "id": {
  18155. "type": "string"
  18156. },
  18157. "type": {
  18158. "type": "string",
  18159. "enum": ["session.next.tool.input.ended"]
  18160. },
  18161. "properties": {
  18162. "type": "object",
  18163. "properties": {
  18164. "timestamp": {
  18165. "type": "number"
  18166. },
  18167. "sessionID": {
  18168. "type": "string",
  18169. "pattern": "^ses"
  18170. },
  18171. "callID": {
  18172. "type": "string"
  18173. },
  18174. "text": {
  18175. "type": "string"
  18176. }
  18177. },
  18178. "required": ["timestamp", "sessionID", "callID", "text"],
  18179. "additionalProperties": false
  18180. }
  18181. },
  18182. "required": ["id", "type", "properties"],
  18183. "additionalProperties": false
  18184. },
  18185. "EventSessionNextToolCalled": {
  18186. "type": "object",
  18187. "properties": {
  18188. "id": {
  18189. "type": "string"
  18190. },
  18191. "type": {
  18192. "type": "string",
  18193. "enum": ["session.next.tool.called"]
  18194. },
  18195. "properties": {
  18196. "type": "object",
  18197. "properties": {
  18198. "timestamp": {
  18199. "type": "number"
  18200. },
  18201. "sessionID": {
  18202. "type": "string",
  18203. "pattern": "^ses"
  18204. },
  18205. "callID": {
  18206. "type": "string"
  18207. },
  18208. "tool": {
  18209. "type": "string"
  18210. },
  18211. "input": {
  18212. "type": "object"
  18213. },
  18214. "provider": {
  18215. "type": "object",
  18216. "properties": {
  18217. "executed": {
  18218. "type": "boolean"
  18219. },
  18220. "metadata": {
  18221. "type": "object"
  18222. }
  18223. },
  18224. "required": ["executed"],
  18225. "additionalProperties": false
  18226. }
  18227. },
  18228. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  18229. "additionalProperties": false
  18230. }
  18231. },
  18232. "required": ["id", "type", "properties"],
  18233. "additionalProperties": false
  18234. },
  18235. "ToolTextContent": {
  18236. "type": "object",
  18237. "properties": {
  18238. "type": {
  18239. "type": "string",
  18240. "enum": ["text"]
  18241. },
  18242. "text": {
  18243. "type": "string"
  18244. }
  18245. },
  18246. "required": ["type", "text"],
  18247. "additionalProperties": false
  18248. },
  18249. "ToolFileContent": {
  18250. "type": "object",
  18251. "properties": {
  18252. "type": {
  18253. "type": "string",
  18254. "enum": ["file"]
  18255. },
  18256. "uri": {
  18257. "type": "string"
  18258. },
  18259. "mime": {
  18260. "type": "string"
  18261. },
  18262. "name": {
  18263. "type": "string"
  18264. }
  18265. },
  18266. "required": ["type", "uri", "mime"],
  18267. "additionalProperties": false
  18268. },
  18269. "EventSessionNextToolProgress": {
  18270. "type": "object",
  18271. "properties": {
  18272. "id": {
  18273. "type": "string"
  18274. },
  18275. "type": {
  18276. "type": "string",
  18277. "enum": ["session.next.tool.progress"]
  18278. },
  18279. "properties": {
  18280. "type": "object",
  18281. "properties": {
  18282. "timestamp": {
  18283. "type": "number"
  18284. },
  18285. "sessionID": {
  18286. "type": "string",
  18287. "pattern": "^ses"
  18288. },
  18289. "callID": {
  18290. "type": "string"
  18291. },
  18292. "structured": {
  18293. "type": "object"
  18294. },
  18295. "content": {
  18296. "type": "array",
  18297. "items": {
  18298. "anyOf": [
  18299. {
  18300. "$ref": "#/components/schemas/ToolTextContent"
  18301. },
  18302. {
  18303. "$ref": "#/components/schemas/ToolFileContent"
  18304. }
  18305. ]
  18306. }
  18307. }
  18308. },
  18309. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  18310. "additionalProperties": false
  18311. }
  18312. },
  18313. "required": ["id", "type", "properties"],
  18314. "additionalProperties": false
  18315. },
  18316. "EventSessionNextToolSuccess": {
  18317. "type": "object",
  18318. "properties": {
  18319. "id": {
  18320. "type": "string"
  18321. },
  18322. "type": {
  18323. "type": "string",
  18324. "enum": ["session.next.tool.success"]
  18325. },
  18326. "properties": {
  18327. "type": "object",
  18328. "properties": {
  18329. "timestamp": {
  18330. "type": "number"
  18331. },
  18332. "sessionID": {
  18333. "type": "string",
  18334. "pattern": "^ses"
  18335. },
  18336. "callID": {
  18337. "type": "string"
  18338. },
  18339. "structured": {
  18340. "type": "object"
  18341. },
  18342. "content": {
  18343. "type": "array",
  18344. "items": {
  18345. "anyOf": [
  18346. {
  18347. "$ref": "#/components/schemas/ToolTextContent"
  18348. },
  18349. {
  18350. "$ref": "#/components/schemas/ToolFileContent"
  18351. }
  18352. ]
  18353. }
  18354. },
  18355. "provider": {
  18356. "type": "object",
  18357. "properties": {
  18358. "executed": {
  18359. "type": "boolean"
  18360. },
  18361. "metadata": {
  18362. "type": "object"
  18363. }
  18364. },
  18365. "required": ["executed"],
  18366. "additionalProperties": false
  18367. }
  18368. },
  18369. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  18370. "additionalProperties": false
  18371. }
  18372. },
  18373. "required": ["id", "type", "properties"],
  18374. "additionalProperties": false
  18375. },
  18376. "EventSessionNextToolFailed": {
  18377. "type": "object",
  18378. "properties": {
  18379. "id": {
  18380. "type": "string"
  18381. },
  18382. "type": {
  18383. "type": "string",
  18384. "enum": ["session.next.tool.failed"]
  18385. },
  18386. "properties": {
  18387. "type": "object",
  18388. "properties": {
  18389. "timestamp": {
  18390. "type": "number"
  18391. },
  18392. "sessionID": {
  18393. "type": "string",
  18394. "pattern": "^ses"
  18395. },
  18396. "callID": {
  18397. "type": "string"
  18398. },
  18399. "error": {
  18400. "$ref": "#/components/schemas/SessionErrorUnknown"
  18401. },
  18402. "provider": {
  18403. "type": "object",
  18404. "properties": {
  18405. "executed": {
  18406. "type": "boolean"
  18407. },
  18408. "metadata": {
  18409. "type": "object"
  18410. }
  18411. },
  18412. "required": ["executed"],
  18413. "additionalProperties": false
  18414. }
  18415. },
  18416. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  18417. "additionalProperties": false
  18418. }
  18419. },
  18420. "required": ["id", "type", "properties"],
  18421. "additionalProperties": false
  18422. },
  18423. "SessionNextRetry_error": {
  18424. "type": "object",
  18425. "properties": {
  18426. "message": {
  18427. "type": "string"
  18428. },
  18429. "statusCode": {
  18430. "type": "number"
  18431. },
  18432. "isRetryable": {
  18433. "type": "boolean"
  18434. },
  18435. "responseHeaders": {
  18436. "type": "object",
  18437. "additionalProperties": {
  18438. "type": "string"
  18439. }
  18440. },
  18441. "responseBody": {
  18442. "type": "string"
  18443. },
  18444. "metadata": {
  18445. "type": "object",
  18446. "additionalProperties": {
  18447. "type": "string"
  18448. }
  18449. }
  18450. },
  18451. "required": ["message", "isRetryable"],
  18452. "additionalProperties": false
  18453. },
  18454. "EventSessionNextRetried": {
  18455. "type": "object",
  18456. "properties": {
  18457. "id": {
  18458. "type": "string"
  18459. },
  18460. "type": {
  18461. "type": "string",
  18462. "enum": ["session.next.retried"]
  18463. },
  18464. "properties": {
  18465. "type": "object",
  18466. "properties": {
  18467. "timestamp": {
  18468. "type": "number"
  18469. },
  18470. "sessionID": {
  18471. "type": "string",
  18472. "pattern": "^ses"
  18473. },
  18474. "attempt": {
  18475. "type": "number"
  18476. },
  18477. "error": {
  18478. "$ref": "#/components/schemas/SessionNextRetry_error"
  18479. }
  18480. },
  18481. "required": ["timestamp", "sessionID", "attempt", "error"],
  18482. "additionalProperties": false
  18483. }
  18484. },
  18485. "required": ["id", "type", "properties"],
  18486. "additionalProperties": false
  18487. },
  18488. "EventSessionNextCompactionStarted": {
  18489. "type": "object",
  18490. "properties": {
  18491. "id": {
  18492. "type": "string"
  18493. },
  18494. "type": {
  18495. "type": "string",
  18496. "enum": ["session.next.compaction.started"]
  18497. },
  18498. "properties": {
  18499. "type": "object",
  18500. "properties": {
  18501. "timestamp": {
  18502. "type": "number"
  18503. },
  18504. "sessionID": {
  18505. "type": "string",
  18506. "pattern": "^ses"
  18507. },
  18508. "reason": {
  18509. "type": "string",
  18510. "enum": ["auto", "manual"]
  18511. }
  18512. },
  18513. "required": ["timestamp", "sessionID", "reason"],
  18514. "additionalProperties": false
  18515. }
  18516. },
  18517. "required": ["id", "type", "properties"],
  18518. "additionalProperties": false
  18519. },
  18520. "EventSessionNextCompactionDelta": {
  18521. "type": "object",
  18522. "properties": {
  18523. "id": {
  18524. "type": "string"
  18525. },
  18526. "type": {
  18527. "type": "string",
  18528. "enum": ["session.next.compaction.delta"]
  18529. },
  18530. "properties": {
  18531. "type": "object",
  18532. "properties": {
  18533. "timestamp": {
  18534. "type": "number"
  18535. },
  18536. "sessionID": {
  18537. "type": "string",
  18538. "pattern": "^ses"
  18539. },
  18540. "text": {
  18541. "type": "string"
  18542. }
  18543. },
  18544. "required": ["timestamp", "sessionID", "text"],
  18545. "additionalProperties": false
  18546. }
  18547. },
  18548. "required": ["id", "type", "properties"],
  18549. "additionalProperties": false
  18550. },
  18551. "EventSessionNextCompactionEnded": {
  18552. "type": "object",
  18553. "properties": {
  18554. "id": {
  18555. "type": "string"
  18556. },
  18557. "type": {
  18558. "type": "string",
  18559. "enum": ["session.next.compaction.ended"]
  18560. },
  18561. "properties": {
  18562. "type": "object",
  18563. "properties": {
  18564. "timestamp": {
  18565. "type": "number"
  18566. },
  18567. "sessionID": {
  18568. "type": "string",
  18569. "pattern": "^ses"
  18570. },
  18571. "text": {
  18572. "type": "string"
  18573. },
  18574. "include": {
  18575. "type": "string"
  18576. }
  18577. },
  18578. "required": ["timestamp", "sessionID", "text"],
  18579. "additionalProperties": false
  18580. }
  18581. },
  18582. "required": ["id", "type", "properties"],
  18583. "additionalProperties": false
  18584. },
  18585. "SessionInfo": {
  18586. "type": "object",
  18587. "properties": {
  18588. "id": {
  18589. "type": "string",
  18590. "pattern": "^ses"
  18591. },
  18592. "parentID": {
  18593. "type": "string",
  18594. "pattern": "^ses"
  18595. },
  18596. "projectID": {
  18597. "type": "string"
  18598. },
  18599. "workspaceID": {
  18600. "type": "string",
  18601. "pattern": "^wrk"
  18602. },
  18603. "path": {
  18604. "type": "string"
  18605. },
  18606. "agent": {
  18607. "type": "string"
  18608. },
  18609. "model": {
  18610. "type": "object",
  18611. "properties": {
  18612. "id": {
  18613. "type": "string"
  18614. },
  18615. "providerID": {
  18616. "type": "string"
  18617. },
  18618. "variant": {
  18619. "type": "string"
  18620. }
  18621. },
  18622. "required": ["id", "providerID", "variant"],
  18623. "additionalProperties": false
  18624. },
  18625. "cost": {
  18626. "type": "number"
  18627. },
  18628. "tokens": {
  18629. "type": "object",
  18630. "properties": {
  18631. "input": {
  18632. "type": "number"
  18633. },
  18634. "output": {
  18635. "type": "number"
  18636. },
  18637. "reasoning": {
  18638. "type": "number"
  18639. },
  18640. "cache": {
  18641. "type": "object",
  18642. "properties": {
  18643. "read": {
  18644. "type": "number"
  18645. },
  18646. "write": {
  18647. "type": "number"
  18648. }
  18649. },
  18650. "required": ["read", "write"],
  18651. "additionalProperties": false
  18652. }
  18653. },
  18654. "required": ["input", "output", "reasoning", "cache"],
  18655. "additionalProperties": false
  18656. },
  18657. "time": {
  18658. "type": "object",
  18659. "properties": {
  18660. "created": {
  18661. "type": "number"
  18662. },
  18663. "updated": {
  18664. "type": "number"
  18665. },
  18666. "archived": {
  18667. "type": "number"
  18668. }
  18669. },
  18670. "required": ["created", "updated"],
  18671. "additionalProperties": false
  18672. },
  18673. "title": {
  18674. "type": "string"
  18675. }
  18676. },
  18677. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  18678. "additionalProperties": false
  18679. },
  18680. "SessionDelivery": {
  18681. "type": "string",
  18682. "enum": ["immediate", "deferred"]
  18683. },
  18684. "SessionMessageAgentSwitched": {
  18685. "type": "object",
  18686. "properties": {
  18687. "id": {
  18688. "type": "string"
  18689. },
  18690. "metadata": {
  18691. "type": "object"
  18692. },
  18693. "time": {
  18694. "type": "object",
  18695. "properties": {
  18696. "created": {
  18697. "type": "number"
  18698. }
  18699. },
  18700. "required": ["created"],
  18701. "additionalProperties": false
  18702. },
  18703. "type": {
  18704. "type": "string",
  18705. "enum": ["agent-switched"]
  18706. },
  18707. "agent": {
  18708. "type": "string"
  18709. }
  18710. },
  18711. "required": ["id", "time", "type", "agent"],
  18712. "additionalProperties": false
  18713. },
  18714. "SessionMessageModelSwitched": {
  18715. "type": "object",
  18716. "properties": {
  18717. "id": {
  18718. "type": "string"
  18719. },
  18720. "metadata": {
  18721. "type": "object"
  18722. },
  18723. "time": {
  18724. "type": "object",
  18725. "properties": {
  18726. "created": {
  18727. "type": "number"
  18728. }
  18729. },
  18730. "required": ["created"],
  18731. "additionalProperties": false
  18732. },
  18733. "type": {
  18734. "type": "string",
  18735. "enum": ["model-switched"]
  18736. },
  18737. "model": {
  18738. "type": "object",
  18739. "properties": {
  18740. "id": {
  18741. "type": "string"
  18742. },
  18743. "providerID": {
  18744. "type": "string"
  18745. },
  18746. "variant": {
  18747. "type": "string"
  18748. }
  18749. },
  18750. "required": ["id", "providerID", "variant"],
  18751. "additionalProperties": false
  18752. }
  18753. },
  18754. "required": ["id", "time", "type", "model"],
  18755. "additionalProperties": false
  18756. },
  18757. "SessionMessageUser": {
  18758. "type": "object",
  18759. "properties": {
  18760. "id": {
  18761. "type": "string"
  18762. },
  18763. "metadata": {
  18764. "type": "object"
  18765. },
  18766. "time": {
  18767. "type": "object",
  18768. "properties": {
  18769. "created": {
  18770. "type": "number"
  18771. }
  18772. },
  18773. "required": ["created"],
  18774. "additionalProperties": false
  18775. },
  18776. "text": {
  18777. "type": "string"
  18778. },
  18779. "files": {
  18780. "type": "array",
  18781. "items": {
  18782. "$ref": "#/components/schemas/PromptFileAttachment"
  18783. }
  18784. },
  18785. "agents": {
  18786. "type": "array",
  18787. "items": {
  18788. "$ref": "#/components/schemas/PromptAgentAttachment"
  18789. }
  18790. },
  18791. "references": {
  18792. "type": "array",
  18793. "items": {
  18794. "$ref": "#/components/schemas/PromptReferenceAttachment"
  18795. }
  18796. },
  18797. "type": {
  18798. "type": "string",
  18799. "enum": ["user"]
  18800. }
  18801. },
  18802. "required": ["id", "time", "text", "type"],
  18803. "additionalProperties": false
  18804. },
  18805. "SessionMessageSynthetic": {
  18806. "type": "object",
  18807. "properties": {
  18808. "id": {
  18809. "type": "string"
  18810. },
  18811. "metadata": {
  18812. "type": "object"
  18813. },
  18814. "time": {
  18815. "type": "object",
  18816. "properties": {
  18817. "created": {
  18818. "type": "number"
  18819. }
  18820. },
  18821. "required": ["created"],
  18822. "additionalProperties": false
  18823. },
  18824. "sessionID": {
  18825. "type": "string",
  18826. "pattern": "^ses"
  18827. },
  18828. "text": {
  18829. "type": "string"
  18830. },
  18831. "type": {
  18832. "type": "string",
  18833. "enum": ["synthetic"]
  18834. }
  18835. },
  18836. "required": ["id", "time", "sessionID", "text", "type"],
  18837. "additionalProperties": false
  18838. },
  18839. "SessionMessageShell": {
  18840. "type": "object",
  18841. "properties": {
  18842. "id": {
  18843. "type": "string"
  18844. },
  18845. "metadata": {
  18846. "type": "object"
  18847. },
  18848. "time": {
  18849. "type": "object",
  18850. "properties": {
  18851. "created": {
  18852. "type": "number"
  18853. },
  18854. "completed": {
  18855. "type": "number"
  18856. }
  18857. },
  18858. "required": ["created"],
  18859. "additionalProperties": false
  18860. },
  18861. "type": {
  18862. "type": "string",
  18863. "enum": ["shell"]
  18864. },
  18865. "callID": {
  18866. "type": "string"
  18867. },
  18868. "command": {
  18869. "type": "string"
  18870. },
  18871. "output": {
  18872. "type": "string"
  18873. }
  18874. },
  18875. "required": ["id", "time", "type", "callID", "command", "output"],
  18876. "additionalProperties": false
  18877. },
  18878. "SessionMessageAssistantText": {
  18879. "type": "object",
  18880. "properties": {
  18881. "type": {
  18882. "type": "string",
  18883. "enum": ["text"]
  18884. },
  18885. "text": {
  18886. "type": "string"
  18887. }
  18888. },
  18889. "required": ["type", "text"],
  18890. "additionalProperties": false
  18891. },
  18892. "SessionMessageAssistantReasoning": {
  18893. "type": "object",
  18894. "properties": {
  18895. "type": {
  18896. "type": "string",
  18897. "enum": ["reasoning"]
  18898. },
  18899. "id": {
  18900. "type": "string"
  18901. },
  18902. "text": {
  18903. "type": "string"
  18904. }
  18905. },
  18906. "required": ["type", "id", "text"],
  18907. "additionalProperties": false
  18908. },
  18909. "SessionMessageToolStatePending": {
  18910. "type": "object",
  18911. "properties": {
  18912. "status": {
  18913. "type": "string",
  18914. "enum": ["pending"]
  18915. },
  18916. "input": {
  18917. "type": "string"
  18918. }
  18919. },
  18920. "required": ["status", "input"],
  18921. "additionalProperties": false
  18922. },
  18923. "SessionMessageToolStateRunning": {
  18924. "type": "object",
  18925. "properties": {
  18926. "status": {
  18927. "type": "string",
  18928. "enum": ["running"]
  18929. },
  18930. "input": {
  18931. "type": "object"
  18932. },
  18933. "structured": {
  18934. "type": "object"
  18935. },
  18936. "content": {
  18937. "type": "array",
  18938. "items": {
  18939. "anyOf": [
  18940. {
  18941. "$ref": "#/components/schemas/ToolTextContent"
  18942. },
  18943. {
  18944. "$ref": "#/components/schemas/ToolFileContent"
  18945. }
  18946. ]
  18947. }
  18948. }
  18949. },
  18950. "required": ["status", "input", "structured", "content"],
  18951. "additionalProperties": false
  18952. },
  18953. "SessionMessageToolStateCompleted": {
  18954. "type": "object",
  18955. "properties": {
  18956. "status": {
  18957. "type": "string",
  18958. "enum": ["completed"]
  18959. },
  18960. "input": {
  18961. "type": "object"
  18962. },
  18963. "attachments": {
  18964. "type": "array",
  18965. "items": {
  18966. "$ref": "#/components/schemas/PromptFileAttachment"
  18967. }
  18968. },
  18969. "content": {
  18970. "type": "array",
  18971. "items": {
  18972. "anyOf": [
  18973. {
  18974. "$ref": "#/components/schemas/ToolTextContent"
  18975. },
  18976. {
  18977. "$ref": "#/components/schemas/ToolFileContent"
  18978. }
  18979. ]
  18980. }
  18981. },
  18982. "structured": {
  18983. "type": "object"
  18984. }
  18985. },
  18986. "required": ["status", "input", "content", "structured"],
  18987. "additionalProperties": false
  18988. },
  18989. "SessionMessageToolStateError": {
  18990. "type": "object",
  18991. "properties": {
  18992. "status": {
  18993. "type": "string",
  18994. "enum": ["error"]
  18995. },
  18996. "input": {
  18997. "type": "object"
  18998. },
  18999. "content": {
  19000. "type": "array",
  19001. "items": {
  19002. "anyOf": [
  19003. {
  19004. "$ref": "#/components/schemas/ToolTextContent"
  19005. },
  19006. {
  19007. "$ref": "#/components/schemas/ToolFileContent"
  19008. }
  19009. ]
  19010. }
  19011. },
  19012. "structured": {
  19013. "type": "object"
  19014. },
  19015. "error": {
  19016. "$ref": "#/components/schemas/SessionErrorUnknown"
  19017. }
  19018. },
  19019. "required": ["status", "input", "content", "structured", "error"],
  19020. "additionalProperties": false
  19021. },
  19022. "SessionMessageAssistantTool": {
  19023. "type": "object",
  19024. "properties": {
  19025. "type": {
  19026. "type": "string",
  19027. "enum": ["tool"]
  19028. },
  19029. "id": {
  19030. "type": "string"
  19031. },
  19032. "name": {
  19033. "type": "string"
  19034. },
  19035. "provider": {
  19036. "type": "object",
  19037. "properties": {
  19038. "executed": {
  19039. "type": "boolean"
  19040. },
  19041. "metadata": {
  19042. "type": "object"
  19043. }
  19044. },
  19045. "required": ["executed"],
  19046. "additionalProperties": false
  19047. },
  19048. "state": {
  19049. "anyOf": [
  19050. {
  19051. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  19052. },
  19053. {
  19054. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  19055. },
  19056. {
  19057. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  19058. },
  19059. {
  19060. "$ref": "#/components/schemas/SessionMessageToolStateError"
  19061. }
  19062. ]
  19063. },
  19064. "time": {
  19065. "type": "object",
  19066. "properties": {
  19067. "created": {
  19068. "type": "number"
  19069. },
  19070. "ran": {
  19071. "type": "number"
  19072. },
  19073. "completed": {
  19074. "type": "number"
  19075. },
  19076. "pruned": {
  19077. "type": "number"
  19078. }
  19079. },
  19080. "required": ["created"],
  19081. "additionalProperties": false
  19082. }
  19083. },
  19084. "required": ["type", "id", "name", "state", "time"],
  19085. "additionalProperties": false
  19086. },
  19087. "SessionMessageAssistant": {
  19088. "type": "object",
  19089. "properties": {
  19090. "id": {
  19091. "type": "string"
  19092. },
  19093. "metadata": {
  19094. "type": "object"
  19095. },
  19096. "time": {
  19097. "type": "object",
  19098. "properties": {
  19099. "created": {
  19100. "type": "number"
  19101. },
  19102. "completed": {
  19103. "type": "number"
  19104. }
  19105. },
  19106. "required": ["created"],
  19107. "additionalProperties": false
  19108. },
  19109. "type": {
  19110. "type": "string",
  19111. "enum": ["assistant"]
  19112. },
  19113. "agent": {
  19114. "type": "string"
  19115. },
  19116. "model": {
  19117. "type": "object",
  19118. "properties": {
  19119. "id": {
  19120. "type": "string"
  19121. },
  19122. "providerID": {
  19123. "type": "string"
  19124. },
  19125. "variant": {
  19126. "type": "string"
  19127. }
  19128. },
  19129. "required": ["id", "providerID", "variant"],
  19130. "additionalProperties": false
  19131. },
  19132. "content": {
  19133. "type": "array",
  19134. "items": {
  19135. "anyOf": [
  19136. {
  19137. "$ref": "#/components/schemas/SessionMessageAssistantText"
  19138. },
  19139. {
  19140. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  19141. },
  19142. {
  19143. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  19144. }
  19145. ]
  19146. }
  19147. },
  19148. "snapshot": {
  19149. "type": "object",
  19150. "properties": {
  19151. "start": {
  19152. "type": "string"
  19153. },
  19154. "end": {
  19155. "type": "string"
  19156. }
  19157. },
  19158. "additionalProperties": false
  19159. },
  19160. "finish": {
  19161. "type": "string"
  19162. },
  19163. "cost": {
  19164. "type": "number"
  19165. },
  19166. "tokens": {
  19167. "type": "object",
  19168. "properties": {
  19169. "input": {
  19170. "type": "number"
  19171. },
  19172. "output": {
  19173. "type": "number"
  19174. },
  19175. "reasoning": {
  19176. "type": "number"
  19177. },
  19178. "cache": {
  19179. "type": "object",
  19180. "properties": {
  19181. "read": {
  19182. "type": "number"
  19183. },
  19184. "write": {
  19185. "type": "number"
  19186. }
  19187. },
  19188. "required": ["read", "write"],
  19189. "additionalProperties": false
  19190. }
  19191. },
  19192. "required": ["input", "output", "reasoning", "cache"],
  19193. "additionalProperties": false
  19194. },
  19195. "error": {
  19196. "$ref": "#/components/schemas/SessionErrorUnknown"
  19197. }
  19198. },
  19199. "required": ["id", "time", "type", "agent", "model", "content"],
  19200. "additionalProperties": false
  19201. },
  19202. "SessionMessageCompaction": {
  19203. "type": "object",
  19204. "properties": {
  19205. "type": {
  19206. "type": "string",
  19207. "enum": ["compaction"]
  19208. },
  19209. "reason": {
  19210. "type": "string",
  19211. "enum": ["auto", "manual"]
  19212. },
  19213. "summary": {
  19214. "type": "string"
  19215. },
  19216. "include": {
  19217. "type": "string"
  19218. },
  19219. "id": {
  19220. "type": "string"
  19221. },
  19222. "metadata": {
  19223. "type": "object"
  19224. },
  19225. "time": {
  19226. "type": "object",
  19227. "properties": {
  19228. "created": {
  19229. "type": "number"
  19230. }
  19231. },
  19232. "required": ["created"],
  19233. "additionalProperties": false
  19234. }
  19235. },
  19236. "required": ["type", "reason", "summary", "id", "time"],
  19237. "additionalProperties": false
  19238. },
  19239. "SessionMessage": {
  19240. "anyOf": [
  19241. {
  19242. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  19243. },
  19244. {
  19245. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  19246. },
  19247. {
  19248. "$ref": "#/components/schemas/SessionMessageUser"
  19249. },
  19250. {
  19251. "$ref": "#/components/schemas/SessionMessageSynthetic"
  19252. },
  19253. {
  19254. "$ref": "#/components/schemas/SessionMessageShell"
  19255. },
  19256. {
  19257. "$ref": "#/components/schemas/SessionMessageAssistant"
  19258. },
  19259. {
  19260. "$ref": "#/components/schemas/SessionMessageCompaction"
  19261. }
  19262. ]
  19263. },
  19264. "ProviderV2Info": {
  19265. "type": "object",
  19266. "properties": {
  19267. "id": {
  19268. "type": "string"
  19269. },
  19270. "name": {
  19271. "type": "string"
  19272. },
  19273. "enabled": {
  19274. "anyOf": [
  19275. {
  19276. "type": "boolean",
  19277. "enum": [false]
  19278. },
  19279. {
  19280. "type": "object",
  19281. "properties": {
  19282. "via": {
  19283. "type": "string",
  19284. "enum": ["env"]
  19285. },
  19286. "name": {
  19287. "type": "string"
  19288. }
  19289. },
  19290. "required": ["via", "name"],
  19291. "additionalProperties": false
  19292. },
  19293. {
  19294. "type": "object",
  19295. "properties": {
  19296. "via": {
  19297. "type": "string",
  19298. "enum": ["auth"]
  19299. },
  19300. "service": {
  19301. "type": "string"
  19302. }
  19303. },
  19304. "required": ["via", "service"],
  19305. "additionalProperties": false
  19306. },
  19307. {
  19308. "type": "object",
  19309. "properties": {
  19310. "via": {
  19311. "type": "string",
  19312. "enum": ["custom"]
  19313. },
  19314. "data": {
  19315. "type": "object"
  19316. }
  19317. },
  19318. "required": ["via", "data"],
  19319. "additionalProperties": false
  19320. }
  19321. ]
  19322. },
  19323. "env": {
  19324. "type": "array",
  19325. "items": {
  19326. "type": "string"
  19327. }
  19328. },
  19329. "endpoint": {
  19330. "anyOf": [
  19331. {
  19332. "type": "object",
  19333. "properties": {
  19334. "type": {
  19335. "type": "string",
  19336. "enum": ["unknown"]
  19337. }
  19338. },
  19339. "required": ["type"],
  19340. "additionalProperties": false
  19341. },
  19342. {
  19343. "type": "object",
  19344. "properties": {
  19345. "type": {
  19346. "type": "string",
  19347. "enum": ["openai/responses"]
  19348. },
  19349. "url": {
  19350. "type": "string"
  19351. },
  19352. "websocket": {
  19353. "type": "boolean"
  19354. }
  19355. },
  19356. "required": ["type", "url"],
  19357. "additionalProperties": false
  19358. },
  19359. {
  19360. "type": "object",
  19361. "properties": {
  19362. "type": {
  19363. "type": "string",
  19364. "enum": ["openai/completions"]
  19365. },
  19366. "url": {
  19367. "type": "string"
  19368. },
  19369. "reasoning": {
  19370. "anyOf": [
  19371. {
  19372. "type": "object",
  19373. "properties": {
  19374. "type": {
  19375. "type": "string",
  19376. "enum": ["reasoning_content"]
  19377. }
  19378. },
  19379. "required": ["type"],
  19380. "additionalProperties": false
  19381. },
  19382. {
  19383. "type": "object",
  19384. "properties": {
  19385. "type": {
  19386. "type": "string",
  19387. "enum": ["reasoning_details"]
  19388. }
  19389. },
  19390. "required": ["type"],
  19391. "additionalProperties": false
  19392. }
  19393. ]
  19394. }
  19395. },
  19396. "required": ["type", "url"],
  19397. "additionalProperties": false
  19398. },
  19399. {
  19400. "type": "object",
  19401. "properties": {
  19402. "type": {
  19403. "type": "string",
  19404. "enum": ["anthropic/messages"]
  19405. },
  19406. "url": {
  19407. "type": "string"
  19408. }
  19409. },
  19410. "required": ["type", "url"],
  19411. "additionalProperties": false
  19412. },
  19413. {
  19414. "type": "object",
  19415. "properties": {
  19416. "type": {
  19417. "type": "string",
  19418. "enum": ["aisdk"]
  19419. },
  19420. "package": {
  19421. "type": "string"
  19422. },
  19423. "url": {
  19424. "type": "string"
  19425. }
  19426. },
  19427. "required": ["type", "package"],
  19428. "additionalProperties": false
  19429. }
  19430. ]
  19431. },
  19432. "options": {
  19433. "type": "object",
  19434. "properties": {
  19435. "headers": {
  19436. "type": "object",
  19437. "additionalProperties": {
  19438. "type": "string"
  19439. }
  19440. },
  19441. "body": {
  19442. "type": "object"
  19443. },
  19444. "aisdk": {
  19445. "type": "object",
  19446. "properties": {
  19447. "provider": {
  19448. "type": "object"
  19449. },
  19450. "request": {
  19451. "type": "object"
  19452. }
  19453. },
  19454. "required": ["provider", "request"],
  19455. "additionalProperties": false
  19456. }
  19457. },
  19458. "required": ["headers", "body", "aisdk"],
  19459. "additionalProperties": false
  19460. }
  19461. },
  19462. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  19463. "additionalProperties": false
  19464. },
  19465. "EventTuiToastShow1": {
  19466. "type": "object",
  19467. "properties": {
  19468. "id": {
  19469. "type": "string"
  19470. },
  19471. "type": {
  19472. "type": "string",
  19473. "enum": ["tui.toast.show"]
  19474. },
  19475. "properties": {
  19476. "type": "object",
  19477. "properties": {
  19478. "title": {
  19479. "type": "string"
  19480. },
  19481. "message": {
  19482. "type": "string"
  19483. },
  19484. "variant": {
  19485. "type": "string",
  19486. "enum": ["info", "success", "warning", "error"]
  19487. },
  19488. "duration": {
  19489. "type": "integer",
  19490. "exclusiveMinimum": 0
  19491. }
  19492. },
  19493. "required": ["message", "variant"],
  19494. "additionalProperties": false
  19495. }
  19496. },
  19497. "required": ["id", "type", "properties"],
  19498. "additionalProperties": false
  19499. },
  19500. "ModelV2Info1": {
  19501. "type": "object",
  19502. "properties": {
  19503. "id": {
  19504. "type": "string"
  19505. },
  19506. "apiID": {
  19507. "type": "string"
  19508. },
  19509. "providerID": {
  19510. "type": "string"
  19511. },
  19512. "family": {
  19513. "type": "string"
  19514. },
  19515. "name": {
  19516. "type": "string"
  19517. },
  19518. "endpoint": {
  19519. "anyOf": [
  19520. {
  19521. "type": "object",
  19522. "properties": {
  19523. "type": {
  19524. "type": "string",
  19525. "enum": ["unknown"]
  19526. }
  19527. },
  19528. "required": ["type"],
  19529. "additionalProperties": false
  19530. },
  19531. {
  19532. "type": "object",
  19533. "properties": {
  19534. "type": {
  19535. "type": "string",
  19536. "enum": ["openai/responses"]
  19537. },
  19538. "url": {
  19539. "type": "string"
  19540. },
  19541. "websocket": {
  19542. "type": "boolean"
  19543. }
  19544. },
  19545. "required": ["type", "url"],
  19546. "additionalProperties": false
  19547. },
  19548. {
  19549. "type": "object",
  19550. "properties": {
  19551. "type": {
  19552. "type": "string",
  19553. "enum": ["openai/completions"]
  19554. },
  19555. "url": {
  19556. "type": "string"
  19557. },
  19558. "reasoning": {
  19559. "anyOf": [
  19560. {
  19561. "type": "object",
  19562. "properties": {
  19563. "type": {
  19564. "type": "string",
  19565. "enum": ["reasoning_content"]
  19566. }
  19567. },
  19568. "required": ["type"],
  19569. "additionalProperties": false
  19570. },
  19571. {
  19572. "type": "object",
  19573. "properties": {
  19574. "type": {
  19575. "type": "string",
  19576. "enum": ["reasoning_details"]
  19577. }
  19578. },
  19579. "required": ["type"],
  19580. "additionalProperties": false
  19581. }
  19582. ]
  19583. }
  19584. },
  19585. "required": ["type", "url"],
  19586. "additionalProperties": false
  19587. },
  19588. {
  19589. "type": "object",
  19590. "properties": {
  19591. "type": {
  19592. "type": "string",
  19593. "enum": ["anthropic/messages"]
  19594. },
  19595. "url": {
  19596. "type": "string"
  19597. }
  19598. },
  19599. "required": ["type", "url"],
  19600. "additionalProperties": false
  19601. },
  19602. {
  19603. "type": "object",
  19604. "properties": {
  19605. "type": {
  19606. "type": "string",
  19607. "enum": ["aisdk"]
  19608. },
  19609. "package": {
  19610. "type": "string"
  19611. },
  19612. "url": {
  19613. "type": "string"
  19614. }
  19615. },
  19616. "required": ["type", "package"],
  19617. "additionalProperties": false
  19618. }
  19619. ]
  19620. },
  19621. "capabilities": {
  19622. "type": "object",
  19623. "properties": {
  19624. "tools": {
  19625. "type": "boolean"
  19626. },
  19627. "input": {
  19628. "type": "array",
  19629. "items": {
  19630. "type": "string"
  19631. }
  19632. },
  19633. "output": {
  19634. "type": "array",
  19635. "items": {
  19636. "type": "string"
  19637. }
  19638. }
  19639. },
  19640. "required": ["tools", "input", "output"],
  19641. "additionalProperties": false
  19642. },
  19643. "options": {
  19644. "type": "object",
  19645. "properties": {
  19646. "headers": {
  19647. "type": "object",
  19648. "additionalProperties": {
  19649. "type": "string"
  19650. }
  19651. },
  19652. "body": {
  19653. "type": "object"
  19654. },
  19655. "aisdk": {
  19656. "type": "object",
  19657. "properties": {
  19658. "provider": {
  19659. "type": "object"
  19660. },
  19661. "request": {
  19662. "type": "object"
  19663. }
  19664. },
  19665. "required": ["provider", "request"],
  19666. "additionalProperties": false
  19667. },
  19668. "variant": {
  19669. "type": "string"
  19670. }
  19671. },
  19672. "required": ["headers", "body", "aisdk"],
  19673. "additionalProperties": false
  19674. },
  19675. "variants": {
  19676. "type": "array",
  19677. "items": {
  19678. "type": "object",
  19679. "properties": {
  19680. "id": {
  19681. "type": "string"
  19682. },
  19683. "headers": {
  19684. "type": "object",
  19685. "additionalProperties": {
  19686. "type": "string"
  19687. }
  19688. },
  19689. "body": {
  19690. "type": "object"
  19691. },
  19692. "aisdk": {
  19693. "type": "object",
  19694. "properties": {
  19695. "provider": {
  19696. "type": "object"
  19697. },
  19698. "request": {
  19699. "type": "object"
  19700. }
  19701. },
  19702. "required": ["provider", "request"],
  19703. "additionalProperties": false
  19704. }
  19705. },
  19706. "required": ["id", "headers", "body", "aisdk"],
  19707. "additionalProperties": false
  19708. }
  19709. },
  19710. "time": {
  19711. "type": "object",
  19712. "properties": {
  19713. "released": {
  19714. "anyOf": [
  19715. {
  19716. "type": "number"
  19717. },
  19718. {
  19719. "type": "string",
  19720. "enum": ["NaN"]
  19721. },
  19722. {
  19723. "type": "string",
  19724. "enum": ["Infinity"]
  19725. },
  19726. {
  19727. "type": "string",
  19728. "enum": ["-Infinity"]
  19729. }
  19730. ]
  19731. }
  19732. },
  19733. "required": ["released"],
  19734. "additionalProperties": false
  19735. },
  19736. "cost": {
  19737. "type": "array",
  19738. "items": {
  19739. "type": "object",
  19740. "properties": {
  19741. "tier": {
  19742. "type": "object",
  19743. "properties": {
  19744. "type": {
  19745. "type": "string",
  19746. "enum": ["context"]
  19747. },
  19748. "size": {
  19749. "type": "integer"
  19750. }
  19751. },
  19752. "required": ["type", "size"],
  19753. "additionalProperties": false
  19754. },
  19755. "input": {
  19756. "type": "number"
  19757. },
  19758. "output": {
  19759. "type": "number"
  19760. },
  19761. "cache": {
  19762. "type": "object",
  19763. "properties": {
  19764. "read": {
  19765. "type": "number"
  19766. },
  19767. "write": {
  19768. "type": "number"
  19769. }
  19770. },
  19771. "required": ["read", "write"],
  19772. "additionalProperties": false
  19773. }
  19774. },
  19775. "required": ["input", "output", "cache"],
  19776. "additionalProperties": false
  19777. }
  19778. },
  19779. "status": {
  19780. "type": "string",
  19781. "enum": ["alpha", "beta", "deprecated", "active"]
  19782. },
  19783. "enabled": {
  19784. "type": "boolean"
  19785. },
  19786. "limit": {
  19787. "type": "object",
  19788. "properties": {
  19789. "context": {
  19790. "type": "integer"
  19791. },
  19792. "input": {
  19793. "type": "integer"
  19794. },
  19795. "output": {
  19796. "type": "integer"
  19797. }
  19798. },
  19799. "required": ["context", "output"],
  19800. "additionalProperties": false
  19801. }
  19802. },
  19803. "required": [
  19804. "id",
  19805. "apiID",
  19806. "providerID",
  19807. "name",
  19808. "endpoint",
  19809. "capabilities",
  19810. "options",
  19811. "variants",
  19812. "time",
  19813. "cost",
  19814. "status",
  19815. "enabled",
  19816. "limit"
  19817. ],
  19818. "additionalProperties": false
  19819. },
  19820. "BadRequestError": {
  19821. "type": "object",
  19822. "required": ["name", "data"],
  19823. "properties": {
  19824. "name": {
  19825. "type": "string",
  19826. "enum": ["BadRequest"]
  19827. },
  19828. "data": {
  19829. "type": "object",
  19830. "required": ["message"],
  19831. "properties": {
  19832. "message": {
  19833. "type": "string"
  19834. },
  19835. "kind": {
  19836. "type": "string",
  19837. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  19838. }
  19839. }
  19840. }
  19841. }
  19842. }
  19843. }
  19844. },
  19845. "security": [],
  19846. "tags": [
  19847. {
  19848. "name": "control",
  19849. "description": "Control plane routes."
  19850. },
  19851. {
  19852. "name": "global",
  19853. "description": "Global server routes."
  19854. },
  19855. {
  19856. "name": "event",
  19857. "description": "Instance event stream route."
  19858. },
  19859. {
  19860. "name": "config",
  19861. "description": "Experimental HttpApi config routes."
  19862. },
  19863. {
  19864. "name": "experimental",
  19865. "description": "Experimental HttpApi read-only routes."
  19866. },
  19867. {
  19868. "name": "file",
  19869. "description": "Experimental HttpApi file routes."
  19870. },
  19871. {
  19872. "name": "instance",
  19873. "description": "Experimental HttpApi instance read routes."
  19874. },
  19875. {
  19876. "name": "mcp",
  19877. "description": "Experimental HttpApi MCP routes."
  19878. },
  19879. {
  19880. "name": "project",
  19881. "description": "Experimental HttpApi project routes."
  19882. },
  19883. {
  19884. "name": "pty",
  19885. "description": "Experimental HttpApi PTY routes."
  19886. },
  19887. {
  19888. "name": "question",
  19889. "description": "Question routes."
  19890. },
  19891. {
  19892. "name": "permission",
  19893. "description": "Experimental HttpApi permission routes."
  19894. },
  19895. {
  19896. "name": "provider",
  19897. "description": "Experimental HttpApi provider routes."
  19898. },
  19899. {
  19900. "name": "session",
  19901. "description": "Experimental HttpApi session routes."
  19902. },
  19903. {
  19904. "name": "sync",
  19905. "description": "Experimental HttpApi sync routes."
  19906. },
  19907. {
  19908. "name": "v2",
  19909. "description": "Experimental v2 routes."
  19910. },
  19911. {
  19912. "name": "v2 messages",
  19913. "description": "Experimental v2 message routes."
  19914. },
  19915. {
  19916. "name": "v2 models",
  19917. "description": "Experimental v2 model routes."
  19918. },
  19919. {
  19920. "name": "v2 providers",
  19921. "description": "Experimental v2 provider routes."
  19922. },
  19923. {
  19924. "name": "tui",
  19925. "description": "Experimental HttpApi TUI routes."
  19926. },
  19927. {
  19928. "name": "workspace",
  19929. "description": "Experimental HttpApi workspace routes."
  19930. },
  19931. {
  19932. "name": "pty",
  19933. "description": "PTY websocket route."
  19934. }
  19935. ]
  19936. }