openapi.json 520 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112
  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": "Bad request",
  4221. "content": {
  4222. "application/json": {
  4223. "schema": {
  4224. "$ref": "#/components/schemas/BadRequestError"
  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": "Bad request",
  4307. "content": {
  4308. "application/json": {
  4309. "schema": {
  4310. "$ref": "#/components/schemas/BadRequestError"
  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": "Not found",
  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": "Not found",
  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": "Not found",
  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": "Not found",
  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. "404": {
  5650. "description": "Not found",
  5651. "content": {
  5652. "application/json": {
  5653. "schema": {
  5654. "$ref": "#/components/schemas/NotFoundError"
  5655. }
  5656. }
  5657. }
  5658. }
  5659. },
  5660. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  5661. "summary": "Abort session",
  5662. "x-codeSamples": [
  5663. {
  5664. "lang": "js",
  5665. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  5666. }
  5667. ]
  5668. }
  5669. },
  5670. "/session/{sessionID}/init": {
  5671. "post": {
  5672. "tags": ["session"],
  5673. "operationId": "session.init",
  5674. "parameters": [
  5675. {
  5676. "name": "sessionID",
  5677. "in": "path",
  5678. "schema": {
  5679. "type": "string",
  5680. "pattern": "^ses"
  5681. },
  5682. "required": true
  5683. },
  5684. {
  5685. "name": "directory",
  5686. "in": "query",
  5687. "schema": {
  5688. "type": "string"
  5689. },
  5690. "required": false
  5691. },
  5692. {
  5693. "name": "workspace",
  5694. "in": "query",
  5695. "schema": {
  5696. "type": "string"
  5697. },
  5698. "required": false
  5699. }
  5700. ],
  5701. "responses": {
  5702. "200": {
  5703. "description": "200",
  5704. "content": {
  5705. "application/json": {
  5706. "schema": {
  5707. "type": "boolean",
  5708. "description": "200"
  5709. }
  5710. }
  5711. }
  5712. },
  5713. "400": {
  5714. "description": "Bad request",
  5715. "content": {
  5716. "application/json": {
  5717. "schema": {
  5718. "$ref": "#/components/schemas/BadRequestError"
  5719. }
  5720. }
  5721. }
  5722. },
  5723. "404": {
  5724. "description": "Not found",
  5725. "content": {
  5726. "application/json": {
  5727. "schema": {
  5728. "$ref": "#/components/schemas/NotFoundError"
  5729. }
  5730. }
  5731. }
  5732. }
  5733. },
  5734. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  5735. "summary": "Initialize session",
  5736. "requestBody": {
  5737. "content": {
  5738. "application/json": {
  5739. "schema": {
  5740. "type": "object",
  5741. "properties": {
  5742. "modelID": {
  5743. "type": "string"
  5744. },
  5745. "providerID": {
  5746. "type": "string"
  5747. },
  5748. "messageID": {
  5749. "type": "string",
  5750. "pattern": "^msg"
  5751. }
  5752. },
  5753. "required": ["modelID", "providerID", "messageID"],
  5754. "additionalProperties": false
  5755. }
  5756. }
  5757. }
  5758. },
  5759. "x-codeSamples": [
  5760. {
  5761. "lang": "js",
  5762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  5763. }
  5764. ]
  5765. }
  5766. },
  5767. "/session/{sessionID}/share": {
  5768. "post": {
  5769. "tags": ["session"],
  5770. "operationId": "session.share",
  5771. "parameters": [
  5772. {
  5773. "name": "sessionID",
  5774. "in": "path",
  5775. "schema": {
  5776. "type": "string",
  5777. "pattern": "^ses"
  5778. },
  5779. "required": true
  5780. },
  5781. {
  5782. "name": "directory",
  5783. "in": "query",
  5784. "schema": {
  5785. "type": "string"
  5786. },
  5787. "required": false
  5788. },
  5789. {
  5790. "name": "workspace",
  5791. "in": "query",
  5792. "schema": {
  5793. "type": "string"
  5794. },
  5795. "required": false
  5796. }
  5797. ],
  5798. "responses": {
  5799. "200": {
  5800. "description": "Successfully shared session",
  5801. "content": {
  5802. "application/json": {
  5803. "schema": {
  5804. "$ref": "#/components/schemas/Session"
  5805. }
  5806. }
  5807. }
  5808. },
  5809. "404": {
  5810. "description": "NotFoundError",
  5811. "content": {
  5812. "application/json": {
  5813. "schema": {
  5814. "$ref": "#/components/schemas/NotFoundError"
  5815. }
  5816. }
  5817. }
  5818. },
  5819. "500": {
  5820. "description": "InternalServerError",
  5821. "content": {
  5822. "application/json": {
  5823. "schema": {
  5824. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5825. }
  5826. }
  5827. }
  5828. }
  5829. },
  5830. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  5831. "summary": "Share session",
  5832. "x-codeSamples": [
  5833. {
  5834. "lang": "js",
  5835. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  5836. }
  5837. ]
  5838. },
  5839. "delete": {
  5840. "tags": ["session"],
  5841. "operationId": "session.unshare",
  5842. "parameters": [
  5843. {
  5844. "name": "sessionID",
  5845. "in": "path",
  5846. "schema": {
  5847. "type": "string",
  5848. "pattern": "^ses"
  5849. },
  5850. "required": true
  5851. },
  5852. {
  5853. "name": "directory",
  5854. "in": "query",
  5855. "schema": {
  5856. "type": "string"
  5857. },
  5858. "required": false
  5859. },
  5860. {
  5861. "name": "workspace",
  5862. "in": "query",
  5863. "schema": {
  5864. "type": "string"
  5865. },
  5866. "required": false
  5867. }
  5868. ],
  5869. "responses": {
  5870. "200": {
  5871. "description": "Successfully unshared session",
  5872. "content": {
  5873. "application/json": {
  5874. "schema": {
  5875. "$ref": "#/components/schemas/Session"
  5876. }
  5877. }
  5878. }
  5879. },
  5880. "404": {
  5881. "description": "NotFoundError",
  5882. "content": {
  5883. "application/json": {
  5884. "schema": {
  5885. "$ref": "#/components/schemas/NotFoundError"
  5886. }
  5887. }
  5888. }
  5889. },
  5890. "500": {
  5891. "description": "InternalServerError",
  5892. "content": {
  5893. "application/json": {
  5894. "schema": {
  5895. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5896. }
  5897. }
  5898. }
  5899. }
  5900. },
  5901. "description": "Remove the shareable link for a session, making it private again.",
  5902. "summary": "Unshare session",
  5903. "x-codeSamples": [
  5904. {
  5905. "lang": "js",
  5906. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  5907. }
  5908. ]
  5909. }
  5910. },
  5911. "/session/{sessionID}/summarize": {
  5912. "post": {
  5913. "tags": ["session"],
  5914. "operationId": "session.summarize",
  5915. "parameters": [
  5916. {
  5917. "name": "sessionID",
  5918. "in": "path",
  5919. "schema": {
  5920. "type": "string",
  5921. "pattern": "^ses"
  5922. },
  5923. "required": true
  5924. },
  5925. {
  5926. "name": "directory",
  5927. "in": "query",
  5928. "schema": {
  5929. "type": "string"
  5930. },
  5931. "required": false
  5932. },
  5933. {
  5934. "name": "workspace",
  5935. "in": "query",
  5936. "schema": {
  5937. "type": "string"
  5938. },
  5939. "required": false
  5940. }
  5941. ],
  5942. "responses": {
  5943. "200": {
  5944. "description": "Summarized session",
  5945. "content": {
  5946. "application/json": {
  5947. "schema": {
  5948. "type": "boolean",
  5949. "description": "Summarized session"
  5950. }
  5951. }
  5952. }
  5953. },
  5954. "400": {
  5955. "description": "Bad request",
  5956. "content": {
  5957. "application/json": {
  5958. "schema": {
  5959. "$ref": "#/components/schemas/BadRequestError"
  5960. }
  5961. }
  5962. }
  5963. },
  5964. "404": {
  5965. "description": "NotFoundError",
  5966. "content": {
  5967. "application/json": {
  5968. "schema": {
  5969. "$ref": "#/components/schemas/NotFoundError"
  5970. }
  5971. }
  5972. }
  5973. }
  5974. },
  5975. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  5976. "summary": "Summarize session",
  5977. "requestBody": {
  5978. "content": {
  5979. "application/json": {
  5980. "schema": {
  5981. "type": "object",
  5982. "properties": {
  5983. "providerID": {
  5984. "type": "string"
  5985. },
  5986. "modelID": {
  5987. "type": "string"
  5988. },
  5989. "auto": {
  5990. "type": "boolean"
  5991. }
  5992. },
  5993. "required": ["providerID", "modelID"],
  5994. "additionalProperties": false
  5995. }
  5996. }
  5997. }
  5998. },
  5999. "x-codeSamples": [
  6000. {
  6001. "lang": "js",
  6002. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6003. }
  6004. ]
  6005. }
  6006. },
  6007. "/session/{sessionID}/prompt_async": {
  6008. "post": {
  6009. "tags": ["session"],
  6010. "operationId": "session.prompt_async",
  6011. "parameters": [
  6012. {
  6013. "name": "sessionID",
  6014. "in": "path",
  6015. "schema": {
  6016. "type": "string",
  6017. "pattern": "^ses"
  6018. },
  6019. "required": true
  6020. },
  6021. {
  6022. "name": "directory",
  6023. "in": "query",
  6024. "schema": {
  6025. "type": "string"
  6026. },
  6027. "required": false
  6028. },
  6029. {
  6030. "name": "workspace",
  6031. "in": "query",
  6032. "schema": {
  6033. "type": "string"
  6034. },
  6035. "required": false
  6036. }
  6037. ],
  6038. "responses": {
  6039. "204": {
  6040. "description": "Prompt accepted"
  6041. },
  6042. "400": {
  6043. "description": "Bad request",
  6044. "content": {
  6045. "application/json": {
  6046. "schema": {
  6047. "$ref": "#/components/schemas/BadRequestError"
  6048. }
  6049. }
  6050. }
  6051. },
  6052. "404": {
  6053. "description": "Not found",
  6054. "content": {
  6055. "application/json": {
  6056. "schema": {
  6057. "$ref": "#/components/schemas/NotFoundError"
  6058. }
  6059. }
  6060. }
  6061. }
  6062. },
  6063. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6064. "summary": "Send async message",
  6065. "requestBody": {
  6066. "content": {
  6067. "application/json": {
  6068. "schema": {
  6069. "type": "object",
  6070. "properties": {
  6071. "messageID": {
  6072. "type": "string",
  6073. "pattern": "^msg"
  6074. },
  6075. "model": {
  6076. "type": "object",
  6077. "properties": {
  6078. "providerID": {
  6079. "type": "string"
  6080. },
  6081. "modelID": {
  6082. "type": "string"
  6083. }
  6084. },
  6085. "required": ["providerID", "modelID"],
  6086. "additionalProperties": false
  6087. },
  6088. "agent": {
  6089. "type": "string"
  6090. },
  6091. "noReply": {
  6092. "type": "boolean"
  6093. },
  6094. "tools": {
  6095. "type": "object",
  6096. "additionalProperties": {
  6097. "type": "boolean"
  6098. }
  6099. },
  6100. "format": {
  6101. "$ref": "#/components/schemas/OutputFormat"
  6102. },
  6103. "system": {
  6104. "type": "string"
  6105. },
  6106. "variant": {
  6107. "type": "string"
  6108. },
  6109. "parts": {
  6110. "type": "array",
  6111. "items": {
  6112. "anyOf": [
  6113. {
  6114. "$ref": "#/components/schemas/TextPartInput"
  6115. },
  6116. {
  6117. "$ref": "#/components/schemas/FilePartInput"
  6118. },
  6119. {
  6120. "$ref": "#/components/schemas/AgentPartInput"
  6121. },
  6122. {
  6123. "$ref": "#/components/schemas/SubtaskPartInput"
  6124. }
  6125. ]
  6126. }
  6127. }
  6128. },
  6129. "required": ["parts"],
  6130. "additionalProperties": false
  6131. }
  6132. }
  6133. }
  6134. },
  6135. "x-codeSamples": [
  6136. {
  6137. "lang": "js",
  6138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6139. }
  6140. ]
  6141. }
  6142. },
  6143. "/session/{sessionID}/command": {
  6144. "post": {
  6145. "tags": ["session"],
  6146. "operationId": "session.command",
  6147. "parameters": [
  6148. {
  6149. "name": "sessionID",
  6150. "in": "path",
  6151. "schema": {
  6152. "type": "string",
  6153. "pattern": "^ses"
  6154. },
  6155. "required": true
  6156. },
  6157. {
  6158. "name": "directory",
  6159. "in": "query",
  6160. "schema": {
  6161. "type": "string"
  6162. },
  6163. "required": false
  6164. },
  6165. {
  6166. "name": "workspace",
  6167. "in": "query",
  6168. "schema": {
  6169. "type": "string"
  6170. },
  6171. "required": false
  6172. }
  6173. ],
  6174. "responses": {
  6175. "200": {
  6176. "description": "Created message",
  6177. "content": {
  6178. "application/json": {
  6179. "schema": {
  6180. "type": "object",
  6181. "required": ["info", "parts"],
  6182. "properties": {
  6183. "info": {
  6184. "$ref": "#/components/schemas/AssistantMessage"
  6185. },
  6186. "parts": {
  6187. "type": "array",
  6188. "items": {
  6189. "$ref": "#/components/schemas/Part"
  6190. }
  6191. }
  6192. }
  6193. }
  6194. }
  6195. }
  6196. },
  6197. "400": {
  6198. "description": "Bad request",
  6199. "content": {
  6200. "application/json": {
  6201. "schema": {
  6202. "$ref": "#/components/schemas/BadRequestError"
  6203. }
  6204. }
  6205. }
  6206. },
  6207. "404": {
  6208. "description": "Not found",
  6209. "content": {
  6210. "application/json": {
  6211. "schema": {
  6212. "$ref": "#/components/schemas/NotFoundError"
  6213. }
  6214. }
  6215. }
  6216. }
  6217. },
  6218. "description": "Send a new command to a session for execution by the AI assistant.",
  6219. "summary": "Send command",
  6220. "requestBody": {
  6221. "content": {
  6222. "application/json": {
  6223. "schema": {
  6224. "type": "object",
  6225. "properties": {
  6226. "messageID": {
  6227. "type": "string",
  6228. "pattern": "^msg"
  6229. },
  6230. "agent": {
  6231. "type": "string"
  6232. },
  6233. "model": {
  6234. "type": "string"
  6235. },
  6236. "arguments": {
  6237. "type": "string"
  6238. },
  6239. "command": {
  6240. "type": "string"
  6241. },
  6242. "variant": {
  6243. "type": "string"
  6244. },
  6245. "parts": {
  6246. "type": "array",
  6247. "items": {
  6248. "type": "object",
  6249. "properties": {
  6250. "id": {
  6251. "type": "string",
  6252. "pattern": "^prt"
  6253. },
  6254. "type": {
  6255. "type": "string",
  6256. "enum": ["file"]
  6257. },
  6258. "mime": {
  6259. "type": "string"
  6260. },
  6261. "filename": {
  6262. "type": "string"
  6263. },
  6264. "url": {
  6265. "type": "string"
  6266. },
  6267. "source": {
  6268. "$ref": "#/components/schemas/FilePartSource"
  6269. }
  6270. },
  6271. "required": ["type", "mime", "url"],
  6272. "additionalProperties": false
  6273. }
  6274. }
  6275. },
  6276. "required": ["arguments", "command"],
  6277. "additionalProperties": false
  6278. }
  6279. }
  6280. }
  6281. },
  6282. "x-codeSamples": [
  6283. {
  6284. "lang": "js",
  6285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  6286. }
  6287. ]
  6288. }
  6289. },
  6290. "/session/{sessionID}/shell": {
  6291. "post": {
  6292. "tags": ["session"],
  6293. "operationId": "session.shell",
  6294. "parameters": [
  6295. {
  6296. "name": "sessionID",
  6297. "in": "path",
  6298. "schema": {
  6299. "type": "string",
  6300. "pattern": "^ses"
  6301. },
  6302. "required": true
  6303. },
  6304. {
  6305. "name": "directory",
  6306. "in": "query",
  6307. "schema": {
  6308. "type": "string"
  6309. },
  6310. "required": false
  6311. },
  6312. {
  6313. "name": "workspace",
  6314. "in": "query",
  6315. "schema": {
  6316. "type": "string"
  6317. },
  6318. "required": false
  6319. }
  6320. ],
  6321. "responses": {
  6322. "200": {
  6323. "description": "Created message",
  6324. "content": {
  6325. "application/json": {
  6326. "schema": {
  6327. "type": "object",
  6328. "properties": {
  6329. "info": {
  6330. "$ref": "#/components/schemas/Message"
  6331. },
  6332. "parts": {
  6333. "type": "array",
  6334. "items": {
  6335. "$ref": "#/components/schemas/Part"
  6336. }
  6337. }
  6338. },
  6339. "required": ["info", "parts"],
  6340. "additionalProperties": false,
  6341. "description": "Created message"
  6342. }
  6343. }
  6344. }
  6345. },
  6346. "400": {
  6347. "description": "Bad request",
  6348. "content": {
  6349. "application/json": {
  6350. "schema": {
  6351. "$ref": "#/components/schemas/BadRequestError"
  6352. }
  6353. }
  6354. }
  6355. },
  6356. "404": {
  6357. "description": "Not found",
  6358. "content": {
  6359. "application/json": {
  6360. "schema": {
  6361. "$ref": "#/components/schemas/NotFoundError"
  6362. }
  6363. }
  6364. }
  6365. }
  6366. },
  6367. "description": "Execute a shell command within the session context and return the AI's response.",
  6368. "summary": "Run shell command",
  6369. "requestBody": {
  6370. "content": {
  6371. "application/json": {
  6372. "schema": {
  6373. "type": "object",
  6374. "properties": {
  6375. "messageID": {
  6376. "type": "string",
  6377. "pattern": "^msg"
  6378. },
  6379. "agent": {
  6380. "type": "string"
  6381. },
  6382. "model": {
  6383. "type": "object",
  6384. "properties": {
  6385. "providerID": {
  6386. "type": "string"
  6387. },
  6388. "modelID": {
  6389. "type": "string"
  6390. }
  6391. },
  6392. "required": ["providerID", "modelID"],
  6393. "additionalProperties": false
  6394. },
  6395. "command": {
  6396. "type": "string"
  6397. }
  6398. },
  6399. "required": ["agent", "command"],
  6400. "additionalProperties": false
  6401. }
  6402. }
  6403. }
  6404. },
  6405. "x-codeSamples": [
  6406. {
  6407. "lang": "js",
  6408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  6409. }
  6410. ]
  6411. }
  6412. },
  6413. "/session/{sessionID}/revert": {
  6414. "post": {
  6415. "tags": ["session"],
  6416. "operationId": "session.revert",
  6417. "parameters": [
  6418. {
  6419. "name": "sessionID",
  6420. "in": "path",
  6421. "schema": {
  6422. "type": "string",
  6423. "pattern": "^ses"
  6424. },
  6425. "required": true
  6426. },
  6427. {
  6428. "name": "directory",
  6429. "in": "query",
  6430. "schema": {
  6431. "type": "string"
  6432. },
  6433. "required": false
  6434. },
  6435. {
  6436. "name": "workspace",
  6437. "in": "query",
  6438. "schema": {
  6439. "type": "string"
  6440. },
  6441. "required": false
  6442. }
  6443. ],
  6444. "responses": {
  6445. "200": {
  6446. "description": "Updated session",
  6447. "content": {
  6448. "application/json": {
  6449. "schema": {
  6450. "$ref": "#/components/schemas/Session"
  6451. }
  6452. }
  6453. }
  6454. },
  6455. "400": {
  6456. "description": "Bad request",
  6457. "content": {
  6458. "application/json": {
  6459. "schema": {
  6460. "$ref": "#/components/schemas/BadRequestError"
  6461. }
  6462. }
  6463. }
  6464. },
  6465. "404": {
  6466. "description": "Not found",
  6467. "content": {
  6468. "application/json": {
  6469. "schema": {
  6470. "$ref": "#/components/schemas/NotFoundError"
  6471. }
  6472. }
  6473. }
  6474. }
  6475. },
  6476. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  6477. "summary": "Revert message",
  6478. "requestBody": {
  6479. "content": {
  6480. "application/json": {
  6481. "schema": {
  6482. "type": "object",
  6483. "properties": {
  6484. "messageID": {
  6485. "type": "string",
  6486. "pattern": "^msg"
  6487. },
  6488. "partID": {
  6489. "type": "string",
  6490. "pattern": "^prt"
  6491. }
  6492. },
  6493. "required": ["messageID"],
  6494. "additionalProperties": false
  6495. }
  6496. }
  6497. }
  6498. },
  6499. "x-codeSamples": [
  6500. {
  6501. "lang": "js",
  6502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  6503. }
  6504. ]
  6505. }
  6506. },
  6507. "/session/{sessionID}/unrevert": {
  6508. "post": {
  6509. "tags": ["session"],
  6510. "operationId": "session.unrevert",
  6511. "parameters": [
  6512. {
  6513. "name": "sessionID",
  6514. "in": "path",
  6515. "schema": {
  6516. "type": "string",
  6517. "pattern": "^ses"
  6518. },
  6519. "required": true
  6520. },
  6521. {
  6522. "name": "directory",
  6523. "in": "query",
  6524. "schema": {
  6525. "type": "string"
  6526. },
  6527. "required": false
  6528. },
  6529. {
  6530. "name": "workspace",
  6531. "in": "query",
  6532. "schema": {
  6533. "type": "string"
  6534. },
  6535. "required": false
  6536. }
  6537. ],
  6538. "responses": {
  6539. "200": {
  6540. "description": "Updated session",
  6541. "content": {
  6542. "application/json": {
  6543. "schema": {
  6544. "$ref": "#/components/schemas/Session"
  6545. }
  6546. }
  6547. }
  6548. },
  6549. "400": {
  6550. "description": "Bad request",
  6551. "content": {
  6552. "application/json": {
  6553. "schema": {
  6554. "$ref": "#/components/schemas/BadRequestError"
  6555. }
  6556. }
  6557. }
  6558. },
  6559. "404": {
  6560. "description": "Not found",
  6561. "content": {
  6562. "application/json": {
  6563. "schema": {
  6564. "$ref": "#/components/schemas/NotFoundError"
  6565. }
  6566. }
  6567. }
  6568. }
  6569. },
  6570. "description": "Restore all previously reverted messages in a session.",
  6571. "summary": "Restore reverted messages",
  6572. "x-codeSamples": [
  6573. {
  6574. "lang": "js",
  6575. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  6576. }
  6577. ]
  6578. }
  6579. },
  6580. "/session/{sessionID}/permissions/{permissionID}": {
  6581. "post": {
  6582. "tags": ["session"],
  6583. "operationId": "permission.respond",
  6584. "parameters": [
  6585. {
  6586. "name": "sessionID",
  6587. "in": "path",
  6588. "schema": {
  6589. "type": "string",
  6590. "pattern": "^ses"
  6591. },
  6592. "required": true
  6593. },
  6594. {
  6595. "name": "permissionID",
  6596. "in": "path",
  6597. "schema": {
  6598. "type": "string",
  6599. "pattern": "^per"
  6600. },
  6601. "required": true
  6602. },
  6603. {
  6604. "name": "directory",
  6605. "in": "query",
  6606. "schema": {
  6607. "type": "string"
  6608. },
  6609. "required": false
  6610. },
  6611. {
  6612. "name": "workspace",
  6613. "in": "query",
  6614. "schema": {
  6615. "type": "string"
  6616. },
  6617. "required": false
  6618. }
  6619. ],
  6620. "responses": {
  6621. "200": {
  6622. "description": "Permission processed successfully",
  6623. "content": {
  6624. "application/json": {
  6625. "schema": {
  6626. "type": "boolean",
  6627. "description": "Permission processed successfully"
  6628. }
  6629. }
  6630. }
  6631. },
  6632. "400": {
  6633. "description": "Bad request",
  6634. "content": {
  6635. "application/json": {
  6636. "schema": {
  6637. "$ref": "#/components/schemas/BadRequestError"
  6638. }
  6639. }
  6640. }
  6641. },
  6642. "404": {
  6643. "description": "Not found",
  6644. "content": {
  6645. "application/json": {
  6646. "schema": {
  6647. "$ref": "#/components/schemas/NotFoundError"
  6648. }
  6649. }
  6650. }
  6651. }
  6652. },
  6653. "description": "Approve or deny a permission request from the AI assistant.",
  6654. "summary": "Respond to permission",
  6655. "deprecated": true,
  6656. "requestBody": {
  6657. "content": {
  6658. "application/json": {
  6659. "schema": {
  6660. "type": "object",
  6661. "properties": {
  6662. "response": {
  6663. "type": "string",
  6664. "enum": ["once", "always", "reject"]
  6665. }
  6666. },
  6667. "required": ["response"],
  6668. "additionalProperties": false
  6669. }
  6670. }
  6671. }
  6672. },
  6673. "x-codeSamples": [
  6674. {
  6675. "lang": "js",
  6676. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  6677. }
  6678. ]
  6679. }
  6680. },
  6681. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  6682. "delete": {
  6683. "tags": ["session"],
  6684. "operationId": "part.delete",
  6685. "parameters": [
  6686. {
  6687. "name": "sessionID",
  6688. "in": "path",
  6689. "schema": {
  6690. "type": "string",
  6691. "pattern": "^ses"
  6692. },
  6693. "required": true
  6694. },
  6695. {
  6696. "name": "messageID",
  6697. "in": "path",
  6698. "schema": {
  6699. "type": "string",
  6700. "pattern": "^msg"
  6701. },
  6702. "required": true
  6703. },
  6704. {
  6705. "name": "partID",
  6706. "in": "path",
  6707. "schema": {
  6708. "type": "string",
  6709. "pattern": "^prt"
  6710. },
  6711. "required": true
  6712. },
  6713. {
  6714. "name": "directory",
  6715. "in": "query",
  6716. "schema": {
  6717. "type": "string"
  6718. },
  6719. "required": false
  6720. },
  6721. {
  6722. "name": "workspace",
  6723. "in": "query",
  6724. "schema": {
  6725. "type": "string"
  6726. },
  6727. "required": false
  6728. }
  6729. ],
  6730. "responses": {
  6731. "200": {
  6732. "description": "Successfully deleted part",
  6733. "content": {
  6734. "application/json": {
  6735. "schema": {
  6736. "type": "boolean",
  6737. "description": "Successfully deleted part"
  6738. }
  6739. }
  6740. }
  6741. },
  6742. "400": {
  6743. "description": "Bad request",
  6744. "content": {
  6745. "application/json": {
  6746. "schema": {
  6747. "$ref": "#/components/schemas/BadRequestError"
  6748. }
  6749. }
  6750. }
  6751. },
  6752. "404": {
  6753. "description": "Not found",
  6754. "content": {
  6755. "application/json": {
  6756. "schema": {
  6757. "$ref": "#/components/schemas/NotFoundError"
  6758. }
  6759. }
  6760. }
  6761. }
  6762. },
  6763. "description": "Delete a part from a message.",
  6764. "x-codeSamples": [
  6765. {
  6766. "lang": "js",
  6767. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  6768. }
  6769. ]
  6770. },
  6771. "patch": {
  6772. "tags": ["session"],
  6773. "operationId": "part.update",
  6774. "parameters": [
  6775. {
  6776. "name": "sessionID",
  6777. "in": "path",
  6778. "schema": {
  6779. "type": "string",
  6780. "pattern": "^ses"
  6781. },
  6782. "required": true
  6783. },
  6784. {
  6785. "name": "messageID",
  6786. "in": "path",
  6787. "schema": {
  6788. "type": "string",
  6789. "pattern": "^msg"
  6790. },
  6791. "required": true
  6792. },
  6793. {
  6794. "name": "partID",
  6795. "in": "path",
  6796. "schema": {
  6797. "type": "string",
  6798. "pattern": "^prt"
  6799. },
  6800. "required": true
  6801. },
  6802. {
  6803. "name": "directory",
  6804. "in": "query",
  6805. "schema": {
  6806. "type": "string"
  6807. },
  6808. "required": false
  6809. },
  6810. {
  6811. "name": "workspace",
  6812. "in": "query",
  6813. "schema": {
  6814. "type": "string"
  6815. },
  6816. "required": false
  6817. }
  6818. ],
  6819. "responses": {
  6820. "200": {
  6821. "description": "Successfully updated part",
  6822. "content": {
  6823. "application/json": {
  6824. "schema": {
  6825. "$ref": "#/components/schemas/Part"
  6826. }
  6827. }
  6828. }
  6829. },
  6830. "400": {
  6831. "description": "Bad request",
  6832. "content": {
  6833. "application/json": {
  6834. "schema": {
  6835. "$ref": "#/components/schemas/BadRequestError"
  6836. }
  6837. }
  6838. }
  6839. },
  6840. "404": {
  6841. "description": "Not found",
  6842. "content": {
  6843. "application/json": {
  6844. "schema": {
  6845. "$ref": "#/components/schemas/NotFoundError"
  6846. }
  6847. }
  6848. }
  6849. }
  6850. },
  6851. "description": "Update a part in a message.",
  6852. "requestBody": {
  6853. "content": {
  6854. "application/json": {
  6855. "schema": {
  6856. "$ref": "#/components/schemas/Part"
  6857. }
  6858. }
  6859. }
  6860. },
  6861. "x-codeSamples": [
  6862. {
  6863. "lang": "js",
  6864. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  6865. }
  6866. ]
  6867. }
  6868. },
  6869. "/sync/start": {
  6870. "post": {
  6871. "tags": ["sync"],
  6872. "operationId": "sync.start",
  6873. "parameters": [
  6874. {
  6875. "name": "directory",
  6876. "in": "query",
  6877. "schema": {
  6878. "type": "string"
  6879. },
  6880. "required": false
  6881. },
  6882. {
  6883. "name": "workspace",
  6884. "in": "query",
  6885. "schema": {
  6886. "type": "string"
  6887. },
  6888. "required": false
  6889. }
  6890. ],
  6891. "responses": {
  6892. "200": {
  6893. "description": "Workspace sync started",
  6894. "content": {
  6895. "application/json": {
  6896. "schema": {
  6897. "type": "boolean",
  6898. "description": "Workspace sync started"
  6899. }
  6900. }
  6901. }
  6902. }
  6903. },
  6904. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  6905. "summary": "Start workspace sync",
  6906. "x-codeSamples": [
  6907. {
  6908. "lang": "js",
  6909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  6910. }
  6911. ]
  6912. }
  6913. },
  6914. "/sync/replay": {
  6915. "post": {
  6916. "tags": ["sync"],
  6917. "operationId": "sync.replay",
  6918. "parameters": [
  6919. {
  6920. "name": "directory",
  6921. "in": "query",
  6922. "schema": {
  6923. "type": "string"
  6924. },
  6925. "required": false
  6926. },
  6927. {
  6928. "name": "workspace",
  6929. "in": "query",
  6930. "schema": {
  6931. "type": "string"
  6932. },
  6933. "required": false
  6934. }
  6935. ],
  6936. "responses": {
  6937. "200": {
  6938. "description": "Replayed sync events",
  6939. "content": {
  6940. "application/json": {
  6941. "schema": {
  6942. "type": "object",
  6943. "properties": {
  6944. "sessionID": {
  6945. "type": "string"
  6946. }
  6947. },
  6948. "required": ["sessionID"],
  6949. "additionalProperties": false,
  6950. "description": "Replayed sync events"
  6951. }
  6952. }
  6953. }
  6954. },
  6955. "400": {
  6956. "description": "Bad request",
  6957. "content": {
  6958. "application/json": {
  6959. "schema": {
  6960. "$ref": "#/components/schemas/BadRequestError"
  6961. }
  6962. }
  6963. }
  6964. }
  6965. },
  6966. "description": "Validate and replay a complete sync event history.",
  6967. "summary": "Replay sync events",
  6968. "requestBody": {
  6969. "content": {
  6970. "application/json": {
  6971. "schema": {
  6972. "type": "object",
  6973. "properties": {
  6974. "directory": {
  6975. "type": "string"
  6976. },
  6977. "events": {
  6978. "type": "array",
  6979. "minItems": 1,
  6980. "items": {
  6981. "type": "object",
  6982. "properties": {
  6983. "id": {
  6984. "type": "string"
  6985. },
  6986. "aggregateID": {
  6987. "type": "string"
  6988. },
  6989. "seq": {
  6990. "type": "integer",
  6991. "minimum": 0
  6992. },
  6993. "type": {
  6994. "type": "string"
  6995. },
  6996. "data": {
  6997. "type": "object"
  6998. }
  6999. },
  7000. "required": ["id", "aggregateID", "seq", "type", "data"],
  7001. "additionalProperties": false
  7002. }
  7003. }
  7004. },
  7005. "required": ["directory", "events"],
  7006. "additionalProperties": false
  7007. }
  7008. }
  7009. }
  7010. },
  7011. "x-codeSamples": [
  7012. {
  7013. "lang": "js",
  7014. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7015. }
  7016. ]
  7017. }
  7018. },
  7019. "/sync/steal": {
  7020. "post": {
  7021. "tags": ["sync"],
  7022. "operationId": "sync.steal",
  7023. "parameters": [
  7024. {
  7025. "name": "directory",
  7026. "in": "query",
  7027. "schema": {
  7028. "type": "string"
  7029. },
  7030. "required": false
  7031. },
  7032. {
  7033. "name": "workspace",
  7034. "in": "query",
  7035. "schema": {
  7036. "type": "string"
  7037. },
  7038. "required": false
  7039. }
  7040. ],
  7041. "responses": {
  7042. "200": {
  7043. "description": "Session stolen into workspace",
  7044. "content": {
  7045. "application/json": {
  7046. "schema": {
  7047. "type": "object",
  7048. "properties": {
  7049. "sessionID": {
  7050. "type": "string",
  7051. "pattern": "^ses"
  7052. }
  7053. },
  7054. "required": ["sessionID"],
  7055. "additionalProperties": false,
  7056. "description": "Session stolen into workspace"
  7057. }
  7058. }
  7059. }
  7060. },
  7061. "400": {
  7062. "description": "Bad request",
  7063. "content": {
  7064. "application/json": {
  7065. "schema": {
  7066. "$ref": "#/components/schemas/BadRequestError"
  7067. }
  7068. }
  7069. }
  7070. }
  7071. },
  7072. "description": "Update a session to belong to the current workspace through the sync event system.",
  7073. "summary": "Steal session into workspace",
  7074. "requestBody": {
  7075. "content": {
  7076. "application/json": {
  7077. "schema": {
  7078. "type": "object",
  7079. "properties": {
  7080. "sessionID": {
  7081. "type": "string",
  7082. "pattern": "^ses"
  7083. }
  7084. },
  7085. "required": ["sessionID"],
  7086. "additionalProperties": false
  7087. }
  7088. }
  7089. }
  7090. },
  7091. "x-codeSamples": [
  7092. {
  7093. "lang": "js",
  7094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7095. }
  7096. ]
  7097. }
  7098. },
  7099. "/sync/history": {
  7100. "post": {
  7101. "tags": ["sync"],
  7102. "operationId": "sync.history.list",
  7103. "parameters": [
  7104. {
  7105. "name": "directory",
  7106. "in": "query",
  7107. "schema": {
  7108. "type": "string"
  7109. },
  7110. "required": false
  7111. },
  7112. {
  7113. "name": "workspace",
  7114. "in": "query",
  7115. "schema": {
  7116. "type": "string"
  7117. },
  7118. "required": false
  7119. }
  7120. ],
  7121. "responses": {
  7122. "200": {
  7123. "description": "Sync events",
  7124. "content": {
  7125. "application/json": {
  7126. "schema": {
  7127. "type": "array",
  7128. "items": {
  7129. "type": "object",
  7130. "properties": {
  7131. "id": {
  7132. "type": "string"
  7133. },
  7134. "aggregate_id": {
  7135. "type": "string"
  7136. },
  7137. "seq": {
  7138. "type": "integer",
  7139. "minimum": 0
  7140. },
  7141. "type": {
  7142. "type": "string"
  7143. },
  7144. "data": {
  7145. "type": "object"
  7146. }
  7147. },
  7148. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7149. "additionalProperties": false
  7150. },
  7151. "description": "Sync events"
  7152. }
  7153. }
  7154. }
  7155. },
  7156. "400": {
  7157. "description": "Bad request",
  7158. "content": {
  7159. "application/json": {
  7160. "schema": {
  7161. "$ref": "#/components/schemas/BadRequestError"
  7162. }
  7163. }
  7164. }
  7165. }
  7166. },
  7167. "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.",
  7168. "summary": "List sync events",
  7169. "requestBody": {
  7170. "content": {
  7171. "application/json": {
  7172. "schema": {
  7173. "type": "object",
  7174. "additionalProperties": {
  7175. "type": "integer",
  7176. "minimum": 0
  7177. }
  7178. }
  7179. }
  7180. }
  7181. },
  7182. "x-codeSamples": [
  7183. {
  7184. "lang": "js",
  7185. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  7186. }
  7187. ]
  7188. }
  7189. },
  7190. "/api/session": {
  7191. "get": {
  7192. "tags": ["v2"],
  7193. "operationId": "v2.session.list",
  7194. "parameters": [
  7195. {
  7196. "name": "directory",
  7197. "in": "query",
  7198. "schema": {
  7199. "type": "string"
  7200. },
  7201. "required": false
  7202. },
  7203. {
  7204. "name": "workspace",
  7205. "in": "query",
  7206. "schema": {
  7207. "type": "string"
  7208. },
  7209. "required": false
  7210. },
  7211. {
  7212. "name": "limit",
  7213. "in": "query",
  7214. "schema": {
  7215. "type": "number"
  7216. },
  7217. "required": false
  7218. },
  7219. {
  7220. "name": "order",
  7221. "in": "query",
  7222. "schema": {
  7223. "type": "string",
  7224. "enum": ["asc", "desc"]
  7225. },
  7226. "required": false
  7227. },
  7228. {
  7229. "name": "path",
  7230. "in": "query",
  7231. "schema": {
  7232. "type": "string"
  7233. },
  7234. "required": false
  7235. },
  7236. {
  7237. "name": "roots",
  7238. "in": "query",
  7239. "schema": {
  7240. "anyOf": [
  7241. {
  7242. "type": "boolean"
  7243. },
  7244. {
  7245. "type": "string",
  7246. "enum": ["true", "false"]
  7247. }
  7248. ]
  7249. },
  7250. "required": false
  7251. },
  7252. {
  7253. "name": "start",
  7254. "in": "query",
  7255. "schema": {
  7256. "type": "number"
  7257. },
  7258. "required": false
  7259. },
  7260. {
  7261. "name": "search",
  7262. "in": "query",
  7263. "schema": {
  7264. "type": "string"
  7265. },
  7266. "required": false
  7267. },
  7268. {
  7269. "name": "cursor",
  7270. "in": "query",
  7271. "schema": {
  7272. "type": "string",
  7273. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  7274. },
  7275. "required": false
  7276. }
  7277. ],
  7278. "responses": {
  7279. "200": {
  7280. "description": "V2SessionsResponse",
  7281. "content": {
  7282. "application/json": {
  7283. "schema": {
  7284. "$ref": "#/components/schemas/V2SessionsResponse"
  7285. }
  7286. }
  7287. }
  7288. },
  7289. "400": {
  7290. "description": "Bad request",
  7291. "content": {
  7292. "application/json": {
  7293. "schema": {
  7294. "$ref": "#/components/schemas/BadRequestError"
  7295. }
  7296. }
  7297. }
  7298. }
  7299. },
  7300. "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.",
  7301. "summary": "List v2 sessions",
  7302. "x-codeSamples": [
  7303. {
  7304. "lang": "js",
  7305. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  7306. }
  7307. ]
  7308. }
  7309. },
  7310. "/api/session/{sessionID}/prompt": {
  7311. "post": {
  7312. "tags": ["v2"],
  7313. "operationId": "v2.session.prompt",
  7314. "parameters": [
  7315. {
  7316. "name": "sessionID",
  7317. "in": "path",
  7318. "schema": {
  7319. "type": "string",
  7320. "pattern": "^ses"
  7321. },
  7322. "required": true
  7323. },
  7324. {
  7325. "name": "directory",
  7326. "in": "query",
  7327. "schema": {
  7328. "type": "string"
  7329. },
  7330. "required": false
  7331. },
  7332. {
  7333. "name": "workspace",
  7334. "in": "query",
  7335. "schema": {
  7336. "type": "string"
  7337. },
  7338. "required": false
  7339. }
  7340. ],
  7341. "responses": {
  7342. "200": {
  7343. "description": "Session.Message",
  7344. "content": {
  7345. "application/json": {
  7346. "schema": {
  7347. "$ref": "#/components/schemas/SessionMessage"
  7348. }
  7349. }
  7350. }
  7351. }
  7352. },
  7353. "description": "Create a v2 session message and queue it for the agent loop.",
  7354. "summary": "Send v2 message",
  7355. "requestBody": {
  7356. "content": {
  7357. "application/json": {
  7358. "schema": {
  7359. "type": "object",
  7360. "properties": {
  7361. "prompt": {
  7362. "$ref": "#/components/schemas/Prompt"
  7363. },
  7364. "delivery": {
  7365. "$ref": "#/components/schemas/SessionDelivery"
  7366. }
  7367. },
  7368. "required": ["prompt"],
  7369. "additionalProperties": false
  7370. }
  7371. }
  7372. }
  7373. },
  7374. "x-codeSamples": [
  7375. {
  7376. "lang": "js",
  7377. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  7378. }
  7379. ]
  7380. }
  7381. },
  7382. "/api/session/{sessionID}/compact": {
  7383. "post": {
  7384. "tags": ["v2"],
  7385. "operationId": "v2.session.compact",
  7386. "parameters": [
  7387. {
  7388. "name": "sessionID",
  7389. "in": "path",
  7390. "schema": {
  7391. "type": "string",
  7392. "pattern": "^ses"
  7393. },
  7394. "required": true
  7395. },
  7396. {
  7397. "name": "directory",
  7398. "in": "query",
  7399. "schema": {
  7400. "type": "string"
  7401. },
  7402. "required": false
  7403. },
  7404. {
  7405. "name": "workspace",
  7406. "in": "query",
  7407. "schema": {
  7408. "type": "string"
  7409. },
  7410. "required": false
  7411. }
  7412. ],
  7413. "responses": {
  7414. "204": {
  7415. "description": "<No Content>"
  7416. }
  7417. },
  7418. "description": "Compact a v2 session conversation.",
  7419. "summary": "Compact v2 session",
  7420. "x-codeSamples": [
  7421. {
  7422. "lang": "js",
  7423. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  7424. }
  7425. ]
  7426. }
  7427. },
  7428. "/api/session/{sessionID}/wait": {
  7429. "post": {
  7430. "tags": ["v2"],
  7431. "operationId": "v2.session.wait",
  7432. "parameters": [
  7433. {
  7434. "name": "sessionID",
  7435. "in": "path",
  7436. "schema": {
  7437. "type": "string",
  7438. "pattern": "^ses"
  7439. },
  7440. "required": true
  7441. },
  7442. {
  7443. "name": "directory",
  7444. "in": "query",
  7445. "schema": {
  7446. "type": "string"
  7447. },
  7448. "required": false
  7449. },
  7450. {
  7451. "name": "workspace",
  7452. "in": "query",
  7453. "schema": {
  7454. "type": "string"
  7455. },
  7456. "required": false
  7457. }
  7458. ],
  7459. "responses": {
  7460. "204": {
  7461. "description": "<No Content>"
  7462. }
  7463. },
  7464. "description": "Wait for a v2 session agent loop to become idle.",
  7465. "summary": "Wait for v2 session",
  7466. "x-codeSamples": [
  7467. {
  7468. "lang": "js",
  7469. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  7470. }
  7471. ]
  7472. }
  7473. },
  7474. "/api/session/{sessionID}/context": {
  7475. "get": {
  7476. "tags": ["v2"],
  7477. "operationId": "v2.session.context",
  7478. "parameters": [
  7479. {
  7480. "name": "sessionID",
  7481. "in": "path",
  7482. "schema": {
  7483. "type": "string",
  7484. "pattern": "^ses"
  7485. },
  7486. "required": true
  7487. },
  7488. {
  7489. "name": "directory",
  7490. "in": "query",
  7491. "schema": {
  7492. "type": "string"
  7493. },
  7494. "required": false
  7495. },
  7496. {
  7497. "name": "workspace",
  7498. "in": "query",
  7499. "schema": {
  7500. "type": "string"
  7501. },
  7502. "required": false
  7503. }
  7504. ],
  7505. "responses": {
  7506. "200": {
  7507. "description": "Success",
  7508. "content": {
  7509. "application/json": {
  7510. "schema": {
  7511. "type": "array",
  7512. "items": {
  7513. "$ref": "#/components/schemas/SessionMessage"
  7514. }
  7515. }
  7516. }
  7517. }
  7518. }
  7519. },
  7520. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  7521. "summary": "Get v2 session context",
  7522. "x-codeSamples": [
  7523. {
  7524. "lang": "js",
  7525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  7526. }
  7527. ]
  7528. }
  7529. },
  7530. "/api/session/{sessionID}/message": {
  7531. "get": {
  7532. "tags": ["v2 messages"],
  7533. "operationId": "v2.session.messages",
  7534. "parameters": [
  7535. {
  7536. "name": "sessionID",
  7537. "in": "path",
  7538. "schema": {
  7539. "type": "string",
  7540. "pattern": "^ses"
  7541. },
  7542. "required": true
  7543. },
  7544. {
  7545. "name": "directory",
  7546. "in": "query",
  7547. "schema": {
  7548. "type": "string"
  7549. },
  7550. "required": false
  7551. },
  7552. {
  7553. "name": "workspace",
  7554. "in": "query",
  7555. "schema": {
  7556. "type": "string"
  7557. },
  7558. "required": false
  7559. },
  7560. {
  7561. "name": "limit",
  7562. "in": "query",
  7563. "schema": {
  7564. "type": "number"
  7565. },
  7566. "required": false
  7567. },
  7568. {
  7569. "name": "order",
  7570. "in": "query",
  7571. "schema": {
  7572. "type": "string",
  7573. "enum": ["asc", "desc"]
  7574. },
  7575. "required": false
  7576. },
  7577. {
  7578. "name": "cursor",
  7579. "in": "query",
  7580. "schema": {
  7581. "type": "string",
  7582. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  7583. },
  7584. "required": false
  7585. }
  7586. ],
  7587. "responses": {
  7588. "200": {
  7589. "description": "V2SessionMessagesResponse",
  7590. "content": {
  7591. "application/json": {
  7592. "schema": {
  7593. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  7594. }
  7595. }
  7596. }
  7597. },
  7598. "400": {
  7599. "description": "Bad request",
  7600. "content": {
  7601. "application/json": {
  7602. "schema": {
  7603. "$ref": "#/components/schemas/BadRequestError"
  7604. }
  7605. }
  7606. }
  7607. }
  7608. },
  7609. "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.",
  7610. "summary": "Get v2 session messages",
  7611. "x-codeSamples": [
  7612. {
  7613. "lang": "js",
  7614. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  7615. }
  7616. ]
  7617. }
  7618. },
  7619. "/tui/append-prompt": {
  7620. "post": {
  7621. "tags": ["tui"],
  7622. "operationId": "tui.appendPrompt",
  7623. "parameters": [
  7624. {
  7625. "name": "directory",
  7626. "in": "query",
  7627. "schema": {
  7628. "type": "string"
  7629. },
  7630. "required": false
  7631. },
  7632. {
  7633. "name": "workspace",
  7634. "in": "query",
  7635. "schema": {
  7636. "type": "string"
  7637. },
  7638. "required": false
  7639. }
  7640. ],
  7641. "responses": {
  7642. "200": {
  7643. "description": "Prompt processed successfully",
  7644. "content": {
  7645. "application/json": {
  7646. "schema": {
  7647. "type": "boolean",
  7648. "description": "Prompt processed successfully"
  7649. }
  7650. }
  7651. }
  7652. },
  7653. "400": {
  7654. "description": "Bad request",
  7655. "content": {
  7656. "application/json": {
  7657. "schema": {
  7658. "$ref": "#/components/schemas/BadRequestError"
  7659. }
  7660. }
  7661. }
  7662. }
  7663. },
  7664. "description": "Append prompt to the TUI.",
  7665. "summary": "Append TUI prompt",
  7666. "requestBody": {
  7667. "content": {
  7668. "application/json": {
  7669. "schema": {
  7670. "type": "object",
  7671. "properties": {
  7672. "text": {
  7673. "type": "string"
  7674. }
  7675. },
  7676. "required": ["text"],
  7677. "additionalProperties": false
  7678. }
  7679. }
  7680. }
  7681. },
  7682. "x-codeSamples": [
  7683. {
  7684. "lang": "js",
  7685. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  7686. }
  7687. ]
  7688. }
  7689. },
  7690. "/tui/open-help": {
  7691. "post": {
  7692. "tags": ["tui"],
  7693. "operationId": "tui.openHelp",
  7694. "parameters": [
  7695. {
  7696. "name": "directory",
  7697. "in": "query",
  7698. "schema": {
  7699. "type": "string"
  7700. },
  7701. "required": false
  7702. },
  7703. {
  7704. "name": "workspace",
  7705. "in": "query",
  7706. "schema": {
  7707. "type": "string"
  7708. },
  7709. "required": false
  7710. }
  7711. ],
  7712. "responses": {
  7713. "200": {
  7714. "description": "Help dialog opened successfully",
  7715. "content": {
  7716. "application/json": {
  7717. "schema": {
  7718. "type": "boolean",
  7719. "description": "Help dialog opened successfully"
  7720. }
  7721. }
  7722. }
  7723. }
  7724. },
  7725. "description": "Open the help dialog in the TUI to display user assistance information.",
  7726. "summary": "Open help dialog",
  7727. "x-codeSamples": [
  7728. {
  7729. "lang": "js",
  7730. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  7731. }
  7732. ]
  7733. }
  7734. },
  7735. "/tui/open-sessions": {
  7736. "post": {
  7737. "tags": ["tui"],
  7738. "operationId": "tui.openSessions",
  7739. "parameters": [
  7740. {
  7741. "name": "directory",
  7742. "in": "query",
  7743. "schema": {
  7744. "type": "string"
  7745. },
  7746. "required": false
  7747. },
  7748. {
  7749. "name": "workspace",
  7750. "in": "query",
  7751. "schema": {
  7752. "type": "string"
  7753. },
  7754. "required": false
  7755. }
  7756. ],
  7757. "responses": {
  7758. "200": {
  7759. "description": "Session dialog opened successfully",
  7760. "content": {
  7761. "application/json": {
  7762. "schema": {
  7763. "type": "boolean",
  7764. "description": "Session dialog opened successfully"
  7765. }
  7766. }
  7767. }
  7768. }
  7769. },
  7770. "description": "Open the session dialog.",
  7771. "summary": "Open sessions dialog",
  7772. "x-codeSamples": [
  7773. {
  7774. "lang": "js",
  7775. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  7776. }
  7777. ]
  7778. }
  7779. },
  7780. "/tui/open-themes": {
  7781. "post": {
  7782. "tags": ["tui"],
  7783. "operationId": "tui.openThemes",
  7784. "parameters": [
  7785. {
  7786. "name": "directory",
  7787. "in": "query",
  7788. "schema": {
  7789. "type": "string"
  7790. },
  7791. "required": false
  7792. },
  7793. {
  7794. "name": "workspace",
  7795. "in": "query",
  7796. "schema": {
  7797. "type": "string"
  7798. },
  7799. "required": false
  7800. }
  7801. ],
  7802. "responses": {
  7803. "200": {
  7804. "description": "Theme dialog opened successfully",
  7805. "content": {
  7806. "application/json": {
  7807. "schema": {
  7808. "type": "boolean",
  7809. "description": "Theme dialog opened successfully"
  7810. }
  7811. }
  7812. }
  7813. }
  7814. },
  7815. "description": "Open the theme dialog.",
  7816. "summary": "Open themes dialog",
  7817. "x-codeSamples": [
  7818. {
  7819. "lang": "js",
  7820. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  7821. }
  7822. ]
  7823. }
  7824. },
  7825. "/tui/open-models": {
  7826. "post": {
  7827. "tags": ["tui"],
  7828. "operationId": "tui.openModels",
  7829. "parameters": [
  7830. {
  7831. "name": "directory",
  7832. "in": "query",
  7833. "schema": {
  7834. "type": "string"
  7835. },
  7836. "required": false
  7837. },
  7838. {
  7839. "name": "workspace",
  7840. "in": "query",
  7841. "schema": {
  7842. "type": "string"
  7843. },
  7844. "required": false
  7845. }
  7846. ],
  7847. "responses": {
  7848. "200": {
  7849. "description": "Model dialog opened successfully",
  7850. "content": {
  7851. "application/json": {
  7852. "schema": {
  7853. "type": "boolean",
  7854. "description": "Model dialog opened successfully"
  7855. }
  7856. }
  7857. }
  7858. }
  7859. },
  7860. "description": "Open the model dialog.",
  7861. "summary": "Open models dialog",
  7862. "x-codeSamples": [
  7863. {
  7864. "lang": "js",
  7865. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  7866. }
  7867. ]
  7868. }
  7869. },
  7870. "/tui/submit-prompt": {
  7871. "post": {
  7872. "tags": ["tui"],
  7873. "operationId": "tui.submitPrompt",
  7874. "parameters": [
  7875. {
  7876. "name": "directory",
  7877. "in": "query",
  7878. "schema": {
  7879. "type": "string"
  7880. },
  7881. "required": false
  7882. },
  7883. {
  7884. "name": "workspace",
  7885. "in": "query",
  7886. "schema": {
  7887. "type": "string"
  7888. },
  7889. "required": false
  7890. }
  7891. ],
  7892. "responses": {
  7893. "200": {
  7894. "description": "Prompt submitted successfully",
  7895. "content": {
  7896. "application/json": {
  7897. "schema": {
  7898. "type": "boolean",
  7899. "description": "Prompt submitted successfully"
  7900. }
  7901. }
  7902. }
  7903. }
  7904. },
  7905. "description": "Submit the prompt.",
  7906. "summary": "Submit TUI prompt",
  7907. "x-codeSamples": [
  7908. {
  7909. "lang": "js",
  7910. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  7911. }
  7912. ]
  7913. }
  7914. },
  7915. "/tui/clear-prompt": {
  7916. "post": {
  7917. "tags": ["tui"],
  7918. "operationId": "tui.clearPrompt",
  7919. "parameters": [
  7920. {
  7921. "name": "directory",
  7922. "in": "query",
  7923. "schema": {
  7924. "type": "string"
  7925. },
  7926. "required": false
  7927. },
  7928. {
  7929. "name": "workspace",
  7930. "in": "query",
  7931. "schema": {
  7932. "type": "string"
  7933. },
  7934. "required": false
  7935. }
  7936. ],
  7937. "responses": {
  7938. "200": {
  7939. "description": "Prompt cleared successfully",
  7940. "content": {
  7941. "application/json": {
  7942. "schema": {
  7943. "type": "boolean",
  7944. "description": "Prompt cleared successfully"
  7945. }
  7946. }
  7947. }
  7948. }
  7949. },
  7950. "description": "Clear the prompt.",
  7951. "summary": "Clear TUI prompt",
  7952. "x-codeSamples": [
  7953. {
  7954. "lang": "js",
  7955. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  7956. }
  7957. ]
  7958. }
  7959. },
  7960. "/tui/execute-command": {
  7961. "post": {
  7962. "tags": ["tui"],
  7963. "operationId": "tui.executeCommand",
  7964. "parameters": [
  7965. {
  7966. "name": "directory",
  7967. "in": "query",
  7968. "schema": {
  7969. "type": "string"
  7970. },
  7971. "required": false
  7972. },
  7973. {
  7974. "name": "workspace",
  7975. "in": "query",
  7976. "schema": {
  7977. "type": "string"
  7978. },
  7979. "required": false
  7980. }
  7981. ],
  7982. "responses": {
  7983. "200": {
  7984. "description": "Command executed successfully",
  7985. "content": {
  7986. "application/json": {
  7987. "schema": {
  7988. "type": "boolean",
  7989. "description": "Command executed successfully"
  7990. }
  7991. }
  7992. }
  7993. },
  7994. "400": {
  7995. "description": "Bad request",
  7996. "content": {
  7997. "application/json": {
  7998. "schema": {
  7999. "$ref": "#/components/schemas/BadRequestError"
  8000. }
  8001. }
  8002. }
  8003. }
  8004. },
  8005. "description": "Execute a TUI command.",
  8006. "summary": "Execute TUI command",
  8007. "requestBody": {
  8008. "content": {
  8009. "application/json": {
  8010. "schema": {
  8011. "type": "object",
  8012. "properties": {
  8013. "command": {
  8014. "type": "string"
  8015. }
  8016. },
  8017. "required": ["command"],
  8018. "additionalProperties": false
  8019. }
  8020. }
  8021. }
  8022. },
  8023. "x-codeSamples": [
  8024. {
  8025. "lang": "js",
  8026. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8027. }
  8028. ]
  8029. }
  8030. },
  8031. "/tui/show-toast": {
  8032. "post": {
  8033. "tags": ["tui"],
  8034. "operationId": "tui.showToast",
  8035. "parameters": [
  8036. {
  8037. "name": "directory",
  8038. "in": "query",
  8039. "schema": {
  8040. "type": "string"
  8041. },
  8042. "required": false
  8043. },
  8044. {
  8045. "name": "workspace",
  8046. "in": "query",
  8047. "schema": {
  8048. "type": "string"
  8049. },
  8050. "required": false
  8051. }
  8052. ],
  8053. "responses": {
  8054. "200": {
  8055. "description": "Toast notification shown successfully",
  8056. "content": {
  8057. "application/json": {
  8058. "schema": {
  8059. "type": "boolean",
  8060. "description": "Toast notification shown successfully"
  8061. }
  8062. }
  8063. }
  8064. }
  8065. },
  8066. "description": "Show a toast notification in the TUI.",
  8067. "summary": "Show TUI toast",
  8068. "requestBody": {
  8069. "content": {
  8070. "application/json": {
  8071. "schema": {
  8072. "type": "object",
  8073. "properties": {
  8074. "title": {
  8075. "type": "string"
  8076. },
  8077. "message": {
  8078. "type": "string"
  8079. },
  8080. "variant": {
  8081. "type": "string",
  8082. "enum": ["info", "success", "warning", "error"]
  8083. },
  8084. "duration": {
  8085. "type": "integer",
  8086. "exclusiveMinimum": 0
  8087. }
  8088. },
  8089. "required": ["message", "variant"],
  8090. "additionalProperties": false
  8091. }
  8092. }
  8093. }
  8094. },
  8095. "x-codeSamples": [
  8096. {
  8097. "lang": "js",
  8098. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8099. }
  8100. ]
  8101. }
  8102. },
  8103. "/tui/publish": {
  8104. "post": {
  8105. "tags": ["tui"],
  8106. "operationId": "tui.publish",
  8107. "parameters": [
  8108. {
  8109. "name": "directory",
  8110. "in": "query",
  8111. "schema": {
  8112. "type": "string"
  8113. },
  8114. "required": false
  8115. },
  8116. {
  8117. "name": "workspace",
  8118. "in": "query",
  8119. "schema": {
  8120. "type": "string"
  8121. },
  8122. "required": false
  8123. }
  8124. ],
  8125. "responses": {
  8126. "200": {
  8127. "description": "Event published successfully",
  8128. "content": {
  8129. "application/json": {
  8130. "schema": {
  8131. "type": "boolean",
  8132. "description": "Event published successfully"
  8133. }
  8134. }
  8135. }
  8136. },
  8137. "400": {
  8138. "description": "Bad request",
  8139. "content": {
  8140. "application/json": {
  8141. "schema": {
  8142. "$ref": "#/components/schemas/BadRequestError"
  8143. }
  8144. }
  8145. }
  8146. }
  8147. },
  8148. "description": "Publish a TUI event.",
  8149. "summary": "Publish TUI event",
  8150. "requestBody": {
  8151. "content": {
  8152. "application/json": {
  8153. "schema": {
  8154. "anyOf": [
  8155. {
  8156. "$ref": "#/components/schemas/EventTuiPromptAppend"
  8157. },
  8158. {
  8159. "$ref": "#/components/schemas/EventTuiCommandExecute"
  8160. },
  8161. {
  8162. "$ref": "#/components/schemas/EventTuiToastShow"
  8163. },
  8164. {
  8165. "$ref": "#/components/schemas/EventTuiSessionSelect"
  8166. }
  8167. ]
  8168. }
  8169. }
  8170. }
  8171. },
  8172. "x-codeSamples": [
  8173. {
  8174. "lang": "js",
  8175. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  8176. }
  8177. ]
  8178. }
  8179. },
  8180. "/tui/select-session": {
  8181. "post": {
  8182. "tags": ["tui"],
  8183. "operationId": "tui.selectSession",
  8184. "parameters": [
  8185. {
  8186. "name": "directory",
  8187. "in": "query",
  8188. "schema": {
  8189. "type": "string"
  8190. },
  8191. "required": false
  8192. },
  8193. {
  8194. "name": "workspace",
  8195. "in": "query",
  8196. "schema": {
  8197. "type": "string"
  8198. },
  8199. "required": false
  8200. }
  8201. ],
  8202. "responses": {
  8203. "200": {
  8204. "description": "Session selected successfully",
  8205. "content": {
  8206. "application/json": {
  8207. "schema": {
  8208. "type": "boolean",
  8209. "description": "Session selected successfully"
  8210. }
  8211. }
  8212. }
  8213. },
  8214. "400": {
  8215. "description": "Bad request",
  8216. "content": {
  8217. "application/json": {
  8218. "schema": {
  8219. "$ref": "#/components/schemas/BadRequestError"
  8220. }
  8221. }
  8222. }
  8223. },
  8224. "404": {
  8225. "description": "NotFoundError",
  8226. "content": {
  8227. "application/json": {
  8228. "schema": {
  8229. "$ref": "#/components/schemas/NotFoundError"
  8230. }
  8231. }
  8232. }
  8233. }
  8234. },
  8235. "description": "Navigate the TUI to display the specified session.",
  8236. "summary": "Select session",
  8237. "requestBody": {
  8238. "content": {
  8239. "application/json": {
  8240. "schema": {
  8241. "type": "object",
  8242. "properties": {
  8243. "sessionID": {
  8244. "type": "string",
  8245. "pattern": "^ses",
  8246. "description": "Session ID to navigate to"
  8247. }
  8248. },
  8249. "required": ["sessionID"],
  8250. "additionalProperties": false
  8251. }
  8252. }
  8253. }
  8254. },
  8255. "x-codeSamples": [
  8256. {
  8257. "lang": "js",
  8258. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  8259. }
  8260. ]
  8261. }
  8262. },
  8263. "/tui/control/next": {
  8264. "get": {
  8265. "tags": ["tui"],
  8266. "operationId": "tui.control.next",
  8267. "parameters": [
  8268. {
  8269. "name": "directory",
  8270. "in": "query",
  8271. "schema": {
  8272. "type": "string"
  8273. },
  8274. "required": false
  8275. },
  8276. {
  8277. "name": "workspace",
  8278. "in": "query",
  8279. "schema": {
  8280. "type": "string"
  8281. },
  8282. "required": false
  8283. }
  8284. ],
  8285. "responses": {
  8286. "200": {
  8287. "description": "Next TUI request",
  8288. "content": {
  8289. "application/json": {
  8290. "schema": {
  8291. "type": "object",
  8292. "properties": {
  8293. "path": {
  8294. "type": "string"
  8295. },
  8296. "body": {}
  8297. },
  8298. "required": ["path", "body"],
  8299. "additionalProperties": false,
  8300. "description": "Next TUI request"
  8301. }
  8302. }
  8303. }
  8304. }
  8305. },
  8306. "description": "Retrieve the next TUI request from the queue for processing.",
  8307. "summary": "Get next TUI request",
  8308. "x-codeSamples": [
  8309. {
  8310. "lang": "js",
  8311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  8312. }
  8313. ]
  8314. }
  8315. },
  8316. "/tui/control/response": {
  8317. "post": {
  8318. "tags": ["tui"],
  8319. "operationId": "tui.control.response",
  8320. "parameters": [
  8321. {
  8322. "name": "directory",
  8323. "in": "query",
  8324. "schema": {
  8325. "type": "string"
  8326. },
  8327. "required": false
  8328. },
  8329. {
  8330. "name": "workspace",
  8331. "in": "query",
  8332. "schema": {
  8333. "type": "string"
  8334. },
  8335. "required": false
  8336. }
  8337. ],
  8338. "responses": {
  8339. "200": {
  8340. "description": "Response submitted successfully",
  8341. "content": {
  8342. "application/json": {
  8343. "schema": {
  8344. "type": "boolean",
  8345. "description": "Response submitted successfully"
  8346. }
  8347. }
  8348. }
  8349. }
  8350. },
  8351. "description": "Submit a response to the TUI request queue to complete a pending request.",
  8352. "summary": "Submit TUI response",
  8353. "requestBody": {
  8354. "content": {
  8355. "application/json": {
  8356. "schema": {}
  8357. }
  8358. }
  8359. },
  8360. "x-codeSamples": [
  8361. {
  8362. "lang": "js",
  8363. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  8364. }
  8365. ]
  8366. }
  8367. },
  8368. "/experimental/workspace/adapter": {
  8369. "get": {
  8370. "tags": ["workspace"],
  8371. "operationId": "experimental.workspace.adapter.list",
  8372. "parameters": [
  8373. {
  8374. "name": "directory",
  8375. "in": "query",
  8376. "schema": {
  8377. "type": "string"
  8378. },
  8379. "required": false
  8380. },
  8381. {
  8382. "name": "workspace",
  8383. "in": "query",
  8384. "schema": {
  8385. "type": "string"
  8386. },
  8387. "required": false
  8388. }
  8389. ],
  8390. "responses": {
  8391. "200": {
  8392. "description": "Workspace adapters",
  8393. "content": {
  8394. "application/json": {
  8395. "schema": {
  8396. "type": "array",
  8397. "items": {
  8398. "type": "object",
  8399. "properties": {
  8400. "type": {
  8401. "type": "string"
  8402. },
  8403. "name": {
  8404. "type": "string"
  8405. },
  8406. "description": {
  8407. "type": "string"
  8408. }
  8409. },
  8410. "required": ["type", "name", "description"],
  8411. "additionalProperties": false
  8412. },
  8413. "description": "Workspace adapters"
  8414. }
  8415. }
  8416. }
  8417. }
  8418. },
  8419. "description": "List all available workspace adapters for the current project.",
  8420. "summary": "List workspace adapters",
  8421. "x-codeSamples": [
  8422. {
  8423. "lang": "js",
  8424. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  8425. }
  8426. ]
  8427. }
  8428. },
  8429. "/experimental/workspace": {
  8430. "get": {
  8431. "tags": ["workspace"],
  8432. "operationId": "experimental.workspace.list",
  8433. "parameters": [
  8434. {
  8435. "name": "directory",
  8436. "in": "query",
  8437. "schema": {
  8438. "type": "string"
  8439. },
  8440. "required": false
  8441. },
  8442. {
  8443. "name": "workspace",
  8444. "in": "query",
  8445. "schema": {
  8446. "type": "string"
  8447. },
  8448. "required": false
  8449. }
  8450. ],
  8451. "responses": {
  8452. "200": {
  8453. "description": "Workspaces",
  8454. "content": {
  8455. "application/json": {
  8456. "schema": {
  8457. "type": "array",
  8458. "items": {
  8459. "$ref": "#/components/schemas/Workspace"
  8460. },
  8461. "description": "Workspaces"
  8462. }
  8463. }
  8464. }
  8465. }
  8466. },
  8467. "description": "List all workspaces.",
  8468. "summary": "List workspaces",
  8469. "x-codeSamples": [
  8470. {
  8471. "lang": "js",
  8472. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  8473. }
  8474. ]
  8475. },
  8476. "post": {
  8477. "tags": ["workspace"],
  8478. "operationId": "experimental.workspace.create",
  8479. "parameters": [
  8480. {
  8481. "name": "directory",
  8482. "in": "query",
  8483. "schema": {
  8484. "type": "string"
  8485. },
  8486. "required": false
  8487. },
  8488. {
  8489. "name": "workspace",
  8490. "in": "query",
  8491. "schema": {
  8492. "type": "string"
  8493. },
  8494. "required": false
  8495. }
  8496. ],
  8497. "responses": {
  8498. "200": {
  8499. "description": "Workspace created",
  8500. "content": {
  8501. "application/json": {
  8502. "schema": {
  8503. "$ref": "#/components/schemas/Workspace"
  8504. }
  8505. }
  8506. }
  8507. },
  8508. "400": {
  8509. "description": "Bad request",
  8510. "content": {
  8511. "application/json": {
  8512. "schema": {
  8513. "$ref": "#/components/schemas/BadRequestError"
  8514. }
  8515. }
  8516. }
  8517. }
  8518. },
  8519. "description": "Create a workspace for the current project.",
  8520. "summary": "Create workspace",
  8521. "requestBody": {
  8522. "content": {
  8523. "application/json": {
  8524. "schema": {
  8525. "type": "object",
  8526. "properties": {
  8527. "id": {
  8528. "type": "string",
  8529. "pattern": "^wrk"
  8530. },
  8531. "type": {
  8532. "type": "string"
  8533. },
  8534. "branch": {
  8535. "anyOf": [
  8536. {
  8537. "type": "string"
  8538. },
  8539. {
  8540. "type": "null"
  8541. }
  8542. ]
  8543. },
  8544. "extra": {
  8545. "anyOf": [
  8546. {},
  8547. {
  8548. "type": "null"
  8549. }
  8550. ]
  8551. }
  8552. },
  8553. "required": ["type"],
  8554. "additionalProperties": false
  8555. }
  8556. }
  8557. }
  8558. },
  8559. "x-codeSamples": [
  8560. {
  8561. "lang": "js",
  8562. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  8563. }
  8564. ]
  8565. }
  8566. },
  8567. "/experimental/workspace/sync-list": {
  8568. "post": {
  8569. "tags": ["workspace"],
  8570. "operationId": "experimental.workspace.syncList",
  8571. "parameters": [
  8572. {
  8573. "name": "directory",
  8574. "in": "query",
  8575. "schema": {
  8576. "type": "string"
  8577. },
  8578. "required": false
  8579. },
  8580. {
  8581. "name": "workspace",
  8582. "in": "query",
  8583. "schema": {
  8584. "type": "string"
  8585. },
  8586. "required": false
  8587. }
  8588. ],
  8589. "responses": {
  8590. "204": {
  8591. "description": "Workspace list synced"
  8592. }
  8593. },
  8594. "description": "Register missing workspaces returned by workspace adapters.",
  8595. "summary": "Sync workspace list",
  8596. "x-codeSamples": [
  8597. {
  8598. "lang": "js",
  8599. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  8600. }
  8601. ]
  8602. }
  8603. },
  8604. "/experimental/workspace/status": {
  8605. "get": {
  8606. "tags": ["workspace"],
  8607. "operationId": "experimental.workspace.status",
  8608. "parameters": [
  8609. {
  8610. "name": "directory",
  8611. "in": "query",
  8612. "schema": {
  8613. "type": "string"
  8614. },
  8615. "required": false
  8616. },
  8617. {
  8618. "name": "workspace",
  8619. "in": "query",
  8620. "schema": {
  8621. "type": "string"
  8622. },
  8623. "required": false
  8624. }
  8625. ],
  8626. "responses": {
  8627. "200": {
  8628. "description": "Workspace status",
  8629. "content": {
  8630. "application/json": {
  8631. "schema": {
  8632. "type": "array",
  8633. "items": {
  8634. "type": "object",
  8635. "properties": {
  8636. "workspaceID": {
  8637. "type": "string",
  8638. "pattern": "^wrk"
  8639. },
  8640. "status": {
  8641. "type": "string",
  8642. "enum": ["connected", "connecting", "disconnected", "error"]
  8643. }
  8644. },
  8645. "required": ["workspaceID", "status"],
  8646. "additionalProperties": false
  8647. },
  8648. "description": "Workspace status"
  8649. }
  8650. }
  8651. }
  8652. }
  8653. },
  8654. "description": "Get connection status for workspaces in the current project.",
  8655. "summary": "Workspace status",
  8656. "x-codeSamples": [
  8657. {
  8658. "lang": "js",
  8659. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  8660. }
  8661. ]
  8662. }
  8663. },
  8664. "/experimental/workspace/{id}": {
  8665. "delete": {
  8666. "tags": ["workspace"],
  8667. "operationId": "experimental.workspace.remove",
  8668. "parameters": [
  8669. {
  8670. "name": "id",
  8671. "in": "path",
  8672. "schema": {
  8673. "type": "string",
  8674. "pattern": "^wrk"
  8675. },
  8676. "required": true
  8677. },
  8678. {
  8679. "name": "directory",
  8680. "in": "query",
  8681. "schema": {
  8682. "type": "string"
  8683. },
  8684. "required": false
  8685. },
  8686. {
  8687. "name": "workspace",
  8688. "in": "query",
  8689. "schema": {
  8690. "type": "string"
  8691. },
  8692. "required": false
  8693. }
  8694. ],
  8695. "responses": {
  8696. "200": {
  8697. "description": "Workspace removed",
  8698. "content": {
  8699. "application/json": {
  8700. "schema": {
  8701. "$ref": "#/components/schemas/Workspace"
  8702. }
  8703. }
  8704. }
  8705. },
  8706. "400": {
  8707. "description": "Bad request",
  8708. "content": {
  8709. "application/json": {
  8710. "schema": {
  8711. "$ref": "#/components/schemas/BadRequestError"
  8712. }
  8713. }
  8714. }
  8715. }
  8716. },
  8717. "description": "Remove an existing workspace.",
  8718. "summary": "Remove workspace",
  8719. "x-codeSamples": [
  8720. {
  8721. "lang": "js",
  8722. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  8723. }
  8724. ]
  8725. }
  8726. },
  8727. "/experimental/workspace/warp": {
  8728. "post": {
  8729. "tags": ["workspace"],
  8730. "operationId": "experimental.workspace.warp",
  8731. "parameters": [
  8732. {
  8733. "name": "directory",
  8734. "in": "query",
  8735. "schema": {
  8736. "type": "string"
  8737. },
  8738. "required": false
  8739. },
  8740. {
  8741. "name": "workspace",
  8742. "in": "query",
  8743. "schema": {
  8744. "type": "string"
  8745. },
  8746. "required": false
  8747. }
  8748. ],
  8749. "responses": {
  8750. "204": {
  8751. "description": "Session warped"
  8752. },
  8753. "400": {
  8754. "description": "WorkspaceWarpError | VcsApplyError",
  8755. "content": {
  8756. "application/json": {
  8757. "schema": {
  8758. "anyOf": [
  8759. {
  8760. "$ref": "#/components/schemas/WorkspaceWarpError"
  8761. },
  8762. {
  8763. "$ref": "#/components/schemas/VcsApplyError"
  8764. }
  8765. ]
  8766. }
  8767. }
  8768. }
  8769. }
  8770. },
  8771. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  8772. "summary": "Warp session into workspace",
  8773. "requestBody": {
  8774. "content": {
  8775. "application/json": {
  8776. "schema": {
  8777. "type": "object",
  8778. "properties": {
  8779. "id": {
  8780. "anyOf": [
  8781. {
  8782. "type": "string",
  8783. "pattern": "^wrk"
  8784. },
  8785. {
  8786. "type": "null"
  8787. }
  8788. ]
  8789. },
  8790. "sessionID": {
  8791. "type": "string",
  8792. "pattern": "^ses"
  8793. },
  8794. "copyChanges": {
  8795. "type": "boolean"
  8796. }
  8797. },
  8798. "required": ["id", "sessionID"],
  8799. "additionalProperties": false
  8800. }
  8801. }
  8802. }
  8803. },
  8804. "x-codeSamples": [
  8805. {
  8806. "lang": "js",
  8807. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  8808. }
  8809. ]
  8810. }
  8811. },
  8812. "/pty/{ptyID}/connect": {
  8813. "get": {
  8814. "tags": ["pty"],
  8815. "operationId": "pty.connect",
  8816. "parameters": [
  8817. {
  8818. "name": "ptyID",
  8819. "in": "path",
  8820. "schema": {
  8821. "type": "string",
  8822. "pattern": "^pty"
  8823. },
  8824. "required": true
  8825. },
  8826. {
  8827. "name": "directory",
  8828. "in": "query",
  8829. "schema": {
  8830. "type": "string"
  8831. },
  8832. "required": false
  8833. },
  8834. {
  8835. "name": "workspace",
  8836. "in": "query",
  8837. "schema": {
  8838. "type": "string"
  8839. },
  8840. "required": false
  8841. }
  8842. ],
  8843. "responses": {
  8844. "200": {
  8845. "description": "Connected session",
  8846. "content": {
  8847. "application/json": {
  8848. "schema": {
  8849. "type": "boolean",
  8850. "description": "Connected session"
  8851. }
  8852. }
  8853. }
  8854. },
  8855. "403": {
  8856. "description": "Forbidden",
  8857. "content": {
  8858. "application/json": {
  8859. "schema": {
  8860. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  8861. }
  8862. }
  8863. }
  8864. },
  8865. "404": {
  8866. "description": "Not found",
  8867. "content": {
  8868. "application/json": {
  8869. "schema": {
  8870. "$ref": "#/components/schemas/NotFoundError"
  8871. }
  8872. }
  8873. }
  8874. }
  8875. },
  8876. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  8877. "summary": "Connect to PTY session",
  8878. "x-codeSamples": [
  8879. {
  8880. "lang": "js",
  8881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  8882. }
  8883. ]
  8884. }
  8885. }
  8886. },
  8887. "components": {
  8888. "schemas": {
  8889. "Event": {
  8890. "anyOf": [
  8891. {
  8892. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  8893. },
  8894. {
  8895. "$ref": "#/components/schemas/EventFileEdited"
  8896. },
  8897. {
  8898. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  8899. },
  8900. {
  8901. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  8902. },
  8903. {
  8904. "$ref": "#/components/schemas/EventLspUpdated"
  8905. },
  8906. {
  8907. "$ref": "#/components/schemas/EventMessagePartDelta"
  8908. },
  8909. {
  8910. "$ref": "#/components/schemas/EventPermissionAsked"
  8911. },
  8912. {
  8913. "$ref": "#/components/schemas/EventPermissionReplied"
  8914. },
  8915. {
  8916. "$ref": "#/components/schemas/EventSessionDiff"
  8917. },
  8918. {
  8919. "$ref": "#/components/schemas/EventSessionError"
  8920. },
  8921. {
  8922. "$ref": "#/components/schemas/EventInstallationUpdated"
  8923. },
  8924. {
  8925. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  8926. },
  8927. {
  8928. "$ref": "#/components/schemas/EventQuestionAsked"
  8929. },
  8930. {
  8931. "$ref": "#/components/schemas/EventQuestionReplied"
  8932. },
  8933. {
  8934. "$ref": "#/components/schemas/EventQuestionRejected"
  8935. },
  8936. {
  8937. "$ref": "#/components/schemas/EventTodoUpdated"
  8938. },
  8939. {
  8940. "$ref": "#/components/schemas/EventSessionStatus"
  8941. },
  8942. {
  8943. "$ref": "#/components/schemas/EventSessionIdle"
  8944. },
  8945. {
  8946. "$ref": "#/components/schemas/EventSessionCompacted"
  8947. },
  8948. {
  8949. "$ref": "#/components/schemas/Event.tui.prompt.append"
  8950. },
  8951. {
  8952. "$ref": "#/components/schemas/Event.tui.command.execute"
  8953. },
  8954. {
  8955. "$ref": "#/components/schemas/EventTuiToastShow1"
  8956. },
  8957. {
  8958. "$ref": "#/components/schemas/Event.tui.session.select"
  8959. },
  8960. {
  8961. "$ref": "#/components/schemas/EventMcpToolsChanged"
  8962. },
  8963. {
  8964. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  8965. },
  8966. {
  8967. "$ref": "#/components/schemas/EventCommandExecuted"
  8968. },
  8969. {
  8970. "$ref": "#/components/schemas/EventProjectUpdated"
  8971. },
  8972. {
  8973. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  8974. },
  8975. {
  8976. "$ref": "#/components/schemas/EventWorkspaceReady"
  8977. },
  8978. {
  8979. "$ref": "#/components/schemas/EventWorkspaceFailed"
  8980. },
  8981. {
  8982. "$ref": "#/components/schemas/EventWorkspaceStatus"
  8983. },
  8984. {
  8985. "$ref": "#/components/schemas/EventWorktreeReady"
  8986. },
  8987. {
  8988. "$ref": "#/components/schemas/EventWorktreeFailed"
  8989. },
  8990. {
  8991. "$ref": "#/components/schemas/EventPtyCreated"
  8992. },
  8993. {
  8994. "$ref": "#/components/schemas/EventPtyUpdated"
  8995. },
  8996. {
  8997. "$ref": "#/components/schemas/EventPtyExited"
  8998. },
  8999. {
  9000. "$ref": "#/components/schemas/EventPtyDeleted"
  9001. },
  9002. {
  9003. "$ref": "#/components/schemas/EventMessageUpdated"
  9004. },
  9005. {
  9006. "$ref": "#/components/schemas/EventMessageRemoved"
  9007. },
  9008. {
  9009. "$ref": "#/components/schemas/EventMessagePartUpdated"
  9010. },
  9011. {
  9012. "$ref": "#/components/schemas/EventMessagePartRemoved"
  9013. },
  9014. {
  9015. "$ref": "#/components/schemas/EventSessionCreated"
  9016. },
  9017. {
  9018. "$ref": "#/components/schemas/EventSessionUpdated"
  9019. },
  9020. {
  9021. "$ref": "#/components/schemas/EventSessionDeleted"
  9022. },
  9023. {
  9024. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  9025. },
  9026. {
  9027. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  9028. },
  9029. {
  9030. "$ref": "#/components/schemas/EventSessionNextPrompted"
  9031. },
  9032. {
  9033. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  9034. },
  9035. {
  9036. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  9037. },
  9038. {
  9039. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  9040. },
  9041. {
  9042. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  9043. },
  9044. {
  9045. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  9046. },
  9047. {
  9048. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  9049. },
  9050. {
  9051. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  9052. },
  9053. {
  9054. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  9055. },
  9056. {
  9057. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  9058. },
  9059. {
  9060. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  9061. },
  9062. {
  9063. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  9064. },
  9065. {
  9066. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  9067. },
  9068. {
  9069. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  9070. },
  9071. {
  9072. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  9073. },
  9074. {
  9075. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  9076. },
  9077. {
  9078. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  9079. },
  9080. {
  9081. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  9082. },
  9083. {
  9084. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  9085. },
  9086. {
  9087. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  9088. },
  9089. {
  9090. "$ref": "#/components/schemas/EventSessionNextRetried"
  9091. },
  9092. {
  9093. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  9094. },
  9095. {
  9096. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  9097. },
  9098. {
  9099. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  9100. },
  9101. {
  9102. "$ref": "#/components/schemas/EventServerConnected"
  9103. },
  9104. {
  9105. "$ref": "#/components/schemas/EventGlobalDisposed"
  9106. }
  9107. ]
  9108. },
  9109. "OAuth": {
  9110. "type": "object",
  9111. "properties": {
  9112. "type": {
  9113. "type": "string",
  9114. "enum": ["oauth"]
  9115. },
  9116. "refresh": {
  9117. "type": "string"
  9118. },
  9119. "access": {
  9120. "type": "string"
  9121. },
  9122. "expires": {
  9123. "type": "integer",
  9124. "minimum": 0
  9125. },
  9126. "accountId": {
  9127. "type": "string"
  9128. },
  9129. "enterpriseUrl": {
  9130. "type": "string"
  9131. }
  9132. },
  9133. "required": ["type", "refresh", "access", "expires"],
  9134. "additionalProperties": false
  9135. },
  9136. "ApiAuth": {
  9137. "type": "object",
  9138. "properties": {
  9139. "type": {
  9140. "type": "string",
  9141. "enum": ["api"]
  9142. },
  9143. "key": {
  9144. "type": "string"
  9145. },
  9146. "metadata": {
  9147. "type": "object",
  9148. "additionalProperties": {
  9149. "type": "string"
  9150. }
  9151. }
  9152. },
  9153. "required": ["type", "key"],
  9154. "additionalProperties": false
  9155. },
  9156. "WellKnownAuth": {
  9157. "type": "object",
  9158. "properties": {
  9159. "type": {
  9160. "type": "string",
  9161. "enum": ["wellknown"]
  9162. },
  9163. "key": {
  9164. "type": "string"
  9165. },
  9166. "token": {
  9167. "type": "string"
  9168. }
  9169. },
  9170. "required": ["type", "key", "token"],
  9171. "additionalProperties": false
  9172. },
  9173. "Auth": {
  9174. "anyOf": [
  9175. {
  9176. "$ref": "#/components/schemas/OAuth"
  9177. },
  9178. {
  9179. "$ref": "#/components/schemas/ApiAuth"
  9180. },
  9181. {
  9182. "$ref": "#/components/schemas/WellKnownAuth"
  9183. }
  9184. ]
  9185. },
  9186. "PermissionRequest": {
  9187. "type": "object",
  9188. "properties": {
  9189. "id": {
  9190. "type": "string",
  9191. "pattern": "^per"
  9192. },
  9193. "sessionID": {
  9194. "type": "string",
  9195. "pattern": "^ses"
  9196. },
  9197. "permission": {
  9198. "type": "string"
  9199. },
  9200. "patterns": {
  9201. "type": "array",
  9202. "items": {
  9203. "type": "string"
  9204. }
  9205. },
  9206. "metadata": {
  9207. "type": "object"
  9208. },
  9209. "always": {
  9210. "type": "array",
  9211. "items": {
  9212. "type": "string"
  9213. }
  9214. },
  9215. "tool": {
  9216. "type": "object",
  9217. "properties": {
  9218. "messageID": {
  9219. "type": "string",
  9220. "pattern": "^msg"
  9221. },
  9222. "callID": {
  9223. "type": "string"
  9224. }
  9225. },
  9226. "required": ["messageID", "callID"],
  9227. "additionalProperties": false
  9228. }
  9229. },
  9230. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  9231. "additionalProperties": false
  9232. },
  9233. "SnapshotFileDiff": {
  9234. "type": "object",
  9235. "properties": {
  9236. "file": {
  9237. "type": "string"
  9238. },
  9239. "patch": {
  9240. "type": "string"
  9241. },
  9242. "additions": {
  9243. "type": "number"
  9244. },
  9245. "deletions": {
  9246. "type": "number"
  9247. },
  9248. "status": {
  9249. "type": "string",
  9250. "enum": ["added", "deleted", "modified"]
  9251. }
  9252. },
  9253. "required": ["additions", "deletions"],
  9254. "additionalProperties": false
  9255. },
  9256. "ProviderAuthError": {
  9257. "type": "object",
  9258. "properties": {
  9259. "name": {
  9260. "type": "string",
  9261. "enum": ["ProviderAuthError"]
  9262. },
  9263. "data": {
  9264. "type": "object",
  9265. "properties": {
  9266. "providerID": {
  9267. "type": "string"
  9268. },
  9269. "message": {
  9270. "type": "string"
  9271. }
  9272. },
  9273. "required": ["providerID", "message"],
  9274. "additionalProperties": false
  9275. }
  9276. },
  9277. "required": ["name", "data"],
  9278. "additionalProperties": false
  9279. },
  9280. "UnknownError": {
  9281. "type": "object",
  9282. "properties": {
  9283. "name": {
  9284. "type": "string",
  9285. "enum": ["UnknownError"]
  9286. },
  9287. "data": {
  9288. "type": "object",
  9289. "properties": {
  9290. "message": {
  9291. "type": "string"
  9292. }
  9293. },
  9294. "required": ["message"],
  9295. "additionalProperties": false
  9296. }
  9297. },
  9298. "required": ["name", "data"],
  9299. "additionalProperties": false
  9300. },
  9301. "MessageOutputLengthError": {
  9302. "type": "object",
  9303. "properties": {
  9304. "name": {
  9305. "type": "string",
  9306. "enum": ["MessageOutputLengthError"]
  9307. },
  9308. "data": {
  9309. "type": "object",
  9310. "properties": {}
  9311. }
  9312. },
  9313. "required": ["name", "data"],
  9314. "additionalProperties": false
  9315. },
  9316. "MessageAbortedError": {
  9317. "type": "object",
  9318. "properties": {
  9319. "name": {
  9320. "type": "string",
  9321. "enum": ["MessageAbortedError"]
  9322. },
  9323. "data": {
  9324. "type": "object",
  9325. "properties": {
  9326. "message": {
  9327. "type": "string"
  9328. }
  9329. },
  9330. "required": ["message"],
  9331. "additionalProperties": false
  9332. }
  9333. },
  9334. "required": ["name", "data"],
  9335. "additionalProperties": false
  9336. },
  9337. "StructuredOutputError": {
  9338. "type": "object",
  9339. "properties": {
  9340. "name": {
  9341. "type": "string",
  9342. "enum": ["StructuredOutputError"]
  9343. },
  9344. "data": {
  9345. "type": "object",
  9346. "properties": {
  9347. "message": {
  9348. "type": "string"
  9349. },
  9350. "retries": {
  9351. "type": "integer",
  9352. "minimum": 0
  9353. }
  9354. },
  9355. "required": ["message", "retries"],
  9356. "additionalProperties": false
  9357. }
  9358. },
  9359. "required": ["name", "data"],
  9360. "additionalProperties": false
  9361. },
  9362. "ContextOverflowError": {
  9363. "type": "object",
  9364. "properties": {
  9365. "name": {
  9366. "type": "string",
  9367. "enum": ["ContextOverflowError"]
  9368. },
  9369. "data": {
  9370. "type": "object",
  9371. "properties": {
  9372. "message": {
  9373. "type": "string"
  9374. },
  9375. "responseBody": {
  9376. "type": "string"
  9377. }
  9378. },
  9379. "required": ["message"],
  9380. "additionalProperties": false
  9381. }
  9382. },
  9383. "required": ["name", "data"],
  9384. "additionalProperties": false
  9385. },
  9386. "APIError": {
  9387. "type": "object",
  9388. "properties": {
  9389. "name": {
  9390. "type": "string",
  9391. "enum": ["APIError"]
  9392. },
  9393. "data": {
  9394. "type": "object",
  9395. "properties": {
  9396. "message": {
  9397. "type": "string"
  9398. },
  9399. "statusCode": {
  9400. "type": "integer",
  9401. "minimum": 0
  9402. },
  9403. "isRetryable": {
  9404. "type": "boolean"
  9405. },
  9406. "responseHeaders": {
  9407. "type": "object",
  9408. "additionalProperties": {
  9409. "type": "string"
  9410. }
  9411. },
  9412. "responseBody": {
  9413. "type": "string"
  9414. },
  9415. "metadata": {
  9416. "type": "object",
  9417. "additionalProperties": {
  9418. "type": "string"
  9419. }
  9420. }
  9421. },
  9422. "required": ["message", "isRetryable"],
  9423. "additionalProperties": false
  9424. }
  9425. },
  9426. "required": ["name", "data"],
  9427. "additionalProperties": false
  9428. },
  9429. "QuestionOption": {
  9430. "type": "object",
  9431. "properties": {
  9432. "label": {
  9433. "type": "string",
  9434. "description": "Display text (1-5 words, concise)"
  9435. },
  9436. "description": {
  9437. "type": "string",
  9438. "description": "Explanation of choice"
  9439. }
  9440. },
  9441. "required": ["label", "description"],
  9442. "additionalProperties": false
  9443. },
  9444. "QuestionInfo": {
  9445. "type": "object",
  9446. "properties": {
  9447. "question": {
  9448. "type": "string",
  9449. "description": "Complete question"
  9450. },
  9451. "header": {
  9452. "type": "string",
  9453. "description": "Very short label (max 30 chars)"
  9454. },
  9455. "options": {
  9456. "type": "array",
  9457. "items": {
  9458. "$ref": "#/components/schemas/QuestionOption"
  9459. },
  9460. "description": "Available choices"
  9461. },
  9462. "multiple": {
  9463. "type": "boolean"
  9464. },
  9465. "custom": {
  9466. "type": "boolean"
  9467. }
  9468. },
  9469. "required": ["question", "header", "options"],
  9470. "additionalProperties": false
  9471. },
  9472. "QuestionTool": {
  9473. "type": "object",
  9474. "properties": {
  9475. "messageID": {
  9476. "type": "string",
  9477. "pattern": "^msg"
  9478. },
  9479. "callID": {
  9480. "type": "string"
  9481. }
  9482. },
  9483. "required": ["messageID", "callID"],
  9484. "additionalProperties": false
  9485. },
  9486. "QuestionRequest": {
  9487. "type": "object",
  9488. "properties": {
  9489. "id": {
  9490. "type": "string",
  9491. "pattern": "^que"
  9492. },
  9493. "sessionID": {
  9494. "type": "string",
  9495. "pattern": "^ses"
  9496. },
  9497. "questions": {
  9498. "type": "array",
  9499. "items": {
  9500. "$ref": "#/components/schemas/QuestionInfo"
  9501. },
  9502. "description": "Questions to ask"
  9503. },
  9504. "tool": {
  9505. "$ref": "#/components/schemas/QuestionTool"
  9506. }
  9507. },
  9508. "required": ["id", "sessionID", "questions"],
  9509. "additionalProperties": false
  9510. },
  9511. "QuestionAnswer": {
  9512. "type": "array",
  9513. "items": {
  9514. "type": "string"
  9515. }
  9516. },
  9517. "QuestionReplied": {
  9518. "type": "object",
  9519. "properties": {
  9520. "sessionID": {
  9521. "type": "string",
  9522. "pattern": "^ses"
  9523. },
  9524. "requestID": {
  9525. "type": "string",
  9526. "pattern": "^que"
  9527. },
  9528. "answers": {
  9529. "type": "array",
  9530. "items": {
  9531. "$ref": "#/components/schemas/QuestionAnswer"
  9532. }
  9533. }
  9534. },
  9535. "required": ["sessionID", "requestID", "answers"],
  9536. "additionalProperties": false
  9537. },
  9538. "QuestionRejected": {
  9539. "type": "object",
  9540. "properties": {
  9541. "sessionID": {
  9542. "type": "string",
  9543. "pattern": "^ses"
  9544. },
  9545. "requestID": {
  9546. "type": "string",
  9547. "pattern": "^que"
  9548. }
  9549. },
  9550. "required": ["sessionID", "requestID"],
  9551. "additionalProperties": false
  9552. },
  9553. "Todo": {
  9554. "type": "object",
  9555. "properties": {
  9556. "content": {
  9557. "type": "string",
  9558. "description": "Brief description of the task"
  9559. },
  9560. "status": {
  9561. "type": "string",
  9562. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  9563. },
  9564. "priority": {
  9565. "type": "string",
  9566. "description": "Priority level of the task: high, medium, low"
  9567. }
  9568. },
  9569. "required": ["content", "status", "priority"],
  9570. "additionalProperties": false
  9571. },
  9572. "SessionStatus": {
  9573. "anyOf": [
  9574. {
  9575. "type": "object",
  9576. "properties": {
  9577. "type": {
  9578. "type": "string",
  9579. "enum": ["idle"]
  9580. }
  9581. },
  9582. "required": ["type"],
  9583. "additionalProperties": false
  9584. },
  9585. {
  9586. "type": "object",
  9587. "properties": {
  9588. "type": {
  9589. "type": "string",
  9590. "enum": ["retry"]
  9591. },
  9592. "attempt": {
  9593. "type": "integer",
  9594. "minimum": 0
  9595. },
  9596. "message": {
  9597. "type": "string"
  9598. },
  9599. "action": {
  9600. "type": "object",
  9601. "properties": {
  9602. "reason": {
  9603. "type": "string"
  9604. },
  9605. "provider": {
  9606. "type": "string"
  9607. },
  9608. "title": {
  9609. "type": "string"
  9610. },
  9611. "message": {
  9612. "type": "string"
  9613. },
  9614. "label": {
  9615. "type": "string"
  9616. },
  9617. "link": {
  9618. "type": "string"
  9619. }
  9620. },
  9621. "required": ["reason", "provider", "title", "message", "label"],
  9622. "additionalProperties": false
  9623. },
  9624. "next": {
  9625. "type": "integer",
  9626. "minimum": 0
  9627. }
  9628. },
  9629. "required": ["type", "attempt", "message", "next"],
  9630. "additionalProperties": false
  9631. },
  9632. {
  9633. "type": "object",
  9634. "properties": {
  9635. "type": {
  9636. "type": "string",
  9637. "enum": ["busy"]
  9638. }
  9639. },
  9640. "required": ["type"],
  9641. "additionalProperties": false
  9642. }
  9643. ]
  9644. },
  9645. "Event.tui.prompt.append": {
  9646. "type": "object",
  9647. "properties": {
  9648. "id": {
  9649. "type": "string"
  9650. },
  9651. "type": {
  9652. "type": "string",
  9653. "enum": ["tui.prompt.append"]
  9654. },
  9655. "properties": {
  9656. "type": "object",
  9657. "properties": {
  9658. "text": {
  9659. "type": "string"
  9660. }
  9661. },
  9662. "required": ["text"],
  9663. "additionalProperties": false
  9664. }
  9665. },
  9666. "required": ["id", "type", "properties"],
  9667. "additionalProperties": false
  9668. },
  9669. "Event.tui.command.execute": {
  9670. "type": "object",
  9671. "properties": {
  9672. "id": {
  9673. "type": "string"
  9674. },
  9675. "type": {
  9676. "type": "string",
  9677. "enum": ["tui.command.execute"]
  9678. },
  9679. "properties": {
  9680. "type": "object",
  9681. "properties": {
  9682. "command": {
  9683. "anyOf": [
  9684. {
  9685. "type": "string",
  9686. "enum": [
  9687. "session.list",
  9688. "session.new",
  9689. "session.share",
  9690. "session.interrupt",
  9691. "session.compact",
  9692. "session.page.up",
  9693. "session.page.down",
  9694. "session.line.up",
  9695. "session.line.down",
  9696. "session.half.page.up",
  9697. "session.half.page.down",
  9698. "session.first",
  9699. "session.last",
  9700. "prompt.clear",
  9701. "prompt.submit",
  9702. "agent.cycle"
  9703. ]
  9704. },
  9705. {
  9706. "type": "string"
  9707. }
  9708. ]
  9709. }
  9710. },
  9711. "required": ["command"],
  9712. "additionalProperties": false
  9713. }
  9714. },
  9715. "required": ["id", "type", "properties"],
  9716. "additionalProperties": false
  9717. },
  9718. "Event.tui.toast.show": {
  9719. "type": "object",
  9720. "properties": {
  9721. "id": {
  9722. "type": "string"
  9723. },
  9724. "type": {
  9725. "type": "string",
  9726. "enum": ["tui.toast.show"]
  9727. },
  9728. "properties": {
  9729. "type": "object",
  9730. "properties": {
  9731. "title": {
  9732. "type": "string"
  9733. },
  9734. "message": {
  9735. "type": "string"
  9736. },
  9737. "variant": {
  9738. "type": "string",
  9739. "enum": ["info", "success", "warning", "error"]
  9740. },
  9741. "duration": {
  9742. "type": "integer",
  9743. "exclusiveMinimum": 0
  9744. }
  9745. },
  9746. "required": ["message", "variant"],
  9747. "additionalProperties": false
  9748. }
  9749. },
  9750. "required": ["id", "type", "properties"],
  9751. "additionalProperties": false
  9752. },
  9753. "Event.tui.session.select": {
  9754. "type": "object",
  9755. "properties": {
  9756. "id": {
  9757. "type": "string"
  9758. },
  9759. "type": {
  9760. "type": "string",
  9761. "enum": ["tui.session.select"]
  9762. },
  9763. "properties": {
  9764. "type": "object",
  9765. "properties": {
  9766. "sessionID": {
  9767. "type": "string",
  9768. "pattern": "^ses",
  9769. "description": "Session ID to navigate to"
  9770. }
  9771. },
  9772. "required": ["sessionID"],
  9773. "additionalProperties": false
  9774. }
  9775. },
  9776. "required": ["id", "type", "properties"],
  9777. "additionalProperties": false
  9778. },
  9779. "Project": {
  9780. "type": "object",
  9781. "properties": {
  9782. "id": {
  9783. "type": "string"
  9784. },
  9785. "worktree": {
  9786. "type": "string"
  9787. },
  9788. "vcs": {
  9789. "type": "string",
  9790. "enum": ["git"]
  9791. },
  9792. "name": {
  9793. "type": "string"
  9794. },
  9795. "icon": {
  9796. "type": "object",
  9797. "properties": {
  9798. "url": {
  9799. "type": "string"
  9800. },
  9801. "override": {
  9802. "type": "string"
  9803. },
  9804. "color": {
  9805. "type": "string"
  9806. }
  9807. },
  9808. "additionalProperties": false
  9809. },
  9810. "commands": {
  9811. "type": "object",
  9812. "properties": {
  9813. "start": {
  9814. "type": "string",
  9815. "description": "Startup script to run when creating a new workspace (worktree)"
  9816. }
  9817. },
  9818. "additionalProperties": false
  9819. },
  9820. "time": {
  9821. "type": "object",
  9822. "properties": {
  9823. "created": {
  9824. "type": "integer",
  9825. "minimum": 0
  9826. },
  9827. "updated": {
  9828. "type": "integer",
  9829. "minimum": 0
  9830. },
  9831. "initialized": {
  9832. "type": "integer",
  9833. "minimum": 0
  9834. }
  9835. },
  9836. "required": ["created", "updated"],
  9837. "additionalProperties": false
  9838. },
  9839. "sandboxes": {
  9840. "type": "array",
  9841. "items": {
  9842. "type": "string"
  9843. }
  9844. }
  9845. },
  9846. "required": ["id", "worktree", "time", "sandboxes"],
  9847. "additionalProperties": false
  9848. },
  9849. "Pty": {
  9850. "type": "object",
  9851. "properties": {
  9852. "id": {
  9853. "type": "string",
  9854. "pattern": "^pty"
  9855. },
  9856. "title": {
  9857. "type": "string"
  9858. },
  9859. "command": {
  9860. "type": "string"
  9861. },
  9862. "args": {
  9863. "type": "array",
  9864. "items": {
  9865. "type": "string"
  9866. }
  9867. },
  9868. "cwd": {
  9869. "type": "string"
  9870. },
  9871. "status": {
  9872. "type": "string",
  9873. "enum": ["running", "exited"]
  9874. },
  9875. "pid": {
  9876. "type": "integer",
  9877. "exclusiveMinimum": 0
  9878. }
  9879. },
  9880. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  9881. "additionalProperties": false
  9882. },
  9883. "OutputFormatText": {
  9884. "type": "object",
  9885. "properties": {
  9886. "type": {
  9887. "type": "string",
  9888. "enum": ["text"]
  9889. }
  9890. },
  9891. "required": ["type"],
  9892. "additionalProperties": false
  9893. },
  9894. "JSONSchema": {
  9895. "type": "object"
  9896. },
  9897. "OutputFormatJsonSchema": {
  9898. "type": "object",
  9899. "properties": {
  9900. "type": {
  9901. "type": "string",
  9902. "enum": ["json_schema"]
  9903. },
  9904. "schema": {
  9905. "$ref": "#/components/schemas/JSONSchema"
  9906. },
  9907. "retryCount": {
  9908. "type": "integer",
  9909. "minimum": 0
  9910. }
  9911. },
  9912. "required": ["type", "schema"],
  9913. "additionalProperties": false
  9914. },
  9915. "OutputFormat": {
  9916. "anyOf": [
  9917. {
  9918. "$ref": "#/components/schemas/OutputFormatText"
  9919. },
  9920. {
  9921. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  9922. }
  9923. ]
  9924. },
  9925. "UserMessage": {
  9926. "type": "object",
  9927. "properties": {
  9928. "id": {
  9929. "type": "string",
  9930. "pattern": "^msg"
  9931. },
  9932. "sessionID": {
  9933. "type": "string",
  9934. "pattern": "^ses"
  9935. },
  9936. "role": {
  9937. "type": "string",
  9938. "enum": ["user"]
  9939. },
  9940. "time": {
  9941. "type": "object",
  9942. "properties": {
  9943. "created": {
  9944. "type": "integer",
  9945. "minimum": 0
  9946. }
  9947. },
  9948. "required": ["created"],
  9949. "additionalProperties": false
  9950. },
  9951. "format": {
  9952. "$ref": "#/components/schemas/OutputFormat"
  9953. },
  9954. "summary": {
  9955. "type": "object",
  9956. "properties": {
  9957. "title": {
  9958. "type": "string"
  9959. },
  9960. "body": {
  9961. "type": "string"
  9962. },
  9963. "diffs": {
  9964. "type": "array",
  9965. "items": {
  9966. "$ref": "#/components/schemas/SnapshotFileDiff"
  9967. }
  9968. }
  9969. },
  9970. "required": ["diffs"],
  9971. "additionalProperties": false
  9972. },
  9973. "agent": {
  9974. "type": "string"
  9975. },
  9976. "model": {
  9977. "type": "object",
  9978. "properties": {
  9979. "providerID": {
  9980. "type": "string"
  9981. },
  9982. "modelID": {
  9983. "type": "string"
  9984. },
  9985. "variant": {
  9986. "type": "string"
  9987. }
  9988. },
  9989. "required": ["providerID", "modelID"],
  9990. "additionalProperties": false
  9991. },
  9992. "system": {
  9993. "type": "string"
  9994. },
  9995. "tools": {
  9996. "type": "object",
  9997. "additionalProperties": {
  9998. "type": "boolean"
  9999. }
  10000. }
  10001. },
  10002. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  10003. "additionalProperties": false
  10004. },
  10005. "AssistantMessage": {
  10006. "type": "object",
  10007. "properties": {
  10008. "id": {
  10009. "type": "string",
  10010. "pattern": "^msg"
  10011. },
  10012. "sessionID": {
  10013. "type": "string",
  10014. "pattern": "^ses"
  10015. },
  10016. "role": {
  10017. "type": "string",
  10018. "enum": ["assistant"]
  10019. },
  10020. "time": {
  10021. "type": "object",
  10022. "properties": {
  10023. "created": {
  10024. "type": "integer",
  10025. "minimum": 0
  10026. },
  10027. "completed": {
  10028. "type": "integer",
  10029. "minimum": 0
  10030. }
  10031. },
  10032. "required": ["created"],
  10033. "additionalProperties": false
  10034. },
  10035. "error": {
  10036. "anyOf": [
  10037. {
  10038. "$ref": "#/components/schemas/ProviderAuthError"
  10039. },
  10040. {
  10041. "$ref": "#/components/schemas/UnknownError"
  10042. },
  10043. {
  10044. "$ref": "#/components/schemas/MessageOutputLengthError"
  10045. },
  10046. {
  10047. "$ref": "#/components/schemas/MessageAbortedError"
  10048. },
  10049. {
  10050. "$ref": "#/components/schemas/StructuredOutputError"
  10051. },
  10052. {
  10053. "$ref": "#/components/schemas/ContextOverflowError"
  10054. },
  10055. {
  10056. "$ref": "#/components/schemas/APIError"
  10057. }
  10058. ]
  10059. },
  10060. "parentID": {
  10061. "type": "string",
  10062. "pattern": "^msg"
  10063. },
  10064. "modelID": {
  10065. "type": "string"
  10066. },
  10067. "providerID": {
  10068. "type": "string"
  10069. },
  10070. "mode": {
  10071. "type": "string"
  10072. },
  10073. "agent": {
  10074. "type": "string"
  10075. },
  10076. "path": {
  10077. "type": "object",
  10078. "properties": {
  10079. "cwd": {
  10080. "type": "string"
  10081. },
  10082. "root": {
  10083. "type": "string"
  10084. }
  10085. },
  10086. "required": ["cwd", "root"],
  10087. "additionalProperties": false
  10088. },
  10089. "summary": {
  10090. "type": "boolean"
  10091. },
  10092. "cost": {
  10093. "type": "number"
  10094. },
  10095. "tokens": {
  10096. "type": "object",
  10097. "properties": {
  10098. "total": {
  10099. "type": "number"
  10100. },
  10101. "input": {
  10102. "type": "number"
  10103. },
  10104. "output": {
  10105. "type": "number"
  10106. },
  10107. "reasoning": {
  10108. "type": "number"
  10109. },
  10110. "cache": {
  10111. "type": "object",
  10112. "properties": {
  10113. "read": {
  10114. "type": "number"
  10115. },
  10116. "write": {
  10117. "type": "number"
  10118. }
  10119. },
  10120. "required": ["read", "write"],
  10121. "additionalProperties": false
  10122. }
  10123. },
  10124. "required": ["input", "output", "reasoning", "cache"],
  10125. "additionalProperties": false
  10126. },
  10127. "structured": {},
  10128. "variant": {
  10129. "type": "string"
  10130. },
  10131. "finish": {
  10132. "type": "string"
  10133. }
  10134. },
  10135. "required": [
  10136. "id",
  10137. "sessionID",
  10138. "role",
  10139. "time",
  10140. "parentID",
  10141. "modelID",
  10142. "providerID",
  10143. "mode",
  10144. "agent",
  10145. "path",
  10146. "cost",
  10147. "tokens"
  10148. ],
  10149. "additionalProperties": false
  10150. },
  10151. "Message": {
  10152. "anyOf": [
  10153. {
  10154. "$ref": "#/components/schemas/UserMessage"
  10155. },
  10156. {
  10157. "$ref": "#/components/schemas/AssistantMessage"
  10158. }
  10159. ]
  10160. },
  10161. "TextPart": {
  10162. "type": "object",
  10163. "properties": {
  10164. "id": {
  10165. "type": "string",
  10166. "pattern": "^prt"
  10167. },
  10168. "sessionID": {
  10169. "type": "string",
  10170. "pattern": "^ses"
  10171. },
  10172. "messageID": {
  10173. "type": "string",
  10174. "pattern": "^msg"
  10175. },
  10176. "type": {
  10177. "type": "string",
  10178. "enum": ["text"]
  10179. },
  10180. "text": {
  10181. "type": "string"
  10182. },
  10183. "synthetic": {
  10184. "type": "boolean"
  10185. },
  10186. "ignored": {
  10187. "type": "boolean"
  10188. },
  10189. "time": {
  10190. "type": "object",
  10191. "properties": {
  10192. "start": {
  10193. "type": "integer",
  10194. "minimum": 0
  10195. },
  10196. "end": {
  10197. "type": "integer",
  10198. "minimum": 0
  10199. }
  10200. },
  10201. "required": ["start"],
  10202. "additionalProperties": false
  10203. },
  10204. "metadata": {
  10205. "type": "object"
  10206. }
  10207. },
  10208. "required": ["id", "sessionID", "messageID", "type", "text"],
  10209. "additionalProperties": false
  10210. },
  10211. "SubtaskPart": {
  10212. "type": "object",
  10213. "properties": {
  10214. "id": {
  10215. "type": "string",
  10216. "pattern": "^prt"
  10217. },
  10218. "sessionID": {
  10219. "type": "string",
  10220. "pattern": "^ses"
  10221. },
  10222. "messageID": {
  10223. "type": "string",
  10224. "pattern": "^msg"
  10225. },
  10226. "type": {
  10227. "type": "string",
  10228. "enum": ["subtask"]
  10229. },
  10230. "prompt": {
  10231. "type": "string"
  10232. },
  10233. "description": {
  10234. "type": "string"
  10235. },
  10236. "agent": {
  10237. "type": "string"
  10238. },
  10239. "model": {
  10240. "type": "object",
  10241. "properties": {
  10242. "providerID": {
  10243. "type": "string"
  10244. },
  10245. "modelID": {
  10246. "type": "string"
  10247. }
  10248. },
  10249. "required": ["providerID", "modelID"],
  10250. "additionalProperties": false
  10251. },
  10252. "command": {
  10253. "type": "string"
  10254. }
  10255. },
  10256. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  10257. "additionalProperties": false
  10258. },
  10259. "ReasoningPart": {
  10260. "type": "object",
  10261. "properties": {
  10262. "id": {
  10263. "type": "string",
  10264. "pattern": "^prt"
  10265. },
  10266. "sessionID": {
  10267. "type": "string",
  10268. "pattern": "^ses"
  10269. },
  10270. "messageID": {
  10271. "type": "string",
  10272. "pattern": "^msg"
  10273. },
  10274. "type": {
  10275. "type": "string",
  10276. "enum": ["reasoning"]
  10277. },
  10278. "text": {
  10279. "type": "string"
  10280. },
  10281. "metadata": {
  10282. "type": "object"
  10283. },
  10284. "time": {
  10285. "type": "object",
  10286. "properties": {
  10287. "start": {
  10288. "type": "integer",
  10289. "minimum": 0
  10290. },
  10291. "end": {
  10292. "type": "integer",
  10293. "minimum": 0
  10294. }
  10295. },
  10296. "required": ["start"],
  10297. "additionalProperties": false
  10298. }
  10299. },
  10300. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  10301. "additionalProperties": false
  10302. },
  10303. "FilePartSourceText": {
  10304. "type": "object",
  10305. "properties": {
  10306. "value": {
  10307. "type": "string"
  10308. },
  10309. "start": {
  10310. "type": "number"
  10311. },
  10312. "end": {
  10313. "type": "number"
  10314. }
  10315. },
  10316. "required": ["value", "start", "end"],
  10317. "additionalProperties": false
  10318. },
  10319. "FileSource": {
  10320. "type": "object",
  10321. "properties": {
  10322. "text": {
  10323. "$ref": "#/components/schemas/FilePartSourceText"
  10324. },
  10325. "type": {
  10326. "type": "string",
  10327. "enum": ["file"]
  10328. },
  10329. "path": {
  10330. "type": "string"
  10331. }
  10332. },
  10333. "required": ["text", "type", "path"],
  10334. "additionalProperties": false
  10335. },
  10336. "Range": {
  10337. "type": "object",
  10338. "properties": {
  10339. "start": {
  10340. "type": "object",
  10341. "properties": {
  10342. "line": {
  10343. "type": "integer",
  10344. "minimum": 0
  10345. },
  10346. "character": {
  10347. "type": "integer",
  10348. "minimum": 0
  10349. }
  10350. },
  10351. "required": ["line", "character"],
  10352. "additionalProperties": false
  10353. },
  10354. "end": {
  10355. "type": "object",
  10356. "properties": {
  10357. "line": {
  10358. "type": "integer",
  10359. "minimum": 0
  10360. },
  10361. "character": {
  10362. "type": "integer",
  10363. "minimum": 0
  10364. }
  10365. },
  10366. "required": ["line", "character"],
  10367. "additionalProperties": false
  10368. }
  10369. },
  10370. "required": ["start", "end"],
  10371. "additionalProperties": false
  10372. },
  10373. "SymbolSource": {
  10374. "type": "object",
  10375. "properties": {
  10376. "text": {
  10377. "$ref": "#/components/schemas/FilePartSourceText"
  10378. },
  10379. "type": {
  10380. "type": "string",
  10381. "enum": ["symbol"]
  10382. },
  10383. "path": {
  10384. "type": "string"
  10385. },
  10386. "range": {
  10387. "$ref": "#/components/schemas/Range"
  10388. },
  10389. "name": {
  10390. "type": "string"
  10391. },
  10392. "kind": {
  10393. "type": "integer",
  10394. "minimum": 0
  10395. }
  10396. },
  10397. "required": ["text", "type", "path", "range", "name", "kind"],
  10398. "additionalProperties": false
  10399. },
  10400. "ResourceSource": {
  10401. "type": "object",
  10402. "properties": {
  10403. "text": {
  10404. "$ref": "#/components/schemas/FilePartSourceText"
  10405. },
  10406. "type": {
  10407. "type": "string",
  10408. "enum": ["resource"]
  10409. },
  10410. "clientName": {
  10411. "type": "string"
  10412. },
  10413. "uri": {
  10414. "type": "string"
  10415. }
  10416. },
  10417. "required": ["text", "type", "clientName", "uri"],
  10418. "additionalProperties": false
  10419. },
  10420. "FilePartSource": {
  10421. "anyOf": [
  10422. {
  10423. "$ref": "#/components/schemas/FileSource"
  10424. },
  10425. {
  10426. "$ref": "#/components/schemas/SymbolSource"
  10427. },
  10428. {
  10429. "$ref": "#/components/schemas/ResourceSource"
  10430. }
  10431. ]
  10432. },
  10433. "FilePart": {
  10434. "type": "object",
  10435. "properties": {
  10436. "id": {
  10437. "type": "string",
  10438. "pattern": "^prt"
  10439. },
  10440. "sessionID": {
  10441. "type": "string",
  10442. "pattern": "^ses"
  10443. },
  10444. "messageID": {
  10445. "type": "string",
  10446. "pattern": "^msg"
  10447. },
  10448. "type": {
  10449. "type": "string",
  10450. "enum": ["file"]
  10451. },
  10452. "mime": {
  10453. "type": "string"
  10454. },
  10455. "filename": {
  10456. "type": "string"
  10457. },
  10458. "url": {
  10459. "type": "string"
  10460. },
  10461. "source": {
  10462. "$ref": "#/components/schemas/FilePartSource"
  10463. }
  10464. },
  10465. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  10466. "additionalProperties": false
  10467. },
  10468. "ToolStatePending": {
  10469. "type": "object",
  10470. "properties": {
  10471. "status": {
  10472. "type": "string",
  10473. "enum": ["pending"]
  10474. },
  10475. "input": {
  10476. "type": "object"
  10477. },
  10478. "raw": {
  10479. "type": "string"
  10480. }
  10481. },
  10482. "required": ["status", "input", "raw"],
  10483. "additionalProperties": false
  10484. },
  10485. "ToolStateRunning": {
  10486. "type": "object",
  10487. "properties": {
  10488. "status": {
  10489. "type": "string",
  10490. "enum": ["running"]
  10491. },
  10492. "input": {
  10493. "type": "object"
  10494. },
  10495. "title": {
  10496. "type": "string"
  10497. },
  10498. "metadata": {
  10499. "type": "object"
  10500. },
  10501. "time": {
  10502. "type": "object",
  10503. "properties": {
  10504. "start": {
  10505. "type": "integer",
  10506. "minimum": 0
  10507. }
  10508. },
  10509. "required": ["start"],
  10510. "additionalProperties": false
  10511. }
  10512. },
  10513. "required": ["status", "input", "time"],
  10514. "additionalProperties": false
  10515. },
  10516. "ToolStateCompleted": {
  10517. "type": "object",
  10518. "properties": {
  10519. "status": {
  10520. "type": "string",
  10521. "enum": ["completed"]
  10522. },
  10523. "input": {
  10524. "type": "object"
  10525. },
  10526. "output": {
  10527. "type": "string"
  10528. },
  10529. "title": {
  10530. "type": "string"
  10531. },
  10532. "metadata": {
  10533. "type": "object"
  10534. },
  10535. "time": {
  10536. "type": "object",
  10537. "properties": {
  10538. "start": {
  10539. "type": "integer",
  10540. "minimum": 0
  10541. },
  10542. "end": {
  10543. "type": "integer",
  10544. "minimum": 0
  10545. },
  10546. "compacted": {
  10547. "type": "integer",
  10548. "minimum": 0
  10549. }
  10550. },
  10551. "required": ["start", "end"],
  10552. "additionalProperties": false
  10553. },
  10554. "attachments": {
  10555. "type": "array",
  10556. "items": {
  10557. "$ref": "#/components/schemas/FilePart"
  10558. }
  10559. }
  10560. },
  10561. "required": ["status", "input", "output", "title", "metadata", "time"],
  10562. "additionalProperties": false
  10563. },
  10564. "ToolStateError": {
  10565. "type": "object",
  10566. "properties": {
  10567. "status": {
  10568. "type": "string",
  10569. "enum": ["error"]
  10570. },
  10571. "input": {
  10572. "type": "object"
  10573. },
  10574. "error": {
  10575. "type": "string"
  10576. },
  10577. "metadata": {
  10578. "type": "object"
  10579. },
  10580. "time": {
  10581. "type": "object",
  10582. "properties": {
  10583. "start": {
  10584. "type": "integer",
  10585. "minimum": 0
  10586. },
  10587. "end": {
  10588. "type": "integer",
  10589. "minimum": 0
  10590. }
  10591. },
  10592. "required": ["start", "end"],
  10593. "additionalProperties": false
  10594. }
  10595. },
  10596. "required": ["status", "input", "error", "time"],
  10597. "additionalProperties": false
  10598. },
  10599. "ToolState": {
  10600. "anyOf": [
  10601. {
  10602. "$ref": "#/components/schemas/ToolStatePending"
  10603. },
  10604. {
  10605. "$ref": "#/components/schemas/ToolStateRunning"
  10606. },
  10607. {
  10608. "$ref": "#/components/schemas/ToolStateCompleted"
  10609. },
  10610. {
  10611. "$ref": "#/components/schemas/ToolStateError"
  10612. }
  10613. ]
  10614. },
  10615. "ToolPart": {
  10616. "type": "object",
  10617. "properties": {
  10618. "id": {
  10619. "type": "string",
  10620. "pattern": "^prt"
  10621. },
  10622. "sessionID": {
  10623. "type": "string",
  10624. "pattern": "^ses"
  10625. },
  10626. "messageID": {
  10627. "type": "string",
  10628. "pattern": "^msg"
  10629. },
  10630. "type": {
  10631. "type": "string",
  10632. "enum": ["tool"]
  10633. },
  10634. "callID": {
  10635. "type": "string"
  10636. },
  10637. "tool": {
  10638. "type": "string"
  10639. },
  10640. "state": {
  10641. "$ref": "#/components/schemas/ToolState"
  10642. },
  10643. "metadata": {
  10644. "type": "object"
  10645. }
  10646. },
  10647. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  10648. "additionalProperties": false
  10649. },
  10650. "StepStartPart": {
  10651. "type": "object",
  10652. "properties": {
  10653. "id": {
  10654. "type": "string",
  10655. "pattern": "^prt"
  10656. },
  10657. "sessionID": {
  10658. "type": "string",
  10659. "pattern": "^ses"
  10660. },
  10661. "messageID": {
  10662. "type": "string",
  10663. "pattern": "^msg"
  10664. },
  10665. "type": {
  10666. "type": "string",
  10667. "enum": ["step-start"]
  10668. },
  10669. "snapshot": {
  10670. "type": "string"
  10671. }
  10672. },
  10673. "required": ["id", "sessionID", "messageID", "type"],
  10674. "additionalProperties": false
  10675. },
  10676. "StepFinishPart": {
  10677. "type": "object",
  10678. "properties": {
  10679. "id": {
  10680. "type": "string",
  10681. "pattern": "^prt"
  10682. },
  10683. "sessionID": {
  10684. "type": "string",
  10685. "pattern": "^ses"
  10686. },
  10687. "messageID": {
  10688. "type": "string",
  10689. "pattern": "^msg"
  10690. },
  10691. "type": {
  10692. "type": "string",
  10693. "enum": ["step-finish"]
  10694. },
  10695. "reason": {
  10696. "type": "string"
  10697. },
  10698. "snapshot": {
  10699. "type": "string"
  10700. },
  10701. "cost": {
  10702. "type": "number"
  10703. },
  10704. "tokens": {
  10705. "type": "object",
  10706. "properties": {
  10707. "total": {
  10708. "type": "number"
  10709. },
  10710. "input": {
  10711. "type": "number"
  10712. },
  10713. "output": {
  10714. "type": "number"
  10715. },
  10716. "reasoning": {
  10717. "type": "number"
  10718. },
  10719. "cache": {
  10720. "type": "object",
  10721. "properties": {
  10722. "read": {
  10723. "type": "number"
  10724. },
  10725. "write": {
  10726. "type": "number"
  10727. }
  10728. },
  10729. "required": ["read", "write"],
  10730. "additionalProperties": false
  10731. }
  10732. },
  10733. "required": ["input", "output", "reasoning", "cache"],
  10734. "additionalProperties": false
  10735. }
  10736. },
  10737. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  10738. "additionalProperties": false
  10739. },
  10740. "SnapshotPart": {
  10741. "type": "object",
  10742. "properties": {
  10743. "id": {
  10744. "type": "string",
  10745. "pattern": "^prt"
  10746. },
  10747. "sessionID": {
  10748. "type": "string",
  10749. "pattern": "^ses"
  10750. },
  10751. "messageID": {
  10752. "type": "string",
  10753. "pattern": "^msg"
  10754. },
  10755. "type": {
  10756. "type": "string",
  10757. "enum": ["snapshot"]
  10758. },
  10759. "snapshot": {
  10760. "type": "string"
  10761. }
  10762. },
  10763. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  10764. "additionalProperties": false
  10765. },
  10766. "PatchPart": {
  10767. "type": "object",
  10768. "properties": {
  10769. "id": {
  10770. "type": "string",
  10771. "pattern": "^prt"
  10772. },
  10773. "sessionID": {
  10774. "type": "string",
  10775. "pattern": "^ses"
  10776. },
  10777. "messageID": {
  10778. "type": "string",
  10779. "pattern": "^msg"
  10780. },
  10781. "type": {
  10782. "type": "string",
  10783. "enum": ["patch"]
  10784. },
  10785. "hash": {
  10786. "type": "string"
  10787. },
  10788. "files": {
  10789. "type": "array",
  10790. "items": {
  10791. "type": "string"
  10792. }
  10793. }
  10794. },
  10795. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  10796. "additionalProperties": false
  10797. },
  10798. "AgentPart": {
  10799. "type": "object",
  10800. "properties": {
  10801. "id": {
  10802. "type": "string",
  10803. "pattern": "^prt"
  10804. },
  10805. "sessionID": {
  10806. "type": "string",
  10807. "pattern": "^ses"
  10808. },
  10809. "messageID": {
  10810. "type": "string",
  10811. "pattern": "^msg"
  10812. },
  10813. "type": {
  10814. "type": "string",
  10815. "enum": ["agent"]
  10816. },
  10817. "name": {
  10818. "type": "string"
  10819. },
  10820. "source": {
  10821. "type": "object",
  10822. "properties": {
  10823. "value": {
  10824. "type": "string"
  10825. },
  10826. "start": {
  10827. "type": "integer",
  10828. "minimum": 0
  10829. },
  10830. "end": {
  10831. "type": "integer",
  10832. "minimum": 0
  10833. }
  10834. },
  10835. "required": ["value", "start", "end"],
  10836. "additionalProperties": false
  10837. }
  10838. },
  10839. "required": ["id", "sessionID", "messageID", "type", "name"],
  10840. "additionalProperties": false
  10841. },
  10842. "RetryPart": {
  10843. "type": "object",
  10844. "properties": {
  10845. "id": {
  10846. "type": "string",
  10847. "pattern": "^prt"
  10848. },
  10849. "sessionID": {
  10850. "type": "string",
  10851. "pattern": "^ses"
  10852. },
  10853. "messageID": {
  10854. "type": "string",
  10855. "pattern": "^msg"
  10856. },
  10857. "type": {
  10858. "type": "string",
  10859. "enum": ["retry"]
  10860. },
  10861. "attempt": {
  10862. "type": "integer",
  10863. "minimum": 0
  10864. },
  10865. "error": {
  10866. "$ref": "#/components/schemas/APIError"
  10867. },
  10868. "time": {
  10869. "type": "object",
  10870. "properties": {
  10871. "created": {
  10872. "type": "integer",
  10873. "minimum": 0
  10874. }
  10875. },
  10876. "required": ["created"],
  10877. "additionalProperties": false
  10878. }
  10879. },
  10880. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  10881. "additionalProperties": false
  10882. },
  10883. "CompactionPart": {
  10884. "type": "object",
  10885. "properties": {
  10886. "id": {
  10887. "type": "string",
  10888. "pattern": "^prt"
  10889. },
  10890. "sessionID": {
  10891. "type": "string",
  10892. "pattern": "^ses"
  10893. },
  10894. "messageID": {
  10895. "type": "string",
  10896. "pattern": "^msg"
  10897. },
  10898. "type": {
  10899. "type": "string",
  10900. "enum": ["compaction"]
  10901. },
  10902. "auto": {
  10903. "type": "boolean"
  10904. },
  10905. "overflow": {
  10906. "type": "boolean"
  10907. },
  10908. "tail_start_id": {
  10909. "type": "string",
  10910. "pattern": "^msg"
  10911. }
  10912. },
  10913. "required": ["id", "sessionID", "messageID", "type", "auto"],
  10914. "additionalProperties": false
  10915. },
  10916. "Part": {
  10917. "anyOf": [
  10918. {
  10919. "$ref": "#/components/schemas/TextPart"
  10920. },
  10921. {
  10922. "$ref": "#/components/schemas/SubtaskPart"
  10923. },
  10924. {
  10925. "$ref": "#/components/schemas/ReasoningPart"
  10926. },
  10927. {
  10928. "$ref": "#/components/schemas/FilePart"
  10929. },
  10930. {
  10931. "$ref": "#/components/schemas/ToolPart"
  10932. },
  10933. {
  10934. "$ref": "#/components/schemas/StepStartPart"
  10935. },
  10936. {
  10937. "$ref": "#/components/schemas/StepFinishPart"
  10938. },
  10939. {
  10940. "$ref": "#/components/schemas/SnapshotPart"
  10941. },
  10942. {
  10943. "$ref": "#/components/schemas/PatchPart"
  10944. },
  10945. {
  10946. "$ref": "#/components/schemas/AgentPart"
  10947. },
  10948. {
  10949. "$ref": "#/components/schemas/RetryPart"
  10950. },
  10951. {
  10952. "$ref": "#/components/schemas/CompactionPart"
  10953. }
  10954. ]
  10955. },
  10956. "PermissionAction": {
  10957. "type": "string",
  10958. "enum": ["allow", "deny", "ask"]
  10959. },
  10960. "PermissionRule": {
  10961. "type": "object",
  10962. "properties": {
  10963. "permission": {
  10964. "type": "string"
  10965. },
  10966. "pattern": {
  10967. "type": "string"
  10968. },
  10969. "action": {
  10970. "$ref": "#/components/schemas/PermissionAction"
  10971. }
  10972. },
  10973. "required": ["permission", "pattern", "action"],
  10974. "additionalProperties": false
  10975. },
  10976. "PermissionRuleset": {
  10977. "type": "array",
  10978. "items": {
  10979. "$ref": "#/components/schemas/PermissionRule"
  10980. }
  10981. },
  10982. "Session": {
  10983. "type": "object",
  10984. "properties": {
  10985. "id": {
  10986. "type": "string",
  10987. "pattern": "^ses"
  10988. },
  10989. "slug": {
  10990. "type": "string"
  10991. },
  10992. "projectID": {
  10993. "type": "string"
  10994. },
  10995. "workspaceID": {
  10996. "type": "string",
  10997. "pattern": "^wrk"
  10998. },
  10999. "directory": {
  11000. "type": "string"
  11001. },
  11002. "path": {
  11003. "type": "string"
  11004. },
  11005. "parentID": {
  11006. "type": "string",
  11007. "pattern": "^ses"
  11008. },
  11009. "summary": {
  11010. "type": "object",
  11011. "properties": {
  11012. "additions": {
  11013. "type": "number"
  11014. },
  11015. "deletions": {
  11016. "type": "number"
  11017. },
  11018. "files": {
  11019. "type": "number"
  11020. },
  11021. "diffs": {
  11022. "type": "array",
  11023. "items": {
  11024. "$ref": "#/components/schemas/SnapshotFileDiff"
  11025. }
  11026. }
  11027. },
  11028. "required": ["additions", "deletions", "files"],
  11029. "additionalProperties": false
  11030. },
  11031. "cost": {
  11032. "type": "number"
  11033. },
  11034. "tokens": {
  11035. "type": "object",
  11036. "properties": {
  11037. "input": {
  11038. "type": "number"
  11039. },
  11040. "output": {
  11041. "type": "number"
  11042. },
  11043. "reasoning": {
  11044. "type": "number"
  11045. },
  11046. "cache": {
  11047. "type": "object",
  11048. "properties": {
  11049. "read": {
  11050. "type": "number"
  11051. },
  11052. "write": {
  11053. "type": "number"
  11054. }
  11055. },
  11056. "required": ["read", "write"],
  11057. "additionalProperties": false
  11058. }
  11059. },
  11060. "required": ["input", "output", "reasoning", "cache"],
  11061. "additionalProperties": false
  11062. },
  11063. "share": {
  11064. "type": "object",
  11065. "properties": {
  11066. "url": {
  11067. "type": "string"
  11068. }
  11069. },
  11070. "required": ["url"],
  11071. "additionalProperties": false
  11072. },
  11073. "title": {
  11074. "type": "string"
  11075. },
  11076. "agent": {
  11077. "type": "string"
  11078. },
  11079. "model": {
  11080. "type": "object",
  11081. "properties": {
  11082. "id": {
  11083. "type": "string"
  11084. },
  11085. "providerID": {
  11086. "type": "string"
  11087. },
  11088. "variant": {
  11089. "type": "string"
  11090. }
  11091. },
  11092. "required": ["id", "providerID"],
  11093. "additionalProperties": false
  11094. },
  11095. "version": {
  11096. "type": "string"
  11097. },
  11098. "time": {
  11099. "type": "object",
  11100. "properties": {
  11101. "created": {
  11102. "type": "integer",
  11103. "minimum": 0
  11104. },
  11105. "updated": {
  11106. "type": "integer",
  11107. "minimum": 0
  11108. },
  11109. "compacting": {
  11110. "type": "integer",
  11111. "minimum": 0
  11112. },
  11113. "archived": {
  11114. "type": "number"
  11115. }
  11116. },
  11117. "required": ["created", "updated"],
  11118. "additionalProperties": false
  11119. },
  11120. "permission": {
  11121. "$ref": "#/components/schemas/PermissionRuleset"
  11122. },
  11123. "revert": {
  11124. "type": "object",
  11125. "properties": {
  11126. "messageID": {
  11127. "type": "string",
  11128. "pattern": "^msg"
  11129. },
  11130. "partID": {
  11131. "type": "string",
  11132. "pattern": "^prt"
  11133. },
  11134. "snapshot": {
  11135. "type": "string"
  11136. },
  11137. "diff": {
  11138. "type": "string"
  11139. }
  11140. },
  11141. "required": ["messageID"],
  11142. "additionalProperties": false
  11143. }
  11144. },
  11145. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11146. "additionalProperties": false
  11147. },
  11148. "Prompt": {
  11149. "type": "object",
  11150. "properties": {
  11151. "text": {
  11152. "type": "string"
  11153. },
  11154. "files": {
  11155. "type": "array",
  11156. "items": {
  11157. "$ref": "#/components/schemas/PromptFileAttachment"
  11158. }
  11159. },
  11160. "agents": {
  11161. "type": "array",
  11162. "items": {
  11163. "$ref": "#/components/schemas/PromptAgentAttachment"
  11164. }
  11165. },
  11166. "references": {
  11167. "type": "array",
  11168. "items": {
  11169. "$ref": "#/components/schemas/PromptReferenceAttachment"
  11170. }
  11171. }
  11172. },
  11173. "required": ["text"],
  11174. "additionalProperties": false
  11175. },
  11176. "GlobalEvent": {
  11177. "type": "object",
  11178. "properties": {
  11179. "directory": {
  11180. "type": "string"
  11181. },
  11182. "project": {
  11183. "type": "string"
  11184. },
  11185. "workspace": {
  11186. "type": "string"
  11187. },
  11188. "payload": {
  11189. "anyOf": [
  11190. {
  11191. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  11192. },
  11193. {
  11194. "$ref": "#/components/schemas/EventFileEdited"
  11195. },
  11196. {
  11197. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  11198. },
  11199. {
  11200. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  11201. },
  11202. {
  11203. "$ref": "#/components/schemas/EventLspUpdated"
  11204. },
  11205. {
  11206. "$ref": "#/components/schemas/EventMessagePartDelta"
  11207. },
  11208. {
  11209. "$ref": "#/components/schemas/EventPermissionAsked"
  11210. },
  11211. {
  11212. "$ref": "#/components/schemas/EventPermissionReplied"
  11213. },
  11214. {
  11215. "$ref": "#/components/schemas/EventSessionDiff"
  11216. },
  11217. {
  11218. "$ref": "#/components/schemas/EventSessionError"
  11219. },
  11220. {
  11221. "$ref": "#/components/schemas/EventInstallationUpdated"
  11222. },
  11223. {
  11224. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11225. },
  11226. {
  11227. "$ref": "#/components/schemas/EventQuestionAsked"
  11228. },
  11229. {
  11230. "$ref": "#/components/schemas/EventQuestionReplied"
  11231. },
  11232. {
  11233. "$ref": "#/components/schemas/EventQuestionRejected"
  11234. },
  11235. {
  11236. "$ref": "#/components/schemas/EventTodoUpdated"
  11237. },
  11238. {
  11239. "$ref": "#/components/schemas/EventSessionStatus"
  11240. },
  11241. {
  11242. "$ref": "#/components/schemas/EventSessionIdle"
  11243. },
  11244. {
  11245. "$ref": "#/components/schemas/EventSessionCompacted"
  11246. },
  11247. {
  11248. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11249. },
  11250. {
  11251. "$ref": "#/components/schemas/Event.tui.command.execute"
  11252. },
  11253. {
  11254. "$ref": "#/components/schemas/Event.tui.toast.show"
  11255. },
  11256. {
  11257. "$ref": "#/components/schemas/Event.tui.session.select"
  11258. },
  11259. {
  11260. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11261. },
  11262. {
  11263. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11264. },
  11265. {
  11266. "$ref": "#/components/schemas/EventCommandExecuted"
  11267. },
  11268. {
  11269. "$ref": "#/components/schemas/EventProjectUpdated"
  11270. },
  11271. {
  11272. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11273. },
  11274. {
  11275. "$ref": "#/components/schemas/EventWorkspaceReady"
  11276. },
  11277. {
  11278. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11279. },
  11280. {
  11281. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11282. },
  11283. {
  11284. "$ref": "#/components/schemas/EventWorktreeReady"
  11285. },
  11286. {
  11287. "$ref": "#/components/schemas/EventWorktreeFailed"
  11288. },
  11289. {
  11290. "$ref": "#/components/schemas/EventPtyCreated"
  11291. },
  11292. {
  11293. "$ref": "#/components/schemas/EventPtyUpdated"
  11294. },
  11295. {
  11296. "$ref": "#/components/schemas/EventPtyExited"
  11297. },
  11298. {
  11299. "$ref": "#/components/schemas/EventPtyDeleted"
  11300. },
  11301. {
  11302. "$ref": "#/components/schemas/EventMessageUpdated"
  11303. },
  11304. {
  11305. "$ref": "#/components/schemas/EventMessageRemoved"
  11306. },
  11307. {
  11308. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11309. },
  11310. {
  11311. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11312. },
  11313. {
  11314. "$ref": "#/components/schemas/EventSessionCreated"
  11315. },
  11316. {
  11317. "$ref": "#/components/schemas/EventSessionUpdated"
  11318. },
  11319. {
  11320. "$ref": "#/components/schemas/EventSessionDeleted"
  11321. },
  11322. {
  11323. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11324. },
  11325. {
  11326. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11327. },
  11328. {
  11329. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11330. },
  11331. {
  11332. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11333. },
  11334. {
  11335. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11336. },
  11337. {
  11338. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11339. },
  11340. {
  11341. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11342. },
  11343. {
  11344. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11345. },
  11346. {
  11347. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11348. },
  11349. {
  11350. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11351. },
  11352. {
  11353. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11354. },
  11355. {
  11356. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11357. },
  11358. {
  11359. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11360. },
  11361. {
  11362. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11363. },
  11364. {
  11365. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11366. },
  11367. {
  11368. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11369. },
  11370. {
  11371. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11372. },
  11373. {
  11374. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11375. },
  11376. {
  11377. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11378. },
  11379. {
  11380. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11381. },
  11382. {
  11383. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11384. },
  11385. {
  11386. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11387. },
  11388. {
  11389. "$ref": "#/components/schemas/EventSessionNextRetried"
  11390. },
  11391. {
  11392. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11393. },
  11394. {
  11395. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11396. },
  11397. {
  11398. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11399. },
  11400. {
  11401. "$ref": "#/components/schemas/EventServerConnected"
  11402. },
  11403. {
  11404. "$ref": "#/components/schemas/EventGlobalDisposed"
  11405. },
  11406. {
  11407. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  11408. },
  11409. {
  11410. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  11411. },
  11412. {
  11413. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  11414. },
  11415. {
  11416. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  11417. },
  11418. {
  11419. "$ref": "#/components/schemas/SyncEventSessionCreated"
  11420. },
  11421. {
  11422. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  11423. },
  11424. {
  11425. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  11426. },
  11427. {
  11428. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  11429. },
  11430. {
  11431. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  11432. },
  11433. {
  11434. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  11435. },
  11436. {
  11437. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  11438. },
  11439. {
  11440. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  11441. },
  11442. {
  11443. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  11444. },
  11445. {
  11446. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  11447. },
  11448. {
  11449. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  11450. },
  11451. {
  11452. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  11453. },
  11454. {
  11455. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  11456. },
  11457. {
  11458. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  11459. },
  11460. {
  11461. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  11462. },
  11463. {
  11464. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  11465. },
  11466. {
  11467. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  11468. },
  11469. {
  11470. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  11471. },
  11472. {
  11473. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  11474. },
  11475. {
  11476. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  11477. },
  11478. {
  11479. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  11480. },
  11481. {
  11482. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  11483. },
  11484. {
  11485. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  11486. },
  11487. {
  11488. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  11489. },
  11490. {
  11491. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  11492. },
  11493. {
  11494. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  11495. },
  11496. {
  11497. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  11498. },
  11499. {
  11500. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  11501. },
  11502. {
  11503. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  11504. }
  11505. ]
  11506. }
  11507. },
  11508. "required": ["directory", "payload"],
  11509. "additionalProperties": false
  11510. },
  11511. "LogLevel": {
  11512. "type": "string",
  11513. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  11514. "description": "Log level"
  11515. },
  11516. "ServerConfig": {
  11517. "type": "object",
  11518. "properties": {
  11519. "port": {
  11520. "type": "integer",
  11521. "exclusiveMinimum": 0
  11522. },
  11523. "hostname": {
  11524. "type": "string"
  11525. },
  11526. "mdns": {
  11527. "type": "boolean"
  11528. },
  11529. "mdnsDomain": {
  11530. "type": "string"
  11531. },
  11532. "cors": {
  11533. "type": "array",
  11534. "items": {
  11535. "type": "string"
  11536. }
  11537. }
  11538. },
  11539. "additionalProperties": false,
  11540. "description": "Server configuration for opencode serve and web commands"
  11541. },
  11542. "ReferenceConfigEntry": {
  11543. "anyOf": [
  11544. {
  11545. "type": "string"
  11546. },
  11547. {
  11548. "type": "object",
  11549. "properties": {
  11550. "repository": {
  11551. "type": "string",
  11552. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  11553. },
  11554. "branch": {
  11555. "type": "string"
  11556. }
  11557. },
  11558. "required": ["repository"],
  11559. "additionalProperties": false
  11560. },
  11561. {
  11562. "type": "object",
  11563. "properties": {
  11564. "path": {
  11565. "type": "string",
  11566. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  11567. }
  11568. },
  11569. "required": ["path"],
  11570. "additionalProperties": false
  11571. }
  11572. ]
  11573. },
  11574. "ReferenceConfig": {
  11575. "type": "object",
  11576. "additionalProperties": {
  11577. "$ref": "#/components/schemas/ReferenceConfigEntry"
  11578. }
  11579. },
  11580. "PermissionActionConfig": {
  11581. "type": "string",
  11582. "enum": ["ask", "allow", "deny"]
  11583. },
  11584. "PermissionObjectConfig": {
  11585. "type": "object",
  11586. "additionalProperties": {
  11587. "$ref": "#/components/schemas/PermissionActionConfig"
  11588. }
  11589. },
  11590. "PermissionRuleConfig": {
  11591. "anyOf": [
  11592. {
  11593. "$ref": "#/components/schemas/PermissionActionConfig"
  11594. },
  11595. {
  11596. "$ref": "#/components/schemas/PermissionObjectConfig"
  11597. }
  11598. ]
  11599. },
  11600. "PermissionConfig": {
  11601. "anyOf": [
  11602. {
  11603. "$ref": "#/components/schemas/PermissionActionConfig"
  11604. },
  11605. {
  11606. "type": "object",
  11607. "properties": {
  11608. "read": {
  11609. "$ref": "#/components/schemas/PermissionRuleConfig"
  11610. },
  11611. "edit": {
  11612. "$ref": "#/components/schemas/PermissionRuleConfig"
  11613. },
  11614. "glob": {
  11615. "$ref": "#/components/schemas/PermissionRuleConfig"
  11616. },
  11617. "grep": {
  11618. "$ref": "#/components/schemas/PermissionRuleConfig"
  11619. },
  11620. "list": {
  11621. "$ref": "#/components/schemas/PermissionRuleConfig"
  11622. },
  11623. "bash": {
  11624. "$ref": "#/components/schemas/PermissionRuleConfig"
  11625. },
  11626. "task": {
  11627. "$ref": "#/components/schemas/PermissionRuleConfig"
  11628. },
  11629. "external_directory": {
  11630. "$ref": "#/components/schemas/PermissionRuleConfig"
  11631. },
  11632. "todowrite": {
  11633. "$ref": "#/components/schemas/PermissionActionConfig"
  11634. },
  11635. "question": {
  11636. "$ref": "#/components/schemas/PermissionActionConfig"
  11637. },
  11638. "webfetch": {
  11639. "$ref": "#/components/schemas/PermissionActionConfig"
  11640. },
  11641. "websearch": {
  11642. "$ref": "#/components/schemas/PermissionActionConfig"
  11643. },
  11644. "repo_clone": {
  11645. "$ref": "#/components/schemas/PermissionRuleConfig"
  11646. },
  11647. "repo_overview": {
  11648. "$ref": "#/components/schemas/PermissionRuleConfig"
  11649. },
  11650. "lsp": {
  11651. "$ref": "#/components/schemas/PermissionRuleConfig"
  11652. },
  11653. "doom_loop": {
  11654. "$ref": "#/components/schemas/PermissionActionConfig"
  11655. },
  11656. "skill": {
  11657. "$ref": "#/components/schemas/PermissionRuleConfig"
  11658. }
  11659. },
  11660. "additionalProperties": {
  11661. "$ref": "#/components/schemas/PermissionRuleConfig"
  11662. }
  11663. }
  11664. ]
  11665. },
  11666. "AgentConfig": {
  11667. "type": "object",
  11668. "properties": {
  11669. "model": {
  11670. "type": "string"
  11671. },
  11672. "variant": {
  11673. "type": "string"
  11674. },
  11675. "temperature": {
  11676. "type": "number"
  11677. },
  11678. "top_p": {
  11679. "type": "number"
  11680. },
  11681. "prompt": {
  11682. "type": "string"
  11683. },
  11684. "tools": {
  11685. "type": "object",
  11686. "additionalProperties": {
  11687. "type": "boolean"
  11688. }
  11689. },
  11690. "disable": {
  11691. "type": "boolean"
  11692. },
  11693. "description": {
  11694. "type": "string"
  11695. },
  11696. "mode": {
  11697. "type": "string",
  11698. "enum": ["subagent", "primary", "all"]
  11699. },
  11700. "hidden": {
  11701. "type": "boolean"
  11702. },
  11703. "options": {
  11704. "type": "object"
  11705. },
  11706. "color": {
  11707. "anyOf": [
  11708. {
  11709. "type": "string",
  11710. "pattern": "^#[0-9a-fA-F]{6}$"
  11711. },
  11712. {
  11713. "type": "string",
  11714. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11715. }
  11716. ],
  11717. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  11718. },
  11719. "steps": {
  11720. "type": "integer",
  11721. "exclusiveMinimum": 0
  11722. },
  11723. "maxSteps": {
  11724. "type": "integer",
  11725. "exclusiveMinimum": 0
  11726. },
  11727. "permission": {
  11728. "$ref": "#/components/schemas/PermissionConfig"
  11729. }
  11730. },
  11731. "additionalProperties": {}
  11732. },
  11733. "ProviderConfig": {
  11734. "type": "object",
  11735. "properties": {
  11736. "api": {
  11737. "type": "string"
  11738. },
  11739. "name": {
  11740. "type": "string"
  11741. },
  11742. "env": {
  11743. "type": "array",
  11744. "items": {
  11745. "type": "string"
  11746. }
  11747. },
  11748. "id": {
  11749. "type": "string"
  11750. },
  11751. "npm": {
  11752. "type": "string"
  11753. },
  11754. "whitelist": {
  11755. "type": "array",
  11756. "items": {
  11757. "type": "string"
  11758. }
  11759. },
  11760. "blacklist": {
  11761. "type": "array",
  11762. "items": {
  11763. "type": "string"
  11764. }
  11765. },
  11766. "options": {
  11767. "type": "object",
  11768. "properties": {
  11769. "apiKey": {
  11770. "type": "string"
  11771. },
  11772. "baseURL": {
  11773. "type": "string"
  11774. },
  11775. "enterpriseUrl": {
  11776. "type": "string"
  11777. },
  11778. "setCacheKey": {
  11779. "type": "boolean"
  11780. },
  11781. "timeout": {
  11782. "anyOf": [
  11783. {
  11784. "type": "integer",
  11785. "exclusiveMinimum": 0
  11786. },
  11787. {
  11788. "type": "boolean",
  11789. "enum": [false]
  11790. }
  11791. ],
  11792. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  11793. },
  11794. "chunkTimeout": {
  11795. "type": "integer",
  11796. "exclusiveMinimum": 0
  11797. }
  11798. },
  11799. "additionalProperties": {}
  11800. },
  11801. "models": {
  11802. "type": "object",
  11803. "additionalProperties": {
  11804. "type": "object",
  11805. "properties": {
  11806. "id": {
  11807. "type": "string"
  11808. },
  11809. "name": {
  11810. "type": "string"
  11811. },
  11812. "family": {
  11813. "type": "string"
  11814. },
  11815. "release_date": {
  11816. "type": "string"
  11817. },
  11818. "attachment": {
  11819. "type": "boolean"
  11820. },
  11821. "reasoning": {
  11822. "type": "boolean"
  11823. },
  11824. "temperature": {
  11825. "type": "boolean"
  11826. },
  11827. "tool_call": {
  11828. "type": "boolean"
  11829. },
  11830. "interleaved": {
  11831. "anyOf": [
  11832. {
  11833. "type": "boolean",
  11834. "enum": [true]
  11835. },
  11836. {
  11837. "type": "object",
  11838. "properties": {
  11839. "field": {
  11840. "type": "string",
  11841. "enum": ["reasoning_content", "reasoning_details"]
  11842. }
  11843. },
  11844. "required": ["field"],
  11845. "additionalProperties": false
  11846. }
  11847. ]
  11848. },
  11849. "cost": {
  11850. "type": "object",
  11851. "properties": {
  11852. "input": {
  11853. "type": "number"
  11854. },
  11855. "output": {
  11856. "type": "number"
  11857. },
  11858. "cache_read": {
  11859. "type": "number"
  11860. },
  11861. "cache_write": {
  11862. "type": "number"
  11863. },
  11864. "context_over_200k": {
  11865. "type": "object",
  11866. "properties": {
  11867. "input": {
  11868. "type": "number"
  11869. },
  11870. "output": {
  11871. "type": "number"
  11872. },
  11873. "cache_read": {
  11874. "type": "number"
  11875. },
  11876. "cache_write": {
  11877. "type": "number"
  11878. }
  11879. },
  11880. "required": ["input", "output"],
  11881. "additionalProperties": false
  11882. }
  11883. },
  11884. "required": ["input", "output"],
  11885. "additionalProperties": false
  11886. },
  11887. "limit": {
  11888. "type": "object",
  11889. "properties": {
  11890. "context": {
  11891. "type": "number"
  11892. },
  11893. "input": {
  11894. "type": "number"
  11895. },
  11896. "output": {
  11897. "type": "number"
  11898. }
  11899. },
  11900. "required": ["context", "output"],
  11901. "additionalProperties": false
  11902. },
  11903. "modalities": {
  11904. "type": "object",
  11905. "properties": {
  11906. "input": {
  11907. "type": "array",
  11908. "items": {
  11909. "type": "string",
  11910. "enum": ["text", "audio", "image", "video", "pdf"]
  11911. }
  11912. },
  11913. "output": {
  11914. "type": "array",
  11915. "items": {
  11916. "type": "string",
  11917. "enum": ["text", "audio", "image", "video", "pdf"]
  11918. }
  11919. }
  11920. },
  11921. "required": ["input", "output"],
  11922. "additionalProperties": false
  11923. },
  11924. "experimental": {
  11925. "type": "boolean"
  11926. },
  11927. "status": {
  11928. "type": "string",
  11929. "enum": ["alpha", "beta", "deprecated", "active"]
  11930. },
  11931. "provider": {
  11932. "type": "object",
  11933. "properties": {
  11934. "npm": {
  11935. "type": "string"
  11936. },
  11937. "api": {
  11938. "type": "string"
  11939. }
  11940. },
  11941. "additionalProperties": false
  11942. },
  11943. "options": {
  11944. "type": "object"
  11945. },
  11946. "headers": {
  11947. "type": "object",
  11948. "additionalProperties": {
  11949. "type": "string"
  11950. }
  11951. },
  11952. "variants": {
  11953. "type": "object",
  11954. "additionalProperties": {
  11955. "type": "object",
  11956. "properties": {
  11957. "disabled": {
  11958. "type": "boolean"
  11959. }
  11960. },
  11961. "additionalProperties": {}
  11962. },
  11963. "description": "Variant-specific configuration"
  11964. }
  11965. },
  11966. "additionalProperties": false
  11967. }
  11968. }
  11969. },
  11970. "additionalProperties": false
  11971. },
  11972. "McpLocalConfig": {
  11973. "type": "object",
  11974. "properties": {
  11975. "type": {
  11976. "type": "string",
  11977. "enum": ["local"],
  11978. "description": "Type of MCP server connection"
  11979. },
  11980. "command": {
  11981. "type": "array",
  11982. "items": {
  11983. "type": "string"
  11984. },
  11985. "description": "Command and arguments to run the MCP server"
  11986. },
  11987. "environment": {
  11988. "type": "object",
  11989. "additionalProperties": {
  11990. "type": "string"
  11991. }
  11992. },
  11993. "enabled": {
  11994. "type": "boolean"
  11995. },
  11996. "timeout": {
  11997. "type": "integer",
  11998. "exclusiveMinimum": 0
  11999. }
  12000. },
  12001. "required": ["type", "command"],
  12002. "additionalProperties": false
  12003. },
  12004. "McpOAuthConfig": {
  12005. "type": "object",
  12006. "properties": {
  12007. "clientId": {
  12008. "type": "string"
  12009. },
  12010. "clientSecret": {
  12011. "type": "string"
  12012. },
  12013. "scope": {
  12014. "type": "string"
  12015. },
  12016. "redirectUri": {
  12017. "type": "string"
  12018. }
  12019. },
  12020. "additionalProperties": false
  12021. },
  12022. "McpRemoteConfig": {
  12023. "type": "object",
  12024. "properties": {
  12025. "type": {
  12026. "type": "string",
  12027. "enum": ["remote"],
  12028. "description": "Type of MCP server connection"
  12029. },
  12030. "url": {
  12031. "type": "string",
  12032. "description": "URL of the remote MCP server"
  12033. },
  12034. "enabled": {
  12035. "type": "boolean"
  12036. },
  12037. "headers": {
  12038. "type": "object",
  12039. "additionalProperties": {
  12040. "type": "string"
  12041. }
  12042. },
  12043. "oauth": {
  12044. "anyOf": [
  12045. {
  12046. "$ref": "#/components/schemas/McpOAuthConfig"
  12047. },
  12048. {
  12049. "type": "boolean",
  12050. "enum": [false]
  12051. }
  12052. ],
  12053. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  12054. },
  12055. "timeout": {
  12056. "type": "integer",
  12057. "exclusiveMinimum": 0
  12058. }
  12059. },
  12060. "required": ["type", "url"],
  12061. "additionalProperties": false
  12062. },
  12063. "LayoutConfig": {
  12064. "type": "string",
  12065. "enum": ["auto", "stretch"],
  12066. "description": "@deprecated Always uses stretch layout."
  12067. },
  12068. "ImageAttachmentConfig": {
  12069. "type": "object",
  12070. "properties": {
  12071. "auto_resize": {
  12072. "type": "boolean"
  12073. },
  12074. "max_width": {
  12075. "type": "integer",
  12076. "exclusiveMinimum": 0
  12077. },
  12078. "max_height": {
  12079. "type": "integer",
  12080. "exclusiveMinimum": 0
  12081. },
  12082. "max_base64_bytes": {
  12083. "type": "integer",
  12084. "exclusiveMinimum": 0
  12085. }
  12086. },
  12087. "additionalProperties": false
  12088. },
  12089. "AttachmentConfig": {
  12090. "type": "object",
  12091. "properties": {
  12092. "image": {
  12093. "$ref": "#/components/schemas/ImageAttachmentConfig"
  12094. }
  12095. },
  12096. "additionalProperties": false
  12097. },
  12098. "Config": {
  12099. "type": "object",
  12100. "properties": {
  12101. "$schema": {
  12102. "type": "string"
  12103. },
  12104. "shell": {
  12105. "type": "string"
  12106. },
  12107. "logLevel": {
  12108. "$ref": "#/components/schemas/LogLevel"
  12109. },
  12110. "server": {
  12111. "$ref": "#/components/schemas/ServerConfig"
  12112. },
  12113. "command": {
  12114. "type": "object",
  12115. "additionalProperties": {
  12116. "type": "object",
  12117. "properties": {
  12118. "template": {
  12119. "type": "string"
  12120. },
  12121. "description": {
  12122. "type": "string"
  12123. },
  12124. "agent": {
  12125. "type": "string"
  12126. },
  12127. "model": {
  12128. "type": "string"
  12129. },
  12130. "subtask": {
  12131. "type": "boolean"
  12132. }
  12133. },
  12134. "required": ["template"],
  12135. "additionalProperties": false
  12136. }
  12137. },
  12138. "skills": {
  12139. "type": "object",
  12140. "properties": {
  12141. "paths": {
  12142. "type": "array",
  12143. "items": {
  12144. "type": "string"
  12145. }
  12146. },
  12147. "urls": {
  12148. "type": "array",
  12149. "items": {
  12150. "type": "string"
  12151. }
  12152. }
  12153. },
  12154. "additionalProperties": false
  12155. },
  12156. "reference": {
  12157. "$ref": "#/components/schemas/ReferenceConfig"
  12158. },
  12159. "watcher": {
  12160. "type": "object",
  12161. "properties": {
  12162. "ignore": {
  12163. "type": "array",
  12164. "items": {
  12165. "type": "string"
  12166. }
  12167. }
  12168. },
  12169. "additionalProperties": false
  12170. },
  12171. "snapshot": {
  12172. "type": "boolean"
  12173. },
  12174. "plugin": {
  12175. "type": "array",
  12176. "items": {
  12177. "anyOf": [
  12178. {
  12179. "type": "string"
  12180. },
  12181. {
  12182. "type": "array",
  12183. "prefixItems": [
  12184. {
  12185. "type": "string"
  12186. },
  12187. {
  12188. "type": "object"
  12189. }
  12190. ],
  12191. "maxItems": 2,
  12192. "minItems": 2
  12193. }
  12194. ]
  12195. }
  12196. },
  12197. "share": {
  12198. "type": "string",
  12199. "enum": ["manual", "auto", "disabled"]
  12200. },
  12201. "autoshare": {
  12202. "type": "boolean"
  12203. },
  12204. "autoupdate": {
  12205. "anyOf": [
  12206. {
  12207. "type": "boolean"
  12208. },
  12209. {
  12210. "type": "string",
  12211. "enum": ["notify"]
  12212. }
  12213. ],
  12214. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  12215. },
  12216. "disabled_providers": {
  12217. "type": "array",
  12218. "items": {
  12219. "type": "string"
  12220. }
  12221. },
  12222. "enabled_providers": {
  12223. "type": "array",
  12224. "items": {
  12225. "type": "string"
  12226. }
  12227. },
  12228. "model": {
  12229. "type": "string"
  12230. },
  12231. "small_model": {
  12232. "type": "string"
  12233. },
  12234. "default_agent": {
  12235. "type": "string"
  12236. },
  12237. "username": {
  12238. "type": "string"
  12239. },
  12240. "mode": {
  12241. "type": "object",
  12242. "properties": {
  12243. "build": {
  12244. "$ref": "#/components/schemas/AgentConfig"
  12245. },
  12246. "plan": {
  12247. "$ref": "#/components/schemas/AgentConfig"
  12248. }
  12249. },
  12250. "additionalProperties": {
  12251. "$ref": "#/components/schemas/AgentConfig"
  12252. }
  12253. },
  12254. "agent": {
  12255. "type": "object",
  12256. "properties": {
  12257. "plan": {
  12258. "$ref": "#/components/schemas/AgentConfig"
  12259. },
  12260. "build": {
  12261. "$ref": "#/components/schemas/AgentConfig"
  12262. },
  12263. "general": {
  12264. "$ref": "#/components/schemas/AgentConfig"
  12265. },
  12266. "explore": {
  12267. "$ref": "#/components/schemas/AgentConfig"
  12268. },
  12269. "scout": {
  12270. "$ref": "#/components/schemas/AgentConfig"
  12271. },
  12272. "title": {
  12273. "$ref": "#/components/schemas/AgentConfig"
  12274. },
  12275. "summary": {
  12276. "$ref": "#/components/schemas/AgentConfig"
  12277. },
  12278. "compaction": {
  12279. "$ref": "#/components/schemas/AgentConfig"
  12280. }
  12281. },
  12282. "additionalProperties": {
  12283. "$ref": "#/components/schemas/AgentConfig"
  12284. }
  12285. },
  12286. "provider": {
  12287. "type": "object",
  12288. "additionalProperties": {
  12289. "$ref": "#/components/schemas/ProviderConfig"
  12290. }
  12291. },
  12292. "mcp": {
  12293. "type": "object",
  12294. "additionalProperties": {
  12295. "anyOf": [
  12296. {
  12297. "$ref": "#/components/schemas/McpLocalConfig"
  12298. },
  12299. {
  12300. "$ref": "#/components/schemas/McpRemoteConfig"
  12301. },
  12302. {
  12303. "type": "object",
  12304. "properties": {
  12305. "enabled": {
  12306. "type": "boolean"
  12307. }
  12308. },
  12309. "required": ["enabled"],
  12310. "additionalProperties": false
  12311. }
  12312. ]
  12313. }
  12314. },
  12315. "formatter": {
  12316. "anyOf": [
  12317. {
  12318. "type": "boolean"
  12319. },
  12320. {
  12321. "type": "object",
  12322. "additionalProperties": {
  12323. "type": "object",
  12324. "properties": {
  12325. "disabled": {
  12326. "type": "boolean"
  12327. },
  12328. "command": {
  12329. "type": "array",
  12330. "items": {
  12331. "type": "string"
  12332. }
  12333. },
  12334. "environment": {
  12335. "type": "object",
  12336. "additionalProperties": {
  12337. "type": "string"
  12338. }
  12339. },
  12340. "extensions": {
  12341. "type": "array",
  12342. "items": {
  12343. "type": "string"
  12344. }
  12345. }
  12346. },
  12347. "additionalProperties": false
  12348. }
  12349. }
  12350. ],
  12351. "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."
  12352. },
  12353. "lsp": {
  12354. "anyOf": [
  12355. {
  12356. "type": "boolean"
  12357. },
  12358. {
  12359. "type": "object",
  12360. "additionalProperties": {
  12361. "anyOf": [
  12362. {
  12363. "type": "object",
  12364. "properties": {
  12365. "disabled": {
  12366. "type": "boolean",
  12367. "enum": [true]
  12368. }
  12369. },
  12370. "required": ["disabled"],
  12371. "additionalProperties": false
  12372. },
  12373. {
  12374. "type": "object",
  12375. "properties": {
  12376. "command": {
  12377. "type": "array",
  12378. "items": {
  12379. "type": "string"
  12380. }
  12381. },
  12382. "extensions": {
  12383. "type": "array",
  12384. "items": {
  12385. "type": "string"
  12386. }
  12387. },
  12388. "disabled": {
  12389. "type": "boolean"
  12390. },
  12391. "env": {
  12392. "type": "object",
  12393. "additionalProperties": {
  12394. "type": "string"
  12395. }
  12396. },
  12397. "initialization": {
  12398. "type": "object"
  12399. }
  12400. },
  12401. "required": ["command"],
  12402. "additionalProperties": false
  12403. }
  12404. ]
  12405. }
  12406. }
  12407. ],
  12408. "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."
  12409. },
  12410. "instructions": {
  12411. "type": "array",
  12412. "items": {
  12413. "type": "string"
  12414. }
  12415. },
  12416. "layout": {
  12417. "$ref": "#/components/schemas/LayoutConfig"
  12418. },
  12419. "permission": {
  12420. "$ref": "#/components/schemas/PermissionConfig"
  12421. },
  12422. "tools": {
  12423. "type": "object",
  12424. "additionalProperties": {
  12425. "type": "boolean"
  12426. }
  12427. },
  12428. "attachment": {
  12429. "$ref": "#/components/schemas/AttachmentConfig"
  12430. },
  12431. "enterprise": {
  12432. "type": "object",
  12433. "properties": {
  12434. "url": {
  12435. "type": "string"
  12436. }
  12437. },
  12438. "additionalProperties": false
  12439. },
  12440. "tool_output": {
  12441. "type": "object",
  12442. "properties": {
  12443. "max_lines": {
  12444. "type": "integer",
  12445. "exclusiveMinimum": 0
  12446. },
  12447. "max_bytes": {
  12448. "type": "integer",
  12449. "exclusiveMinimum": 0
  12450. }
  12451. },
  12452. "additionalProperties": false
  12453. },
  12454. "compaction": {
  12455. "type": "object",
  12456. "properties": {
  12457. "auto": {
  12458. "type": "boolean"
  12459. },
  12460. "prune": {
  12461. "type": "boolean"
  12462. },
  12463. "tail_turns": {
  12464. "type": "integer",
  12465. "minimum": 0
  12466. },
  12467. "preserve_recent_tokens": {
  12468. "type": "integer",
  12469. "minimum": 0
  12470. },
  12471. "reserved": {
  12472. "type": "integer",
  12473. "minimum": 0
  12474. }
  12475. },
  12476. "additionalProperties": false
  12477. },
  12478. "experimental": {
  12479. "type": "object",
  12480. "properties": {
  12481. "disable_paste_summary": {
  12482. "type": "boolean"
  12483. },
  12484. "batch_tool": {
  12485. "type": "boolean"
  12486. },
  12487. "openTelemetry": {
  12488. "type": "boolean"
  12489. },
  12490. "primary_tools": {
  12491. "type": "array",
  12492. "items": {
  12493. "type": "string"
  12494. }
  12495. },
  12496. "continue_loop_on_deny": {
  12497. "type": "boolean"
  12498. },
  12499. "mcp_timeout": {
  12500. "type": "integer",
  12501. "exclusiveMinimum": 0
  12502. }
  12503. },
  12504. "additionalProperties": false
  12505. }
  12506. },
  12507. "additionalProperties": false
  12508. },
  12509. "Model": {
  12510. "type": "object",
  12511. "properties": {
  12512. "id": {
  12513. "type": "string"
  12514. },
  12515. "providerID": {
  12516. "type": "string"
  12517. },
  12518. "api": {
  12519. "type": "object",
  12520. "properties": {
  12521. "id": {
  12522. "type": "string"
  12523. },
  12524. "url": {
  12525. "type": "string"
  12526. },
  12527. "npm": {
  12528. "type": "string"
  12529. }
  12530. },
  12531. "required": ["id", "url", "npm"],
  12532. "additionalProperties": false
  12533. },
  12534. "name": {
  12535. "type": "string"
  12536. },
  12537. "family": {
  12538. "type": "string"
  12539. },
  12540. "capabilities": {
  12541. "type": "object",
  12542. "properties": {
  12543. "temperature": {
  12544. "type": "boolean"
  12545. },
  12546. "reasoning": {
  12547. "type": "boolean"
  12548. },
  12549. "attachment": {
  12550. "type": "boolean"
  12551. },
  12552. "toolcall": {
  12553. "type": "boolean"
  12554. },
  12555. "input": {
  12556. "type": "object",
  12557. "properties": {
  12558. "text": {
  12559. "type": "boolean"
  12560. },
  12561. "audio": {
  12562. "type": "boolean"
  12563. },
  12564. "image": {
  12565. "type": "boolean"
  12566. },
  12567. "video": {
  12568. "type": "boolean"
  12569. },
  12570. "pdf": {
  12571. "type": "boolean"
  12572. }
  12573. },
  12574. "required": ["text", "audio", "image", "video", "pdf"],
  12575. "additionalProperties": false
  12576. },
  12577. "output": {
  12578. "type": "object",
  12579. "properties": {
  12580. "text": {
  12581. "type": "boolean"
  12582. },
  12583. "audio": {
  12584. "type": "boolean"
  12585. },
  12586. "image": {
  12587. "type": "boolean"
  12588. },
  12589. "video": {
  12590. "type": "boolean"
  12591. },
  12592. "pdf": {
  12593. "type": "boolean"
  12594. }
  12595. },
  12596. "required": ["text", "audio", "image", "video", "pdf"],
  12597. "additionalProperties": false
  12598. },
  12599. "interleaved": {
  12600. "anyOf": [
  12601. {
  12602. "type": "boolean"
  12603. },
  12604. {
  12605. "type": "object",
  12606. "properties": {
  12607. "field": {
  12608. "type": "string",
  12609. "enum": ["reasoning_content", "reasoning_details"]
  12610. }
  12611. },
  12612. "required": ["field"],
  12613. "additionalProperties": false
  12614. }
  12615. ]
  12616. }
  12617. },
  12618. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  12619. "additionalProperties": false
  12620. },
  12621. "cost": {
  12622. "type": "object",
  12623. "properties": {
  12624. "input": {
  12625. "type": "number"
  12626. },
  12627. "output": {
  12628. "type": "number"
  12629. },
  12630. "cache": {
  12631. "type": "object",
  12632. "properties": {
  12633. "read": {
  12634. "type": "number"
  12635. },
  12636. "write": {
  12637. "type": "number"
  12638. }
  12639. },
  12640. "required": ["read", "write"],
  12641. "additionalProperties": false
  12642. },
  12643. "tiers": {
  12644. "type": "array",
  12645. "items": {
  12646. "type": "object",
  12647. "properties": {
  12648. "input": {
  12649. "type": "number"
  12650. },
  12651. "output": {
  12652. "type": "number"
  12653. },
  12654. "cache": {
  12655. "type": "object",
  12656. "properties": {
  12657. "read": {
  12658. "type": "number"
  12659. },
  12660. "write": {
  12661. "type": "number"
  12662. }
  12663. },
  12664. "required": ["read", "write"],
  12665. "additionalProperties": false
  12666. },
  12667. "tier": {
  12668. "type": "object",
  12669. "properties": {
  12670. "type": {
  12671. "type": "string",
  12672. "enum": ["context"]
  12673. },
  12674. "size": {
  12675. "type": "number"
  12676. }
  12677. },
  12678. "required": ["type", "size"],
  12679. "additionalProperties": false
  12680. }
  12681. },
  12682. "required": ["input", "output", "cache", "tier"],
  12683. "additionalProperties": false
  12684. }
  12685. },
  12686. "experimentalOver200K": {
  12687. "type": "object",
  12688. "properties": {
  12689. "input": {
  12690. "type": "number"
  12691. },
  12692. "output": {
  12693. "type": "number"
  12694. },
  12695. "cache": {
  12696. "type": "object",
  12697. "properties": {
  12698. "read": {
  12699. "type": "number"
  12700. },
  12701. "write": {
  12702. "type": "number"
  12703. }
  12704. },
  12705. "required": ["read", "write"],
  12706. "additionalProperties": false
  12707. }
  12708. },
  12709. "required": ["input", "output", "cache"],
  12710. "additionalProperties": false
  12711. }
  12712. },
  12713. "required": ["input", "output", "cache"],
  12714. "additionalProperties": false
  12715. },
  12716. "limit": {
  12717. "type": "object",
  12718. "properties": {
  12719. "context": {
  12720. "type": "number"
  12721. },
  12722. "input": {
  12723. "type": "number"
  12724. },
  12725. "output": {
  12726. "type": "number"
  12727. }
  12728. },
  12729. "required": ["context", "output"],
  12730. "additionalProperties": false
  12731. },
  12732. "status": {
  12733. "type": "string",
  12734. "enum": ["alpha", "beta", "deprecated", "active"]
  12735. },
  12736. "options": {
  12737. "type": "object"
  12738. },
  12739. "headers": {
  12740. "type": "object",
  12741. "additionalProperties": {
  12742. "type": "string"
  12743. }
  12744. },
  12745. "release_date": {
  12746. "type": "string"
  12747. },
  12748. "variants": {
  12749. "type": "object",
  12750. "additionalProperties": {
  12751. "type": "object"
  12752. }
  12753. }
  12754. },
  12755. "required": [
  12756. "id",
  12757. "providerID",
  12758. "api",
  12759. "name",
  12760. "capabilities",
  12761. "cost",
  12762. "limit",
  12763. "status",
  12764. "options",
  12765. "headers",
  12766. "release_date"
  12767. ],
  12768. "additionalProperties": false
  12769. },
  12770. "Provider": {
  12771. "type": "object",
  12772. "properties": {
  12773. "id": {
  12774. "type": "string"
  12775. },
  12776. "name": {
  12777. "type": "string"
  12778. },
  12779. "source": {
  12780. "type": "string",
  12781. "enum": ["env", "config", "custom", "api"]
  12782. },
  12783. "env": {
  12784. "type": "array",
  12785. "items": {
  12786. "type": "string"
  12787. }
  12788. },
  12789. "key": {
  12790. "type": "string"
  12791. },
  12792. "options": {
  12793. "type": "object"
  12794. },
  12795. "models": {
  12796. "type": "object",
  12797. "additionalProperties": {
  12798. "$ref": "#/components/schemas/Model"
  12799. }
  12800. }
  12801. },
  12802. "required": ["id", "name", "source", "env", "options", "models"],
  12803. "additionalProperties": false
  12804. },
  12805. "ConsoleState": {
  12806. "type": "object",
  12807. "properties": {
  12808. "consoleManagedProviders": {
  12809. "type": "array",
  12810. "items": {
  12811. "type": "string"
  12812. }
  12813. },
  12814. "activeOrgName": {
  12815. "type": "string"
  12816. },
  12817. "switchableOrgCount": {
  12818. "type": "integer",
  12819. "minimum": 0
  12820. }
  12821. },
  12822. "required": ["consoleManagedProviders", "switchableOrgCount"],
  12823. "additionalProperties": false
  12824. },
  12825. "effect_HttpApiError_InternalServerError": {
  12826. "type": "object",
  12827. "properties": {
  12828. "_tag": {
  12829. "type": "string",
  12830. "enum": ["InternalServerError"]
  12831. }
  12832. },
  12833. "required": ["_tag"],
  12834. "additionalProperties": false
  12835. },
  12836. "ToolListItem": {
  12837. "type": "object",
  12838. "properties": {
  12839. "id": {
  12840. "type": "string"
  12841. },
  12842. "description": {
  12843. "type": "string"
  12844. },
  12845. "parameters": {}
  12846. },
  12847. "required": ["id", "description", "parameters"],
  12848. "additionalProperties": false
  12849. },
  12850. "ToolList": {
  12851. "type": "array",
  12852. "items": {
  12853. "$ref": "#/components/schemas/ToolListItem"
  12854. }
  12855. },
  12856. "ToolIDs": {
  12857. "type": "array",
  12858. "items": {
  12859. "type": "string"
  12860. }
  12861. },
  12862. "WorktreeError": {
  12863. "type": "object",
  12864. "properties": {
  12865. "name": {
  12866. "type": "string",
  12867. "enum": [
  12868. "WorktreeNotGitError",
  12869. "WorktreeNameGenerationFailedError",
  12870. "WorktreeCreateFailedError",
  12871. "WorktreeStartCommandFailedError",
  12872. "WorktreeRemoveFailedError",
  12873. "WorktreeResetFailedError",
  12874. "WorktreeListFailedError"
  12875. ]
  12876. },
  12877. "data": {
  12878. "type": "object",
  12879. "properties": {
  12880. "message": {
  12881. "type": "string"
  12882. }
  12883. },
  12884. "required": ["message"],
  12885. "additionalProperties": false
  12886. }
  12887. },
  12888. "required": ["name", "data"],
  12889. "additionalProperties": false
  12890. },
  12891. "WorktreeCreateInput": {
  12892. "type": "object",
  12893. "properties": {
  12894. "name": {
  12895. "type": "string"
  12896. },
  12897. "startCommand": {
  12898. "type": "string",
  12899. "description": "Additional startup script to run after the project's start command"
  12900. }
  12901. },
  12902. "additionalProperties": false
  12903. },
  12904. "Worktree": {
  12905. "type": "object",
  12906. "properties": {
  12907. "name": {
  12908. "type": "string"
  12909. },
  12910. "branch": {
  12911. "type": "string"
  12912. },
  12913. "directory": {
  12914. "type": "string"
  12915. }
  12916. },
  12917. "required": ["name", "directory"],
  12918. "additionalProperties": false
  12919. },
  12920. "WorktreeRemoveInput": {
  12921. "type": "object",
  12922. "properties": {
  12923. "directory": {
  12924. "type": "string"
  12925. }
  12926. },
  12927. "required": ["directory"],
  12928. "additionalProperties": false
  12929. },
  12930. "WorktreeResetInput": {
  12931. "type": "object",
  12932. "properties": {
  12933. "directory": {
  12934. "type": "string"
  12935. }
  12936. },
  12937. "required": ["directory"],
  12938. "additionalProperties": false
  12939. },
  12940. "ProjectSummary": {
  12941. "type": "object",
  12942. "properties": {
  12943. "id": {
  12944. "type": "string"
  12945. },
  12946. "name": {
  12947. "type": "string"
  12948. },
  12949. "worktree": {
  12950. "type": "string"
  12951. }
  12952. },
  12953. "required": ["id", "worktree"],
  12954. "additionalProperties": false
  12955. },
  12956. "GlobalSession": {
  12957. "type": "object",
  12958. "properties": {
  12959. "id": {
  12960. "type": "string",
  12961. "pattern": "^ses"
  12962. },
  12963. "slug": {
  12964. "type": "string"
  12965. },
  12966. "projectID": {
  12967. "type": "string"
  12968. },
  12969. "workspaceID": {
  12970. "type": "string",
  12971. "pattern": "^wrk"
  12972. },
  12973. "directory": {
  12974. "type": "string"
  12975. },
  12976. "path": {
  12977. "type": "string"
  12978. },
  12979. "parentID": {
  12980. "type": "string",
  12981. "pattern": "^ses"
  12982. },
  12983. "summary": {
  12984. "type": "object",
  12985. "properties": {
  12986. "additions": {
  12987. "type": "number"
  12988. },
  12989. "deletions": {
  12990. "type": "number"
  12991. },
  12992. "files": {
  12993. "type": "number"
  12994. },
  12995. "diffs": {
  12996. "type": "array",
  12997. "items": {
  12998. "$ref": "#/components/schemas/SnapshotFileDiff"
  12999. }
  13000. }
  13001. },
  13002. "required": ["additions", "deletions", "files"],
  13003. "additionalProperties": false
  13004. },
  13005. "cost": {
  13006. "type": "number"
  13007. },
  13008. "tokens": {
  13009. "type": "object",
  13010. "properties": {
  13011. "input": {
  13012. "type": "number"
  13013. },
  13014. "output": {
  13015. "type": "number"
  13016. },
  13017. "reasoning": {
  13018. "type": "number"
  13019. },
  13020. "cache": {
  13021. "type": "object",
  13022. "properties": {
  13023. "read": {
  13024. "type": "number"
  13025. },
  13026. "write": {
  13027. "type": "number"
  13028. }
  13029. },
  13030. "required": ["read", "write"],
  13031. "additionalProperties": false
  13032. }
  13033. },
  13034. "required": ["input", "output", "reasoning", "cache"],
  13035. "additionalProperties": false
  13036. },
  13037. "share": {
  13038. "type": "object",
  13039. "properties": {
  13040. "url": {
  13041. "type": "string"
  13042. }
  13043. },
  13044. "required": ["url"],
  13045. "additionalProperties": false
  13046. },
  13047. "title": {
  13048. "type": "string"
  13049. },
  13050. "agent": {
  13051. "type": "string"
  13052. },
  13053. "model": {
  13054. "type": "object",
  13055. "properties": {
  13056. "id": {
  13057. "type": "string"
  13058. },
  13059. "providerID": {
  13060. "type": "string"
  13061. },
  13062. "variant": {
  13063. "type": "string"
  13064. }
  13065. },
  13066. "required": ["id", "providerID"],
  13067. "additionalProperties": false
  13068. },
  13069. "version": {
  13070. "type": "string"
  13071. },
  13072. "time": {
  13073. "type": "object",
  13074. "properties": {
  13075. "created": {
  13076. "type": "integer",
  13077. "minimum": 0
  13078. },
  13079. "updated": {
  13080. "type": "integer",
  13081. "minimum": 0
  13082. },
  13083. "compacting": {
  13084. "type": "integer",
  13085. "minimum": 0
  13086. },
  13087. "archived": {
  13088. "type": "number"
  13089. }
  13090. },
  13091. "required": ["created", "updated"],
  13092. "additionalProperties": false
  13093. },
  13094. "permission": {
  13095. "$ref": "#/components/schemas/PermissionRuleset"
  13096. },
  13097. "revert": {
  13098. "type": "object",
  13099. "properties": {
  13100. "messageID": {
  13101. "type": "string",
  13102. "pattern": "^msg"
  13103. },
  13104. "partID": {
  13105. "type": "string",
  13106. "pattern": "^prt"
  13107. },
  13108. "snapshot": {
  13109. "type": "string"
  13110. },
  13111. "diff": {
  13112. "type": "string"
  13113. }
  13114. },
  13115. "required": ["messageID"],
  13116. "additionalProperties": false
  13117. },
  13118. "project": {
  13119. "anyOf": [
  13120. {
  13121. "$ref": "#/components/schemas/ProjectSummary"
  13122. },
  13123. {
  13124. "type": "null"
  13125. }
  13126. ]
  13127. }
  13128. },
  13129. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  13130. "additionalProperties": false
  13131. },
  13132. "McpResource": {
  13133. "type": "object",
  13134. "properties": {
  13135. "name": {
  13136. "type": "string"
  13137. },
  13138. "uri": {
  13139. "type": "string"
  13140. },
  13141. "description": {
  13142. "type": "string"
  13143. },
  13144. "mimeType": {
  13145. "type": "string"
  13146. },
  13147. "client": {
  13148. "type": "string"
  13149. }
  13150. },
  13151. "required": ["name", "uri", "client"],
  13152. "additionalProperties": false
  13153. },
  13154. "Symbol": {
  13155. "type": "object",
  13156. "properties": {
  13157. "name": {
  13158. "type": "string"
  13159. },
  13160. "kind": {
  13161. "type": "integer",
  13162. "minimum": 0
  13163. },
  13164. "location": {
  13165. "type": "object",
  13166. "properties": {
  13167. "uri": {
  13168. "type": "string"
  13169. },
  13170. "range": {
  13171. "$ref": "#/components/schemas/Range"
  13172. }
  13173. },
  13174. "required": ["uri", "range"],
  13175. "additionalProperties": false
  13176. }
  13177. },
  13178. "required": ["name", "kind", "location"],
  13179. "additionalProperties": false
  13180. },
  13181. "FileNode": {
  13182. "type": "object",
  13183. "properties": {
  13184. "name": {
  13185. "type": "string"
  13186. },
  13187. "path": {
  13188. "type": "string"
  13189. },
  13190. "absolute": {
  13191. "type": "string"
  13192. },
  13193. "type": {
  13194. "type": "string",
  13195. "enum": ["file", "directory"]
  13196. },
  13197. "ignored": {
  13198. "type": "boolean"
  13199. }
  13200. },
  13201. "required": ["name", "path", "absolute", "type", "ignored"],
  13202. "additionalProperties": false
  13203. },
  13204. "FileContent": {
  13205. "type": "object",
  13206. "properties": {
  13207. "type": {
  13208. "type": "string",
  13209. "enum": ["text", "binary"]
  13210. },
  13211. "content": {
  13212. "type": "string"
  13213. },
  13214. "diff": {
  13215. "type": "string"
  13216. },
  13217. "patch": {
  13218. "type": "object",
  13219. "properties": {
  13220. "oldFileName": {
  13221. "type": "string"
  13222. },
  13223. "newFileName": {
  13224. "type": "string"
  13225. },
  13226. "oldHeader": {
  13227. "type": "string"
  13228. },
  13229. "newHeader": {
  13230. "type": "string"
  13231. },
  13232. "hunks": {
  13233. "type": "array",
  13234. "items": {
  13235. "type": "object",
  13236. "properties": {
  13237. "oldStart": {
  13238. "type": "integer",
  13239. "minimum": 0
  13240. },
  13241. "oldLines": {
  13242. "type": "integer",
  13243. "minimum": 0
  13244. },
  13245. "newStart": {
  13246. "type": "integer",
  13247. "minimum": 0
  13248. },
  13249. "newLines": {
  13250. "type": "integer",
  13251. "minimum": 0
  13252. },
  13253. "lines": {
  13254. "type": "array",
  13255. "items": {
  13256. "type": "string"
  13257. }
  13258. }
  13259. },
  13260. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  13261. "additionalProperties": false
  13262. }
  13263. },
  13264. "index": {
  13265. "type": "string"
  13266. }
  13267. },
  13268. "required": ["oldFileName", "newFileName", "hunks"],
  13269. "additionalProperties": false
  13270. },
  13271. "encoding": {
  13272. "type": "string",
  13273. "enum": ["base64"]
  13274. },
  13275. "mimeType": {
  13276. "type": "string"
  13277. }
  13278. },
  13279. "required": ["type", "content"],
  13280. "additionalProperties": false
  13281. },
  13282. "File": {
  13283. "type": "object",
  13284. "properties": {
  13285. "path": {
  13286. "type": "string"
  13287. },
  13288. "added": {
  13289. "type": "integer",
  13290. "minimum": 0
  13291. },
  13292. "removed": {
  13293. "type": "integer",
  13294. "minimum": 0
  13295. },
  13296. "status": {
  13297. "type": "string",
  13298. "enum": ["added", "deleted", "modified"]
  13299. }
  13300. },
  13301. "required": ["path", "added", "removed", "status"],
  13302. "additionalProperties": false
  13303. },
  13304. "Path": {
  13305. "type": "object",
  13306. "properties": {
  13307. "home": {
  13308. "type": "string"
  13309. },
  13310. "state": {
  13311. "type": "string"
  13312. },
  13313. "config": {
  13314. "type": "string"
  13315. },
  13316. "worktree": {
  13317. "type": "string"
  13318. },
  13319. "directory": {
  13320. "type": "string"
  13321. }
  13322. },
  13323. "required": ["home", "state", "config", "worktree", "directory"],
  13324. "additionalProperties": false
  13325. },
  13326. "VcsInfo": {
  13327. "type": "object",
  13328. "properties": {
  13329. "branch": {
  13330. "type": "string"
  13331. },
  13332. "default_branch": {
  13333. "type": "string"
  13334. }
  13335. },
  13336. "additionalProperties": false
  13337. },
  13338. "VcsFileStatus": {
  13339. "type": "object",
  13340. "properties": {
  13341. "file": {
  13342. "type": "string"
  13343. },
  13344. "additions": {
  13345. "type": "number"
  13346. },
  13347. "deletions": {
  13348. "type": "number"
  13349. },
  13350. "status": {
  13351. "type": "string",
  13352. "enum": ["added", "deleted", "modified"]
  13353. }
  13354. },
  13355. "required": ["file", "additions", "deletions", "status"],
  13356. "additionalProperties": false
  13357. },
  13358. "VcsFileDiff": {
  13359. "type": "object",
  13360. "properties": {
  13361. "file": {
  13362. "type": "string"
  13363. },
  13364. "patch": {
  13365. "type": "string"
  13366. },
  13367. "additions": {
  13368. "type": "number"
  13369. },
  13370. "deletions": {
  13371. "type": "number"
  13372. },
  13373. "status": {
  13374. "type": "string",
  13375. "enum": ["added", "deleted", "modified"]
  13376. }
  13377. },
  13378. "required": ["file", "additions", "deletions"],
  13379. "additionalProperties": false
  13380. },
  13381. "VcsApplyError": {
  13382. "type": "object",
  13383. "properties": {
  13384. "name": {
  13385. "type": "string",
  13386. "enum": ["VcsApplyError"]
  13387. },
  13388. "data": {
  13389. "type": "object",
  13390. "properties": {
  13391. "message": {
  13392. "type": "string"
  13393. },
  13394. "reason": {
  13395. "type": "string",
  13396. "enum": ["non-git", "not-clean"]
  13397. }
  13398. },
  13399. "required": ["message", "reason"],
  13400. "additionalProperties": false
  13401. }
  13402. },
  13403. "required": ["name", "data"],
  13404. "additionalProperties": false
  13405. },
  13406. "Command": {
  13407. "type": "object",
  13408. "properties": {
  13409. "name": {
  13410. "type": "string"
  13411. },
  13412. "description": {
  13413. "type": "string"
  13414. },
  13415. "agent": {
  13416. "type": "string"
  13417. },
  13418. "model": {
  13419. "type": "string"
  13420. },
  13421. "source": {
  13422. "type": "string",
  13423. "enum": ["command", "mcp", "skill"]
  13424. },
  13425. "template": {
  13426. "type": "string"
  13427. },
  13428. "subtask": {
  13429. "type": "boolean"
  13430. },
  13431. "hints": {
  13432. "type": "array",
  13433. "items": {
  13434. "type": "string"
  13435. }
  13436. }
  13437. },
  13438. "required": ["name", "template", "hints"],
  13439. "additionalProperties": false
  13440. },
  13441. "Agent": {
  13442. "type": "object",
  13443. "properties": {
  13444. "name": {
  13445. "type": "string"
  13446. },
  13447. "description": {
  13448. "type": "string"
  13449. },
  13450. "mode": {
  13451. "type": "string",
  13452. "enum": ["subagent", "primary", "all"]
  13453. },
  13454. "native": {
  13455. "type": "boolean"
  13456. },
  13457. "hidden": {
  13458. "type": "boolean"
  13459. },
  13460. "topP": {
  13461. "type": "number"
  13462. },
  13463. "temperature": {
  13464. "type": "number"
  13465. },
  13466. "color": {
  13467. "type": "string"
  13468. },
  13469. "permission": {
  13470. "$ref": "#/components/schemas/PermissionRuleset"
  13471. },
  13472. "model": {
  13473. "type": "object",
  13474. "properties": {
  13475. "modelID": {
  13476. "type": "string"
  13477. },
  13478. "providerID": {
  13479. "type": "string"
  13480. }
  13481. },
  13482. "required": ["modelID", "providerID"],
  13483. "additionalProperties": false
  13484. },
  13485. "variant": {
  13486. "type": "string"
  13487. },
  13488. "prompt": {
  13489. "type": "string"
  13490. },
  13491. "options": {
  13492. "type": "object"
  13493. },
  13494. "steps": {
  13495. "type": "number"
  13496. }
  13497. },
  13498. "required": ["name", "mode", "permission", "options"],
  13499. "additionalProperties": false
  13500. },
  13501. "LSPStatus": {
  13502. "type": "object",
  13503. "properties": {
  13504. "id": {
  13505. "type": "string"
  13506. },
  13507. "name": {
  13508. "type": "string"
  13509. },
  13510. "root": {
  13511. "type": "string"
  13512. },
  13513. "status": {
  13514. "type": "string",
  13515. "enum": ["connected", "error"]
  13516. }
  13517. },
  13518. "required": ["id", "name", "root", "status"],
  13519. "additionalProperties": false
  13520. },
  13521. "FormatterStatus": {
  13522. "type": "object",
  13523. "properties": {
  13524. "name": {
  13525. "type": "string"
  13526. },
  13527. "extensions": {
  13528. "type": "array",
  13529. "items": {
  13530. "type": "string"
  13531. }
  13532. },
  13533. "enabled": {
  13534. "type": "boolean"
  13535. }
  13536. },
  13537. "required": ["name", "extensions", "enabled"],
  13538. "additionalProperties": false
  13539. },
  13540. "MCPStatusConnected": {
  13541. "type": "object",
  13542. "properties": {
  13543. "status": {
  13544. "type": "string",
  13545. "enum": ["connected"]
  13546. }
  13547. },
  13548. "required": ["status"],
  13549. "additionalProperties": false
  13550. },
  13551. "MCPStatusDisabled": {
  13552. "type": "object",
  13553. "properties": {
  13554. "status": {
  13555. "type": "string",
  13556. "enum": ["disabled"]
  13557. }
  13558. },
  13559. "required": ["status"],
  13560. "additionalProperties": false
  13561. },
  13562. "MCPStatusFailed": {
  13563. "type": "object",
  13564. "properties": {
  13565. "status": {
  13566. "type": "string",
  13567. "enum": ["failed"]
  13568. },
  13569. "error": {
  13570. "type": "string"
  13571. }
  13572. },
  13573. "required": ["status", "error"],
  13574. "additionalProperties": false
  13575. },
  13576. "MCPStatusNeedsAuth": {
  13577. "type": "object",
  13578. "properties": {
  13579. "status": {
  13580. "type": "string",
  13581. "enum": ["needs_auth"]
  13582. }
  13583. },
  13584. "required": ["status"],
  13585. "additionalProperties": false
  13586. },
  13587. "MCPStatusNeedsClientRegistration": {
  13588. "type": "object",
  13589. "properties": {
  13590. "status": {
  13591. "type": "string",
  13592. "enum": ["needs_client_registration"]
  13593. },
  13594. "error": {
  13595. "type": "string"
  13596. }
  13597. },
  13598. "required": ["status", "error"],
  13599. "additionalProperties": false
  13600. },
  13601. "MCPStatus": {
  13602. "anyOf": [
  13603. {
  13604. "$ref": "#/components/schemas/MCPStatusConnected"
  13605. },
  13606. {
  13607. "$ref": "#/components/schemas/MCPStatusDisabled"
  13608. },
  13609. {
  13610. "$ref": "#/components/schemas/MCPStatusFailed"
  13611. },
  13612. {
  13613. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13614. },
  13615. {
  13616. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13617. }
  13618. ]
  13619. },
  13620. "McpUnsupportedOAuthError": {
  13621. "type": "object",
  13622. "properties": {
  13623. "error": {
  13624. "type": "string"
  13625. }
  13626. },
  13627. "required": ["error"],
  13628. "additionalProperties": false
  13629. },
  13630. "NotFoundError": {
  13631. "type": "object",
  13632. "required": ["name", "data"],
  13633. "properties": {
  13634. "name": {
  13635. "type": "string",
  13636. "enum": ["NotFoundError"]
  13637. },
  13638. "data": {
  13639. "type": "object",
  13640. "required": ["message"],
  13641. "properties": {
  13642. "message": {
  13643. "type": "string"
  13644. }
  13645. }
  13646. }
  13647. }
  13648. },
  13649. "effect_HttpApiError_Forbidden": {
  13650. "type": "object",
  13651. "properties": {
  13652. "_tag": {
  13653. "type": "string",
  13654. "enum": ["Forbidden"]
  13655. }
  13656. },
  13657. "required": ["_tag"],
  13658. "additionalProperties": false
  13659. },
  13660. "ProviderAuthMethod": {
  13661. "type": "object",
  13662. "properties": {
  13663. "type": {
  13664. "type": "string",
  13665. "enum": ["oauth", "api"]
  13666. },
  13667. "label": {
  13668. "type": "string"
  13669. },
  13670. "prompts": {
  13671. "type": "array",
  13672. "items": {
  13673. "anyOf": [
  13674. {
  13675. "type": "object",
  13676. "properties": {
  13677. "type": {
  13678. "type": "string",
  13679. "enum": ["text"]
  13680. },
  13681. "key": {
  13682. "type": "string"
  13683. },
  13684. "message": {
  13685. "type": "string"
  13686. },
  13687. "placeholder": {
  13688. "type": "string"
  13689. },
  13690. "when": {
  13691. "type": "object",
  13692. "properties": {
  13693. "key": {
  13694. "type": "string"
  13695. },
  13696. "op": {
  13697. "type": "string",
  13698. "enum": ["eq", "neq"]
  13699. },
  13700. "value": {
  13701. "type": "string"
  13702. }
  13703. },
  13704. "required": ["key", "op", "value"],
  13705. "additionalProperties": false
  13706. }
  13707. },
  13708. "required": ["type", "key", "message"],
  13709. "additionalProperties": false
  13710. },
  13711. {
  13712. "type": "object",
  13713. "properties": {
  13714. "type": {
  13715. "type": "string",
  13716. "enum": ["select"]
  13717. },
  13718. "key": {
  13719. "type": "string"
  13720. },
  13721. "message": {
  13722. "type": "string"
  13723. },
  13724. "options": {
  13725. "type": "array",
  13726. "items": {
  13727. "type": "object",
  13728. "properties": {
  13729. "label": {
  13730. "type": "string"
  13731. },
  13732. "value": {
  13733. "type": "string"
  13734. },
  13735. "hint": {
  13736. "type": "string"
  13737. }
  13738. },
  13739. "required": ["label", "value"],
  13740. "additionalProperties": false
  13741. }
  13742. },
  13743. "when": {
  13744. "type": "object",
  13745. "properties": {
  13746. "key": {
  13747. "type": "string"
  13748. },
  13749. "op": {
  13750. "type": "string",
  13751. "enum": ["eq", "neq"]
  13752. },
  13753. "value": {
  13754. "type": "string"
  13755. }
  13756. },
  13757. "required": ["key", "op", "value"],
  13758. "additionalProperties": false
  13759. }
  13760. },
  13761. "required": ["type", "key", "message", "options"],
  13762. "additionalProperties": false
  13763. }
  13764. ]
  13765. }
  13766. }
  13767. },
  13768. "required": ["type", "label"],
  13769. "additionalProperties": false
  13770. },
  13771. "ProviderAuthAuthorization": {
  13772. "type": "object",
  13773. "properties": {
  13774. "url": {
  13775. "type": "string"
  13776. },
  13777. "method": {
  13778. "type": "string",
  13779. "enum": ["auto", "code"]
  13780. },
  13781. "instructions": {
  13782. "type": "string"
  13783. }
  13784. },
  13785. "required": ["url", "method", "instructions"],
  13786. "additionalProperties": false
  13787. },
  13788. "TextPartInput": {
  13789. "type": "object",
  13790. "properties": {
  13791. "id": {
  13792. "type": "string",
  13793. "pattern": "^prt"
  13794. },
  13795. "type": {
  13796. "type": "string",
  13797. "enum": ["text"]
  13798. },
  13799. "text": {
  13800. "type": "string"
  13801. },
  13802. "synthetic": {
  13803. "type": "boolean"
  13804. },
  13805. "ignored": {
  13806. "type": "boolean"
  13807. },
  13808. "time": {
  13809. "type": "object",
  13810. "properties": {
  13811. "start": {
  13812. "type": "integer",
  13813. "minimum": 0
  13814. },
  13815. "end": {
  13816. "type": "integer",
  13817. "minimum": 0
  13818. }
  13819. },
  13820. "required": ["start"],
  13821. "additionalProperties": false
  13822. },
  13823. "metadata": {
  13824. "type": "object"
  13825. }
  13826. },
  13827. "required": ["type", "text"],
  13828. "additionalProperties": false
  13829. },
  13830. "FilePartInput": {
  13831. "type": "object",
  13832. "properties": {
  13833. "id": {
  13834. "type": "string",
  13835. "pattern": "^prt"
  13836. },
  13837. "type": {
  13838. "type": "string",
  13839. "enum": ["file"]
  13840. },
  13841. "mime": {
  13842. "type": "string"
  13843. },
  13844. "filename": {
  13845. "type": "string"
  13846. },
  13847. "url": {
  13848. "type": "string"
  13849. },
  13850. "source": {
  13851. "$ref": "#/components/schemas/FilePartSource"
  13852. }
  13853. },
  13854. "required": ["type", "mime", "url"],
  13855. "additionalProperties": false
  13856. },
  13857. "AgentPartInput": {
  13858. "type": "object",
  13859. "properties": {
  13860. "id": {
  13861. "type": "string",
  13862. "pattern": "^prt"
  13863. },
  13864. "type": {
  13865. "type": "string",
  13866. "enum": ["agent"]
  13867. },
  13868. "name": {
  13869. "type": "string"
  13870. },
  13871. "source": {
  13872. "type": "object",
  13873. "properties": {
  13874. "value": {
  13875. "type": "string"
  13876. },
  13877. "start": {
  13878. "type": "integer",
  13879. "minimum": 0
  13880. },
  13881. "end": {
  13882. "type": "integer",
  13883. "minimum": 0
  13884. }
  13885. },
  13886. "required": ["value", "start", "end"],
  13887. "additionalProperties": false
  13888. }
  13889. },
  13890. "required": ["type", "name"],
  13891. "additionalProperties": false
  13892. },
  13893. "SubtaskPartInput": {
  13894. "type": "object",
  13895. "properties": {
  13896. "id": {
  13897. "type": "string",
  13898. "pattern": "^prt"
  13899. },
  13900. "type": {
  13901. "type": "string",
  13902. "enum": ["subtask"]
  13903. },
  13904. "prompt": {
  13905. "type": "string"
  13906. },
  13907. "description": {
  13908. "type": "string"
  13909. },
  13910. "agent": {
  13911. "type": "string"
  13912. },
  13913. "model": {
  13914. "type": "object",
  13915. "properties": {
  13916. "providerID": {
  13917. "type": "string"
  13918. },
  13919. "modelID": {
  13920. "type": "string"
  13921. }
  13922. },
  13923. "required": ["providerID", "modelID"],
  13924. "additionalProperties": false
  13925. },
  13926. "command": {
  13927. "type": "string"
  13928. }
  13929. },
  13930. "required": ["type", "prompt", "description", "agent"],
  13931. "additionalProperties": false
  13932. },
  13933. "V2SessionsResponse": {
  13934. "type": "object",
  13935. "properties": {
  13936. "items": {
  13937. "type": "array",
  13938. "items": {
  13939. "$ref": "#/components/schemas/SessionInfo"
  13940. }
  13941. },
  13942. "cursor": {
  13943. "type": "object",
  13944. "properties": {
  13945. "previous": {
  13946. "type": "string"
  13947. },
  13948. "next": {
  13949. "type": "string"
  13950. }
  13951. },
  13952. "additionalProperties": false
  13953. }
  13954. },
  13955. "required": ["items", "cursor"],
  13956. "additionalProperties": false
  13957. },
  13958. "V2SessionMessagesResponse": {
  13959. "type": "object",
  13960. "properties": {
  13961. "items": {
  13962. "type": "array",
  13963. "items": {
  13964. "$ref": "#/components/schemas/SessionMessage"
  13965. }
  13966. },
  13967. "cursor": {
  13968. "type": "object",
  13969. "properties": {
  13970. "previous": {
  13971. "type": "string"
  13972. },
  13973. "next": {
  13974. "type": "string"
  13975. }
  13976. },
  13977. "additionalProperties": false
  13978. }
  13979. },
  13980. "required": ["items", "cursor"],
  13981. "additionalProperties": false
  13982. },
  13983. "EventTuiPromptAppend": {
  13984. "type": "object",
  13985. "properties": {
  13986. "type": {
  13987. "type": "string",
  13988. "enum": ["tui.prompt.append"]
  13989. },
  13990. "properties": {
  13991. "type": "object",
  13992. "properties": {
  13993. "text": {
  13994. "type": "string"
  13995. }
  13996. },
  13997. "required": ["text"],
  13998. "additionalProperties": false
  13999. }
  14000. },
  14001. "required": ["type", "properties"],
  14002. "additionalProperties": false
  14003. },
  14004. "EventTuiCommandExecute": {
  14005. "type": "object",
  14006. "properties": {
  14007. "type": {
  14008. "type": "string",
  14009. "enum": ["tui.command.execute"]
  14010. },
  14011. "properties": {
  14012. "type": "object",
  14013. "properties": {
  14014. "command": {
  14015. "anyOf": [
  14016. {
  14017. "type": "string",
  14018. "enum": [
  14019. "session.list",
  14020. "session.new",
  14021. "session.share",
  14022. "session.interrupt",
  14023. "session.compact",
  14024. "session.page.up",
  14025. "session.page.down",
  14026. "session.line.up",
  14027. "session.line.down",
  14028. "session.half.page.up",
  14029. "session.half.page.down",
  14030. "session.first",
  14031. "session.last",
  14032. "prompt.clear",
  14033. "prompt.submit",
  14034. "agent.cycle"
  14035. ]
  14036. },
  14037. {
  14038. "type": "string"
  14039. }
  14040. ]
  14041. }
  14042. },
  14043. "required": ["command"],
  14044. "additionalProperties": false
  14045. }
  14046. },
  14047. "required": ["type", "properties"],
  14048. "additionalProperties": false
  14049. },
  14050. "EventTuiToastShow": {
  14051. "type": "object",
  14052. "properties": {
  14053. "type": {
  14054. "type": "string",
  14055. "enum": ["tui.toast.show"]
  14056. },
  14057. "properties": {
  14058. "type": "object",
  14059. "properties": {
  14060. "title": {
  14061. "type": "string"
  14062. },
  14063. "message": {
  14064. "type": "string"
  14065. },
  14066. "variant": {
  14067. "type": "string",
  14068. "enum": ["info", "success", "warning", "error"]
  14069. },
  14070. "duration": {
  14071. "type": "integer",
  14072. "exclusiveMinimum": 0
  14073. }
  14074. },
  14075. "required": ["message", "variant"],
  14076. "additionalProperties": false
  14077. }
  14078. },
  14079. "required": ["type", "properties"],
  14080. "additionalProperties": false
  14081. },
  14082. "EventTuiSessionSelect": {
  14083. "type": "object",
  14084. "properties": {
  14085. "type": {
  14086. "type": "string",
  14087. "enum": ["tui.session.select"]
  14088. },
  14089. "properties": {
  14090. "type": "object",
  14091. "properties": {
  14092. "sessionID": {
  14093. "type": "string",
  14094. "pattern": "^ses",
  14095. "description": "Session ID to navigate to"
  14096. }
  14097. },
  14098. "required": ["sessionID"],
  14099. "additionalProperties": false
  14100. }
  14101. },
  14102. "required": ["type", "properties"],
  14103. "additionalProperties": false
  14104. },
  14105. "Workspace": {
  14106. "type": "object",
  14107. "properties": {
  14108. "id": {
  14109. "type": "string",
  14110. "pattern": "^wrk"
  14111. },
  14112. "type": {
  14113. "type": "string"
  14114. },
  14115. "name": {
  14116. "type": "string"
  14117. },
  14118. "branch": {
  14119. "anyOf": [
  14120. {
  14121. "type": "string"
  14122. },
  14123. {
  14124. "type": "null"
  14125. }
  14126. ]
  14127. },
  14128. "directory": {
  14129. "anyOf": [
  14130. {
  14131. "type": "string"
  14132. },
  14133. {
  14134. "type": "null"
  14135. }
  14136. ]
  14137. },
  14138. "extra": {
  14139. "anyOf": [
  14140. {},
  14141. {
  14142. "type": "null"
  14143. }
  14144. ]
  14145. },
  14146. "projectID": {
  14147. "type": "string"
  14148. },
  14149. "timeUsed": {
  14150. "anyOf": [
  14151. {
  14152. "type": "number"
  14153. },
  14154. {
  14155. "type": "string",
  14156. "enum": ["NaN"]
  14157. },
  14158. {
  14159. "type": "string",
  14160. "enum": ["Infinity"]
  14161. },
  14162. {
  14163. "type": "string",
  14164. "enum": ["-Infinity"]
  14165. },
  14166. {
  14167. "type": "string",
  14168. "enum": ["Infinity", "-Infinity", "NaN"]
  14169. }
  14170. ]
  14171. }
  14172. },
  14173. "required": ["id", "type", "name", "projectID", "timeUsed"],
  14174. "additionalProperties": false
  14175. },
  14176. "WorkspaceWarpError": {
  14177. "type": "object",
  14178. "properties": {
  14179. "name": {
  14180. "type": "string",
  14181. "enum": ["WorkspaceWarpError"]
  14182. },
  14183. "data": {
  14184. "type": "object",
  14185. "properties": {
  14186. "message": {
  14187. "type": "string"
  14188. }
  14189. },
  14190. "required": ["message"],
  14191. "additionalProperties": false
  14192. }
  14193. },
  14194. "required": ["name", "data"],
  14195. "additionalProperties": false
  14196. },
  14197. "SyncEventMessageUpdated": {
  14198. "type": "object",
  14199. "properties": {
  14200. "type": {
  14201. "type": "string",
  14202. "enum": ["sync"]
  14203. },
  14204. "name": {
  14205. "type": "string",
  14206. "enum": ["message.updated.1"]
  14207. },
  14208. "id": {
  14209. "type": "string"
  14210. },
  14211. "seq": {
  14212. "type": "number"
  14213. },
  14214. "aggregateID": {
  14215. "type": "string",
  14216. "enum": ["sessionID"]
  14217. },
  14218. "data": {
  14219. "type": "object",
  14220. "properties": {
  14221. "sessionID": {
  14222. "type": "string",
  14223. "pattern": "^ses"
  14224. },
  14225. "info": {
  14226. "$ref": "#/components/schemas/Message"
  14227. }
  14228. },
  14229. "required": ["sessionID", "info"],
  14230. "additionalProperties": false
  14231. }
  14232. },
  14233. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14234. "additionalProperties": false
  14235. },
  14236. "SyncEventMessageRemoved": {
  14237. "type": "object",
  14238. "properties": {
  14239. "type": {
  14240. "type": "string",
  14241. "enum": ["sync"]
  14242. },
  14243. "name": {
  14244. "type": "string",
  14245. "enum": ["message.removed.1"]
  14246. },
  14247. "id": {
  14248. "type": "string"
  14249. },
  14250. "seq": {
  14251. "type": "number"
  14252. },
  14253. "aggregateID": {
  14254. "type": "string",
  14255. "enum": ["sessionID"]
  14256. },
  14257. "data": {
  14258. "type": "object",
  14259. "properties": {
  14260. "sessionID": {
  14261. "type": "string",
  14262. "pattern": "^ses"
  14263. },
  14264. "messageID": {
  14265. "type": "string",
  14266. "pattern": "^msg"
  14267. }
  14268. },
  14269. "required": ["sessionID", "messageID"],
  14270. "additionalProperties": false
  14271. }
  14272. },
  14273. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14274. "additionalProperties": false
  14275. },
  14276. "SyncEventMessagePartUpdated": {
  14277. "type": "object",
  14278. "properties": {
  14279. "type": {
  14280. "type": "string",
  14281. "enum": ["sync"]
  14282. },
  14283. "name": {
  14284. "type": "string",
  14285. "enum": ["message.part.updated.1"]
  14286. },
  14287. "id": {
  14288. "type": "string"
  14289. },
  14290. "seq": {
  14291. "type": "number"
  14292. },
  14293. "aggregateID": {
  14294. "type": "string",
  14295. "enum": ["sessionID"]
  14296. },
  14297. "data": {
  14298. "type": "object",
  14299. "properties": {
  14300. "sessionID": {
  14301. "type": "string",
  14302. "pattern": "^ses"
  14303. },
  14304. "part": {
  14305. "$ref": "#/components/schemas/Part"
  14306. },
  14307. "time": {
  14308. "type": "integer",
  14309. "minimum": 0
  14310. }
  14311. },
  14312. "required": ["sessionID", "part", "time"],
  14313. "additionalProperties": false
  14314. }
  14315. },
  14316. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14317. "additionalProperties": false
  14318. },
  14319. "SyncEventMessagePartRemoved": {
  14320. "type": "object",
  14321. "properties": {
  14322. "type": {
  14323. "type": "string",
  14324. "enum": ["sync"]
  14325. },
  14326. "name": {
  14327. "type": "string",
  14328. "enum": ["message.part.removed.1"]
  14329. },
  14330. "id": {
  14331. "type": "string"
  14332. },
  14333. "seq": {
  14334. "type": "number"
  14335. },
  14336. "aggregateID": {
  14337. "type": "string",
  14338. "enum": ["sessionID"]
  14339. },
  14340. "data": {
  14341. "type": "object",
  14342. "properties": {
  14343. "sessionID": {
  14344. "type": "string",
  14345. "pattern": "^ses"
  14346. },
  14347. "messageID": {
  14348. "type": "string",
  14349. "pattern": "^msg"
  14350. },
  14351. "partID": {
  14352. "type": "string",
  14353. "pattern": "^prt"
  14354. }
  14355. },
  14356. "required": ["sessionID", "messageID", "partID"],
  14357. "additionalProperties": false
  14358. }
  14359. },
  14360. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14361. "additionalProperties": false
  14362. },
  14363. "SyncEventSessionCreated": {
  14364. "type": "object",
  14365. "properties": {
  14366. "type": {
  14367. "type": "string",
  14368. "enum": ["sync"]
  14369. },
  14370. "name": {
  14371. "type": "string",
  14372. "enum": ["session.created.1"]
  14373. },
  14374. "id": {
  14375. "type": "string"
  14376. },
  14377. "seq": {
  14378. "type": "number"
  14379. },
  14380. "aggregateID": {
  14381. "type": "string",
  14382. "enum": ["sessionID"]
  14383. },
  14384. "data": {
  14385. "type": "object",
  14386. "properties": {
  14387. "sessionID": {
  14388. "type": "string",
  14389. "pattern": "^ses"
  14390. },
  14391. "info": {
  14392. "$ref": "#/components/schemas/Session"
  14393. }
  14394. },
  14395. "required": ["sessionID", "info"],
  14396. "additionalProperties": false
  14397. }
  14398. },
  14399. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14400. "additionalProperties": false
  14401. },
  14402. "SyncEventSessionUpdated": {
  14403. "type": "object",
  14404. "properties": {
  14405. "type": {
  14406. "type": "string",
  14407. "enum": ["sync"]
  14408. },
  14409. "name": {
  14410. "type": "string",
  14411. "enum": ["session.updated.1"]
  14412. },
  14413. "id": {
  14414. "type": "string"
  14415. },
  14416. "seq": {
  14417. "type": "number"
  14418. },
  14419. "aggregateID": {
  14420. "type": "string",
  14421. "enum": ["sessionID"]
  14422. },
  14423. "data": {
  14424. "type": "object",
  14425. "properties": {
  14426. "sessionID": {
  14427. "type": "string",
  14428. "pattern": "^ses"
  14429. },
  14430. "info": {
  14431. "type": "object",
  14432. "properties": {
  14433. "id": {
  14434. "anyOf": [
  14435. {
  14436. "type": "string",
  14437. "pattern": "^ses"
  14438. },
  14439. {
  14440. "type": "null"
  14441. }
  14442. ]
  14443. },
  14444. "slug": {
  14445. "anyOf": [
  14446. {
  14447. "type": "string"
  14448. },
  14449. {
  14450. "type": "null"
  14451. }
  14452. ]
  14453. },
  14454. "projectID": {
  14455. "anyOf": [
  14456. {
  14457. "type": "string"
  14458. },
  14459. {
  14460. "type": "null"
  14461. }
  14462. ]
  14463. },
  14464. "workspaceID": {
  14465. "anyOf": [
  14466. {
  14467. "type": "string",
  14468. "pattern": "^wrk"
  14469. },
  14470. {
  14471. "type": "null"
  14472. }
  14473. ]
  14474. },
  14475. "directory": {
  14476. "anyOf": [
  14477. {
  14478. "type": "string"
  14479. },
  14480. {
  14481. "type": "null"
  14482. }
  14483. ]
  14484. },
  14485. "path": {
  14486. "anyOf": [
  14487. {
  14488. "type": "string"
  14489. },
  14490. {
  14491. "type": "null"
  14492. }
  14493. ]
  14494. },
  14495. "parentID": {
  14496. "anyOf": [
  14497. {
  14498. "type": "string",
  14499. "pattern": "^ses"
  14500. },
  14501. {
  14502. "type": "null"
  14503. }
  14504. ]
  14505. },
  14506. "summary": {
  14507. "anyOf": [
  14508. {
  14509. "type": "object",
  14510. "properties": {
  14511. "additions": {
  14512. "type": "number"
  14513. },
  14514. "deletions": {
  14515. "type": "number"
  14516. },
  14517. "files": {
  14518. "type": "number"
  14519. },
  14520. "diffs": {
  14521. "type": "array",
  14522. "items": {
  14523. "$ref": "#/components/schemas/SnapshotFileDiff"
  14524. }
  14525. }
  14526. },
  14527. "required": ["additions", "deletions", "files"],
  14528. "additionalProperties": false
  14529. },
  14530. {
  14531. "type": "null"
  14532. }
  14533. ]
  14534. },
  14535. "cost": {
  14536. "anyOf": [
  14537. {
  14538. "type": "number"
  14539. },
  14540. {
  14541. "type": "null"
  14542. }
  14543. ]
  14544. },
  14545. "tokens": {
  14546. "anyOf": [
  14547. {
  14548. "type": "object",
  14549. "properties": {
  14550. "input": {
  14551. "type": "number"
  14552. },
  14553. "output": {
  14554. "type": "number"
  14555. },
  14556. "reasoning": {
  14557. "type": "number"
  14558. },
  14559. "cache": {
  14560. "type": "object",
  14561. "properties": {
  14562. "read": {
  14563. "type": "number"
  14564. },
  14565. "write": {
  14566. "type": "number"
  14567. }
  14568. },
  14569. "required": ["read", "write"],
  14570. "additionalProperties": false
  14571. }
  14572. },
  14573. "required": ["input", "output", "reasoning", "cache"],
  14574. "additionalProperties": false
  14575. },
  14576. {
  14577. "type": "null"
  14578. }
  14579. ]
  14580. },
  14581. "share": {
  14582. "type": "object",
  14583. "properties": {
  14584. "url": {
  14585. "anyOf": [
  14586. {
  14587. "type": "string"
  14588. },
  14589. {
  14590. "type": "null"
  14591. }
  14592. ]
  14593. }
  14594. },
  14595. "additionalProperties": false
  14596. },
  14597. "title": {
  14598. "anyOf": [
  14599. {
  14600. "type": "string"
  14601. },
  14602. {
  14603. "type": "null"
  14604. }
  14605. ]
  14606. },
  14607. "agent": {
  14608. "anyOf": [
  14609. {
  14610. "type": "string"
  14611. },
  14612. {
  14613. "type": "null"
  14614. }
  14615. ]
  14616. },
  14617. "model": {
  14618. "anyOf": [
  14619. {
  14620. "type": "object",
  14621. "properties": {
  14622. "id": {
  14623. "type": "string"
  14624. },
  14625. "providerID": {
  14626. "type": "string"
  14627. },
  14628. "variant": {
  14629. "type": "string"
  14630. }
  14631. },
  14632. "required": ["id", "providerID"],
  14633. "additionalProperties": false
  14634. },
  14635. {
  14636. "type": "null"
  14637. }
  14638. ]
  14639. },
  14640. "version": {
  14641. "anyOf": [
  14642. {
  14643. "type": "string"
  14644. },
  14645. {
  14646. "type": "null"
  14647. }
  14648. ]
  14649. },
  14650. "time": {
  14651. "type": "object",
  14652. "properties": {
  14653. "created": {
  14654. "anyOf": [
  14655. {
  14656. "type": "integer",
  14657. "minimum": 0
  14658. },
  14659. {
  14660. "type": "null"
  14661. }
  14662. ]
  14663. },
  14664. "updated": {
  14665. "anyOf": [
  14666. {
  14667. "type": "integer",
  14668. "minimum": 0
  14669. },
  14670. {
  14671. "type": "null"
  14672. }
  14673. ]
  14674. },
  14675. "compacting": {
  14676. "anyOf": [
  14677. {
  14678. "type": "integer",
  14679. "minimum": 0
  14680. },
  14681. {
  14682. "type": "null"
  14683. }
  14684. ]
  14685. },
  14686. "archived": {
  14687. "anyOf": [
  14688. {
  14689. "type": "number"
  14690. },
  14691. {
  14692. "type": "null"
  14693. }
  14694. ]
  14695. }
  14696. },
  14697. "additionalProperties": false
  14698. },
  14699. "permission": {
  14700. "anyOf": [
  14701. {
  14702. "$ref": "#/components/schemas/PermissionRuleset"
  14703. },
  14704. {
  14705. "type": "null"
  14706. }
  14707. ]
  14708. },
  14709. "revert": {
  14710. "anyOf": [
  14711. {
  14712. "type": "object",
  14713. "properties": {
  14714. "messageID": {
  14715. "type": "string",
  14716. "pattern": "^msg"
  14717. },
  14718. "partID": {
  14719. "type": "string",
  14720. "pattern": "^prt"
  14721. },
  14722. "snapshot": {
  14723. "type": "string"
  14724. },
  14725. "diff": {
  14726. "type": "string"
  14727. }
  14728. },
  14729. "required": ["messageID"],
  14730. "additionalProperties": false
  14731. },
  14732. {
  14733. "type": "null"
  14734. }
  14735. ]
  14736. }
  14737. },
  14738. "additionalProperties": false
  14739. }
  14740. },
  14741. "required": ["sessionID", "info"],
  14742. "additionalProperties": false
  14743. }
  14744. },
  14745. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14746. "additionalProperties": false
  14747. },
  14748. "SyncEventSessionDeleted": {
  14749. "type": "object",
  14750. "properties": {
  14751. "type": {
  14752. "type": "string",
  14753. "enum": ["sync"]
  14754. },
  14755. "name": {
  14756. "type": "string",
  14757. "enum": ["session.deleted.1"]
  14758. },
  14759. "id": {
  14760. "type": "string"
  14761. },
  14762. "seq": {
  14763. "type": "number"
  14764. },
  14765. "aggregateID": {
  14766. "type": "string",
  14767. "enum": ["sessionID"]
  14768. },
  14769. "data": {
  14770. "type": "object",
  14771. "properties": {
  14772. "sessionID": {
  14773. "type": "string",
  14774. "pattern": "^ses"
  14775. },
  14776. "info": {
  14777. "$ref": "#/components/schemas/Session"
  14778. }
  14779. },
  14780. "required": ["sessionID", "info"],
  14781. "additionalProperties": false
  14782. }
  14783. },
  14784. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14785. "additionalProperties": false
  14786. },
  14787. "SyncEventSessionNextAgentSwitched": {
  14788. "type": "object",
  14789. "properties": {
  14790. "type": {
  14791. "type": "string",
  14792. "enum": ["sync"]
  14793. },
  14794. "name": {
  14795. "type": "string",
  14796. "enum": ["session.next.agent.switched.1"]
  14797. },
  14798. "id": {
  14799. "type": "string"
  14800. },
  14801. "seq": {
  14802. "type": "number"
  14803. },
  14804. "aggregateID": {
  14805. "type": "string",
  14806. "enum": ["sessionID"]
  14807. },
  14808. "data": {
  14809. "type": "object",
  14810. "properties": {
  14811. "timestamp": {
  14812. "type": "number"
  14813. },
  14814. "sessionID": {
  14815. "type": "string",
  14816. "pattern": "^ses"
  14817. },
  14818. "agent": {
  14819. "type": "string"
  14820. }
  14821. },
  14822. "required": ["timestamp", "sessionID", "agent"],
  14823. "additionalProperties": false
  14824. }
  14825. },
  14826. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14827. "additionalProperties": false
  14828. },
  14829. "SyncEventSessionNextModelSwitched": {
  14830. "type": "object",
  14831. "properties": {
  14832. "type": {
  14833. "type": "string",
  14834. "enum": ["sync"]
  14835. },
  14836. "name": {
  14837. "type": "string",
  14838. "enum": ["session.next.model.switched.1"]
  14839. },
  14840. "id": {
  14841. "type": "string"
  14842. },
  14843. "seq": {
  14844. "type": "number"
  14845. },
  14846. "aggregateID": {
  14847. "type": "string",
  14848. "enum": ["sessionID"]
  14849. },
  14850. "data": {
  14851. "type": "object",
  14852. "properties": {
  14853. "timestamp": {
  14854. "type": "number"
  14855. },
  14856. "sessionID": {
  14857. "type": "string",
  14858. "pattern": "^ses"
  14859. },
  14860. "model": {
  14861. "type": "object",
  14862. "properties": {
  14863. "id": {
  14864. "type": "string"
  14865. },
  14866. "providerID": {
  14867. "type": "string"
  14868. },
  14869. "variant": {
  14870. "type": "string"
  14871. }
  14872. },
  14873. "required": ["id", "providerID", "variant"],
  14874. "additionalProperties": false
  14875. }
  14876. },
  14877. "required": ["timestamp", "sessionID", "model"],
  14878. "additionalProperties": false
  14879. }
  14880. },
  14881. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14882. "additionalProperties": false
  14883. },
  14884. "SyncEventSessionNextPrompted": {
  14885. "type": "object",
  14886. "properties": {
  14887. "type": {
  14888. "type": "string",
  14889. "enum": ["sync"]
  14890. },
  14891. "name": {
  14892. "type": "string",
  14893. "enum": ["session.next.prompted.1"]
  14894. },
  14895. "id": {
  14896. "type": "string"
  14897. },
  14898. "seq": {
  14899. "type": "number"
  14900. },
  14901. "aggregateID": {
  14902. "type": "string",
  14903. "enum": ["sessionID"]
  14904. },
  14905. "data": {
  14906. "type": "object",
  14907. "properties": {
  14908. "timestamp": {
  14909. "type": "number"
  14910. },
  14911. "sessionID": {
  14912. "type": "string",
  14913. "pattern": "^ses"
  14914. },
  14915. "prompt": {
  14916. "$ref": "#/components/schemas/Prompt"
  14917. }
  14918. },
  14919. "required": ["timestamp", "sessionID", "prompt"],
  14920. "additionalProperties": false
  14921. }
  14922. },
  14923. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14924. "additionalProperties": false
  14925. },
  14926. "SyncEventSessionNextSynthetic": {
  14927. "type": "object",
  14928. "properties": {
  14929. "type": {
  14930. "type": "string",
  14931. "enum": ["sync"]
  14932. },
  14933. "name": {
  14934. "type": "string",
  14935. "enum": ["session.next.synthetic.1"]
  14936. },
  14937. "id": {
  14938. "type": "string"
  14939. },
  14940. "seq": {
  14941. "type": "number"
  14942. },
  14943. "aggregateID": {
  14944. "type": "string",
  14945. "enum": ["sessionID"]
  14946. },
  14947. "data": {
  14948. "type": "object",
  14949. "properties": {
  14950. "timestamp": {
  14951. "type": "number"
  14952. },
  14953. "sessionID": {
  14954. "type": "string",
  14955. "pattern": "^ses"
  14956. },
  14957. "text": {
  14958. "type": "string"
  14959. }
  14960. },
  14961. "required": ["timestamp", "sessionID", "text"],
  14962. "additionalProperties": false
  14963. }
  14964. },
  14965. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14966. "additionalProperties": false
  14967. },
  14968. "SyncEventSessionNextShellStarted": {
  14969. "type": "object",
  14970. "properties": {
  14971. "type": {
  14972. "type": "string",
  14973. "enum": ["sync"]
  14974. },
  14975. "name": {
  14976. "type": "string",
  14977. "enum": ["session.next.shell.started.1"]
  14978. },
  14979. "id": {
  14980. "type": "string"
  14981. },
  14982. "seq": {
  14983. "type": "number"
  14984. },
  14985. "aggregateID": {
  14986. "type": "string",
  14987. "enum": ["sessionID"]
  14988. },
  14989. "data": {
  14990. "type": "object",
  14991. "properties": {
  14992. "timestamp": {
  14993. "type": "number"
  14994. },
  14995. "sessionID": {
  14996. "type": "string",
  14997. "pattern": "^ses"
  14998. },
  14999. "callID": {
  15000. "type": "string"
  15001. },
  15002. "command": {
  15003. "type": "string"
  15004. }
  15005. },
  15006. "required": ["timestamp", "sessionID", "callID", "command"],
  15007. "additionalProperties": false
  15008. }
  15009. },
  15010. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15011. "additionalProperties": false
  15012. },
  15013. "SyncEventSessionNextShellEnded": {
  15014. "type": "object",
  15015. "properties": {
  15016. "type": {
  15017. "type": "string",
  15018. "enum": ["sync"]
  15019. },
  15020. "name": {
  15021. "type": "string",
  15022. "enum": ["session.next.shell.ended.1"]
  15023. },
  15024. "id": {
  15025. "type": "string"
  15026. },
  15027. "seq": {
  15028. "type": "number"
  15029. },
  15030. "aggregateID": {
  15031. "type": "string",
  15032. "enum": ["sessionID"]
  15033. },
  15034. "data": {
  15035. "type": "object",
  15036. "properties": {
  15037. "timestamp": {
  15038. "type": "number"
  15039. },
  15040. "sessionID": {
  15041. "type": "string",
  15042. "pattern": "^ses"
  15043. },
  15044. "callID": {
  15045. "type": "string"
  15046. },
  15047. "output": {
  15048. "type": "string"
  15049. }
  15050. },
  15051. "required": ["timestamp", "sessionID", "callID", "output"],
  15052. "additionalProperties": false
  15053. }
  15054. },
  15055. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15056. "additionalProperties": false
  15057. },
  15058. "SyncEventSessionNextStepStarted": {
  15059. "type": "object",
  15060. "properties": {
  15061. "type": {
  15062. "type": "string",
  15063. "enum": ["sync"]
  15064. },
  15065. "name": {
  15066. "type": "string",
  15067. "enum": ["session.next.step.started.1"]
  15068. },
  15069. "id": {
  15070. "type": "string"
  15071. },
  15072. "seq": {
  15073. "type": "number"
  15074. },
  15075. "aggregateID": {
  15076. "type": "string",
  15077. "enum": ["sessionID"]
  15078. },
  15079. "data": {
  15080. "type": "object",
  15081. "properties": {
  15082. "timestamp": {
  15083. "type": "number"
  15084. },
  15085. "sessionID": {
  15086. "type": "string",
  15087. "pattern": "^ses"
  15088. },
  15089. "agent": {
  15090. "type": "string"
  15091. },
  15092. "model": {
  15093. "type": "object",
  15094. "properties": {
  15095. "id": {
  15096. "type": "string"
  15097. },
  15098. "providerID": {
  15099. "type": "string"
  15100. },
  15101. "variant": {
  15102. "type": "string"
  15103. }
  15104. },
  15105. "required": ["id", "providerID", "variant"],
  15106. "additionalProperties": false
  15107. },
  15108. "snapshot": {
  15109. "type": "string"
  15110. }
  15111. },
  15112. "required": ["timestamp", "sessionID", "agent", "model"],
  15113. "additionalProperties": false
  15114. }
  15115. },
  15116. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15117. "additionalProperties": false
  15118. },
  15119. "SyncEventSessionNextStepEnded": {
  15120. "type": "object",
  15121. "properties": {
  15122. "type": {
  15123. "type": "string",
  15124. "enum": ["sync"]
  15125. },
  15126. "name": {
  15127. "type": "string",
  15128. "enum": ["session.next.step.ended.1"]
  15129. },
  15130. "id": {
  15131. "type": "string"
  15132. },
  15133. "seq": {
  15134. "type": "number"
  15135. },
  15136. "aggregateID": {
  15137. "type": "string",
  15138. "enum": ["sessionID"]
  15139. },
  15140. "data": {
  15141. "type": "object",
  15142. "properties": {
  15143. "timestamp": {
  15144. "type": "number"
  15145. },
  15146. "sessionID": {
  15147. "type": "string",
  15148. "pattern": "^ses"
  15149. },
  15150. "finish": {
  15151. "type": "string"
  15152. },
  15153. "cost": {
  15154. "type": "number"
  15155. },
  15156. "tokens": {
  15157. "type": "object",
  15158. "properties": {
  15159. "input": {
  15160. "type": "number"
  15161. },
  15162. "output": {
  15163. "type": "number"
  15164. },
  15165. "reasoning": {
  15166. "type": "number"
  15167. },
  15168. "cache": {
  15169. "type": "object",
  15170. "properties": {
  15171. "read": {
  15172. "type": "number"
  15173. },
  15174. "write": {
  15175. "type": "number"
  15176. }
  15177. },
  15178. "required": ["read", "write"],
  15179. "additionalProperties": false
  15180. }
  15181. },
  15182. "required": ["input", "output", "reasoning", "cache"],
  15183. "additionalProperties": false
  15184. },
  15185. "snapshot": {
  15186. "type": "string"
  15187. }
  15188. },
  15189. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  15190. "additionalProperties": false
  15191. }
  15192. },
  15193. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15194. "additionalProperties": false
  15195. },
  15196. "SyncEventSessionNextStepFailed": {
  15197. "type": "object",
  15198. "properties": {
  15199. "type": {
  15200. "type": "string",
  15201. "enum": ["sync"]
  15202. },
  15203. "name": {
  15204. "type": "string",
  15205. "enum": ["session.next.step.failed.1"]
  15206. },
  15207. "id": {
  15208. "type": "string"
  15209. },
  15210. "seq": {
  15211. "type": "number"
  15212. },
  15213. "aggregateID": {
  15214. "type": "string",
  15215. "enum": ["sessionID"]
  15216. },
  15217. "data": {
  15218. "type": "object",
  15219. "properties": {
  15220. "timestamp": {
  15221. "type": "number"
  15222. },
  15223. "sessionID": {
  15224. "type": "string",
  15225. "pattern": "^ses"
  15226. },
  15227. "error": {
  15228. "$ref": "#/components/schemas/SessionErrorUnknown"
  15229. }
  15230. },
  15231. "required": ["timestamp", "sessionID", "error"],
  15232. "additionalProperties": false
  15233. }
  15234. },
  15235. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15236. "additionalProperties": false
  15237. },
  15238. "SyncEventSessionNextTextStarted": {
  15239. "type": "object",
  15240. "properties": {
  15241. "type": {
  15242. "type": "string",
  15243. "enum": ["sync"]
  15244. },
  15245. "name": {
  15246. "type": "string",
  15247. "enum": ["session.next.text.started.1"]
  15248. },
  15249. "id": {
  15250. "type": "string"
  15251. },
  15252. "seq": {
  15253. "type": "number"
  15254. },
  15255. "aggregateID": {
  15256. "type": "string",
  15257. "enum": ["sessionID"]
  15258. },
  15259. "data": {
  15260. "type": "object",
  15261. "properties": {
  15262. "timestamp": {
  15263. "type": "number"
  15264. },
  15265. "sessionID": {
  15266. "type": "string",
  15267. "pattern": "^ses"
  15268. }
  15269. },
  15270. "required": ["timestamp", "sessionID"],
  15271. "additionalProperties": false
  15272. }
  15273. },
  15274. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15275. "additionalProperties": false
  15276. },
  15277. "SyncEventSessionNextTextDelta": {
  15278. "type": "object",
  15279. "properties": {
  15280. "type": {
  15281. "type": "string",
  15282. "enum": ["sync"]
  15283. },
  15284. "name": {
  15285. "type": "string",
  15286. "enum": ["session.next.text.delta.1"]
  15287. },
  15288. "id": {
  15289. "type": "string"
  15290. },
  15291. "seq": {
  15292. "type": "number"
  15293. },
  15294. "aggregateID": {
  15295. "type": "string",
  15296. "enum": ["sessionID"]
  15297. },
  15298. "data": {
  15299. "type": "object",
  15300. "properties": {
  15301. "timestamp": {
  15302. "type": "number"
  15303. },
  15304. "sessionID": {
  15305. "type": "string",
  15306. "pattern": "^ses"
  15307. },
  15308. "delta": {
  15309. "type": "string"
  15310. }
  15311. },
  15312. "required": ["timestamp", "sessionID", "delta"],
  15313. "additionalProperties": false
  15314. }
  15315. },
  15316. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15317. "additionalProperties": false
  15318. },
  15319. "SyncEventSessionNextTextEnded": {
  15320. "type": "object",
  15321. "properties": {
  15322. "type": {
  15323. "type": "string",
  15324. "enum": ["sync"]
  15325. },
  15326. "name": {
  15327. "type": "string",
  15328. "enum": ["session.next.text.ended.1"]
  15329. },
  15330. "id": {
  15331. "type": "string"
  15332. },
  15333. "seq": {
  15334. "type": "number"
  15335. },
  15336. "aggregateID": {
  15337. "type": "string",
  15338. "enum": ["sessionID"]
  15339. },
  15340. "data": {
  15341. "type": "object",
  15342. "properties": {
  15343. "timestamp": {
  15344. "type": "number"
  15345. },
  15346. "sessionID": {
  15347. "type": "string",
  15348. "pattern": "^ses"
  15349. },
  15350. "text": {
  15351. "type": "string"
  15352. }
  15353. },
  15354. "required": ["timestamp", "sessionID", "text"],
  15355. "additionalProperties": false
  15356. }
  15357. },
  15358. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15359. "additionalProperties": false
  15360. },
  15361. "SyncEventSessionNextReasoningStarted": {
  15362. "type": "object",
  15363. "properties": {
  15364. "type": {
  15365. "type": "string",
  15366. "enum": ["sync"]
  15367. },
  15368. "name": {
  15369. "type": "string",
  15370. "enum": ["session.next.reasoning.started.1"]
  15371. },
  15372. "id": {
  15373. "type": "string"
  15374. },
  15375. "seq": {
  15376. "type": "number"
  15377. },
  15378. "aggregateID": {
  15379. "type": "string",
  15380. "enum": ["sessionID"]
  15381. },
  15382. "data": {
  15383. "type": "object",
  15384. "properties": {
  15385. "timestamp": {
  15386. "type": "number"
  15387. },
  15388. "sessionID": {
  15389. "type": "string",
  15390. "pattern": "^ses"
  15391. },
  15392. "reasoningID": {
  15393. "type": "string"
  15394. }
  15395. },
  15396. "required": ["timestamp", "sessionID", "reasoningID"],
  15397. "additionalProperties": false
  15398. }
  15399. },
  15400. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15401. "additionalProperties": false
  15402. },
  15403. "SyncEventSessionNextReasoningDelta": {
  15404. "type": "object",
  15405. "properties": {
  15406. "type": {
  15407. "type": "string",
  15408. "enum": ["sync"]
  15409. },
  15410. "name": {
  15411. "type": "string",
  15412. "enum": ["session.next.reasoning.delta.1"]
  15413. },
  15414. "id": {
  15415. "type": "string"
  15416. },
  15417. "seq": {
  15418. "type": "number"
  15419. },
  15420. "aggregateID": {
  15421. "type": "string",
  15422. "enum": ["sessionID"]
  15423. },
  15424. "data": {
  15425. "type": "object",
  15426. "properties": {
  15427. "timestamp": {
  15428. "type": "number"
  15429. },
  15430. "sessionID": {
  15431. "type": "string",
  15432. "pattern": "^ses"
  15433. },
  15434. "reasoningID": {
  15435. "type": "string"
  15436. },
  15437. "delta": {
  15438. "type": "string"
  15439. }
  15440. },
  15441. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  15442. "additionalProperties": false
  15443. }
  15444. },
  15445. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15446. "additionalProperties": false
  15447. },
  15448. "SyncEventSessionNextReasoningEnded": {
  15449. "type": "object",
  15450. "properties": {
  15451. "type": {
  15452. "type": "string",
  15453. "enum": ["sync"]
  15454. },
  15455. "name": {
  15456. "type": "string",
  15457. "enum": ["session.next.reasoning.ended.1"]
  15458. },
  15459. "id": {
  15460. "type": "string"
  15461. },
  15462. "seq": {
  15463. "type": "number"
  15464. },
  15465. "aggregateID": {
  15466. "type": "string",
  15467. "enum": ["sessionID"]
  15468. },
  15469. "data": {
  15470. "type": "object",
  15471. "properties": {
  15472. "timestamp": {
  15473. "type": "number"
  15474. },
  15475. "sessionID": {
  15476. "type": "string",
  15477. "pattern": "^ses"
  15478. },
  15479. "reasoningID": {
  15480. "type": "string"
  15481. },
  15482. "text": {
  15483. "type": "string"
  15484. }
  15485. },
  15486. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  15487. "additionalProperties": false
  15488. }
  15489. },
  15490. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15491. "additionalProperties": false
  15492. },
  15493. "SyncEventSessionNextToolInputStarted": {
  15494. "type": "object",
  15495. "properties": {
  15496. "type": {
  15497. "type": "string",
  15498. "enum": ["sync"]
  15499. },
  15500. "name": {
  15501. "type": "string",
  15502. "enum": ["session.next.tool.input.started.1"]
  15503. },
  15504. "id": {
  15505. "type": "string"
  15506. },
  15507. "seq": {
  15508. "type": "number"
  15509. },
  15510. "aggregateID": {
  15511. "type": "string",
  15512. "enum": ["sessionID"]
  15513. },
  15514. "data": {
  15515. "type": "object",
  15516. "properties": {
  15517. "timestamp": {
  15518. "type": "number"
  15519. },
  15520. "sessionID": {
  15521. "type": "string",
  15522. "pattern": "^ses"
  15523. },
  15524. "callID": {
  15525. "type": "string"
  15526. },
  15527. "name": {
  15528. "type": "string"
  15529. }
  15530. },
  15531. "required": ["timestamp", "sessionID", "callID", "name"],
  15532. "additionalProperties": false
  15533. }
  15534. },
  15535. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15536. "additionalProperties": false
  15537. },
  15538. "SyncEventSessionNextToolInputDelta": {
  15539. "type": "object",
  15540. "properties": {
  15541. "type": {
  15542. "type": "string",
  15543. "enum": ["sync"]
  15544. },
  15545. "name": {
  15546. "type": "string",
  15547. "enum": ["session.next.tool.input.delta.1"]
  15548. },
  15549. "id": {
  15550. "type": "string"
  15551. },
  15552. "seq": {
  15553. "type": "number"
  15554. },
  15555. "aggregateID": {
  15556. "type": "string",
  15557. "enum": ["sessionID"]
  15558. },
  15559. "data": {
  15560. "type": "object",
  15561. "properties": {
  15562. "timestamp": {
  15563. "type": "number"
  15564. },
  15565. "sessionID": {
  15566. "type": "string",
  15567. "pattern": "^ses"
  15568. },
  15569. "callID": {
  15570. "type": "string"
  15571. },
  15572. "delta": {
  15573. "type": "string"
  15574. }
  15575. },
  15576. "required": ["timestamp", "sessionID", "callID", "delta"],
  15577. "additionalProperties": false
  15578. }
  15579. },
  15580. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15581. "additionalProperties": false
  15582. },
  15583. "SyncEventSessionNextToolInputEnded": {
  15584. "type": "object",
  15585. "properties": {
  15586. "type": {
  15587. "type": "string",
  15588. "enum": ["sync"]
  15589. },
  15590. "name": {
  15591. "type": "string",
  15592. "enum": ["session.next.tool.input.ended.1"]
  15593. },
  15594. "id": {
  15595. "type": "string"
  15596. },
  15597. "seq": {
  15598. "type": "number"
  15599. },
  15600. "aggregateID": {
  15601. "type": "string",
  15602. "enum": ["sessionID"]
  15603. },
  15604. "data": {
  15605. "type": "object",
  15606. "properties": {
  15607. "timestamp": {
  15608. "type": "number"
  15609. },
  15610. "sessionID": {
  15611. "type": "string",
  15612. "pattern": "^ses"
  15613. },
  15614. "callID": {
  15615. "type": "string"
  15616. },
  15617. "text": {
  15618. "type": "string"
  15619. }
  15620. },
  15621. "required": ["timestamp", "sessionID", "callID", "text"],
  15622. "additionalProperties": false
  15623. }
  15624. },
  15625. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15626. "additionalProperties": false
  15627. },
  15628. "SyncEventSessionNextToolCalled": {
  15629. "type": "object",
  15630. "properties": {
  15631. "type": {
  15632. "type": "string",
  15633. "enum": ["sync"]
  15634. },
  15635. "name": {
  15636. "type": "string",
  15637. "enum": ["session.next.tool.called.1"]
  15638. },
  15639. "id": {
  15640. "type": "string"
  15641. },
  15642. "seq": {
  15643. "type": "number"
  15644. },
  15645. "aggregateID": {
  15646. "type": "string",
  15647. "enum": ["sessionID"]
  15648. },
  15649. "data": {
  15650. "type": "object",
  15651. "properties": {
  15652. "timestamp": {
  15653. "type": "number"
  15654. },
  15655. "sessionID": {
  15656. "type": "string",
  15657. "pattern": "^ses"
  15658. },
  15659. "callID": {
  15660. "type": "string"
  15661. },
  15662. "tool": {
  15663. "type": "string"
  15664. },
  15665. "input": {
  15666. "type": "object"
  15667. },
  15668. "provider": {
  15669. "type": "object",
  15670. "properties": {
  15671. "executed": {
  15672. "type": "boolean"
  15673. },
  15674. "metadata": {
  15675. "type": "object"
  15676. }
  15677. },
  15678. "required": ["executed"],
  15679. "additionalProperties": false
  15680. }
  15681. },
  15682. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  15683. "additionalProperties": false
  15684. }
  15685. },
  15686. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15687. "additionalProperties": false
  15688. },
  15689. "SyncEventSessionNextToolProgress": {
  15690. "type": "object",
  15691. "properties": {
  15692. "type": {
  15693. "type": "string",
  15694. "enum": ["sync"]
  15695. },
  15696. "name": {
  15697. "type": "string",
  15698. "enum": ["session.next.tool.progress.1"]
  15699. },
  15700. "id": {
  15701. "type": "string"
  15702. },
  15703. "seq": {
  15704. "type": "number"
  15705. },
  15706. "aggregateID": {
  15707. "type": "string",
  15708. "enum": ["sessionID"]
  15709. },
  15710. "data": {
  15711. "type": "object",
  15712. "properties": {
  15713. "timestamp": {
  15714. "type": "number"
  15715. },
  15716. "sessionID": {
  15717. "type": "string",
  15718. "pattern": "^ses"
  15719. },
  15720. "callID": {
  15721. "type": "string"
  15722. },
  15723. "structured": {
  15724. "type": "object"
  15725. },
  15726. "content": {
  15727. "type": "array",
  15728. "items": {
  15729. "anyOf": [
  15730. {
  15731. "$ref": "#/components/schemas/ToolTextContent"
  15732. },
  15733. {
  15734. "$ref": "#/components/schemas/ToolFileContent"
  15735. }
  15736. ]
  15737. }
  15738. }
  15739. },
  15740. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  15741. "additionalProperties": false
  15742. }
  15743. },
  15744. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15745. "additionalProperties": false
  15746. },
  15747. "SyncEventSessionNextToolSuccess": {
  15748. "type": "object",
  15749. "properties": {
  15750. "type": {
  15751. "type": "string",
  15752. "enum": ["sync"]
  15753. },
  15754. "name": {
  15755. "type": "string",
  15756. "enum": ["session.next.tool.success.1"]
  15757. },
  15758. "id": {
  15759. "type": "string"
  15760. },
  15761. "seq": {
  15762. "type": "number"
  15763. },
  15764. "aggregateID": {
  15765. "type": "string",
  15766. "enum": ["sessionID"]
  15767. },
  15768. "data": {
  15769. "type": "object",
  15770. "properties": {
  15771. "timestamp": {
  15772. "type": "number"
  15773. },
  15774. "sessionID": {
  15775. "type": "string",
  15776. "pattern": "^ses"
  15777. },
  15778. "callID": {
  15779. "type": "string"
  15780. },
  15781. "structured": {
  15782. "type": "object"
  15783. },
  15784. "content": {
  15785. "type": "array",
  15786. "items": {
  15787. "anyOf": [
  15788. {
  15789. "$ref": "#/components/schemas/ToolTextContent"
  15790. },
  15791. {
  15792. "$ref": "#/components/schemas/ToolFileContent"
  15793. }
  15794. ]
  15795. }
  15796. },
  15797. "provider": {
  15798. "type": "object",
  15799. "properties": {
  15800. "executed": {
  15801. "type": "boolean"
  15802. },
  15803. "metadata": {
  15804. "type": "object"
  15805. }
  15806. },
  15807. "required": ["executed"],
  15808. "additionalProperties": false
  15809. }
  15810. },
  15811. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  15812. "additionalProperties": false
  15813. }
  15814. },
  15815. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15816. "additionalProperties": false
  15817. },
  15818. "SyncEventSessionNextToolFailed": {
  15819. "type": "object",
  15820. "properties": {
  15821. "type": {
  15822. "type": "string",
  15823. "enum": ["sync"]
  15824. },
  15825. "name": {
  15826. "type": "string",
  15827. "enum": ["session.next.tool.failed.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. "error": {
  15853. "$ref": "#/components/schemas/SessionErrorUnknown"
  15854. },
  15855. "provider": {
  15856. "type": "object",
  15857. "properties": {
  15858. "executed": {
  15859. "type": "boolean"
  15860. },
  15861. "metadata": {
  15862. "type": "object"
  15863. }
  15864. },
  15865. "required": ["executed"],
  15866. "additionalProperties": false
  15867. }
  15868. },
  15869. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  15870. "additionalProperties": false
  15871. }
  15872. },
  15873. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15874. "additionalProperties": false
  15875. },
  15876. "SyncEventSessionNextRetried": {
  15877. "type": "object",
  15878. "properties": {
  15879. "type": {
  15880. "type": "string",
  15881. "enum": ["sync"]
  15882. },
  15883. "name": {
  15884. "type": "string",
  15885. "enum": ["session.next.retried.1"]
  15886. },
  15887. "id": {
  15888. "type": "string"
  15889. },
  15890. "seq": {
  15891. "type": "number"
  15892. },
  15893. "aggregateID": {
  15894. "type": "string",
  15895. "enum": ["sessionID"]
  15896. },
  15897. "data": {
  15898. "type": "object",
  15899. "properties": {
  15900. "timestamp": {
  15901. "type": "number"
  15902. },
  15903. "sessionID": {
  15904. "type": "string",
  15905. "pattern": "^ses"
  15906. },
  15907. "attempt": {
  15908. "type": "number"
  15909. },
  15910. "error": {
  15911. "$ref": "#/components/schemas/SessionNextRetry_error"
  15912. }
  15913. },
  15914. "required": ["timestamp", "sessionID", "attempt", "error"],
  15915. "additionalProperties": false
  15916. }
  15917. },
  15918. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15919. "additionalProperties": false
  15920. },
  15921. "SyncEventSessionNextCompactionStarted": {
  15922. "type": "object",
  15923. "properties": {
  15924. "type": {
  15925. "type": "string",
  15926. "enum": ["sync"]
  15927. },
  15928. "name": {
  15929. "type": "string",
  15930. "enum": ["session.next.compaction.started.1"]
  15931. },
  15932. "id": {
  15933. "type": "string"
  15934. },
  15935. "seq": {
  15936. "type": "number"
  15937. },
  15938. "aggregateID": {
  15939. "type": "string",
  15940. "enum": ["sessionID"]
  15941. },
  15942. "data": {
  15943. "type": "object",
  15944. "properties": {
  15945. "timestamp": {
  15946. "type": "number"
  15947. },
  15948. "sessionID": {
  15949. "type": "string",
  15950. "pattern": "^ses"
  15951. },
  15952. "reason": {
  15953. "type": "string",
  15954. "enum": ["auto", "manual"]
  15955. }
  15956. },
  15957. "required": ["timestamp", "sessionID", "reason"],
  15958. "additionalProperties": false
  15959. }
  15960. },
  15961. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15962. "additionalProperties": false
  15963. },
  15964. "SyncEventSessionNextCompactionDelta": {
  15965. "type": "object",
  15966. "properties": {
  15967. "type": {
  15968. "type": "string",
  15969. "enum": ["sync"]
  15970. },
  15971. "name": {
  15972. "type": "string",
  15973. "enum": ["session.next.compaction.delta.1"]
  15974. },
  15975. "id": {
  15976. "type": "string"
  15977. },
  15978. "seq": {
  15979. "type": "number"
  15980. },
  15981. "aggregateID": {
  15982. "type": "string",
  15983. "enum": ["sessionID"]
  15984. },
  15985. "data": {
  15986. "type": "object",
  15987. "properties": {
  15988. "timestamp": {
  15989. "type": "number"
  15990. },
  15991. "sessionID": {
  15992. "type": "string",
  15993. "pattern": "^ses"
  15994. },
  15995. "text": {
  15996. "type": "string"
  15997. }
  15998. },
  15999. "required": ["timestamp", "sessionID", "text"],
  16000. "additionalProperties": false
  16001. }
  16002. },
  16003. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16004. "additionalProperties": false
  16005. },
  16006. "SyncEventSessionNextCompactionEnded": {
  16007. "type": "object",
  16008. "properties": {
  16009. "type": {
  16010. "type": "string",
  16011. "enum": ["sync"]
  16012. },
  16013. "name": {
  16014. "type": "string",
  16015. "enum": ["session.next.compaction.ended.1"]
  16016. },
  16017. "id": {
  16018. "type": "string"
  16019. },
  16020. "seq": {
  16021. "type": "number"
  16022. },
  16023. "aggregateID": {
  16024. "type": "string",
  16025. "enum": ["sessionID"]
  16026. },
  16027. "data": {
  16028. "type": "object",
  16029. "properties": {
  16030. "timestamp": {
  16031. "type": "number"
  16032. },
  16033. "sessionID": {
  16034. "type": "string",
  16035. "pattern": "^ses"
  16036. },
  16037. "text": {
  16038. "type": "string"
  16039. },
  16040. "include": {
  16041. "type": "string"
  16042. }
  16043. },
  16044. "required": ["timestamp", "sessionID", "text"],
  16045. "additionalProperties": false
  16046. }
  16047. },
  16048. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16049. "additionalProperties": false
  16050. },
  16051. "EventServerInstanceDisposed": {
  16052. "type": "object",
  16053. "properties": {
  16054. "id": {
  16055. "type": "string"
  16056. },
  16057. "type": {
  16058. "type": "string",
  16059. "enum": ["server.instance.disposed"]
  16060. },
  16061. "properties": {
  16062. "type": "object",
  16063. "properties": {
  16064. "directory": {
  16065. "type": "string"
  16066. }
  16067. },
  16068. "required": ["directory"],
  16069. "additionalProperties": false
  16070. }
  16071. },
  16072. "required": ["id", "type", "properties"],
  16073. "additionalProperties": false
  16074. },
  16075. "EventFileEdited": {
  16076. "type": "object",
  16077. "properties": {
  16078. "id": {
  16079. "type": "string"
  16080. },
  16081. "type": {
  16082. "type": "string",
  16083. "enum": ["file.edited"]
  16084. },
  16085. "properties": {
  16086. "type": "object",
  16087. "properties": {
  16088. "file": {
  16089. "type": "string"
  16090. }
  16091. },
  16092. "required": ["file"],
  16093. "additionalProperties": false
  16094. }
  16095. },
  16096. "required": ["id", "type", "properties"],
  16097. "additionalProperties": false
  16098. },
  16099. "EventFileWatcherUpdated": {
  16100. "type": "object",
  16101. "properties": {
  16102. "id": {
  16103. "type": "string"
  16104. },
  16105. "type": {
  16106. "type": "string",
  16107. "enum": ["file.watcher.updated"]
  16108. },
  16109. "properties": {
  16110. "type": "object",
  16111. "properties": {
  16112. "file": {
  16113. "type": "string"
  16114. },
  16115. "event": {
  16116. "type": "string",
  16117. "enum": ["add", "change", "unlink"]
  16118. }
  16119. },
  16120. "required": ["file", "event"],
  16121. "additionalProperties": false
  16122. }
  16123. },
  16124. "required": ["id", "type", "properties"],
  16125. "additionalProperties": false
  16126. },
  16127. "EventLspClientDiagnostics": {
  16128. "type": "object",
  16129. "properties": {
  16130. "id": {
  16131. "type": "string"
  16132. },
  16133. "type": {
  16134. "type": "string",
  16135. "enum": ["lsp.client.diagnostics"]
  16136. },
  16137. "properties": {
  16138. "type": "object",
  16139. "properties": {
  16140. "serverID": {
  16141. "type": "string"
  16142. },
  16143. "path": {
  16144. "type": "string"
  16145. }
  16146. },
  16147. "required": ["serverID", "path"],
  16148. "additionalProperties": false
  16149. }
  16150. },
  16151. "required": ["id", "type", "properties"],
  16152. "additionalProperties": false
  16153. },
  16154. "EventLspUpdated": {
  16155. "type": "object",
  16156. "properties": {
  16157. "id": {
  16158. "type": "string"
  16159. },
  16160. "type": {
  16161. "type": "string",
  16162. "enum": ["lsp.updated"]
  16163. },
  16164. "properties": {
  16165. "type": "object",
  16166. "properties": {}
  16167. }
  16168. },
  16169. "required": ["id", "type", "properties"],
  16170. "additionalProperties": false
  16171. },
  16172. "EventMessagePartDelta": {
  16173. "type": "object",
  16174. "properties": {
  16175. "id": {
  16176. "type": "string"
  16177. },
  16178. "type": {
  16179. "type": "string",
  16180. "enum": ["message.part.delta"]
  16181. },
  16182. "properties": {
  16183. "type": "object",
  16184. "properties": {
  16185. "sessionID": {
  16186. "type": "string",
  16187. "pattern": "^ses"
  16188. },
  16189. "messageID": {
  16190. "type": "string",
  16191. "pattern": "^msg"
  16192. },
  16193. "partID": {
  16194. "type": "string",
  16195. "pattern": "^prt"
  16196. },
  16197. "field": {
  16198. "type": "string"
  16199. },
  16200. "delta": {
  16201. "type": "string"
  16202. }
  16203. },
  16204. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  16205. "additionalProperties": false
  16206. }
  16207. },
  16208. "required": ["id", "type", "properties"],
  16209. "additionalProperties": false
  16210. },
  16211. "EventPermissionAsked": {
  16212. "type": "object",
  16213. "properties": {
  16214. "id": {
  16215. "type": "string"
  16216. },
  16217. "type": {
  16218. "type": "string",
  16219. "enum": ["permission.asked"]
  16220. },
  16221. "properties": {
  16222. "$ref": "#/components/schemas/PermissionRequest"
  16223. }
  16224. },
  16225. "required": ["id", "type", "properties"],
  16226. "additionalProperties": false
  16227. },
  16228. "EventPermissionReplied": {
  16229. "type": "object",
  16230. "properties": {
  16231. "id": {
  16232. "type": "string"
  16233. },
  16234. "type": {
  16235. "type": "string",
  16236. "enum": ["permission.replied"]
  16237. },
  16238. "properties": {
  16239. "type": "object",
  16240. "properties": {
  16241. "sessionID": {
  16242. "type": "string",
  16243. "pattern": "^ses"
  16244. },
  16245. "requestID": {
  16246. "type": "string",
  16247. "pattern": "^per"
  16248. },
  16249. "reply": {
  16250. "type": "string",
  16251. "enum": ["once", "always", "reject"]
  16252. }
  16253. },
  16254. "required": ["sessionID", "requestID", "reply"],
  16255. "additionalProperties": false
  16256. }
  16257. },
  16258. "required": ["id", "type", "properties"],
  16259. "additionalProperties": false
  16260. },
  16261. "EventSessionDiff": {
  16262. "type": "object",
  16263. "properties": {
  16264. "id": {
  16265. "type": "string"
  16266. },
  16267. "type": {
  16268. "type": "string",
  16269. "enum": ["session.diff"]
  16270. },
  16271. "properties": {
  16272. "type": "object",
  16273. "properties": {
  16274. "sessionID": {
  16275. "type": "string",
  16276. "pattern": "^ses"
  16277. },
  16278. "diff": {
  16279. "type": "array",
  16280. "items": {
  16281. "$ref": "#/components/schemas/SnapshotFileDiff"
  16282. }
  16283. }
  16284. },
  16285. "required": ["sessionID", "diff"],
  16286. "additionalProperties": false
  16287. }
  16288. },
  16289. "required": ["id", "type", "properties"],
  16290. "additionalProperties": false
  16291. },
  16292. "EventSessionError": {
  16293. "type": "object",
  16294. "properties": {
  16295. "id": {
  16296. "type": "string"
  16297. },
  16298. "type": {
  16299. "type": "string",
  16300. "enum": ["session.error"]
  16301. },
  16302. "properties": {
  16303. "type": "object",
  16304. "properties": {
  16305. "sessionID": {
  16306. "type": "string",
  16307. "pattern": "^ses"
  16308. },
  16309. "error": {
  16310. "anyOf": [
  16311. {
  16312. "$ref": "#/components/schemas/ProviderAuthError"
  16313. },
  16314. {
  16315. "$ref": "#/components/schemas/UnknownError"
  16316. },
  16317. {
  16318. "$ref": "#/components/schemas/MessageOutputLengthError"
  16319. },
  16320. {
  16321. "$ref": "#/components/schemas/MessageAbortedError"
  16322. },
  16323. {
  16324. "$ref": "#/components/schemas/StructuredOutputError"
  16325. },
  16326. {
  16327. "$ref": "#/components/schemas/ContextOverflowError"
  16328. },
  16329. {
  16330. "$ref": "#/components/schemas/APIError"
  16331. }
  16332. ]
  16333. }
  16334. },
  16335. "additionalProperties": false
  16336. }
  16337. },
  16338. "required": ["id", "type", "properties"],
  16339. "additionalProperties": false
  16340. },
  16341. "EventInstallationUpdated": {
  16342. "type": "object",
  16343. "properties": {
  16344. "id": {
  16345. "type": "string"
  16346. },
  16347. "type": {
  16348. "type": "string",
  16349. "enum": ["installation.updated"]
  16350. },
  16351. "properties": {
  16352. "type": "object",
  16353. "properties": {
  16354. "version": {
  16355. "type": "string"
  16356. }
  16357. },
  16358. "required": ["version"],
  16359. "additionalProperties": false
  16360. }
  16361. },
  16362. "required": ["id", "type", "properties"],
  16363. "additionalProperties": false
  16364. },
  16365. "EventInstallationUpdate-available": {
  16366. "type": "object",
  16367. "properties": {
  16368. "id": {
  16369. "type": "string"
  16370. },
  16371. "type": {
  16372. "type": "string",
  16373. "enum": ["installation.update-available"]
  16374. },
  16375. "properties": {
  16376. "type": "object",
  16377. "properties": {
  16378. "version": {
  16379. "type": "string"
  16380. }
  16381. },
  16382. "required": ["version"],
  16383. "additionalProperties": false
  16384. }
  16385. },
  16386. "required": ["id", "type", "properties"],
  16387. "additionalProperties": false
  16388. },
  16389. "EventQuestionAsked": {
  16390. "type": "object",
  16391. "properties": {
  16392. "id": {
  16393. "type": "string"
  16394. },
  16395. "type": {
  16396. "type": "string",
  16397. "enum": ["question.asked"]
  16398. },
  16399. "properties": {
  16400. "$ref": "#/components/schemas/QuestionRequest"
  16401. }
  16402. },
  16403. "required": ["id", "type", "properties"],
  16404. "additionalProperties": false
  16405. },
  16406. "EventQuestionReplied": {
  16407. "type": "object",
  16408. "properties": {
  16409. "id": {
  16410. "type": "string"
  16411. },
  16412. "type": {
  16413. "type": "string",
  16414. "enum": ["question.replied"]
  16415. },
  16416. "properties": {
  16417. "$ref": "#/components/schemas/QuestionReplied"
  16418. }
  16419. },
  16420. "required": ["id", "type", "properties"],
  16421. "additionalProperties": false
  16422. },
  16423. "EventQuestionRejected": {
  16424. "type": "object",
  16425. "properties": {
  16426. "id": {
  16427. "type": "string"
  16428. },
  16429. "type": {
  16430. "type": "string",
  16431. "enum": ["question.rejected"]
  16432. },
  16433. "properties": {
  16434. "$ref": "#/components/schemas/QuestionRejected"
  16435. }
  16436. },
  16437. "required": ["id", "type", "properties"],
  16438. "additionalProperties": false
  16439. },
  16440. "EventTodoUpdated": {
  16441. "type": "object",
  16442. "properties": {
  16443. "id": {
  16444. "type": "string"
  16445. },
  16446. "type": {
  16447. "type": "string",
  16448. "enum": ["todo.updated"]
  16449. },
  16450. "properties": {
  16451. "type": "object",
  16452. "properties": {
  16453. "sessionID": {
  16454. "type": "string",
  16455. "pattern": "^ses"
  16456. },
  16457. "todos": {
  16458. "type": "array",
  16459. "items": {
  16460. "$ref": "#/components/schemas/Todo"
  16461. }
  16462. }
  16463. },
  16464. "required": ["sessionID", "todos"],
  16465. "additionalProperties": false
  16466. }
  16467. },
  16468. "required": ["id", "type", "properties"],
  16469. "additionalProperties": false
  16470. },
  16471. "EventSessionStatus": {
  16472. "type": "object",
  16473. "properties": {
  16474. "id": {
  16475. "type": "string"
  16476. },
  16477. "type": {
  16478. "type": "string",
  16479. "enum": ["session.status"]
  16480. },
  16481. "properties": {
  16482. "type": "object",
  16483. "properties": {
  16484. "sessionID": {
  16485. "type": "string",
  16486. "pattern": "^ses"
  16487. },
  16488. "status": {
  16489. "$ref": "#/components/schemas/SessionStatus"
  16490. }
  16491. },
  16492. "required": ["sessionID", "status"],
  16493. "additionalProperties": false
  16494. }
  16495. },
  16496. "required": ["id", "type", "properties"],
  16497. "additionalProperties": false
  16498. },
  16499. "EventSessionIdle": {
  16500. "type": "object",
  16501. "properties": {
  16502. "id": {
  16503. "type": "string"
  16504. },
  16505. "type": {
  16506. "type": "string",
  16507. "enum": ["session.idle"]
  16508. },
  16509. "properties": {
  16510. "type": "object",
  16511. "properties": {
  16512. "sessionID": {
  16513. "type": "string",
  16514. "pattern": "^ses"
  16515. }
  16516. },
  16517. "required": ["sessionID"],
  16518. "additionalProperties": false
  16519. }
  16520. },
  16521. "required": ["id", "type", "properties"],
  16522. "additionalProperties": false
  16523. },
  16524. "EventSessionCompacted": {
  16525. "type": "object",
  16526. "properties": {
  16527. "id": {
  16528. "type": "string"
  16529. },
  16530. "type": {
  16531. "type": "string",
  16532. "enum": ["session.compacted"]
  16533. },
  16534. "properties": {
  16535. "type": "object",
  16536. "properties": {
  16537. "sessionID": {
  16538. "type": "string",
  16539. "pattern": "^ses"
  16540. }
  16541. },
  16542. "required": ["sessionID"],
  16543. "additionalProperties": false
  16544. }
  16545. },
  16546. "required": ["id", "type", "properties"],
  16547. "additionalProperties": false
  16548. },
  16549. "EventMcpToolsChanged": {
  16550. "type": "object",
  16551. "properties": {
  16552. "id": {
  16553. "type": "string"
  16554. },
  16555. "type": {
  16556. "type": "string",
  16557. "enum": ["mcp.tools.changed"]
  16558. },
  16559. "properties": {
  16560. "type": "object",
  16561. "properties": {
  16562. "server": {
  16563. "type": "string"
  16564. }
  16565. },
  16566. "required": ["server"],
  16567. "additionalProperties": false
  16568. }
  16569. },
  16570. "required": ["id", "type", "properties"],
  16571. "additionalProperties": false
  16572. },
  16573. "EventMcpBrowserOpenFailed": {
  16574. "type": "object",
  16575. "properties": {
  16576. "id": {
  16577. "type": "string"
  16578. },
  16579. "type": {
  16580. "type": "string",
  16581. "enum": ["mcp.browser.open.failed"]
  16582. },
  16583. "properties": {
  16584. "type": "object",
  16585. "properties": {
  16586. "mcpName": {
  16587. "type": "string"
  16588. },
  16589. "url": {
  16590. "type": "string"
  16591. }
  16592. },
  16593. "required": ["mcpName", "url"],
  16594. "additionalProperties": false
  16595. }
  16596. },
  16597. "required": ["id", "type", "properties"],
  16598. "additionalProperties": false
  16599. },
  16600. "EventCommandExecuted": {
  16601. "type": "object",
  16602. "properties": {
  16603. "id": {
  16604. "type": "string"
  16605. },
  16606. "type": {
  16607. "type": "string",
  16608. "enum": ["command.executed"]
  16609. },
  16610. "properties": {
  16611. "type": "object",
  16612. "properties": {
  16613. "name": {
  16614. "type": "string"
  16615. },
  16616. "sessionID": {
  16617. "type": "string",
  16618. "pattern": "^ses"
  16619. },
  16620. "arguments": {
  16621. "type": "string"
  16622. },
  16623. "messageID": {
  16624. "type": "string",
  16625. "pattern": "^msg"
  16626. }
  16627. },
  16628. "required": ["name", "sessionID", "arguments", "messageID"],
  16629. "additionalProperties": false
  16630. }
  16631. },
  16632. "required": ["id", "type", "properties"],
  16633. "additionalProperties": false
  16634. },
  16635. "EventProjectUpdated": {
  16636. "type": "object",
  16637. "properties": {
  16638. "id": {
  16639. "type": "string"
  16640. },
  16641. "type": {
  16642. "type": "string",
  16643. "enum": ["project.updated"]
  16644. },
  16645. "properties": {
  16646. "$ref": "#/components/schemas/Project"
  16647. }
  16648. },
  16649. "required": ["id", "type", "properties"],
  16650. "additionalProperties": false
  16651. },
  16652. "EventVcsBranchUpdated": {
  16653. "type": "object",
  16654. "properties": {
  16655. "id": {
  16656. "type": "string"
  16657. },
  16658. "type": {
  16659. "type": "string",
  16660. "enum": ["vcs.branch.updated"]
  16661. },
  16662. "properties": {
  16663. "type": "object",
  16664. "properties": {
  16665. "branch": {
  16666. "type": "string"
  16667. }
  16668. },
  16669. "additionalProperties": false
  16670. }
  16671. },
  16672. "required": ["id", "type", "properties"],
  16673. "additionalProperties": false
  16674. },
  16675. "EventWorkspaceReady": {
  16676. "type": "object",
  16677. "properties": {
  16678. "id": {
  16679. "type": "string"
  16680. },
  16681. "type": {
  16682. "type": "string",
  16683. "enum": ["workspace.ready"]
  16684. },
  16685. "properties": {
  16686. "type": "object",
  16687. "properties": {
  16688. "name": {
  16689. "type": "string"
  16690. }
  16691. },
  16692. "required": ["name"],
  16693. "additionalProperties": false
  16694. }
  16695. },
  16696. "required": ["id", "type", "properties"],
  16697. "additionalProperties": false
  16698. },
  16699. "EventWorkspaceFailed": {
  16700. "type": "object",
  16701. "properties": {
  16702. "id": {
  16703. "type": "string"
  16704. },
  16705. "type": {
  16706. "type": "string",
  16707. "enum": ["workspace.failed"]
  16708. },
  16709. "properties": {
  16710. "type": "object",
  16711. "properties": {
  16712. "message": {
  16713. "type": "string"
  16714. }
  16715. },
  16716. "required": ["message"],
  16717. "additionalProperties": false
  16718. }
  16719. },
  16720. "required": ["id", "type", "properties"],
  16721. "additionalProperties": false
  16722. },
  16723. "EventWorkspaceStatus": {
  16724. "type": "object",
  16725. "properties": {
  16726. "id": {
  16727. "type": "string"
  16728. },
  16729. "type": {
  16730. "type": "string",
  16731. "enum": ["workspace.status"]
  16732. },
  16733. "properties": {
  16734. "type": "object",
  16735. "properties": {
  16736. "workspaceID": {
  16737. "type": "string",
  16738. "pattern": "^wrk"
  16739. },
  16740. "status": {
  16741. "type": "string",
  16742. "enum": ["connected", "connecting", "disconnected", "error"]
  16743. }
  16744. },
  16745. "required": ["workspaceID", "status"],
  16746. "additionalProperties": false
  16747. }
  16748. },
  16749. "required": ["id", "type", "properties"],
  16750. "additionalProperties": false
  16751. },
  16752. "EventWorktreeReady": {
  16753. "type": "object",
  16754. "properties": {
  16755. "id": {
  16756. "type": "string"
  16757. },
  16758. "type": {
  16759. "type": "string",
  16760. "enum": ["worktree.ready"]
  16761. },
  16762. "properties": {
  16763. "type": "object",
  16764. "properties": {
  16765. "name": {
  16766. "type": "string"
  16767. },
  16768. "branch": {
  16769. "type": "string"
  16770. }
  16771. },
  16772. "required": ["name"],
  16773. "additionalProperties": false
  16774. }
  16775. },
  16776. "required": ["id", "type", "properties"],
  16777. "additionalProperties": false
  16778. },
  16779. "EventWorktreeFailed": {
  16780. "type": "object",
  16781. "properties": {
  16782. "id": {
  16783. "type": "string"
  16784. },
  16785. "type": {
  16786. "type": "string",
  16787. "enum": ["worktree.failed"]
  16788. },
  16789. "properties": {
  16790. "type": "object",
  16791. "properties": {
  16792. "message": {
  16793. "type": "string"
  16794. }
  16795. },
  16796. "required": ["message"],
  16797. "additionalProperties": false
  16798. }
  16799. },
  16800. "required": ["id", "type", "properties"],
  16801. "additionalProperties": false
  16802. },
  16803. "EventPtyCreated": {
  16804. "type": "object",
  16805. "properties": {
  16806. "id": {
  16807. "type": "string"
  16808. },
  16809. "type": {
  16810. "type": "string",
  16811. "enum": ["pty.created"]
  16812. },
  16813. "properties": {
  16814. "type": "object",
  16815. "properties": {
  16816. "info": {
  16817. "$ref": "#/components/schemas/Pty"
  16818. }
  16819. },
  16820. "required": ["info"],
  16821. "additionalProperties": false
  16822. }
  16823. },
  16824. "required": ["id", "type", "properties"],
  16825. "additionalProperties": false
  16826. },
  16827. "EventPtyUpdated": {
  16828. "type": "object",
  16829. "properties": {
  16830. "id": {
  16831. "type": "string"
  16832. },
  16833. "type": {
  16834. "type": "string",
  16835. "enum": ["pty.updated"]
  16836. },
  16837. "properties": {
  16838. "type": "object",
  16839. "properties": {
  16840. "info": {
  16841. "$ref": "#/components/schemas/Pty"
  16842. }
  16843. },
  16844. "required": ["info"],
  16845. "additionalProperties": false
  16846. }
  16847. },
  16848. "required": ["id", "type", "properties"],
  16849. "additionalProperties": false
  16850. },
  16851. "EventPtyExited": {
  16852. "type": "object",
  16853. "properties": {
  16854. "id": {
  16855. "type": "string"
  16856. },
  16857. "type": {
  16858. "type": "string",
  16859. "enum": ["pty.exited"]
  16860. },
  16861. "properties": {
  16862. "type": "object",
  16863. "properties": {
  16864. "id": {
  16865. "type": "string",
  16866. "pattern": "^pty"
  16867. },
  16868. "exitCode": {
  16869. "type": "integer",
  16870. "minimum": 0
  16871. }
  16872. },
  16873. "required": ["id", "exitCode"],
  16874. "additionalProperties": false
  16875. }
  16876. },
  16877. "required": ["id", "type", "properties"],
  16878. "additionalProperties": false
  16879. },
  16880. "EventPtyDeleted": {
  16881. "type": "object",
  16882. "properties": {
  16883. "id": {
  16884. "type": "string"
  16885. },
  16886. "type": {
  16887. "type": "string",
  16888. "enum": ["pty.deleted"]
  16889. },
  16890. "properties": {
  16891. "type": "object",
  16892. "properties": {
  16893. "id": {
  16894. "type": "string",
  16895. "pattern": "^pty"
  16896. }
  16897. },
  16898. "required": ["id"],
  16899. "additionalProperties": false
  16900. }
  16901. },
  16902. "required": ["id", "type", "properties"],
  16903. "additionalProperties": false
  16904. },
  16905. "EventMessageUpdated": {
  16906. "type": "object",
  16907. "properties": {
  16908. "id": {
  16909. "type": "string"
  16910. },
  16911. "type": {
  16912. "type": "string",
  16913. "enum": ["message.updated"]
  16914. },
  16915. "properties": {
  16916. "type": "object",
  16917. "properties": {
  16918. "sessionID": {
  16919. "type": "string",
  16920. "pattern": "^ses"
  16921. },
  16922. "info": {
  16923. "$ref": "#/components/schemas/Message"
  16924. }
  16925. },
  16926. "required": ["sessionID", "info"],
  16927. "additionalProperties": false
  16928. }
  16929. },
  16930. "required": ["id", "type", "properties"],
  16931. "additionalProperties": false
  16932. },
  16933. "EventMessageRemoved": {
  16934. "type": "object",
  16935. "properties": {
  16936. "id": {
  16937. "type": "string"
  16938. },
  16939. "type": {
  16940. "type": "string",
  16941. "enum": ["message.removed"]
  16942. },
  16943. "properties": {
  16944. "type": "object",
  16945. "properties": {
  16946. "sessionID": {
  16947. "type": "string",
  16948. "pattern": "^ses"
  16949. },
  16950. "messageID": {
  16951. "type": "string",
  16952. "pattern": "^msg"
  16953. }
  16954. },
  16955. "required": ["sessionID", "messageID"],
  16956. "additionalProperties": false
  16957. }
  16958. },
  16959. "required": ["id", "type", "properties"],
  16960. "additionalProperties": false
  16961. },
  16962. "EventMessagePartUpdated": {
  16963. "type": "object",
  16964. "properties": {
  16965. "id": {
  16966. "type": "string"
  16967. },
  16968. "type": {
  16969. "type": "string",
  16970. "enum": ["message.part.updated"]
  16971. },
  16972. "properties": {
  16973. "type": "object",
  16974. "properties": {
  16975. "sessionID": {
  16976. "type": "string",
  16977. "pattern": "^ses"
  16978. },
  16979. "part": {
  16980. "$ref": "#/components/schemas/Part"
  16981. },
  16982. "time": {
  16983. "type": "integer",
  16984. "minimum": 0
  16985. }
  16986. },
  16987. "required": ["sessionID", "part", "time"],
  16988. "additionalProperties": false
  16989. }
  16990. },
  16991. "required": ["id", "type", "properties"],
  16992. "additionalProperties": false
  16993. },
  16994. "EventMessagePartRemoved": {
  16995. "type": "object",
  16996. "properties": {
  16997. "id": {
  16998. "type": "string"
  16999. },
  17000. "type": {
  17001. "type": "string",
  17002. "enum": ["message.part.removed"]
  17003. },
  17004. "properties": {
  17005. "type": "object",
  17006. "properties": {
  17007. "sessionID": {
  17008. "type": "string",
  17009. "pattern": "^ses"
  17010. },
  17011. "messageID": {
  17012. "type": "string",
  17013. "pattern": "^msg"
  17014. },
  17015. "partID": {
  17016. "type": "string",
  17017. "pattern": "^prt"
  17018. }
  17019. },
  17020. "required": ["sessionID", "messageID", "partID"],
  17021. "additionalProperties": false
  17022. }
  17023. },
  17024. "required": ["id", "type", "properties"],
  17025. "additionalProperties": false
  17026. },
  17027. "EventSessionCreated": {
  17028. "type": "object",
  17029. "properties": {
  17030. "id": {
  17031. "type": "string"
  17032. },
  17033. "type": {
  17034. "type": "string",
  17035. "enum": ["session.created"]
  17036. },
  17037. "properties": {
  17038. "type": "object",
  17039. "properties": {
  17040. "sessionID": {
  17041. "type": "string",
  17042. "pattern": "^ses"
  17043. },
  17044. "info": {
  17045. "$ref": "#/components/schemas/Session"
  17046. }
  17047. },
  17048. "required": ["sessionID", "info"],
  17049. "additionalProperties": false
  17050. }
  17051. },
  17052. "required": ["id", "type", "properties"],
  17053. "additionalProperties": false
  17054. },
  17055. "EventSessionUpdated": {
  17056. "type": "object",
  17057. "properties": {
  17058. "id": {
  17059. "type": "string"
  17060. },
  17061. "type": {
  17062. "type": "string",
  17063. "enum": ["session.updated"]
  17064. },
  17065. "properties": {
  17066. "type": "object",
  17067. "properties": {
  17068. "sessionID": {
  17069. "type": "string",
  17070. "pattern": "^ses"
  17071. },
  17072. "info": {
  17073. "$ref": "#/components/schemas/Session"
  17074. }
  17075. },
  17076. "required": ["sessionID", "info"],
  17077. "additionalProperties": false
  17078. }
  17079. },
  17080. "required": ["id", "type", "properties"],
  17081. "additionalProperties": false
  17082. },
  17083. "EventSessionDeleted": {
  17084. "type": "object",
  17085. "properties": {
  17086. "id": {
  17087. "type": "string"
  17088. },
  17089. "type": {
  17090. "type": "string",
  17091. "enum": ["session.deleted"]
  17092. },
  17093. "properties": {
  17094. "type": "object",
  17095. "properties": {
  17096. "sessionID": {
  17097. "type": "string",
  17098. "pattern": "^ses"
  17099. },
  17100. "info": {
  17101. "$ref": "#/components/schemas/Session"
  17102. }
  17103. },
  17104. "required": ["sessionID", "info"],
  17105. "additionalProperties": false
  17106. }
  17107. },
  17108. "required": ["id", "type", "properties"],
  17109. "additionalProperties": false
  17110. },
  17111. "EventSessionNextAgentSwitched": {
  17112. "type": "object",
  17113. "properties": {
  17114. "id": {
  17115. "type": "string"
  17116. },
  17117. "type": {
  17118. "type": "string",
  17119. "enum": ["session.next.agent.switched"]
  17120. },
  17121. "properties": {
  17122. "type": "object",
  17123. "properties": {
  17124. "timestamp": {
  17125. "type": "number"
  17126. },
  17127. "sessionID": {
  17128. "type": "string",
  17129. "pattern": "^ses"
  17130. },
  17131. "agent": {
  17132. "type": "string"
  17133. }
  17134. },
  17135. "required": ["timestamp", "sessionID", "agent"],
  17136. "additionalProperties": false
  17137. }
  17138. },
  17139. "required": ["id", "type", "properties"],
  17140. "additionalProperties": false
  17141. },
  17142. "EventSessionNextModelSwitched": {
  17143. "type": "object",
  17144. "properties": {
  17145. "id": {
  17146. "type": "string"
  17147. },
  17148. "type": {
  17149. "type": "string",
  17150. "enum": ["session.next.model.switched"]
  17151. },
  17152. "properties": {
  17153. "type": "object",
  17154. "properties": {
  17155. "timestamp": {
  17156. "type": "number"
  17157. },
  17158. "sessionID": {
  17159. "type": "string",
  17160. "pattern": "^ses"
  17161. },
  17162. "model": {
  17163. "type": "object",
  17164. "properties": {
  17165. "id": {
  17166. "type": "string"
  17167. },
  17168. "providerID": {
  17169. "type": "string"
  17170. },
  17171. "variant": {
  17172. "type": "string"
  17173. }
  17174. },
  17175. "required": ["id", "providerID", "variant"],
  17176. "additionalProperties": false
  17177. }
  17178. },
  17179. "required": ["timestamp", "sessionID", "model"],
  17180. "additionalProperties": false
  17181. }
  17182. },
  17183. "required": ["id", "type", "properties"],
  17184. "additionalProperties": false
  17185. },
  17186. "PromptSource": {
  17187. "type": "object",
  17188. "properties": {
  17189. "start": {
  17190. "type": "number"
  17191. },
  17192. "end": {
  17193. "type": "number"
  17194. },
  17195. "text": {
  17196. "type": "string"
  17197. }
  17198. },
  17199. "required": ["start", "end", "text"],
  17200. "additionalProperties": false
  17201. },
  17202. "PromptFileAttachment": {
  17203. "type": "object",
  17204. "properties": {
  17205. "uri": {
  17206. "type": "string"
  17207. },
  17208. "mime": {
  17209. "type": "string"
  17210. },
  17211. "name": {
  17212. "type": "string"
  17213. },
  17214. "description": {
  17215. "type": "string"
  17216. },
  17217. "source": {
  17218. "$ref": "#/components/schemas/PromptSource"
  17219. }
  17220. },
  17221. "required": ["uri", "mime"],
  17222. "additionalProperties": false
  17223. },
  17224. "PromptAgentAttachment": {
  17225. "type": "object",
  17226. "properties": {
  17227. "name": {
  17228. "type": "string"
  17229. },
  17230. "source": {
  17231. "$ref": "#/components/schemas/PromptSource"
  17232. }
  17233. },
  17234. "required": ["name"],
  17235. "additionalProperties": false
  17236. },
  17237. "PromptReferenceAttachment": {
  17238. "type": "object",
  17239. "properties": {
  17240. "name": {
  17241. "type": "string"
  17242. },
  17243. "kind": {
  17244. "type": "string",
  17245. "enum": ["local", "git", "invalid"]
  17246. },
  17247. "uri": {
  17248. "type": "string"
  17249. },
  17250. "repository": {
  17251. "type": "string"
  17252. },
  17253. "branch": {
  17254. "type": "string"
  17255. },
  17256. "target": {
  17257. "type": "string"
  17258. },
  17259. "targetUri": {
  17260. "type": "string"
  17261. },
  17262. "problem": {
  17263. "type": "string"
  17264. },
  17265. "source": {
  17266. "$ref": "#/components/schemas/PromptSource"
  17267. }
  17268. },
  17269. "required": ["name", "kind"],
  17270. "additionalProperties": false
  17271. },
  17272. "EventSessionNextPrompted": {
  17273. "type": "object",
  17274. "properties": {
  17275. "id": {
  17276. "type": "string"
  17277. },
  17278. "type": {
  17279. "type": "string",
  17280. "enum": ["session.next.prompted"]
  17281. },
  17282. "properties": {
  17283. "type": "object",
  17284. "properties": {
  17285. "timestamp": {
  17286. "type": "number"
  17287. },
  17288. "sessionID": {
  17289. "type": "string",
  17290. "pattern": "^ses"
  17291. },
  17292. "prompt": {
  17293. "$ref": "#/components/schemas/Prompt"
  17294. }
  17295. },
  17296. "required": ["timestamp", "sessionID", "prompt"],
  17297. "additionalProperties": false
  17298. }
  17299. },
  17300. "required": ["id", "type", "properties"],
  17301. "additionalProperties": false
  17302. },
  17303. "EventSessionNextSynthetic": {
  17304. "type": "object",
  17305. "properties": {
  17306. "id": {
  17307. "type": "string"
  17308. },
  17309. "type": {
  17310. "type": "string",
  17311. "enum": ["session.next.synthetic"]
  17312. },
  17313. "properties": {
  17314. "type": "object",
  17315. "properties": {
  17316. "timestamp": {
  17317. "type": "number"
  17318. },
  17319. "sessionID": {
  17320. "type": "string",
  17321. "pattern": "^ses"
  17322. },
  17323. "text": {
  17324. "type": "string"
  17325. }
  17326. },
  17327. "required": ["timestamp", "sessionID", "text"],
  17328. "additionalProperties": false
  17329. }
  17330. },
  17331. "required": ["id", "type", "properties"],
  17332. "additionalProperties": false
  17333. },
  17334. "EventSessionNextShellStarted": {
  17335. "type": "object",
  17336. "properties": {
  17337. "id": {
  17338. "type": "string"
  17339. },
  17340. "type": {
  17341. "type": "string",
  17342. "enum": ["session.next.shell.started"]
  17343. },
  17344. "properties": {
  17345. "type": "object",
  17346. "properties": {
  17347. "timestamp": {
  17348. "type": "number"
  17349. },
  17350. "sessionID": {
  17351. "type": "string",
  17352. "pattern": "^ses"
  17353. },
  17354. "callID": {
  17355. "type": "string"
  17356. },
  17357. "command": {
  17358. "type": "string"
  17359. }
  17360. },
  17361. "required": ["timestamp", "sessionID", "callID", "command"],
  17362. "additionalProperties": false
  17363. }
  17364. },
  17365. "required": ["id", "type", "properties"],
  17366. "additionalProperties": false
  17367. },
  17368. "EventSessionNextShellEnded": {
  17369. "type": "object",
  17370. "properties": {
  17371. "id": {
  17372. "type": "string"
  17373. },
  17374. "type": {
  17375. "type": "string",
  17376. "enum": ["session.next.shell.ended"]
  17377. },
  17378. "properties": {
  17379. "type": "object",
  17380. "properties": {
  17381. "timestamp": {
  17382. "type": "number"
  17383. },
  17384. "sessionID": {
  17385. "type": "string",
  17386. "pattern": "^ses"
  17387. },
  17388. "callID": {
  17389. "type": "string"
  17390. },
  17391. "output": {
  17392. "type": "string"
  17393. }
  17394. },
  17395. "required": ["timestamp", "sessionID", "callID", "output"],
  17396. "additionalProperties": false
  17397. }
  17398. },
  17399. "required": ["id", "type", "properties"],
  17400. "additionalProperties": false
  17401. },
  17402. "EventSessionNextStepStarted": {
  17403. "type": "object",
  17404. "properties": {
  17405. "id": {
  17406. "type": "string"
  17407. },
  17408. "type": {
  17409. "type": "string",
  17410. "enum": ["session.next.step.started"]
  17411. },
  17412. "properties": {
  17413. "type": "object",
  17414. "properties": {
  17415. "timestamp": {
  17416. "type": "number"
  17417. },
  17418. "sessionID": {
  17419. "type": "string",
  17420. "pattern": "^ses"
  17421. },
  17422. "agent": {
  17423. "type": "string"
  17424. },
  17425. "model": {
  17426. "type": "object",
  17427. "properties": {
  17428. "id": {
  17429. "type": "string"
  17430. },
  17431. "providerID": {
  17432. "type": "string"
  17433. },
  17434. "variant": {
  17435. "type": "string"
  17436. }
  17437. },
  17438. "required": ["id", "providerID", "variant"],
  17439. "additionalProperties": false
  17440. },
  17441. "snapshot": {
  17442. "type": "string"
  17443. }
  17444. },
  17445. "required": ["timestamp", "sessionID", "agent", "model"],
  17446. "additionalProperties": false
  17447. }
  17448. },
  17449. "required": ["id", "type", "properties"],
  17450. "additionalProperties": false
  17451. },
  17452. "EventSessionNextStepEnded": {
  17453. "type": "object",
  17454. "properties": {
  17455. "id": {
  17456. "type": "string"
  17457. },
  17458. "type": {
  17459. "type": "string",
  17460. "enum": ["session.next.step.ended"]
  17461. },
  17462. "properties": {
  17463. "type": "object",
  17464. "properties": {
  17465. "timestamp": {
  17466. "type": "number"
  17467. },
  17468. "sessionID": {
  17469. "type": "string",
  17470. "pattern": "^ses"
  17471. },
  17472. "finish": {
  17473. "type": "string"
  17474. },
  17475. "cost": {
  17476. "type": "number"
  17477. },
  17478. "tokens": {
  17479. "type": "object",
  17480. "properties": {
  17481. "input": {
  17482. "type": "number"
  17483. },
  17484. "output": {
  17485. "type": "number"
  17486. },
  17487. "reasoning": {
  17488. "type": "number"
  17489. },
  17490. "cache": {
  17491. "type": "object",
  17492. "properties": {
  17493. "read": {
  17494. "type": "number"
  17495. },
  17496. "write": {
  17497. "type": "number"
  17498. }
  17499. },
  17500. "required": ["read", "write"],
  17501. "additionalProperties": false
  17502. }
  17503. },
  17504. "required": ["input", "output", "reasoning", "cache"],
  17505. "additionalProperties": false
  17506. },
  17507. "snapshot": {
  17508. "type": "string"
  17509. }
  17510. },
  17511. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17512. "additionalProperties": false
  17513. }
  17514. },
  17515. "required": ["id", "type", "properties"],
  17516. "additionalProperties": false
  17517. },
  17518. "SessionErrorUnknown": {
  17519. "type": "object",
  17520. "properties": {
  17521. "type": {
  17522. "type": "string",
  17523. "enum": ["unknown"]
  17524. },
  17525. "message": {
  17526. "type": "string"
  17527. }
  17528. },
  17529. "required": ["type", "message"],
  17530. "additionalProperties": false
  17531. },
  17532. "EventSessionNextStepFailed": {
  17533. "type": "object",
  17534. "properties": {
  17535. "id": {
  17536. "type": "string"
  17537. },
  17538. "type": {
  17539. "type": "string",
  17540. "enum": ["session.next.step.failed"]
  17541. },
  17542. "properties": {
  17543. "type": "object",
  17544. "properties": {
  17545. "timestamp": {
  17546. "type": "number"
  17547. },
  17548. "sessionID": {
  17549. "type": "string",
  17550. "pattern": "^ses"
  17551. },
  17552. "error": {
  17553. "$ref": "#/components/schemas/SessionErrorUnknown"
  17554. }
  17555. },
  17556. "required": ["timestamp", "sessionID", "error"],
  17557. "additionalProperties": false
  17558. }
  17559. },
  17560. "required": ["id", "type", "properties"],
  17561. "additionalProperties": false
  17562. },
  17563. "EventSessionNextTextStarted": {
  17564. "type": "object",
  17565. "properties": {
  17566. "id": {
  17567. "type": "string"
  17568. },
  17569. "type": {
  17570. "type": "string",
  17571. "enum": ["session.next.text.started"]
  17572. },
  17573. "properties": {
  17574. "type": "object",
  17575. "properties": {
  17576. "timestamp": {
  17577. "type": "number"
  17578. },
  17579. "sessionID": {
  17580. "type": "string",
  17581. "pattern": "^ses"
  17582. }
  17583. },
  17584. "required": ["timestamp", "sessionID"],
  17585. "additionalProperties": false
  17586. }
  17587. },
  17588. "required": ["id", "type", "properties"],
  17589. "additionalProperties": false
  17590. },
  17591. "EventSessionNextTextDelta": {
  17592. "type": "object",
  17593. "properties": {
  17594. "id": {
  17595. "type": "string"
  17596. },
  17597. "type": {
  17598. "type": "string",
  17599. "enum": ["session.next.text.delta"]
  17600. },
  17601. "properties": {
  17602. "type": "object",
  17603. "properties": {
  17604. "timestamp": {
  17605. "type": "number"
  17606. },
  17607. "sessionID": {
  17608. "type": "string",
  17609. "pattern": "^ses"
  17610. },
  17611. "delta": {
  17612. "type": "string"
  17613. }
  17614. },
  17615. "required": ["timestamp", "sessionID", "delta"],
  17616. "additionalProperties": false
  17617. }
  17618. },
  17619. "required": ["id", "type", "properties"],
  17620. "additionalProperties": false
  17621. },
  17622. "EventSessionNextTextEnded": {
  17623. "type": "object",
  17624. "properties": {
  17625. "id": {
  17626. "type": "string"
  17627. },
  17628. "type": {
  17629. "type": "string",
  17630. "enum": ["session.next.text.ended"]
  17631. },
  17632. "properties": {
  17633. "type": "object",
  17634. "properties": {
  17635. "timestamp": {
  17636. "type": "number"
  17637. },
  17638. "sessionID": {
  17639. "type": "string",
  17640. "pattern": "^ses"
  17641. },
  17642. "text": {
  17643. "type": "string"
  17644. }
  17645. },
  17646. "required": ["timestamp", "sessionID", "text"],
  17647. "additionalProperties": false
  17648. }
  17649. },
  17650. "required": ["id", "type", "properties"],
  17651. "additionalProperties": false
  17652. },
  17653. "EventSessionNextReasoningStarted": {
  17654. "type": "object",
  17655. "properties": {
  17656. "id": {
  17657. "type": "string"
  17658. },
  17659. "type": {
  17660. "type": "string",
  17661. "enum": ["session.next.reasoning.started"]
  17662. },
  17663. "properties": {
  17664. "type": "object",
  17665. "properties": {
  17666. "timestamp": {
  17667. "type": "number"
  17668. },
  17669. "sessionID": {
  17670. "type": "string",
  17671. "pattern": "^ses"
  17672. },
  17673. "reasoningID": {
  17674. "type": "string"
  17675. }
  17676. },
  17677. "required": ["timestamp", "sessionID", "reasoningID"],
  17678. "additionalProperties": false
  17679. }
  17680. },
  17681. "required": ["id", "type", "properties"],
  17682. "additionalProperties": false
  17683. },
  17684. "EventSessionNextReasoningDelta": {
  17685. "type": "object",
  17686. "properties": {
  17687. "id": {
  17688. "type": "string"
  17689. },
  17690. "type": {
  17691. "type": "string",
  17692. "enum": ["session.next.reasoning.delta"]
  17693. },
  17694. "properties": {
  17695. "type": "object",
  17696. "properties": {
  17697. "timestamp": {
  17698. "type": "number"
  17699. },
  17700. "sessionID": {
  17701. "type": "string",
  17702. "pattern": "^ses"
  17703. },
  17704. "reasoningID": {
  17705. "type": "string"
  17706. },
  17707. "delta": {
  17708. "type": "string"
  17709. }
  17710. },
  17711. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17712. "additionalProperties": false
  17713. }
  17714. },
  17715. "required": ["id", "type", "properties"],
  17716. "additionalProperties": false
  17717. },
  17718. "EventSessionNextReasoningEnded": {
  17719. "type": "object",
  17720. "properties": {
  17721. "id": {
  17722. "type": "string"
  17723. },
  17724. "type": {
  17725. "type": "string",
  17726. "enum": ["session.next.reasoning.ended"]
  17727. },
  17728. "properties": {
  17729. "type": "object",
  17730. "properties": {
  17731. "timestamp": {
  17732. "type": "number"
  17733. },
  17734. "sessionID": {
  17735. "type": "string",
  17736. "pattern": "^ses"
  17737. },
  17738. "reasoningID": {
  17739. "type": "string"
  17740. },
  17741. "text": {
  17742. "type": "string"
  17743. }
  17744. },
  17745. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17746. "additionalProperties": false
  17747. }
  17748. },
  17749. "required": ["id", "type", "properties"],
  17750. "additionalProperties": false
  17751. },
  17752. "EventSessionNextToolInputStarted": {
  17753. "type": "object",
  17754. "properties": {
  17755. "id": {
  17756. "type": "string"
  17757. },
  17758. "type": {
  17759. "type": "string",
  17760. "enum": ["session.next.tool.input.started"]
  17761. },
  17762. "properties": {
  17763. "type": "object",
  17764. "properties": {
  17765. "timestamp": {
  17766. "type": "number"
  17767. },
  17768. "sessionID": {
  17769. "type": "string",
  17770. "pattern": "^ses"
  17771. },
  17772. "callID": {
  17773. "type": "string"
  17774. },
  17775. "name": {
  17776. "type": "string"
  17777. }
  17778. },
  17779. "required": ["timestamp", "sessionID", "callID", "name"],
  17780. "additionalProperties": false
  17781. }
  17782. },
  17783. "required": ["id", "type", "properties"],
  17784. "additionalProperties": false
  17785. },
  17786. "EventSessionNextToolInputDelta": {
  17787. "type": "object",
  17788. "properties": {
  17789. "id": {
  17790. "type": "string"
  17791. },
  17792. "type": {
  17793. "type": "string",
  17794. "enum": ["session.next.tool.input.delta"]
  17795. },
  17796. "properties": {
  17797. "type": "object",
  17798. "properties": {
  17799. "timestamp": {
  17800. "type": "number"
  17801. },
  17802. "sessionID": {
  17803. "type": "string",
  17804. "pattern": "^ses"
  17805. },
  17806. "callID": {
  17807. "type": "string"
  17808. },
  17809. "delta": {
  17810. "type": "string"
  17811. }
  17812. },
  17813. "required": ["timestamp", "sessionID", "callID", "delta"],
  17814. "additionalProperties": false
  17815. }
  17816. },
  17817. "required": ["id", "type", "properties"],
  17818. "additionalProperties": false
  17819. },
  17820. "EventSessionNextToolInputEnded": {
  17821. "type": "object",
  17822. "properties": {
  17823. "id": {
  17824. "type": "string"
  17825. },
  17826. "type": {
  17827. "type": "string",
  17828. "enum": ["session.next.tool.input.ended"]
  17829. },
  17830. "properties": {
  17831. "type": "object",
  17832. "properties": {
  17833. "timestamp": {
  17834. "type": "number"
  17835. },
  17836. "sessionID": {
  17837. "type": "string",
  17838. "pattern": "^ses"
  17839. },
  17840. "callID": {
  17841. "type": "string"
  17842. },
  17843. "text": {
  17844. "type": "string"
  17845. }
  17846. },
  17847. "required": ["timestamp", "sessionID", "callID", "text"],
  17848. "additionalProperties": false
  17849. }
  17850. },
  17851. "required": ["id", "type", "properties"],
  17852. "additionalProperties": false
  17853. },
  17854. "EventSessionNextToolCalled": {
  17855. "type": "object",
  17856. "properties": {
  17857. "id": {
  17858. "type": "string"
  17859. },
  17860. "type": {
  17861. "type": "string",
  17862. "enum": ["session.next.tool.called"]
  17863. },
  17864. "properties": {
  17865. "type": "object",
  17866. "properties": {
  17867. "timestamp": {
  17868. "type": "number"
  17869. },
  17870. "sessionID": {
  17871. "type": "string",
  17872. "pattern": "^ses"
  17873. },
  17874. "callID": {
  17875. "type": "string"
  17876. },
  17877. "tool": {
  17878. "type": "string"
  17879. },
  17880. "input": {
  17881. "type": "object"
  17882. },
  17883. "provider": {
  17884. "type": "object",
  17885. "properties": {
  17886. "executed": {
  17887. "type": "boolean"
  17888. },
  17889. "metadata": {
  17890. "type": "object"
  17891. }
  17892. },
  17893. "required": ["executed"],
  17894. "additionalProperties": false
  17895. }
  17896. },
  17897. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17898. "additionalProperties": false
  17899. }
  17900. },
  17901. "required": ["id", "type", "properties"],
  17902. "additionalProperties": false
  17903. },
  17904. "ToolTextContent": {
  17905. "type": "object",
  17906. "properties": {
  17907. "type": {
  17908. "type": "string",
  17909. "enum": ["text"]
  17910. },
  17911. "text": {
  17912. "type": "string"
  17913. }
  17914. },
  17915. "required": ["type", "text"],
  17916. "additionalProperties": false
  17917. },
  17918. "ToolFileContent": {
  17919. "type": "object",
  17920. "properties": {
  17921. "type": {
  17922. "type": "string",
  17923. "enum": ["file"]
  17924. },
  17925. "uri": {
  17926. "type": "string"
  17927. },
  17928. "mime": {
  17929. "type": "string"
  17930. },
  17931. "name": {
  17932. "type": "string"
  17933. }
  17934. },
  17935. "required": ["type", "uri", "mime"],
  17936. "additionalProperties": false
  17937. },
  17938. "EventSessionNextToolProgress": {
  17939. "type": "object",
  17940. "properties": {
  17941. "id": {
  17942. "type": "string"
  17943. },
  17944. "type": {
  17945. "type": "string",
  17946. "enum": ["session.next.tool.progress"]
  17947. },
  17948. "properties": {
  17949. "type": "object",
  17950. "properties": {
  17951. "timestamp": {
  17952. "type": "number"
  17953. },
  17954. "sessionID": {
  17955. "type": "string",
  17956. "pattern": "^ses"
  17957. },
  17958. "callID": {
  17959. "type": "string"
  17960. },
  17961. "structured": {
  17962. "type": "object"
  17963. },
  17964. "content": {
  17965. "type": "array",
  17966. "items": {
  17967. "anyOf": [
  17968. {
  17969. "$ref": "#/components/schemas/ToolTextContent"
  17970. },
  17971. {
  17972. "$ref": "#/components/schemas/ToolFileContent"
  17973. }
  17974. ]
  17975. }
  17976. }
  17977. },
  17978. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17979. "additionalProperties": false
  17980. }
  17981. },
  17982. "required": ["id", "type", "properties"],
  17983. "additionalProperties": false
  17984. },
  17985. "EventSessionNextToolSuccess": {
  17986. "type": "object",
  17987. "properties": {
  17988. "id": {
  17989. "type": "string"
  17990. },
  17991. "type": {
  17992. "type": "string",
  17993. "enum": ["session.next.tool.success"]
  17994. },
  17995. "properties": {
  17996. "type": "object",
  17997. "properties": {
  17998. "timestamp": {
  17999. "type": "number"
  18000. },
  18001. "sessionID": {
  18002. "type": "string",
  18003. "pattern": "^ses"
  18004. },
  18005. "callID": {
  18006. "type": "string"
  18007. },
  18008. "structured": {
  18009. "type": "object"
  18010. },
  18011. "content": {
  18012. "type": "array",
  18013. "items": {
  18014. "anyOf": [
  18015. {
  18016. "$ref": "#/components/schemas/ToolTextContent"
  18017. },
  18018. {
  18019. "$ref": "#/components/schemas/ToolFileContent"
  18020. }
  18021. ]
  18022. }
  18023. },
  18024. "provider": {
  18025. "type": "object",
  18026. "properties": {
  18027. "executed": {
  18028. "type": "boolean"
  18029. },
  18030. "metadata": {
  18031. "type": "object"
  18032. }
  18033. },
  18034. "required": ["executed"],
  18035. "additionalProperties": false
  18036. }
  18037. },
  18038. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  18039. "additionalProperties": false
  18040. }
  18041. },
  18042. "required": ["id", "type", "properties"],
  18043. "additionalProperties": false
  18044. },
  18045. "EventSessionNextToolFailed": {
  18046. "type": "object",
  18047. "properties": {
  18048. "id": {
  18049. "type": "string"
  18050. },
  18051. "type": {
  18052. "type": "string",
  18053. "enum": ["session.next.tool.failed"]
  18054. },
  18055. "properties": {
  18056. "type": "object",
  18057. "properties": {
  18058. "timestamp": {
  18059. "type": "number"
  18060. },
  18061. "sessionID": {
  18062. "type": "string",
  18063. "pattern": "^ses"
  18064. },
  18065. "callID": {
  18066. "type": "string"
  18067. },
  18068. "error": {
  18069. "$ref": "#/components/schemas/SessionErrorUnknown"
  18070. },
  18071. "provider": {
  18072. "type": "object",
  18073. "properties": {
  18074. "executed": {
  18075. "type": "boolean"
  18076. },
  18077. "metadata": {
  18078. "type": "object"
  18079. }
  18080. },
  18081. "required": ["executed"],
  18082. "additionalProperties": false
  18083. }
  18084. },
  18085. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  18086. "additionalProperties": false
  18087. }
  18088. },
  18089. "required": ["id", "type", "properties"],
  18090. "additionalProperties": false
  18091. },
  18092. "SessionNextRetry_error": {
  18093. "type": "object",
  18094. "properties": {
  18095. "message": {
  18096. "type": "string"
  18097. },
  18098. "statusCode": {
  18099. "type": "number"
  18100. },
  18101. "isRetryable": {
  18102. "type": "boolean"
  18103. },
  18104. "responseHeaders": {
  18105. "type": "object",
  18106. "additionalProperties": {
  18107. "type": "string"
  18108. }
  18109. },
  18110. "responseBody": {
  18111. "type": "string"
  18112. },
  18113. "metadata": {
  18114. "type": "object",
  18115. "additionalProperties": {
  18116. "type": "string"
  18117. }
  18118. }
  18119. },
  18120. "required": ["message", "isRetryable"],
  18121. "additionalProperties": false
  18122. },
  18123. "EventSessionNextRetried": {
  18124. "type": "object",
  18125. "properties": {
  18126. "id": {
  18127. "type": "string"
  18128. },
  18129. "type": {
  18130. "type": "string",
  18131. "enum": ["session.next.retried"]
  18132. },
  18133. "properties": {
  18134. "type": "object",
  18135. "properties": {
  18136. "timestamp": {
  18137. "type": "number"
  18138. },
  18139. "sessionID": {
  18140. "type": "string",
  18141. "pattern": "^ses"
  18142. },
  18143. "attempt": {
  18144. "type": "number"
  18145. },
  18146. "error": {
  18147. "$ref": "#/components/schemas/SessionNextRetry_error"
  18148. }
  18149. },
  18150. "required": ["timestamp", "sessionID", "attempt", "error"],
  18151. "additionalProperties": false
  18152. }
  18153. },
  18154. "required": ["id", "type", "properties"],
  18155. "additionalProperties": false
  18156. },
  18157. "EventSessionNextCompactionStarted": {
  18158. "type": "object",
  18159. "properties": {
  18160. "id": {
  18161. "type": "string"
  18162. },
  18163. "type": {
  18164. "type": "string",
  18165. "enum": ["session.next.compaction.started"]
  18166. },
  18167. "properties": {
  18168. "type": "object",
  18169. "properties": {
  18170. "timestamp": {
  18171. "type": "number"
  18172. },
  18173. "sessionID": {
  18174. "type": "string",
  18175. "pattern": "^ses"
  18176. },
  18177. "reason": {
  18178. "type": "string",
  18179. "enum": ["auto", "manual"]
  18180. }
  18181. },
  18182. "required": ["timestamp", "sessionID", "reason"],
  18183. "additionalProperties": false
  18184. }
  18185. },
  18186. "required": ["id", "type", "properties"],
  18187. "additionalProperties": false
  18188. },
  18189. "EventSessionNextCompactionDelta": {
  18190. "type": "object",
  18191. "properties": {
  18192. "id": {
  18193. "type": "string"
  18194. },
  18195. "type": {
  18196. "type": "string",
  18197. "enum": ["session.next.compaction.delta"]
  18198. },
  18199. "properties": {
  18200. "type": "object",
  18201. "properties": {
  18202. "timestamp": {
  18203. "type": "number"
  18204. },
  18205. "sessionID": {
  18206. "type": "string",
  18207. "pattern": "^ses"
  18208. },
  18209. "text": {
  18210. "type": "string"
  18211. }
  18212. },
  18213. "required": ["timestamp", "sessionID", "text"],
  18214. "additionalProperties": false
  18215. }
  18216. },
  18217. "required": ["id", "type", "properties"],
  18218. "additionalProperties": false
  18219. },
  18220. "EventSessionNextCompactionEnded": {
  18221. "type": "object",
  18222. "properties": {
  18223. "id": {
  18224. "type": "string"
  18225. },
  18226. "type": {
  18227. "type": "string",
  18228. "enum": ["session.next.compaction.ended"]
  18229. },
  18230. "properties": {
  18231. "type": "object",
  18232. "properties": {
  18233. "timestamp": {
  18234. "type": "number"
  18235. },
  18236. "sessionID": {
  18237. "type": "string",
  18238. "pattern": "^ses"
  18239. },
  18240. "text": {
  18241. "type": "string"
  18242. },
  18243. "include": {
  18244. "type": "string"
  18245. }
  18246. },
  18247. "required": ["timestamp", "sessionID", "text"],
  18248. "additionalProperties": false
  18249. }
  18250. },
  18251. "required": ["id", "type", "properties"],
  18252. "additionalProperties": false
  18253. },
  18254. "EventServerConnected": {
  18255. "type": "object",
  18256. "properties": {
  18257. "id": {
  18258. "type": "string"
  18259. },
  18260. "type": {
  18261. "type": "string",
  18262. "enum": ["server.connected"]
  18263. },
  18264. "properties": {
  18265. "type": "object",
  18266. "properties": {}
  18267. }
  18268. },
  18269. "required": ["id", "type", "properties"],
  18270. "additionalProperties": false
  18271. },
  18272. "EventGlobalDisposed": {
  18273. "type": "object",
  18274. "properties": {
  18275. "id": {
  18276. "type": "string"
  18277. },
  18278. "type": {
  18279. "type": "string",
  18280. "enum": ["global.disposed"]
  18281. },
  18282. "properties": {
  18283. "type": "object",
  18284. "properties": {}
  18285. }
  18286. },
  18287. "required": ["id", "type", "properties"],
  18288. "additionalProperties": false
  18289. },
  18290. "SessionInfo": {
  18291. "type": "object",
  18292. "properties": {
  18293. "id": {
  18294. "type": "string",
  18295. "pattern": "^ses"
  18296. },
  18297. "parentID": {
  18298. "type": "string",
  18299. "pattern": "^ses"
  18300. },
  18301. "projectID": {
  18302. "type": "string"
  18303. },
  18304. "workspaceID": {
  18305. "type": "string",
  18306. "pattern": "^wrk"
  18307. },
  18308. "path": {
  18309. "type": "string"
  18310. },
  18311. "agent": {
  18312. "type": "string"
  18313. },
  18314. "model": {
  18315. "type": "object",
  18316. "properties": {
  18317. "id": {
  18318. "type": "string"
  18319. },
  18320. "providerID": {
  18321. "type": "string"
  18322. },
  18323. "variant": {
  18324. "type": "string"
  18325. }
  18326. },
  18327. "required": ["id", "providerID", "variant"],
  18328. "additionalProperties": false
  18329. },
  18330. "cost": {
  18331. "type": "number"
  18332. },
  18333. "tokens": {
  18334. "type": "object",
  18335. "properties": {
  18336. "input": {
  18337. "type": "number"
  18338. },
  18339. "output": {
  18340. "type": "number"
  18341. },
  18342. "reasoning": {
  18343. "type": "number"
  18344. },
  18345. "cache": {
  18346. "type": "object",
  18347. "properties": {
  18348. "read": {
  18349. "type": "number"
  18350. },
  18351. "write": {
  18352. "type": "number"
  18353. }
  18354. },
  18355. "required": ["read", "write"],
  18356. "additionalProperties": false
  18357. }
  18358. },
  18359. "required": ["input", "output", "reasoning", "cache"],
  18360. "additionalProperties": false
  18361. },
  18362. "time": {
  18363. "type": "object",
  18364. "properties": {
  18365. "created": {
  18366. "type": "number"
  18367. },
  18368. "updated": {
  18369. "type": "number"
  18370. },
  18371. "archived": {
  18372. "type": "number"
  18373. }
  18374. },
  18375. "required": ["created", "updated"],
  18376. "additionalProperties": false
  18377. },
  18378. "title": {
  18379. "type": "string"
  18380. }
  18381. },
  18382. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  18383. "additionalProperties": false
  18384. },
  18385. "SessionDelivery": {
  18386. "type": "string",
  18387. "enum": ["immediate", "deferred"]
  18388. },
  18389. "SessionMessageAgentSwitched": {
  18390. "type": "object",
  18391. "properties": {
  18392. "id": {
  18393. "type": "string"
  18394. },
  18395. "metadata": {
  18396. "type": "object"
  18397. },
  18398. "time": {
  18399. "type": "object",
  18400. "properties": {
  18401. "created": {
  18402. "type": "number"
  18403. }
  18404. },
  18405. "required": ["created"],
  18406. "additionalProperties": false
  18407. },
  18408. "type": {
  18409. "type": "string",
  18410. "enum": ["agent-switched"]
  18411. },
  18412. "agent": {
  18413. "type": "string"
  18414. }
  18415. },
  18416. "required": ["id", "time", "type", "agent"],
  18417. "additionalProperties": false
  18418. },
  18419. "SessionMessageModelSwitched": {
  18420. "type": "object",
  18421. "properties": {
  18422. "id": {
  18423. "type": "string"
  18424. },
  18425. "metadata": {
  18426. "type": "object"
  18427. },
  18428. "time": {
  18429. "type": "object",
  18430. "properties": {
  18431. "created": {
  18432. "type": "number"
  18433. }
  18434. },
  18435. "required": ["created"],
  18436. "additionalProperties": false
  18437. },
  18438. "type": {
  18439. "type": "string",
  18440. "enum": ["model-switched"]
  18441. },
  18442. "model": {
  18443. "type": "object",
  18444. "properties": {
  18445. "id": {
  18446. "type": "string"
  18447. },
  18448. "providerID": {
  18449. "type": "string"
  18450. },
  18451. "variant": {
  18452. "type": "string"
  18453. }
  18454. },
  18455. "required": ["id", "providerID", "variant"],
  18456. "additionalProperties": false
  18457. }
  18458. },
  18459. "required": ["id", "time", "type", "model"],
  18460. "additionalProperties": false
  18461. },
  18462. "SessionMessageUser": {
  18463. "type": "object",
  18464. "properties": {
  18465. "id": {
  18466. "type": "string"
  18467. },
  18468. "metadata": {
  18469. "type": "object"
  18470. },
  18471. "time": {
  18472. "type": "object",
  18473. "properties": {
  18474. "created": {
  18475. "type": "number"
  18476. }
  18477. },
  18478. "required": ["created"],
  18479. "additionalProperties": false
  18480. },
  18481. "text": {
  18482. "type": "string"
  18483. },
  18484. "files": {
  18485. "type": "array",
  18486. "items": {
  18487. "$ref": "#/components/schemas/PromptFileAttachment"
  18488. }
  18489. },
  18490. "agents": {
  18491. "type": "array",
  18492. "items": {
  18493. "$ref": "#/components/schemas/PromptAgentAttachment"
  18494. }
  18495. },
  18496. "references": {
  18497. "type": "array",
  18498. "items": {
  18499. "$ref": "#/components/schemas/PromptReferenceAttachment"
  18500. }
  18501. },
  18502. "type": {
  18503. "type": "string",
  18504. "enum": ["user"]
  18505. }
  18506. },
  18507. "required": ["id", "time", "text", "type"],
  18508. "additionalProperties": false
  18509. },
  18510. "SessionMessageSynthetic": {
  18511. "type": "object",
  18512. "properties": {
  18513. "id": {
  18514. "type": "string"
  18515. },
  18516. "metadata": {
  18517. "type": "object"
  18518. },
  18519. "time": {
  18520. "type": "object",
  18521. "properties": {
  18522. "created": {
  18523. "type": "number"
  18524. }
  18525. },
  18526. "required": ["created"],
  18527. "additionalProperties": false
  18528. },
  18529. "sessionID": {
  18530. "type": "string",
  18531. "pattern": "^ses"
  18532. },
  18533. "text": {
  18534. "type": "string"
  18535. },
  18536. "type": {
  18537. "type": "string",
  18538. "enum": ["synthetic"]
  18539. }
  18540. },
  18541. "required": ["id", "time", "sessionID", "text", "type"],
  18542. "additionalProperties": false
  18543. },
  18544. "SessionMessageShell": {
  18545. "type": "object",
  18546. "properties": {
  18547. "id": {
  18548. "type": "string"
  18549. },
  18550. "metadata": {
  18551. "type": "object"
  18552. },
  18553. "time": {
  18554. "type": "object",
  18555. "properties": {
  18556. "created": {
  18557. "type": "number"
  18558. },
  18559. "completed": {
  18560. "type": "number"
  18561. }
  18562. },
  18563. "required": ["created"],
  18564. "additionalProperties": false
  18565. },
  18566. "type": {
  18567. "type": "string",
  18568. "enum": ["shell"]
  18569. },
  18570. "callID": {
  18571. "type": "string"
  18572. },
  18573. "command": {
  18574. "type": "string"
  18575. },
  18576. "output": {
  18577. "type": "string"
  18578. }
  18579. },
  18580. "required": ["id", "time", "type", "callID", "command", "output"],
  18581. "additionalProperties": false
  18582. },
  18583. "SessionMessageAssistantText": {
  18584. "type": "object",
  18585. "properties": {
  18586. "type": {
  18587. "type": "string",
  18588. "enum": ["text"]
  18589. },
  18590. "text": {
  18591. "type": "string"
  18592. }
  18593. },
  18594. "required": ["type", "text"],
  18595. "additionalProperties": false
  18596. },
  18597. "SessionMessageAssistantReasoning": {
  18598. "type": "object",
  18599. "properties": {
  18600. "type": {
  18601. "type": "string",
  18602. "enum": ["reasoning"]
  18603. },
  18604. "id": {
  18605. "type": "string"
  18606. },
  18607. "text": {
  18608. "type": "string"
  18609. }
  18610. },
  18611. "required": ["type", "id", "text"],
  18612. "additionalProperties": false
  18613. },
  18614. "SessionMessageToolStatePending": {
  18615. "type": "object",
  18616. "properties": {
  18617. "status": {
  18618. "type": "string",
  18619. "enum": ["pending"]
  18620. },
  18621. "input": {
  18622. "type": "string"
  18623. }
  18624. },
  18625. "required": ["status", "input"],
  18626. "additionalProperties": false
  18627. },
  18628. "SessionMessageToolStateRunning": {
  18629. "type": "object",
  18630. "properties": {
  18631. "status": {
  18632. "type": "string",
  18633. "enum": ["running"]
  18634. },
  18635. "input": {
  18636. "type": "object"
  18637. },
  18638. "structured": {
  18639. "type": "object"
  18640. },
  18641. "content": {
  18642. "type": "array",
  18643. "items": {
  18644. "anyOf": [
  18645. {
  18646. "$ref": "#/components/schemas/ToolTextContent"
  18647. },
  18648. {
  18649. "$ref": "#/components/schemas/ToolFileContent"
  18650. }
  18651. ]
  18652. }
  18653. }
  18654. },
  18655. "required": ["status", "input", "structured", "content"],
  18656. "additionalProperties": false
  18657. },
  18658. "SessionMessageToolStateCompleted": {
  18659. "type": "object",
  18660. "properties": {
  18661. "status": {
  18662. "type": "string",
  18663. "enum": ["completed"]
  18664. },
  18665. "input": {
  18666. "type": "object"
  18667. },
  18668. "attachments": {
  18669. "type": "array",
  18670. "items": {
  18671. "$ref": "#/components/schemas/PromptFileAttachment"
  18672. }
  18673. },
  18674. "content": {
  18675. "type": "array",
  18676. "items": {
  18677. "anyOf": [
  18678. {
  18679. "$ref": "#/components/schemas/ToolTextContent"
  18680. },
  18681. {
  18682. "$ref": "#/components/schemas/ToolFileContent"
  18683. }
  18684. ]
  18685. }
  18686. },
  18687. "structured": {
  18688. "type": "object"
  18689. }
  18690. },
  18691. "required": ["status", "input", "content", "structured"],
  18692. "additionalProperties": false
  18693. },
  18694. "SessionMessageToolStateError": {
  18695. "type": "object",
  18696. "properties": {
  18697. "status": {
  18698. "type": "string",
  18699. "enum": ["error"]
  18700. },
  18701. "input": {
  18702. "type": "object"
  18703. },
  18704. "content": {
  18705. "type": "array",
  18706. "items": {
  18707. "anyOf": [
  18708. {
  18709. "$ref": "#/components/schemas/ToolTextContent"
  18710. },
  18711. {
  18712. "$ref": "#/components/schemas/ToolFileContent"
  18713. }
  18714. ]
  18715. }
  18716. },
  18717. "structured": {
  18718. "type": "object"
  18719. },
  18720. "error": {
  18721. "$ref": "#/components/schemas/SessionErrorUnknown"
  18722. }
  18723. },
  18724. "required": ["status", "input", "content", "structured", "error"],
  18725. "additionalProperties": false
  18726. },
  18727. "SessionMessageAssistantTool": {
  18728. "type": "object",
  18729. "properties": {
  18730. "type": {
  18731. "type": "string",
  18732. "enum": ["tool"]
  18733. },
  18734. "id": {
  18735. "type": "string"
  18736. },
  18737. "name": {
  18738. "type": "string"
  18739. },
  18740. "provider": {
  18741. "type": "object",
  18742. "properties": {
  18743. "executed": {
  18744. "type": "boolean"
  18745. },
  18746. "metadata": {
  18747. "type": "object"
  18748. }
  18749. },
  18750. "required": ["executed"],
  18751. "additionalProperties": false
  18752. },
  18753. "state": {
  18754. "anyOf": [
  18755. {
  18756. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  18757. },
  18758. {
  18759. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  18760. },
  18761. {
  18762. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  18763. },
  18764. {
  18765. "$ref": "#/components/schemas/SessionMessageToolStateError"
  18766. }
  18767. ]
  18768. },
  18769. "time": {
  18770. "type": "object",
  18771. "properties": {
  18772. "created": {
  18773. "type": "number"
  18774. },
  18775. "ran": {
  18776. "type": "number"
  18777. },
  18778. "completed": {
  18779. "type": "number"
  18780. },
  18781. "pruned": {
  18782. "type": "number"
  18783. }
  18784. },
  18785. "required": ["created"],
  18786. "additionalProperties": false
  18787. }
  18788. },
  18789. "required": ["type", "id", "name", "state", "time"],
  18790. "additionalProperties": false
  18791. },
  18792. "SessionMessageAssistant": {
  18793. "type": "object",
  18794. "properties": {
  18795. "id": {
  18796. "type": "string"
  18797. },
  18798. "metadata": {
  18799. "type": "object"
  18800. },
  18801. "time": {
  18802. "type": "object",
  18803. "properties": {
  18804. "created": {
  18805. "type": "number"
  18806. },
  18807. "completed": {
  18808. "type": "number"
  18809. }
  18810. },
  18811. "required": ["created"],
  18812. "additionalProperties": false
  18813. },
  18814. "type": {
  18815. "type": "string",
  18816. "enum": ["assistant"]
  18817. },
  18818. "agent": {
  18819. "type": "string"
  18820. },
  18821. "model": {
  18822. "type": "object",
  18823. "properties": {
  18824. "id": {
  18825. "type": "string"
  18826. },
  18827. "providerID": {
  18828. "type": "string"
  18829. },
  18830. "variant": {
  18831. "type": "string"
  18832. }
  18833. },
  18834. "required": ["id", "providerID", "variant"],
  18835. "additionalProperties": false
  18836. },
  18837. "content": {
  18838. "type": "array",
  18839. "items": {
  18840. "anyOf": [
  18841. {
  18842. "$ref": "#/components/schemas/SessionMessageAssistantText"
  18843. },
  18844. {
  18845. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  18846. },
  18847. {
  18848. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  18849. }
  18850. ]
  18851. }
  18852. },
  18853. "snapshot": {
  18854. "type": "object",
  18855. "properties": {
  18856. "start": {
  18857. "type": "string"
  18858. },
  18859. "end": {
  18860. "type": "string"
  18861. }
  18862. },
  18863. "additionalProperties": false
  18864. },
  18865. "finish": {
  18866. "type": "string"
  18867. },
  18868. "cost": {
  18869. "type": "number"
  18870. },
  18871. "tokens": {
  18872. "type": "object",
  18873. "properties": {
  18874. "input": {
  18875. "type": "number"
  18876. },
  18877. "output": {
  18878. "type": "number"
  18879. },
  18880. "reasoning": {
  18881. "type": "number"
  18882. },
  18883. "cache": {
  18884. "type": "object",
  18885. "properties": {
  18886. "read": {
  18887. "type": "number"
  18888. },
  18889. "write": {
  18890. "type": "number"
  18891. }
  18892. },
  18893. "required": ["read", "write"],
  18894. "additionalProperties": false
  18895. }
  18896. },
  18897. "required": ["input", "output", "reasoning", "cache"],
  18898. "additionalProperties": false
  18899. },
  18900. "error": {
  18901. "$ref": "#/components/schemas/SessionErrorUnknown"
  18902. }
  18903. },
  18904. "required": ["id", "time", "type", "agent", "model", "content"],
  18905. "additionalProperties": false
  18906. },
  18907. "SessionMessageCompaction": {
  18908. "type": "object",
  18909. "properties": {
  18910. "type": {
  18911. "type": "string",
  18912. "enum": ["compaction"]
  18913. },
  18914. "reason": {
  18915. "type": "string",
  18916. "enum": ["auto", "manual"]
  18917. },
  18918. "summary": {
  18919. "type": "string"
  18920. },
  18921. "include": {
  18922. "type": "string"
  18923. },
  18924. "id": {
  18925. "type": "string"
  18926. },
  18927. "metadata": {
  18928. "type": "object"
  18929. },
  18930. "time": {
  18931. "type": "object",
  18932. "properties": {
  18933. "created": {
  18934. "type": "number"
  18935. }
  18936. },
  18937. "required": ["created"],
  18938. "additionalProperties": false
  18939. }
  18940. },
  18941. "required": ["type", "reason", "summary", "id", "time"],
  18942. "additionalProperties": false
  18943. },
  18944. "SessionMessage": {
  18945. "anyOf": [
  18946. {
  18947. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  18948. },
  18949. {
  18950. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  18951. },
  18952. {
  18953. "$ref": "#/components/schemas/SessionMessageUser"
  18954. },
  18955. {
  18956. "$ref": "#/components/schemas/SessionMessageSynthetic"
  18957. },
  18958. {
  18959. "$ref": "#/components/schemas/SessionMessageShell"
  18960. },
  18961. {
  18962. "$ref": "#/components/schemas/SessionMessageAssistant"
  18963. },
  18964. {
  18965. "$ref": "#/components/schemas/SessionMessageCompaction"
  18966. }
  18967. ]
  18968. },
  18969. "EventTuiToastShow1": {
  18970. "type": "object",
  18971. "properties": {
  18972. "id": {
  18973. "type": "string"
  18974. },
  18975. "type": {
  18976. "type": "string",
  18977. "enum": ["tui.toast.show"]
  18978. },
  18979. "properties": {
  18980. "type": "object",
  18981. "properties": {
  18982. "title": {
  18983. "type": "string"
  18984. },
  18985. "message": {
  18986. "type": "string"
  18987. },
  18988. "variant": {
  18989. "type": "string",
  18990. "enum": ["info", "success", "warning", "error"]
  18991. },
  18992. "duration": {
  18993. "type": "integer",
  18994. "exclusiveMinimum": 0
  18995. }
  18996. },
  18997. "required": ["message", "variant"],
  18998. "additionalProperties": false
  18999. }
  19000. },
  19001. "required": ["id", "type", "properties"],
  19002. "additionalProperties": false
  19003. },
  19004. "BadRequestError": {
  19005. "type": "object",
  19006. "required": ["name", "data"],
  19007. "properties": {
  19008. "name": {
  19009. "type": "string",
  19010. "enum": ["BadRequest"]
  19011. },
  19012. "data": {
  19013. "type": "object",
  19014. "required": ["message"],
  19015. "properties": {
  19016. "message": {
  19017. "type": "string"
  19018. },
  19019. "kind": {
  19020. "type": "string",
  19021. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  19022. }
  19023. }
  19024. }
  19025. }
  19026. }
  19027. }
  19028. },
  19029. "security": [],
  19030. "tags": [
  19031. {
  19032. "name": "control",
  19033. "description": "Control plane routes."
  19034. },
  19035. {
  19036. "name": "global",
  19037. "description": "Global server routes."
  19038. },
  19039. {
  19040. "name": "event",
  19041. "description": "Instance event stream route."
  19042. },
  19043. {
  19044. "name": "config",
  19045. "description": "Experimental HttpApi config routes."
  19046. },
  19047. {
  19048. "name": "experimental",
  19049. "description": "Experimental HttpApi read-only routes."
  19050. },
  19051. {
  19052. "name": "file",
  19053. "description": "Experimental HttpApi file routes."
  19054. },
  19055. {
  19056. "name": "instance",
  19057. "description": "Experimental HttpApi instance read routes."
  19058. },
  19059. {
  19060. "name": "mcp",
  19061. "description": "Experimental HttpApi MCP routes."
  19062. },
  19063. {
  19064. "name": "project",
  19065. "description": "Experimental HttpApi project routes."
  19066. },
  19067. {
  19068. "name": "pty",
  19069. "description": "Experimental HttpApi PTY routes."
  19070. },
  19071. {
  19072. "name": "question",
  19073. "description": "Question routes."
  19074. },
  19075. {
  19076. "name": "permission",
  19077. "description": "Experimental HttpApi permission routes."
  19078. },
  19079. {
  19080. "name": "provider",
  19081. "description": "Experimental HttpApi provider routes."
  19082. },
  19083. {
  19084. "name": "session",
  19085. "description": "Experimental HttpApi session routes."
  19086. },
  19087. {
  19088. "name": "sync",
  19089. "description": "Experimental HttpApi sync routes."
  19090. },
  19091. {
  19092. "name": "v2",
  19093. "description": "Experimental v2 routes."
  19094. },
  19095. {
  19096. "name": "v2 messages",
  19097. "description": "Experimental v2 message routes."
  19098. },
  19099. {
  19100. "name": "tui",
  19101. "description": "Experimental HttpApi TUI routes."
  19102. },
  19103. {
  19104. "name": "workspace",
  19105. "description": "Experimental HttpApi workspace routes."
  19106. },
  19107. {
  19108. "name": "pty",
  19109. "description": "PTY websocket route."
  19110. }
  19111. ]
  19112. }