openapi.json 541 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835
  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": "instance",
  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": "instance",
  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": "instance",
  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/EventSessionCompacted"
  9096. },
  9097. {
  9098. "$ref": "#/components/schemas/Event.tui.prompt.append"
  9099. },
  9100. {
  9101. "$ref": "#/components/schemas/Event.tui.command.execute"
  9102. },
  9103. {
  9104. "$ref": "#/components/schemas/EventTuiToastShow1"
  9105. },
  9106. {
  9107. "$ref": "#/components/schemas/Event.tui.session.select"
  9108. },
  9109. {
  9110. "$ref": "#/components/schemas/EventMcpToolsChanged"
  9111. },
  9112. {
  9113. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  9114. },
  9115. {
  9116. "$ref": "#/components/schemas/EventCommandExecuted"
  9117. },
  9118. {
  9119. "$ref": "#/components/schemas/EventProjectUpdated"
  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/EventMessageUpdated"
  9159. },
  9160. {
  9161. "$ref": "#/components/schemas/EventMessageRemoved"
  9162. },
  9163. {
  9164. "$ref": "#/components/schemas/EventMessagePartUpdated"
  9165. },
  9166. {
  9167. "$ref": "#/components/schemas/EventMessagePartRemoved"
  9168. },
  9169. {
  9170. "$ref": "#/components/schemas/EventSessionCreated"
  9171. },
  9172. {
  9173. "$ref": "#/components/schemas/EventSessionUpdated"
  9174. },
  9175. {
  9176. "$ref": "#/components/schemas/EventSessionDeleted"
  9177. },
  9178. {
  9179. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  9180. },
  9181. {
  9182. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  9183. },
  9184. {
  9185. "$ref": "#/components/schemas/EventSessionNextPrompted"
  9186. },
  9187. {
  9188. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  9189. },
  9190. {
  9191. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  9192. },
  9193. {
  9194. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  9195. },
  9196. {
  9197. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  9198. },
  9199. {
  9200. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  9201. },
  9202. {
  9203. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  9204. },
  9205. {
  9206. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  9207. },
  9208. {
  9209. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  9210. },
  9211. {
  9212. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  9213. },
  9214. {
  9215. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  9216. },
  9217. {
  9218. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  9219. },
  9220. {
  9221. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  9222. },
  9223. {
  9224. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  9225. },
  9226. {
  9227. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  9228. },
  9229. {
  9230. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  9231. },
  9232. {
  9233. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  9234. },
  9235. {
  9236. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  9237. },
  9238. {
  9239. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  9240. },
  9241. {
  9242. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  9243. },
  9244. {
  9245. "$ref": "#/components/schemas/EventSessionNextRetried"
  9246. },
  9247. {
  9248. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  9249. },
  9250. {
  9251. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  9252. },
  9253. {
  9254. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  9255. },
  9256. {
  9257. "$ref": "#/components/schemas/EventServerConnected"
  9258. },
  9259. {
  9260. "$ref": "#/components/schemas/EventGlobalDisposed"
  9261. }
  9262. ]
  9263. },
  9264. "OAuth": {
  9265. "type": "object",
  9266. "properties": {
  9267. "type": {
  9268. "type": "string",
  9269. "enum": ["oauth"]
  9270. },
  9271. "refresh": {
  9272. "type": "string"
  9273. },
  9274. "access": {
  9275. "type": "string"
  9276. },
  9277. "expires": {
  9278. "type": "integer",
  9279. "minimum": 0
  9280. },
  9281. "accountId": {
  9282. "type": "string"
  9283. },
  9284. "enterpriseUrl": {
  9285. "type": "string"
  9286. }
  9287. },
  9288. "required": ["type", "refresh", "access", "expires"],
  9289. "additionalProperties": false
  9290. },
  9291. "ApiAuth": {
  9292. "type": "object",
  9293. "properties": {
  9294. "type": {
  9295. "type": "string",
  9296. "enum": ["api"]
  9297. },
  9298. "key": {
  9299. "type": "string"
  9300. },
  9301. "metadata": {
  9302. "type": "object",
  9303. "additionalProperties": {
  9304. "type": "string"
  9305. }
  9306. }
  9307. },
  9308. "required": ["type", "key"],
  9309. "additionalProperties": false
  9310. },
  9311. "WellKnownAuth": {
  9312. "type": "object",
  9313. "properties": {
  9314. "type": {
  9315. "type": "string",
  9316. "enum": ["wellknown"]
  9317. },
  9318. "key": {
  9319. "type": "string"
  9320. },
  9321. "token": {
  9322. "type": "string"
  9323. }
  9324. },
  9325. "required": ["type", "key", "token"],
  9326. "additionalProperties": false
  9327. },
  9328. "Auth": {
  9329. "anyOf": [
  9330. {
  9331. "$ref": "#/components/schemas/OAuth"
  9332. },
  9333. {
  9334. "$ref": "#/components/schemas/ApiAuth"
  9335. },
  9336. {
  9337. "$ref": "#/components/schemas/WellKnownAuth"
  9338. }
  9339. ]
  9340. },
  9341. "PermissionRequest": {
  9342. "type": "object",
  9343. "properties": {
  9344. "id": {
  9345. "type": "string",
  9346. "pattern": "^per"
  9347. },
  9348. "sessionID": {
  9349. "type": "string",
  9350. "pattern": "^ses"
  9351. },
  9352. "permission": {
  9353. "type": "string"
  9354. },
  9355. "patterns": {
  9356. "type": "array",
  9357. "items": {
  9358. "type": "string"
  9359. }
  9360. },
  9361. "metadata": {
  9362. "type": "object"
  9363. },
  9364. "always": {
  9365. "type": "array",
  9366. "items": {
  9367. "type": "string"
  9368. }
  9369. },
  9370. "tool": {
  9371. "type": "object",
  9372. "properties": {
  9373. "messageID": {
  9374. "type": "string",
  9375. "pattern": "^msg"
  9376. },
  9377. "callID": {
  9378. "type": "string"
  9379. }
  9380. },
  9381. "required": ["messageID", "callID"],
  9382. "additionalProperties": false
  9383. }
  9384. },
  9385. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  9386. "additionalProperties": false
  9387. },
  9388. "SnapshotFileDiff": {
  9389. "type": "object",
  9390. "properties": {
  9391. "file": {
  9392. "type": "string"
  9393. },
  9394. "patch": {
  9395. "type": "string"
  9396. },
  9397. "additions": {
  9398. "type": "number"
  9399. },
  9400. "deletions": {
  9401. "type": "number"
  9402. },
  9403. "status": {
  9404. "type": "string",
  9405. "enum": ["added", "deleted", "modified"]
  9406. }
  9407. },
  9408. "required": ["additions", "deletions"],
  9409. "additionalProperties": false
  9410. },
  9411. "ProviderAuthError": {
  9412. "type": "object",
  9413. "properties": {
  9414. "name": {
  9415. "type": "string",
  9416. "enum": ["ProviderAuthError"]
  9417. },
  9418. "data": {
  9419. "type": "object",
  9420. "properties": {
  9421. "providerID": {
  9422. "type": "string"
  9423. },
  9424. "message": {
  9425. "type": "string"
  9426. }
  9427. },
  9428. "required": ["providerID", "message"],
  9429. "additionalProperties": false
  9430. }
  9431. },
  9432. "required": ["name", "data"],
  9433. "additionalProperties": false
  9434. },
  9435. "UnknownError": {
  9436. "type": "object",
  9437. "properties": {
  9438. "name": {
  9439. "type": "string",
  9440. "enum": ["UnknownError"]
  9441. },
  9442. "data": {
  9443. "type": "object",
  9444. "properties": {
  9445. "message": {
  9446. "type": "string"
  9447. }
  9448. },
  9449. "required": ["message"],
  9450. "additionalProperties": false
  9451. }
  9452. },
  9453. "required": ["name", "data"],
  9454. "additionalProperties": false
  9455. },
  9456. "MessageOutputLengthError": {
  9457. "type": "object",
  9458. "properties": {
  9459. "name": {
  9460. "type": "string",
  9461. "enum": ["MessageOutputLengthError"]
  9462. },
  9463. "data": {
  9464. "type": "object",
  9465. "properties": {}
  9466. }
  9467. },
  9468. "required": ["name", "data"],
  9469. "additionalProperties": false
  9470. },
  9471. "MessageAbortedError": {
  9472. "type": "object",
  9473. "properties": {
  9474. "name": {
  9475. "type": "string",
  9476. "enum": ["MessageAbortedError"]
  9477. },
  9478. "data": {
  9479. "type": "object",
  9480. "properties": {
  9481. "message": {
  9482. "type": "string"
  9483. }
  9484. },
  9485. "required": ["message"],
  9486. "additionalProperties": false
  9487. }
  9488. },
  9489. "required": ["name", "data"],
  9490. "additionalProperties": false
  9491. },
  9492. "StructuredOutputError": {
  9493. "type": "object",
  9494. "properties": {
  9495. "name": {
  9496. "type": "string",
  9497. "enum": ["StructuredOutputError"]
  9498. },
  9499. "data": {
  9500. "type": "object",
  9501. "properties": {
  9502. "message": {
  9503. "type": "string"
  9504. },
  9505. "retries": {
  9506. "type": "integer",
  9507. "minimum": 0
  9508. }
  9509. },
  9510. "required": ["message", "retries"],
  9511. "additionalProperties": false
  9512. }
  9513. },
  9514. "required": ["name", "data"],
  9515. "additionalProperties": false
  9516. },
  9517. "ContextOverflowError": {
  9518. "type": "object",
  9519. "properties": {
  9520. "name": {
  9521. "type": "string",
  9522. "enum": ["ContextOverflowError"]
  9523. },
  9524. "data": {
  9525. "type": "object",
  9526. "properties": {
  9527. "message": {
  9528. "type": "string"
  9529. },
  9530. "responseBody": {
  9531. "type": "string"
  9532. }
  9533. },
  9534. "required": ["message"],
  9535. "additionalProperties": false
  9536. }
  9537. },
  9538. "required": ["name", "data"],
  9539. "additionalProperties": false
  9540. },
  9541. "APIError": {
  9542. "type": "object",
  9543. "properties": {
  9544. "name": {
  9545. "type": "string",
  9546. "enum": ["APIError"]
  9547. },
  9548. "data": {
  9549. "type": "object",
  9550. "properties": {
  9551. "message": {
  9552. "type": "string"
  9553. },
  9554. "statusCode": {
  9555. "type": "integer",
  9556. "minimum": 0
  9557. },
  9558. "isRetryable": {
  9559. "type": "boolean"
  9560. },
  9561. "responseHeaders": {
  9562. "type": "object",
  9563. "additionalProperties": {
  9564. "type": "string"
  9565. }
  9566. },
  9567. "responseBody": {
  9568. "type": "string"
  9569. },
  9570. "metadata": {
  9571. "type": "object",
  9572. "additionalProperties": {
  9573. "type": "string"
  9574. }
  9575. }
  9576. },
  9577. "required": ["message", "isRetryable"],
  9578. "additionalProperties": false
  9579. }
  9580. },
  9581. "required": ["name", "data"],
  9582. "additionalProperties": false
  9583. },
  9584. "QuestionOption": {
  9585. "type": "object",
  9586. "properties": {
  9587. "label": {
  9588. "type": "string",
  9589. "description": "Display text (1-5 words, concise)"
  9590. },
  9591. "description": {
  9592. "type": "string",
  9593. "description": "Explanation of choice"
  9594. }
  9595. },
  9596. "required": ["label", "description"],
  9597. "additionalProperties": false
  9598. },
  9599. "QuestionInfo": {
  9600. "type": "object",
  9601. "properties": {
  9602. "question": {
  9603. "type": "string",
  9604. "description": "Complete question"
  9605. },
  9606. "header": {
  9607. "type": "string",
  9608. "description": "Very short label (max 30 chars)"
  9609. },
  9610. "options": {
  9611. "type": "array",
  9612. "items": {
  9613. "$ref": "#/components/schemas/QuestionOption"
  9614. },
  9615. "description": "Available choices"
  9616. },
  9617. "multiple": {
  9618. "type": "boolean"
  9619. },
  9620. "custom": {
  9621. "type": "boolean"
  9622. }
  9623. },
  9624. "required": ["question", "header", "options"],
  9625. "additionalProperties": false
  9626. },
  9627. "QuestionTool": {
  9628. "type": "object",
  9629. "properties": {
  9630. "messageID": {
  9631. "type": "string",
  9632. "pattern": "^msg"
  9633. },
  9634. "callID": {
  9635. "type": "string"
  9636. }
  9637. },
  9638. "required": ["messageID", "callID"],
  9639. "additionalProperties": false
  9640. },
  9641. "QuestionRequest": {
  9642. "type": "object",
  9643. "properties": {
  9644. "id": {
  9645. "type": "string",
  9646. "pattern": "^que"
  9647. },
  9648. "sessionID": {
  9649. "type": "string",
  9650. "pattern": "^ses"
  9651. },
  9652. "questions": {
  9653. "type": "array",
  9654. "items": {
  9655. "$ref": "#/components/schemas/QuestionInfo"
  9656. },
  9657. "description": "Questions to ask"
  9658. },
  9659. "tool": {
  9660. "$ref": "#/components/schemas/QuestionTool"
  9661. }
  9662. },
  9663. "required": ["id", "sessionID", "questions"],
  9664. "additionalProperties": false
  9665. },
  9666. "QuestionAnswer": {
  9667. "type": "array",
  9668. "items": {
  9669. "type": "string"
  9670. }
  9671. },
  9672. "QuestionReplied": {
  9673. "type": "object",
  9674. "properties": {
  9675. "sessionID": {
  9676. "type": "string",
  9677. "pattern": "^ses"
  9678. },
  9679. "requestID": {
  9680. "type": "string",
  9681. "pattern": "^que"
  9682. },
  9683. "answers": {
  9684. "type": "array",
  9685. "items": {
  9686. "$ref": "#/components/schemas/QuestionAnswer"
  9687. }
  9688. }
  9689. },
  9690. "required": ["sessionID", "requestID", "answers"],
  9691. "additionalProperties": false
  9692. },
  9693. "QuestionRejected": {
  9694. "type": "object",
  9695. "properties": {
  9696. "sessionID": {
  9697. "type": "string",
  9698. "pattern": "^ses"
  9699. },
  9700. "requestID": {
  9701. "type": "string",
  9702. "pattern": "^que"
  9703. }
  9704. },
  9705. "required": ["sessionID", "requestID"],
  9706. "additionalProperties": false
  9707. },
  9708. "Todo": {
  9709. "type": "object",
  9710. "properties": {
  9711. "content": {
  9712. "type": "string",
  9713. "description": "Brief description of the task"
  9714. },
  9715. "status": {
  9716. "type": "string",
  9717. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  9718. },
  9719. "priority": {
  9720. "type": "string",
  9721. "description": "Priority level of the task: high, medium, low"
  9722. }
  9723. },
  9724. "required": ["content", "status", "priority"],
  9725. "additionalProperties": false
  9726. },
  9727. "SessionStatus": {
  9728. "anyOf": [
  9729. {
  9730. "type": "object",
  9731. "properties": {
  9732. "type": {
  9733. "type": "string",
  9734. "enum": ["idle"]
  9735. }
  9736. },
  9737. "required": ["type"],
  9738. "additionalProperties": false
  9739. },
  9740. {
  9741. "type": "object",
  9742. "properties": {
  9743. "type": {
  9744. "type": "string",
  9745. "enum": ["retry"]
  9746. },
  9747. "attempt": {
  9748. "type": "integer",
  9749. "minimum": 0
  9750. },
  9751. "message": {
  9752. "type": "string"
  9753. },
  9754. "action": {
  9755. "type": "object",
  9756. "properties": {
  9757. "reason": {
  9758. "type": "string"
  9759. },
  9760. "provider": {
  9761. "type": "string"
  9762. },
  9763. "title": {
  9764. "type": "string"
  9765. },
  9766. "message": {
  9767. "type": "string"
  9768. },
  9769. "label": {
  9770. "type": "string"
  9771. },
  9772. "link": {
  9773. "type": "string"
  9774. }
  9775. },
  9776. "required": ["reason", "provider", "title", "message", "label"],
  9777. "additionalProperties": false
  9778. },
  9779. "next": {
  9780. "type": "integer",
  9781. "minimum": 0
  9782. }
  9783. },
  9784. "required": ["type", "attempt", "message", "next"],
  9785. "additionalProperties": false
  9786. },
  9787. {
  9788. "type": "object",
  9789. "properties": {
  9790. "type": {
  9791. "type": "string",
  9792. "enum": ["busy"]
  9793. }
  9794. },
  9795. "required": ["type"],
  9796. "additionalProperties": false
  9797. }
  9798. ]
  9799. },
  9800. "Event.tui.prompt.append": {
  9801. "type": "object",
  9802. "properties": {
  9803. "id": {
  9804. "type": "string"
  9805. },
  9806. "type": {
  9807. "type": "string",
  9808. "enum": ["tui.prompt.append"]
  9809. },
  9810. "properties": {
  9811. "type": "object",
  9812. "properties": {
  9813. "text": {
  9814. "type": "string"
  9815. }
  9816. },
  9817. "required": ["text"],
  9818. "additionalProperties": false
  9819. }
  9820. },
  9821. "required": ["id", "type", "properties"],
  9822. "additionalProperties": false
  9823. },
  9824. "Event.tui.command.execute": {
  9825. "type": "object",
  9826. "properties": {
  9827. "id": {
  9828. "type": "string"
  9829. },
  9830. "type": {
  9831. "type": "string",
  9832. "enum": ["tui.command.execute"]
  9833. },
  9834. "properties": {
  9835. "type": "object",
  9836. "properties": {
  9837. "command": {
  9838. "anyOf": [
  9839. {
  9840. "type": "string",
  9841. "enum": [
  9842. "session.list",
  9843. "session.new",
  9844. "session.share",
  9845. "session.interrupt",
  9846. "session.compact",
  9847. "session.page.up",
  9848. "session.page.down",
  9849. "session.line.up",
  9850. "session.line.down",
  9851. "session.half.page.up",
  9852. "session.half.page.down",
  9853. "session.first",
  9854. "session.last",
  9855. "prompt.clear",
  9856. "prompt.submit",
  9857. "agent.cycle"
  9858. ]
  9859. },
  9860. {
  9861. "type": "string"
  9862. }
  9863. ]
  9864. }
  9865. },
  9866. "required": ["command"],
  9867. "additionalProperties": false
  9868. }
  9869. },
  9870. "required": ["id", "type", "properties"],
  9871. "additionalProperties": false
  9872. },
  9873. "Event.tui.toast.show": {
  9874. "type": "object",
  9875. "properties": {
  9876. "id": {
  9877. "type": "string"
  9878. },
  9879. "type": {
  9880. "type": "string",
  9881. "enum": ["tui.toast.show"]
  9882. },
  9883. "properties": {
  9884. "type": "object",
  9885. "properties": {
  9886. "title": {
  9887. "type": "string"
  9888. },
  9889. "message": {
  9890. "type": "string"
  9891. },
  9892. "variant": {
  9893. "type": "string",
  9894. "enum": ["info", "success", "warning", "error"]
  9895. },
  9896. "duration": {
  9897. "type": "integer",
  9898. "exclusiveMinimum": 0
  9899. }
  9900. },
  9901. "required": ["message", "variant"],
  9902. "additionalProperties": false
  9903. }
  9904. },
  9905. "required": ["id", "type", "properties"],
  9906. "additionalProperties": false
  9907. },
  9908. "Event.tui.session.select": {
  9909. "type": "object",
  9910. "properties": {
  9911. "id": {
  9912. "type": "string"
  9913. },
  9914. "type": {
  9915. "type": "string",
  9916. "enum": ["tui.session.select"]
  9917. },
  9918. "properties": {
  9919. "type": "object",
  9920. "properties": {
  9921. "sessionID": {
  9922. "type": "string",
  9923. "pattern": "^ses",
  9924. "description": "Session ID to navigate to"
  9925. }
  9926. },
  9927. "required": ["sessionID"],
  9928. "additionalProperties": false
  9929. }
  9930. },
  9931. "required": ["id", "type", "properties"],
  9932. "additionalProperties": false
  9933. },
  9934. "Project": {
  9935. "type": "object",
  9936. "properties": {
  9937. "id": {
  9938. "type": "string"
  9939. },
  9940. "worktree": {
  9941. "type": "string"
  9942. },
  9943. "vcs": {
  9944. "type": "string",
  9945. "enum": ["git"]
  9946. },
  9947. "name": {
  9948. "type": "string"
  9949. },
  9950. "icon": {
  9951. "type": "object",
  9952. "properties": {
  9953. "url": {
  9954. "type": "string"
  9955. },
  9956. "override": {
  9957. "type": "string"
  9958. },
  9959. "color": {
  9960. "type": "string"
  9961. }
  9962. },
  9963. "additionalProperties": false
  9964. },
  9965. "commands": {
  9966. "type": "object",
  9967. "properties": {
  9968. "start": {
  9969. "type": "string",
  9970. "description": "Startup script to run when creating a new workspace (worktree)"
  9971. }
  9972. },
  9973. "additionalProperties": false
  9974. },
  9975. "time": {
  9976. "type": "object",
  9977. "properties": {
  9978. "created": {
  9979. "type": "integer",
  9980. "minimum": 0
  9981. },
  9982. "updated": {
  9983. "type": "integer",
  9984. "minimum": 0
  9985. },
  9986. "initialized": {
  9987. "type": "integer",
  9988. "minimum": 0
  9989. }
  9990. },
  9991. "required": ["created", "updated"],
  9992. "additionalProperties": false
  9993. },
  9994. "sandboxes": {
  9995. "type": "array",
  9996. "items": {
  9997. "type": "string"
  9998. }
  9999. }
  10000. },
  10001. "required": ["id", "worktree", "time", "sandboxes"],
  10002. "additionalProperties": false
  10003. },
  10004. "Pty": {
  10005. "type": "object",
  10006. "properties": {
  10007. "id": {
  10008. "type": "string",
  10009. "pattern": "^pty"
  10010. },
  10011. "title": {
  10012. "type": "string"
  10013. },
  10014. "command": {
  10015. "type": "string"
  10016. },
  10017. "args": {
  10018. "type": "array",
  10019. "items": {
  10020. "type": "string"
  10021. }
  10022. },
  10023. "cwd": {
  10024. "type": "string"
  10025. },
  10026. "status": {
  10027. "type": "string",
  10028. "enum": ["running", "exited"]
  10029. },
  10030. "pid": {
  10031. "type": "integer",
  10032. "exclusiveMinimum": 0
  10033. }
  10034. },
  10035. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  10036. "additionalProperties": false
  10037. },
  10038. "OutputFormatText": {
  10039. "type": "object",
  10040. "properties": {
  10041. "type": {
  10042. "type": "string",
  10043. "enum": ["text"]
  10044. }
  10045. },
  10046. "required": ["type"],
  10047. "additionalProperties": false
  10048. },
  10049. "JSONSchema": {
  10050. "type": "object"
  10051. },
  10052. "OutputFormatJsonSchema": {
  10053. "type": "object",
  10054. "properties": {
  10055. "type": {
  10056. "type": "string",
  10057. "enum": ["json_schema"]
  10058. },
  10059. "schema": {
  10060. "$ref": "#/components/schemas/JSONSchema"
  10061. },
  10062. "retryCount": {
  10063. "type": "integer",
  10064. "minimum": 0
  10065. }
  10066. },
  10067. "required": ["type", "schema"],
  10068. "additionalProperties": false
  10069. },
  10070. "OutputFormat": {
  10071. "anyOf": [
  10072. {
  10073. "$ref": "#/components/schemas/OutputFormatText"
  10074. },
  10075. {
  10076. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  10077. }
  10078. ]
  10079. },
  10080. "UserMessage": {
  10081. "type": "object",
  10082. "properties": {
  10083. "id": {
  10084. "type": "string",
  10085. "pattern": "^msg"
  10086. },
  10087. "sessionID": {
  10088. "type": "string",
  10089. "pattern": "^ses"
  10090. },
  10091. "role": {
  10092. "type": "string",
  10093. "enum": ["user"]
  10094. },
  10095. "time": {
  10096. "type": "object",
  10097. "properties": {
  10098. "created": {
  10099. "type": "integer",
  10100. "minimum": 0
  10101. }
  10102. },
  10103. "required": ["created"],
  10104. "additionalProperties": false
  10105. },
  10106. "format": {
  10107. "$ref": "#/components/schemas/OutputFormat"
  10108. },
  10109. "summary": {
  10110. "type": "object",
  10111. "properties": {
  10112. "title": {
  10113. "type": "string"
  10114. },
  10115. "body": {
  10116. "type": "string"
  10117. },
  10118. "diffs": {
  10119. "type": "array",
  10120. "items": {
  10121. "$ref": "#/components/schemas/SnapshotFileDiff"
  10122. }
  10123. }
  10124. },
  10125. "required": ["diffs"],
  10126. "additionalProperties": false
  10127. },
  10128. "agent": {
  10129. "type": "string"
  10130. },
  10131. "model": {
  10132. "type": "object",
  10133. "properties": {
  10134. "providerID": {
  10135. "type": "string"
  10136. },
  10137. "modelID": {
  10138. "type": "string"
  10139. },
  10140. "variant": {
  10141. "type": "string"
  10142. }
  10143. },
  10144. "required": ["providerID", "modelID"],
  10145. "additionalProperties": false
  10146. },
  10147. "system": {
  10148. "type": "string"
  10149. },
  10150. "tools": {
  10151. "type": "object",
  10152. "additionalProperties": {
  10153. "type": "boolean"
  10154. }
  10155. }
  10156. },
  10157. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  10158. "additionalProperties": false
  10159. },
  10160. "AssistantMessage": {
  10161. "type": "object",
  10162. "properties": {
  10163. "id": {
  10164. "type": "string",
  10165. "pattern": "^msg"
  10166. },
  10167. "sessionID": {
  10168. "type": "string",
  10169. "pattern": "^ses"
  10170. },
  10171. "role": {
  10172. "type": "string",
  10173. "enum": ["assistant"]
  10174. },
  10175. "time": {
  10176. "type": "object",
  10177. "properties": {
  10178. "created": {
  10179. "type": "integer",
  10180. "minimum": 0
  10181. },
  10182. "completed": {
  10183. "type": "integer",
  10184. "minimum": 0
  10185. }
  10186. },
  10187. "required": ["created"],
  10188. "additionalProperties": false
  10189. },
  10190. "error": {
  10191. "anyOf": [
  10192. {
  10193. "$ref": "#/components/schemas/ProviderAuthError"
  10194. },
  10195. {
  10196. "$ref": "#/components/schemas/UnknownError"
  10197. },
  10198. {
  10199. "$ref": "#/components/schemas/MessageOutputLengthError"
  10200. },
  10201. {
  10202. "$ref": "#/components/schemas/MessageAbortedError"
  10203. },
  10204. {
  10205. "$ref": "#/components/schemas/StructuredOutputError"
  10206. },
  10207. {
  10208. "$ref": "#/components/schemas/ContextOverflowError"
  10209. },
  10210. {
  10211. "$ref": "#/components/schemas/APIError"
  10212. }
  10213. ]
  10214. },
  10215. "parentID": {
  10216. "type": "string",
  10217. "pattern": "^msg"
  10218. },
  10219. "modelID": {
  10220. "type": "string"
  10221. },
  10222. "providerID": {
  10223. "type": "string"
  10224. },
  10225. "mode": {
  10226. "type": "string"
  10227. },
  10228. "agent": {
  10229. "type": "string"
  10230. },
  10231. "path": {
  10232. "type": "object",
  10233. "properties": {
  10234. "cwd": {
  10235. "type": "string"
  10236. },
  10237. "root": {
  10238. "type": "string"
  10239. }
  10240. },
  10241. "required": ["cwd", "root"],
  10242. "additionalProperties": false
  10243. },
  10244. "summary": {
  10245. "type": "boolean"
  10246. },
  10247. "cost": {
  10248. "type": "number"
  10249. },
  10250. "tokens": {
  10251. "type": "object",
  10252. "properties": {
  10253. "total": {
  10254. "type": "number"
  10255. },
  10256. "input": {
  10257. "type": "number"
  10258. },
  10259. "output": {
  10260. "type": "number"
  10261. },
  10262. "reasoning": {
  10263. "type": "number"
  10264. },
  10265. "cache": {
  10266. "type": "object",
  10267. "properties": {
  10268. "read": {
  10269. "type": "number"
  10270. },
  10271. "write": {
  10272. "type": "number"
  10273. }
  10274. },
  10275. "required": ["read", "write"],
  10276. "additionalProperties": false
  10277. }
  10278. },
  10279. "required": ["input", "output", "reasoning", "cache"],
  10280. "additionalProperties": false
  10281. },
  10282. "structured": {},
  10283. "variant": {
  10284. "type": "string"
  10285. },
  10286. "finish": {
  10287. "type": "string"
  10288. }
  10289. },
  10290. "required": [
  10291. "id",
  10292. "sessionID",
  10293. "role",
  10294. "time",
  10295. "parentID",
  10296. "modelID",
  10297. "providerID",
  10298. "mode",
  10299. "agent",
  10300. "path",
  10301. "cost",
  10302. "tokens"
  10303. ],
  10304. "additionalProperties": false
  10305. },
  10306. "Message": {
  10307. "anyOf": [
  10308. {
  10309. "$ref": "#/components/schemas/UserMessage"
  10310. },
  10311. {
  10312. "$ref": "#/components/schemas/AssistantMessage"
  10313. }
  10314. ]
  10315. },
  10316. "TextPart": {
  10317. "type": "object",
  10318. "properties": {
  10319. "id": {
  10320. "type": "string",
  10321. "pattern": "^prt"
  10322. },
  10323. "sessionID": {
  10324. "type": "string",
  10325. "pattern": "^ses"
  10326. },
  10327. "messageID": {
  10328. "type": "string",
  10329. "pattern": "^msg"
  10330. },
  10331. "type": {
  10332. "type": "string",
  10333. "enum": ["text"]
  10334. },
  10335. "text": {
  10336. "type": "string"
  10337. },
  10338. "synthetic": {
  10339. "type": "boolean"
  10340. },
  10341. "ignored": {
  10342. "type": "boolean"
  10343. },
  10344. "time": {
  10345. "type": "object",
  10346. "properties": {
  10347. "start": {
  10348. "type": "integer",
  10349. "minimum": 0
  10350. },
  10351. "end": {
  10352. "type": "integer",
  10353. "minimum": 0
  10354. }
  10355. },
  10356. "required": ["start"],
  10357. "additionalProperties": false
  10358. },
  10359. "metadata": {
  10360. "type": "object"
  10361. }
  10362. },
  10363. "required": ["id", "sessionID", "messageID", "type", "text"],
  10364. "additionalProperties": false
  10365. },
  10366. "SubtaskPart": {
  10367. "type": "object",
  10368. "properties": {
  10369. "id": {
  10370. "type": "string",
  10371. "pattern": "^prt"
  10372. },
  10373. "sessionID": {
  10374. "type": "string",
  10375. "pattern": "^ses"
  10376. },
  10377. "messageID": {
  10378. "type": "string",
  10379. "pattern": "^msg"
  10380. },
  10381. "type": {
  10382. "type": "string",
  10383. "enum": ["subtask"]
  10384. },
  10385. "prompt": {
  10386. "type": "string"
  10387. },
  10388. "description": {
  10389. "type": "string"
  10390. },
  10391. "agent": {
  10392. "type": "string"
  10393. },
  10394. "model": {
  10395. "type": "object",
  10396. "properties": {
  10397. "providerID": {
  10398. "type": "string"
  10399. },
  10400. "modelID": {
  10401. "type": "string"
  10402. }
  10403. },
  10404. "required": ["providerID", "modelID"],
  10405. "additionalProperties": false
  10406. },
  10407. "command": {
  10408. "type": "string"
  10409. }
  10410. },
  10411. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  10412. "additionalProperties": false
  10413. },
  10414. "ReasoningPart": {
  10415. "type": "object",
  10416. "properties": {
  10417. "id": {
  10418. "type": "string",
  10419. "pattern": "^prt"
  10420. },
  10421. "sessionID": {
  10422. "type": "string",
  10423. "pattern": "^ses"
  10424. },
  10425. "messageID": {
  10426. "type": "string",
  10427. "pattern": "^msg"
  10428. },
  10429. "type": {
  10430. "type": "string",
  10431. "enum": ["reasoning"]
  10432. },
  10433. "text": {
  10434. "type": "string"
  10435. },
  10436. "metadata": {
  10437. "type": "object"
  10438. },
  10439. "time": {
  10440. "type": "object",
  10441. "properties": {
  10442. "start": {
  10443. "type": "integer",
  10444. "minimum": 0
  10445. },
  10446. "end": {
  10447. "type": "integer",
  10448. "minimum": 0
  10449. }
  10450. },
  10451. "required": ["start"],
  10452. "additionalProperties": false
  10453. }
  10454. },
  10455. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  10456. "additionalProperties": false
  10457. },
  10458. "FilePartSourceText": {
  10459. "type": "object",
  10460. "properties": {
  10461. "value": {
  10462. "type": "string"
  10463. },
  10464. "start": {
  10465. "type": "number"
  10466. },
  10467. "end": {
  10468. "type": "number"
  10469. }
  10470. },
  10471. "required": ["value", "start", "end"],
  10472. "additionalProperties": false
  10473. },
  10474. "FileSource": {
  10475. "type": "object",
  10476. "properties": {
  10477. "text": {
  10478. "$ref": "#/components/schemas/FilePartSourceText"
  10479. },
  10480. "type": {
  10481. "type": "string",
  10482. "enum": ["file"]
  10483. },
  10484. "path": {
  10485. "type": "string"
  10486. }
  10487. },
  10488. "required": ["text", "type", "path"],
  10489. "additionalProperties": false
  10490. },
  10491. "Range": {
  10492. "type": "object",
  10493. "properties": {
  10494. "start": {
  10495. "type": "object",
  10496. "properties": {
  10497. "line": {
  10498. "type": "integer",
  10499. "minimum": 0
  10500. },
  10501. "character": {
  10502. "type": "integer",
  10503. "minimum": 0
  10504. }
  10505. },
  10506. "required": ["line", "character"],
  10507. "additionalProperties": false
  10508. },
  10509. "end": {
  10510. "type": "object",
  10511. "properties": {
  10512. "line": {
  10513. "type": "integer",
  10514. "minimum": 0
  10515. },
  10516. "character": {
  10517. "type": "integer",
  10518. "minimum": 0
  10519. }
  10520. },
  10521. "required": ["line", "character"],
  10522. "additionalProperties": false
  10523. }
  10524. },
  10525. "required": ["start", "end"],
  10526. "additionalProperties": false
  10527. },
  10528. "SymbolSource": {
  10529. "type": "object",
  10530. "properties": {
  10531. "text": {
  10532. "$ref": "#/components/schemas/FilePartSourceText"
  10533. },
  10534. "type": {
  10535. "type": "string",
  10536. "enum": ["symbol"]
  10537. },
  10538. "path": {
  10539. "type": "string"
  10540. },
  10541. "range": {
  10542. "$ref": "#/components/schemas/Range"
  10543. },
  10544. "name": {
  10545. "type": "string"
  10546. },
  10547. "kind": {
  10548. "type": "integer",
  10549. "minimum": 0
  10550. }
  10551. },
  10552. "required": ["text", "type", "path", "range", "name", "kind"],
  10553. "additionalProperties": false
  10554. },
  10555. "ResourceSource": {
  10556. "type": "object",
  10557. "properties": {
  10558. "text": {
  10559. "$ref": "#/components/schemas/FilePartSourceText"
  10560. },
  10561. "type": {
  10562. "type": "string",
  10563. "enum": ["resource"]
  10564. },
  10565. "clientName": {
  10566. "type": "string"
  10567. },
  10568. "uri": {
  10569. "type": "string"
  10570. }
  10571. },
  10572. "required": ["text", "type", "clientName", "uri"],
  10573. "additionalProperties": false
  10574. },
  10575. "FilePartSource": {
  10576. "anyOf": [
  10577. {
  10578. "$ref": "#/components/schemas/FileSource"
  10579. },
  10580. {
  10581. "$ref": "#/components/schemas/SymbolSource"
  10582. },
  10583. {
  10584. "$ref": "#/components/schemas/ResourceSource"
  10585. }
  10586. ]
  10587. },
  10588. "FilePart": {
  10589. "type": "object",
  10590. "properties": {
  10591. "id": {
  10592. "type": "string",
  10593. "pattern": "^prt"
  10594. },
  10595. "sessionID": {
  10596. "type": "string",
  10597. "pattern": "^ses"
  10598. },
  10599. "messageID": {
  10600. "type": "string",
  10601. "pattern": "^msg"
  10602. },
  10603. "type": {
  10604. "type": "string",
  10605. "enum": ["file"]
  10606. },
  10607. "mime": {
  10608. "type": "string"
  10609. },
  10610. "filename": {
  10611. "type": "string"
  10612. },
  10613. "url": {
  10614. "type": "string"
  10615. },
  10616. "source": {
  10617. "$ref": "#/components/schemas/FilePartSource"
  10618. }
  10619. },
  10620. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  10621. "additionalProperties": false
  10622. },
  10623. "ToolStatePending": {
  10624. "type": "object",
  10625. "properties": {
  10626. "status": {
  10627. "type": "string",
  10628. "enum": ["pending"]
  10629. },
  10630. "input": {
  10631. "type": "object"
  10632. },
  10633. "raw": {
  10634. "type": "string"
  10635. }
  10636. },
  10637. "required": ["status", "input", "raw"],
  10638. "additionalProperties": false
  10639. },
  10640. "ToolStateRunning": {
  10641. "type": "object",
  10642. "properties": {
  10643. "status": {
  10644. "type": "string",
  10645. "enum": ["running"]
  10646. },
  10647. "input": {
  10648. "type": "object"
  10649. },
  10650. "title": {
  10651. "type": "string"
  10652. },
  10653. "metadata": {
  10654. "type": "object"
  10655. },
  10656. "time": {
  10657. "type": "object",
  10658. "properties": {
  10659. "start": {
  10660. "type": "integer",
  10661. "minimum": 0
  10662. }
  10663. },
  10664. "required": ["start"],
  10665. "additionalProperties": false
  10666. }
  10667. },
  10668. "required": ["status", "input", "time"],
  10669. "additionalProperties": false
  10670. },
  10671. "ToolStateCompleted": {
  10672. "type": "object",
  10673. "properties": {
  10674. "status": {
  10675. "type": "string",
  10676. "enum": ["completed"]
  10677. },
  10678. "input": {
  10679. "type": "object"
  10680. },
  10681. "output": {
  10682. "type": "string"
  10683. },
  10684. "title": {
  10685. "type": "string"
  10686. },
  10687. "metadata": {
  10688. "type": "object"
  10689. },
  10690. "time": {
  10691. "type": "object",
  10692. "properties": {
  10693. "start": {
  10694. "type": "integer",
  10695. "minimum": 0
  10696. },
  10697. "end": {
  10698. "type": "integer",
  10699. "minimum": 0
  10700. },
  10701. "compacted": {
  10702. "type": "integer",
  10703. "minimum": 0
  10704. }
  10705. },
  10706. "required": ["start", "end"],
  10707. "additionalProperties": false
  10708. },
  10709. "attachments": {
  10710. "type": "array",
  10711. "items": {
  10712. "$ref": "#/components/schemas/FilePart"
  10713. }
  10714. }
  10715. },
  10716. "required": ["status", "input", "output", "title", "metadata", "time"],
  10717. "additionalProperties": false
  10718. },
  10719. "ToolStateError": {
  10720. "type": "object",
  10721. "properties": {
  10722. "status": {
  10723. "type": "string",
  10724. "enum": ["error"]
  10725. },
  10726. "input": {
  10727. "type": "object"
  10728. },
  10729. "error": {
  10730. "type": "string"
  10731. },
  10732. "metadata": {
  10733. "type": "object"
  10734. },
  10735. "time": {
  10736. "type": "object",
  10737. "properties": {
  10738. "start": {
  10739. "type": "integer",
  10740. "minimum": 0
  10741. },
  10742. "end": {
  10743. "type": "integer",
  10744. "minimum": 0
  10745. }
  10746. },
  10747. "required": ["start", "end"],
  10748. "additionalProperties": false
  10749. }
  10750. },
  10751. "required": ["status", "input", "error", "time"],
  10752. "additionalProperties": false
  10753. },
  10754. "ToolState": {
  10755. "anyOf": [
  10756. {
  10757. "$ref": "#/components/schemas/ToolStatePending"
  10758. },
  10759. {
  10760. "$ref": "#/components/schemas/ToolStateRunning"
  10761. },
  10762. {
  10763. "$ref": "#/components/schemas/ToolStateCompleted"
  10764. },
  10765. {
  10766. "$ref": "#/components/schemas/ToolStateError"
  10767. }
  10768. ]
  10769. },
  10770. "ToolPart": {
  10771. "type": "object",
  10772. "properties": {
  10773. "id": {
  10774. "type": "string",
  10775. "pattern": "^prt"
  10776. },
  10777. "sessionID": {
  10778. "type": "string",
  10779. "pattern": "^ses"
  10780. },
  10781. "messageID": {
  10782. "type": "string",
  10783. "pattern": "^msg"
  10784. },
  10785. "type": {
  10786. "type": "string",
  10787. "enum": ["tool"]
  10788. },
  10789. "callID": {
  10790. "type": "string"
  10791. },
  10792. "tool": {
  10793. "type": "string"
  10794. },
  10795. "state": {
  10796. "$ref": "#/components/schemas/ToolState"
  10797. },
  10798. "metadata": {
  10799. "type": "object"
  10800. }
  10801. },
  10802. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  10803. "additionalProperties": false
  10804. },
  10805. "StepStartPart": {
  10806. "type": "object",
  10807. "properties": {
  10808. "id": {
  10809. "type": "string",
  10810. "pattern": "^prt"
  10811. },
  10812. "sessionID": {
  10813. "type": "string",
  10814. "pattern": "^ses"
  10815. },
  10816. "messageID": {
  10817. "type": "string",
  10818. "pattern": "^msg"
  10819. },
  10820. "type": {
  10821. "type": "string",
  10822. "enum": ["step-start"]
  10823. },
  10824. "snapshot": {
  10825. "type": "string"
  10826. }
  10827. },
  10828. "required": ["id", "sessionID", "messageID", "type"],
  10829. "additionalProperties": false
  10830. },
  10831. "StepFinishPart": {
  10832. "type": "object",
  10833. "properties": {
  10834. "id": {
  10835. "type": "string",
  10836. "pattern": "^prt"
  10837. },
  10838. "sessionID": {
  10839. "type": "string",
  10840. "pattern": "^ses"
  10841. },
  10842. "messageID": {
  10843. "type": "string",
  10844. "pattern": "^msg"
  10845. },
  10846. "type": {
  10847. "type": "string",
  10848. "enum": ["step-finish"]
  10849. },
  10850. "reason": {
  10851. "type": "string"
  10852. },
  10853. "snapshot": {
  10854. "type": "string"
  10855. },
  10856. "cost": {
  10857. "type": "number"
  10858. },
  10859. "tokens": {
  10860. "type": "object",
  10861. "properties": {
  10862. "total": {
  10863. "type": "number"
  10864. },
  10865. "input": {
  10866. "type": "number"
  10867. },
  10868. "output": {
  10869. "type": "number"
  10870. },
  10871. "reasoning": {
  10872. "type": "number"
  10873. },
  10874. "cache": {
  10875. "type": "object",
  10876. "properties": {
  10877. "read": {
  10878. "type": "number"
  10879. },
  10880. "write": {
  10881. "type": "number"
  10882. }
  10883. },
  10884. "required": ["read", "write"],
  10885. "additionalProperties": false
  10886. }
  10887. },
  10888. "required": ["input", "output", "reasoning", "cache"],
  10889. "additionalProperties": false
  10890. }
  10891. },
  10892. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  10893. "additionalProperties": false
  10894. },
  10895. "SnapshotPart": {
  10896. "type": "object",
  10897. "properties": {
  10898. "id": {
  10899. "type": "string",
  10900. "pattern": "^prt"
  10901. },
  10902. "sessionID": {
  10903. "type": "string",
  10904. "pattern": "^ses"
  10905. },
  10906. "messageID": {
  10907. "type": "string",
  10908. "pattern": "^msg"
  10909. },
  10910. "type": {
  10911. "type": "string",
  10912. "enum": ["snapshot"]
  10913. },
  10914. "snapshot": {
  10915. "type": "string"
  10916. }
  10917. },
  10918. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  10919. "additionalProperties": false
  10920. },
  10921. "PatchPart": {
  10922. "type": "object",
  10923. "properties": {
  10924. "id": {
  10925. "type": "string",
  10926. "pattern": "^prt"
  10927. },
  10928. "sessionID": {
  10929. "type": "string",
  10930. "pattern": "^ses"
  10931. },
  10932. "messageID": {
  10933. "type": "string",
  10934. "pattern": "^msg"
  10935. },
  10936. "type": {
  10937. "type": "string",
  10938. "enum": ["patch"]
  10939. },
  10940. "hash": {
  10941. "type": "string"
  10942. },
  10943. "files": {
  10944. "type": "array",
  10945. "items": {
  10946. "type": "string"
  10947. }
  10948. }
  10949. },
  10950. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  10951. "additionalProperties": false
  10952. },
  10953. "AgentPart": {
  10954. "type": "object",
  10955. "properties": {
  10956. "id": {
  10957. "type": "string",
  10958. "pattern": "^prt"
  10959. },
  10960. "sessionID": {
  10961. "type": "string",
  10962. "pattern": "^ses"
  10963. },
  10964. "messageID": {
  10965. "type": "string",
  10966. "pattern": "^msg"
  10967. },
  10968. "type": {
  10969. "type": "string",
  10970. "enum": ["agent"]
  10971. },
  10972. "name": {
  10973. "type": "string"
  10974. },
  10975. "source": {
  10976. "type": "object",
  10977. "properties": {
  10978. "value": {
  10979. "type": "string"
  10980. },
  10981. "start": {
  10982. "type": "integer",
  10983. "minimum": 0
  10984. },
  10985. "end": {
  10986. "type": "integer",
  10987. "minimum": 0
  10988. }
  10989. },
  10990. "required": ["value", "start", "end"],
  10991. "additionalProperties": false
  10992. }
  10993. },
  10994. "required": ["id", "sessionID", "messageID", "type", "name"],
  10995. "additionalProperties": false
  10996. },
  10997. "RetryPart": {
  10998. "type": "object",
  10999. "properties": {
  11000. "id": {
  11001. "type": "string",
  11002. "pattern": "^prt"
  11003. },
  11004. "sessionID": {
  11005. "type": "string",
  11006. "pattern": "^ses"
  11007. },
  11008. "messageID": {
  11009. "type": "string",
  11010. "pattern": "^msg"
  11011. },
  11012. "type": {
  11013. "type": "string",
  11014. "enum": ["retry"]
  11015. },
  11016. "attempt": {
  11017. "type": "integer",
  11018. "minimum": 0
  11019. },
  11020. "error": {
  11021. "$ref": "#/components/schemas/APIError"
  11022. },
  11023. "time": {
  11024. "type": "object",
  11025. "properties": {
  11026. "created": {
  11027. "type": "integer",
  11028. "minimum": 0
  11029. }
  11030. },
  11031. "required": ["created"],
  11032. "additionalProperties": false
  11033. }
  11034. },
  11035. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  11036. "additionalProperties": false
  11037. },
  11038. "CompactionPart": {
  11039. "type": "object",
  11040. "properties": {
  11041. "id": {
  11042. "type": "string",
  11043. "pattern": "^prt"
  11044. },
  11045. "sessionID": {
  11046. "type": "string",
  11047. "pattern": "^ses"
  11048. },
  11049. "messageID": {
  11050. "type": "string",
  11051. "pattern": "^msg"
  11052. },
  11053. "type": {
  11054. "type": "string",
  11055. "enum": ["compaction"]
  11056. },
  11057. "auto": {
  11058. "type": "boolean"
  11059. },
  11060. "overflow": {
  11061. "type": "boolean"
  11062. },
  11063. "tail_start_id": {
  11064. "type": "string",
  11065. "pattern": "^msg"
  11066. }
  11067. },
  11068. "required": ["id", "sessionID", "messageID", "type", "auto"],
  11069. "additionalProperties": false
  11070. },
  11071. "Part": {
  11072. "anyOf": [
  11073. {
  11074. "$ref": "#/components/schemas/TextPart"
  11075. },
  11076. {
  11077. "$ref": "#/components/schemas/SubtaskPart"
  11078. },
  11079. {
  11080. "$ref": "#/components/schemas/ReasoningPart"
  11081. },
  11082. {
  11083. "$ref": "#/components/schemas/FilePart"
  11084. },
  11085. {
  11086. "$ref": "#/components/schemas/ToolPart"
  11087. },
  11088. {
  11089. "$ref": "#/components/schemas/StepStartPart"
  11090. },
  11091. {
  11092. "$ref": "#/components/schemas/StepFinishPart"
  11093. },
  11094. {
  11095. "$ref": "#/components/schemas/SnapshotPart"
  11096. },
  11097. {
  11098. "$ref": "#/components/schemas/PatchPart"
  11099. },
  11100. {
  11101. "$ref": "#/components/schemas/AgentPart"
  11102. },
  11103. {
  11104. "$ref": "#/components/schemas/RetryPart"
  11105. },
  11106. {
  11107. "$ref": "#/components/schemas/CompactionPart"
  11108. }
  11109. ]
  11110. },
  11111. "PermissionAction": {
  11112. "type": "string",
  11113. "enum": ["allow", "deny", "ask"]
  11114. },
  11115. "PermissionRule": {
  11116. "type": "object",
  11117. "properties": {
  11118. "permission": {
  11119. "type": "string"
  11120. },
  11121. "pattern": {
  11122. "type": "string"
  11123. },
  11124. "action": {
  11125. "$ref": "#/components/schemas/PermissionAction"
  11126. }
  11127. },
  11128. "required": ["permission", "pattern", "action"],
  11129. "additionalProperties": false
  11130. },
  11131. "PermissionRuleset": {
  11132. "type": "array",
  11133. "items": {
  11134. "$ref": "#/components/schemas/PermissionRule"
  11135. }
  11136. },
  11137. "Session": {
  11138. "type": "object",
  11139. "properties": {
  11140. "id": {
  11141. "type": "string",
  11142. "pattern": "^ses"
  11143. },
  11144. "slug": {
  11145. "type": "string"
  11146. },
  11147. "projectID": {
  11148. "type": "string"
  11149. },
  11150. "workspaceID": {
  11151. "type": "string",
  11152. "pattern": "^wrk"
  11153. },
  11154. "directory": {
  11155. "type": "string"
  11156. },
  11157. "path": {
  11158. "type": "string"
  11159. },
  11160. "parentID": {
  11161. "type": "string",
  11162. "pattern": "^ses"
  11163. },
  11164. "summary": {
  11165. "type": "object",
  11166. "properties": {
  11167. "additions": {
  11168. "type": "number"
  11169. },
  11170. "deletions": {
  11171. "type": "number"
  11172. },
  11173. "files": {
  11174. "type": "number"
  11175. },
  11176. "diffs": {
  11177. "type": "array",
  11178. "items": {
  11179. "$ref": "#/components/schemas/SnapshotFileDiff"
  11180. }
  11181. }
  11182. },
  11183. "required": ["additions", "deletions", "files"],
  11184. "additionalProperties": false
  11185. },
  11186. "cost": {
  11187. "type": "number"
  11188. },
  11189. "tokens": {
  11190. "type": "object",
  11191. "properties": {
  11192. "input": {
  11193. "type": "number"
  11194. },
  11195. "output": {
  11196. "type": "number"
  11197. },
  11198. "reasoning": {
  11199. "type": "number"
  11200. },
  11201. "cache": {
  11202. "type": "object",
  11203. "properties": {
  11204. "read": {
  11205. "type": "number"
  11206. },
  11207. "write": {
  11208. "type": "number"
  11209. }
  11210. },
  11211. "required": ["read", "write"],
  11212. "additionalProperties": false
  11213. }
  11214. },
  11215. "required": ["input", "output", "reasoning", "cache"],
  11216. "additionalProperties": false
  11217. },
  11218. "share": {
  11219. "type": "object",
  11220. "properties": {
  11221. "url": {
  11222. "type": "string"
  11223. }
  11224. },
  11225. "required": ["url"],
  11226. "additionalProperties": false
  11227. },
  11228. "title": {
  11229. "type": "string"
  11230. },
  11231. "agent": {
  11232. "type": "string"
  11233. },
  11234. "model": {
  11235. "type": "object",
  11236. "properties": {
  11237. "id": {
  11238. "type": "string"
  11239. },
  11240. "providerID": {
  11241. "type": "string"
  11242. },
  11243. "variant": {
  11244. "type": "string"
  11245. }
  11246. },
  11247. "required": ["id", "providerID"],
  11248. "additionalProperties": false
  11249. },
  11250. "version": {
  11251. "type": "string"
  11252. },
  11253. "time": {
  11254. "type": "object",
  11255. "properties": {
  11256. "created": {
  11257. "type": "integer",
  11258. "minimum": 0
  11259. },
  11260. "updated": {
  11261. "type": "integer",
  11262. "minimum": 0
  11263. },
  11264. "compacting": {
  11265. "type": "integer",
  11266. "minimum": 0
  11267. },
  11268. "archived": {
  11269. "type": "number"
  11270. }
  11271. },
  11272. "required": ["created", "updated"],
  11273. "additionalProperties": false
  11274. },
  11275. "permission": {
  11276. "$ref": "#/components/schemas/PermissionRuleset"
  11277. },
  11278. "revert": {
  11279. "type": "object",
  11280. "properties": {
  11281. "messageID": {
  11282. "type": "string",
  11283. "pattern": "^msg"
  11284. },
  11285. "partID": {
  11286. "type": "string",
  11287. "pattern": "^prt"
  11288. },
  11289. "snapshot": {
  11290. "type": "string"
  11291. },
  11292. "diff": {
  11293. "type": "string"
  11294. }
  11295. },
  11296. "required": ["messageID"],
  11297. "additionalProperties": false
  11298. }
  11299. },
  11300. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11301. "additionalProperties": false
  11302. },
  11303. "Prompt": {
  11304. "type": "object",
  11305. "properties": {
  11306. "text": {
  11307. "type": "string"
  11308. },
  11309. "files": {
  11310. "type": "array",
  11311. "items": {
  11312. "$ref": "#/components/schemas/PromptFileAttachment"
  11313. }
  11314. },
  11315. "agents": {
  11316. "type": "array",
  11317. "items": {
  11318. "$ref": "#/components/schemas/PromptAgentAttachment"
  11319. }
  11320. },
  11321. "references": {
  11322. "type": "array",
  11323. "items": {
  11324. "$ref": "#/components/schemas/PromptReferenceAttachment"
  11325. }
  11326. }
  11327. },
  11328. "required": ["text"],
  11329. "additionalProperties": false
  11330. },
  11331. "GlobalEvent": {
  11332. "type": "object",
  11333. "properties": {
  11334. "directory": {
  11335. "type": "string"
  11336. },
  11337. "project": {
  11338. "type": "string"
  11339. },
  11340. "workspace": {
  11341. "type": "string"
  11342. },
  11343. "payload": {
  11344. "anyOf": [
  11345. {
  11346. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  11347. },
  11348. {
  11349. "$ref": "#/components/schemas/EventFileEdited"
  11350. },
  11351. {
  11352. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  11353. },
  11354. {
  11355. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  11356. },
  11357. {
  11358. "$ref": "#/components/schemas/EventLspUpdated"
  11359. },
  11360. {
  11361. "$ref": "#/components/schemas/EventMessagePartDelta"
  11362. },
  11363. {
  11364. "$ref": "#/components/schemas/EventPermissionAsked"
  11365. },
  11366. {
  11367. "$ref": "#/components/schemas/EventPermissionReplied"
  11368. },
  11369. {
  11370. "$ref": "#/components/schemas/EventSessionDiff"
  11371. },
  11372. {
  11373. "$ref": "#/components/schemas/EventSessionError"
  11374. },
  11375. {
  11376. "$ref": "#/components/schemas/EventQuestionAsked"
  11377. },
  11378. {
  11379. "$ref": "#/components/schemas/EventQuestionReplied"
  11380. },
  11381. {
  11382. "$ref": "#/components/schemas/EventQuestionRejected"
  11383. },
  11384. {
  11385. "$ref": "#/components/schemas/EventTodoUpdated"
  11386. },
  11387. {
  11388. "$ref": "#/components/schemas/EventSessionStatus"
  11389. },
  11390. {
  11391. "$ref": "#/components/schemas/EventSessionIdle"
  11392. },
  11393. {
  11394. "$ref": "#/components/schemas/EventSessionCompacted"
  11395. },
  11396. {
  11397. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11398. },
  11399. {
  11400. "$ref": "#/components/schemas/Event.tui.command.execute"
  11401. },
  11402. {
  11403. "$ref": "#/components/schemas/Event.tui.toast.show"
  11404. },
  11405. {
  11406. "$ref": "#/components/schemas/Event.tui.session.select"
  11407. },
  11408. {
  11409. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11410. },
  11411. {
  11412. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11413. },
  11414. {
  11415. "$ref": "#/components/schemas/EventCommandExecuted"
  11416. },
  11417. {
  11418. "$ref": "#/components/schemas/EventProjectUpdated"
  11419. },
  11420. {
  11421. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11422. },
  11423. {
  11424. "$ref": "#/components/schemas/EventWorkspaceReady"
  11425. },
  11426. {
  11427. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11428. },
  11429. {
  11430. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11431. },
  11432. {
  11433. "$ref": "#/components/schemas/EventWorktreeReady"
  11434. },
  11435. {
  11436. "$ref": "#/components/schemas/EventWorktreeFailed"
  11437. },
  11438. {
  11439. "$ref": "#/components/schemas/EventPtyCreated"
  11440. },
  11441. {
  11442. "$ref": "#/components/schemas/EventPtyUpdated"
  11443. },
  11444. {
  11445. "$ref": "#/components/schemas/EventPtyExited"
  11446. },
  11447. {
  11448. "$ref": "#/components/schemas/EventPtyDeleted"
  11449. },
  11450. {
  11451. "$ref": "#/components/schemas/EventInstallationUpdated"
  11452. },
  11453. {
  11454. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11455. },
  11456. {
  11457. "$ref": "#/components/schemas/EventMessageUpdated"
  11458. },
  11459. {
  11460. "$ref": "#/components/schemas/EventMessageRemoved"
  11461. },
  11462. {
  11463. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11464. },
  11465. {
  11466. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11467. },
  11468. {
  11469. "$ref": "#/components/schemas/EventSessionCreated"
  11470. },
  11471. {
  11472. "$ref": "#/components/schemas/EventSessionUpdated"
  11473. },
  11474. {
  11475. "$ref": "#/components/schemas/EventSessionDeleted"
  11476. },
  11477. {
  11478. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11479. },
  11480. {
  11481. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11482. },
  11483. {
  11484. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11485. },
  11486. {
  11487. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11488. },
  11489. {
  11490. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11491. },
  11492. {
  11493. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11494. },
  11495. {
  11496. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11497. },
  11498. {
  11499. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11500. },
  11501. {
  11502. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11503. },
  11504. {
  11505. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11506. },
  11507. {
  11508. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11509. },
  11510. {
  11511. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11512. },
  11513. {
  11514. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11515. },
  11516. {
  11517. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11518. },
  11519. {
  11520. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11521. },
  11522. {
  11523. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11524. },
  11525. {
  11526. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11527. },
  11528. {
  11529. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11530. },
  11531. {
  11532. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11533. },
  11534. {
  11535. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11536. },
  11537. {
  11538. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11539. },
  11540. {
  11541. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11542. },
  11543. {
  11544. "$ref": "#/components/schemas/EventSessionNextRetried"
  11545. },
  11546. {
  11547. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11548. },
  11549. {
  11550. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11551. },
  11552. {
  11553. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11554. },
  11555. {
  11556. "$ref": "#/components/schemas/EventServerConnected"
  11557. },
  11558. {
  11559. "$ref": "#/components/schemas/EventGlobalDisposed"
  11560. },
  11561. {
  11562. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  11563. },
  11564. {
  11565. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  11566. },
  11567. {
  11568. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  11569. },
  11570. {
  11571. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  11572. },
  11573. {
  11574. "$ref": "#/components/schemas/SyncEventSessionCreated"
  11575. },
  11576. {
  11577. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  11578. },
  11579. {
  11580. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  11581. },
  11582. {
  11583. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  11584. },
  11585. {
  11586. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  11587. },
  11588. {
  11589. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  11590. },
  11591. {
  11592. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  11593. },
  11594. {
  11595. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  11596. },
  11597. {
  11598. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  11599. },
  11600. {
  11601. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  11602. },
  11603. {
  11604. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  11605. },
  11606. {
  11607. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  11608. },
  11609. {
  11610. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  11611. },
  11612. {
  11613. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  11614. },
  11615. {
  11616. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  11617. },
  11618. {
  11619. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  11620. },
  11621. {
  11622. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  11623. },
  11624. {
  11625. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  11626. },
  11627. {
  11628. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  11629. },
  11630. {
  11631. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  11632. },
  11633. {
  11634. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  11635. },
  11636. {
  11637. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  11638. },
  11639. {
  11640. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  11641. },
  11642. {
  11643. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  11644. },
  11645. {
  11646. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  11647. },
  11648. {
  11649. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  11650. },
  11651. {
  11652. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  11653. },
  11654. {
  11655. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  11656. },
  11657. {
  11658. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  11659. }
  11660. ]
  11661. }
  11662. },
  11663. "required": ["directory", "payload"],
  11664. "additionalProperties": false
  11665. },
  11666. "LogLevel": {
  11667. "type": "string",
  11668. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  11669. "description": "Log level"
  11670. },
  11671. "ServerConfig": {
  11672. "type": "object",
  11673. "properties": {
  11674. "port": {
  11675. "type": "integer",
  11676. "exclusiveMinimum": 0
  11677. },
  11678. "hostname": {
  11679. "type": "string"
  11680. },
  11681. "mdns": {
  11682. "type": "boolean"
  11683. },
  11684. "mdnsDomain": {
  11685. "type": "string"
  11686. },
  11687. "cors": {
  11688. "type": "array",
  11689. "items": {
  11690. "type": "string"
  11691. }
  11692. }
  11693. },
  11694. "additionalProperties": false,
  11695. "description": "Server configuration for opencode serve and web commands"
  11696. },
  11697. "ReferenceConfigEntry": {
  11698. "anyOf": [
  11699. {
  11700. "type": "string"
  11701. },
  11702. {
  11703. "type": "object",
  11704. "properties": {
  11705. "repository": {
  11706. "type": "string",
  11707. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  11708. },
  11709. "branch": {
  11710. "type": "string"
  11711. }
  11712. },
  11713. "required": ["repository"],
  11714. "additionalProperties": false
  11715. },
  11716. {
  11717. "type": "object",
  11718. "properties": {
  11719. "path": {
  11720. "type": "string",
  11721. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  11722. }
  11723. },
  11724. "required": ["path"],
  11725. "additionalProperties": false
  11726. }
  11727. ]
  11728. },
  11729. "ReferenceConfig": {
  11730. "type": "object",
  11731. "additionalProperties": {
  11732. "$ref": "#/components/schemas/ReferenceConfigEntry"
  11733. }
  11734. },
  11735. "PermissionActionConfig": {
  11736. "type": "string",
  11737. "enum": ["ask", "allow", "deny"]
  11738. },
  11739. "PermissionObjectConfig": {
  11740. "type": "object",
  11741. "additionalProperties": {
  11742. "$ref": "#/components/schemas/PermissionActionConfig"
  11743. }
  11744. },
  11745. "PermissionRuleConfig": {
  11746. "anyOf": [
  11747. {
  11748. "$ref": "#/components/schemas/PermissionActionConfig"
  11749. },
  11750. {
  11751. "$ref": "#/components/schemas/PermissionObjectConfig"
  11752. }
  11753. ]
  11754. },
  11755. "PermissionConfig": {
  11756. "anyOf": [
  11757. {
  11758. "$ref": "#/components/schemas/PermissionActionConfig"
  11759. },
  11760. {
  11761. "type": "object",
  11762. "properties": {
  11763. "read": {
  11764. "$ref": "#/components/schemas/PermissionRuleConfig"
  11765. },
  11766. "edit": {
  11767. "$ref": "#/components/schemas/PermissionRuleConfig"
  11768. },
  11769. "glob": {
  11770. "$ref": "#/components/schemas/PermissionRuleConfig"
  11771. },
  11772. "grep": {
  11773. "$ref": "#/components/schemas/PermissionRuleConfig"
  11774. },
  11775. "list": {
  11776. "$ref": "#/components/schemas/PermissionRuleConfig"
  11777. },
  11778. "bash": {
  11779. "$ref": "#/components/schemas/PermissionRuleConfig"
  11780. },
  11781. "task": {
  11782. "$ref": "#/components/schemas/PermissionRuleConfig"
  11783. },
  11784. "external_directory": {
  11785. "$ref": "#/components/schemas/PermissionRuleConfig"
  11786. },
  11787. "todowrite": {
  11788. "$ref": "#/components/schemas/PermissionActionConfig"
  11789. },
  11790. "question": {
  11791. "$ref": "#/components/schemas/PermissionActionConfig"
  11792. },
  11793. "webfetch": {
  11794. "$ref": "#/components/schemas/PermissionActionConfig"
  11795. },
  11796. "websearch": {
  11797. "$ref": "#/components/schemas/PermissionActionConfig"
  11798. },
  11799. "repo_clone": {
  11800. "$ref": "#/components/schemas/PermissionRuleConfig"
  11801. },
  11802. "repo_overview": {
  11803. "$ref": "#/components/schemas/PermissionRuleConfig"
  11804. },
  11805. "lsp": {
  11806. "$ref": "#/components/schemas/PermissionRuleConfig"
  11807. },
  11808. "doom_loop": {
  11809. "$ref": "#/components/schemas/PermissionActionConfig"
  11810. },
  11811. "skill": {
  11812. "$ref": "#/components/schemas/PermissionRuleConfig"
  11813. }
  11814. },
  11815. "additionalProperties": {
  11816. "$ref": "#/components/schemas/PermissionRuleConfig"
  11817. }
  11818. }
  11819. ]
  11820. },
  11821. "AgentConfig": {
  11822. "type": "object",
  11823. "properties": {
  11824. "model": {
  11825. "type": "string"
  11826. },
  11827. "variant": {
  11828. "type": "string"
  11829. },
  11830. "temperature": {
  11831. "type": "number"
  11832. },
  11833. "top_p": {
  11834. "type": "number"
  11835. },
  11836. "prompt": {
  11837. "type": "string"
  11838. },
  11839. "tools": {
  11840. "type": "object",
  11841. "additionalProperties": {
  11842. "type": "boolean"
  11843. }
  11844. },
  11845. "disable": {
  11846. "type": "boolean"
  11847. },
  11848. "description": {
  11849. "type": "string"
  11850. },
  11851. "mode": {
  11852. "type": "string",
  11853. "enum": ["subagent", "primary", "all"]
  11854. },
  11855. "hidden": {
  11856. "type": "boolean"
  11857. },
  11858. "options": {
  11859. "type": "object"
  11860. },
  11861. "color": {
  11862. "anyOf": [
  11863. {
  11864. "type": "string",
  11865. "pattern": "^#[0-9a-fA-F]{6}$"
  11866. },
  11867. {
  11868. "type": "string",
  11869. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11870. }
  11871. ],
  11872. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  11873. },
  11874. "steps": {
  11875. "type": "integer",
  11876. "exclusiveMinimum": 0
  11877. },
  11878. "maxSteps": {
  11879. "type": "integer",
  11880. "exclusiveMinimum": 0
  11881. },
  11882. "permission": {
  11883. "$ref": "#/components/schemas/PermissionConfig"
  11884. }
  11885. },
  11886. "additionalProperties": {}
  11887. },
  11888. "ProviderConfig": {
  11889. "type": "object",
  11890. "properties": {
  11891. "api": {
  11892. "type": "string"
  11893. },
  11894. "name": {
  11895. "type": "string"
  11896. },
  11897. "env": {
  11898. "type": "array",
  11899. "items": {
  11900. "type": "string"
  11901. }
  11902. },
  11903. "id": {
  11904. "type": "string"
  11905. },
  11906. "npm": {
  11907. "type": "string"
  11908. },
  11909. "whitelist": {
  11910. "type": "array",
  11911. "items": {
  11912. "type": "string"
  11913. }
  11914. },
  11915. "blacklist": {
  11916. "type": "array",
  11917. "items": {
  11918. "type": "string"
  11919. }
  11920. },
  11921. "options": {
  11922. "type": "object",
  11923. "properties": {
  11924. "apiKey": {
  11925. "type": "string"
  11926. },
  11927. "baseURL": {
  11928. "type": "string"
  11929. },
  11930. "enterpriseUrl": {
  11931. "type": "string"
  11932. },
  11933. "setCacheKey": {
  11934. "type": "boolean"
  11935. },
  11936. "timeout": {
  11937. "anyOf": [
  11938. {
  11939. "type": "integer",
  11940. "exclusiveMinimum": 0
  11941. },
  11942. {
  11943. "type": "boolean",
  11944. "enum": [false]
  11945. }
  11946. ],
  11947. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  11948. },
  11949. "chunkTimeout": {
  11950. "type": "integer",
  11951. "exclusiveMinimum": 0
  11952. }
  11953. },
  11954. "additionalProperties": {}
  11955. },
  11956. "models": {
  11957. "type": "object",
  11958. "additionalProperties": {
  11959. "type": "object",
  11960. "properties": {
  11961. "id": {
  11962. "type": "string"
  11963. },
  11964. "name": {
  11965. "type": "string"
  11966. },
  11967. "family": {
  11968. "type": "string"
  11969. },
  11970. "release_date": {
  11971. "type": "string"
  11972. },
  11973. "attachment": {
  11974. "type": "boolean"
  11975. },
  11976. "reasoning": {
  11977. "type": "boolean"
  11978. },
  11979. "temperature": {
  11980. "type": "boolean"
  11981. },
  11982. "tool_call": {
  11983. "type": "boolean"
  11984. },
  11985. "interleaved": {
  11986. "anyOf": [
  11987. {
  11988. "type": "boolean",
  11989. "enum": [true]
  11990. },
  11991. {
  11992. "type": "object",
  11993. "properties": {
  11994. "field": {
  11995. "type": "string",
  11996. "enum": ["reasoning_content", "reasoning_details"]
  11997. }
  11998. },
  11999. "required": ["field"],
  12000. "additionalProperties": false
  12001. }
  12002. ]
  12003. },
  12004. "cost": {
  12005. "type": "object",
  12006. "properties": {
  12007. "input": {
  12008. "type": "number"
  12009. },
  12010. "output": {
  12011. "type": "number"
  12012. },
  12013. "cache_read": {
  12014. "type": "number"
  12015. },
  12016. "cache_write": {
  12017. "type": "number"
  12018. },
  12019. "context_over_200k": {
  12020. "type": "object",
  12021. "properties": {
  12022. "input": {
  12023. "type": "number"
  12024. },
  12025. "output": {
  12026. "type": "number"
  12027. },
  12028. "cache_read": {
  12029. "type": "number"
  12030. },
  12031. "cache_write": {
  12032. "type": "number"
  12033. }
  12034. },
  12035. "required": ["input", "output"],
  12036. "additionalProperties": false
  12037. }
  12038. },
  12039. "required": ["input", "output"],
  12040. "additionalProperties": false
  12041. },
  12042. "limit": {
  12043. "type": "object",
  12044. "properties": {
  12045. "context": {
  12046. "type": "number"
  12047. },
  12048. "input": {
  12049. "type": "number"
  12050. },
  12051. "output": {
  12052. "type": "number"
  12053. }
  12054. },
  12055. "required": ["context", "output"],
  12056. "additionalProperties": false
  12057. },
  12058. "modalities": {
  12059. "type": "object",
  12060. "properties": {
  12061. "input": {
  12062. "type": "array",
  12063. "items": {
  12064. "type": "string",
  12065. "enum": ["text", "audio", "image", "video", "pdf"]
  12066. }
  12067. },
  12068. "output": {
  12069. "type": "array",
  12070. "items": {
  12071. "type": "string",
  12072. "enum": ["text", "audio", "image", "video", "pdf"]
  12073. }
  12074. }
  12075. },
  12076. "required": ["input", "output"],
  12077. "additionalProperties": false
  12078. },
  12079. "experimental": {
  12080. "type": "boolean"
  12081. },
  12082. "status": {
  12083. "type": "string",
  12084. "enum": ["alpha", "beta", "deprecated", "active"]
  12085. },
  12086. "provider": {
  12087. "type": "object",
  12088. "properties": {
  12089. "npm": {
  12090. "type": "string"
  12091. },
  12092. "api": {
  12093. "type": "string"
  12094. }
  12095. },
  12096. "additionalProperties": false
  12097. },
  12098. "options": {
  12099. "type": "object"
  12100. },
  12101. "headers": {
  12102. "type": "object",
  12103. "additionalProperties": {
  12104. "type": "string"
  12105. }
  12106. },
  12107. "variants": {
  12108. "type": "object",
  12109. "additionalProperties": {
  12110. "type": "object",
  12111. "properties": {
  12112. "disabled": {
  12113. "type": "boolean"
  12114. }
  12115. },
  12116. "additionalProperties": {}
  12117. },
  12118. "description": "Variant-specific configuration"
  12119. }
  12120. },
  12121. "additionalProperties": false
  12122. }
  12123. }
  12124. },
  12125. "additionalProperties": false
  12126. },
  12127. "McpLocalConfig": {
  12128. "type": "object",
  12129. "properties": {
  12130. "type": {
  12131. "type": "string",
  12132. "enum": ["local"],
  12133. "description": "Type of MCP server connection"
  12134. },
  12135. "command": {
  12136. "type": "array",
  12137. "items": {
  12138. "type": "string"
  12139. },
  12140. "description": "Command and arguments to run the MCP server"
  12141. },
  12142. "environment": {
  12143. "type": "object",
  12144. "additionalProperties": {
  12145. "type": "string"
  12146. }
  12147. },
  12148. "enabled": {
  12149. "type": "boolean"
  12150. },
  12151. "timeout": {
  12152. "type": "integer",
  12153. "exclusiveMinimum": 0
  12154. }
  12155. },
  12156. "required": ["type", "command"],
  12157. "additionalProperties": false
  12158. },
  12159. "McpOAuthConfig": {
  12160. "type": "object",
  12161. "properties": {
  12162. "clientId": {
  12163. "type": "string"
  12164. },
  12165. "clientSecret": {
  12166. "type": "string"
  12167. },
  12168. "scope": {
  12169. "type": "string"
  12170. },
  12171. "redirectUri": {
  12172. "type": "string"
  12173. }
  12174. },
  12175. "additionalProperties": false
  12176. },
  12177. "McpRemoteConfig": {
  12178. "type": "object",
  12179. "properties": {
  12180. "type": {
  12181. "type": "string",
  12182. "enum": ["remote"],
  12183. "description": "Type of MCP server connection"
  12184. },
  12185. "url": {
  12186. "type": "string",
  12187. "description": "URL of the remote MCP server"
  12188. },
  12189. "enabled": {
  12190. "type": "boolean"
  12191. },
  12192. "headers": {
  12193. "type": "object",
  12194. "additionalProperties": {
  12195. "type": "string"
  12196. }
  12197. },
  12198. "oauth": {
  12199. "anyOf": [
  12200. {
  12201. "$ref": "#/components/schemas/McpOAuthConfig"
  12202. },
  12203. {
  12204. "type": "boolean",
  12205. "enum": [false]
  12206. }
  12207. ],
  12208. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  12209. },
  12210. "timeout": {
  12211. "type": "integer",
  12212. "exclusiveMinimum": 0
  12213. }
  12214. },
  12215. "required": ["type", "url"],
  12216. "additionalProperties": false
  12217. },
  12218. "LayoutConfig": {
  12219. "type": "string",
  12220. "enum": ["auto", "stretch"],
  12221. "description": "@deprecated Always uses stretch layout."
  12222. },
  12223. "ImageAttachmentConfig": {
  12224. "type": "object",
  12225. "properties": {
  12226. "auto_resize": {
  12227. "type": "boolean"
  12228. },
  12229. "max_width": {
  12230. "type": "integer",
  12231. "exclusiveMinimum": 0
  12232. },
  12233. "max_height": {
  12234. "type": "integer",
  12235. "exclusiveMinimum": 0
  12236. },
  12237. "max_base64_bytes": {
  12238. "type": "integer",
  12239. "exclusiveMinimum": 0
  12240. }
  12241. },
  12242. "additionalProperties": false
  12243. },
  12244. "AttachmentConfig": {
  12245. "type": "object",
  12246. "properties": {
  12247. "image": {
  12248. "$ref": "#/components/schemas/ImageAttachmentConfig"
  12249. }
  12250. },
  12251. "additionalProperties": false
  12252. },
  12253. "Config": {
  12254. "type": "object",
  12255. "properties": {
  12256. "$schema": {
  12257. "type": "string"
  12258. },
  12259. "shell": {
  12260. "type": "string"
  12261. },
  12262. "logLevel": {
  12263. "$ref": "#/components/schemas/LogLevel"
  12264. },
  12265. "server": {
  12266. "$ref": "#/components/schemas/ServerConfig"
  12267. },
  12268. "command": {
  12269. "type": "object",
  12270. "additionalProperties": {
  12271. "type": "object",
  12272. "properties": {
  12273. "template": {
  12274. "type": "string"
  12275. },
  12276. "description": {
  12277. "type": "string"
  12278. },
  12279. "agent": {
  12280. "type": "string"
  12281. },
  12282. "model": {
  12283. "type": "string"
  12284. },
  12285. "subtask": {
  12286. "type": "boolean"
  12287. }
  12288. },
  12289. "required": ["template"],
  12290. "additionalProperties": false
  12291. }
  12292. },
  12293. "skills": {
  12294. "type": "object",
  12295. "properties": {
  12296. "paths": {
  12297. "type": "array",
  12298. "items": {
  12299. "type": "string"
  12300. }
  12301. },
  12302. "urls": {
  12303. "type": "array",
  12304. "items": {
  12305. "type": "string"
  12306. }
  12307. }
  12308. },
  12309. "additionalProperties": false
  12310. },
  12311. "reference": {
  12312. "$ref": "#/components/schemas/ReferenceConfig"
  12313. },
  12314. "watcher": {
  12315. "type": "object",
  12316. "properties": {
  12317. "ignore": {
  12318. "type": "array",
  12319. "items": {
  12320. "type": "string"
  12321. }
  12322. }
  12323. },
  12324. "additionalProperties": false
  12325. },
  12326. "snapshot": {
  12327. "type": "boolean"
  12328. },
  12329. "plugin": {
  12330. "type": "array",
  12331. "items": {
  12332. "anyOf": [
  12333. {
  12334. "type": "string"
  12335. },
  12336. {
  12337. "type": "array",
  12338. "prefixItems": [
  12339. {
  12340. "type": "string"
  12341. },
  12342. {
  12343. "type": "object"
  12344. }
  12345. ],
  12346. "maxItems": 2,
  12347. "minItems": 2
  12348. }
  12349. ]
  12350. }
  12351. },
  12352. "share": {
  12353. "type": "string",
  12354. "enum": ["manual", "auto", "disabled"]
  12355. },
  12356. "autoshare": {
  12357. "type": "boolean"
  12358. },
  12359. "autoupdate": {
  12360. "anyOf": [
  12361. {
  12362. "type": "boolean"
  12363. },
  12364. {
  12365. "type": "string",
  12366. "enum": ["notify"]
  12367. }
  12368. ],
  12369. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  12370. },
  12371. "disabled_providers": {
  12372. "type": "array",
  12373. "items": {
  12374. "type": "string"
  12375. }
  12376. },
  12377. "enabled_providers": {
  12378. "type": "array",
  12379. "items": {
  12380. "type": "string"
  12381. }
  12382. },
  12383. "model": {
  12384. "type": "string"
  12385. },
  12386. "small_model": {
  12387. "type": "string"
  12388. },
  12389. "default_agent": {
  12390. "type": "string"
  12391. },
  12392. "username": {
  12393. "type": "string"
  12394. },
  12395. "mode": {
  12396. "type": "object",
  12397. "properties": {
  12398. "build": {
  12399. "$ref": "#/components/schemas/AgentConfig"
  12400. },
  12401. "plan": {
  12402. "$ref": "#/components/schemas/AgentConfig"
  12403. }
  12404. },
  12405. "additionalProperties": {
  12406. "$ref": "#/components/schemas/AgentConfig"
  12407. }
  12408. },
  12409. "agent": {
  12410. "type": "object",
  12411. "properties": {
  12412. "plan": {
  12413. "$ref": "#/components/schemas/AgentConfig"
  12414. },
  12415. "build": {
  12416. "$ref": "#/components/schemas/AgentConfig"
  12417. },
  12418. "general": {
  12419. "$ref": "#/components/schemas/AgentConfig"
  12420. },
  12421. "explore": {
  12422. "$ref": "#/components/schemas/AgentConfig"
  12423. },
  12424. "scout": {
  12425. "$ref": "#/components/schemas/AgentConfig"
  12426. },
  12427. "title": {
  12428. "$ref": "#/components/schemas/AgentConfig"
  12429. },
  12430. "summary": {
  12431. "$ref": "#/components/schemas/AgentConfig"
  12432. },
  12433. "compaction": {
  12434. "$ref": "#/components/schemas/AgentConfig"
  12435. }
  12436. },
  12437. "additionalProperties": {
  12438. "$ref": "#/components/schemas/AgentConfig"
  12439. }
  12440. },
  12441. "provider": {
  12442. "type": "object",
  12443. "additionalProperties": {
  12444. "$ref": "#/components/schemas/ProviderConfig"
  12445. }
  12446. },
  12447. "mcp": {
  12448. "type": "object",
  12449. "additionalProperties": {
  12450. "anyOf": [
  12451. {
  12452. "$ref": "#/components/schemas/McpLocalConfig"
  12453. },
  12454. {
  12455. "$ref": "#/components/schemas/McpRemoteConfig"
  12456. },
  12457. {
  12458. "type": "object",
  12459. "properties": {
  12460. "enabled": {
  12461. "type": "boolean"
  12462. }
  12463. },
  12464. "required": ["enabled"],
  12465. "additionalProperties": false
  12466. }
  12467. ]
  12468. }
  12469. },
  12470. "formatter": {
  12471. "anyOf": [
  12472. {
  12473. "type": "boolean"
  12474. },
  12475. {
  12476. "type": "object",
  12477. "additionalProperties": {
  12478. "type": "object",
  12479. "properties": {
  12480. "disabled": {
  12481. "type": "boolean"
  12482. },
  12483. "command": {
  12484. "type": "array",
  12485. "items": {
  12486. "type": "string"
  12487. }
  12488. },
  12489. "environment": {
  12490. "type": "object",
  12491. "additionalProperties": {
  12492. "type": "string"
  12493. }
  12494. },
  12495. "extensions": {
  12496. "type": "array",
  12497. "items": {
  12498. "type": "string"
  12499. }
  12500. }
  12501. },
  12502. "additionalProperties": false
  12503. }
  12504. }
  12505. ],
  12506. "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."
  12507. },
  12508. "lsp": {
  12509. "anyOf": [
  12510. {
  12511. "type": "boolean"
  12512. },
  12513. {
  12514. "type": "object",
  12515. "additionalProperties": {
  12516. "anyOf": [
  12517. {
  12518. "type": "object",
  12519. "properties": {
  12520. "disabled": {
  12521. "type": "boolean",
  12522. "enum": [true]
  12523. }
  12524. },
  12525. "required": ["disabled"],
  12526. "additionalProperties": false
  12527. },
  12528. {
  12529. "type": "object",
  12530. "properties": {
  12531. "command": {
  12532. "type": "array",
  12533. "items": {
  12534. "type": "string"
  12535. }
  12536. },
  12537. "extensions": {
  12538. "type": "array",
  12539. "items": {
  12540. "type": "string"
  12541. }
  12542. },
  12543. "disabled": {
  12544. "type": "boolean"
  12545. },
  12546. "env": {
  12547. "type": "object",
  12548. "additionalProperties": {
  12549. "type": "string"
  12550. }
  12551. },
  12552. "initialization": {
  12553. "type": "object"
  12554. }
  12555. },
  12556. "required": ["command"],
  12557. "additionalProperties": false
  12558. }
  12559. ]
  12560. }
  12561. }
  12562. ],
  12563. "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."
  12564. },
  12565. "instructions": {
  12566. "type": "array",
  12567. "items": {
  12568. "type": "string"
  12569. }
  12570. },
  12571. "layout": {
  12572. "$ref": "#/components/schemas/LayoutConfig"
  12573. },
  12574. "permission": {
  12575. "$ref": "#/components/schemas/PermissionConfig"
  12576. },
  12577. "tools": {
  12578. "type": "object",
  12579. "additionalProperties": {
  12580. "type": "boolean"
  12581. }
  12582. },
  12583. "attachment": {
  12584. "$ref": "#/components/schemas/AttachmentConfig"
  12585. },
  12586. "enterprise": {
  12587. "type": "object",
  12588. "properties": {
  12589. "url": {
  12590. "type": "string"
  12591. }
  12592. },
  12593. "additionalProperties": false
  12594. },
  12595. "tool_output": {
  12596. "type": "object",
  12597. "properties": {
  12598. "max_lines": {
  12599. "type": "integer",
  12600. "exclusiveMinimum": 0
  12601. },
  12602. "max_bytes": {
  12603. "type": "integer",
  12604. "exclusiveMinimum": 0
  12605. }
  12606. },
  12607. "additionalProperties": false
  12608. },
  12609. "compaction": {
  12610. "type": "object",
  12611. "properties": {
  12612. "auto": {
  12613. "type": "boolean"
  12614. },
  12615. "prune": {
  12616. "type": "boolean"
  12617. },
  12618. "tail_turns": {
  12619. "type": "integer",
  12620. "minimum": 0
  12621. },
  12622. "preserve_recent_tokens": {
  12623. "type": "integer",
  12624. "minimum": 0
  12625. },
  12626. "reserved": {
  12627. "type": "integer",
  12628. "minimum": 0
  12629. }
  12630. },
  12631. "additionalProperties": false
  12632. },
  12633. "experimental": {
  12634. "type": "object",
  12635. "properties": {
  12636. "disable_paste_summary": {
  12637. "type": "boolean"
  12638. },
  12639. "batch_tool": {
  12640. "type": "boolean"
  12641. },
  12642. "openTelemetry": {
  12643. "type": "boolean"
  12644. },
  12645. "primary_tools": {
  12646. "type": "array",
  12647. "items": {
  12648. "type": "string"
  12649. }
  12650. },
  12651. "continue_loop_on_deny": {
  12652. "type": "boolean"
  12653. },
  12654. "mcp_timeout": {
  12655. "type": "integer",
  12656. "exclusiveMinimum": 0
  12657. }
  12658. },
  12659. "additionalProperties": false
  12660. }
  12661. },
  12662. "additionalProperties": false
  12663. },
  12664. "Model": {
  12665. "type": "object",
  12666. "properties": {
  12667. "id": {
  12668. "type": "string"
  12669. },
  12670. "providerID": {
  12671. "type": "string"
  12672. },
  12673. "api": {
  12674. "type": "object",
  12675. "properties": {
  12676. "id": {
  12677. "type": "string"
  12678. },
  12679. "url": {
  12680. "type": "string"
  12681. },
  12682. "npm": {
  12683. "type": "string"
  12684. }
  12685. },
  12686. "required": ["id", "url", "npm"],
  12687. "additionalProperties": false
  12688. },
  12689. "name": {
  12690. "type": "string"
  12691. },
  12692. "family": {
  12693. "type": "string"
  12694. },
  12695. "capabilities": {
  12696. "type": "object",
  12697. "properties": {
  12698. "temperature": {
  12699. "type": "boolean"
  12700. },
  12701. "reasoning": {
  12702. "type": "boolean"
  12703. },
  12704. "attachment": {
  12705. "type": "boolean"
  12706. },
  12707. "toolcall": {
  12708. "type": "boolean"
  12709. },
  12710. "input": {
  12711. "type": "object",
  12712. "properties": {
  12713. "text": {
  12714. "type": "boolean"
  12715. },
  12716. "audio": {
  12717. "type": "boolean"
  12718. },
  12719. "image": {
  12720. "type": "boolean"
  12721. },
  12722. "video": {
  12723. "type": "boolean"
  12724. },
  12725. "pdf": {
  12726. "type": "boolean"
  12727. }
  12728. },
  12729. "required": ["text", "audio", "image", "video", "pdf"],
  12730. "additionalProperties": false
  12731. },
  12732. "output": {
  12733. "type": "object",
  12734. "properties": {
  12735. "text": {
  12736. "type": "boolean"
  12737. },
  12738. "audio": {
  12739. "type": "boolean"
  12740. },
  12741. "image": {
  12742. "type": "boolean"
  12743. },
  12744. "video": {
  12745. "type": "boolean"
  12746. },
  12747. "pdf": {
  12748. "type": "boolean"
  12749. }
  12750. },
  12751. "required": ["text", "audio", "image", "video", "pdf"],
  12752. "additionalProperties": false
  12753. },
  12754. "interleaved": {
  12755. "anyOf": [
  12756. {
  12757. "type": "boolean"
  12758. },
  12759. {
  12760. "type": "object",
  12761. "properties": {
  12762. "field": {
  12763. "type": "string",
  12764. "enum": ["reasoning_content", "reasoning_details"]
  12765. }
  12766. },
  12767. "required": ["field"],
  12768. "additionalProperties": false
  12769. }
  12770. ]
  12771. }
  12772. },
  12773. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  12774. "additionalProperties": false
  12775. },
  12776. "cost": {
  12777. "type": "object",
  12778. "properties": {
  12779. "input": {
  12780. "type": "number"
  12781. },
  12782. "output": {
  12783. "type": "number"
  12784. },
  12785. "cache": {
  12786. "type": "object",
  12787. "properties": {
  12788. "read": {
  12789. "type": "number"
  12790. },
  12791. "write": {
  12792. "type": "number"
  12793. }
  12794. },
  12795. "required": ["read", "write"],
  12796. "additionalProperties": false
  12797. },
  12798. "tiers": {
  12799. "type": "array",
  12800. "items": {
  12801. "type": "object",
  12802. "properties": {
  12803. "input": {
  12804. "type": "number"
  12805. },
  12806. "output": {
  12807. "type": "number"
  12808. },
  12809. "cache": {
  12810. "type": "object",
  12811. "properties": {
  12812. "read": {
  12813. "type": "number"
  12814. },
  12815. "write": {
  12816. "type": "number"
  12817. }
  12818. },
  12819. "required": ["read", "write"],
  12820. "additionalProperties": false
  12821. },
  12822. "tier": {
  12823. "type": "object",
  12824. "properties": {
  12825. "type": {
  12826. "type": "string",
  12827. "enum": ["context"]
  12828. },
  12829. "size": {
  12830. "type": "number"
  12831. }
  12832. },
  12833. "required": ["type", "size"],
  12834. "additionalProperties": false
  12835. }
  12836. },
  12837. "required": ["input", "output", "cache", "tier"],
  12838. "additionalProperties": false
  12839. }
  12840. },
  12841. "experimentalOver200K": {
  12842. "type": "object",
  12843. "properties": {
  12844. "input": {
  12845. "type": "number"
  12846. },
  12847. "output": {
  12848. "type": "number"
  12849. },
  12850. "cache": {
  12851. "type": "object",
  12852. "properties": {
  12853. "read": {
  12854. "type": "number"
  12855. },
  12856. "write": {
  12857. "type": "number"
  12858. }
  12859. },
  12860. "required": ["read", "write"],
  12861. "additionalProperties": false
  12862. }
  12863. },
  12864. "required": ["input", "output", "cache"],
  12865. "additionalProperties": false
  12866. }
  12867. },
  12868. "required": ["input", "output", "cache"],
  12869. "additionalProperties": false
  12870. },
  12871. "limit": {
  12872. "type": "object",
  12873. "properties": {
  12874. "context": {
  12875. "type": "number"
  12876. },
  12877. "input": {
  12878. "type": "number"
  12879. },
  12880. "output": {
  12881. "type": "number"
  12882. }
  12883. },
  12884. "required": ["context", "output"],
  12885. "additionalProperties": false
  12886. },
  12887. "status": {
  12888. "type": "string",
  12889. "enum": ["alpha", "beta", "deprecated", "active"]
  12890. },
  12891. "options": {
  12892. "type": "object"
  12893. },
  12894. "headers": {
  12895. "type": "object",
  12896. "additionalProperties": {
  12897. "type": "string"
  12898. }
  12899. },
  12900. "release_date": {
  12901. "type": "string"
  12902. },
  12903. "variants": {
  12904. "type": "object",
  12905. "additionalProperties": {
  12906. "type": "object"
  12907. }
  12908. }
  12909. },
  12910. "required": [
  12911. "id",
  12912. "providerID",
  12913. "api",
  12914. "name",
  12915. "capabilities",
  12916. "cost",
  12917. "limit",
  12918. "status",
  12919. "options",
  12920. "headers",
  12921. "release_date"
  12922. ],
  12923. "additionalProperties": false
  12924. },
  12925. "Provider": {
  12926. "type": "object",
  12927. "properties": {
  12928. "id": {
  12929. "type": "string"
  12930. },
  12931. "name": {
  12932. "type": "string"
  12933. },
  12934. "source": {
  12935. "type": "string",
  12936. "enum": ["env", "config", "custom", "api"]
  12937. },
  12938. "env": {
  12939. "type": "array",
  12940. "items": {
  12941. "type": "string"
  12942. }
  12943. },
  12944. "key": {
  12945. "type": "string"
  12946. },
  12947. "options": {
  12948. "type": "object"
  12949. },
  12950. "models": {
  12951. "type": "object",
  12952. "additionalProperties": {
  12953. "$ref": "#/components/schemas/Model"
  12954. }
  12955. }
  12956. },
  12957. "required": ["id", "name", "source", "env", "options", "models"],
  12958. "additionalProperties": false
  12959. },
  12960. "ConsoleState": {
  12961. "type": "object",
  12962. "properties": {
  12963. "consoleManagedProviders": {
  12964. "type": "array",
  12965. "items": {
  12966. "type": "string"
  12967. }
  12968. },
  12969. "activeOrgName": {
  12970. "type": "string"
  12971. },
  12972. "switchableOrgCount": {
  12973. "type": "integer",
  12974. "minimum": 0
  12975. }
  12976. },
  12977. "required": ["consoleManagedProviders", "switchableOrgCount"],
  12978. "additionalProperties": false
  12979. },
  12980. "effect_HttpApiError_InternalServerError": {
  12981. "type": "object",
  12982. "properties": {
  12983. "_tag": {
  12984. "type": "string",
  12985. "enum": ["InternalServerError"]
  12986. }
  12987. },
  12988. "required": ["_tag"],
  12989. "additionalProperties": false
  12990. },
  12991. "ToolListItem": {
  12992. "type": "object",
  12993. "properties": {
  12994. "id": {
  12995. "type": "string"
  12996. },
  12997. "description": {
  12998. "type": "string"
  12999. },
  13000. "parameters": {}
  13001. },
  13002. "required": ["id", "description", "parameters"],
  13003. "additionalProperties": false
  13004. },
  13005. "ToolList": {
  13006. "type": "array",
  13007. "items": {
  13008. "$ref": "#/components/schemas/ToolListItem"
  13009. }
  13010. },
  13011. "ToolIDs": {
  13012. "type": "array",
  13013. "items": {
  13014. "type": "string"
  13015. }
  13016. },
  13017. "WorktreeError": {
  13018. "type": "object",
  13019. "properties": {
  13020. "name": {
  13021. "type": "string",
  13022. "enum": [
  13023. "WorktreeNotGitError",
  13024. "WorktreeNameGenerationFailedError",
  13025. "WorktreeCreateFailedError",
  13026. "WorktreeStartCommandFailedError",
  13027. "WorktreeRemoveFailedError",
  13028. "WorktreeResetFailedError",
  13029. "WorktreeListFailedError"
  13030. ]
  13031. },
  13032. "data": {
  13033. "type": "object",
  13034. "properties": {
  13035. "message": {
  13036. "type": "string"
  13037. }
  13038. },
  13039. "required": ["message"],
  13040. "additionalProperties": false
  13041. }
  13042. },
  13043. "required": ["name", "data"],
  13044. "additionalProperties": false
  13045. },
  13046. "WorktreeCreateInput": {
  13047. "type": "object",
  13048. "properties": {
  13049. "name": {
  13050. "type": "string"
  13051. },
  13052. "startCommand": {
  13053. "type": "string",
  13054. "description": "Additional startup script to run after the project's start command"
  13055. }
  13056. },
  13057. "additionalProperties": false
  13058. },
  13059. "Worktree": {
  13060. "type": "object",
  13061. "properties": {
  13062. "name": {
  13063. "type": "string"
  13064. },
  13065. "branch": {
  13066. "type": "string"
  13067. },
  13068. "directory": {
  13069. "type": "string"
  13070. }
  13071. },
  13072. "required": ["name", "directory"],
  13073. "additionalProperties": false
  13074. },
  13075. "WorktreeRemoveInput": {
  13076. "type": "object",
  13077. "properties": {
  13078. "directory": {
  13079. "type": "string"
  13080. }
  13081. },
  13082. "required": ["directory"],
  13083. "additionalProperties": false
  13084. },
  13085. "WorktreeResetInput": {
  13086. "type": "object",
  13087. "properties": {
  13088. "directory": {
  13089. "type": "string"
  13090. }
  13091. },
  13092. "required": ["directory"],
  13093. "additionalProperties": false
  13094. },
  13095. "ProjectSummary": {
  13096. "type": "object",
  13097. "properties": {
  13098. "id": {
  13099. "type": "string"
  13100. },
  13101. "name": {
  13102. "type": "string"
  13103. },
  13104. "worktree": {
  13105. "type": "string"
  13106. }
  13107. },
  13108. "required": ["id", "worktree"],
  13109. "additionalProperties": false
  13110. },
  13111. "GlobalSession": {
  13112. "type": "object",
  13113. "properties": {
  13114. "id": {
  13115. "type": "string",
  13116. "pattern": "^ses"
  13117. },
  13118. "slug": {
  13119. "type": "string"
  13120. },
  13121. "projectID": {
  13122. "type": "string"
  13123. },
  13124. "workspaceID": {
  13125. "type": "string",
  13126. "pattern": "^wrk"
  13127. },
  13128. "directory": {
  13129. "type": "string"
  13130. },
  13131. "path": {
  13132. "type": "string"
  13133. },
  13134. "parentID": {
  13135. "type": "string",
  13136. "pattern": "^ses"
  13137. },
  13138. "summary": {
  13139. "type": "object",
  13140. "properties": {
  13141. "additions": {
  13142. "type": "number"
  13143. },
  13144. "deletions": {
  13145. "type": "number"
  13146. },
  13147. "files": {
  13148. "type": "number"
  13149. },
  13150. "diffs": {
  13151. "type": "array",
  13152. "items": {
  13153. "$ref": "#/components/schemas/SnapshotFileDiff"
  13154. }
  13155. }
  13156. },
  13157. "required": ["additions", "deletions", "files"],
  13158. "additionalProperties": false
  13159. },
  13160. "cost": {
  13161. "type": "number"
  13162. },
  13163. "tokens": {
  13164. "type": "object",
  13165. "properties": {
  13166. "input": {
  13167. "type": "number"
  13168. },
  13169. "output": {
  13170. "type": "number"
  13171. },
  13172. "reasoning": {
  13173. "type": "number"
  13174. },
  13175. "cache": {
  13176. "type": "object",
  13177. "properties": {
  13178. "read": {
  13179. "type": "number"
  13180. },
  13181. "write": {
  13182. "type": "number"
  13183. }
  13184. },
  13185. "required": ["read", "write"],
  13186. "additionalProperties": false
  13187. }
  13188. },
  13189. "required": ["input", "output", "reasoning", "cache"],
  13190. "additionalProperties": false
  13191. },
  13192. "share": {
  13193. "type": "object",
  13194. "properties": {
  13195. "url": {
  13196. "type": "string"
  13197. }
  13198. },
  13199. "required": ["url"],
  13200. "additionalProperties": false
  13201. },
  13202. "title": {
  13203. "type": "string"
  13204. },
  13205. "agent": {
  13206. "type": "string"
  13207. },
  13208. "model": {
  13209. "type": "object",
  13210. "properties": {
  13211. "id": {
  13212. "type": "string"
  13213. },
  13214. "providerID": {
  13215. "type": "string"
  13216. },
  13217. "variant": {
  13218. "type": "string"
  13219. }
  13220. },
  13221. "required": ["id", "providerID"],
  13222. "additionalProperties": false
  13223. },
  13224. "version": {
  13225. "type": "string"
  13226. },
  13227. "time": {
  13228. "type": "object",
  13229. "properties": {
  13230. "created": {
  13231. "type": "integer",
  13232. "minimum": 0
  13233. },
  13234. "updated": {
  13235. "type": "integer",
  13236. "minimum": 0
  13237. },
  13238. "compacting": {
  13239. "type": "integer",
  13240. "minimum": 0
  13241. },
  13242. "archived": {
  13243. "type": "number"
  13244. }
  13245. },
  13246. "required": ["created", "updated"],
  13247. "additionalProperties": false
  13248. },
  13249. "permission": {
  13250. "$ref": "#/components/schemas/PermissionRuleset"
  13251. },
  13252. "revert": {
  13253. "type": "object",
  13254. "properties": {
  13255. "messageID": {
  13256. "type": "string",
  13257. "pattern": "^msg"
  13258. },
  13259. "partID": {
  13260. "type": "string",
  13261. "pattern": "^prt"
  13262. },
  13263. "snapshot": {
  13264. "type": "string"
  13265. },
  13266. "diff": {
  13267. "type": "string"
  13268. }
  13269. },
  13270. "required": ["messageID"],
  13271. "additionalProperties": false
  13272. },
  13273. "project": {
  13274. "anyOf": [
  13275. {
  13276. "$ref": "#/components/schemas/ProjectSummary"
  13277. },
  13278. {
  13279. "type": "null"
  13280. }
  13281. ]
  13282. }
  13283. },
  13284. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  13285. "additionalProperties": false
  13286. },
  13287. "McpResource": {
  13288. "type": "object",
  13289. "properties": {
  13290. "name": {
  13291. "type": "string"
  13292. },
  13293. "uri": {
  13294. "type": "string"
  13295. },
  13296. "description": {
  13297. "type": "string"
  13298. },
  13299. "mimeType": {
  13300. "type": "string"
  13301. },
  13302. "client": {
  13303. "type": "string"
  13304. }
  13305. },
  13306. "required": ["name", "uri", "client"],
  13307. "additionalProperties": false
  13308. },
  13309. "Symbol": {
  13310. "type": "object",
  13311. "properties": {
  13312. "name": {
  13313. "type": "string"
  13314. },
  13315. "kind": {
  13316. "type": "integer",
  13317. "minimum": 0
  13318. },
  13319. "location": {
  13320. "type": "object",
  13321. "properties": {
  13322. "uri": {
  13323. "type": "string"
  13324. },
  13325. "range": {
  13326. "$ref": "#/components/schemas/Range"
  13327. }
  13328. },
  13329. "required": ["uri", "range"],
  13330. "additionalProperties": false
  13331. }
  13332. },
  13333. "required": ["name", "kind", "location"],
  13334. "additionalProperties": false
  13335. },
  13336. "FileNode": {
  13337. "type": "object",
  13338. "properties": {
  13339. "name": {
  13340. "type": "string"
  13341. },
  13342. "path": {
  13343. "type": "string"
  13344. },
  13345. "absolute": {
  13346. "type": "string"
  13347. },
  13348. "type": {
  13349. "type": "string",
  13350. "enum": ["file", "directory"]
  13351. },
  13352. "ignored": {
  13353. "type": "boolean"
  13354. }
  13355. },
  13356. "required": ["name", "path", "absolute", "type", "ignored"],
  13357. "additionalProperties": false
  13358. },
  13359. "FileContent": {
  13360. "type": "object",
  13361. "properties": {
  13362. "type": {
  13363. "type": "string",
  13364. "enum": ["text", "binary"]
  13365. },
  13366. "content": {
  13367. "type": "string"
  13368. },
  13369. "diff": {
  13370. "type": "string"
  13371. },
  13372. "patch": {
  13373. "type": "object",
  13374. "properties": {
  13375. "oldFileName": {
  13376. "type": "string"
  13377. },
  13378. "newFileName": {
  13379. "type": "string"
  13380. },
  13381. "oldHeader": {
  13382. "type": "string"
  13383. },
  13384. "newHeader": {
  13385. "type": "string"
  13386. },
  13387. "hunks": {
  13388. "type": "array",
  13389. "items": {
  13390. "type": "object",
  13391. "properties": {
  13392. "oldStart": {
  13393. "type": "integer",
  13394. "minimum": 0
  13395. },
  13396. "oldLines": {
  13397. "type": "integer",
  13398. "minimum": 0
  13399. },
  13400. "newStart": {
  13401. "type": "integer",
  13402. "minimum": 0
  13403. },
  13404. "newLines": {
  13405. "type": "integer",
  13406. "minimum": 0
  13407. },
  13408. "lines": {
  13409. "type": "array",
  13410. "items": {
  13411. "type": "string"
  13412. }
  13413. }
  13414. },
  13415. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  13416. "additionalProperties": false
  13417. }
  13418. },
  13419. "index": {
  13420. "type": "string"
  13421. }
  13422. },
  13423. "required": ["oldFileName", "newFileName", "hunks"],
  13424. "additionalProperties": false
  13425. },
  13426. "encoding": {
  13427. "type": "string",
  13428. "enum": ["base64"]
  13429. },
  13430. "mimeType": {
  13431. "type": "string"
  13432. }
  13433. },
  13434. "required": ["type", "content"],
  13435. "additionalProperties": false
  13436. },
  13437. "File": {
  13438. "type": "object",
  13439. "properties": {
  13440. "path": {
  13441. "type": "string"
  13442. },
  13443. "added": {
  13444. "type": "integer",
  13445. "minimum": 0
  13446. },
  13447. "removed": {
  13448. "type": "integer",
  13449. "minimum": 0
  13450. },
  13451. "status": {
  13452. "type": "string",
  13453. "enum": ["added", "deleted", "modified"]
  13454. }
  13455. },
  13456. "required": ["path", "added", "removed", "status"],
  13457. "additionalProperties": false
  13458. },
  13459. "Path": {
  13460. "type": "object",
  13461. "properties": {
  13462. "home": {
  13463. "type": "string"
  13464. },
  13465. "state": {
  13466. "type": "string"
  13467. },
  13468. "config": {
  13469. "type": "string"
  13470. },
  13471. "worktree": {
  13472. "type": "string"
  13473. },
  13474. "directory": {
  13475. "type": "string"
  13476. }
  13477. },
  13478. "required": ["home", "state", "config", "worktree", "directory"],
  13479. "additionalProperties": false
  13480. },
  13481. "VcsInfo": {
  13482. "type": "object",
  13483. "properties": {
  13484. "branch": {
  13485. "type": "string"
  13486. },
  13487. "default_branch": {
  13488. "type": "string"
  13489. }
  13490. },
  13491. "additionalProperties": false
  13492. },
  13493. "VcsFileStatus": {
  13494. "type": "object",
  13495. "properties": {
  13496. "file": {
  13497. "type": "string"
  13498. },
  13499. "additions": {
  13500. "type": "number"
  13501. },
  13502. "deletions": {
  13503. "type": "number"
  13504. },
  13505. "status": {
  13506. "type": "string",
  13507. "enum": ["added", "deleted", "modified"]
  13508. }
  13509. },
  13510. "required": ["file", "additions", "deletions", "status"],
  13511. "additionalProperties": false
  13512. },
  13513. "VcsFileDiff": {
  13514. "type": "object",
  13515. "properties": {
  13516. "file": {
  13517. "type": "string"
  13518. },
  13519. "patch": {
  13520. "type": "string"
  13521. },
  13522. "additions": {
  13523. "type": "number"
  13524. },
  13525. "deletions": {
  13526. "type": "number"
  13527. },
  13528. "status": {
  13529. "type": "string",
  13530. "enum": ["added", "deleted", "modified"]
  13531. }
  13532. },
  13533. "required": ["file", "additions", "deletions"],
  13534. "additionalProperties": false
  13535. },
  13536. "VcsApplyError": {
  13537. "type": "object",
  13538. "properties": {
  13539. "name": {
  13540. "type": "string",
  13541. "enum": ["VcsApplyError"]
  13542. },
  13543. "data": {
  13544. "type": "object",
  13545. "properties": {
  13546. "message": {
  13547. "type": "string"
  13548. },
  13549. "reason": {
  13550. "type": "string",
  13551. "enum": ["non-git", "not-clean"]
  13552. }
  13553. },
  13554. "required": ["message", "reason"],
  13555. "additionalProperties": false
  13556. }
  13557. },
  13558. "required": ["name", "data"],
  13559. "additionalProperties": false
  13560. },
  13561. "Command": {
  13562. "type": "object",
  13563. "properties": {
  13564. "name": {
  13565. "type": "string"
  13566. },
  13567. "description": {
  13568. "type": "string"
  13569. },
  13570. "agent": {
  13571. "type": "string"
  13572. },
  13573. "model": {
  13574. "type": "string"
  13575. },
  13576. "source": {
  13577. "type": "string",
  13578. "enum": ["command", "mcp", "skill"]
  13579. },
  13580. "template": {
  13581. "type": "string"
  13582. },
  13583. "subtask": {
  13584. "type": "boolean"
  13585. },
  13586. "hints": {
  13587. "type": "array",
  13588. "items": {
  13589. "type": "string"
  13590. }
  13591. }
  13592. },
  13593. "required": ["name", "template", "hints"],
  13594. "additionalProperties": false
  13595. },
  13596. "Agent": {
  13597. "type": "object",
  13598. "properties": {
  13599. "name": {
  13600. "type": "string"
  13601. },
  13602. "description": {
  13603. "type": "string"
  13604. },
  13605. "mode": {
  13606. "type": "string",
  13607. "enum": ["subagent", "primary", "all"]
  13608. },
  13609. "native": {
  13610. "type": "boolean"
  13611. },
  13612. "hidden": {
  13613. "type": "boolean"
  13614. },
  13615. "topP": {
  13616. "type": "number"
  13617. },
  13618. "temperature": {
  13619. "type": "number"
  13620. },
  13621. "color": {
  13622. "type": "string"
  13623. },
  13624. "permission": {
  13625. "$ref": "#/components/schemas/PermissionRuleset"
  13626. },
  13627. "model": {
  13628. "type": "object",
  13629. "properties": {
  13630. "modelID": {
  13631. "type": "string"
  13632. },
  13633. "providerID": {
  13634. "type": "string"
  13635. }
  13636. },
  13637. "required": ["modelID", "providerID"],
  13638. "additionalProperties": false
  13639. },
  13640. "variant": {
  13641. "type": "string"
  13642. },
  13643. "prompt": {
  13644. "type": "string"
  13645. },
  13646. "options": {
  13647. "type": "object"
  13648. },
  13649. "steps": {
  13650. "type": "number"
  13651. }
  13652. },
  13653. "required": ["name", "mode", "permission", "options"],
  13654. "additionalProperties": false
  13655. },
  13656. "LSPStatus": {
  13657. "type": "object",
  13658. "properties": {
  13659. "id": {
  13660. "type": "string"
  13661. },
  13662. "name": {
  13663. "type": "string"
  13664. },
  13665. "root": {
  13666. "type": "string"
  13667. },
  13668. "status": {
  13669. "type": "string",
  13670. "enum": ["connected", "error"]
  13671. }
  13672. },
  13673. "required": ["id", "name", "root", "status"],
  13674. "additionalProperties": false
  13675. },
  13676. "FormatterStatus": {
  13677. "type": "object",
  13678. "properties": {
  13679. "name": {
  13680. "type": "string"
  13681. },
  13682. "extensions": {
  13683. "type": "array",
  13684. "items": {
  13685. "type": "string"
  13686. }
  13687. },
  13688. "enabled": {
  13689. "type": "boolean"
  13690. }
  13691. },
  13692. "required": ["name", "extensions", "enabled"],
  13693. "additionalProperties": false
  13694. },
  13695. "MCPStatusConnected": {
  13696. "type": "object",
  13697. "properties": {
  13698. "status": {
  13699. "type": "string",
  13700. "enum": ["connected"]
  13701. }
  13702. },
  13703. "required": ["status"],
  13704. "additionalProperties": false
  13705. },
  13706. "MCPStatusDisabled": {
  13707. "type": "object",
  13708. "properties": {
  13709. "status": {
  13710. "type": "string",
  13711. "enum": ["disabled"]
  13712. }
  13713. },
  13714. "required": ["status"],
  13715. "additionalProperties": false
  13716. },
  13717. "MCPStatusFailed": {
  13718. "type": "object",
  13719. "properties": {
  13720. "status": {
  13721. "type": "string",
  13722. "enum": ["failed"]
  13723. },
  13724. "error": {
  13725. "type": "string"
  13726. }
  13727. },
  13728. "required": ["status", "error"],
  13729. "additionalProperties": false
  13730. },
  13731. "MCPStatusNeedsAuth": {
  13732. "type": "object",
  13733. "properties": {
  13734. "status": {
  13735. "type": "string",
  13736. "enum": ["needs_auth"]
  13737. }
  13738. },
  13739. "required": ["status"],
  13740. "additionalProperties": false
  13741. },
  13742. "MCPStatusNeedsClientRegistration": {
  13743. "type": "object",
  13744. "properties": {
  13745. "status": {
  13746. "type": "string",
  13747. "enum": ["needs_client_registration"]
  13748. },
  13749. "error": {
  13750. "type": "string"
  13751. }
  13752. },
  13753. "required": ["status", "error"],
  13754. "additionalProperties": false
  13755. },
  13756. "MCPStatus": {
  13757. "anyOf": [
  13758. {
  13759. "$ref": "#/components/schemas/MCPStatusConnected"
  13760. },
  13761. {
  13762. "$ref": "#/components/schemas/MCPStatusDisabled"
  13763. },
  13764. {
  13765. "$ref": "#/components/schemas/MCPStatusFailed"
  13766. },
  13767. {
  13768. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13769. },
  13770. {
  13771. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13772. }
  13773. ]
  13774. },
  13775. "McpUnsupportedOAuthError": {
  13776. "type": "object",
  13777. "properties": {
  13778. "error": {
  13779. "type": "string"
  13780. }
  13781. },
  13782. "required": ["error"],
  13783. "additionalProperties": false
  13784. },
  13785. "NotFoundError": {
  13786. "type": "object",
  13787. "required": ["name", "data"],
  13788. "properties": {
  13789. "name": {
  13790. "type": "string",
  13791. "enum": ["NotFoundError"]
  13792. },
  13793. "data": {
  13794. "type": "object",
  13795. "required": ["message"],
  13796. "properties": {
  13797. "message": {
  13798. "type": "string"
  13799. }
  13800. }
  13801. }
  13802. }
  13803. },
  13804. "effect_HttpApiError_Forbidden": {
  13805. "type": "object",
  13806. "properties": {
  13807. "_tag": {
  13808. "type": "string",
  13809. "enum": ["Forbidden"]
  13810. }
  13811. },
  13812. "required": ["_tag"],
  13813. "additionalProperties": false
  13814. },
  13815. "ProviderAuthMethod": {
  13816. "type": "object",
  13817. "properties": {
  13818. "type": {
  13819. "type": "string",
  13820. "enum": ["oauth", "api"]
  13821. },
  13822. "label": {
  13823. "type": "string"
  13824. },
  13825. "prompts": {
  13826. "type": "array",
  13827. "items": {
  13828. "anyOf": [
  13829. {
  13830. "type": "object",
  13831. "properties": {
  13832. "type": {
  13833. "type": "string",
  13834. "enum": ["text"]
  13835. },
  13836. "key": {
  13837. "type": "string"
  13838. },
  13839. "message": {
  13840. "type": "string"
  13841. },
  13842. "placeholder": {
  13843. "type": "string"
  13844. },
  13845. "when": {
  13846. "type": "object",
  13847. "properties": {
  13848. "key": {
  13849. "type": "string"
  13850. },
  13851. "op": {
  13852. "type": "string",
  13853. "enum": ["eq", "neq"]
  13854. },
  13855. "value": {
  13856. "type": "string"
  13857. }
  13858. },
  13859. "required": ["key", "op", "value"],
  13860. "additionalProperties": false
  13861. }
  13862. },
  13863. "required": ["type", "key", "message"],
  13864. "additionalProperties": false
  13865. },
  13866. {
  13867. "type": "object",
  13868. "properties": {
  13869. "type": {
  13870. "type": "string",
  13871. "enum": ["select"]
  13872. },
  13873. "key": {
  13874. "type": "string"
  13875. },
  13876. "message": {
  13877. "type": "string"
  13878. },
  13879. "options": {
  13880. "type": "array",
  13881. "items": {
  13882. "type": "object",
  13883. "properties": {
  13884. "label": {
  13885. "type": "string"
  13886. },
  13887. "value": {
  13888. "type": "string"
  13889. },
  13890. "hint": {
  13891. "type": "string"
  13892. }
  13893. },
  13894. "required": ["label", "value"],
  13895. "additionalProperties": false
  13896. }
  13897. },
  13898. "when": {
  13899. "type": "object",
  13900. "properties": {
  13901. "key": {
  13902. "type": "string"
  13903. },
  13904. "op": {
  13905. "type": "string",
  13906. "enum": ["eq", "neq"]
  13907. },
  13908. "value": {
  13909. "type": "string"
  13910. }
  13911. },
  13912. "required": ["key", "op", "value"],
  13913. "additionalProperties": false
  13914. }
  13915. },
  13916. "required": ["type", "key", "message", "options"],
  13917. "additionalProperties": false
  13918. }
  13919. ]
  13920. }
  13921. }
  13922. },
  13923. "required": ["type", "label"],
  13924. "additionalProperties": false
  13925. },
  13926. "ProviderAuthAuthorization": {
  13927. "type": "object",
  13928. "properties": {
  13929. "url": {
  13930. "type": "string"
  13931. },
  13932. "method": {
  13933. "type": "string",
  13934. "enum": ["auto", "code"]
  13935. },
  13936. "instructions": {
  13937. "type": "string"
  13938. }
  13939. },
  13940. "required": ["url", "method", "instructions"],
  13941. "additionalProperties": false
  13942. },
  13943. "ProviderAuthError1": {
  13944. "type": "object",
  13945. "properties": {
  13946. "name": {
  13947. "type": "string",
  13948. "enum": [
  13949. "BadRequest",
  13950. "ProviderAuthOauthMissing",
  13951. "ProviderAuthOauthCodeMissing",
  13952. "ProviderAuthOauthCallbackFailed",
  13953. "ProviderAuthValidationFailed"
  13954. ]
  13955. },
  13956. "data": {
  13957. "type": "object",
  13958. "properties": {
  13959. "providerID": {
  13960. "type": "string"
  13961. },
  13962. "field": {
  13963. "type": "string"
  13964. },
  13965. "message": {
  13966. "type": "string"
  13967. },
  13968. "kind": {
  13969. "type": "string"
  13970. }
  13971. },
  13972. "additionalProperties": false
  13973. }
  13974. },
  13975. "required": ["name", "data"],
  13976. "additionalProperties": false
  13977. },
  13978. "TextPartInput": {
  13979. "type": "object",
  13980. "properties": {
  13981. "id": {
  13982. "type": "string",
  13983. "pattern": "^prt"
  13984. },
  13985. "type": {
  13986. "type": "string",
  13987. "enum": ["text"]
  13988. },
  13989. "text": {
  13990. "type": "string"
  13991. },
  13992. "synthetic": {
  13993. "type": "boolean"
  13994. },
  13995. "ignored": {
  13996. "type": "boolean"
  13997. },
  13998. "time": {
  13999. "type": "object",
  14000. "properties": {
  14001. "start": {
  14002. "type": "integer",
  14003. "minimum": 0
  14004. },
  14005. "end": {
  14006. "type": "integer",
  14007. "minimum": 0
  14008. }
  14009. },
  14010. "required": ["start"],
  14011. "additionalProperties": false
  14012. },
  14013. "metadata": {
  14014. "type": "object"
  14015. }
  14016. },
  14017. "required": ["type", "text"],
  14018. "additionalProperties": false
  14019. },
  14020. "FilePartInput": {
  14021. "type": "object",
  14022. "properties": {
  14023. "id": {
  14024. "type": "string",
  14025. "pattern": "^prt"
  14026. },
  14027. "type": {
  14028. "type": "string",
  14029. "enum": ["file"]
  14030. },
  14031. "mime": {
  14032. "type": "string"
  14033. },
  14034. "filename": {
  14035. "type": "string"
  14036. },
  14037. "url": {
  14038. "type": "string"
  14039. },
  14040. "source": {
  14041. "$ref": "#/components/schemas/FilePartSource"
  14042. }
  14043. },
  14044. "required": ["type", "mime", "url"],
  14045. "additionalProperties": false
  14046. },
  14047. "AgentPartInput": {
  14048. "type": "object",
  14049. "properties": {
  14050. "id": {
  14051. "type": "string",
  14052. "pattern": "^prt"
  14053. },
  14054. "type": {
  14055. "type": "string",
  14056. "enum": ["agent"]
  14057. },
  14058. "name": {
  14059. "type": "string"
  14060. },
  14061. "source": {
  14062. "type": "object",
  14063. "properties": {
  14064. "value": {
  14065. "type": "string"
  14066. },
  14067. "start": {
  14068. "type": "integer",
  14069. "minimum": 0
  14070. },
  14071. "end": {
  14072. "type": "integer",
  14073. "minimum": 0
  14074. }
  14075. },
  14076. "required": ["value", "start", "end"],
  14077. "additionalProperties": false
  14078. }
  14079. },
  14080. "required": ["type", "name"],
  14081. "additionalProperties": false
  14082. },
  14083. "SubtaskPartInput": {
  14084. "type": "object",
  14085. "properties": {
  14086. "id": {
  14087. "type": "string",
  14088. "pattern": "^prt"
  14089. },
  14090. "type": {
  14091. "type": "string",
  14092. "enum": ["subtask"]
  14093. },
  14094. "prompt": {
  14095. "type": "string"
  14096. },
  14097. "description": {
  14098. "type": "string"
  14099. },
  14100. "agent": {
  14101. "type": "string"
  14102. },
  14103. "model": {
  14104. "type": "object",
  14105. "properties": {
  14106. "providerID": {
  14107. "type": "string"
  14108. },
  14109. "modelID": {
  14110. "type": "string"
  14111. }
  14112. },
  14113. "required": ["providerID", "modelID"],
  14114. "additionalProperties": false
  14115. },
  14116. "command": {
  14117. "type": "string"
  14118. }
  14119. },
  14120. "required": ["type", "prompt", "description", "agent"],
  14121. "additionalProperties": false
  14122. },
  14123. "V2SessionsResponse": {
  14124. "type": "object",
  14125. "properties": {
  14126. "items": {
  14127. "type": "array",
  14128. "items": {
  14129. "$ref": "#/components/schemas/SessionInfo"
  14130. }
  14131. },
  14132. "cursor": {
  14133. "type": "object",
  14134. "properties": {
  14135. "previous": {
  14136. "type": "string"
  14137. },
  14138. "next": {
  14139. "type": "string"
  14140. }
  14141. },
  14142. "additionalProperties": false
  14143. }
  14144. },
  14145. "required": ["items", "cursor"],
  14146. "additionalProperties": false
  14147. },
  14148. "V2SessionMessagesResponse": {
  14149. "type": "object",
  14150. "properties": {
  14151. "items": {
  14152. "type": "array",
  14153. "items": {
  14154. "$ref": "#/components/schemas/SessionMessage"
  14155. }
  14156. },
  14157. "cursor": {
  14158. "type": "object",
  14159. "properties": {
  14160. "previous": {
  14161. "type": "string"
  14162. },
  14163. "next": {
  14164. "type": "string"
  14165. }
  14166. },
  14167. "additionalProperties": false
  14168. }
  14169. },
  14170. "required": ["items", "cursor"],
  14171. "additionalProperties": false
  14172. },
  14173. "EventTuiPromptAppend": {
  14174. "type": "object",
  14175. "properties": {
  14176. "type": {
  14177. "type": "string",
  14178. "enum": ["tui.prompt.append"]
  14179. },
  14180. "properties": {
  14181. "type": "object",
  14182. "properties": {
  14183. "text": {
  14184. "type": "string"
  14185. }
  14186. },
  14187. "required": ["text"],
  14188. "additionalProperties": false
  14189. }
  14190. },
  14191. "required": ["type", "properties"],
  14192. "additionalProperties": false
  14193. },
  14194. "EventTuiCommandExecute": {
  14195. "type": "object",
  14196. "properties": {
  14197. "type": {
  14198. "type": "string",
  14199. "enum": ["tui.command.execute"]
  14200. },
  14201. "properties": {
  14202. "type": "object",
  14203. "properties": {
  14204. "command": {
  14205. "anyOf": [
  14206. {
  14207. "type": "string",
  14208. "enum": [
  14209. "session.list",
  14210. "session.new",
  14211. "session.share",
  14212. "session.interrupt",
  14213. "session.compact",
  14214. "session.page.up",
  14215. "session.page.down",
  14216. "session.line.up",
  14217. "session.line.down",
  14218. "session.half.page.up",
  14219. "session.half.page.down",
  14220. "session.first",
  14221. "session.last",
  14222. "prompt.clear",
  14223. "prompt.submit",
  14224. "agent.cycle"
  14225. ]
  14226. },
  14227. {
  14228. "type": "string"
  14229. }
  14230. ]
  14231. }
  14232. },
  14233. "required": ["command"],
  14234. "additionalProperties": false
  14235. }
  14236. },
  14237. "required": ["type", "properties"],
  14238. "additionalProperties": false
  14239. },
  14240. "EventTuiToastShow": {
  14241. "type": "object",
  14242. "properties": {
  14243. "type": {
  14244. "type": "string",
  14245. "enum": ["tui.toast.show"]
  14246. },
  14247. "properties": {
  14248. "type": "object",
  14249. "properties": {
  14250. "title": {
  14251. "type": "string"
  14252. },
  14253. "message": {
  14254. "type": "string"
  14255. },
  14256. "variant": {
  14257. "type": "string",
  14258. "enum": ["info", "success", "warning", "error"]
  14259. },
  14260. "duration": {
  14261. "type": "integer",
  14262. "exclusiveMinimum": 0
  14263. }
  14264. },
  14265. "required": ["message", "variant"],
  14266. "additionalProperties": false
  14267. }
  14268. },
  14269. "required": ["type", "properties"],
  14270. "additionalProperties": false
  14271. },
  14272. "EventTuiSessionSelect": {
  14273. "type": "object",
  14274. "properties": {
  14275. "type": {
  14276. "type": "string",
  14277. "enum": ["tui.session.select"]
  14278. },
  14279. "properties": {
  14280. "type": "object",
  14281. "properties": {
  14282. "sessionID": {
  14283. "type": "string",
  14284. "pattern": "^ses",
  14285. "description": "Session ID to navigate to"
  14286. }
  14287. },
  14288. "required": ["sessionID"],
  14289. "additionalProperties": false
  14290. }
  14291. },
  14292. "required": ["type", "properties"],
  14293. "additionalProperties": false
  14294. },
  14295. "Workspace": {
  14296. "type": "object",
  14297. "properties": {
  14298. "id": {
  14299. "type": "string",
  14300. "pattern": "^wrk"
  14301. },
  14302. "type": {
  14303. "type": "string"
  14304. },
  14305. "name": {
  14306. "type": "string"
  14307. },
  14308. "branch": {
  14309. "anyOf": [
  14310. {
  14311. "type": "string"
  14312. },
  14313. {
  14314. "type": "null"
  14315. }
  14316. ]
  14317. },
  14318. "directory": {
  14319. "anyOf": [
  14320. {
  14321. "type": "string"
  14322. },
  14323. {
  14324. "type": "null"
  14325. }
  14326. ]
  14327. },
  14328. "extra": {
  14329. "anyOf": [
  14330. {},
  14331. {
  14332. "type": "null"
  14333. }
  14334. ]
  14335. },
  14336. "projectID": {
  14337. "type": "string"
  14338. },
  14339. "timeUsed": {
  14340. "anyOf": [
  14341. {
  14342. "type": "number"
  14343. },
  14344. {
  14345. "type": "string",
  14346. "enum": ["NaN"]
  14347. },
  14348. {
  14349. "type": "string",
  14350. "enum": ["Infinity"]
  14351. },
  14352. {
  14353. "type": "string",
  14354. "enum": ["-Infinity"]
  14355. },
  14356. {
  14357. "type": "string",
  14358. "enum": ["Infinity", "-Infinity", "NaN"]
  14359. }
  14360. ]
  14361. }
  14362. },
  14363. "required": ["id", "type", "name", "projectID", "timeUsed"],
  14364. "additionalProperties": false
  14365. },
  14366. "WorkspaceWarpError": {
  14367. "type": "object",
  14368. "properties": {
  14369. "name": {
  14370. "type": "string",
  14371. "enum": ["WorkspaceWarpError"]
  14372. },
  14373. "data": {
  14374. "type": "object",
  14375. "properties": {
  14376. "message": {
  14377. "type": "string"
  14378. }
  14379. },
  14380. "required": ["message"],
  14381. "additionalProperties": false
  14382. }
  14383. },
  14384. "required": ["name", "data"],
  14385. "additionalProperties": false
  14386. },
  14387. "SyncEventMessageUpdated": {
  14388. "type": "object",
  14389. "properties": {
  14390. "type": {
  14391. "type": "string",
  14392. "enum": ["sync"]
  14393. },
  14394. "name": {
  14395. "type": "string",
  14396. "enum": ["message.updated.1"]
  14397. },
  14398. "id": {
  14399. "type": "string"
  14400. },
  14401. "seq": {
  14402. "type": "number"
  14403. },
  14404. "aggregateID": {
  14405. "type": "string",
  14406. "enum": ["sessionID"]
  14407. },
  14408. "data": {
  14409. "type": "object",
  14410. "properties": {
  14411. "sessionID": {
  14412. "type": "string",
  14413. "pattern": "^ses"
  14414. },
  14415. "info": {
  14416. "$ref": "#/components/schemas/Message"
  14417. }
  14418. },
  14419. "required": ["sessionID", "info"],
  14420. "additionalProperties": false
  14421. }
  14422. },
  14423. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14424. "additionalProperties": false
  14425. },
  14426. "SyncEventMessageRemoved": {
  14427. "type": "object",
  14428. "properties": {
  14429. "type": {
  14430. "type": "string",
  14431. "enum": ["sync"]
  14432. },
  14433. "name": {
  14434. "type": "string",
  14435. "enum": ["message.removed.1"]
  14436. },
  14437. "id": {
  14438. "type": "string"
  14439. },
  14440. "seq": {
  14441. "type": "number"
  14442. },
  14443. "aggregateID": {
  14444. "type": "string",
  14445. "enum": ["sessionID"]
  14446. },
  14447. "data": {
  14448. "type": "object",
  14449. "properties": {
  14450. "sessionID": {
  14451. "type": "string",
  14452. "pattern": "^ses"
  14453. },
  14454. "messageID": {
  14455. "type": "string",
  14456. "pattern": "^msg"
  14457. }
  14458. },
  14459. "required": ["sessionID", "messageID"],
  14460. "additionalProperties": false
  14461. }
  14462. },
  14463. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14464. "additionalProperties": false
  14465. },
  14466. "SyncEventMessagePartUpdated": {
  14467. "type": "object",
  14468. "properties": {
  14469. "type": {
  14470. "type": "string",
  14471. "enum": ["sync"]
  14472. },
  14473. "name": {
  14474. "type": "string",
  14475. "enum": ["message.part.updated.1"]
  14476. },
  14477. "id": {
  14478. "type": "string"
  14479. },
  14480. "seq": {
  14481. "type": "number"
  14482. },
  14483. "aggregateID": {
  14484. "type": "string",
  14485. "enum": ["sessionID"]
  14486. },
  14487. "data": {
  14488. "type": "object",
  14489. "properties": {
  14490. "sessionID": {
  14491. "type": "string",
  14492. "pattern": "^ses"
  14493. },
  14494. "part": {
  14495. "$ref": "#/components/schemas/Part"
  14496. },
  14497. "time": {
  14498. "type": "integer",
  14499. "minimum": 0
  14500. }
  14501. },
  14502. "required": ["sessionID", "part", "time"],
  14503. "additionalProperties": false
  14504. }
  14505. },
  14506. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14507. "additionalProperties": false
  14508. },
  14509. "SyncEventMessagePartRemoved": {
  14510. "type": "object",
  14511. "properties": {
  14512. "type": {
  14513. "type": "string",
  14514. "enum": ["sync"]
  14515. },
  14516. "name": {
  14517. "type": "string",
  14518. "enum": ["message.part.removed.1"]
  14519. },
  14520. "id": {
  14521. "type": "string"
  14522. },
  14523. "seq": {
  14524. "type": "number"
  14525. },
  14526. "aggregateID": {
  14527. "type": "string",
  14528. "enum": ["sessionID"]
  14529. },
  14530. "data": {
  14531. "type": "object",
  14532. "properties": {
  14533. "sessionID": {
  14534. "type": "string",
  14535. "pattern": "^ses"
  14536. },
  14537. "messageID": {
  14538. "type": "string",
  14539. "pattern": "^msg"
  14540. },
  14541. "partID": {
  14542. "type": "string",
  14543. "pattern": "^prt"
  14544. }
  14545. },
  14546. "required": ["sessionID", "messageID", "partID"],
  14547. "additionalProperties": false
  14548. }
  14549. },
  14550. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14551. "additionalProperties": false
  14552. },
  14553. "SyncEventSessionCreated": {
  14554. "type": "object",
  14555. "properties": {
  14556. "type": {
  14557. "type": "string",
  14558. "enum": ["sync"]
  14559. },
  14560. "name": {
  14561. "type": "string",
  14562. "enum": ["session.created.1"]
  14563. },
  14564. "id": {
  14565. "type": "string"
  14566. },
  14567. "seq": {
  14568. "type": "number"
  14569. },
  14570. "aggregateID": {
  14571. "type": "string",
  14572. "enum": ["sessionID"]
  14573. },
  14574. "data": {
  14575. "type": "object",
  14576. "properties": {
  14577. "sessionID": {
  14578. "type": "string",
  14579. "pattern": "^ses"
  14580. },
  14581. "info": {
  14582. "$ref": "#/components/schemas/Session"
  14583. }
  14584. },
  14585. "required": ["sessionID", "info"],
  14586. "additionalProperties": false
  14587. }
  14588. },
  14589. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14590. "additionalProperties": false
  14591. },
  14592. "SyncEventSessionUpdated": {
  14593. "type": "object",
  14594. "properties": {
  14595. "type": {
  14596. "type": "string",
  14597. "enum": ["sync"]
  14598. },
  14599. "name": {
  14600. "type": "string",
  14601. "enum": ["session.updated.1"]
  14602. },
  14603. "id": {
  14604. "type": "string"
  14605. },
  14606. "seq": {
  14607. "type": "number"
  14608. },
  14609. "aggregateID": {
  14610. "type": "string",
  14611. "enum": ["sessionID"]
  14612. },
  14613. "data": {
  14614. "type": "object",
  14615. "properties": {
  14616. "sessionID": {
  14617. "type": "string",
  14618. "pattern": "^ses"
  14619. },
  14620. "info": {
  14621. "type": "object",
  14622. "properties": {
  14623. "id": {
  14624. "anyOf": [
  14625. {
  14626. "type": "string",
  14627. "pattern": "^ses"
  14628. },
  14629. {
  14630. "type": "null"
  14631. }
  14632. ]
  14633. },
  14634. "slug": {
  14635. "anyOf": [
  14636. {
  14637. "type": "string"
  14638. },
  14639. {
  14640. "type": "null"
  14641. }
  14642. ]
  14643. },
  14644. "projectID": {
  14645. "anyOf": [
  14646. {
  14647. "type": "string"
  14648. },
  14649. {
  14650. "type": "null"
  14651. }
  14652. ]
  14653. },
  14654. "workspaceID": {
  14655. "anyOf": [
  14656. {
  14657. "type": "string",
  14658. "pattern": "^wrk"
  14659. },
  14660. {
  14661. "type": "null"
  14662. }
  14663. ]
  14664. },
  14665. "directory": {
  14666. "anyOf": [
  14667. {
  14668. "type": "string"
  14669. },
  14670. {
  14671. "type": "null"
  14672. }
  14673. ]
  14674. },
  14675. "path": {
  14676. "anyOf": [
  14677. {
  14678. "type": "string"
  14679. },
  14680. {
  14681. "type": "null"
  14682. }
  14683. ]
  14684. },
  14685. "parentID": {
  14686. "anyOf": [
  14687. {
  14688. "type": "string",
  14689. "pattern": "^ses"
  14690. },
  14691. {
  14692. "type": "null"
  14693. }
  14694. ]
  14695. },
  14696. "summary": {
  14697. "anyOf": [
  14698. {
  14699. "type": "object",
  14700. "properties": {
  14701. "additions": {
  14702. "type": "number"
  14703. },
  14704. "deletions": {
  14705. "type": "number"
  14706. },
  14707. "files": {
  14708. "type": "number"
  14709. },
  14710. "diffs": {
  14711. "type": "array",
  14712. "items": {
  14713. "$ref": "#/components/schemas/SnapshotFileDiff"
  14714. }
  14715. }
  14716. },
  14717. "required": ["additions", "deletions", "files"],
  14718. "additionalProperties": false
  14719. },
  14720. {
  14721. "type": "null"
  14722. }
  14723. ]
  14724. },
  14725. "cost": {
  14726. "anyOf": [
  14727. {
  14728. "type": "number"
  14729. },
  14730. {
  14731. "type": "null"
  14732. }
  14733. ]
  14734. },
  14735. "tokens": {
  14736. "anyOf": [
  14737. {
  14738. "type": "object",
  14739. "properties": {
  14740. "input": {
  14741. "type": "number"
  14742. },
  14743. "output": {
  14744. "type": "number"
  14745. },
  14746. "reasoning": {
  14747. "type": "number"
  14748. },
  14749. "cache": {
  14750. "type": "object",
  14751. "properties": {
  14752. "read": {
  14753. "type": "number"
  14754. },
  14755. "write": {
  14756. "type": "number"
  14757. }
  14758. },
  14759. "required": ["read", "write"],
  14760. "additionalProperties": false
  14761. }
  14762. },
  14763. "required": ["input", "output", "reasoning", "cache"],
  14764. "additionalProperties": false
  14765. },
  14766. {
  14767. "type": "null"
  14768. }
  14769. ]
  14770. },
  14771. "share": {
  14772. "type": "object",
  14773. "properties": {
  14774. "url": {
  14775. "anyOf": [
  14776. {
  14777. "type": "string"
  14778. },
  14779. {
  14780. "type": "null"
  14781. }
  14782. ]
  14783. }
  14784. },
  14785. "additionalProperties": false
  14786. },
  14787. "title": {
  14788. "anyOf": [
  14789. {
  14790. "type": "string"
  14791. },
  14792. {
  14793. "type": "null"
  14794. }
  14795. ]
  14796. },
  14797. "agent": {
  14798. "anyOf": [
  14799. {
  14800. "type": "string"
  14801. },
  14802. {
  14803. "type": "null"
  14804. }
  14805. ]
  14806. },
  14807. "model": {
  14808. "anyOf": [
  14809. {
  14810. "type": "object",
  14811. "properties": {
  14812. "id": {
  14813. "type": "string"
  14814. },
  14815. "providerID": {
  14816. "type": "string"
  14817. },
  14818. "variant": {
  14819. "type": "string"
  14820. }
  14821. },
  14822. "required": ["id", "providerID"],
  14823. "additionalProperties": false
  14824. },
  14825. {
  14826. "type": "null"
  14827. }
  14828. ]
  14829. },
  14830. "version": {
  14831. "anyOf": [
  14832. {
  14833. "type": "string"
  14834. },
  14835. {
  14836. "type": "null"
  14837. }
  14838. ]
  14839. },
  14840. "time": {
  14841. "type": "object",
  14842. "properties": {
  14843. "created": {
  14844. "anyOf": [
  14845. {
  14846. "type": "integer",
  14847. "minimum": 0
  14848. },
  14849. {
  14850. "type": "null"
  14851. }
  14852. ]
  14853. },
  14854. "updated": {
  14855. "anyOf": [
  14856. {
  14857. "type": "integer",
  14858. "minimum": 0
  14859. },
  14860. {
  14861. "type": "null"
  14862. }
  14863. ]
  14864. },
  14865. "compacting": {
  14866. "anyOf": [
  14867. {
  14868. "type": "integer",
  14869. "minimum": 0
  14870. },
  14871. {
  14872. "type": "null"
  14873. }
  14874. ]
  14875. },
  14876. "archived": {
  14877. "anyOf": [
  14878. {
  14879. "type": "number"
  14880. },
  14881. {
  14882. "type": "null"
  14883. }
  14884. ]
  14885. }
  14886. },
  14887. "additionalProperties": false
  14888. },
  14889. "permission": {
  14890. "anyOf": [
  14891. {
  14892. "$ref": "#/components/schemas/PermissionRuleset"
  14893. },
  14894. {
  14895. "type": "null"
  14896. }
  14897. ]
  14898. },
  14899. "revert": {
  14900. "anyOf": [
  14901. {
  14902. "type": "object",
  14903. "properties": {
  14904. "messageID": {
  14905. "type": "string",
  14906. "pattern": "^msg"
  14907. },
  14908. "partID": {
  14909. "type": "string",
  14910. "pattern": "^prt"
  14911. },
  14912. "snapshot": {
  14913. "type": "string"
  14914. },
  14915. "diff": {
  14916. "type": "string"
  14917. }
  14918. },
  14919. "required": ["messageID"],
  14920. "additionalProperties": false
  14921. },
  14922. {
  14923. "type": "null"
  14924. }
  14925. ]
  14926. }
  14927. },
  14928. "additionalProperties": false
  14929. }
  14930. },
  14931. "required": ["sessionID", "info"],
  14932. "additionalProperties": false
  14933. }
  14934. },
  14935. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14936. "additionalProperties": false
  14937. },
  14938. "SyncEventSessionDeleted": {
  14939. "type": "object",
  14940. "properties": {
  14941. "type": {
  14942. "type": "string",
  14943. "enum": ["sync"]
  14944. },
  14945. "name": {
  14946. "type": "string",
  14947. "enum": ["session.deleted.1"]
  14948. },
  14949. "id": {
  14950. "type": "string"
  14951. },
  14952. "seq": {
  14953. "type": "number"
  14954. },
  14955. "aggregateID": {
  14956. "type": "string",
  14957. "enum": ["sessionID"]
  14958. },
  14959. "data": {
  14960. "type": "object",
  14961. "properties": {
  14962. "sessionID": {
  14963. "type": "string",
  14964. "pattern": "^ses"
  14965. },
  14966. "info": {
  14967. "$ref": "#/components/schemas/Session"
  14968. }
  14969. },
  14970. "required": ["sessionID", "info"],
  14971. "additionalProperties": false
  14972. }
  14973. },
  14974. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14975. "additionalProperties": false
  14976. },
  14977. "SyncEventSessionNextAgentSwitched": {
  14978. "type": "object",
  14979. "properties": {
  14980. "type": {
  14981. "type": "string",
  14982. "enum": ["sync"]
  14983. },
  14984. "name": {
  14985. "type": "string",
  14986. "enum": ["session.next.agent.switched.1"]
  14987. },
  14988. "id": {
  14989. "type": "string"
  14990. },
  14991. "seq": {
  14992. "type": "number"
  14993. },
  14994. "aggregateID": {
  14995. "type": "string",
  14996. "enum": ["sessionID"]
  14997. },
  14998. "data": {
  14999. "type": "object",
  15000. "properties": {
  15001. "timestamp": {
  15002. "type": "number"
  15003. },
  15004. "sessionID": {
  15005. "type": "string",
  15006. "pattern": "^ses"
  15007. },
  15008. "agent": {
  15009. "type": "string"
  15010. }
  15011. },
  15012. "required": ["timestamp", "sessionID", "agent"],
  15013. "additionalProperties": false
  15014. }
  15015. },
  15016. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15017. "additionalProperties": false
  15018. },
  15019. "SyncEventSessionNextModelSwitched": {
  15020. "type": "object",
  15021. "properties": {
  15022. "type": {
  15023. "type": "string",
  15024. "enum": ["sync"]
  15025. },
  15026. "name": {
  15027. "type": "string",
  15028. "enum": ["session.next.model.switched.1"]
  15029. },
  15030. "id": {
  15031. "type": "string"
  15032. },
  15033. "seq": {
  15034. "type": "number"
  15035. },
  15036. "aggregateID": {
  15037. "type": "string",
  15038. "enum": ["sessionID"]
  15039. },
  15040. "data": {
  15041. "type": "object",
  15042. "properties": {
  15043. "timestamp": {
  15044. "type": "number"
  15045. },
  15046. "sessionID": {
  15047. "type": "string",
  15048. "pattern": "^ses"
  15049. },
  15050. "model": {
  15051. "type": "object",
  15052. "properties": {
  15053. "id": {
  15054. "type": "string"
  15055. },
  15056. "providerID": {
  15057. "type": "string"
  15058. },
  15059. "variant": {
  15060. "type": "string"
  15061. }
  15062. },
  15063. "required": ["id", "providerID", "variant"],
  15064. "additionalProperties": false
  15065. }
  15066. },
  15067. "required": ["timestamp", "sessionID", "model"],
  15068. "additionalProperties": false
  15069. }
  15070. },
  15071. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15072. "additionalProperties": false
  15073. },
  15074. "SyncEventSessionNextPrompted": {
  15075. "type": "object",
  15076. "properties": {
  15077. "type": {
  15078. "type": "string",
  15079. "enum": ["sync"]
  15080. },
  15081. "name": {
  15082. "type": "string",
  15083. "enum": ["session.next.prompted.1"]
  15084. },
  15085. "id": {
  15086. "type": "string"
  15087. },
  15088. "seq": {
  15089. "type": "number"
  15090. },
  15091. "aggregateID": {
  15092. "type": "string",
  15093. "enum": ["sessionID"]
  15094. },
  15095. "data": {
  15096. "type": "object",
  15097. "properties": {
  15098. "timestamp": {
  15099. "type": "number"
  15100. },
  15101. "sessionID": {
  15102. "type": "string",
  15103. "pattern": "^ses"
  15104. },
  15105. "prompt": {
  15106. "$ref": "#/components/schemas/Prompt"
  15107. }
  15108. },
  15109. "required": ["timestamp", "sessionID", "prompt"],
  15110. "additionalProperties": false
  15111. }
  15112. },
  15113. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15114. "additionalProperties": false
  15115. },
  15116. "SyncEventSessionNextSynthetic": {
  15117. "type": "object",
  15118. "properties": {
  15119. "type": {
  15120. "type": "string",
  15121. "enum": ["sync"]
  15122. },
  15123. "name": {
  15124. "type": "string",
  15125. "enum": ["session.next.synthetic.1"]
  15126. },
  15127. "id": {
  15128. "type": "string"
  15129. },
  15130. "seq": {
  15131. "type": "number"
  15132. },
  15133. "aggregateID": {
  15134. "type": "string",
  15135. "enum": ["sessionID"]
  15136. },
  15137. "data": {
  15138. "type": "object",
  15139. "properties": {
  15140. "timestamp": {
  15141. "type": "number"
  15142. },
  15143. "sessionID": {
  15144. "type": "string",
  15145. "pattern": "^ses"
  15146. },
  15147. "text": {
  15148. "type": "string"
  15149. }
  15150. },
  15151. "required": ["timestamp", "sessionID", "text"],
  15152. "additionalProperties": false
  15153. }
  15154. },
  15155. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15156. "additionalProperties": false
  15157. },
  15158. "SyncEventSessionNextShellStarted": {
  15159. "type": "object",
  15160. "properties": {
  15161. "type": {
  15162. "type": "string",
  15163. "enum": ["sync"]
  15164. },
  15165. "name": {
  15166. "type": "string",
  15167. "enum": ["session.next.shell.started.1"]
  15168. },
  15169. "id": {
  15170. "type": "string"
  15171. },
  15172. "seq": {
  15173. "type": "number"
  15174. },
  15175. "aggregateID": {
  15176. "type": "string",
  15177. "enum": ["sessionID"]
  15178. },
  15179. "data": {
  15180. "type": "object",
  15181. "properties": {
  15182. "timestamp": {
  15183. "type": "number"
  15184. },
  15185. "sessionID": {
  15186. "type": "string",
  15187. "pattern": "^ses"
  15188. },
  15189. "callID": {
  15190. "type": "string"
  15191. },
  15192. "command": {
  15193. "type": "string"
  15194. }
  15195. },
  15196. "required": ["timestamp", "sessionID", "callID", "command"],
  15197. "additionalProperties": false
  15198. }
  15199. },
  15200. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15201. "additionalProperties": false
  15202. },
  15203. "SyncEventSessionNextShellEnded": {
  15204. "type": "object",
  15205. "properties": {
  15206. "type": {
  15207. "type": "string",
  15208. "enum": ["sync"]
  15209. },
  15210. "name": {
  15211. "type": "string",
  15212. "enum": ["session.next.shell.ended.1"]
  15213. },
  15214. "id": {
  15215. "type": "string"
  15216. },
  15217. "seq": {
  15218. "type": "number"
  15219. },
  15220. "aggregateID": {
  15221. "type": "string",
  15222. "enum": ["sessionID"]
  15223. },
  15224. "data": {
  15225. "type": "object",
  15226. "properties": {
  15227. "timestamp": {
  15228. "type": "number"
  15229. },
  15230. "sessionID": {
  15231. "type": "string",
  15232. "pattern": "^ses"
  15233. },
  15234. "callID": {
  15235. "type": "string"
  15236. },
  15237. "output": {
  15238. "type": "string"
  15239. }
  15240. },
  15241. "required": ["timestamp", "sessionID", "callID", "output"],
  15242. "additionalProperties": false
  15243. }
  15244. },
  15245. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15246. "additionalProperties": false
  15247. },
  15248. "SyncEventSessionNextStepStarted": {
  15249. "type": "object",
  15250. "properties": {
  15251. "type": {
  15252. "type": "string",
  15253. "enum": ["sync"]
  15254. },
  15255. "name": {
  15256. "type": "string",
  15257. "enum": ["session.next.step.started.1"]
  15258. },
  15259. "id": {
  15260. "type": "string"
  15261. },
  15262. "seq": {
  15263. "type": "number"
  15264. },
  15265. "aggregateID": {
  15266. "type": "string",
  15267. "enum": ["sessionID"]
  15268. },
  15269. "data": {
  15270. "type": "object",
  15271. "properties": {
  15272. "timestamp": {
  15273. "type": "number"
  15274. },
  15275. "sessionID": {
  15276. "type": "string",
  15277. "pattern": "^ses"
  15278. },
  15279. "agent": {
  15280. "type": "string"
  15281. },
  15282. "model": {
  15283. "type": "object",
  15284. "properties": {
  15285. "id": {
  15286. "type": "string"
  15287. },
  15288. "providerID": {
  15289. "type": "string"
  15290. },
  15291. "variant": {
  15292. "type": "string"
  15293. }
  15294. },
  15295. "required": ["id", "providerID", "variant"],
  15296. "additionalProperties": false
  15297. },
  15298. "snapshot": {
  15299. "type": "string"
  15300. }
  15301. },
  15302. "required": ["timestamp", "sessionID", "agent", "model"],
  15303. "additionalProperties": false
  15304. }
  15305. },
  15306. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15307. "additionalProperties": false
  15308. },
  15309. "SyncEventSessionNextStepEnded": {
  15310. "type": "object",
  15311. "properties": {
  15312. "type": {
  15313. "type": "string",
  15314. "enum": ["sync"]
  15315. },
  15316. "name": {
  15317. "type": "string",
  15318. "enum": ["session.next.step.ended.1"]
  15319. },
  15320. "id": {
  15321. "type": "string"
  15322. },
  15323. "seq": {
  15324. "type": "number"
  15325. },
  15326. "aggregateID": {
  15327. "type": "string",
  15328. "enum": ["sessionID"]
  15329. },
  15330. "data": {
  15331. "type": "object",
  15332. "properties": {
  15333. "timestamp": {
  15334. "type": "number"
  15335. },
  15336. "sessionID": {
  15337. "type": "string",
  15338. "pattern": "^ses"
  15339. },
  15340. "finish": {
  15341. "type": "string"
  15342. },
  15343. "cost": {
  15344. "type": "number"
  15345. },
  15346. "tokens": {
  15347. "type": "object",
  15348. "properties": {
  15349. "input": {
  15350. "type": "number"
  15351. },
  15352. "output": {
  15353. "type": "number"
  15354. },
  15355. "reasoning": {
  15356. "type": "number"
  15357. },
  15358. "cache": {
  15359. "type": "object",
  15360. "properties": {
  15361. "read": {
  15362. "type": "number"
  15363. },
  15364. "write": {
  15365. "type": "number"
  15366. }
  15367. },
  15368. "required": ["read", "write"],
  15369. "additionalProperties": false
  15370. }
  15371. },
  15372. "required": ["input", "output", "reasoning", "cache"],
  15373. "additionalProperties": false
  15374. },
  15375. "snapshot": {
  15376. "type": "string"
  15377. }
  15378. },
  15379. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  15380. "additionalProperties": false
  15381. }
  15382. },
  15383. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15384. "additionalProperties": false
  15385. },
  15386. "SyncEventSessionNextStepFailed": {
  15387. "type": "object",
  15388. "properties": {
  15389. "type": {
  15390. "type": "string",
  15391. "enum": ["sync"]
  15392. },
  15393. "name": {
  15394. "type": "string",
  15395. "enum": ["session.next.step.failed.1"]
  15396. },
  15397. "id": {
  15398. "type": "string"
  15399. },
  15400. "seq": {
  15401. "type": "number"
  15402. },
  15403. "aggregateID": {
  15404. "type": "string",
  15405. "enum": ["sessionID"]
  15406. },
  15407. "data": {
  15408. "type": "object",
  15409. "properties": {
  15410. "timestamp": {
  15411. "type": "number"
  15412. },
  15413. "sessionID": {
  15414. "type": "string",
  15415. "pattern": "^ses"
  15416. },
  15417. "error": {
  15418. "$ref": "#/components/schemas/SessionErrorUnknown"
  15419. }
  15420. },
  15421. "required": ["timestamp", "sessionID", "error"],
  15422. "additionalProperties": false
  15423. }
  15424. },
  15425. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15426. "additionalProperties": false
  15427. },
  15428. "SyncEventSessionNextTextStarted": {
  15429. "type": "object",
  15430. "properties": {
  15431. "type": {
  15432. "type": "string",
  15433. "enum": ["sync"]
  15434. },
  15435. "name": {
  15436. "type": "string",
  15437. "enum": ["session.next.text.started.1"]
  15438. },
  15439. "id": {
  15440. "type": "string"
  15441. },
  15442. "seq": {
  15443. "type": "number"
  15444. },
  15445. "aggregateID": {
  15446. "type": "string",
  15447. "enum": ["sessionID"]
  15448. },
  15449. "data": {
  15450. "type": "object",
  15451. "properties": {
  15452. "timestamp": {
  15453. "type": "number"
  15454. },
  15455. "sessionID": {
  15456. "type": "string",
  15457. "pattern": "^ses"
  15458. }
  15459. },
  15460. "required": ["timestamp", "sessionID"],
  15461. "additionalProperties": false
  15462. }
  15463. },
  15464. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15465. "additionalProperties": false
  15466. },
  15467. "SyncEventSessionNextTextDelta": {
  15468. "type": "object",
  15469. "properties": {
  15470. "type": {
  15471. "type": "string",
  15472. "enum": ["sync"]
  15473. },
  15474. "name": {
  15475. "type": "string",
  15476. "enum": ["session.next.text.delta.1"]
  15477. },
  15478. "id": {
  15479. "type": "string"
  15480. },
  15481. "seq": {
  15482. "type": "number"
  15483. },
  15484. "aggregateID": {
  15485. "type": "string",
  15486. "enum": ["sessionID"]
  15487. },
  15488. "data": {
  15489. "type": "object",
  15490. "properties": {
  15491. "timestamp": {
  15492. "type": "number"
  15493. },
  15494. "sessionID": {
  15495. "type": "string",
  15496. "pattern": "^ses"
  15497. },
  15498. "delta": {
  15499. "type": "string"
  15500. }
  15501. },
  15502. "required": ["timestamp", "sessionID", "delta"],
  15503. "additionalProperties": false
  15504. }
  15505. },
  15506. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15507. "additionalProperties": false
  15508. },
  15509. "SyncEventSessionNextTextEnded": {
  15510. "type": "object",
  15511. "properties": {
  15512. "type": {
  15513. "type": "string",
  15514. "enum": ["sync"]
  15515. },
  15516. "name": {
  15517. "type": "string",
  15518. "enum": ["session.next.text.ended.1"]
  15519. },
  15520. "id": {
  15521. "type": "string"
  15522. },
  15523. "seq": {
  15524. "type": "number"
  15525. },
  15526. "aggregateID": {
  15527. "type": "string",
  15528. "enum": ["sessionID"]
  15529. },
  15530. "data": {
  15531. "type": "object",
  15532. "properties": {
  15533. "timestamp": {
  15534. "type": "number"
  15535. },
  15536. "sessionID": {
  15537. "type": "string",
  15538. "pattern": "^ses"
  15539. },
  15540. "text": {
  15541. "type": "string"
  15542. }
  15543. },
  15544. "required": ["timestamp", "sessionID", "text"],
  15545. "additionalProperties": false
  15546. }
  15547. },
  15548. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15549. "additionalProperties": false
  15550. },
  15551. "SyncEventSessionNextReasoningStarted": {
  15552. "type": "object",
  15553. "properties": {
  15554. "type": {
  15555. "type": "string",
  15556. "enum": ["sync"]
  15557. },
  15558. "name": {
  15559. "type": "string",
  15560. "enum": ["session.next.reasoning.started.1"]
  15561. },
  15562. "id": {
  15563. "type": "string"
  15564. },
  15565. "seq": {
  15566. "type": "number"
  15567. },
  15568. "aggregateID": {
  15569. "type": "string",
  15570. "enum": ["sessionID"]
  15571. },
  15572. "data": {
  15573. "type": "object",
  15574. "properties": {
  15575. "timestamp": {
  15576. "type": "number"
  15577. },
  15578. "sessionID": {
  15579. "type": "string",
  15580. "pattern": "^ses"
  15581. },
  15582. "reasoningID": {
  15583. "type": "string"
  15584. }
  15585. },
  15586. "required": ["timestamp", "sessionID", "reasoningID"],
  15587. "additionalProperties": false
  15588. }
  15589. },
  15590. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15591. "additionalProperties": false
  15592. },
  15593. "SyncEventSessionNextReasoningDelta": {
  15594. "type": "object",
  15595. "properties": {
  15596. "type": {
  15597. "type": "string",
  15598. "enum": ["sync"]
  15599. },
  15600. "name": {
  15601. "type": "string",
  15602. "enum": ["session.next.reasoning.delta.1"]
  15603. },
  15604. "id": {
  15605. "type": "string"
  15606. },
  15607. "seq": {
  15608. "type": "number"
  15609. },
  15610. "aggregateID": {
  15611. "type": "string",
  15612. "enum": ["sessionID"]
  15613. },
  15614. "data": {
  15615. "type": "object",
  15616. "properties": {
  15617. "timestamp": {
  15618. "type": "number"
  15619. },
  15620. "sessionID": {
  15621. "type": "string",
  15622. "pattern": "^ses"
  15623. },
  15624. "reasoningID": {
  15625. "type": "string"
  15626. },
  15627. "delta": {
  15628. "type": "string"
  15629. }
  15630. },
  15631. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  15632. "additionalProperties": false
  15633. }
  15634. },
  15635. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15636. "additionalProperties": false
  15637. },
  15638. "SyncEventSessionNextReasoningEnded": {
  15639. "type": "object",
  15640. "properties": {
  15641. "type": {
  15642. "type": "string",
  15643. "enum": ["sync"]
  15644. },
  15645. "name": {
  15646. "type": "string",
  15647. "enum": ["session.next.reasoning.ended.1"]
  15648. },
  15649. "id": {
  15650. "type": "string"
  15651. },
  15652. "seq": {
  15653. "type": "number"
  15654. },
  15655. "aggregateID": {
  15656. "type": "string",
  15657. "enum": ["sessionID"]
  15658. },
  15659. "data": {
  15660. "type": "object",
  15661. "properties": {
  15662. "timestamp": {
  15663. "type": "number"
  15664. },
  15665. "sessionID": {
  15666. "type": "string",
  15667. "pattern": "^ses"
  15668. },
  15669. "reasoningID": {
  15670. "type": "string"
  15671. },
  15672. "text": {
  15673. "type": "string"
  15674. }
  15675. },
  15676. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  15677. "additionalProperties": false
  15678. }
  15679. },
  15680. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15681. "additionalProperties": false
  15682. },
  15683. "SyncEventSessionNextToolInputStarted": {
  15684. "type": "object",
  15685. "properties": {
  15686. "type": {
  15687. "type": "string",
  15688. "enum": ["sync"]
  15689. },
  15690. "name": {
  15691. "type": "string",
  15692. "enum": ["session.next.tool.input.started.1"]
  15693. },
  15694. "id": {
  15695. "type": "string"
  15696. },
  15697. "seq": {
  15698. "type": "number"
  15699. },
  15700. "aggregateID": {
  15701. "type": "string",
  15702. "enum": ["sessionID"]
  15703. },
  15704. "data": {
  15705. "type": "object",
  15706. "properties": {
  15707. "timestamp": {
  15708. "type": "number"
  15709. },
  15710. "sessionID": {
  15711. "type": "string",
  15712. "pattern": "^ses"
  15713. },
  15714. "callID": {
  15715. "type": "string"
  15716. },
  15717. "name": {
  15718. "type": "string"
  15719. }
  15720. },
  15721. "required": ["timestamp", "sessionID", "callID", "name"],
  15722. "additionalProperties": false
  15723. }
  15724. },
  15725. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15726. "additionalProperties": false
  15727. },
  15728. "SyncEventSessionNextToolInputDelta": {
  15729. "type": "object",
  15730. "properties": {
  15731. "type": {
  15732. "type": "string",
  15733. "enum": ["sync"]
  15734. },
  15735. "name": {
  15736. "type": "string",
  15737. "enum": ["session.next.tool.input.delta.1"]
  15738. },
  15739. "id": {
  15740. "type": "string"
  15741. },
  15742. "seq": {
  15743. "type": "number"
  15744. },
  15745. "aggregateID": {
  15746. "type": "string",
  15747. "enum": ["sessionID"]
  15748. },
  15749. "data": {
  15750. "type": "object",
  15751. "properties": {
  15752. "timestamp": {
  15753. "type": "number"
  15754. },
  15755. "sessionID": {
  15756. "type": "string",
  15757. "pattern": "^ses"
  15758. },
  15759. "callID": {
  15760. "type": "string"
  15761. },
  15762. "delta": {
  15763. "type": "string"
  15764. }
  15765. },
  15766. "required": ["timestamp", "sessionID", "callID", "delta"],
  15767. "additionalProperties": false
  15768. }
  15769. },
  15770. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15771. "additionalProperties": false
  15772. },
  15773. "SyncEventSessionNextToolInputEnded": {
  15774. "type": "object",
  15775. "properties": {
  15776. "type": {
  15777. "type": "string",
  15778. "enum": ["sync"]
  15779. },
  15780. "name": {
  15781. "type": "string",
  15782. "enum": ["session.next.tool.input.ended.1"]
  15783. },
  15784. "id": {
  15785. "type": "string"
  15786. },
  15787. "seq": {
  15788. "type": "number"
  15789. },
  15790. "aggregateID": {
  15791. "type": "string",
  15792. "enum": ["sessionID"]
  15793. },
  15794. "data": {
  15795. "type": "object",
  15796. "properties": {
  15797. "timestamp": {
  15798. "type": "number"
  15799. },
  15800. "sessionID": {
  15801. "type": "string",
  15802. "pattern": "^ses"
  15803. },
  15804. "callID": {
  15805. "type": "string"
  15806. },
  15807. "text": {
  15808. "type": "string"
  15809. }
  15810. },
  15811. "required": ["timestamp", "sessionID", "callID", "text"],
  15812. "additionalProperties": false
  15813. }
  15814. },
  15815. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15816. "additionalProperties": false
  15817. },
  15818. "SyncEventSessionNextToolCalled": {
  15819. "type": "object",
  15820. "properties": {
  15821. "type": {
  15822. "type": "string",
  15823. "enum": ["sync"]
  15824. },
  15825. "name": {
  15826. "type": "string",
  15827. "enum": ["session.next.tool.called.1"]
  15828. },
  15829. "id": {
  15830. "type": "string"
  15831. },
  15832. "seq": {
  15833. "type": "number"
  15834. },
  15835. "aggregateID": {
  15836. "type": "string",
  15837. "enum": ["sessionID"]
  15838. },
  15839. "data": {
  15840. "type": "object",
  15841. "properties": {
  15842. "timestamp": {
  15843. "type": "number"
  15844. },
  15845. "sessionID": {
  15846. "type": "string",
  15847. "pattern": "^ses"
  15848. },
  15849. "callID": {
  15850. "type": "string"
  15851. },
  15852. "tool": {
  15853. "type": "string"
  15854. },
  15855. "input": {
  15856. "type": "object"
  15857. },
  15858. "provider": {
  15859. "type": "object",
  15860. "properties": {
  15861. "executed": {
  15862. "type": "boolean"
  15863. },
  15864. "metadata": {
  15865. "type": "object"
  15866. }
  15867. },
  15868. "required": ["executed"],
  15869. "additionalProperties": false
  15870. }
  15871. },
  15872. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  15873. "additionalProperties": false
  15874. }
  15875. },
  15876. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15877. "additionalProperties": false
  15878. },
  15879. "SyncEventSessionNextToolProgress": {
  15880. "type": "object",
  15881. "properties": {
  15882. "type": {
  15883. "type": "string",
  15884. "enum": ["sync"]
  15885. },
  15886. "name": {
  15887. "type": "string",
  15888. "enum": ["session.next.tool.progress.1"]
  15889. },
  15890. "id": {
  15891. "type": "string"
  15892. },
  15893. "seq": {
  15894. "type": "number"
  15895. },
  15896. "aggregateID": {
  15897. "type": "string",
  15898. "enum": ["sessionID"]
  15899. },
  15900. "data": {
  15901. "type": "object",
  15902. "properties": {
  15903. "timestamp": {
  15904. "type": "number"
  15905. },
  15906. "sessionID": {
  15907. "type": "string",
  15908. "pattern": "^ses"
  15909. },
  15910. "callID": {
  15911. "type": "string"
  15912. },
  15913. "structured": {
  15914. "type": "object"
  15915. },
  15916. "content": {
  15917. "type": "array",
  15918. "items": {
  15919. "anyOf": [
  15920. {
  15921. "$ref": "#/components/schemas/ToolTextContent"
  15922. },
  15923. {
  15924. "$ref": "#/components/schemas/ToolFileContent"
  15925. }
  15926. ]
  15927. }
  15928. }
  15929. },
  15930. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  15931. "additionalProperties": false
  15932. }
  15933. },
  15934. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15935. "additionalProperties": false
  15936. },
  15937. "SyncEventSessionNextToolSuccess": {
  15938. "type": "object",
  15939. "properties": {
  15940. "type": {
  15941. "type": "string",
  15942. "enum": ["sync"]
  15943. },
  15944. "name": {
  15945. "type": "string",
  15946. "enum": ["session.next.tool.success.1"]
  15947. },
  15948. "id": {
  15949. "type": "string"
  15950. },
  15951. "seq": {
  15952. "type": "number"
  15953. },
  15954. "aggregateID": {
  15955. "type": "string",
  15956. "enum": ["sessionID"]
  15957. },
  15958. "data": {
  15959. "type": "object",
  15960. "properties": {
  15961. "timestamp": {
  15962. "type": "number"
  15963. },
  15964. "sessionID": {
  15965. "type": "string",
  15966. "pattern": "^ses"
  15967. },
  15968. "callID": {
  15969. "type": "string"
  15970. },
  15971. "structured": {
  15972. "type": "object"
  15973. },
  15974. "content": {
  15975. "type": "array",
  15976. "items": {
  15977. "anyOf": [
  15978. {
  15979. "$ref": "#/components/schemas/ToolTextContent"
  15980. },
  15981. {
  15982. "$ref": "#/components/schemas/ToolFileContent"
  15983. }
  15984. ]
  15985. }
  15986. },
  15987. "provider": {
  15988. "type": "object",
  15989. "properties": {
  15990. "executed": {
  15991. "type": "boolean"
  15992. },
  15993. "metadata": {
  15994. "type": "object"
  15995. }
  15996. },
  15997. "required": ["executed"],
  15998. "additionalProperties": false
  15999. }
  16000. },
  16001. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  16002. "additionalProperties": false
  16003. }
  16004. },
  16005. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16006. "additionalProperties": false
  16007. },
  16008. "SyncEventSessionNextToolFailed": {
  16009. "type": "object",
  16010. "properties": {
  16011. "type": {
  16012. "type": "string",
  16013. "enum": ["sync"]
  16014. },
  16015. "name": {
  16016. "type": "string",
  16017. "enum": ["session.next.tool.failed.1"]
  16018. },
  16019. "id": {
  16020. "type": "string"
  16021. },
  16022. "seq": {
  16023. "type": "number"
  16024. },
  16025. "aggregateID": {
  16026. "type": "string",
  16027. "enum": ["sessionID"]
  16028. },
  16029. "data": {
  16030. "type": "object",
  16031. "properties": {
  16032. "timestamp": {
  16033. "type": "number"
  16034. },
  16035. "sessionID": {
  16036. "type": "string",
  16037. "pattern": "^ses"
  16038. },
  16039. "callID": {
  16040. "type": "string"
  16041. },
  16042. "error": {
  16043. "$ref": "#/components/schemas/SessionErrorUnknown"
  16044. },
  16045. "provider": {
  16046. "type": "object",
  16047. "properties": {
  16048. "executed": {
  16049. "type": "boolean"
  16050. },
  16051. "metadata": {
  16052. "type": "object"
  16053. }
  16054. },
  16055. "required": ["executed"],
  16056. "additionalProperties": false
  16057. }
  16058. },
  16059. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  16060. "additionalProperties": false
  16061. }
  16062. },
  16063. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16064. "additionalProperties": false
  16065. },
  16066. "SyncEventSessionNextRetried": {
  16067. "type": "object",
  16068. "properties": {
  16069. "type": {
  16070. "type": "string",
  16071. "enum": ["sync"]
  16072. },
  16073. "name": {
  16074. "type": "string",
  16075. "enum": ["session.next.retried.1"]
  16076. },
  16077. "id": {
  16078. "type": "string"
  16079. },
  16080. "seq": {
  16081. "type": "number"
  16082. },
  16083. "aggregateID": {
  16084. "type": "string",
  16085. "enum": ["sessionID"]
  16086. },
  16087. "data": {
  16088. "type": "object",
  16089. "properties": {
  16090. "timestamp": {
  16091. "type": "number"
  16092. },
  16093. "sessionID": {
  16094. "type": "string",
  16095. "pattern": "^ses"
  16096. },
  16097. "attempt": {
  16098. "type": "number"
  16099. },
  16100. "error": {
  16101. "$ref": "#/components/schemas/SessionNextRetry_error"
  16102. }
  16103. },
  16104. "required": ["timestamp", "sessionID", "attempt", "error"],
  16105. "additionalProperties": false
  16106. }
  16107. },
  16108. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16109. "additionalProperties": false
  16110. },
  16111. "SyncEventSessionNextCompactionStarted": {
  16112. "type": "object",
  16113. "properties": {
  16114. "type": {
  16115. "type": "string",
  16116. "enum": ["sync"]
  16117. },
  16118. "name": {
  16119. "type": "string",
  16120. "enum": ["session.next.compaction.started.1"]
  16121. },
  16122. "id": {
  16123. "type": "string"
  16124. },
  16125. "seq": {
  16126. "type": "number"
  16127. },
  16128. "aggregateID": {
  16129. "type": "string",
  16130. "enum": ["sessionID"]
  16131. },
  16132. "data": {
  16133. "type": "object",
  16134. "properties": {
  16135. "timestamp": {
  16136. "type": "number"
  16137. },
  16138. "sessionID": {
  16139. "type": "string",
  16140. "pattern": "^ses"
  16141. },
  16142. "reason": {
  16143. "type": "string",
  16144. "enum": ["auto", "manual"]
  16145. }
  16146. },
  16147. "required": ["timestamp", "sessionID", "reason"],
  16148. "additionalProperties": false
  16149. }
  16150. },
  16151. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16152. "additionalProperties": false
  16153. },
  16154. "SyncEventSessionNextCompactionDelta": {
  16155. "type": "object",
  16156. "properties": {
  16157. "type": {
  16158. "type": "string",
  16159. "enum": ["sync"]
  16160. },
  16161. "name": {
  16162. "type": "string",
  16163. "enum": ["session.next.compaction.delta.1"]
  16164. },
  16165. "id": {
  16166. "type": "string"
  16167. },
  16168. "seq": {
  16169. "type": "number"
  16170. },
  16171. "aggregateID": {
  16172. "type": "string",
  16173. "enum": ["sessionID"]
  16174. },
  16175. "data": {
  16176. "type": "object",
  16177. "properties": {
  16178. "timestamp": {
  16179. "type": "number"
  16180. },
  16181. "sessionID": {
  16182. "type": "string",
  16183. "pattern": "^ses"
  16184. },
  16185. "text": {
  16186. "type": "string"
  16187. }
  16188. },
  16189. "required": ["timestamp", "sessionID", "text"],
  16190. "additionalProperties": false
  16191. }
  16192. },
  16193. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16194. "additionalProperties": false
  16195. },
  16196. "SyncEventSessionNextCompactionEnded": {
  16197. "type": "object",
  16198. "properties": {
  16199. "type": {
  16200. "type": "string",
  16201. "enum": ["sync"]
  16202. },
  16203. "name": {
  16204. "type": "string",
  16205. "enum": ["session.next.compaction.ended.1"]
  16206. },
  16207. "id": {
  16208. "type": "string"
  16209. },
  16210. "seq": {
  16211. "type": "number"
  16212. },
  16213. "aggregateID": {
  16214. "type": "string",
  16215. "enum": ["sessionID"]
  16216. },
  16217. "data": {
  16218. "type": "object",
  16219. "properties": {
  16220. "timestamp": {
  16221. "type": "number"
  16222. },
  16223. "sessionID": {
  16224. "type": "string",
  16225. "pattern": "^ses"
  16226. },
  16227. "text": {
  16228. "type": "string"
  16229. },
  16230. "include": {
  16231. "type": "string"
  16232. }
  16233. },
  16234. "required": ["timestamp", "sessionID", "text"],
  16235. "additionalProperties": false
  16236. }
  16237. },
  16238. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16239. "additionalProperties": false
  16240. },
  16241. "EventServerInstanceDisposed": {
  16242. "type": "object",
  16243. "properties": {
  16244. "id": {
  16245. "type": "string"
  16246. },
  16247. "type": {
  16248. "type": "string",
  16249. "enum": ["server.instance.disposed"]
  16250. },
  16251. "properties": {
  16252. "type": "object",
  16253. "properties": {
  16254. "directory": {
  16255. "type": "string"
  16256. }
  16257. },
  16258. "required": ["directory"],
  16259. "additionalProperties": false
  16260. }
  16261. },
  16262. "required": ["id", "type", "properties"],
  16263. "additionalProperties": false
  16264. },
  16265. "EventFileEdited": {
  16266. "type": "object",
  16267. "properties": {
  16268. "id": {
  16269. "type": "string"
  16270. },
  16271. "type": {
  16272. "type": "string",
  16273. "enum": ["file.edited"]
  16274. },
  16275. "properties": {
  16276. "type": "object",
  16277. "properties": {
  16278. "file": {
  16279. "type": "string"
  16280. }
  16281. },
  16282. "required": ["file"],
  16283. "additionalProperties": false
  16284. }
  16285. },
  16286. "required": ["id", "type", "properties"],
  16287. "additionalProperties": false
  16288. },
  16289. "EventFileWatcherUpdated": {
  16290. "type": "object",
  16291. "properties": {
  16292. "id": {
  16293. "type": "string"
  16294. },
  16295. "type": {
  16296. "type": "string",
  16297. "enum": ["file.watcher.updated"]
  16298. },
  16299. "properties": {
  16300. "type": "object",
  16301. "properties": {
  16302. "file": {
  16303. "type": "string"
  16304. },
  16305. "event": {
  16306. "type": "string",
  16307. "enum": ["add", "change", "unlink"]
  16308. }
  16309. },
  16310. "required": ["file", "event"],
  16311. "additionalProperties": false
  16312. }
  16313. },
  16314. "required": ["id", "type", "properties"],
  16315. "additionalProperties": false
  16316. },
  16317. "EventLspClientDiagnostics": {
  16318. "type": "object",
  16319. "properties": {
  16320. "id": {
  16321. "type": "string"
  16322. },
  16323. "type": {
  16324. "type": "string",
  16325. "enum": ["lsp.client.diagnostics"]
  16326. },
  16327. "properties": {
  16328. "type": "object",
  16329. "properties": {
  16330. "serverID": {
  16331. "type": "string"
  16332. },
  16333. "path": {
  16334. "type": "string"
  16335. }
  16336. },
  16337. "required": ["serverID", "path"],
  16338. "additionalProperties": false
  16339. }
  16340. },
  16341. "required": ["id", "type", "properties"],
  16342. "additionalProperties": false
  16343. },
  16344. "EventLspUpdated": {
  16345. "type": "object",
  16346. "properties": {
  16347. "id": {
  16348. "type": "string"
  16349. },
  16350. "type": {
  16351. "type": "string",
  16352. "enum": ["lsp.updated"]
  16353. },
  16354. "properties": {
  16355. "type": "object",
  16356. "properties": {}
  16357. }
  16358. },
  16359. "required": ["id", "type", "properties"],
  16360. "additionalProperties": false
  16361. },
  16362. "EventMessagePartDelta": {
  16363. "type": "object",
  16364. "properties": {
  16365. "id": {
  16366. "type": "string"
  16367. },
  16368. "type": {
  16369. "type": "string",
  16370. "enum": ["message.part.delta"]
  16371. },
  16372. "properties": {
  16373. "type": "object",
  16374. "properties": {
  16375. "sessionID": {
  16376. "type": "string",
  16377. "pattern": "^ses"
  16378. },
  16379. "messageID": {
  16380. "type": "string",
  16381. "pattern": "^msg"
  16382. },
  16383. "partID": {
  16384. "type": "string",
  16385. "pattern": "^prt"
  16386. },
  16387. "field": {
  16388. "type": "string"
  16389. },
  16390. "delta": {
  16391. "type": "string"
  16392. }
  16393. },
  16394. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  16395. "additionalProperties": false
  16396. }
  16397. },
  16398. "required": ["id", "type", "properties"],
  16399. "additionalProperties": false
  16400. },
  16401. "EventPermissionAsked": {
  16402. "type": "object",
  16403. "properties": {
  16404. "id": {
  16405. "type": "string"
  16406. },
  16407. "type": {
  16408. "type": "string",
  16409. "enum": ["permission.asked"]
  16410. },
  16411. "properties": {
  16412. "$ref": "#/components/schemas/PermissionRequest"
  16413. }
  16414. },
  16415. "required": ["id", "type", "properties"],
  16416. "additionalProperties": false
  16417. },
  16418. "EventPermissionReplied": {
  16419. "type": "object",
  16420. "properties": {
  16421. "id": {
  16422. "type": "string"
  16423. },
  16424. "type": {
  16425. "type": "string",
  16426. "enum": ["permission.replied"]
  16427. },
  16428. "properties": {
  16429. "type": "object",
  16430. "properties": {
  16431. "sessionID": {
  16432. "type": "string",
  16433. "pattern": "^ses"
  16434. },
  16435. "requestID": {
  16436. "type": "string",
  16437. "pattern": "^per"
  16438. },
  16439. "reply": {
  16440. "type": "string",
  16441. "enum": ["once", "always", "reject"]
  16442. }
  16443. },
  16444. "required": ["sessionID", "requestID", "reply"],
  16445. "additionalProperties": false
  16446. }
  16447. },
  16448. "required": ["id", "type", "properties"],
  16449. "additionalProperties": false
  16450. },
  16451. "EventSessionDiff": {
  16452. "type": "object",
  16453. "properties": {
  16454. "id": {
  16455. "type": "string"
  16456. },
  16457. "type": {
  16458. "type": "string",
  16459. "enum": ["session.diff"]
  16460. },
  16461. "properties": {
  16462. "type": "object",
  16463. "properties": {
  16464. "sessionID": {
  16465. "type": "string",
  16466. "pattern": "^ses"
  16467. },
  16468. "diff": {
  16469. "type": "array",
  16470. "items": {
  16471. "$ref": "#/components/schemas/SnapshotFileDiff"
  16472. }
  16473. }
  16474. },
  16475. "required": ["sessionID", "diff"],
  16476. "additionalProperties": false
  16477. }
  16478. },
  16479. "required": ["id", "type", "properties"],
  16480. "additionalProperties": false
  16481. },
  16482. "EventSessionError": {
  16483. "type": "object",
  16484. "properties": {
  16485. "id": {
  16486. "type": "string"
  16487. },
  16488. "type": {
  16489. "type": "string",
  16490. "enum": ["session.error"]
  16491. },
  16492. "properties": {
  16493. "type": "object",
  16494. "properties": {
  16495. "sessionID": {
  16496. "type": "string",
  16497. "pattern": "^ses"
  16498. },
  16499. "error": {
  16500. "anyOf": [
  16501. {
  16502. "$ref": "#/components/schemas/ProviderAuthError"
  16503. },
  16504. {
  16505. "$ref": "#/components/schemas/UnknownError"
  16506. },
  16507. {
  16508. "$ref": "#/components/schemas/MessageOutputLengthError"
  16509. },
  16510. {
  16511. "$ref": "#/components/schemas/MessageAbortedError"
  16512. },
  16513. {
  16514. "$ref": "#/components/schemas/StructuredOutputError"
  16515. },
  16516. {
  16517. "$ref": "#/components/schemas/ContextOverflowError"
  16518. },
  16519. {
  16520. "$ref": "#/components/schemas/APIError"
  16521. }
  16522. ]
  16523. }
  16524. },
  16525. "additionalProperties": false
  16526. }
  16527. },
  16528. "required": ["id", "type", "properties"],
  16529. "additionalProperties": false
  16530. },
  16531. "EventQuestionAsked": {
  16532. "type": "object",
  16533. "properties": {
  16534. "id": {
  16535. "type": "string"
  16536. },
  16537. "type": {
  16538. "type": "string",
  16539. "enum": ["question.asked"]
  16540. },
  16541. "properties": {
  16542. "$ref": "#/components/schemas/QuestionRequest"
  16543. }
  16544. },
  16545. "required": ["id", "type", "properties"],
  16546. "additionalProperties": false
  16547. },
  16548. "EventQuestionReplied": {
  16549. "type": "object",
  16550. "properties": {
  16551. "id": {
  16552. "type": "string"
  16553. },
  16554. "type": {
  16555. "type": "string",
  16556. "enum": ["question.replied"]
  16557. },
  16558. "properties": {
  16559. "$ref": "#/components/schemas/QuestionReplied"
  16560. }
  16561. },
  16562. "required": ["id", "type", "properties"],
  16563. "additionalProperties": false
  16564. },
  16565. "EventQuestionRejected": {
  16566. "type": "object",
  16567. "properties": {
  16568. "id": {
  16569. "type": "string"
  16570. },
  16571. "type": {
  16572. "type": "string",
  16573. "enum": ["question.rejected"]
  16574. },
  16575. "properties": {
  16576. "$ref": "#/components/schemas/QuestionRejected"
  16577. }
  16578. },
  16579. "required": ["id", "type", "properties"],
  16580. "additionalProperties": false
  16581. },
  16582. "EventTodoUpdated": {
  16583. "type": "object",
  16584. "properties": {
  16585. "id": {
  16586. "type": "string"
  16587. },
  16588. "type": {
  16589. "type": "string",
  16590. "enum": ["todo.updated"]
  16591. },
  16592. "properties": {
  16593. "type": "object",
  16594. "properties": {
  16595. "sessionID": {
  16596. "type": "string",
  16597. "pattern": "^ses"
  16598. },
  16599. "todos": {
  16600. "type": "array",
  16601. "items": {
  16602. "$ref": "#/components/schemas/Todo"
  16603. }
  16604. }
  16605. },
  16606. "required": ["sessionID", "todos"],
  16607. "additionalProperties": false
  16608. }
  16609. },
  16610. "required": ["id", "type", "properties"],
  16611. "additionalProperties": false
  16612. },
  16613. "EventSessionStatus": {
  16614. "type": "object",
  16615. "properties": {
  16616. "id": {
  16617. "type": "string"
  16618. },
  16619. "type": {
  16620. "type": "string",
  16621. "enum": ["session.status"]
  16622. },
  16623. "properties": {
  16624. "type": "object",
  16625. "properties": {
  16626. "sessionID": {
  16627. "type": "string",
  16628. "pattern": "^ses"
  16629. },
  16630. "status": {
  16631. "$ref": "#/components/schemas/SessionStatus"
  16632. }
  16633. },
  16634. "required": ["sessionID", "status"],
  16635. "additionalProperties": false
  16636. }
  16637. },
  16638. "required": ["id", "type", "properties"],
  16639. "additionalProperties": false
  16640. },
  16641. "EventSessionIdle": {
  16642. "type": "object",
  16643. "properties": {
  16644. "id": {
  16645. "type": "string"
  16646. },
  16647. "type": {
  16648. "type": "string",
  16649. "enum": ["session.idle"]
  16650. },
  16651. "properties": {
  16652. "type": "object",
  16653. "properties": {
  16654. "sessionID": {
  16655. "type": "string",
  16656. "pattern": "^ses"
  16657. }
  16658. },
  16659. "required": ["sessionID"],
  16660. "additionalProperties": false
  16661. }
  16662. },
  16663. "required": ["id", "type", "properties"],
  16664. "additionalProperties": false
  16665. },
  16666. "EventSessionCompacted": {
  16667. "type": "object",
  16668. "properties": {
  16669. "id": {
  16670. "type": "string"
  16671. },
  16672. "type": {
  16673. "type": "string",
  16674. "enum": ["session.compacted"]
  16675. },
  16676. "properties": {
  16677. "type": "object",
  16678. "properties": {
  16679. "sessionID": {
  16680. "type": "string",
  16681. "pattern": "^ses"
  16682. }
  16683. },
  16684. "required": ["sessionID"],
  16685. "additionalProperties": false
  16686. }
  16687. },
  16688. "required": ["id", "type", "properties"],
  16689. "additionalProperties": false
  16690. },
  16691. "EventMcpToolsChanged": {
  16692. "type": "object",
  16693. "properties": {
  16694. "id": {
  16695. "type": "string"
  16696. },
  16697. "type": {
  16698. "type": "string",
  16699. "enum": ["mcp.tools.changed"]
  16700. },
  16701. "properties": {
  16702. "type": "object",
  16703. "properties": {
  16704. "server": {
  16705. "type": "string"
  16706. }
  16707. },
  16708. "required": ["server"],
  16709. "additionalProperties": false
  16710. }
  16711. },
  16712. "required": ["id", "type", "properties"],
  16713. "additionalProperties": false
  16714. },
  16715. "EventMcpBrowserOpenFailed": {
  16716. "type": "object",
  16717. "properties": {
  16718. "id": {
  16719. "type": "string"
  16720. },
  16721. "type": {
  16722. "type": "string",
  16723. "enum": ["mcp.browser.open.failed"]
  16724. },
  16725. "properties": {
  16726. "type": "object",
  16727. "properties": {
  16728. "mcpName": {
  16729. "type": "string"
  16730. },
  16731. "url": {
  16732. "type": "string"
  16733. }
  16734. },
  16735. "required": ["mcpName", "url"],
  16736. "additionalProperties": false
  16737. }
  16738. },
  16739. "required": ["id", "type", "properties"],
  16740. "additionalProperties": false
  16741. },
  16742. "EventCommandExecuted": {
  16743. "type": "object",
  16744. "properties": {
  16745. "id": {
  16746. "type": "string"
  16747. },
  16748. "type": {
  16749. "type": "string",
  16750. "enum": ["command.executed"]
  16751. },
  16752. "properties": {
  16753. "type": "object",
  16754. "properties": {
  16755. "name": {
  16756. "type": "string"
  16757. },
  16758. "sessionID": {
  16759. "type": "string",
  16760. "pattern": "^ses"
  16761. },
  16762. "arguments": {
  16763. "type": "string"
  16764. },
  16765. "messageID": {
  16766. "type": "string",
  16767. "pattern": "^msg"
  16768. }
  16769. },
  16770. "required": ["name", "sessionID", "arguments", "messageID"],
  16771. "additionalProperties": false
  16772. }
  16773. },
  16774. "required": ["id", "type", "properties"],
  16775. "additionalProperties": false
  16776. },
  16777. "EventProjectUpdated": {
  16778. "type": "object",
  16779. "properties": {
  16780. "id": {
  16781. "type": "string"
  16782. },
  16783. "type": {
  16784. "type": "string",
  16785. "enum": ["project.updated"]
  16786. },
  16787. "properties": {
  16788. "$ref": "#/components/schemas/Project"
  16789. }
  16790. },
  16791. "required": ["id", "type", "properties"],
  16792. "additionalProperties": false
  16793. },
  16794. "EventVcsBranchUpdated": {
  16795. "type": "object",
  16796. "properties": {
  16797. "id": {
  16798. "type": "string"
  16799. },
  16800. "type": {
  16801. "type": "string",
  16802. "enum": ["vcs.branch.updated"]
  16803. },
  16804. "properties": {
  16805. "type": "object",
  16806. "properties": {
  16807. "branch": {
  16808. "type": "string"
  16809. }
  16810. },
  16811. "additionalProperties": false
  16812. }
  16813. },
  16814. "required": ["id", "type", "properties"],
  16815. "additionalProperties": false
  16816. },
  16817. "EventWorkspaceReady": {
  16818. "type": "object",
  16819. "properties": {
  16820. "id": {
  16821. "type": "string"
  16822. },
  16823. "type": {
  16824. "type": "string",
  16825. "enum": ["workspace.ready"]
  16826. },
  16827. "properties": {
  16828. "type": "object",
  16829. "properties": {
  16830. "name": {
  16831. "type": "string"
  16832. }
  16833. },
  16834. "required": ["name"],
  16835. "additionalProperties": false
  16836. }
  16837. },
  16838. "required": ["id", "type", "properties"],
  16839. "additionalProperties": false
  16840. },
  16841. "EventWorkspaceFailed": {
  16842. "type": "object",
  16843. "properties": {
  16844. "id": {
  16845. "type": "string"
  16846. },
  16847. "type": {
  16848. "type": "string",
  16849. "enum": ["workspace.failed"]
  16850. },
  16851. "properties": {
  16852. "type": "object",
  16853. "properties": {
  16854. "message": {
  16855. "type": "string"
  16856. }
  16857. },
  16858. "required": ["message"],
  16859. "additionalProperties": false
  16860. }
  16861. },
  16862. "required": ["id", "type", "properties"],
  16863. "additionalProperties": false
  16864. },
  16865. "EventWorkspaceStatus": {
  16866. "type": "object",
  16867. "properties": {
  16868. "id": {
  16869. "type": "string"
  16870. },
  16871. "type": {
  16872. "type": "string",
  16873. "enum": ["workspace.status"]
  16874. },
  16875. "properties": {
  16876. "type": "object",
  16877. "properties": {
  16878. "workspaceID": {
  16879. "type": "string",
  16880. "pattern": "^wrk"
  16881. },
  16882. "status": {
  16883. "type": "string",
  16884. "enum": ["connected", "connecting", "disconnected", "error"]
  16885. }
  16886. },
  16887. "required": ["workspaceID", "status"],
  16888. "additionalProperties": false
  16889. }
  16890. },
  16891. "required": ["id", "type", "properties"],
  16892. "additionalProperties": false
  16893. },
  16894. "EventWorktreeReady": {
  16895. "type": "object",
  16896. "properties": {
  16897. "id": {
  16898. "type": "string"
  16899. },
  16900. "type": {
  16901. "type": "string",
  16902. "enum": ["worktree.ready"]
  16903. },
  16904. "properties": {
  16905. "type": "object",
  16906. "properties": {
  16907. "name": {
  16908. "type": "string"
  16909. },
  16910. "branch": {
  16911. "type": "string"
  16912. }
  16913. },
  16914. "required": ["name"],
  16915. "additionalProperties": false
  16916. }
  16917. },
  16918. "required": ["id", "type", "properties"],
  16919. "additionalProperties": false
  16920. },
  16921. "EventWorktreeFailed": {
  16922. "type": "object",
  16923. "properties": {
  16924. "id": {
  16925. "type": "string"
  16926. },
  16927. "type": {
  16928. "type": "string",
  16929. "enum": ["worktree.failed"]
  16930. },
  16931. "properties": {
  16932. "type": "object",
  16933. "properties": {
  16934. "message": {
  16935. "type": "string"
  16936. }
  16937. },
  16938. "required": ["message"],
  16939. "additionalProperties": false
  16940. }
  16941. },
  16942. "required": ["id", "type", "properties"],
  16943. "additionalProperties": false
  16944. },
  16945. "EventPtyCreated": {
  16946. "type": "object",
  16947. "properties": {
  16948. "id": {
  16949. "type": "string"
  16950. },
  16951. "type": {
  16952. "type": "string",
  16953. "enum": ["pty.created"]
  16954. },
  16955. "properties": {
  16956. "type": "object",
  16957. "properties": {
  16958. "info": {
  16959. "$ref": "#/components/schemas/Pty"
  16960. }
  16961. },
  16962. "required": ["info"],
  16963. "additionalProperties": false
  16964. }
  16965. },
  16966. "required": ["id", "type", "properties"],
  16967. "additionalProperties": false
  16968. },
  16969. "EventPtyUpdated": {
  16970. "type": "object",
  16971. "properties": {
  16972. "id": {
  16973. "type": "string"
  16974. },
  16975. "type": {
  16976. "type": "string",
  16977. "enum": ["pty.updated"]
  16978. },
  16979. "properties": {
  16980. "type": "object",
  16981. "properties": {
  16982. "info": {
  16983. "$ref": "#/components/schemas/Pty"
  16984. }
  16985. },
  16986. "required": ["info"],
  16987. "additionalProperties": false
  16988. }
  16989. },
  16990. "required": ["id", "type", "properties"],
  16991. "additionalProperties": false
  16992. },
  16993. "EventPtyExited": {
  16994. "type": "object",
  16995. "properties": {
  16996. "id": {
  16997. "type": "string"
  16998. },
  16999. "type": {
  17000. "type": "string",
  17001. "enum": ["pty.exited"]
  17002. },
  17003. "properties": {
  17004. "type": "object",
  17005. "properties": {
  17006. "id": {
  17007. "type": "string",
  17008. "pattern": "^pty"
  17009. },
  17010. "exitCode": {
  17011. "type": "integer",
  17012. "minimum": 0
  17013. }
  17014. },
  17015. "required": ["id", "exitCode"],
  17016. "additionalProperties": false
  17017. }
  17018. },
  17019. "required": ["id", "type", "properties"],
  17020. "additionalProperties": false
  17021. },
  17022. "EventPtyDeleted": {
  17023. "type": "object",
  17024. "properties": {
  17025. "id": {
  17026. "type": "string"
  17027. },
  17028. "type": {
  17029. "type": "string",
  17030. "enum": ["pty.deleted"]
  17031. },
  17032. "properties": {
  17033. "type": "object",
  17034. "properties": {
  17035. "id": {
  17036. "type": "string",
  17037. "pattern": "^pty"
  17038. }
  17039. },
  17040. "required": ["id"],
  17041. "additionalProperties": false
  17042. }
  17043. },
  17044. "required": ["id", "type", "properties"],
  17045. "additionalProperties": false
  17046. },
  17047. "EventInstallationUpdated": {
  17048. "type": "object",
  17049. "properties": {
  17050. "id": {
  17051. "type": "string"
  17052. },
  17053. "type": {
  17054. "type": "string",
  17055. "enum": ["installation.updated"]
  17056. },
  17057. "properties": {
  17058. "type": "object",
  17059. "properties": {
  17060. "version": {
  17061. "type": "string"
  17062. }
  17063. },
  17064. "required": ["version"],
  17065. "additionalProperties": false
  17066. }
  17067. },
  17068. "required": ["id", "type", "properties"],
  17069. "additionalProperties": false
  17070. },
  17071. "EventInstallationUpdate-available": {
  17072. "type": "object",
  17073. "properties": {
  17074. "id": {
  17075. "type": "string"
  17076. },
  17077. "type": {
  17078. "type": "string",
  17079. "enum": ["installation.update-available"]
  17080. },
  17081. "properties": {
  17082. "type": "object",
  17083. "properties": {
  17084. "version": {
  17085. "type": "string"
  17086. }
  17087. },
  17088. "required": ["version"],
  17089. "additionalProperties": false
  17090. }
  17091. },
  17092. "required": ["id", "type", "properties"],
  17093. "additionalProperties": false
  17094. },
  17095. "EventMessageUpdated": {
  17096. "type": "object",
  17097. "properties": {
  17098. "id": {
  17099. "type": "string"
  17100. },
  17101. "type": {
  17102. "type": "string",
  17103. "enum": ["message.updated"]
  17104. },
  17105. "properties": {
  17106. "type": "object",
  17107. "properties": {
  17108. "sessionID": {
  17109. "type": "string",
  17110. "pattern": "^ses"
  17111. },
  17112. "info": {
  17113. "$ref": "#/components/schemas/Message"
  17114. }
  17115. },
  17116. "required": ["sessionID", "info"],
  17117. "additionalProperties": false
  17118. }
  17119. },
  17120. "required": ["id", "type", "properties"],
  17121. "additionalProperties": false
  17122. },
  17123. "EventMessageRemoved": {
  17124. "type": "object",
  17125. "properties": {
  17126. "id": {
  17127. "type": "string"
  17128. },
  17129. "type": {
  17130. "type": "string",
  17131. "enum": ["message.removed"]
  17132. },
  17133. "properties": {
  17134. "type": "object",
  17135. "properties": {
  17136. "sessionID": {
  17137. "type": "string",
  17138. "pattern": "^ses"
  17139. },
  17140. "messageID": {
  17141. "type": "string",
  17142. "pattern": "^msg"
  17143. }
  17144. },
  17145. "required": ["sessionID", "messageID"],
  17146. "additionalProperties": false
  17147. }
  17148. },
  17149. "required": ["id", "type", "properties"],
  17150. "additionalProperties": false
  17151. },
  17152. "EventMessagePartUpdated": {
  17153. "type": "object",
  17154. "properties": {
  17155. "id": {
  17156. "type": "string"
  17157. },
  17158. "type": {
  17159. "type": "string",
  17160. "enum": ["message.part.updated"]
  17161. },
  17162. "properties": {
  17163. "type": "object",
  17164. "properties": {
  17165. "sessionID": {
  17166. "type": "string",
  17167. "pattern": "^ses"
  17168. },
  17169. "part": {
  17170. "$ref": "#/components/schemas/Part"
  17171. },
  17172. "time": {
  17173. "type": "integer",
  17174. "minimum": 0
  17175. }
  17176. },
  17177. "required": ["sessionID", "part", "time"],
  17178. "additionalProperties": false
  17179. }
  17180. },
  17181. "required": ["id", "type", "properties"],
  17182. "additionalProperties": false
  17183. },
  17184. "EventMessagePartRemoved": {
  17185. "type": "object",
  17186. "properties": {
  17187. "id": {
  17188. "type": "string"
  17189. },
  17190. "type": {
  17191. "type": "string",
  17192. "enum": ["message.part.removed"]
  17193. },
  17194. "properties": {
  17195. "type": "object",
  17196. "properties": {
  17197. "sessionID": {
  17198. "type": "string",
  17199. "pattern": "^ses"
  17200. },
  17201. "messageID": {
  17202. "type": "string",
  17203. "pattern": "^msg"
  17204. },
  17205. "partID": {
  17206. "type": "string",
  17207. "pattern": "^prt"
  17208. }
  17209. },
  17210. "required": ["sessionID", "messageID", "partID"],
  17211. "additionalProperties": false
  17212. }
  17213. },
  17214. "required": ["id", "type", "properties"],
  17215. "additionalProperties": false
  17216. },
  17217. "EventSessionCreated": {
  17218. "type": "object",
  17219. "properties": {
  17220. "id": {
  17221. "type": "string"
  17222. },
  17223. "type": {
  17224. "type": "string",
  17225. "enum": ["session.created"]
  17226. },
  17227. "properties": {
  17228. "type": "object",
  17229. "properties": {
  17230. "sessionID": {
  17231. "type": "string",
  17232. "pattern": "^ses"
  17233. },
  17234. "info": {
  17235. "$ref": "#/components/schemas/Session"
  17236. }
  17237. },
  17238. "required": ["sessionID", "info"],
  17239. "additionalProperties": false
  17240. }
  17241. },
  17242. "required": ["id", "type", "properties"],
  17243. "additionalProperties": false
  17244. },
  17245. "EventSessionUpdated": {
  17246. "type": "object",
  17247. "properties": {
  17248. "id": {
  17249. "type": "string"
  17250. },
  17251. "type": {
  17252. "type": "string",
  17253. "enum": ["session.updated"]
  17254. },
  17255. "properties": {
  17256. "type": "object",
  17257. "properties": {
  17258. "sessionID": {
  17259. "type": "string",
  17260. "pattern": "^ses"
  17261. },
  17262. "info": {
  17263. "$ref": "#/components/schemas/Session"
  17264. }
  17265. },
  17266. "required": ["sessionID", "info"],
  17267. "additionalProperties": false
  17268. }
  17269. },
  17270. "required": ["id", "type", "properties"],
  17271. "additionalProperties": false
  17272. },
  17273. "EventSessionDeleted": {
  17274. "type": "object",
  17275. "properties": {
  17276. "id": {
  17277. "type": "string"
  17278. },
  17279. "type": {
  17280. "type": "string",
  17281. "enum": ["session.deleted"]
  17282. },
  17283. "properties": {
  17284. "type": "object",
  17285. "properties": {
  17286. "sessionID": {
  17287. "type": "string",
  17288. "pattern": "^ses"
  17289. },
  17290. "info": {
  17291. "$ref": "#/components/schemas/Session"
  17292. }
  17293. },
  17294. "required": ["sessionID", "info"],
  17295. "additionalProperties": false
  17296. }
  17297. },
  17298. "required": ["id", "type", "properties"],
  17299. "additionalProperties": false
  17300. },
  17301. "EventSessionNextAgentSwitched": {
  17302. "type": "object",
  17303. "properties": {
  17304. "id": {
  17305. "type": "string"
  17306. },
  17307. "type": {
  17308. "type": "string",
  17309. "enum": ["session.next.agent.switched"]
  17310. },
  17311. "properties": {
  17312. "type": "object",
  17313. "properties": {
  17314. "timestamp": {
  17315. "type": "number"
  17316. },
  17317. "sessionID": {
  17318. "type": "string",
  17319. "pattern": "^ses"
  17320. },
  17321. "agent": {
  17322. "type": "string"
  17323. }
  17324. },
  17325. "required": ["timestamp", "sessionID", "agent"],
  17326. "additionalProperties": false
  17327. }
  17328. },
  17329. "required": ["id", "type", "properties"],
  17330. "additionalProperties": false
  17331. },
  17332. "EventSessionNextModelSwitched": {
  17333. "type": "object",
  17334. "properties": {
  17335. "id": {
  17336. "type": "string"
  17337. },
  17338. "type": {
  17339. "type": "string",
  17340. "enum": ["session.next.model.switched"]
  17341. },
  17342. "properties": {
  17343. "type": "object",
  17344. "properties": {
  17345. "timestamp": {
  17346. "type": "number"
  17347. },
  17348. "sessionID": {
  17349. "type": "string",
  17350. "pattern": "^ses"
  17351. },
  17352. "model": {
  17353. "type": "object",
  17354. "properties": {
  17355. "id": {
  17356. "type": "string"
  17357. },
  17358. "providerID": {
  17359. "type": "string"
  17360. },
  17361. "variant": {
  17362. "type": "string"
  17363. }
  17364. },
  17365. "required": ["id", "providerID", "variant"],
  17366. "additionalProperties": false
  17367. }
  17368. },
  17369. "required": ["timestamp", "sessionID", "model"],
  17370. "additionalProperties": false
  17371. }
  17372. },
  17373. "required": ["id", "type", "properties"],
  17374. "additionalProperties": false
  17375. },
  17376. "PromptSource": {
  17377. "type": "object",
  17378. "properties": {
  17379. "start": {
  17380. "type": "number"
  17381. },
  17382. "end": {
  17383. "type": "number"
  17384. },
  17385. "text": {
  17386. "type": "string"
  17387. }
  17388. },
  17389. "required": ["start", "end", "text"],
  17390. "additionalProperties": false
  17391. },
  17392. "PromptFileAttachment": {
  17393. "type": "object",
  17394. "properties": {
  17395. "uri": {
  17396. "type": "string"
  17397. },
  17398. "mime": {
  17399. "type": "string"
  17400. },
  17401. "name": {
  17402. "type": "string"
  17403. },
  17404. "description": {
  17405. "type": "string"
  17406. },
  17407. "source": {
  17408. "$ref": "#/components/schemas/PromptSource"
  17409. }
  17410. },
  17411. "required": ["uri", "mime"],
  17412. "additionalProperties": false
  17413. },
  17414. "PromptAgentAttachment": {
  17415. "type": "object",
  17416. "properties": {
  17417. "name": {
  17418. "type": "string"
  17419. },
  17420. "source": {
  17421. "$ref": "#/components/schemas/PromptSource"
  17422. }
  17423. },
  17424. "required": ["name"],
  17425. "additionalProperties": false
  17426. },
  17427. "PromptReferenceAttachment": {
  17428. "type": "object",
  17429. "properties": {
  17430. "name": {
  17431. "type": "string"
  17432. },
  17433. "kind": {
  17434. "type": "string",
  17435. "enum": ["local", "git", "invalid"]
  17436. },
  17437. "uri": {
  17438. "type": "string"
  17439. },
  17440. "repository": {
  17441. "type": "string"
  17442. },
  17443. "branch": {
  17444. "type": "string"
  17445. },
  17446. "target": {
  17447. "type": "string"
  17448. },
  17449. "targetUri": {
  17450. "type": "string"
  17451. },
  17452. "problem": {
  17453. "type": "string"
  17454. },
  17455. "source": {
  17456. "$ref": "#/components/schemas/PromptSource"
  17457. }
  17458. },
  17459. "required": ["name", "kind"],
  17460. "additionalProperties": false
  17461. },
  17462. "EventSessionNextPrompted": {
  17463. "type": "object",
  17464. "properties": {
  17465. "id": {
  17466. "type": "string"
  17467. },
  17468. "type": {
  17469. "type": "string",
  17470. "enum": ["session.next.prompted"]
  17471. },
  17472. "properties": {
  17473. "type": "object",
  17474. "properties": {
  17475. "timestamp": {
  17476. "type": "number"
  17477. },
  17478. "sessionID": {
  17479. "type": "string",
  17480. "pattern": "^ses"
  17481. },
  17482. "prompt": {
  17483. "$ref": "#/components/schemas/Prompt"
  17484. }
  17485. },
  17486. "required": ["timestamp", "sessionID", "prompt"],
  17487. "additionalProperties": false
  17488. }
  17489. },
  17490. "required": ["id", "type", "properties"],
  17491. "additionalProperties": false
  17492. },
  17493. "EventSessionNextSynthetic": {
  17494. "type": "object",
  17495. "properties": {
  17496. "id": {
  17497. "type": "string"
  17498. },
  17499. "type": {
  17500. "type": "string",
  17501. "enum": ["session.next.synthetic"]
  17502. },
  17503. "properties": {
  17504. "type": "object",
  17505. "properties": {
  17506. "timestamp": {
  17507. "type": "number"
  17508. },
  17509. "sessionID": {
  17510. "type": "string",
  17511. "pattern": "^ses"
  17512. },
  17513. "text": {
  17514. "type": "string"
  17515. }
  17516. },
  17517. "required": ["timestamp", "sessionID", "text"],
  17518. "additionalProperties": false
  17519. }
  17520. },
  17521. "required": ["id", "type", "properties"],
  17522. "additionalProperties": false
  17523. },
  17524. "EventSessionNextShellStarted": {
  17525. "type": "object",
  17526. "properties": {
  17527. "id": {
  17528. "type": "string"
  17529. },
  17530. "type": {
  17531. "type": "string",
  17532. "enum": ["session.next.shell.started"]
  17533. },
  17534. "properties": {
  17535. "type": "object",
  17536. "properties": {
  17537. "timestamp": {
  17538. "type": "number"
  17539. },
  17540. "sessionID": {
  17541. "type": "string",
  17542. "pattern": "^ses"
  17543. },
  17544. "callID": {
  17545. "type": "string"
  17546. },
  17547. "command": {
  17548. "type": "string"
  17549. }
  17550. },
  17551. "required": ["timestamp", "sessionID", "callID", "command"],
  17552. "additionalProperties": false
  17553. }
  17554. },
  17555. "required": ["id", "type", "properties"],
  17556. "additionalProperties": false
  17557. },
  17558. "EventSessionNextShellEnded": {
  17559. "type": "object",
  17560. "properties": {
  17561. "id": {
  17562. "type": "string"
  17563. },
  17564. "type": {
  17565. "type": "string",
  17566. "enum": ["session.next.shell.ended"]
  17567. },
  17568. "properties": {
  17569. "type": "object",
  17570. "properties": {
  17571. "timestamp": {
  17572. "type": "number"
  17573. },
  17574. "sessionID": {
  17575. "type": "string",
  17576. "pattern": "^ses"
  17577. },
  17578. "callID": {
  17579. "type": "string"
  17580. },
  17581. "output": {
  17582. "type": "string"
  17583. }
  17584. },
  17585. "required": ["timestamp", "sessionID", "callID", "output"],
  17586. "additionalProperties": false
  17587. }
  17588. },
  17589. "required": ["id", "type", "properties"],
  17590. "additionalProperties": false
  17591. },
  17592. "EventSessionNextStepStarted": {
  17593. "type": "object",
  17594. "properties": {
  17595. "id": {
  17596. "type": "string"
  17597. },
  17598. "type": {
  17599. "type": "string",
  17600. "enum": ["session.next.step.started"]
  17601. },
  17602. "properties": {
  17603. "type": "object",
  17604. "properties": {
  17605. "timestamp": {
  17606. "type": "number"
  17607. },
  17608. "sessionID": {
  17609. "type": "string",
  17610. "pattern": "^ses"
  17611. },
  17612. "agent": {
  17613. "type": "string"
  17614. },
  17615. "model": {
  17616. "type": "object",
  17617. "properties": {
  17618. "id": {
  17619. "type": "string"
  17620. },
  17621. "providerID": {
  17622. "type": "string"
  17623. },
  17624. "variant": {
  17625. "type": "string"
  17626. }
  17627. },
  17628. "required": ["id", "providerID", "variant"],
  17629. "additionalProperties": false
  17630. },
  17631. "snapshot": {
  17632. "type": "string"
  17633. }
  17634. },
  17635. "required": ["timestamp", "sessionID", "agent", "model"],
  17636. "additionalProperties": false
  17637. }
  17638. },
  17639. "required": ["id", "type", "properties"],
  17640. "additionalProperties": false
  17641. },
  17642. "EventSessionNextStepEnded": {
  17643. "type": "object",
  17644. "properties": {
  17645. "id": {
  17646. "type": "string"
  17647. },
  17648. "type": {
  17649. "type": "string",
  17650. "enum": ["session.next.step.ended"]
  17651. },
  17652. "properties": {
  17653. "type": "object",
  17654. "properties": {
  17655. "timestamp": {
  17656. "type": "number"
  17657. },
  17658. "sessionID": {
  17659. "type": "string",
  17660. "pattern": "^ses"
  17661. },
  17662. "finish": {
  17663. "type": "string"
  17664. },
  17665. "cost": {
  17666. "type": "number"
  17667. },
  17668. "tokens": {
  17669. "type": "object",
  17670. "properties": {
  17671. "input": {
  17672. "type": "number"
  17673. },
  17674. "output": {
  17675. "type": "number"
  17676. },
  17677. "reasoning": {
  17678. "type": "number"
  17679. },
  17680. "cache": {
  17681. "type": "object",
  17682. "properties": {
  17683. "read": {
  17684. "type": "number"
  17685. },
  17686. "write": {
  17687. "type": "number"
  17688. }
  17689. },
  17690. "required": ["read", "write"],
  17691. "additionalProperties": false
  17692. }
  17693. },
  17694. "required": ["input", "output", "reasoning", "cache"],
  17695. "additionalProperties": false
  17696. },
  17697. "snapshot": {
  17698. "type": "string"
  17699. }
  17700. },
  17701. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17702. "additionalProperties": false
  17703. }
  17704. },
  17705. "required": ["id", "type", "properties"],
  17706. "additionalProperties": false
  17707. },
  17708. "SessionErrorUnknown": {
  17709. "type": "object",
  17710. "properties": {
  17711. "type": {
  17712. "type": "string",
  17713. "enum": ["unknown"]
  17714. },
  17715. "message": {
  17716. "type": "string"
  17717. }
  17718. },
  17719. "required": ["type", "message"],
  17720. "additionalProperties": false
  17721. },
  17722. "EventSessionNextStepFailed": {
  17723. "type": "object",
  17724. "properties": {
  17725. "id": {
  17726. "type": "string"
  17727. },
  17728. "type": {
  17729. "type": "string",
  17730. "enum": ["session.next.step.failed"]
  17731. },
  17732. "properties": {
  17733. "type": "object",
  17734. "properties": {
  17735. "timestamp": {
  17736. "type": "number"
  17737. },
  17738. "sessionID": {
  17739. "type": "string",
  17740. "pattern": "^ses"
  17741. },
  17742. "error": {
  17743. "$ref": "#/components/schemas/SessionErrorUnknown"
  17744. }
  17745. },
  17746. "required": ["timestamp", "sessionID", "error"],
  17747. "additionalProperties": false
  17748. }
  17749. },
  17750. "required": ["id", "type", "properties"],
  17751. "additionalProperties": false
  17752. },
  17753. "EventSessionNextTextStarted": {
  17754. "type": "object",
  17755. "properties": {
  17756. "id": {
  17757. "type": "string"
  17758. },
  17759. "type": {
  17760. "type": "string",
  17761. "enum": ["session.next.text.started"]
  17762. },
  17763. "properties": {
  17764. "type": "object",
  17765. "properties": {
  17766. "timestamp": {
  17767. "type": "number"
  17768. },
  17769. "sessionID": {
  17770. "type": "string",
  17771. "pattern": "^ses"
  17772. }
  17773. },
  17774. "required": ["timestamp", "sessionID"],
  17775. "additionalProperties": false
  17776. }
  17777. },
  17778. "required": ["id", "type", "properties"],
  17779. "additionalProperties": false
  17780. },
  17781. "EventSessionNextTextDelta": {
  17782. "type": "object",
  17783. "properties": {
  17784. "id": {
  17785. "type": "string"
  17786. },
  17787. "type": {
  17788. "type": "string",
  17789. "enum": ["session.next.text.delta"]
  17790. },
  17791. "properties": {
  17792. "type": "object",
  17793. "properties": {
  17794. "timestamp": {
  17795. "type": "number"
  17796. },
  17797. "sessionID": {
  17798. "type": "string",
  17799. "pattern": "^ses"
  17800. },
  17801. "delta": {
  17802. "type": "string"
  17803. }
  17804. },
  17805. "required": ["timestamp", "sessionID", "delta"],
  17806. "additionalProperties": false
  17807. }
  17808. },
  17809. "required": ["id", "type", "properties"],
  17810. "additionalProperties": false
  17811. },
  17812. "EventSessionNextTextEnded": {
  17813. "type": "object",
  17814. "properties": {
  17815. "id": {
  17816. "type": "string"
  17817. },
  17818. "type": {
  17819. "type": "string",
  17820. "enum": ["session.next.text.ended"]
  17821. },
  17822. "properties": {
  17823. "type": "object",
  17824. "properties": {
  17825. "timestamp": {
  17826. "type": "number"
  17827. },
  17828. "sessionID": {
  17829. "type": "string",
  17830. "pattern": "^ses"
  17831. },
  17832. "text": {
  17833. "type": "string"
  17834. }
  17835. },
  17836. "required": ["timestamp", "sessionID", "text"],
  17837. "additionalProperties": false
  17838. }
  17839. },
  17840. "required": ["id", "type", "properties"],
  17841. "additionalProperties": false
  17842. },
  17843. "EventSessionNextReasoningStarted": {
  17844. "type": "object",
  17845. "properties": {
  17846. "id": {
  17847. "type": "string"
  17848. },
  17849. "type": {
  17850. "type": "string",
  17851. "enum": ["session.next.reasoning.started"]
  17852. },
  17853. "properties": {
  17854. "type": "object",
  17855. "properties": {
  17856. "timestamp": {
  17857. "type": "number"
  17858. },
  17859. "sessionID": {
  17860. "type": "string",
  17861. "pattern": "^ses"
  17862. },
  17863. "reasoningID": {
  17864. "type": "string"
  17865. }
  17866. },
  17867. "required": ["timestamp", "sessionID", "reasoningID"],
  17868. "additionalProperties": false
  17869. }
  17870. },
  17871. "required": ["id", "type", "properties"],
  17872. "additionalProperties": false
  17873. },
  17874. "EventSessionNextReasoningDelta": {
  17875. "type": "object",
  17876. "properties": {
  17877. "id": {
  17878. "type": "string"
  17879. },
  17880. "type": {
  17881. "type": "string",
  17882. "enum": ["session.next.reasoning.delta"]
  17883. },
  17884. "properties": {
  17885. "type": "object",
  17886. "properties": {
  17887. "timestamp": {
  17888. "type": "number"
  17889. },
  17890. "sessionID": {
  17891. "type": "string",
  17892. "pattern": "^ses"
  17893. },
  17894. "reasoningID": {
  17895. "type": "string"
  17896. },
  17897. "delta": {
  17898. "type": "string"
  17899. }
  17900. },
  17901. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17902. "additionalProperties": false
  17903. }
  17904. },
  17905. "required": ["id", "type", "properties"],
  17906. "additionalProperties": false
  17907. },
  17908. "EventSessionNextReasoningEnded": {
  17909. "type": "object",
  17910. "properties": {
  17911. "id": {
  17912. "type": "string"
  17913. },
  17914. "type": {
  17915. "type": "string",
  17916. "enum": ["session.next.reasoning.ended"]
  17917. },
  17918. "properties": {
  17919. "type": "object",
  17920. "properties": {
  17921. "timestamp": {
  17922. "type": "number"
  17923. },
  17924. "sessionID": {
  17925. "type": "string",
  17926. "pattern": "^ses"
  17927. },
  17928. "reasoningID": {
  17929. "type": "string"
  17930. },
  17931. "text": {
  17932. "type": "string"
  17933. }
  17934. },
  17935. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17936. "additionalProperties": false
  17937. }
  17938. },
  17939. "required": ["id", "type", "properties"],
  17940. "additionalProperties": false
  17941. },
  17942. "EventSessionNextToolInputStarted": {
  17943. "type": "object",
  17944. "properties": {
  17945. "id": {
  17946. "type": "string"
  17947. },
  17948. "type": {
  17949. "type": "string",
  17950. "enum": ["session.next.tool.input.started"]
  17951. },
  17952. "properties": {
  17953. "type": "object",
  17954. "properties": {
  17955. "timestamp": {
  17956. "type": "number"
  17957. },
  17958. "sessionID": {
  17959. "type": "string",
  17960. "pattern": "^ses"
  17961. },
  17962. "callID": {
  17963. "type": "string"
  17964. },
  17965. "name": {
  17966. "type": "string"
  17967. }
  17968. },
  17969. "required": ["timestamp", "sessionID", "callID", "name"],
  17970. "additionalProperties": false
  17971. }
  17972. },
  17973. "required": ["id", "type", "properties"],
  17974. "additionalProperties": false
  17975. },
  17976. "EventSessionNextToolInputDelta": {
  17977. "type": "object",
  17978. "properties": {
  17979. "id": {
  17980. "type": "string"
  17981. },
  17982. "type": {
  17983. "type": "string",
  17984. "enum": ["session.next.tool.input.delta"]
  17985. },
  17986. "properties": {
  17987. "type": "object",
  17988. "properties": {
  17989. "timestamp": {
  17990. "type": "number"
  17991. },
  17992. "sessionID": {
  17993. "type": "string",
  17994. "pattern": "^ses"
  17995. },
  17996. "callID": {
  17997. "type": "string"
  17998. },
  17999. "delta": {
  18000. "type": "string"
  18001. }
  18002. },
  18003. "required": ["timestamp", "sessionID", "callID", "delta"],
  18004. "additionalProperties": false
  18005. }
  18006. },
  18007. "required": ["id", "type", "properties"],
  18008. "additionalProperties": false
  18009. },
  18010. "EventSessionNextToolInputEnded": {
  18011. "type": "object",
  18012. "properties": {
  18013. "id": {
  18014. "type": "string"
  18015. },
  18016. "type": {
  18017. "type": "string",
  18018. "enum": ["session.next.tool.input.ended"]
  18019. },
  18020. "properties": {
  18021. "type": "object",
  18022. "properties": {
  18023. "timestamp": {
  18024. "type": "number"
  18025. },
  18026. "sessionID": {
  18027. "type": "string",
  18028. "pattern": "^ses"
  18029. },
  18030. "callID": {
  18031. "type": "string"
  18032. },
  18033. "text": {
  18034. "type": "string"
  18035. }
  18036. },
  18037. "required": ["timestamp", "sessionID", "callID", "text"],
  18038. "additionalProperties": false
  18039. }
  18040. },
  18041. "required": ["id", "type", "properties"],
  18042. "additionalProperties": false
  18043. },
  18044. "EventSessionNextToolCalled": {
  18045. "type": "object",
  18046. "properties": {
  18047. "id": {
  18048. "type": "string"
  18049. },
  18050. "type": {
  18051. "type": "string",
  18052. "enum": ["session.next.tool.called"]
  18053. },
  18054. "properties": {
  18055. "type": "object",
  18056. "properties": {
  18057. "timestamp": {
  18058. "type": "number"
  18059. },
  18060. "sessionID": {
  18061. "type": "string",
  18062. "pattern": "^ses"
  18063. },
  18064. "callID": {
  18065. "type": "string"
  18066. },
  18067. "tool": {
  18068. "type": "string"
  18069. },
  18070. "input": {
  18071. "type": "object"
  18072. },
  18073. "provider": {
  18074. "type": "object",
  18075. "properties": {
  18076. "executed": {
  18077. "type": "boolean"
  18078. },
  18079. "metadata": {
  18080. "type": "object"
  18081. }
  18082. },
  18083. "required": ["executed"],
  18084. "additionalProperties": false
  18085. }
  18086. },
  18087. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  18088. "additionalProperties": false
  18089. }
  18090. },
  18091. "required": ["id", "type", "properties"],
  18092. "additionalProperties": false
  18093. },
  18094. "ToolTextContent": {
  18095. "type": "object",
  18096. "properties": {
  18097. "type": {
  18098. "type": "string",
  18099. "enum": ["text"]
  18100. },
  18101. "text": {
  18102. "type": "string"
  18103. }
  18104. },
  18105. "required": ["type", "text"],
  18106. "additionalProperties": false
  18107. },
  18108. "ToolFileContent": {
  18109. "type": "object",
  18110. "properties": {
  18111. "type": {
  18112. "type": "string",
  18113. "enum": ["file"]
  18114. },
  18115. "uri": {
  18116. "type": "string"
  18117. },
  18118. "mime": {
  18119. "type": "string"
  18120. },
  18121. "name": {
  18122. "type": "string"
  18123. }
  18124. },
  18125. "required": ["type", "uri", "mime"],
  18126. "additionalProperties": false
  18127. },
  18128. "EventSessionNextToolProgress": {
  18129. "type": "object",
  18130. "properties": {
  18131. "id": {
  18132. "type": "string"
  18133. },
  18134. "type": {
  18135. "type": "string",
  18136. "enum": ["session.next.tool.progress"]
  18137. },
  18138. "properties": {
  18139. "type": "object",
  18140. "properties": {
  18141. "timestamp": {
  18142. "type": "number"
  18143. },
  18144. "sessionID": {
  18145. "type": "string",
  18146. "pattern": "^ses"
  18147. },
  18148. "callID": {
  18149. "type": "string"
  18150. },
  18151. "structured": {
  18152. "type": "object"
  18153. },
  18154. "content": {
  18155. "type": "array",
  18156. "items": {
  18157. "anyOf": [
  18158. {
  18159. "$ref": "#/components/schemas/ToolTextContent"
  18160. },
  18161. {
  18162. "$ref": "#/components/schemas/ToolFileContent"
  18163. }
  18164. ]
  18165. }
  18166. }
  18167. },
  18168. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  18169. "additionalProperties": false
  18170. }
  18171. },
  18172. "required": ["id", "type", "properties"],
  18173. "additionalProperties": false
  18174. },
  18175. "EventSessionNextToolSuccess": {
  18176. "type": "object",
  18177. "properties": {
  18178. "id": {
  18179. "type": "string"
  18180. },
  18181. "type": {
  18182. "type": "string",
  18183. "enum": ["session.next.tool.success"]
  18184. },
  18185. "properties": {
  18186. "type": "object",
  18187. "properties": {
  18188. "timestamp": {
  18189. "type": "number"
  18190. },
  18191. "sessionID": {
  18192. "type": "string",
  18193. "pattern": "^ses"
  18194. },
  18195. "callID": {
  18196. "type": "string"
  18197. },
  18198. "structured": {
  18199. "type": "object"
  18200. },
  18201. "content": {
  18202. "type": "array",
  18203. "items": {
  18204. "anyOf": [
  18205. {
  18206. "$ref": "#/components/schemas/ToolTextContent"
  18207. },
  18208. {
  18209. "$ref": "#/components/schemas/ToolFileContent"
  18210. }
  18211. ]
  18212. }
  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", "structured", "content", "provider"],
  18229. "additionalProperties": false
  18230. }
  18231. },
  18232. "required": ["id", "type", "properties"],
  18233. "additionalProperties": false
  18234. },
  18235. "EventSessionNextToolFailed": {
  18236. "type": "object",
  18237. "properties": {
  18238. "id": {
  18239. "type": "string"
  18240. },
  18241. "type": {
  18242. "type": "string",
  18243. "enum": ["session.next.tool.failed"]
  18244. },
  18245. "properties": {
  18246. "type": "object",
  18247. "properties": {
  18248. "timestamp": {
  18249. "type": "number"
  18250. },
  18251. "sessionID": {
  18252. "type": "string",
  18253. "pattern": "^ses"
  18254. },
  18255. "callID": {
  18256. "type": "string"
  18257. },
  18258. "error": {
  18259. "$ref": "#/components/schemas/SessionErrorUnknown"
  18260. },
  18261. "provider": {
  18262. "type": "object",
  18263. "properties": {
  18264. "executed": {
  18265. "type": "boolean"
  18266. },
  18267. "metadata": {
  18268. "type": "object"
  18269. }
  18270. },
  18271. "required": ["executed"],
  18272. "additionalProperties": false
  18273. }
  18274. },
  18275. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  18276. "additionalProperties": false
  18277. }
  18278. },
  18279. "required": ["id", "type", "properties"],
  18280. "additionalProperties": false
  18281. },
  18282. "SessionNextRetry_error": {
  18283. "type": "object",
  18284. "properties": {
  18285. "message": {
  18286. "type": "string"
  18287. },
  18288. "statusCode": {
  18289. "type": "number"
  18290. },
  18291. "isRetryable": {
  18292. "type": "boolean"
  18293. },
  18294. "responseHeaders": {
  18295. "type": "object",
  18296. "additionalProperties": {
  18297. "type": "string"
  18298. }
  18299. },
  18300. "responseBody": {
  18301. "type": "string"
  18302. },
  18303. "metadata": {
  18304. "type": "object",
  18305. "additionalProperties": {
  18306. "type": "string"
  18307. }
  18308. }
  18309. },
  18310. "required": ["message", "isRetryable"],
  18311. "additionalProperties": false
  18312. },
  18313. "EventSessionNextRetried": {
  18314. "type": "object",
  18315. "properties": {
  18316. "id": {
  18317. "type": "string"
  18318. },
  18319. "type": {
  18320. "type": "string",
  18321. "enum": ["session.next.retried"]
  18322. },
  18323. "properties": {
  18324. "type": "object",
  18325. "properties": {
  18326. "timestamp": {
  18327. "type": "number"
  18328. },
  18329. "sessionID": {
  18330. "type": "string",
  18331. "pattern": "^ses"
  18332. },
  18333. "attempt": {
  18334. "type": "number"
  18335. },
  18336. "error": {
  18337. "$ref": "#/components/schemas/SessionNextRetry_error"
  18338. }
  18339. },
  18340. "required": ["timestamp", "sessionID", "attempt", "error"],
  18341. "additionalProperties": false
  18342. }
  18343. },
  18344. "required": ["id", "type", "properties"],
  18345. "additionalProperties": false
  18346. },
  18347. "EventSessionNextCompactionStarted": {
  18348. "type": "object",
  18349. "properties": {
  18350. "id": {
  18351. "type": "string"
  18352. },
  18353. "type": {
  18354. "type": "string",
  18355. "enum": ["session.next.compaction.started"]
  18356. },
  18357. "properties": {
  18358. "type": "object",
  18359. "properties": {
  18360. "timestamp": {
  18361. "type": "number"
  18362. },
  18363. "sessionID": {
  18364. "type": "string",
  18365. "pattern": "^ses"
  18366. },
  18367. "reason": {
  18368. "type": "string",
  18369. "enum": ["auto", "manual"]
  18370. }
  18371. },
  18372. "required": ["timestamp", "sessionID", "reason"],
  18373. "additionalProperties": false
  18374. }
  18375. },
  18376. "required": ["id", "type", "properties"],
  18377. "additionalProperties": false
  18378. },
  18379. "EventSessionNextCompactionDelta": {
  18380. "type": "object",
  18381. "properties": {
  18382. "id": {
  18383. "type": "string"
  18384. },
  18385. "type": {
  18386. "type": "string",
  18387. "enum": ["session.next.compaction.delta"]
  18388. },
  18389. "properties": {
  18390. "type": "object",
  18391. "properties": {
  18392. "timestamp": {
  18393. "type": "number"
  18394. },
  18395. "sessionID": {
  18396. "type": "string",
  18397. "pattern": "^ses"
  18398. },
  18399. "text": {
  18400. "type": "string"
  18401. }
  18402. },
  18403. "required": ["timestamp", "sessionID", "text"],
  18404. "additionalProperties": false
  18405. }
  18406. },
  18407. "required": ["id", "type", "properties"],
  18408. "additionalProperties": false
  18409. },
  18410. "EventSessionNextCompactionEnded": {
  18411. "type": "object",
  18412. "properties": {
  18413. "id": {
  18414. "type": "string"
  18415. },
  18416. "type": {
  18417. "type": "string",
  18418. "enum": ["session.next.compaction.ended"]
  18419. },
  18420. "properties": {
  18421. "type": "object",
  18422. "properties": {
  18423. "timestamp": {
  18424. "type": "number"
  18425. },
  18426. "sessionID": {
  18427. "type": "string",
  18428. "pattern": "^ses"
  18429. },
  18430. "text": {
  18431. "type": "string"
  18432. },
  18433. "include": {
  18434. "type": "string"
  18435. }
  18436. },
  18437. "required": ["timestamp", "sessionID", "text"],
  18438. "additionalProperties": false
  18439. }
  18440. },
  18441. "required": ["id", "type", "properties"],
  18442. "additionalProperties": false
  18443. },
  18444. "EventServerConnected": {
  18445. "type": "object",
  18446. "properties": {
  18447. "id": {
  18448. "type": "string"
  18449. },
  18450. "type": {
  18451. "type": "string",
  18452. "enum": ["server.connected"]
  18453. },
  18454. "properties": {
  18455. "type": "object",
  18456. "properties": {}
  18457. }
  18458. },
  18459. "required": ["id", "type", "properties"],
  18460. "additionalProperties": false
  18461. },
  18462. "EventGlobalDisposed": {
  18463. "type": "object",
  18464. "properties": {
  18465. "id": {
  18466. "type": "string"
  18467. },
  18468. "type": {
  18469. "type": "string",
  18470. "enum": ["global.disposed"]
  18471. },
  18472. "properties": {
  18473. "type": "object",
  18474. "properties": {}
  18475. }
  18476. },
  18477. "required": ["id", "type", "properties"],
  18478. "additionalProperties": false
  18479. },
  18480. "SessionInfo": {
  18481. "type": "object",
  18482. "properties": {
  18483. "id": {
  18484. "type": "string",
  18485. "pattern": "^ses"
  18486. },
  18487. "parentID": {
  18488. "type": "string",
  18489. "pattern": "^ses"
  18490. },
  18491. "projectID": {
  18492. "type": "string"
  18493. },
  18494. "workspaceID": {
  18495. "type": "string",
  18496. "pattern": "^wrk"
  18497. },
  18498. "path": {
  18499. "type": "string"
  18500. },
  18501. "agent": {
  18502. "type": "string"
  18503. },
  18504. "model": {
  18505. "type": "object",
  18506. "properties": {
  18507. "id": {
  18508. "type": "string"
  18509. },
  18510. "providerID": {
  18511. "type": "string"
  18512. },
  18513. "variant": {
  18514. "type": "string"
  18515. }
  18516. },
  18517. "required": ["id", "providerID", "variant"],
  18518. "additionalProperties": false
  18519. },
  18520. "cost": {
  18521. "type": "number"
  18522. },
  18523. "tokens": {
  18524. "type": "object",
  18525. "properties": {
  18526. "input": {
  18527. "type": "number"
  18528. },
  18529. "output": {
  18530. "type": "number"
  18531. },
  18532. "reasoning": {
  18533. "type": "number"
  18534. },
  18535. "cache": {
  18536. "type": "object",
  18537. "properties": {
  18538. "read": {
  18539. "type": "number"
  18540. },
  18541. "write": {
  18542. "type": "number"
  18543. }
  18544. },
  18545. "required": ["read", "write"],
  18546. "additionalProperties": false
  18547. }
  18548. },
  18549. "required": ["input", "output", "reasoning", "cache"],
  18550. "additionalProperties": false
  18551. },
  18552. "time": {
  18553. "type": "object",
  18554. "properties": {
  18555. "created": {
  18556. "type": "number"
  18557. },
  18558. "updated": {
  18559. "type": "number"
  18560. },
  18561. "archived": {
  18562. "type": "number"
  18563. }
  18564. },
  18565. "required": ["created", "updated"],
  18566. "additionalProperties": false
  18567. },
  18568. "title": {
  18569. "type": "string"
  18570. }
  18571. },
  18572. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  18573. "additionalProperties": false
  18574. },
  18575. "SessionDelivery": {
  18576. "type": "string",
  18577. "enum": ["immediate", "deferred"]
  18578. },
  18579. "SessionMessageAgentSwitched": {
  18580. "type": "object",
  18581. "properties": {
  18582. "id": {
  18583. "type": "string"
  18584. },
  18585. "metadata": {
  18586. "type": "object"
  18587. },
  18588. "time": {
  18589. "type": "object",
  18590. "properties": {
  18591. "created": {
  18592. "type": "number"
  18593. }
  18594. },
  18595. "required": ["created"],
  18596. "additionalProperties": false
  18597. },
  18598. "type": {
  18599. "type": "string",
  18600. "enum": ["agent-switched"]
  18601. },
  18602. "agent": {
  18603. "type": "string"
  18604. }
  18605. },
  18606. "required": ["id", "time", "type", "agent"],
  18607. "additionalProperties": false
  18608. },
  18609. "SessionMessageModelSwitched": {
  18610. "type": "object",
  18611. "properties": {
  18612. "id": {
  18613. "type": "string"
  18614. },
  18615. "metadata": {
  18616. "type": "object"
  18617. },
  18618. "time": {
  18619. "type": "object",
  18620. "properties": {
  18621. "created": {
  18622. "type": "number"
  18623. }
  18624. },
  18625. "required": ["created"],
  18626. "additionalProperties": false
  18627. },
  18628. "type": {
  18629. "type": "string",
  18630. "enum": ["model-switched"]
  18631. },
  18632. "model": {
  18633. "type": "object",
  18634. "properties": {
  18635. "id": {
  18636. "type": "string"
  18637. },
  18638. "providerID": {
  18639. "type": "string"
  18640. },
  18641. "variant": {
  18642. "type": "string"
  18643. }
  18644. },
  18645. "required": ["id", "providerID", "variant"],
  18646. "additionalProperties": false
  18647. }
  18648. },
  18649. "required": ["id", "time", "type", "model"],
  18650. "additionalProperties": false
  18651. },
  18652. "SessionMessageUser": {
  18653. "type": "object",
  18654. "properties": {
  18655. "id": {
  18656. "type": "string"
  18657. },
  18658. "metadata": {
  18659. "type": "object"
  18660. },
  18661. "time": {
  18662. "type": "object",
  18663. "properties": {
  18664. "created": {
  18665. "type": "number"
  18666. }
  18667. },
  18668. "required": ["created"],
  18669. "additionalProperties": false
  18670. },
  18671. "text": {
  18672. "type": "string"
  18673. },
  18674. "files": {
  18675. "type": "array",
  18676. "items": {
  18677. "$ref": "#/components/schemas/PromptFileAttachment"
  18678. }
  18679. },
  18680. "agents": {
  18681. "type": "array",
  18682. "items": {
  18683. "$ref": "#/components/schemas/PromptAgentAttachment"
  18684. }
  18685. },
  18686. "references": {
  18687. "type": "array",
  18688. "items": {
  18689. "$ref": "#/components/schemas/PromptReferenceAttachment"
  18690. }
  18691. },
  18692. "type": {
  18693. "type": "string",
  18694. "enum": ["user"]
  18695. }
  18696. },
  18697. "required": ["id", "time", "text", "type"],
  18698. "additionalProperties": false
  18699. },
  18700. "SessionMessageSynthetic": {
  18701. "type": "object",
  18702. "properties": {
  18703. "id": {
  18704. "type": "string"
  18705. },
  18706. "metadata": {
  18707. "type": "object"
  18708. },
  18709. "time": {
  18710. "type": "object",
  18711. "properties": {
  18712. "created": {
  18713. "type": "number"
  18714. }
  18715. },
  18716. "required": ["created"],
  18717. "additionalProperties": false
  18718. },
  18719. "sessionID": {
  18720. "type": "string",
  18721. "pattern": "^ses"
  18722. },
  18723. "text": {
  18724. "type": "string"
  18725. },
  18726. "type": {
  18727. "type": "string",
  18728. "enum": ["synthetic"]
  18729. }
  18730. },
  18731. "required": ["id", "time", "sessionID", "text", "type"],
  18732. "additionalProperties": false
  18733. },
  18734. "SessionMessageShell": {
  18735. "type": "object",
  18736. "properties": {
  18737. "id": {
  18738. "type": "string"
  18739. },
  18740. "metadata": {
  18741. "type": "object"
  18742. },
  18743. "time": {
  18744. "type": "object",
  18745. "properties": {
  18746. "created": {
  18747. "type": "number"
  18748. },
  18749. "completed": {
  18750. "type": "number"
  18751. }
  18752. },
  18753. "required": ["created"],
  18754. "additionalProperties": false
  18755. },
  18756. "type": {
  18757. "type": "string",
  18758. "enum": ["shell"]
  18759. },
  18760. "callID": {
  18761. "type": "string"
  18762. },
  18763. "command": {
  18764. "type": "string"
  18765. },
  18766. "output": {
  18767. "type": "string"
  18768. }
  18769. },
  18770. "required": ["id", "time", "type", "callID", "command", "output"],
  18771. "additionalProperties": false
  18772. },
  18773. "SessionMessageAssistantText": {
  18774. "type": "object",
  18775. "properties": {
  18776. "type": {
  18777. "type": "string",
  18778. "enum": ["text"]
  18779. },
  18780. "text": {
  18781. "type": "string"
  18782. }
  18783. },
  18784. "required": ["type", "text"],
  18785. "additionalProperties": false
  18786. },
  18787. "SessionMessageAssistantReasoning": {
  18788. "type": "object",
  18789. "properties": {
  18790. "type": {
  18791. "type": "string",
  18792. "enum": ["reasoning"]
  18793. },
  18794. "id": {
  18795. "type": "string"
  18796. },
  18797. "text": {
  18798. "type": "string"
  18799. }
  18800. },
  18801. "required": ["type", "id", "text"],
  18802. "additionalProperties": false
  18803. },
  18804. "SessionMessageToolStatePending": {
  18805. "type": "object",
  18806. "properties": {
  18807. "status": {
  18808. "type": "string",
  18809. "enum": ["pending"]
  18810. },
  18811. "input": {
  18812. "type": "string"
  18813. }
  18814. },
  18815. "required": ["status", "input"],
  18816. "additionalProperties": false
  18817. },
  18818. "SessionMessageToolStateRunning": {
  18819. "type": "object",
  18820. "properties": {
  18821. "status": {
  18822. "type": "string",
  18823. "enum": ["running"]
  18824. },
  18825. "input": {
  18826. "type": "object"
  18827. },
  18828. "structured": {
  18829. "type": "object"
  18830. },
  18831. "content": {
  18832. "type": "array",
  18833. "items": {
  18834. "anyOf": [
  18835. {
  18836. "$ref": "#/components/schemas/ToolTextContent"
  18837. },
  18838. {
  18839. "$ref": "#/components/schemas/ToolFileContent"
  18840. }
  18841. ]
  18842. }
  18843. }
  18844. },
  18845. "required": ["status", "input", "structured", "content"],
  18846. "additionalProperties": false
  18847. },
  18848. "SessionMessageToolStateCompleted": {
  18849. "type": "object",
  18850. "properties": {
  18851. "status": {
  18852. "type": "string",
  18853. "enum": ["completed"]
  18854. },
  18855. "input": {
  18856. "type": "object"
  18857. },
  18858. "attachments": {
  18859. "type": "array",
  18860. "items": {
  18861. "$ref": "#/components/schemas/PromptFileAttachment"
  18862. }
  18863. },
  18864. "content": {
  18865. "type": "array",
  18866. "items": {
  18867. "anyOf": [
  18868. {
  18869. "$ref": "#/components/schemas/ToolTextContent"
  18870. },
  18871. {
  18872. "$ref": "#/components/schemas/ToolFileContent"
  18873. }
  18874. ]
  18875. }
  18876. },
  18877. "structured": {
  18878. "type": "object"
  18879. }
  18880. },
  18881. "required": ["status", "input", "content", "structured"],
  18882. "additionalProperties": false
  18883. },
  18884. "SessionMessageToolStateError": {
  18885. "type": "object",
  18886. "properties": {
  18887. "status": {
  18888. "type": "string",
  18889. "enum": ["error"]
  18890. },
  18891. "input": {
  18892. "type": "object"
  18893. },
  18894. "content": {
  18895. "type": "array",
  18896. "items": {
  18897. "anyOf": [
  18898. {
  18899. "$ref": "#/components/schemas/ToolTextContent"
  18900. },
  18901. {
  18902. "$ref": "#/components/schemas/ToolFileContent"
  18903. }
  18904. ]
  18905. }
  18906. },
  18907. "structured": {
  18908. "type": "object"
  18909. },
  18910. "error": {
  18911. "$ref": "#/components/schemas/SessionErrorUnknown"
  18912. }
  18913. },
  18914. "required": ["status", "input", "content", "structured", "error"],
  18915. "additionalProperties": false
  18916. },
  18917. "SessionMessageAssistantTool": {
  18918. "type": "object",
  18919. "properties": {
  18920. "type": {
  18921. "type": "string",
  18922. "enum": ["tool"]
  18923. },
  18924. "id": {
  18925. "type": "string"
  18926. },
  18927. "name": {
  18928. "type": "string"
  18929. },
  18930. "provider": {
  18931. "type": "object",
  18932. "properties": {
  18933. "executed": {
  18934. "type": "boolean"
  18935. },
  18936. "metadata": {
  18937. "type": "object"
  18938. }
  18939. },
  18940. "required": ["executed"],
  18941. "additionalProperties": false
  18942. },
  18943. "state": {
  18944. "anyOf": [
  18945. {
  18946. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  18947. },
  18948. {
  18949. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  18950. },
  18951. {
  18952. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  18953. },
  18954. {
  18955. "$ref": "#/components/schemas/SessionMessageToolStateError"
  18956. }
  18957. ]
  18958. },
  18959. "time": {
  18960. "type": "object",
  18961. "properties": {
  18962. "created": {
  18963. "type": "number"
  18964. },
  18965. "ran": {
  18966. "type": "number"
  18967. },
  18968. "completed": {
  18969. "type": "number"
  18970. },
  18971. "pruned": {
  18972. "type": "number"
  18973. }
  18974. },
  18975. "required": ["created"],
  18976. "additionalProperties": false
  18977. }
  18978. },
  18979. "required": ["type", "id", "name", "state", "time"],
  18980. "additionalProperties": false
  18981. },
  18982. "SessionMessageAssistant": {
  18983. "type": "object",
  18984. "properties": {
  18985. "id": {
  18986. "type": "string"
  18987. },
  18988. "metadata": {
  18989. "type": "object"
  18990. },
  18991. "time": {
  18992. "type": "object",
  18993. "properties": {
  18994. "created": {
  18995. "type": "number"
  18996. },
  18997. "completed": {
  18998. "type": "number"
  18999. }
  19000. },
  19001. "required": ["created"],
  19002. "additionalProperties": false
  19003. },
  19004. "type": {
  19005. "type": "string",
  19006. "enum": ["assistant"]
  19007. },
  19008. "agent": {
  19009. "type": "string"
  19010. },
  19011. "model": {
  19012. "type": "object",
  19013. "properties": {
  19014. "id": {
  19015. "type": "string"
  19016. },
  19017. "providerID": {
  19018. "type": "string"
  19019. },
  19020. "variant": {
  19021. "type": "string"
  19022. }
  19023. },
  19024. "required": ["id", "providerID", "variant"],
  19025. "additionalProperties": false
  19026. },
  19027. "content": {
  19028. "type": "array",
  19029. "items": {
  19030. "anyOf": [
  19031. {
  19032. "$ref": "#/components/schemas/SessionMessageAssistantText"
  19033. },
  19034. {
  19035. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  19036. },
  19037. {
  19038. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  19039. }
  19040. ]
  19041. }
  19042. },
  19043. "snapshot": {
  19044. "type": "object",
  19045. "properties": {
  19046. "start": {
  19047. "type": "string"
  19048. },
  19049. "end": {
  19050. "type": "string"
  19051. }
  19052. },
  19053. "additionalProperties": false
  19054. },
  19055. "finish": {
  19056. "type": "string"
  19057. },
  19058. "cost": {
  19059. "type": "number"
  19060. },
  19061. "tokens": {
  19062. "type": "object",
  19063. "properties": {
  19064. "input": {
  19065. "type": "number"
  19066. },
  19067. "output": {
  19068. "type": "number"
  19069. },
  19070. "reasoning": {
  19071. "type": "number"
  19072. },
  19073. "cache": {
  19074. "type": "object",
  19075. "properties": {
  19076. "read": {
  19077. "type": "number"
  19078. },
  19079. "write": {
  19080. "type": "number"
  19081. }
  19082. },
  19083. "required": ["read", "write"],
  19084. "additionalProperties": false
  19085. }
  19086. },
  19087. "required": ["input", "output", "reasoning", "cache"],
  19088. "additionalProperties": false
  19089. },
  19090. "error": {
  19091. "$ref": "#/components/schemas/SessionErrorUnknown"
  19092. }
  19093. },
  19094. "required": ["id", "time", "type", "agent", "model", "content"],
  19095. "additionalProperties": false
  19096. },
  19097. "SessionMessageCompaction": {
  19098. "type": "object",
  19099. "properties": {
  19100. "type": {
  19101. "type": "string",
  19102. "enum": ["compaction"]
  19103. },
  19104. "reason": {
  19105. "type": "string",
  19106. "enum": ["auto", "manual"]
  19107. },
  19108. "summary": {
  19109. "type": "string"
  19110. },
  19111. "include": {
  19112. "type": "string"
  19113. },
  19114. "id": {
  19115. "type": "string"
  19116. },
  19117. "metadata": {
  19118. "type": "object"
  19119. },
  19120. "time": {
  19121. "type": "object",
  19122. "properties": {
  19123. "created": {
  19124. "type": "number"
  19125. }
  19126. },
  19127. "required": ["created"],
  19128. "additionalProperties": false
  19129. }
  19130. },
  19131. "required": ["type", "reason", "summary", "id", "time"],
  19132. "additionalProperties": false
  19133. },
  19134. "SessionMessage": {
  19135. "anyOf": [
  19136. {
  19137. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  19138. },
  19139. {
  19140. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  19141. },
  19142. {
  19143. "$ref": "#/components/schemas/SessionMessageUser"
  19144. },
  19145. {
  19146. "$ref": "#/components/schemas/SessionMessageSynthetic"
  19147. },
  19148. {
  19149. "$ref": "#/components/schemas/SessionMessageShell"
  19150. },
  19151. {
  19152. "$ref": "#/components/schemas/SessionMessageAssistant"
  19153. },
  19154. {
  19155. "$ref": "#/components/schemas/SessionMessageCompaction"
  19156. }
  19157. ]
  19158. },
  19159. "ModelV2Info": {
  19160. "type": "object",
  19161. "properties": {
  19162. "id": {
  19163. "type": "string"
  19164. },
  19165. "apiID": {
  19166. "type": "string"
  19167. },
  19168. "providerID": {
  19169. "type": "string"
  19170. },
  19171. "family": {
  19172. "type": "string"
  19173. },
  19174. "name": {
  19175. "type": "string"
  19176. },
  19177. "endpoint": {
  19178. "anyOf": [
  19179. {
  19180. "type": "object",
  19181. "properties": {
  19182. "type": {
  19183. "type": "string",
  19184. "enum": ["unknown"]
  19185. }
  19186. },
  19187. "required": ["type"],
  19188. "additionalProperties": false
  19189. },
  19190. {
  19191. "type": "object",
  19192. "properties": {
  19193. "type": {
  19194. "type": "string",
  19195. "enum": ["openai/responses"]
  19196. },
  19197. "url": {
  19198. "type": "string"
  19199. },
  19200. "websocket": {
  19201. "type": "boolean"
  19202. }
  19203. },
  19204. "required": ["type", "url"],
  19205. "additionalProperties": false
  19206. },
  19207. {
  19208. "type": "object",
  19209. "properties": {
  19210. "type": {
  19211. "type": "string",
  19212. "enum": ["openai/completions"]
  19213. },
  19214. "url": {
  19215. "type": "string"
  19216. },
  19217. "reasoning": {
  19218. "anyOf": [
  19219. {
  19220. "type": "object",
  19221. "properties": {
  19222. "type": {
  19223. "type": "string",
  19224. "enum": ["reasoning_content"]
  19225. }
  19226. },
  19227. "required": ["type"],
  19228. "additionalProperties": false
  19229. },
  19230. {
  19231. "type": "object",
  19232. "properties": {
  19233. "type": {
  19234. "type": "string",
  19235. "enum": ["reasoning_details"]
  19236. }
  19237. },
  19238. "required": ["type"],
  19239. "additionalProperties": false
  19240. }
  19241. ]
  19242. }
  19243. },
  19244. "required": ["type", "url"],
  19245. "additionalProperties": false
  19246. },
  19247. {
  19248. "type": "object",
  19249. "properties": {
  19250. "type": {
  19251. "type": "string",
  19252. "enum": ["anthropic/messages"]
  19253. },
  19254. "url": {
  19255. "type": "string"
  19256. }
  19257. },
  19258. "required": ["type", "url"],
  19259. "additionalProperties": false
  19260. },
  19261. {
  19262. "type": "object",
  19263. "properties": {
  19264. "type": {
  19265. "type": "string",
  19266. "enum": ["aisdk"]
  19267. },
  19268. "package": {
  19269. "type": "string"
  19270. },
  19271. "url": {
  19272. "type": "string"
  19273. }
  19274. },
  19275. "required": ["type", "package"],
  19276. "additionalProperties": false
  19277. }
  19278. ]
  19279. },
  19280. "capabilities": {
  19281. "type": "object",
  19282. "properties": {
  19283. "tools": {
  19284. "type": "boolean"
  19285. },
  19286. "input": {
  19287. "type": "array",
  19288. "items": {
  19289. "type": "string"
  19290. }
  19291. },
  19292. "output": {
  19293. "type": "array",
  19294. "items": {
  19295. "type": "string"
  19296. }
  19297. }
  19298. },
  19299. "required": ["tools", "input", "output"],
  19300. "additionalProperties": false
  19301. },
  19302. "options": {
  19303. "type": "object",
  19304. "properties": {
  19305. "headers": {
  19306. "type": "object",
  19307. "additionalProperties": {
  19308. "type": "string"
  19309. }
  19310. },
  19311. "body": {
  19312. "type": "object"
  19313. },
  19314. "aisdk": {
  19315. "type": "object",
  19316. "properties": {
  19317. "provider": {
  19318. "type": "object"
  19319. },
  19320. "request": {
  19321. "type": "object"
  19322. }
  19323. },
  19324. "required": ["provider", "request"],
  19325. "additionalProperties": false
  19326. },
  19327. "variant": {
  19328. "type": "string"
  19329. }
  19330. },
  19331. "required": ["headers", "body", "aisdk"],
  19332. "additionalProperties": false
  19333. },
  19334. "variants": {
  19335. "type": "array",
  19336. "items": {
  19337. "type": "object",
  19338. "properties": {
  19339. "id": {
  19340. "type": "string"
  19341. },
  19342. "headers": {
  19343. "type": "object",
  19344. "additionalProperties": {
  19345. "type": "string"
  19346. }
  19347. },
  19348. "body": {
  19349. "type": "object"
  19350. },
  19351. "aisdk": {
  19352. "type": "object",
  19353. "properties": {
  19354. "provider": {
  19355. "type": "object"
  19356. },
  19357. "request": {
  19358. "type": "object"
  19359. }
  19360. },
  19361. "required": ["provider", "request"],
  19362. "additionalProperties": false
  19363. }
  19364. },
  19365. "required": ["id", "headers", "body", "aisdk"],
  19366. "additionalProperties": false
  19367. }
  19368. },
  19369. "time": {
  19370. "type": "object",
  19371. "properties": {
  19372. "released": {
  19373. "anyOf": [
  19374. {
  19375. "type": "number"
  19376. },
  19377. {
  19378. "type": "string",
  19379. "enum": ["NaN"]
  19380. },
  19381. {
  19382. "type": "string",
  19383. "enum": ["Infinity"]
  19384. },
  19385. {
  19386. "type": "string",
  19387. "enum": ["-Infinity"]
  19388. },
  19389. {
  19390. "type": "string",
  19391. "enum": ["Infinity", "-Infinity", "NaN"]
  19392. }
  19393. ]
  19394. }
  19395. },
  19396. "required": ["released"],
  19397. "additionalProperties": false
  19398. },
  19399. "cost": {
  19400. "type": "array",
  19401. "items": {
  19402. "type": "object",
  19403. "properties": {
  19404. "tier": {
  19405. "type": "object",
  19406. "properties": {
  19407. "type": {
  19408. "type": "string",
  19409. "enum": ["context"]
  19410. },
  19411. "size": {
  19412. "type": "integer"
  19413. }
  19414. },
  19415. "required": ["type", "size"],
  19416. "additionalProperties": false
  19417. },
  19418. "input": {
  19419. "type": "number"
  19420. },
  19421. "output": {
  19422. "type": "number"
  19423. },
  19424. "cache": {
  19425. "type": "object",
  19426. "properties": {
  19427. "read": {
  19428. "type": "number"
  19429. },
  19430. "write": {
  19431. "type": "number"
  19432. }
  19433. },
  19434. "required": ["read", "write"],
  19435. "additionalProperties": false
  19436. }
  19437. },
  19438. "required": ["input", "output", "cache"],
  19439. "additionalProperties": false
  19440. }
  19441. },
  19442. "status": {
  19443. "type": "string",
  19444. "enum": ["alpha", "beta", "deprecated", "active"]
  19445. },
  19446. "enabled": {
  19447. "type": "boolean"
  19448. },
  19449. "limit": {
  19450. "type": "object",
  19451. "properties": {
  19452. "context": {
  19453. "type": "integer"
  19454. },
  19455. "input": {
  19456. "type": "integer"
  19457. },
  19458. "output": {
  19459. "type": "integer"
  19460. }
  19461. },
  19462. "required": ["context", "output"],
  19463. "additionalProperties": false
  19464. }
  19465. },
  19466. "required": [
  19467. "id",
  19468. "apiID",
  19469. "providerID",
  19470. "name",
  19471. "endpoint",
  19472. "capabilities",
  19473. "options",
  19474. "variants",
  19475. "time",
  19476. "cost",
  19477. "status",
  19478. "enabled",
  19479. "limit"
  19480. ],
  19481. "additionalProperties": false
  19482. },
  19483. "ProviderV2Info": {
  19484. "type": "object",
  19485. "properties": {
  19486. "id": {
  19487. "type": "string"
  19488. },
  19489. "name": {
  19490. "type": "string"
  19491. },
  19492. "enabled": {
  19493. "anyOf": [
  19494. {
  19495. "type": "boolean",
  19496. "enum": [false]
  19497. },
  19498. {
  19499. "type": "object",
  19500. "properties": {
  19501. "via": {
  19502. "type": "string",
  19503. "enum": ["env"]
  19504. },
  19505. "name": {
  19506. "type": "string"
  19507. }
  19508. },
  19509. "required": ["via", "name"],
  19510. "additionalProperties": false
  19511. },
  19512. {
  19513. "type": "object",
  19514. "properties": {
  19515. "via": {
  19516. "type": "string",
  19517. "enum": ["auth"]
  19518. },
  19519. "service": {
  19520. "type": "string"
  19521. }
  19522. },
  19523. "required": ["via", "service"],
  19524. "additionalProperties": false
  19525. },
  19526. {
  19527. "type": "object",
  19528. "properties": {
  19529. "via": {
  19530. "type": "string",
  19531. "enum": ["custom"]
  19532. },
  19533. "data": {
  19534. "type": "object"
  19535. }
  19536. },
  19537. "required": ["via", "data"],
  19538. "additionalProperties": false
  19539. }
  19540. ]
  19541. },
  19542. "env": {
  19543. "type": "array",
  19544. "items": {
  19545. "type": "string"
  19546. }
  19547. },
  19548. "endpoint": {
  19549. "anyOf": [
  19550. {
  19551. "type": "object",
  19552. "properties": {
  19553. "type": {
  19554. "type": "string",
  19555. "enum": ["unknown"]
  19556. }
  19557. },
  19558. "required": ["type"],
  19559. "additionalProperties": false
  19560. },
  19561. {
  19562. "type": "object",
  19563. "properties": {
  19564. "type": {
  19565. "type": "string",
  19566. "enum": ["openai/responses"]
  19567. },
  19568. "url": {
  19569. "type": "string"
  19570. },
  19571. "websocket": {
  19572. "type": "boolean"
  19573. }
  19574. },
  19575. "required": ["type", "url"],
  19576. "additionalProperties": false
  19577. },
  19578. {
  19579. "type": "object",
  19580. "properties": {
  19581. "type": {
  19582. "type": "string",
  19583. "enum": ["openai/completions"]
  19584. },
  19585. "url": {
  19586. "type": "string"
  19587. },
  19588. "reasoning": {
  19589. "anyOf": [
  19590. {
  19591. "type": "object",
  19592. "properties": {
  19593. "type": {
  19594. "type": "string",
  19595. "enum": ["reasoning_content"]
  19596. }
  19597. },
  19598. "required": ["type"],
  19599. "additionalProperties": false
  19600. },
  19601. {
  19602. "type": "object",
  19603. "properties": {
  19604. "type": {
  19605. "type": "string",
  19606. "enum": ["reasoning_details"]
  19607. }
  19608. },
  19609. "required": ["type"],
  19610. "additionalProperties": false
  19611. }
  19612. ]
  19613. }
  19614. },
  19615. "required": ["type", "url"],
  19616. "additionalProperties": false
  19617. },
  19618. {
  19619. "type": "object",
  19620. "properties": {
  19621. "type": {
  19622. "type": "string",
  19623. "enum": ["anthropic/messages"]
  19624. },
  19625. "url": {
  19626. "type": "string"
  19627. }
  19628. },
  19629. "required": ["type", "url"],
  19630. "additionalProperties": false
  19631. },
  19632. {
  19633. "type": "object",
  19634. "properties": {
  19635. "type": {
  19636. "type": "string",
  19637. "enum": ["aisdk"]
  19638. },
  19639. "package": {
  19640. "type": "string"
  19641. },
  19642. "url": {
  19643. "type": "string"
  19644. }
  19645. },
  19646. "required": ["type", "package"],
  19647. "additionalProperties": false
  19648. }
  19649. ]
  19650. },
  19651. "options": {
  19652. "type": "object",
  19653. "properties": {
  19654. "headers": {
  19655. "type": "object",
  19656. "additionalProperties": {
  19657. "type": "string"
  19658. }
  19659. },
  19660. "body": {
  19661. "type": "object"
  19662. },
  19663. "aisdk": {
  19664. "type": "object",
  19665. "properties": {
  19666. "provider": {
  19667. "type": "object"
  19668. },
  19669. "request": {
  19670. "type": "object"
  19671. }
  19672. },
  19673. "required": ["provider", "request"],
  19674. "additionalProperties": false
  19675. }
  19676. },
  19677. "required": ["headers", "body", "aisdk"],
  19678. "additionalProperties": false
  19679. }
  19680. },
  19681. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  19682. "additionalProperties": false
  19683. },
  19684. "EventTuiToastShow1": {
  19685. "type": "object",
  19686. "properties": {
  19687. "id": {
  19688. "type": "string"
  19689. },
  19690. "type": {
  19691. "type": "string",
  19692. "enum": ["tui.toast.show"]
  19693. },
  19694. "properties": {
  19695. "type": "object",
  19696. "properties": {
  19697. "title": {
  19698. "type": "string"
  19699. },
  19700. "message": {
  19701. "type": "string"
  19702. },
  19703. "variant": {
  19704. "type": "string",
  19705. "enum": ["info", "success", "warning", "error"]
  19706. },
  19707. "duration": {
  19708. "type": "integer",
  19709. "exclusiveMinimum": 0
  19710. }
  19711. },
  19712. "required": ["message", "variant"],
  19713. "additionalProperties": false
  19714. }
  19715. },
  19716. "required": ["id", "type", "properties"],
  19717. "additionalProperties": false
  19718. },
  19719. "BadRequestError": {
  19720. "type": "object",
  19721. "required": ["name", "data"],
  19722. "properties": {
  19723. "name": {
  19724. "type": "string",
  19725. "enum": ["BadRequest"]
  19726. },
  19727. "data": {
  19728. "type": "object",
  19729. "required": ["message"],
  19730. "properties": {
  19731. "message": {
  19732. "type": "string"
  19733. },
  19734. "kind": {
  19735. "type": "string",
  19736. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  19737. }
  19738. }
  19739. }
  19740. }
  19741. }
  19742. }
  19743. },
  19744. "security": [],
  19745. "tags": [
  19746. {
  19747. "name": "control",
  19748. "description": "Control plane routes."
  19749. },
  19750. {
  19751. "name": "global",
  19752. "description": "Global server routes."
  19753. },
  19754. {
  19755. "name": "event",
  19756. "description": "Instance event stream route."
  19757. },
  19758. {
  19759. "name": "config",
  19760. "description": "Experimental HttpApi config routes."
  19761. },
  19762. {
  19763. "name": "experimental",
  19764. "description": "Experimental HttpApi read-only routes."
  19765. },
  19766. {
  19767. "name": "file",
  19768. "description": "Experimental HttpApi file routes."
  19769. },
  19770. {
  19771. "name": "instance",
  19772. "description": "Experimental HttpApi instance read routes."
  19773. },
  19774. {
  19775. "name": "mcp",
  19776. "description": "Experimental HttpApi MCP routes."
  19777. },
  19778. {
  19779. "name": "project",
  19780. "description": "Experimental HttpApi project routes."
  19781. },
  19782. {
  19783. "name": "pty",
  19784. "description": "Experimental HttpApi PTY routes."
  19785. },
  19786. {
  19787. "name": "question",
  19788. "description": "Question routes."
  19789. },
  19790. {
  19791. "name": "permission",
  19792. "description": "Experimental HttpApi permission routes."
  19793. },
  19794. {
  19795. "name": "provider",
  19796. "description": "Experimental HttpApi provider routes."
  19797. },
  19798. {
  19799. "name": "session",
  19800. "description": "Experimental HttpApi session routes."
  19801. },
  19802. {
  19803. "name": "sync",
  19804. "description": "Experimental HttpApi sync routes."
  19805. },
  19806. {
  19807. "name": "v2",
  19808. "description": "Experimental v2 routes."
  19809. },
  19810. {
  19811. "name": "v2 messages",
  19812. "description": "Experimental v2 message routes."
  19813. },
  19814. {
  19815. "name": "v2 models",
  19816. "description": "Experimental v2 model routes."
  19817. },
  19818. {
  19819. "name": "v2 providers",
  19820. "description": "Experimental v2 provider routes."
  19821. },
  19822. {
  19823. "name": "tui",
  19824. "description": "Experimental HttpApi TUI routes."
  19825. },
  19826. {
  19827. "name": "workspace",
  19828. "description": "Experimental HttpApi workspace routes."
  19829. },
  19830. {
  19831. "name": "pty",
  19832. "description": "PTY websocket route."
  19833. }
  19834. ]
  19835. }