openapi.json 518 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033
  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. },
  1018. "description": "List all sandbox worktrees for the current project.",
  1019. "summary": "List worktrees",
  1020. "x-codeSamples": [
  1021. {
  1022. "lang": "js",
  1023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1024. }
  1025. ]
  1026. },
  1027. "post": {
  1028. "tags": ["experimental"],
  1029. "operationId": "worktree.create",
  1030. "parameters": [
  1031. {
  1032. "name": "directory",
  1033. "in": "query",
  1034. "schema": {
  1035. "type": "string"
  1036. },
  1037. "required": false
  1038. },
  1039. {
  1040. "name": "workspace",
  1041. "in": "query",
  1042. "schema": {
  1043. "type": "string"
  1044. },
  1045. "required": false
  1046. }
  1047. ],
  1048. "responses": {
  1049. "200": {
  1050. "description": "Worktree created",
  1051. "content": {
  1052. "application/json": {
  1053. "schema": {
  1054. "$ref": "#/components/schemas/Worktree"
  1055. }
  1056. }
  1057. }
  1058. },
  1059. "400": {
  1060. "description": "Bad request",
  1061. "content": {
  1062. "application/json": {
  1063. "schema": {
  1064. "$ref": "#/components/schemas/BadRequestError"
  1065. }
  1066. }
  1067. }
  1068. }
  1069. },
  1070. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1071. "summary": "Create worktree",
  1072. "requestBody": {
  1073. "content": {
  1074. "application/json": {
  1075. "schema": {
  1076. "$ref": "#/components/schemas/WorktreeCreateInput"
  1077. }
  1078. }
  1079. }
  1080. },
  1081. "x-codeSamples": [
  1082. {
  1083. "lang": "js",
  1084. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1085. }
  1086. ]
  1087. },
  1088. "delete": {
  1089. "tags": ["experimental"],
  1090. "operationId": "worktree.remove",
  1091. "parameters": [
  1092. {
  1093. "name": "directory",
  1094. "in": "query",
  1095. "schema": {
  1096. "type": "string"
  1097. },
  1098. "required": false
  1099. },
  1100. {
  1101. "name": "workspace",
  1102. "in": "query",
  1103. "schema": {
  1104. "type": "string"
  1105. },
  1106. "required": false
  1107. }
  1108. ],
  1109. "responses": {
  1110. "200": {
  1111. "description": "Worktree removed",
  1112. "content": {
  1113. "application/json": {
  1114. "schema": {
  1115. "type": "boolean",
  1116. "description": "Worktree removed"
  1117. }
  1118. }
  1119. }
  1120. },
  1121. "400": {
  1122. "description": "Bad request",
  1123. "content": {
  1124. "application/json": {
  1125. "schema": {
  1126. "$ref": "#/components/schemas/BadRequestError"
  1127. }
  1128. }
  1129. }
  1130. }
  1131. },
  1132. "description": "Remove a git worktree and delete its branch.",
  1133. "summary": "Remove worktree",
  1134. "requestBody": {
  1135. "content": {
  1136. "application/json": {
  1137. "schema": {
  1138. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1139. }
  1140. }
  1141. }
  1142. },
  1143. "x-codeSamples": [
  1144. {
  1145. "lang": "js",
  1146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1147. }
  1148. ]
  1149. }
  1150. },
  1151. "/experimental/worktree/reset": {
  1152. "post": {
  1153. "tags": ["experimental"],
  1154. "operationId": "worktree.reset",
  1155. "parameters": [
  1156. {
  1157. "name": "directory",
  1158. "in": "query",
  1159. "schema": {
  1160. "type": "string"
  1161. },
  1162. "required": false
  1163. },
  1164. {
  1165. "name": "workspace",
  1166. "in": "query",
  1167. "schema": {
  1168. "type": "string"
  1169. },
  1170. "required": false
  1171. }
  1172. ],
  1173. "responses": {
  1174. "200": {
  1175. "description": "Worktree reset",
  1176. "content": {
  1177. "application/json": {
  1178. "schema": {
  1179. "type": "boolean",
  1180. "description": "Worktree reset"
  1181. }
  1182. }
  1183. }
  1184. },
  1185. "400": {
  1186. "description": "Bad request",
  1187. "content": {
  1188. "application/json": {
  1189. "schema": {
  1190. "$ref": "#/components/schemas/BadRequestError"
  1191. }
  1192. }
  1193. }
  1194. }
  1195. },
  1196. "description": "Reset a worktree branch to the primary default branch.",
  1197. "summary": "Reset worktree",
  1198. "requestBody": {
  1199. "content": {
  1200. "application/json": {
  1201. "schema": {
  1202. "$ref": "#/components/schemas/WorktreeResetInput"
  1203. }
  1204. }
  1205. }
  1206. },
  1207. "x-codeSamples": [
  1208. {
  1209. "lang": "js",
  1210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1211. }
  1212. ]
  1213. }
  1214. },
  1215. "/experimental/session": {
  1216. "get": {
  1217. "tags": ["experimental"],
  1218. "operationId": "experimental.session.list",
  1219. "parameters": [
  1220. {
  1221. "name": "directory",
  1222. "in": "query",
  1223. "schema": {
  1224. "type": "string"
  1225. },
  1226. "required": false
  1227. },
  1228. {
  1229. "name": "workspace",
  1230. "in": "query",
  1231. "schema": {
  1232. "type": "string"
  1233. },
  1234. "required": false
  1235. },
  1236. {
  1237. "name": "roots",
  1238. "in": "query",
  1239. "schema": {
  1240. "anyOf": [
  1241. {
  1242. "type": "boolean"
  1243. },
  1244. {
  1245. "type": "string",
  1246. "enum": ["true", "false"]
  1247. }
  1248. ]
  1249. },
  1250. "required": false
  1251. },
  1252. {
  1253. "name": "start",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "number"
  1257. },
  1258. "required": false
  1259. },
  1260. {
  1261. "name": "cursor",
  1262. "in": "query",
  1263. "schema": {
  1264. "type": "number"
  1265. },
  1266. "required": false
  1267. },
  1268. {
  1269. "name": "search",
  1270. "in": "query",
  1271. "schema": {
  1272. "type": "string"
  1273. },
  1274. "required": false
  1275. },
  1276. {
  1277. "name": "limit",
  1278. "in": "query",
  1279. "schema": {
  1280. "type": "number"
  1281. },
  1282. "required": false
  1283. },
  1284. {
  1285. "name": "archived",
  1286. "in": "query",
  1287. "schema": {
  1288. "anyOf": [
  1289. {
  1290. "type": "boolean"
  1291. },
  1292. {
  1293. "type": "string",
  1294. "enum": ["true", "false"]
  1295. }
  1296. ]
  1297. },
  1298. "required": false
  1299. }
  1300. ],
  1301. "responses": {
  1302. "200": {
  1303. "description": "List of sessions",
  1304. "content": {
  1305. "application/json": {
  1306. "schema": {
  1307. "type": "array",
  1308. "items": {
  1309. "$ref": "#/components/schemas/GlobalSession"
  1310. },
  1311. "description": "List of sessions"
  1312. }
  1313. }
  1314. }
  1315. }
  1316. },
  1317. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1318. "summary": "List sessions",
  1319. "x-codeSamples": [
  1320. {
  1321. "lang": "js",
  1322. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1323. }
  1324. ]
  1325. }
  1326. },
  1327. "/experimental/resource": {
  1328. "get": {
  1329. "tags": ["experimental"],
  1330. "operationId": "experimental.resource.list",
  1331. "parameters": [
  1332. {
  1333. "name": "directory",
  1334. "in": "query",
  1335. "schema": {
  1336. "type": "string"
  1337. },
  1338. "required": false
  1339. },
  1340. {
  1341. "name": "workspace",
  1342. "in": "query",
  1343. "schema": {
  1344. "type": "string"
  1345. },
  1346. "required": false
  1347. }
  1348. ],
  1349. "responses": {
  1350. "200": {
  1351. "description": "MCP resources",
  1352. "content": {
  1353. "application/json": {
  1354. "schema": {
  1355. "type": "object",
  1356. "additionalProperties": {
  1357. "$ref": "#/components/schemas/McpResource"
  1358. },
  1359. "description": "MCP resources"
  1360. }
  1361. }
  1362. }
  1363. }
  1364. },
  1365. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1366. "summary": "Get MCP resources",
  1367. "x-codeSamples": [
  1368. {
  1369. "lang": "js",
  1370. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1371. }
  1372. ]
  1373. }
  1374. },
  1375. "/find": {
  1376. "get": {
  1377. "tags": ["file"],
  1378. "operationId": "find.text",
  1379. "parameters": [
  1380. {
  1381. "name": "directory",
  1382. "in": "query",
  1383. "schema": {
  1384. "type": "string"
  1385. },
  1386. "required": false
  1387. },
  1388. {
  1389. "name": "workspace",
  1390. "in": "query",
  1391. "schema": {
  1392. "type": "string"
  1393. },
  1394. "required": false
  1395. },
  1396. {
  1397. "name": "pattern",
  1398. "in": "query",
  1399. "schema": {
  1400. "type": "string"
  1401. },
  1402. "required": true
  1403. }
  1404. ],
  1405. "responses": {
  1406. "200": {
  1407. "description": "Matches",
  1408. "content": {
  1409. "application/json": {
  1410. "schema": {
  1411. "type": "array",
  1412. "items": {
  1413. "type": "object",
  1414. "properties": {
  1415. "path": {
  1416. "type": "object",
  1417. "properties": {
  1418. "text": {
  1419. "type": "string"
  1420. }
  1421. },
  1422. "required": ["text"],
  1423. "additionalProperties": false
  1424. },
  1425. "lines": {
  1426. "type": "object",
  1427. "properties": {
  1428. "text": {
  1429. "type": "string"
  1430. }
  1431. },
  1432. "required": ["text"],
  1433. "additionalProperties": false
  1434. },
  1435. "line_number": {
  1436. "type": "integer",
  1437. "minimum": 0
  1438. },
  1439. "absolute_offset": {
  1440. "type": "integer",
  1441. "minimum": 0
  1442. },
  1443. "submatches": {
  1444. "type": "array",
  1445. "items": {
  1446. "type": "object",
  1447. "properties": {
  1448. "match": {
  1449. "type": "object",
  1450. "properties": {
  1451. "text": {
  1452. "type": "string"
  1453. }
  1454. },
  1455. "required": ["text"],
  1456. "additionalProperties": false
  1457. },
  1458. "start": {
  1459. "type": "integer",
  1460. "minimum": 0
  1461. },
  1462. "end": {
  1463. "type": "integer",
  1464. "minimum": 0
  1465. }
  1466. },
  1467. "required": ["match", "start", "end"],
  1468. "additionalProperties": false
  1469. }
  1470. }
  1471. },
  1472. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1473. "additionalProperties": false
  1474. },
  1475. "description": "Matches"
  1476. }
  1477. }
  1478. }
  1479. }
  1480. },
  1481. "description": "Search for text patterns across files in the project using ripgrep.",
  1482. "summary": "Find text",
  1483. "x-codeSamples": [
  1484. {
  1485. "lang": "js",
  1486. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1487. }
  1488. ]
  1489. }
  1490. },
  1491. "/find/file": {
  1492. "get": {
  1493. "tags": ["file"],
  1494. "operationId": "find.files",
  1495. "parameters": [
  1496. {
  1497. "name": "directory",
  1498. "in": "query",
  1499. "schema": {
  1500. "type": "string"
  1501. },
  1502. "required": false
  1503. },
  1504. {
  1505. "name": "workspace",
  1506. "in": "query",
  1507. "schema": {
  1508. "type": "string"
  1509. },
  1510. "required": false
  1511. },
  1512. {
  1513. "name": "query",
  1514. "in": "query",
  1515. "schema": {
  1516. "type": "string"
  1517. },
  1518. "required": true
  1519. },
  1520. {
  1521. "name": "dirs",
  1522. "in": "query",
  1523. "schema": {
  1524. "type": "string",
  1525. "enum": ["true", "false"]
  1526. },
  1527. "required": false
  1528. },
  1529. {
  1530. "name": "type",
  1531. "in": "query",
  1532. "schema": {
  1533. "type": "string",
  1534. "enum": ["file", "directory"]
  1535. },
  1536. "required": false
  1537. },
  1538. {
  1539. "name": "limit",
  1540. "in": "query",
  1541. "schema": {
  1542. "type": "integer",
  1543. "minimum": 1,
  1544. "maximum": 200
  1545. },
  1546. "required": false
  1547. }
  1548. ],
  1549. "responses": {
  1550. "200": {
  1551. "description": "File paths",
  1552. "content": {
  1553. "application/json": {
  1554. "schema": {
  1555. "type": "array",
  1556. "items": {
  1557. "type": "string"
  1558. },
  1559. "description": "File paths"
  1560. }
  1561. }
  1562. }
  1563. }
  1564. },
  1565. "description": "Search for files or directories by name or pattern in the project directory.",
  1566. "summary": "Find files",
  1567. "x-codeSamples": [
  1568. {
  1569. "lang": "js",
  1570. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1571. }
  1572. ]
  1573. }
  1574. },
  1575. "/find/symbol": {
  1576. "get": {
  1577. "tags": ["file"],
  1578. "operationId": "find.symbols",
  1579. "parameters": [
  1580. {
  1581. "name": "directory",
  1582. "in": "query",
  1583. "schema": {
  1584. "type": "string"
  1585. },
  1586. "required": false
  1587. },
  1588. {
  1589. "name": "workspace",
  1590. "in": "query",
  1591. "schema": {
  1592. "type": "string"
  1593. },
  1594. "required": false
  1595. },
  1596. {
  1597. "name": "query",
  1598. "in": "query",
  1599. "schema": {
  1600. "type": "string"
  1601. },
  1602. "required": true
  1603. }
  1604. ],
  1605. "responses": {
  1606. "200": {
  1607. "description": "Symbols",
  1608. "content": {
  1609. "application/json": {
  1610. "schema": {
  1611. "type": "array",
  1612. "items": {
  1613. "$ref": "#/components/schemas/Symbol"
  1614. },
  1615. "description": "Symbols"
  1616. }
  1617. }
  1618. }
  1619. }
  1620. },
  1621. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1622. "summary": "Find symbols",
  1623. "x-codeSamples": [
  1624. {
  1625. "lang": "js",
  1626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1627. }
  1628. ]
  1629. }
  1630. },
  1631. "/file": {
  1632. "get": {
  1633. "tags": ["file"],
  1634. "operationId": "file.list",
  1635. "parameters": [
  1636. {
  1637. "name": "directory",
  1638. "in": "query",
  1639. "schema": {
  1640. "type": "string"
  1641. },
  1642. "required": false
  1643. },
  1644. {
  1645. "name": "workspace",
  1646. "in": "query",
  1647. "schema": {
  1648. "type": "string"
  1649. },
  1650. "required": false
  1651. },
  1652. {
  1653. "name": "path",
  1654. "in": "query",
  1655. "schema": {
  1656. "type": "string"
  1657. },
  1658. "required": true
  1659. }
  1660. ],
  1661. "responses": {
  1662. "200": {
  1663. "description": "Files and directories",
  1664. "content": {
  1665. "application/json": {
  1666. "schema": {
  1667. "type": "array",
  1668. "items": {
  1669. "$ref": "#/components/schemas/FileNode"
  1670. },
  1671. "description": "Files and directories"
  1672. }
  1673. }
  1674. }
  1675. }
  1676. },
  1677. "description": "List files and directories in a specified path.",
  1678. "summary": "List files",
  1679. "x-codeSamples": [
  1680. {
  1681. "lang": "js",
  1682. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1683. }
  1684. ]
  1685. }
  1686. },
  1687. "/file/content": {
  1688. "get": {
  1689. "tags": ["file"],
  1690. "operationId": "file.read",
  1691. "parameters": [
  1692. {
  1693. "name": "directory",
  1694. "in": "query",
  1695. "schema": {
  1696. "type": "string"
  1697. },
  1698. "required": false
  1699. },
  1700. {
  1701. "name": "workspace",
  1702. "in": "query",
  1703. "schema": {
  1704. "type": "string"
  1705. },
  1706. "required": false
  1707. },
  1708. {
  1709. "name": "path",
  1710. "in": "query",
  1711. "schema": {
  1712. "type": "string"
  1713. },
  1714. "required": true
  1715. }
  1716. ],
  1717. "responses": {
  1718. "200": {
  1719. "description": "File content",
  1720. "content": {
  1721. "application/json": {
  1722. "schema": {
  1723. "$ref": "#/components/schemas/FileContent"
  1724. }
  1725. }
  1726. }
  1727. }
  1728. },
  1729. "description": "Read the content of a specified file.",
  1730. "summary": "Read file",
  1731. "x-codeSamples": [
  1732. {
  1733. "lang": "js",
  1734. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1735. }
  1736. ]
  1737. }
  1738. },
  1739. "/file/status": {
  1740. "get": {
  1741. "tags": ["file"],
  1742. "operationId": "file.status",
  1743. "parameters": [
  1744. {
  1745. "name": "directory",
  1746. "in": "query",
  1747. "schema": {
  1748. "type": "string"
  1749. },
  1750. "required": false
  1751. },
  1752. {
  1753. "name": "workspace",
  1754. "in": "query",
  1755. "schema": {
  1756. "type": "string"
  1757. },
  1758. "required": false
  1759. }
  1760. ],
  1761. "responses": {
  1762. "200": {
  1763. "description": "File status",
  1764. "content": {
  1765. "application/json": {
  1766. "schema": {
  1767. "type": "array",
  1768. "items": {
  1769. "$ref": "#/components/schemas/File"
  1770. },
  1771. "description": "File status"
  1772. }
  1773. }
  1774. }
  1775. }
  1776. },
  1777. "description": "Get the git status of all files in the project.",
  1778. "summary": "Get file status",
  1779. "x-codeSamples": [
  1780. {
  1781. "lang": "js",
  1782. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  1783. }
  1784. ]
  1785. }
  1786. },
  1787. "/instance/dispose": {
  1788. "post": {
  1789. "tags": ["instance"],
  1790. "operationId": "instance.dispose",
  1791. "parameters": [
  1792. {
  1793. "name": "directory",
  1794. "in": "query",
  1795. "schema": {
  1796. "type": "string"
  1797. },
  1798. "required": false
  1799. },
  1800. {
  1801. "name": "workspace",
  1802. "in": "query",
  1803. "schema": {
  1804. "type": "string"
  1805. },
  1806. "required": false
  1807. }
  1808. ],
  1809. "responses": {
  1810. "200": {
  1811. "description": "Instance disposed",
  1812. "content": {
  1813. "application/json": {
  1814. "schema": {
  1815. "type": "boolean",
  1816. "description": "Instance disposed"
  1817. }
  1818. }
  1819. }
  1820. }
  1821. },
  1822. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  1823. "summary": "Dispose instance",
  1824. "x-codeSamples": [
  1825. {
  1826. "lang": "js",
  1827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  1828. }
  1829. ]
  1830. }
  1831. },
  1832. "/path": {
  1833. "get": {
  1834. "tags": ["instance"],
  1835. "operationId": "path.get",
  1836. "parameters": [
  1837. {
  1838. "name": "directory",
  1839. "in": "query",
  1840. "schema": {
  1841. "type": "string"
  1842. },
  1843. "required": false
  1844. },
  1845. {
  1846. "name": "workspace",
  1847. "in": "query",
  1848. "schema": {
  1849. "type": "string"
  1850. },
  1851. "required": false
  1852. }
  1853. ],
  1854. "responses": {
  1855. "200": {
  1856. "description": "Path",
  1857. "content": {
  1858. "application/json": {
  1859. "schema": {
  1860. "$ref": "#/components/schemas/Path"
  1861. }
  1862. }
  1863. }
  1864. }
  1865. },
  1866. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  1867. "summary": "Get paths",
  1868. "x-codeSamples": [
  1869. {
  1870. "lang": "js",
  1871. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  1872. }
  1873. ]
  1874. }
  1875. },
  1876. "/vcs": {
  1877. "get": {
  1878. "tags": ["instance"],
  1879. "operationId": "vcs.get",
  1880. "parameters": [
  1881. {
  1882. "name": "directory",
  1883. "in": "query",
  1884. "schema": {
  1885. "type": "string"
  1886. },
  1887. "required": false
  1888. },
  1889. {
  1890. "name": "workspace",
  1891. "in": "query",
  1892. "schema": {
  1893. "type": "string"
  1894. },
  1895. "required": false
  1896. }
  1897. ],
  1898. "responses": {
  1899. "200": {
  1900. "description": "VCS info",
  1901. "content": {
  1902. "application/json": {
  1903. "schema": {
  1904. "$ref": "#/components/schemas/VcsInfo"
  1905. }
  1906. }
  1907. }
  1908. }
  1909. },
  1910. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  1911. "summary": "Get VCS info",
  1912. "x-codeSamples": [
  1913. {
  1914. "lang": "js",
  1915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  1916. }
  1917. ]
  1918. }
  1919. },
  1920. "/vcs/status": {
  1921. "get": {
  1922. "tags": ["instance"],
  1923. "operationId": "vcs.status",
  1924. "parameters": [
  1925. {
  1926. "name": "directory",
  1927. "in": "query",
  1928. "schema": {
  1929. "type": "string"
  1930. },
  1931. "required": false
  1932. },
  1933. {
  1934. "name": "workspace",
  1935. "in": "query",
  1936. "schema": {
  1937. "type": "string"
  1938. },
  1939. "required": false
  1940. }
  1941. ],
  1942. "responses": {
  1943. "200": {
  1944. "description": "VCS status",
  1945. "content": {
  1946. "application/json": {
  1947. "schema": {
  1948. "type": "array",
  1949. "items": {
  1950. "$ref": "#/components/schemas/VcsFileStatus"
  1951. },
  1952. "description": "VCS status"
  1953. }
  1954. }
  1955. }
  1956. }
  1957. },
  1958. "description": "Retrieve changed files in the current working tree without patches.",
  1959. "summary": "Get VCS status",
  1960. "x-codeSamples": [
  1961. {
  1962. "lang": "js",
  1963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  1964. }
  1965. ]
  1966. }
  1967. },
  1968. "/vcs/diff": {
  1969. "get": {
  1970. "tags": ["instance"],
  1971. "operationId": "vcs.diff",
  1972. "parameters": [
  1973. {
  1974. "name": "directory",
  1975. "in": "query",
  1976. "schema": {
  1977. "type": "string"
  1978. },
  1979. "required": false
  1980. },
  1981. {
  1982. "name": "workspace",
  1983. "in": "query",
  1984. "schema": {
  1985. "type": "string"
  1986. },
  1987. "required": false
  1988. },
  1989. {
  1990. "name": "mode",
  1991. "in": "query",
  1992. "schema": {
  1993. "type": "string",
  1994. "enum": ["git", "branch"]
  1995. },
  1996. "required": true
  1997. }
  1998. ],
  1999. "responses": {
  2000. "200": {
  2001. "description": "VCS diff",
  2002. "content": {
  2003. "application/json": {
  2004. "schema": {
  2005. "type": "array",
  2006. "items": {
  2007. "$ref": "#/components/schemas/VcsFileDiff"
  2008. },
  2009. "description": "VCS diff"
  2010. }
  2011. }
  2012. }
  2013. }
  2014. },
  2015. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2016. "summary": "Get VCS diff",
  2017. "x-codeSamples": [
  2018. {
  2019. "lang": "js",
  2020. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2021. }
  2022. ]
  2023. }
  2024. },
  2025. "/vcs/diff/raw": {
  2026. "get": {
  2027. "tags": ["instance"],
  2028. "operationId": "vcs.diff.raw",
  2029. "parameters": [
  2030. {
  2031. "name": "directory",
  2032. "in": "query",
  2033. "schema": {
  2034. "type": "string"
  2035. },
  2036. "required": false
  2037. },
  2038. {
  2039. "name": "workspace",
  2040. "in": "query",
  2041. "schema": {
  2042. "type": "string"
  2043. },
  2044. "required": false
  2045. }
  2046. ],
  2047. "responses": {
  2048. "200": {
  2049. "description": "Raw VCS diff",
  2050. "content": {
  2051. "text/x-diff; charset=utf-8": {
  2052. "schema": {
  2053. "type": "string"
  2054. }
  2055. }
  2056. }
  2057. }
  2058. },
  2059. "description": "Retrieve a raw patch for current uncommitted changes.",
  2060. "summary": "Get raw VCS diff",
  2061. "x-codeSamples": [
  2062. {
  2063. "lang": "js",
  2064. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2065. }
  2066. ]
  2067. }
  2068. },
  2069. "/vcs/apply": {
  2070. "post": {
  2071. "tags": ["instance"],
  2072. "operationId": "vcs.apply",
  2073. "parameters": [
  2074. {
  2075. "name": "directory",
  2076. "in": "query",
  2077. "schema": {
  2078. "type": "string"
  2079. },
  2080. "required": false
  2081. },
  2082. {
  2083. "name": "workspace",
  2084. "in": "query",
  2085. "schema": {
  2086. "type": "string"
  2087. },
  2088. "required": false
  2089. }
  2090. ],
  2091. "responses": {
  2092. "200": {
  2093. "description": "VCS patch applied",
  2094. "content": {
  2095. "application/json": {
  2096. "schema": {
  2097. "type": "object",
  2098. "properties": {
  2099. "applied": {
  2100. "type": "boolean"
  2101. }
  2102. },
  2103. "required": ["applied"],
  2104. "additionalProperties": false,
  2105. "description": "VCS patch applied"
  2106. }
  2107. }
  2108. }
  2109. },
  2110. "400": {
  2111. "description": "VcsApplyError",
  2112. "content": {
  2113. "application/json": {
  2114. "schema": {
  2115. "$ref": "#/components/schemas/VcsApplyError"
  2116. }
  2117. }
  2118. }
  2119. }
  2120. },
  2121. "description": "Apply a raw patch to the current working tree.",
  2122. "summary": "Apply VCS patch",
  2123. "requestBody": {
  2124. "content": {
  2125. "application/json": {
  2126. "schema": {
  2127. "type": "object",
  2128. "properties": {
  2129. "patch": {
  2130. "type": "string"
  2131. }
  2132. },
  2133. "required": ["patch"],
  2134. "additionalProperties": false
  2135. }
  2136. }
  2137. }
  2138. },
  2139. "x-codeSamples": [
  2140. {
  2141. "lang": "js",
  2142. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2143. }
  2144. ]
  2145. }
  2146. },
  2147. "/command": {
  2148. "get": {
  2149. "tags": ["instance"],
  2150. "operationId": "command.list",
  2151. "parameters": [
  2152. {
  2153. "name": "directory",
  2154. "in": "query",
  2155. "schema": {
  2156. "type": "string"
  2157. },
  2158. "required": false
  2159. },
  2160. {
  2161. "name": "workspace",
  2162. "in": "query",
  2163. "schema": {
  2164. "type": "string"
  2165. },
  2166. "required": false
  2167. }
  2168. ],
  2169. "responses": {
  2170. "200": {
  2171. "description": "List of commands",
  2172. "content": {
  2173. "application/json": {
  2174. "schema": {
  2175. "type": "array",
  2176. "items": {
  2177. "$ref": "#/components/schemas/Command"
  2178. },
  2179. "description": "List of commands"
  2180. }
  2181. }
  2182. }
  2183. }
  2184. },
  2185. "description": "Get a list of all available commands in the OpenCode system.",
  2186. "summary": "List commands",
  2187. "x-codeSamples": [
  2188. {
  2189. "lang": "js",
  2190. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2191. }
  2192. ]
  2193. }
  2194. },
  2195. "/agent": {
  2196. "get": {
  2197. "tags": ["instance"],
  2198. "operationId": "app.agents",
  2199. "parameters": [
  2200. {
  2201. "name": "directory",
  2202. "in": "query",
  2203. "schema": {
  2204. "type": "string"
  2205. },
  2206. "required": false
  2207. },
  2208. {
  2209. "name": "workspace",
  2210. "in": "query",
  2211. "schema": {
  2212. "type": "string"
  2213. },
  2214. "required": false
  2215. }
  2216. ],
  2217. "responses": {
  2218. "200": {
  2219. "description": "List of agents",
  2220. "content": {
  2221. "application/json": {
  2222. "schema": {
  2223. "type": "array",
  2224. "items": {
  2225. "$ref": "#/components/schemas/Agent"
  2226. },
  2227. "description": "List of agents"
  2228. }
  2229. }
  2230. }
  2231. }
  2232. },
  2233. "description": "Get a list of all available AI agents in the OpenCode system.",
  2234. "summary": "List agents",
  2235. "x-codeSamples": [
  2236. {
  2237. "lang": "js",
  2238. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2239. }
  2240. ]
  2241. }
  2242. },
  2243. "/skill": {
  2244. "get": {
  2245. "tags": ["instance"],
  2246. "operationId": "app.skills",
  2247. "parameters": [
  2248. {
  2249. "name": "directory",
  2250. "in": "query",
  2251. "schema": {
  2252. "type": "string"
  2253. },
  2254. "required": false
  2255. },
  2256. {
  2257. "name": "workspace",
  2258. "in": "query",
  2259. "schema": {
  2260. "type": "string"
  2261. },
  2262. "required": false
  2263. }
  2264. ],
  2265. "responses": {
  2266. "200": {
  2267. "description": "List of skills",
  2268. "content": {
  2269. "application/json": {
  2270. "schema": {
  2271. "type": "array",
  2272. "items": {
  2273. "type": "object",
  2274. "properties": {
  2275. "name": {
  2276. "type": "string"
  2277. },
  2278. "description": {
  2279. "type": "string"
  2280. },
  2281. "location": {
  2282. "type": "string"
  2283. },
  2284. "content": {
  2285. "type": "string"
  2286. }
  2287. },
  2288. "required": ["name", "location", "content"],
  2289. "additionalProperties": false
  2290. },
  2291. "description": "List of skills"
  2292. }
  2293. }
  2294. }
  2295. }
  2296. },
  2297. "description": "Get a list of all available skills in the OpenCode system.",
  2298. "summary": "List skills",
  2299. "x-codeSamples": [
  2300. {
  2301. "lang": "js",
  2302. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2303. }
  2304. ]
  2305. }
  2306. },
  2307. "/lsp": {
  2308. "get": {
  2309. "tags": ["instance"],
  2310. "operationId": "lsp.status",
  2311. "parameters": [
  2312. {
  2313. "name": "directory",
  2314. "in": "query",
  2315. "schema": {
  2316. "type": "string"
  2317. },
  2318. "required": false
  2319. },
  2320. {
  2321. "name": "workspace",
  2322. "in": "query",
  2323. "schema": {
  2324. "type": "string"
  2325. },
  2326. "required": false
  2327. }
  2328. ],
  2329. "responses": {
  2330. "200": {
  2331. "description": "LSP server status",
  2332. "content": {
  2333. "application/json": {
  2334. "schema": {
  2335. "type": "array",
  2336. "items": {
  2337. "$ref": "#/components/schemas/LSPStatus"
  2338. },
  2339. "description": "LSP server status"
  2340. }
  2341. }
  2342. }
  2343. }
  2344. },
  2345. "description": "Get LSP server status",
  2346. "summary": "Get LSP status",
  2347. "x-codeSamples": [
  2348. {
  2349. "lang": "js",
  2350. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2351. }
  2352. ]
  2353. }
  2354. },
  2355. "/formatter": {
  2356. "get": {
  2357. "tags": ["instance"],
  2358. "operationId": "formatter.status",
  2359. "parameters": [
  2360. {
  2361. "name": "directory",
  2362. "in": "query",
  2363. "schema": {
  2364. "type": "string"
  2365. },
  2366. "required": false
  2367. },
  2368. {
  2369. "name": "workspace",
  2370. "in": "query",
  2371. "schema": {
  2372. "type": "string"
  2373. },
  2374. "required": false
  2375. }
  2376. ],
  2377. "responses": {
  2378. "200": {
  2379. "description": "Formatter status",
  2380. "content": {
  2381. "application/json": {
  2382. "schema": {
  2383. "type": "array",
  2384. "items": {
  2385. "$ref": "#/components/schemas/FormatterStatus"
  2386. },
  2387. "description": "Formatter status"
  2388. }
  2389. }
  2390. }
  2391. }
  2392. },
  2393. "description": "Get formatter status",
  2394. "summary": "Get formatter status",
  2395. "x-codeSamples": [
  2396. {
  2397. "lang": "js",
  2398. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2399. }
  2400. ]
  2401. }
  2402. },
  2403. "/mcp": {
  2404. "get": {
  2405. "tags": ["mcp"],
  2406. "operationId": "mcp.status",
  2407. "parameters": [
  2408. {
  2409. "name": "directory",
  2410. "in": "query",
  2411. "schema": {
  2412. "type": "string"
  2413. },
  2414. "required": false
  2415. },
  2416. {
  2417. "name": "workspace",
  2418. "in": "query",
  2419. "schema": {
  2420. "type": "string"
  2421. },
  2422. "required": false
  2423. }
  2424. ],
  2425. "responses": {
  2426. "200": {
  2427. "description": "MCP server status",
  2428. "content": {
  2429. "application/json": {
  2430. "schema": {
  2431. "type": "object",
  2432. "additionalProperties": {
  2433. "$ref": "#/components/schemas/MCPStatus"
  2434. },
  2435. "description": "MCP server status"
  2436. }
  2437. }
  2438. }
  2439. }
  2440. },
  2441. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2442. "summary": "Get MCP status",
  2443. "x-codeSamples": [
  2444. {
  2445. "lang": "js",
  2446. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2447. }
  2448. ]
  2449. },
  2450. "post": {
  2451. "tags": ["mcp"],
  2452. "operationId": "mcp.add",
  2453. "parameters": [
  2454. {
  2455. "name": "directory",
  2456. "in": "query",
  2457. "schema": {
  2458. "type": "string"
  2459. },
  2460. "required": false
  2461. },
  2462. {
  2463. "name": "workspace",
  2464. "in": "query",
  2465. "schema": {
  2466. "type": "string"
  2467. },
  2468. "required": false
  2469. }
  2470. ],
  2471. "responses": {
  2472. "200": {
  2473. "description": "MCP server added successfully",
  2474. "content": {
  2475. "application/json": {
  2476. "schema": {
  2477. "type": "object",
  2478. "additionalProperties": {
  2479. "$ref": "#/components/schemas/MCPStatus"
  2480. },
  2481. "description": "MCP server added successfully"
  2482. }
  2483. }
  2484. }
  2485. },
  2486. "400": {
  2487. "description": "Bad request",
  2488. "content": {
  2489. "application/json": {
  2490. "schema": {
  2491. "$ref": "#/components/schemas/BadRequestError"
  2492. }
  2493. }
  2494. }
  2495. }
  2496. },
  2497. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2498. "summary": "Add MCP server",
  2499. "requestBody": {
  2500. "content": {
  2501. "application/json": {
  2502. "schema": {
  2503. "type": "object",
  2504. "properties": {
  2505. "name": {
  2506. "type": "string"
  2507. },
  2508. "config": {
  2509. "anyOf": [
  2510. {
  2511. "$ref": "#/components/schemas/McpLocalConfig"
  2512. },
  2513. {
  2514. "$ref": "#/components/schemas/McpRemoteConfig"
  2515. }
  2516. ]
  2517. }
  2518. },
  2519. "required": ["name", "config"],
  2520. "additionalProperties": false
  2521. }
  2522. }
  2523. }
  2524. },
  2525. "x-codeSamples": [
  2526. {
  2527. "lang": "js",
  2528. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2529. }
  2530. ]
  2531. }
  2532. },
  2533. "/mcp/{name}/auth": {
  2534. "post": {
  2535. "tags": ["mcp"],
  2536. "operationId": "mcp.auth.start",
  2537. "parameters": [
  2538. {
  2539. "name": "name",
  2540. "in": "path",
  2541. "schema": {
  2542. "type": "string"
  2543. },
  2544. "required": true
  2545. },
  2546. {
  2547. "name": "directory",
  2548. "in": "query",
  2549. "schema": {
  2550. "type": "string"
  2551. },
  2552. "required": false
  2553. },
  2554. {
  2555. "name": "workspace",
  2556. "in": "query",
  2557. "schema": {
  2558. "type": "string"
  2559. },
  2560. "required": false
  2561. }
  2562. ],
  2563. "responses": {
  2564. "200": {
  2565. "description": "OAuth flow started",
  2566. "content": {
  2567. "application/json": {
  2568. "schema": {
  2569. "type": "object",
  2570. "properties": {
  2571. "authorizationUrl": {
  2572. "type": "string"
  2573. },
  2574. "oauthState": {
  2575. "type": "string"
  2576. }
  2577. },
  2578. "required": ["authorizationUrl", "oauthState"],
  2579. "additionalProperties": false,
  2580. "description": "OAuth flow started"
  2581. }
  2582. }
  2583. }
  2584. },
  2585. "400": {
  2586. "description": "McpUnsupportedOAuthError",
  2587. "content": {
  2588. "application/json": {
  2589. "schema": {
  2590. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2591. }
  2592. }
  2593. }
  2594. },
  2595. "404": {
  2596. "description": "Not found",
  2597. "content": {
  2598. "application/json": {
  2599. "schema": {
  2600. "$ref": "#/components/schemas/NotFoundError"
  2601. }
  2602. }
  2603. }
  2604. }
  2605. },
  2606. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  2607. "summary": "Start MCP OAuth",
  2608. "x-codeSamples": [
  2609. {
  2610. "lang": "js",
  2611. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  2612. }
  2613. ]
  2614. },
  2615. "delete": {
  2616. "tags": ["mcp"],
  2617. "operationId": "mcp.auth.remove",
  2618. "parameters": [
  2619. {
  2620. "name": "name",
  2621. "in": "path",
  2622. "schema": {
  2623. "type": "string"
  2624. },
  2625. "required": true
  2626. },
  2627. {
  2628. "name": "directory",
  2629. "in": "query",
  2630. "schema": {
  2631. "type": "string"
  2632. },
  2633. "required": false
  2634. },
  2635. {
  2636. "name": "workspace",
  2637. "in": "query",
  2638. "schema": {
  2639. "type": "string"
  2640. },
  2641. "required": false
  2642. }
  2643. ],
  2644. "responses": {
  2645. "200": {
  2646. "description": "OAuth credentials removed",
  2647. "content": {
  2648. "application/json": {
  2649. "schema": {
  2650. "type": "object",
  2651. "properties": {
  2652. "success": {
  2653. "type": "boolean",
  2654. "enum": [true]
  2655. }
  2656. },
  2657. "required": ["success"],
  2658. "additionalProperties": false,
  2659. "description": "OAuth credentials removed"
  2660. }
  2661. }
  2662. }
  2663. },
  2664. "404": {
  2665. "description": "Not found",
  2666. "content": {
  2667. "application/json": {
  2668. "schema": {
  2669. "$ref": "#/components/schemas/NotFoundError"
  2670. }
  2671. }
  2672. }
  2673. }
  2674. },
  2675. "description": "Remove OAuth credentials for an MCP server.",
  2676. "summary": "Remove MCP OAuth",
  2677. "x-codeSamples": [
  2678. {
  2679. "lang": "js",
  2680. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  2681. }
  2682. ]
  2683. }
  2684. },
  2685. "/mcp/{name}/auth/callback": {
  2686. "post": {
  2687. "tags": ["mcp"],
  2688. "operationId": "mcp.auth.callback",
  2689. "parameters": [
  2690. {
  2691. "name": "name",
  2692. "in": "path",
  2693. "schema": {
  2694. "type": "string"
  2695. },
  2696. "required": true
  2697. },
  2698. {
  2699. "name": "directory",
  2700. "in": "query",
  2701. "schema": {
  2702. "type": "string"
  2703. },
  2704. "required": false
  2705. },
  2706. {
  2707. "name": "workspace",
  2708. "in": "query",
  2709. "schema": {
  2710. "type": "string"
  2711. },
  2712. "required": false
  2713. }
  2714. ],
  2715. "responses": {
  2716. "200": {
  2717. "description": "OAuth authentication completed",
  2718. "content": {
  2719. "application/json": {
  2720. "schema": {
  2721. "$ref": "#/components/schemas/MCPStatus"
  2722. }
  2723. }
  2724. }
  2725. },
  2726. "400": {
  2727. "description": "Bad request",
  2728. "content": {
  2729. "application/json": {
  2730. "schema": {
  2731. "$ref": "#/components/schemas/BadRequestError"
  2732. }
  2733. }
  2734. }
  2735. },
  2736. "404": {
  2737. "description": "Not found",
  2738. "content": {
  2739. "application/json": {
  2740. "schema": {
  2741. "$ref": "#/components/schemas/NotFoundError"
  2742. }
  2743. }
  2744. }
  2745. }
  2746. },
  2747. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  2748. "summary": "Complete MCP OAuth",
  2749. "requestBody": {
  2750. "content": {
  2751. "application/json": {
  2752. "schema": {
  2753. "type": "object",
  2754. "properties": {
  2755. "code": {
  2756. "type": "string"
  2757. }
  2758. },
  2759. "required": ["code"],
  2760. "additionalProperties": false
  2761. }
  2762. }
  2763. }
  2764. },
  2765. "x-codeSamples": [
  2766. {
  2767. "lang": "js",
  2768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  2769. }
  2770. ]
  2771. }
  2772. },
  2773. "/mcp/{name}/auth/authenticate": {
  2774. "post": {
  2775. "tags": ["mcp"],
  2776. "operationId": "mcp.auth.authenticate",
  2777. "parameters": [
  2778. {
  2779. "name": "name",
  2780. "in": "path",
  2781. "schema": {
  2782. "type": "string"
  2783. },
  2784. "required": true
  2785. },
  2786. {
  2787. "name": "directory",
  2788. "in": "query",
  2789. "schema": {
  2790. "type": "string"
  2791. },
  2792. "required": false
  2793. },
  2794. {
  2795. "name": "workspace",
  2796. "in": "query",
  2797. "schema": {
  2798. "type": "string"
  2799. },
  2800. "required": false
  2801. }
  2802. ],
  2803. "responses": {
  2804. "200": {
  2805. "description": "OAuth authentication completed",
  2806. "content": {
  2807. "application/json": {
  2808. "schema": {
  2809. "$ref": "#/components/schemas/MCPStatus"
  2810. }
  2811. }
  2812. }
  2813. },
  2814. "400": {
  2815. "description": "McpUnsupportedOAuthError",
  2816. "content": {
  2817. "application/json": {
  2818. "schema": {
  2819. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2820. }
  2821. }
  2822. }
  2823. },
  2824. "404": {
  2825. "description": "Not found",
  2826. "content": {
  2827. "application/json": {
  2828. "schema": {
  2829. "$ref": "#/components/schemas/NotFoundError"
  2830. }
  2831. }
  2832. }
  2833. }
  2834. },
  2835. "description": "Start OAuth flow and wait for callback (opens browser).",
  2836. "summary": "Authenticate MCP OAuth",
  2837. "x-codeSamples": [
  2838. {
  2839. "lang": "js",
  2840. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  2841. }
  2842. ]
  2843. }
  2844. },
  2845. "/mcp/{name}/connect": {
  2846. "post": {
  2847. "tags": ["mcp"],
  2848. "operationId": "mcp.connect",
  2849. "parameters": [
  2850. {
  2851. "name": "name",
  2852. "in": "path",
  2853. "schema": {
  2854. "type": "string"
  2855. },
  2856. "required": true
  2857. },
  2858. {
  2859. "name": "directory",
  2860. "in": "query",
  2861. "schema": {
  2862. "type": "string"
  2863. },
  2864. "required": false
  2865. },
  2866. {
  2867. "name": "workspace",
  2868. "in": "query",
  2869. "schema": {
  2870. "type": "string"
  2871. },
  2872. "required": false
  2873. }
  2874. ],
  2875. "responses": {
  2876. "200": {
  2877. "description": "MCP server connected successfully",
  2878. "content": {
  2879. "application/json": {
  2880. "schema": {
  2881. "type": "boolean",
  2882. "description": "MCP server connected successfully"
  2883. }
  2884. }
  2885. }
  2886. }
  2887. },
  2888. "description": "Connect an MCP server.",
  2889. "x-codeSamples": [
  2890. {
  2891. "lang": "js",
  2892. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  2893. }
  2894. ]
  2895. }
  2896. },
  2897. "/mcp/{name}/disconnect": {
  2898. "post": {
  2899. "tags": ["mcp"],
  2900. "operationId": "mcp.disconnect",
  2901. "parameters": [
  2902. {
  2903. "name": "name",
  2904. "in": "path",
  2905. "schema": {
  2906. "type": "string"
  2907. },
  2908. "required": true
  2909. },
  2910. {
  2911. "name": "directory",
  2912. "in": "query",
  2913. "schema": {
  2914. "type": "string"
  2915. },
  2916. "required": false
  2917. },
  2918. {
  2919. "name": "workspace",
  2920. "in": "query",
  2921. "schema": {
  2922. "type": "string"
  2923. },
  2924. "required": false
  2925. }
  2926. ],
  2927. "responses": {
  2928. "200": {
  2929. "description": "MCP server disconnected successfully",
  2930. "content": {
  2931. "application/json": {
  2932. "schema": {
  2933. "type": "boolean",
  2934. "description": "MCP server disconnected successfully"
  2935. }
  2936. }
  2937. }
  2938. }
  2939. },
  2940. "description": "Disconnect an MCP server.",
  2941. "x-codeSamples": [
  2942. {
  2943. "lang": "js",
  2944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  2945. }
  2946. ]
  2947. }
  2948. },
  2949. "/project": {
  2950. "get": {
  2951. "tags": ["project"],
  2952. "operationId": "project.list",
  2953. "parameters": [
  2954. {
  2955. "name": "directory",
  2956. "in": "query",
  2957. "schema": {
  2958. "type": "string"
  2959. },
  2960. "required": false
  2961. },
  2962. {
  2963. "name": "workspace",
  2964. "in": "query",
  2965. "schema": {
  2966. "type": "string"
  2967. },
  2968. "required": false
  2969. }
  2970. ],
  2971. "responses": {
  2972. "200": {
  2973. "description": "List of projects",
  2974. "content": {
  2975. "application/json": {
  2976. "schema": {
  2977. "type": "array",
  2978. "items": {
  2979. "$ref": "#/components/schemas/Project"
  2980. },
  2981. "description": "List of projects"
  2982. }
  2983. }
  2984. }
  2985. }
  2986. },
  2987. "description": "Get a list of projects that have been opened with OpenCode.",
  2988. "summary": "List all projects",
  2989. "x-codeSamples": [
  2990. {
  2991. "lang": "js",
  2992. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  2993. }
  2994. ]
  2995. }
  2996. },
  2997. "/project/current": {
  2998. "get": {
  2999. "tags": ["project"],
  3000. "operationId": "project.current",
  3001. "parameters": [
  3002. {
  3003. "name": "directory",
  3004. "in": "query",
  3005. "schema": {
  3006. "type": "string"
  3007. },
  3008. "required": false
  3009. },
  3010. {
  3011. "name": "workspace",
  3012. "in": "query",
  3013. "schema": {
  3014. "type": "string"
  3015. },
  3016. "required": false
  3017. }
  3018. ],
  3019. "responses": {
  3020. "200": {
  3021. "description": "Current project information",
  3022. "content": {
  3023. "application/json": {
  3024. "schema": {
  3025. "$ref": "#/components/schemas/Project"
  3026. }
  3027. }
  3028. }
  3029. }
  3030. },
  3031. "description": "Retrieve the currently active project that OpenCode is working with.",
  3032. "summary": "Get current project",
  3033. "x-codeSamples": [
  3034. {
  3035. "lang": "js",
  3036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3037. }
  3038. ]
  3039. }
  3040. },
  3041. "/project/git/init": {
  3042. "post": {
  3043. "tags": ["project"],
  3044. "operationId": "project.initGit",
  3045. "parameters": [
  3046. {
  3047. "name": "directory",
  3048. "in": "query",
  3049. "schema": {
  3050. "type": "string"
  3051. },
  3052. "required": false
  3053. },
  3054. {
  3055. "name": "workspace",
  3056. "in": "query",
  3057. "schema": {
  3058. "type": "string"
  3059. },
  3060. "required": false
  3061. }
  3062. ],
  3063. "responses": {
  3064. "200": {
  3065. "description": "Project information after git initialization",
  3066. "content": {
  3067. "application/json": {
  3068. "schema": {
  3069. "$ref": "#/components/schemas/Project"
  3070. }
  3071. }
  3072. }
  3073. }
  3074. },
  3075. "description": "Create a git repository for the current project and return the refreshed project info.",
  3076. "summary": "Initialize git repository",
  3077. "x-codeSamples": [
  3078. {
  3079. "lang": "js",
  3080. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3081. }
  3082. ]
  3083. }
  3084. },
  3085. "/project/{projectID}": {
  3086. "patch": {
  3087. "tags": ["project"],
  3088. "operationId": "project.update",
  3089. "parameters": [
  3090. {
  3091. "name": "projectID",
  3092. "in": "path",
  3093. "schema": {
  3094. "type": "string"
  3095. },
  3096. "required": true
  3097. },
  3098. {
  3099. "name": "directory",
  3100. "in": "query",
  3101. "schema": {
  3102. "type": "string"
  3103. },
  3104. "required": false
  3105. },
  3106. {
  3107. "name": "workspace",
  3108. "in": "query",
  3109. "schema": {
  3110. "type": "string"
  3111. },
  3112. "required": false
  3113. }
  3114. ],
  3115. "responses": {
  3116. "200": {
  3117. "description": "Updated project information",
  3118. "content": {
  3119. "application/json": {
  3120. "schema": {
  3121. "$ref": "#/components/schemas/Project"
  3122. }
  3123. }
  3124. }
  3125. },
  3126. "400": {
  3127. "description": "Bad request",
  3128. "content": {
  3129. "application/json": {
  3130. "schema": {
  3131. "$ref": "#/components/schemas/BadRequestError"
  3132. }
  3133. }
  3134. }
  3135. },
  3136. "404": {
  3137. "description": "Not found",
  3138. "content": {
  3139. "application/json": {
  3140. "schema": {
  3141. "$ref": "#/components/schemas/NotFoundError"
  3142. }
  3143. }
  3144. }
  3145. }
  3146. },
  3147. "description": "Update project properties such as name, icon, and commands.",
  3148. "summary": "Update project",
  3149. "requestBody": {
  3150. "content": {
  3151. "application/json": {
  3152. "schema": {
  3153. "type": "object",
  3154. "properties": {
  3155. "name": {
  3156. "type": "string"
  3157. },
  3158. "icon": {
  3159. "type": "object",
  3160. "properties": {
  3161. "url": {
  3162. "type": "string"
  3163. },
  3164. "override": {
  3165. "type": "string"
  3166. },
  3167. "color": {
  3168. "type": "string"
  3169. }
  3170. },
  3171. "additionalProperties": false
  3172. },
  3173. "commands": {
  3174. "type": "object",
  3175. "properties": {
  3176. "start": {
  3177. "type": "string",
  3178. "description": "Startup script to run when creating a new workspace (worktree)"
  3179. }
  3180. },
  3181. "additionalProperties": false
  3182. }
  3183. },
  3184. "additionalProperties": false
  3185. }
  3186. }
  3187. }
  3188. },
  3189. "x-codeSamples": [
  3190. {
  3191. "lang": "js",
  3192. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3193. }
  3194. ]
  3195. }
  3196. },
  3197. "/pty/shells": {
  3198. "get": {
  3199. "tags": ["pty"],
  3200. "operationId": "pty.shells",
  3201. "parameters": [
  3202. {
  3203. "name": "directory",
  3204. "in": "query",
  3205. "schema": {
  3206. "type": "string"
  3207. },
  3208. "required": false
  3209. },
  3210. {
  3211. "name": "workspace",
  3212. "in": "query",
  3213. "schema": {
  3214. "type": "string"
  3215. },
  3216. "required": false
  3217. }
  3218. ],
  3219. "responses": {
  3220. "200": {
  3221. "description": "List of shells",
  3222. "content": {
  3223. "application/json": {
  3224. "schema": {
  3225. "type": "array",
  3226. "items": {
  3227. "type": "object",
  3228. "properties": {
  3229. "path": {
  3230. "type": "string"
  3231. },
  3232. "name": {
  3233. "type": "string"
  3234. },
  3235. "acceptable": {
  3236. "type": "boolean"
  3237. }
  3238. },
  3239. "required": ["path", "name", "acceptable"],
  3240. "additionalProperties": false
  3241. },
  3242. "description": "List of shells"
  3243. }
  3244. }
  3245. }
  3246. }
  3247. },
  3248. "description": "Get a list of available shells on the system.",
  3249. "summary": "List available shells",
  3250. "x-codeSamples": [
  3251. {
  3252. "lang": "js",
  3253. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3254. }
  3255. ]
  3256. }
  3257. },
  3258. "/pty": {
  3259. "get": {
  3260. "tags": ["pty"],
  3261. "operationId": "pty.list",
  3262. "parameters": [
  3263. {
  3264. "name": "directory",
  3265. "in": "query",
  3266. "schema": {
  3267. "type": "string"
  3268. },
  3269. "required": false
  3270. },
  3271. {
  3272. "name": "workspace",
  3273. "in": "query",
  3274. "schema": {
  3275. "type": "string"
  3276. },
  3277. "required": false
  3278. }
  3279. ],
  3280. "responses": {
  3281. "200": {
  3282. "description": "List of sessions",
  3283. "content": {
  3284. "application/json": {
  3285. "schema": {
  3286. "type": "array",
  3287. "items": {
  3288. "$ref": "#/components/schemas/Pty"
  3289. },
  3290. "description": "List of sessions"
  3291. }
  3292. }
  3293. }
  3294. }
  3295. },
  3296. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3297. "summary": "List PTY sessions",
  3298. "x-codeSamples": [
  3299. {
  3300. "lang": "js",
  3301. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3302. }
  3303. ]
  3304. },
  3305. "post": {
  3306. "tags": ["pty"],
  3307. "operationId": "pty.create",
  3308. "parameters": [
  3309. {
  3310. "name": "directory",
  3311. "in": "query",
  3312. "schema": {
  3313. "type": "string"
  3314. },
  3315. "required": false
  3316. },
  3317. {
  3318. "name": "workspace",
  3319. "in": "query",
  3320. "schema": {
  3321. "type": "string"
  3322. },
  3323. "required": false
  3324. }
  3325. ],
  3326. "responses": {
  3327. "200": {
  3328. "description": "Created session",
  3329. "content": {
  3330. "application/json": {
  3331. "schema": {
  3332. "$ref": "#/components/schemas/Pty"
  3333. }
  3334. }
  3335. }
  3336. },
  3337. "400": {
  3338. "description": "Bad request",
  3339. "content": {
  3340. "application/json": {
  3341. "schema": {
  3342. "$ref": "#/components/schemas/BadRequestError"
  3343. }
  3344. }
  3345. }
  3346. }
  3347. },
  3348. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3349. "summary": "Create PTY session",
  3350. "requestBody": {
  3351. "content": {
  3352. "application/json": {
  3353. "schema": {
  3354. "type": "object",
  3355. "properties": {
  3356. "command": {
  3357. "type": "string"
  3358. },
  3359. "args": {
  3360. "type": "array",
  3361. "items": {
  3362. "type": "string"
  3363. }
  3364. },
  3365. "cwd": {
  3366. "type": "string"
  3367. },
  3368. "title": {
  3369. "type": "string"
  3370. },
  3371. "env": {
  3372. "type": "object",
  3373. "additionalProperties": {
  3374. "type": "string"
  3375. }
  3376. }
  3377. },
  3378. "additionalProperties": false
  3379. }
  3380. }
  3381. }
  3382. },
  3383. "x-codeSamples": [
  3384. {
  3385. "lang": "js",
  3386. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3387. }
  3388. ]
  3389. }
  3390. },
  3391. "/pty/{ptyID}": {
  3392. "get": {
  3393. "tags": ["pty"],
  3394. "operationId": "pty.get",
  3395. "parameters": [
  3396. {
  3397. "name": "ptyID",
  3398. "in": "path",
  3399. "schema": {
  3400. "type": "string",
  3401. "pattern": "^pty"
  3402. },
  3403. "required": true
  3404. },
  3405. {
  3406. "name": "directory",
  3407. "in": "query",
  3408. "schema": {
  3409. "type": "string"
  3410. },
  3411. "required": false
  3412. },
  3413. {
  3414. "name": "workspace",
  3415. "in": "query",
  3416. "schema": {
  3417. "type": "string"
  3418. },
  3419. "required": false
  3420. }
  3421. ],
  3422. "responses": {
  3423. "200": {
  3424. "description": "Session info",
  3425. "content": {
  3426. "application/json": {
  3427. "schema": {
  3428. "$ref": "#/components/schemas/Pty"
  3429. }
  3430. }
  3431. }
  3432. },
  3433. "404": {
  3434. "description": "NotFoundError",
  3435. "content": {
  3436. "application/json": {
  3437. "schema": {
  3438. "$ref": "#/components/schemas/NotFoundError"
  3439. }
  3440. }
  3441. }
  3442. }
  3443. },
  3444. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3445. "summary": "Get PTY session",
  3446. "x-codeSamples": [
  3447. {
  3448. "lang": "js",
  3449. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3450. }
  3451. ]
  3452. },
  3453. "put": {
  3454. "tags": ["pty"],
  3455. "operationId": "pty.update",
  3456. "parameters": [
  3457. {
  3458. "name": "ptyID",
  3459. "in": "path",
  3460. "schema": {
  3461. "type": "string",
  3462. "pattern": "^pty"
  3463. },
  3464. "required": true
  3465. },
  3466. {
  3467. "name": "directory",
  3468. "in": "query",
  3469. "schema": {
  3470. "type": "string"
  3471. },
  3472. "required": false
  3473. },
  3474. {
  3475. "name": "workspace",
  3476. "in": "query",
  3477. "schema": {
  3478. "type": "string"
  3479. },
  3480. "required": false
  3481. }
  3482. ],
  3483. "responses": {
  3484. "200": {
  3485. "description": "Updated session",
  3486. "content": {
  3487. "application/json": {
  3488. "schema": {
  3489. "$ref": "#/components/schemas/Pty"
  3490. }
  3491. }
  3492. }
  3493. },
  3494. "400": {
  3495. "description": "Bad request",
  3496. "content": {
  3497. "application/json": {
  3498. "schema": {
  3499. "$ref": "#/components/schemas/BadRequestError"
  3500. }
  3501. }
  3502. }
  3503. }
  3504. },
  3505. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  3506. "summary": "Update PTY session",
  3507. "requestBody": {
  3508. "content": {
  3509. "application/json": {
  3510. "schema": {
  3511. "type": "object",
  3512. "properties": {
  3513. "title": {
  3514. "type": "string"
  3515. },
  3516. "size": {
  3517. "type": "object",
  3518. "properties": {
  3519. "rows": {
  3520. "type": "integer",
  3521. "exclusiveMinimum": 0
  3522. },
  3523. "cols": {
  3524. "type": "integer",
  3525. "exclusiveMinimum": 0
  3526. }
  3527. },
  3528. "required": ["rows", "cols"],
  3529. "additionalProperties": false
  3530. }
  3531. },
  3532. "additionalProperties": false
  3533. }
  3534. }
  3535. }
  3536. },
  3537. "x-codeSamples": [
  3538. {
  3539. "lang": "js",
  3540. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  3541. }
  3542. ]
  3543. },
  3544. "delete": {
  3545. "tags": ["pty"],
  3546. "operationId": "pty.remove",
  3547. "parameters": [
  3548. {
  3549. "name": "ptyID",
  3550. "in": "path",
  3551. "schema": {
  3552. "type": "string",
  3553. "pattern": "^pty"
  3554. },
  3555. "required": true
  3556. },
  3557. {
  3558. "name": "directory",
  3559. "in": "query",
  3560. "schema": {
  3561. "type": "string"
  3562. },
  3563. "required": false
  3564. },
  3565. {
  3566. "name": "workspace",
  3567. "in": "query",
  3568. "schema": {
  3569. "type": "string"
  3570. },
  3571. "required": false
  3572. }
  3573. ],
  3574. "responses": {
  3575. "200": {
  3576. "description": "Session removed",
  3577. "content": {
  3578. "application/json": {
  3579. "schema": {
  3580. "type": "boolean",
  3581. "description": "Session removed"
  3582. }
  3583. }
  3584. }
  3585. },
  3586. "404": {
  3587. "description": "NotFoundError",
  3588. "content": {
  3589. "application/json": {
  3590. "schema": {
  3591. "$ref": "#/components/schemas/NotFoundError"
  3592. }
  3593. }
  3594. }
  3595. }
  3596. },
  3597. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  3598. "summary": "Remove PTY session",
  3599. "x-codeSamples": [
  3600. {
  3601. "lang": "js",
  3602. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  3603. }
  3604. ]
  3605. }
  3606. },
  3607. "/pty/{ptyID}/connect-token": {
  3608. "post": {
  3609. "tags": ["pty"],
  3610. "operationId": "pty.connectToken",
  3611. "parameters": [
  3612. {
  3613. "name": "ptyID",
  3614. "in": "path",
  3615. "schema": {
  3616. "type": "string",
  3617. "pattern": "^pty"
  3618. },
  3619. "required": true
  3620. },
  3621. {
  3622. "name": "directory",
  3623. "in": "query",
  3624. "schema": {
  3625. "type": "string"
  3626. },
  3627. "required": false
  3628. },
  3629. {
  3630. "name": "workspace",
  3631. "in": "query",
  3632. "schema": {
  3633. "type": "string"
  3634. },
  3635. "required": false
  3636. }
  3637. ],
  3638. "responses": {
  3639. "200": {
  3640. "description": "WebSocket connect token",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "type": "object",
  3645. "properties": {
  3646. "ticket": {
  3647. "type": "string"
  3648. },
  3649. "expires_in": {
  3650. "type": "integer",
  3651. "exclusiveMinimum": 0
  3652. }
  3653. },
  3654. "required": ["ticket", "expires_in"],
  3655. "additionalProperties": false,
  3656. "description": "WebSocket connect token"
  3657. }
  3658. }
  3659. }
  3660. },
  3661. "403": {
  3662. "description": "Forbidden",
  3663. "content": {
  3664. "application/json": {
  3665. "schema": {
  3666. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  3667. }
  3668. }
  3669. }
  3670. },
  3671. "404": {
  3672. "description": "NotFoundError",
  3673. "content": {
  3674. "application/json": {
  3675. "schema": {
  3676. "$ref": "#/components/schemas/NotFoundError"
  3677. }
  3678. }
  3679. }
  3680. }
  3681. },
  3682. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  3683. "summary": "Create PTY WebSocket token",
  3684. "x-codeSamples": [
  3685. {
  3686. "lang": "js",
  3687. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  3688. }
  3689. ]
  3690. }
  3691. },
  3692. "/question": {
  3693. "get": {
  3694. "tags": ["question"],
  3695. "operationId": "question.list",
  3696. "parameters": [
  3697. {
  3698. "name": "directory",
  3699. "in": "query",
  3700. "schema": {
  3701. "type": "string"
  3702. },
  3703. "required": false
  3704. },
  3705. {
  3706. "name": "workspace",
  3707. "in": "query",
  3708. "schema": {
  3709. "type": "string"
  3710. },
  3711. "required": false
  3712. }
  3713. ],
  3714. "responses": {
  3715. "200": {
  3716. "description": "List of pending questions",
  3717. "content": {
  3718. "application/json": {
  3719. "schema": {
  3720. "type": "array",
  3721. "items": {
  3722. "$ref": "#/components/schemas/QuestionRequest"
  3723. },
  3724. "description": "List of pending questions"
  3725. }
  3726. }
  3727. }
  3728. }
  3729. },
  3730. "description": "Get all pending question requests across all sessions.",
  3731. "summary": "List pending questions",
  3732. "x-codeSamples": [
  3733. {
  3734. "lang": "js",
  3735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  3736. }
  3737. ]
  3738. }
  3739. },
  3740. "/question/{requestID}/reply": {
  3741. "post": {
  3742. "tags": ["question"],
  3743. "operationId": "question.reply",
  3744. "parameters": [
  3745. {
  3746. "name": "requestID",
  3747. "in": "path",
  3748. "schema": {
  3749. "type": "string",
  3750. "pattern": "^que"
  3751. },
  3752. "required": true
  3753. },
  3754. {
  3755. "name": "directory",
  3756. "in": "query",
  3757. "schema": {
  3758. "type": "string"
  3759. },
  3760. "required": false
  3761. },
  3762. {
  3763. "name": "workspace",
  3764. "in": "query",
  3765. "schema": {
  3766. "type": "string"
  3767. },
  3768. "required": false
  3769. }
  3770. ],
  3771. "responses": {
  3772. "200": {
  3773. "description": "Question answered successfully",
  3774. "content": {
  3775. "application/json": {
  3776. "schema": {
  3777. "type": "boolean",
  3778. "description": "Question answered successfully"
  3779. }
  3780. }
  3781. }
  3782. },
  3783. "400": {
  3784. "description": "Bad request",
  3785. "content": {
  3786. "application/json": {
  3787. "schema": {
  3788. "$ref": "#/components/schemas/BadRequestError"
  3789. }
  3790. }
  3791. }
  3792. },
  3793. "404": {
  3794. "description": "Not found",
  3795. "content": {
  3796. "application/json": {
  3797. "schema": {
  3798. "$ref": "#/components/schemas/NotFoundError"
  3799. }
  3800. }
  3801. }
  3802. }
  3803. },
  3804. "description": "Provide answers to a question request from the AI assistant.",
  3805. "summary": "Reply to question request",
  3806. "requestBody": {
  3807. "content": {
  3808. "application/json": {
  3809. "schema": {
  3810. "type": "object",
  3811. "properties": {
  3812. "answers": {
  3813. "type": "array",
  3814. "items": {
  3815. "$ref": "#/components/schemas/QuestionAnswer"
  3816. },
  3817. "description": "User answers in order of questions (each answer is an array of selected labels)"
  3818. }
  3819. },
  3820. "required": ["answers"],
  3821. "additionalProperties": false
  3822. }
  3823. }
  3824. }
  3825. },
  3826. "x-codeSamples": [
  3827. {
  3828. "lang": "js",
  3829. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  3830. }
  3831. ]
  3832. }
  3833. },
  3834. "/question/{requestID}/reject": {
  3835. "post": {
  3836. "tags": ["question"],
  3837. "operationId": "question.reject",
  3838. "parameters": [
  3839. {
  3840. "name": "requestID",
  3841. "in": "path",
  3842. "schema": {
  3843. "type": "string",
  3844. "pattern": "^que"
  3845. },
  3846. "required": true
  3847. },
  3848. {
  3849. "name": "directory",
  3850. "in": "query",
  3851. "schema": {
  3852. "type": "string"
  3853. },
  3854. "required": false
  3855. },
  3856. {
  3857. "name": "workspace",
  3858. "in": "query",
  3859. "schema": {
  3860. "type": "string"
  3861. },
  3862. "required": false
  3863. }
  3864. ],
  3865. "responses": {
  3866. "200": {
  3867. "description": "Question rejected successfully",
  3868. "content": {
  3869. "application/json": {
  3870. "schema": {
  3871. "type": "boolean",
  3872. "description": "Question rejected successfully"
  3873. }
  3874. }
  3875. }
  3876. },
  3877. "400": {
  3878. "description": "Bad request",
  3879. "content": {
  3880. "application/json": {
  3881. "schema": {
  3882. "$ref": "#/components/schemas/BadRequestError"
  3883. }
  3884. }
  3885. }
  3886. },
  3887. "404": {
  3888. "description": "Not found",
  3889. "content": {
  3890. "application/json": {
  3891. "schema": {
  3892. "$ref": "#/components/schemas/NotFoundError"
  3893. }
  3894. }
  3895. }
  3896. }
  3897. },
  3898. "description": "Reject a question request from the AI assistant.",
  3899. "summary": "Reject question request",
  3900. "x-codeSamples": [
  3901. {
  3902. "lang": "js",
  3903. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  3904. }
  3905. ]
  3906. }
  3907. },
  3908. "/permission": {
  3909. "get": {
  3910. "tags": ["permission"],
  3911. "operationId": "permission.list",
  3912. "parameters": [
  3913. {
  3914. "name": "directory",
  3915. "in": "query",
  3916. "schema": {
  3917. "type": "string"
  3918. },
  3919. "required": false
  3920. },
  3921. {
  3922. "name": "workspace",
  3923. "in": "query",
  3924. "schema": {
  3925. "type": "string"
  3926. },
  3927. "required": false
  3928. }
  3929. ],
  3930. "responses": {
  3931. "200": {
  3932. "description": "List of pending permissions",
  3933. "content": {
  3934. "application/json": {
  3935. "schema": {
  3936. "type": "array",
  3937. "items": {
  3938. "$ref": "#/components/schemas/PermissionRequest"
  3939. },
  3940. "description": "List of pending permissions"
  3941. }
  3942. }
  3943. }
  3944. }
  3945. },
  3946. "description": "Get all pending permission requests across all sessions.",
  3947. "summary": "List pending permissions",
  3948. "x-codeSamples": [
  3949. {
  3950. "lang": "js",
  3951. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  3952. }
  3953. ]
  3954. }
  3955. },
  3956. "/permission/{requestID}/reply": {
  3957. "post": {
  3958. "tags": ["permission"],
  3959. "operationId": "permission.reply",
  3960. "parameters": [
  3961. {
  3962. "name": "requestID",
  3963. "in": "path",
  3964. "schema": {
  3965. "type": "string",
  3966. "pattern": "^per"
  3967. },
  3968. "required": true
  3969. },
  3970. {
  3971. "name": "directory",
  3972. "in": "query",
  3973. "schema": {
  3974. "type": "string"
  3975. },
  3976. "required": false
  3977. },
  3978. {
  3979. "name": "workspace",
  3980. "in": "query",
  3981. "schema": {
  3982. "type": "string"
  3983. },
  3984. "required": false
  3985. }
  3986. ],
  3987. "responses": {
  3988. "200": {
  3989. "description": "Permission processed successfully",
  3990. "content": {
  3991. "application/json": {
  3992. "schema": {
  3993. "type": "boolean",
  3994. "description": "Permission processed successfully"
  3995. }
  3996. }
  3997. }
  3998. },
  3999. "400": {
  4000. "description": "Bad request",
  4001. "content": {
  4002. "application/json": {
  4003. "schema": {
  4004. "$ref": "#/components/schemas/BadRequestError"
  4005. }
  4006. }
  4007. }
  4008. },
  4009. "404": {
  4010. "description": "Not found",
  4011. "content": {
  4012. "application/json": {
  4013. "schema": {
  4014. "$ref": "#/components/schemas/NotFoundError"
  4015. }
  4016. }
  4017. }
  4018. }
  4019. },
  4020. "description": "Approve or deny a permission request from the AI assistant.",
  4021. "summary": "Respond to permission request",
  4022. "requestBody": {
  4023. "content": {
  4024. "application/json": {
  4025. "schema": {
  4026. "type": "object",
  4027. "properties": {
  4028. "reply": {
  4029. "type": "string",
  4030. "enum": ["once", "always", "reject"]
  4031. },
  4032. "message": {
  4033. "type": "string"
  4034. }
  4035. },
  4036. "required": ["reply"],
  4037. "additionalProperties": false
  4038. }
  4039. }
  4040. }
  4041. },
  4042. "x-codeSamples": [
  4043. {
  4044. "lang": "js",
  4045. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4046. }
  4047. ]
  4048. }
  4049. },
  4050. "/provider": {
  4051. "get": {
  4052. "tags": ["provider"],
  4053. "operationId": "provider.list",
  4054. "parameters": [
  4055. {
  4056. "name": "directory",
  4057. "in": "query",
  4058. "schema": {
  4059. "type": "string"
  4060. },
  4061. "required": false
  4062. },
  4063. {
  4064. "name": "workspace",
  4065. "in": "query",
  4066. "schema": {
  4067. "type": "string"
  4068. },
  4069. "required": false
  4070. }
  4071. ],
  4072. "responses": {
  4073. "200": {
  4074. "description": "List of providers",
  4075. "content": {
  4076. "application/json": {
  4077. "schema": {
  4078. "type": "object",
  4079. "properties": {
  4080. "all": {
  4081. "type": "array",
  4082. "items": {
  4083. "$ref": "#/components/schemas/Provider"
  4084. }
  4085. },
  4086. "default": {
  4087. "type": "object",
  4088. "additionalProperties": {
  4089. "type": "string"
  4090. }
  4091. },
  4092. "connected": {
  4093. "type": "array",
  4094. "items": {
  4095. "type": "string"
  4096. }
  4097. }
  4098. },
  4099. "required": ["all", "default", "connected"],
  4100. "additionalProperties": false,
  4101. "description": "List of providers"
  4102. }
  4103. }
  4104. }
  4105. }
  4106. },
  4107. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4108. "summary": "List providers",
  4109. "x-codeSamples": [
  4110. {
  4111. "lang": "js",
  4112. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4113. }
  4114. ]
  4115. }
  4116. },
  4117. "/provider/auth": {
  4118. "get": {
  4119. "tags": ["provider"],
  4120. "operationId": "provider.auth",
  4121. "parameters": [
  4122. {
  4123. "name": "directory",
  4124. "in": "query",
  4125. "schema": {
  4126. "type": "string"
  4127. },
  4128. "required": false
  4129. },
  4130. {
  4131. "name": "workspace",
  4132. "in": "query",
  4133. "schema": {
  4134. "type": "string"
  4135. },
  4136. "required": false
  4137. }
  4138. ],
  4139. "responses": {
  4140. "200": {
  4141. "description": "Provider auth methods",
  4142. "content": {
  4143. "application/json": {
  4144. "schema": {
  4145. "type": "object",
  4146. "additionalProperties": {
  4147. "type": "array",
  4148. "items": {
  4149. "$ref": "#/components/schemas/ProviderAuthMethod"
  4150. }
  4151. },
  4152. "description": "Provider auth methods"
  4153. }
  4154. }
  4155. }
  4156. }
  4157. },
  4158. "description": "Retrieve available authentication methods for all AI providers.",
  4159. "summary": "Get provider auth methods",
  4160. "x-codeSamples": [
  4161. {
  4162. "lang": "js",
  4163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4164. }
  4165. ]
  4166. }
  4167. },
  4168. "/provider/{providerID}/oauth/authorize": {
  4169. "post": {
  4170. "tags": ["provider"],
  4171. "operationId": "provider.oauth.authorize",
  4172. "parameters": [
  4173. {
  4174. "name": "providerID",
  4175. "in": "path",
  4176. "schema": {
  4177. "type": "string"
  4178. },
  4179. "required": true
  4180. },
  4181. {
  4182. "name": "directory",
  4183. "in": "query",
  4184. "schema": {
  4185. "type": "string"
  4186. },
  4187. "required": false
  4188. },
  4189. {
  4190. "name": "workspace",
  4191. "in": "query",
  4192. "schema": {
  4193. "type": "string"
  4194. },
  4195. "required": false
  4196. }
  4197. ],
  4198. "responses": {
  4199. "200": {
  4200. "description": "Authorization URL and method",
  4201. "content": {
  4202. "application/json": {
  4203. "schema": {
  4204. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4205. }
  4206. }
  4207. }
  4208. },
  4209. "400": {
  4210. "description": "Bad request",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "$ref": "#/components/schemas/BadRequestError"
  4215. }
  4216. }
  4217. }
  4218. }
  4219. },
  4220. "description": "Start the OAuth authorization flow for a provider.",
  4221. "summary": "Start OAuth authorization",
  4222. "requestBody": {
  4223. "content": {
  4224. "application/json": {
  4225. "schema": {
  4226. "type": "object",
  4227. "properties": {
  4228. "method": {
  4229. "type": "number",
  4230. "description": "Auth method index"
  4231. },
  4232. "inputs": {
  4233. "type": "object",
  4234. "additionalProperties": {
  4235. "type": "string"
  4236. }
  4237. }
  4238. },
  4239. "required": ["method"],
  4240. "additionalProperties": false
  4241. }
  4242. }
  4243. }
  4244. },
  4245. "x-codeSamples": [
  4246. {
  4247. "lang": "js",
  4248. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4249. }
  4250. ]
  4251. }
  4252. },
  4253. "/provider/{providerID}/oauth/callback": {
  4254. "post": {
  4255. "tags": ["provider"],
  4256. "operationId": "provider.oauth.callback",
  4257. "parameters": [
  4258. {
  4259. "name": "providerID",
  4260. "in": "path",
  4261. "schema": {
  4262. "type": "string"
  4263. },
  4264. "required": true
  4265. },
  4266. {
  4267. "name": "directory",
  4268. "in": "query",
  4269. "schema": {
  4270. "type": "string"
  4271. },
  4272. "required": false
  4273. },
  4274. {
  4275. "name": "workspace",
  4276. "in": "query",
  4277. "schema": {
  4278. "type": "string"
  4279. },
  4280. "required": false
  4281. }
  4282. ],
  4283. "responses": {
  4284. "200": {
  4285. "description": "OAuth callback processed successfully",
  4286. "content": {
  4287. "application/json": {
  4288. "schema": {
  4289. "type": "boolean",
  4290. "description": "OAuth callback processed successfully"
  4291. }
  4292. }
  4293. }
  4294. },
  4295. "400": {
  4296. "description": "Bad request",
  4297. "content": {
  4298. "application/json": {
  4299. "schema": {
  4300. "$ref": "#/components/schemas/BadRequestError"
  4301. }
  4302. }
  4303. }
  4304. }
  4305. },
  4306. "description": "Handle the OAuth callback from a provider after user authorization.",
  4307. "summary": "Handle OAuth callback",
  4308. "requestBody": {
  4309. "content": {
  4310. "application/json": {
  4311. "schema": {
  4312. "type": "object",
  4313. "properties": {
  4314. "method": {
  4315. "type": "number",
  4316. "description": "Auth method index"
  4317. },
  4318. "code": {
  4319. "type": "string"
  4320. }
  4321. },
  4322. "required": ["method"],
  4323. "additionalProperties": false
  4324. }
  4325. }
  4326. }
  4327. },
  4328. "x-codeSamples": [
  4329. {
  4330. "lang": "js",
  4331. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4332. }
  4333. ]
  4334. }
  4335. },
  4336. "/session": {
  4337. "get": {
  4338. "tags": ["session"],
  4339. "operationId": "session.list",
  4340. "parameters": [
  4341. {
  4342. "name": "directory",
  4343. "in": "query",
  4344. "schema": {
  4345. "type": "string"
  4346. },
  4347. "required": false
  4348. },
  4349. {
  4350. "name": "workspace",
  4351. "in": "query",
  4352. "schema": {
  4353. "type": "string"
  4354. },
  4355. "required": false
  4356. },
  4357. {
  4358. "name": "scope",
  4359. "in": "query",
  4360. "schema": {
  4361. "type": "string",
  4362. "enum": ["project"]
  4363. },
  4364. "required": false
  4365. },
  4366. {
  4367. "name": "path",
  4368. "in": "query",
  4369. "schema": {
  4370. "type": "string"
  4371. },
  4372. "required": false
  4373. },
  4374. {
  4375. "name": "roots",
  4376. "in": "query",
  4377. "schema": {
  4378. "anyOf": [
  4379. {
  4380. "type": "boolean"
  4381. },
  4382. {
  4383. "type": "string",
  4384. "enum": ["true", "false"]
  4385. }
  4386. ]
  4387. },
  4388. "required": false
  4389. },
  4390. {
  4391. "name": "start",
  4392. "in": "query",
  4393. "schema": {
  4394. "type": "number"
  4395. },
  4396. "required": false
  4397. },
  4398. {
  4399. "name": "search",
  4400. "in": "query",
  4401. "schema": {
  4402. "type": "string"
  4403. },
  4404. "required": false
  4405. },
  4406. {
  4407. "name": "limit",
  4408. "in": "query",
  4409. "schema": {
  4410. "type": "number"
  4411. },
  4412. "required": false
  4413. }
  4414. ],
  4415. "responses": {
  4416. "200": {
  4417. "description": "List of sessions",
  4418. "content": {
  4419. "application/json": {
  4420. "schema": {
  4421. "type": "array",
  4422. "items": {
  4423. "$ref": "#/components/schemas/Session"
  4424. },
  4425. "description": "List of sessions"
  4426. }
  4427. }
  4428. }
  4429. }
  4430. },
  4431. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  4432. "summary": "List sessions",
  4433. "x-codeSamples": [
  4434. {
  4435. "lang": "js",
  4436. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  4437. }
  4438. ]
  4439. },
  4440. "post": {
  4441. "tags": ["session"],
  4442. "operationId": "session.create",
  4443. "parameters": [
  4444. {
  4445. "name": "directory",
  4446. "in": "query",
  4447. "schema": {
  4448. "type": "string"
  4449. },
  4450. "required": false
  4451. },
  4452. {
  4453. "name": "workspace",
  4454. "in": "query",
  4455. "schema": {
  4456. "type": "string"
  4457. },
  4458. "required": false
  4459. }
  4460. ],
  4461. "responses": {
  4462. "200": {
  4463. "description": "Successfully created session",
  4464. "content": {
  4465. "application/json": {
  4466. "schema": {
  4467. "$ref": "#/components/schemas/Session"
  4468. }
  4469. }
  4470. }
  4471. },
  4472. "400": {
  4473. "description": "Bad request",
  4474. "content": {
  4475. "application/json": {
  4476. "schema": {
  4477. "$ref": "#/components/schemas/BadRequestError"
  4478. }
  4479. }
  4480. }
  4481. }
  4482. },
  4483. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  4484. "summary": "Create session",
  4485. "requestBody": {
  4486. "content": {
  4487. "application/json": {
  4488. "schema": {
  4489. "type": "object",
  4490. "properties": {
  4491. "parentID": {
  4492. "type": "string",
  4493. "pattern": "^ses"
  4494. },
  4495. "title": {
  4496. "type": "string"
  4497. },
  4498. "agent": {
  4499. "type": "string"
  4500. },
  4501. "model": {
  4502. "type": "object",
  4503. "properties": {
  4504. "id": {
  4505. "type": "string"
  4506. },
  4507. "providerID": {
  4508. "type": "string"
  4509. },
  4510. "variant": {
  4511. "type": "string"
  4512. }
  4513. },
  4514. "required": ["id", "providerID"],
  4515. "additionalProperties": false
  4516. },
  4517. "permission": {
  4518. "$ref": "#/components/schemas/PermissionRuleset"
  4519. },
  4520. "workspaceID": {
  4521. "type": "string",
  4522. "pattern": "^wrk"
  4523. }
  4524. },
  4525. "additionalProperties": false
  4526. }
  4527. }
  4528. }
  4529. },
  4530. "x-codeSamples": [
  4531. {
  4532. "lang": "js",
  4533. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  4534. }
  4535. ]
  4536. }
  4537. },
  4538. "/session/status": {
  4539. "get": {
  4540. "tags": ["session"],
  4541. "operationId": "session.status",
  4542. "parameters": [
  4543. {
  4544. "name": "directory",
  4545. "in": "query",
  4546. "schema": {
  4547. "type": "string"
  4548. },
  4549. "required": false
  4550. },
  4551. {
  4552. "name": "workspace",
  4553. "in": "query",
  4554. "schema": {
  4555. "type": "string"
  4556. },
  4557. "required": false
  4558. }
  4559. ],
  4560. "responses": {
  4561. "200": {
  4562. "description": "Get session status",
  4563. "content": {
  4564. "application/json": {
  4565. "schema": {
  4566. "type": "object",
  4567. "additionalProperties": {
  4568. "$ref": "#/components/schemas/SessionStatus"
  4569. },
  4570. "description": "Get session status"
  4571. }
  4572. }
  4573. }
  4574. },
  4575. "400": {
  4576. "description": "Bad request",
  4577. "content": {
  4578. "application/json": {
  4579. "schema": {
  4580. "$ref": "#/components/schemas/BadRequestError"
  4581. }
  4582. }
  4583. }
  4584. }
  4585. },
  4586. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  4587. "summary": "Get session status",
  4588. "x-codeSamples": [
  4589. {
  4590. "lang": "js",
  4591. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  4592. }
  4593. ]
  4594. }
  4595. },
  4596. "/session/{sessionID}": {
  4597. "get": {
  4598. "tags": ["session"],
  4599. "operationId": "session.get",
  4600. "parameters": [
  4601. {
  4602. "name": "sessionID",
  4603. "in": "path",
  4604. "schema": {
  4605. "type": "string",
  4606. "pattern": "^ses"
  4607. },
  4608. "required": true
  4609. },
  4610. {
  4611. "name": "directory",
  4612. "in": "query",
  4613. "schema": {
  4614. "type": "string"
  4615. },
  4616. "required": false
  4617. },
  4618. {
  4619. "name": "workspace",
  4620. "in": "query",
  4621. "schema": {
  4622. "type": "string"
  4623. },
  4624. "required": false
  4625. }
  4626. ],
  4627. "responses": {
  4628. "200": {
  4629. "description": "Get session",
  4630. "content": {
  4631. "application/json": {
  4632. "schema": {
  4633. "$ref": "#/components/schemas/Session"
  4634. }
  4635. }
  4636. }
  4637. },
  4638. "400": {
  4639. "description": "Bad request",
  4640. "content": {
  4641. "application/json": {
  4642. "schema": {
  4643. "$ref": "#/components/schemas/BadRequestError"
  4644. }
  4645. }
  4646. }
  4647. },
  4648. "404": {
  4649. "description": "NotFoundError",
  4650. "content": {
  4651. "application/json": {
  4652. "schema": {
  4653. "$ref": "#/components/schemas/NotFoundError"
  4654. }
  4655. }
  4656. }
  4657. }
  4658. },
  4659. "description": "Retrieve detailed information about a specific OpenCode session.",
  4660. "summary": "Get session",
  4661. "x-codeSamples": [
  4662. {
  4663. "lang": "js",
  4664. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  4665. }
  4666. ]
  4667. },
  4668. "delete": {
  4669. "tags": ["session"],
  4670. "operationId": "session.delete",
  4671. "parameters": [
  4672. {
  4673. "name": "sessionID",
  4674. "in": "path",
  4675. "schema": {
  4676. "type": "string",
  4677. "pattern": "^ses"
  4678. },
  4679. "required": true
  4680. },
  4681. {
  4682. "name": "directory",
  4683. "in": "query",
  4684. "schema": {
  4685. "type": "string"
  4686. },
  4687. "required": false
  4688. },
  4689. {
  4690. "name": "workspace",
  4691. "in": "query",
  4692. "schema": {
  4693. "type": "string"
  4694. },
  4695. "required": false
  4696. }
  4697. ],
  4698. "responses": {
  4699. "200": {
  4700. "description": "Successfully deleted session",
  4701. "content": {
  4702. "application/json": {
  4703. "schema": {
  4704. "type": "boolean",
  4705. "description": "Successfully deleted session"
  4706. }
  4707. }
  4708. }
  4709. },
  4710. "400": {
  4711. "description": "Bad request",
  4712. "content": {
  4713. "application/json": {
  4714. "schema": {
  4715. "$ref": "#/components/schemas/BadRequestError"
  4716. }
  4717. }
  4718. }
  4719. },
  4720. "404": {
  4721. "description": "NotFoundError",
  4722. "content": {
  4723. "application/json": {
  4724. "schema": {
  4725. "$ref": "#/components/schemas/NotFoundError"
  4726. }
  4727. }
  4728. }
  4729. }
  4730. },
  4731. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  4732. "summary": "Delete session",
  4733. "x-codeSamples": [
  4734. {
  4735. "lang": "js",
  4736. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  4737. }
  4738. ]
  4739. },
  4740. "patch": {
  4741. "tags": ["session"],
  4742. "operationId": "session.update",
  4743. "parameters": [
  4744. {
  4745. "name": "sessionID",
  4746. "in": "path",
  4747. "schema": {
  4748. "type": "string",
  4749. "pattern": "^ses"
  4750. },
  4751. "required": true
  4752. },
  4753. {
  4754. "name": "directory",
  4755. "in": "query",
  4756. "schema": {
  4757. "type": "string"
  4758. },
  4759. "required": false
  4760. },
  4761. {
  4762. "name": "workspace",
  4763. "in": "query",
  4764. "schema": {
  4765. "type": "string"
  4766. },
  4767. "required": false
  4768. }
  4769. ],
  4770. "responses": {
  4771. "200": {
  4772. "description": "Successfully updated session",
  4773. "content": {
  4774. "application/json": {
  4775. "schema": {
  4776. "$ref": "#/components/schemas/Session"
  4777. }
  4778. }
  4779. }
  4780. },
  4781. "400": {
  4782. "description": "Bad request",
  4783. "content": {
  4784. "application/json": {
  4785. "schema": {
  4786. "$ref": "#/components/schemas/BadRequestError"
  4787. }
  4788. }
  4789. }
  4790. },
  4791. "404": {
  4792. "description": "NotFoundError",
  4793. "content": {
  4794. "application/json": {
  4795. "schema": {
  4796. "$ref": "#/components/schemas/NotFoundError"
  4797. }
  4798. }
  4799. }
  4800. }
  4801. },
  4802. "description": "Update properties of an existing session, such as title or other metadata.",
  4803. "summary": "Update session",
  4804. "requestBody": {
  4805. "content": {
  4806. "application/json": {
  4807. "schema": {
  4808. "type": "object",
  4809. "properties": {
  4810. "title": {
  4811. "type": "string"
  4812. },
  4813. "permission": {
  4814. "$ref": "#/components/schemas/PermissionRuleset"
  4815. },
  4816. "time": {
  4817. "type": "object",
  4818. "properties": {
  4819. "archived": {
  4820. "type": "number"
  4821. }
  4822. },
  4823. "additionalProperties": false
  4824. }
  4825. },
  4826. "additionalProperties": false
  4827. }
  4828. }
  4829. }
  4830. },
  4831. "x-codeSamples": [
  4832. {
  4833. "lang": "js",
  4834. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  4835. }
  4836. ]
  4837. }
  4838. },
  4839. "/session/{sessionID}/children": {
  4840. "get": {
  4841. "tags": ["session"],
  4842. "operationId": "session.children",
  4843. "parameters": [
  4844. {
  4845. "name": "sessionID",
  4846. "in": "path",
  4847. "schema": {
  4848. "type": "string",
  4849. "pattern": "^ses"
  4850. },
  4851. "required": true
  4852. },
  4853. {
  4854. "name": "directory",
  4855. "in": "query",
  4856. "schema": {
  4857. "type": "string"
  4858. },
  4859. "required": false
  4860. },
  4861. {
  4862. "name": "workspace",
  4863. "in": "query",
  4864. "schema": {
  4865. "type": "string"
  4866. },
  4867. "required": false
  4868. }
  4869. ],
  4870. "responses": {
  4871. "200": {
  4872. "description": "List of children",
  4873. "content": {
  4874. "application/json": {
  4875. "schema": {
  4876. "type": "array",
  4877. "items": {
  4878. "$ref": "#/components/schemas/Session"
  4879. },
  4880. "description": "List of children"
  4881. }
  4882. }
  4883. }
  4884. },
  4885. "400": {
  4886. "description": "Bad request",
  4887. "content": {
  4888. "application/json": {
  4889. "schema": {
  4890. "$ref": "#/components/schemas/BadRequestError"
  4891. }
  4892. }
  4893. }
  4894. },
  4895. "404": {
  4896. "description": "Not found",
  4897. "content": {
  4898. "application/json": {
  4899. "schema": {
  4900. "$ref": "#/components/schemas/NotFoundError"
  4901. }
  4902. }
  4903. }
  4904. }
  4905. },
  4906. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  4907. "summary": "Get session children",
  4908. "x-codeSamples": [
  4909. {
  4910. "lang": "js",
  4911. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  4912. }
  4913. ]
  4914. }
  4915. },
  4916. "/session/{sessionID}/todo": {
  4917. "get": {
  4918. "tags": ["session"],
  4919. "operationId": "session.todo",
  4920. "parameters": [
  4921. {
  4922. "name": "sessionID",
  4923. "in": "path",
  4924. "schema": {
  4925. "type": "string",
  4926. "pattern": "^ses"
  4927. },
  4928. "required": true
  4929. },
  4930. {
  4931. "name": "directory",
  4932. "in": "query",
  4933. "schema": {
  4934. "type": "string"
  4935. },
  4936. "required": false
  4937. },
  4938. {
  4939. "name": "workspace",
  4940. "in": "query",
  4941. "schema": {
  4942. "type": "string"
  4943. },
  4944. "required": false
  4945. }
  4946. ],
  4947. "responses": {
  4948. "200": {
  4949. "description": "Todo list",
  4950. "content": {
  4951. "application/json": {
  4952. "schema": {
  4953. "type": "array",
  4954. "items": {
  4955. "$ref": "#/components/schemas/Todo"
  4956. },
  4957. "description": "Todo list"
  4958. }
  4959. }
  4960. }
  4961. },
  4962. "400": {
  4963. "description": "Bad request",
  4964. "content": {
  4965. "application/json": {
  4966. "schema": {
  4967. "$ref": "#/components/schemas/BadRequestError"
  4968. }
  4969. }
  4970. }
  4971. },
  4972. "404": {
  4973. "description": "Not found",
  4974. "content": {
  4975. "application/json": {
  4976. "schema": {
  4977. "$ref": "#/components/schemas/NotFoundError"
  4978. }
  4979. }
  4980. }
  4981. }
  4982. },
  4983. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  4984. "summary": "Get session todos",
  4985. "x-codeSamples": [
  4986. {
  4987. "lang": "js",
  4988. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  4989. }
  4990. ]
  4991. }
  4992. },
  4993. "/session/{sessionID}/diff": {
  4994. "get": {
  4995. "tags": ["session"],
  4996. "operationId": "session.diff",
  4997. "parameters": [
  4998. {
  4999. "name": "sessionID",
  5000. "in": "path",
  5001. "schema": {
  5002. "type": "string",
  5003. "pattern": "^ses"
  5004. },
  5005. "required": true
  5006. },
  5007. {
  5008. "name": "directory",
  5009. "in": "query",
  5010. "schema": {
  5011. "type": "string"
  5012. },
  5013. "required": false
  5014. },
  5015. {
  5016. "name": "workspace",
  5017. "in": "query",
  5018. "schema": {
  5019. "type": "string"
  5020. },
  5021. "required": false
  5022. },
  5023. {
  5024. "name": "messageID",
  5025. "in": "query",
  5026. "schema": {
  5027. "type": "string",
  5028. "pattern": "^msg"
  5029. },
  5030. "required": false
  5031. }
  5032. ],
  5033. "responses": {
  5034. "200": {
  5035. "description": "Successfully retrieved diff",
  5036. "content": {
  5037. "application/json": {
  5038. "schema": {
  5039. "type": "array",
  5040. "items": {
  5041. "$ref": "#/components/schemas/SnapshotFileDiff"
  5042. },
  5043. "description": "Successfully retrieved diff"
  5044. }
  5045. }
  5046. }
  5047. }
  5048. },
  5049. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5050. "summary": "Get message diff",
  5051. "x-codeSamples": [
  5052. {
  5053. "lang": "js",
  5054. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5055. }
  5056. ]
  5057. }
  5058. },
  5059. "/session/{sessionID}/message": {
  5060. "get": {
  5061. "tags": ["session"],
  5062. "operationId": "session.messages",
  5063. "parameters": [
  5064. {
  5065. "name": "sessionID",
  5066. "in": "path",
  5067. "schema": {
  5068. "type": "string",
  5069. "pattern": "^ses"
  5070. },
  5071. "required": true
  5072. },
  5073. {
  5074. "name": "directory",
  5075. "in": "query",
  5076. "schema": {
  5077. "type": "string"
  5078. },
  5079. "required": false
  5080. },
  5081. {
  5082. "name": "workspace",
  5083. "in": "query",
  5084. "schema": {
  5085. "type": "string"
  5086. },
  5087. "required": false
  5088. },
  5089. {
  5090. "name": "limit",
  5091. "in": "query",
  5092. "schema": {
  5093. "type": "integer",
  5094. "minimum": 0,
  5095. "maximum": 9007199254740991
  5096. },
  5097. "required": false
  5098. },
  5099. {
  5100. "name": "before",
  5101. "in": "query",
  5102. "schema": {
  5103. "type": "string"
  5104. },
  5105. "required": false
  5106. }
  5107. ],
  5108. "responses": {
  5109. "200": {
  5110. "description": "List of messages",
  5111. "content": {
  5112. "application/json": {
  5113. "schema": {
  5114. "type": "array",
  5115. "items": {
  5116. "type": "object",
  5117. "properties": {
  5118. "info": {
  5119. "$ref": "#/components/schemas/Message"
  5120. },
  5121. "parts": {
  5122. "type": "array",
  5123. "items": {
  5124. "$ref": "#/components/schemas/Part"
  5125. }
  5126. }
  5127. },
  5128. "required": ["info", "parts"],
  5129. "additionalProperties": false
  5130. },
  5131. "description": "List of messages"
  5132. }
  5133. }
  5134. }
  5135. },
  5136. "400": {
  5137. "description": "Bad request",
  5138. "content": {
  5139. "application/json": {
  5140. "schema": {
  5141. "$ref": "#/components/schemas/BadRequestError"
  5142. }
  5143. }
  5144. }
  5145. },
  5146. "404": {
  5147. "description": "NotFoundError",
  5148. "content": {
  5149. "application/json": {
  5150. "schema": {
  5151. "$ref": "#/components/schemas/NotFoundError"
  5152. }
  5153. }
  5154. }
  5155. }
  5156. },
  5157. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5158. "summary": "Get session messages",
  5159. "x-codeSamples": [
  5160. {
  5161. "lang": "js",
  5162. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5163. }
  5164. ]
  5165. },
  5166. "post": {
  5167. "tags": ["session"],
  5168. "operationId": "session.prompt",
  5169. "parameters": [
  5170. {
  5171. "name": "sessionID",
  5172. "in": "path",
  5173. "schema": {
  5174. "type": "string",
  5175. "pattern": "^ses"
  5176. },
  5177. "required": true
  5178. },
  5179. {
  5180. "name": "directory",
  5181. "in": "query",
  5182. "schema": {
  5183. "type": "string"
  5184. },
  5185. "required": false
  5186. },
  5187. {
  5188. "name": "workspace",
  5189. "in": "query",
  5190. "schema": {
  5191. "type": "string"
  5192. },
  5193. "required": false
  5194. }
  5195. ],
  5196. "responses": {
  5197. "200": {
  5198. "description": "Created message",
  5199. "content": {
  5200. "application/json": {
  5201. "schema": {
  5202. "type": "object",
  5203. "required": ["info", "parts"],
  5204. "properties": {
  5205. "info": {
  5206. "$ref": "#/components/schemas/AssistantMessage"
  5207. },
  5208. "parts": {
  5209. "type": "array",
  5210. "items": {
  5211. "$ref": "#/components/schemas/Part"
  5212. }
  5213. }
  5214. }
  5215. }
  5216. }
  5217. }
  5218. },
  5219. "400": {
  5220. "description": "Bad request",
  5221. "content": {
  5222. "application/json": {
  5223. "schema": {
  5224. "$ref": "#/components/schemas/BadRequestError"
  5225. }
  5226. }
  5227. }
  5228. },
  5229. "404": {
  5230. "description": "Not found",
  5231. "content": {
  5232. "application/json": {
  5233. "schema": {
  5234. "$ref": "#/components/schemas/NotFoundError"
  5235. }
  5236. }
  5237. }
  5238. }
  5239. },
  5240. "description": "Create and send a new message to a session, streaming the AI response.",
  5241. "summary": "Send message",
  5242. "requestBody": {
  5243. "content": {
  5244. "application/json": {
  5245. "schema": {
  5246. "type": "object",
  5247. "properties": {
  5248. "messageID": {
  5249. "type": "string",
  5250. "pattern": "^msg"
  5251. },
  5252. "model": {
  5253. "type": "object",
  5254. "properties": {
  5255. "providerID": {
  5256. "type": "string"
  5257. },
  5258. "modelID": {
  5259. "type": "string"
  5260. }
  5261. },
  5262. "required": ["providerID", "modelID"],
  5263. "additionalProperties": false
  5264. },
  5265. "agent": {
  5266. "type": "string"
  5267. },
  5268. "noReply": {
  5269. "type": "boolean"
  5270. },
  5271. "tools": {
  5272. "type": "object",
  5273. "additionalProperties": {
  5274. "type": "boolean"
  5275. }
  5276. },
  5277. "format": {
  5278. "$ref": "#/components/schemas/OutputFormat"
  5279. },
  5280. "system": {
  5281. "type": "string"
  5282. },
  5283. "variant": {
  5284. "type": "string"
  5285. },
  5286. "parts": {
  5287. "type": "array",
  5288. "items": {
  5289. "anyOf": [
  5290. {
  5291. "$ref": "#/components/schemas/TextPartInput"
  5292. },
  5293. {
  5294. "$ref": "#/components/schemas/FilePartInput"
  5295. },
  5296. {
  5297. "$ref": "#/components/schemas/AgentPartInput"
  5298. },
  5299. {
  5300. "$ref": "#/components/schemas/SubtaskPartInput"
  5301. }
  5302. ]
  5303. }
  5304. }
  5305. },
  5306. "required": ["parts"],
  5307. "additionalProperties": false
  5308. }
  5309. }
  5310. }
  5311. },
  5312. "x-codeSamples": [
  5313. {
  5314. "lang": "js",
  5315. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  5316. }
  5317. ]
  5318. }
  5319. },
  5320. "/session/{sessionID}/message/{messageID}": {
  5321. "get": {
  5322. "tags": ["session"],
  5323. "operationId": "session.message",
  5324. "parameters": [
  5325. {
  5326. "name": "sessionID",
  5327. "in": "path",
  5328. "schema": {
  5329. "type": "string",
  5330. "pattern": "^ses"
  5331. },
  5332. "required": true
  5333. },
  5334. {
  5335. "name": "messageID",
  5336. "in": "path",
  5337. "schema": {
  5338. "type": "string",
  5339. "pattern": "^msg"
  5340. },
  5341. "required": true
  5342. },
  5343. {
  5344. "name": "directory",
  5345. "in": "query",
  5346. "schema": {
  5347. "type": "string"
  5348. },
  5349. "required": false
  5350. },
  5351. {
  5352. "name": "workspace",
  5353. "in": "query",
  5354. "schema": {
  5355. "type": "string"
  5356. },
  5357. "required": false
  5358. }
  5359. ],
  5360. "responses": {
  5361. "200": {
  5362. "description": "Message",
  5363. "content": {
  5364. "application/json": {
  5365. "schema": {
  5366. "type": "object",
  5367. "properties": {
  5368. "info": {
  5369. "$ref": "#/components/schemas/Message"
  5370. },
  5371. "parts": {
  5372. "type": "array",
  5373. "items": {
  5374. "$ref": "#/components/schemas/Part"
  5375. }
  5376. }
  5377. },
  5378. "required": ["info", "parts"],
  5379. "additionalProperties": false,
  5380. "description": "Message"
  5381. }
  5382. }
  5383. }
  5384. },
  5385. "400": {
  5386. "description": "Bad request",
  5387. "content": {
  5388. "application/json": {
  5389. "schema": {
  5390. "$ref": "#/components/schemas/BadRequestError"
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "404": {
  5396. "description": "NotFoundError",
  5397. "content": {
  5398. "application/json": {
  5399. "schema": {
  5400. "$ref": "#/components/schemas/NotFoundError"
  5401. }
  5402. }
  5403. }
  5404. }
  5405. },
  5406. "description": "Retrieve a specific message from a session by its message ID.",
  5407. "summary": "Get message",
  5408. "x-codeSamples": [
  5409. {
  5410. "lang": "js",
  5411. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  5412. }
  5413. ]
  5414. },
  5415. "delete": {
  5416. "tags": ["session"],
  5417. "operationId": "session.deleteMessage",
  5418. "parameters": [
  5419. {
  5420. "name": "sessionID",
  5421. "in": "path",
  5422. "schema": {
  5423. "type": "string",
  5424. "pattern": "^ses"
  5425. },
  5426. "required": true
  5427. },
  5428. {
  5429. "name": "messageID",
  5430. "in": "path",
  5431. "schema": {
  5432. "type": "string",
  5433. "pattern": "^msg"
  5434. },
  5435. "required": true
  5436. },
  5437. {
  5438. "name": "directory",
  5439. "in": "query",
  5440. "schema": {
  5441. "type": "string"
  5442. },
  5443. "required": false
  5444. },
  5445. {
  5446. "name": "workspace",
  5447. "in": "query",
  5448. "schema": {
  5449. "type": "string"
  5450. },
  5451. "required": false
  5452. }
  5453. ],
  5454. "responses": {
  5455. "200": {
  5456. "description": "Successfully deleted message",
  5457. "content": {
  5458. "application/json": {
  5459. "schema": {
  5460. "type": "boolean",
  5461. "description": "Successfully deleted message"
  5462. }
  5463. }
  5464. }
  5465. },
  5466. "400": {
  5467. "description": "Bad request",
  5468. "content": {
  5469. "application/json": {
  5470. "schema": {
  5471. "$ref": "#/components/schemas/BadRequestError"
  5472. }
  5473. }
  5474. }
  5475. },
  5476. "404": {
  5477. "description": "Not found",
  5478. "content": {
  5479. "application/json": {
  5480. "schema": {
  5481. "$ref": "#/components/schemas/NotFoundError"
  5482. }
  5483. }
  5484. }
  5485. }
  5486. },
  5487. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  5488. "summary": "Delete message",
  5489. "x-codeSamples": [
  5490. {
  5491. "lang": "js",
  5492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  5493. }
  5494. ]
  5495. }
  5496. },
  5497. "/session/{sessionID}/fork": {
  5498. "post": {
  5499. "tags": ["session"],
  5500. "operationId": "session.fork",
  5501. "parameters": [
  5502. {
  5503. "name": "sessionID",
  5504. "in": "path",
  5505. "schema": {
  5506. "type": "string",
  5507. "pattern": "^ses"
  5508. },
  5509. "required": true
  5510. },
  5511. {
  5512. "name": "directory",
  5513. "in": "query",
  5514. "schema": {
  5515. "type": "string"
  5516. },
  5517. "required": false
  5518. },
  5519. {
  5520. "name": "workspace",
  5521. "in": "query",
  5522. "schema": {
  5523. "type": "string"
  5524. },
  5525. "required": false
  5526. }
  5527. ],
  5528. "responses": {
  5529. "200": {
  5530. "description": "200",
  5531. "content": {
  5532. "application/json": {
  5533. "schema": {
  5534. "$ref": "#/components/schemas/Session"
  5535. }
  5536. }
  5537. }
  5538. },
  5539. "400": {
  5540. "description": "Bad request",
  5541. "content": {
  5542. "application/json": {
  5543. "schema": {
  5544. "$ref": "#/components/schemas/BadRequestError"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "404": {
  5550. "description": "NotFoundError",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "$ref": "#/components/schemas/NotFoundError"
  5555. }
  5556. }
  5557. }
  5558. }
  5559. },
  5560. "description": "Create a new session by forking an existing session at a specific message point.",
  5561. "summary": "Fork session",
  5562. "requestBody": {
  5563. "content": {
  5564. "application/json": {
  5565. "schema": {
  5566. "type": "object",
  5567. "properties": {
  5568. "messageID": {
  5569. "type": "string",
  5570. "pattern": "^msg"
  5571. }
  5572. },
  5573. "additionalProperties": false
  5574. }
  5575. }
  5576. }
  5577. },
  5578. "x-codeSamples": [
  5579. {
  5580. "lang": "js",
  5581. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  5582. }
  5583. ]
  5584. }
  5585. },
  5586. "/session/{sessionID}/abort": {
  5587. "post": {
  5588. "tags": ["session"],
  5589. "operationId": "session.abort",
  5590. "parameters": [
  5591. {
  5592. "name": "sessionID",
  5593. "in": "path",
  5594. "schema": {
  5595. "type": "string",
  5596. "pattern": "^ses"
  5597. },
  5598. "required": true
  5599. },
  5600. {
  5601. "name": "directory",
  5602. "in": "query",
  5603. "schema": {
  5604. "type": "string"
  5605. },
  5606. "required": false
  5607. },
  5608. {
  5609. "name": "workspace",
  5610. "in": "query",
  5611. "schema": {
  5612. "type": "string"
  5613. },
  5614. "required": false
  5615. }
  5616. ],
  5617. "responses": {
  5618. "200": {
  5619. "description": "Aborted session",
  5620. "content": {
  5621. "application/json": {
  5622. "schema": {
  5623. "type": "boolean",
  5624. "description": "Aborted session"
  5625. }
  5626. }
  5627. }
  5628. },
  5629. "400": {
  5630. "description": "Bad request",
  5631. "content": {
  5632. "application/json": {
  5633. "schema": {
  5634. "$ref": "#/components/schemas/BadRequestError"
  5635. }
  5636. }
  5637. }
  5638. },
  5639. "404": {
  5640. "description": "Not found",
  5641. "content": {
  5642. "application/json": {
  5643. "schema": {
  5644. "$ref": "#/components/schemas/NotFoundError"
  5645. }
  5646. }
  5647. }
  5648. }
  5649. },
  5650. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  5651. "summary": "Abort session",
  5652. "x-codeSamples": [
  5653. {
  5654. "lang": "js",
  5655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  5656. }
  5657. ]
  5658. }
  5659. },
  5660. "/session/{sessionID}/init": {
  5661. "post": {
  5662. "tags": ["session"],
  5663. "operationId": "session.init",
  5664. "parameters": [
  5665. {
  5666. "name": "sessionID",
  5667. "in": "path",
  5668. "schema": {
  5669. "type": "string",
  5670. "pattern": "^ses"
  5671. },
  5672. "required": true
  5673. },
  5674. {
  5675. "name": "directory",
  5676. "in": "query",
  5677. "schema": {
  5678. "type": "string"
  5679. },
  5680. "required": false
  5681. },
  5682. {
  5683. "name": "workspace",
  5684. "in": "query",
  5685. "schema": {
  5686. "type": "string"
  5687. },
  5688. "required": false
  5689. }
  5690. ],
  5691. "responses": {
  5692. "200": {
  5693. "description": "200",
  5694. "content": {
  5695. "application/json": {
  5696. "schema": {
  5697. "type": "boolean",
  5698. "description": "200"
  5699. }
  5700. }
  5701. }
  5702. },
  5703. "400": {
  5704. "description": "Bad request",
  5705. "content": {
  5706. "application/json": {
  5707. "schema": {
  5708. "$ref": "#/components/schemas/BadRequestError"
  5709. }
  5710. }
  5711. }
  5712. },
  5713. "404": {
  5714. "description": "Not found",
  5715. "content": {
  5716. "application/json": {
  5717. "schema": {
  5718. "$ref": "#/components/schemas/NotFoundError"
  5719. }
  5720. }
  5721. }
  5722. }
  5723. },
  5724. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  5725. "summary": "Initialize session",
  5726. "requestBody": {
  5727. "content": {
  5728. "application/json": {
  5729. "schema": {
  5730. "type": "object",
  5731. "properties": {
  5732. "modelID": {
  5733. "type": "string"
  5734. },
  5735. "providerID": {
  5736. "type": "string"
  5737. },
  5738. "messageID": {
  5739. "type": "string",
  5740. "pattern": "^msg"
  5741. }
  5742. },
  5743. "required": ["modelID", "providerID", "messageID"],
  5744. "additionalProperties": false
  5745. }
  5746. }
  5747. }
  5748. },
  5749. "x-codeSamples": [
  5750. {
  5751. "lang": "js",
  5752. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  5753. }
  5754. ]
  5755. }
  5756. },
  5757. "/session/{sessionID}/share": {
  5758. "post": {
  5759. "tags": ["session"],
  5760. "operationId": "session.share",
  5761. "parameters": [
  5762. {
  5763. "name": "sessionID",
  5764. "in": "path",
  5765. "schema": {
  5766. "type": "string",
  5767. "pattern": "^ses"
  5768. },
  5769. "required": true
  5770. },
  5771. {
  5772. "name": "directory",
  5773. "in": "query",
  5774. "schema": {
  5775. "type": "string"
  5776. },
  5777. "required": false
  5778. },
  5779. {
  5780. "name": "workspace",
  5781. "in": "query",
  5782. "schema": {
  5783. "type": "string"
  5784. },
  5785. "required": false
  5786. }
  5787. ],
  5788. "responses": {
  5789. "200": {
  5790. "description": "Successfully shared session",
  5791. "content": {
  5792. "application/json": {
  5793. "schema": {
  5794. "$ref": "#/components/schemas/Session"
  5795. }
  5796. }
  5797. }
  5798. },
  5799. "404": {
  5800. "description": "NotFoundError",
  5801. "content": {
  5802. "application/json": {
  5803. "schema": {
  5804. "$ref": "#/components/schemas/NotFoundError"
  5805. }
  5806. }
  5807. }
  5808. },
  5809. "500": {
  5810. "description": "InternalServerError",
  5811. "content": {
  5812. "application/json": {
  5813. "schema": {
  5814. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5815. }
  5816. }
  5817. }
  5818. }
  5819. },
  5820. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  5821. "summary": "Share session",
  5822. "x-codeSamples": [
  5823. {
  5824. "lang": "js",
  5825. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  5826. }
  5827. ]
  5828. },
  5829. "delete": {
  5830. "tags": ["session"],
  5831. "operationId": "session.unshare",
  5832. "parameters": [
  5833. {
  5834. "name": "sessionID",
  5835. "in": "path",
  5836. "schema": {
  5837. "type": "string",
  5838. "pattern": "^ses"
  5839. },
  5840. "required": true
  5841. },
  5842. {
  5843. "name": "directory",
  5844. "in": "query",
  5845. "schema": {
  5846. "type": "string"
  5847. },
  5848. "required": false
  5849. },
  5850. {
  5851. "name": "workspace",
  5852. "in": "query",
  5853. "schema": {
  5854. "type": "string"
  5855. },
  5856. "required": false
  5857. }
  5858. ],
  5859. "responses": {
  5860. "200": {
  5861. "description": "Successfully unshared session",
  5862. "content": {
  5863. "application/json": {
  5864. "schema": {
  5865. "$ref": "#/components/schemas/Session"
  5866. }
  5867. }
  5868. }
  5869. },
  5870. "404": {
  5871. "description": "NotFoundError",
  5872. "content": {
  5873. "application/json": {
  5874. "schema": {
  5875. "$ref": "#/components/schemas/NotFoundError"
  5876. }
  5877. }
  5878. }
  5879. },
  5880. "500": {
  5881. "description": "InternalServerError",
  5882. "content": {
  5883. "application/json": {
  5884. "schema": {
  5885. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5886. }
  5887. }
  5888. }
  5889. }
  5890. },
  5891. "description": "Remove the shareable link for a session, making it private again.",
  5892. "summary": "Unshare session",
  5893. "x-codeSamples": [
  5894. {
  5895. "lang": "js",
  5896. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  5897. }
  5898. ]
  5899. }
  5900. },
  5901. "/session/{sessionID}/summarize": {
  5902. "post": {
  5903. "tags": ["session"],
  5904. "operationId": "session.summarize",
  5905. "parameters": [
  5906. {
  5907. "name": "sessionID",
  5908. "in": "path",
  5909. "schema": {
  5910. "type": "string",
  5911. "pattern": "^ses"
  5912. },
  5913. "required": true
  5914. },
  5915. {
  5916. "name": "directory",
  5917. "in": "query",
  5918. "schema": {
  5919. "type": "string"
  5920. },
  5921. "required": false
  5922. },
  5923. {
  5924. "name": "workspace",
  5925. "in": "query",
  5926. "schema": {
  5927. "type": "string"
  5928. },
  5929. "required": false
  5930. }
  5931. ],
  5932. "responses": {
  5933. "200": {
  5934. "description": "Summarized session",
  5935. "content": {
  5936. "application/json": {
  5937. "schema": {
  5938. "type": "boolean",
  5939. "description": "Summarized session"
  5940. }
  5941. }
  5942. }
  5943. },
  5944. "400": {
  5945. "description": "Bad request",
  5946. "content": {
  5947. "application/json": {
  5948. "schema": {
  5949. "$ref": "#/components/schemas/BadRequestError"
  5950. }
  5951. }
  5952. }
  5953. },
  5954. "404": {
  5955. "description": "NotFoundError",
  5956. "content": {
  5957. "application/json": {
  5958. "schema": {
  5959. "$ref": "#/components/schemas/NotFoundError"
  5960. }
  5961. }
  5962. }
  5963. }
  5964. },
  5965. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  5966. "summary": "Summarize session",
  5967. "requestBody": {
  5968. "content": {
  5969. "application/json": {
  5970. "schema": {
  5971. "type": "object",
  5972. "properties": {
  5973. "providerID": {
  5974. "type": "string"
  5975. },
  5976. "modelID": {
  5977. "type": "string"
  5978. },
  5979. "auto": {
  5980. "type": "boolean"
  5981. }
  5982. },
  5983. "required": ["providerID", "modelID"],
  5984. "additionalProperties": false
  5985. }
  5986. }
  5987. }
  5988. },
  5989. "x-codeSamples": [
  5990. {
  5991. "lang": "js",
  5992. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  5993. }
  5994. ]
  5995. }
  5996. },
  5997. "/session/{sessionID}/prompt_async": {
  5998. "post": {
  5999. "tags": ["session"],
  6000. "operationId": "session.prompt_async",
  6001. "parameters": [
  6002. {
  6003. "name": "sessionID",
  6004. "in": "path",
  6005. "schema": {
  6006. "type": "string",
  6007. "pattern": "^ses"
  6008. },
  6009. "required": true
  6010. },
  6011. {
  6012. "name": "directory",
  6013. "in": "query",
  6014. "schema": {
  6015. "type": "string"
  6016. },
  6017. "required": false
  6018. },
  6019. {
  6020. "name": "workspace",
  6021. "in": "query",
  6022. "schema": {
  6023. "type": "string"
  6024. },
  6025. "required": false
  6026. }
  6027. ],
  6028. "responses": {
  6029. "204": {
  6030. "description": "Prompt accepted"
  6031. },
  6032. "400": {
  6033. "description": "Bad request",
  6034. "content": {
  6035. "application/json": {
  6036. "schema": {
  6037. "$ref": "#/components/schemas/BadRequestError"
  6038. }
  6039. }
  6040. }
  6041. },
  6042. "404": {
  6043. "description": "Not found",
  6044. "content": {
  6045. "application/json": {
  6046. "schema": {
  6047. "$ref": "#/components/schemas/NotFoundError"
  6048. }
  6049. }
  6050. }
  6051. }
  6052. },
  6053. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6054. "summary": "Send async message",
  6055. "requestBody": {
  6056. "content": {
  6057. "application/json": {
  6058. "schema": {
  6059. "type": "object",
  6060. "properties": {
  6061. "messageID": {
  6062. "type": "string",
  6063. "pattern": "^msg"
  6064. },
  6065. "model": {
  6066. "type": "object",
  6067. "properties": {
  6068. "providerID": {
  6069. "type": "string"
  6070. },
  6071. "modelID": {
  6072. "type": "string"
  6073. }
  6074. },
  6075. "required": ["providerID", "modelID"],
  6076. "additionalProperties": false
  6077. },
  6078. "agent": {
  6079. "type": "string"
  6080. },
  6081. "noReply": {
  6082. "type": "boolean"
  6083. },
  6084. "tools": {
  6085. "type": "object",
  6086. "additionalProperties": {
  6087. "type": "boolean"
  6088. }
  6089. },
  6090. "format": {
  6091. "$ref": "#/components/schemas/OutputFormat"
  6092. },
  6093. "system": {
  6094. "type": "string"
  6095. },
  6096. "variant": {
  6097. "type": "string"
  6098. },
  6099. "parts": {
  6100. "type": "array",
  6101. "items": {
  6102. "anyOf": [
  6103. {
  6104. "$ref": "#/components/schemas/TextPartInput"
  6105. },
  6106. {
  6107. "$ref": "#/components/schemas/FilePartInput"
  6108. },
  6109. {
  6110. "$ref": "#/components/schemas/AgentPartInput"
  6111. },
  6112. {
  6113. "$ref": "#/components/schemas/SubtaskPartInput"
  6114. }
  6115. ]
  6116. }
  6117. }
  6118. },
  6119. "required": ["parts"],
  6120. "additionalProperties": false
  6121. }
  6122. }
  6123. }
  6124. },
  6125. "x-codeSamples": [
  6126. {
  6127. "lang": "js",
  6128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6129. }
  6130. ]
  6131. }
  6132. },
  6133. "/session/{sessionID}/command": {
  6134. "post": {
  6135. "tags": ["session"],
  6136. "operationId": "session.command",
  6137. "parameters": [
  6138. {
  6139. "name": "sessionID",
  6140. "in": "path",
  6141. "schema": {
  6142. "type": "string",
  6143. "pattern": "^ses"
  6144. },
  6145. "required": true
  6146. },
  6147. {
  6148. "name": "directory",
  6149. "in": "query",
  6150. "schema": {
  6151. "type": "string"
  6152. },
  6153. "required": false
  6154. },
  6155. {
  6156. "name": "workspace",
  6157. "in": "query",
  6158. "schema": {
  6159. "type": "string"
  6160. },
  6161. "required": false
  6162. }
  6163. ],
  6164. "responses": {
  6165. "200": {
  6166. "description": "Created message",
  6167. "content": {
  6168. "application/json": {
  6169. "schema": {
  6170. "type": "object",
  6171. "required": ["info", "parts"],
  6172. "properties": {
  6173. "info": {
  6174. "$ref": "#/components/schemas/AssistantMessage"
  6175. },
  6176. "parts": {
  6177. "type": "array",
  6178. "items": {
  6179. "$ref": "#/components/schemas/Part"
  6180. }
  6181. }
  6182. }
  6183. }
  6184. }
  6185. }
  6186. },
  6187. "400": {
  6188. "description": "Bad request",
  6189. "content": {
  6190. "application/json": {
  6191. "schema": {
  6192. "$ref": "#/components/schemas/BadRequestError"
  6193. }
  6194. }
  6195. }
  6196. },
  6197. "404": {
  6198. "description": "Not found",
  6199. "content": {
  6200. "application/json": {
  6201. "schema": {
  6202. "$ref": "#/components/schemas/NotFoundError"
  6203. }
  6204. }
  6205. }
  6206. }
  6207. },
  6208. "description": "Send a new command to a session for execution by the AI assistant.",
  6209. "summary": "Send command",
  6210. "requestBody": {
  6211. "content": {
  6212. "application/json": {
  6213. "schema": {
  6214. "type": "object",
  6215. "properties": {
  6216. "messageID": {
  6217. "type": "string",
  6218. "pattern": "^msg"
  6219. },
  6220. "agent": {
  6221. "type": "string"
  6222. },
  6223. "model": {
  6224. "type": "string"
  6225. },
  6226. "arguments": {
  6227. "type": "string"
  6228. },
  6229. "command": {
  6230. "type": "string"
  6231. },
  6232. "variant": {
  6233. "type": "string"
  6234. },
  6235. "parts": {
  6236. "type": "array",
  6237. "items": {
  6238. "type": "object",
  6239. "properties": {
  6240. "id": {
  6241. "type": "string",
  6242. "pattern": "^prt"
  6243. },
  6244. "type": {
  6245. "type": "string",
  6246. "enum": ["file"]
  6247. },
  6248. "mime": {
  6249. "type": "string"
  6250. },
  6251. "filename": {
  6252. "type": "string"
  6253. },
  6254. "url": {
  6255. "type": "string"
  6256. },
  6257. "source": {
  6258. "$ref": "#/components/schemas/FilePartSource"
  6259. }
  6260. },
  6261. "required": ["type", "mime", "url"],
  6262. "additionalProperties": false
  6263. }
  6264. }
  6265. },
  6266. "required": ["arguments", "command"],
  6267. "additionalProperties": false
  6268. }
  6269. }
  6270. }
  6271. },
  6272. "x-codeSamples": [
  6273. {
  6274. "lang": "js",
  6275. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  6276. }
  6277. ]
  6278. }
  6279. },
  6280. "/session/{sessionID}/shell": {
  6281. "post": {
  6282. "tags": ["session"],
  6283. "operationId": "session.shell",
  6284. "parameters": [
  6285. {
  6286. "name": "sessionID",
  6287. "in": "path",
  6288. "schema": {
  6289. "type": "string",
  6290. "pattern": "^ses"
  6291. },
  6292. "required": true
  6293. },
  6294. {
  6295. "name": "directory",
  6296. "in": "query",
  6297. "schema": {
  6298. "type": "string"
  6299. },
  6300. "required": false
  6301. },
  6302. {
  6303. "name": "workspace",
  6304. "in": "query",
  6305. "schema": {
  6306. "type": "string"
  6307. },
  6308. "required": false
  6309. }
  6310. ],
  6311. "responses": {
  6312. "200": {
  6313. "description": "Created message",
  6314. "content": {
  6315. "application/json": {
  6316. "schema": {
  6317. "type": "object",
  6318. "properties": {
  6319. "info": {
  6320. "$ref": "#/components/schemas/Message"
  6321. },
  6322. "parts": {
  6323. "type": "array",
  6324. "items": {
  6325. "$ref": "#/components/schemas/Part"
  6326. }
  6327. }
  6328. },
  6329. "required": ["info", "parts"],
  6330. "additionalProperties": false,
  6331. "description": "Created message"
  6332. }
  6333. }
  6334. }
  6335. },
  6336. "400": {
  6337. "description": "Bad request",
  6338. "content": {
  6339. "application/json": {
  6340. "schema": {
  6341. "$ref": "#/components/schemas/BadRequestError"
  6342. }
  6343. }
  6344. }
  6345. },
  6346. "404": {
  6347. "description": "Not found",
  6348. "content": {
  6349. "application/json": {
  6350. "schema": {
  6351. "$ref": "#/components/schemas/NotFoundError"
  6352. }
  6353. }
  6354. }
  6355. }
  6356. },
  6357. "description": "Execute a shell command within the session context and return the AI's response.",
  6358. "summary": "Run shell command",
  6359. "requestBody": {
  6360. "content": {
  6361. "application/json": {
  6362. "schema": {
  6363. "type": "object",
  6364. "properties": {
  6365. "messageID": {
  6366. "type": "string",
  6367. "pattern": "^msg"
  6368. },
  6369. "agent": {
  6370. "type": "string"
  6371. },
  6372. "model": {
  6373. "type": "object",
  6374. "properties": {
  6375. "providerID": {
  6376. "type": "string"
  6377. },
  6378. "modelID": {
  6379. "type": "string"
  6380. }
  6381. },
  6382. "required": ["providerID", "modelID"],
  6383. "additionalProperties": false
  6384. },
  6385. "command": {
  6386. "type": "string"
  6387. }
  6388. },
  6389. "required": ["agent", "command"],
  6390. "additionalProperties": false
  6391. }
  6392. }
  6393. }
  6394. },
  6395. "x-codeSamples": [
  6396. {
  6397. "lang": "js",
  6398. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  6399. }
  6400. ]
  6401. }
  6402. },
  6403. "/session/{sessionID}/revert": {
  6404. "post": {
  6405. "tags": ["session"],
  6406. "operationId": "session.revert",
  6407. "parameters": [
  6408. {
  6409. "name": "sessionID",
  6410. "in": "path",
  6411. "schema": {
  6412. "type": "string",
  6413. "pattern": "^ses"
  6414. },
  6415. "required": true
  6416. },
  6417. {
  6418. "name": "directory",
  6419. "in": "query",
  6420. "schema": {
  6421. "type": "string"
  6422. },
  6423. "required": false
  6424. },
  6425. {
  6426. "name": "workspace",
  6427. "in": "query",
  6428. "schema": {
  6429. "type": "string"
  6430. },
  6431. "required": false
  6432. }
  6433. ],
  6434. "responses": {
  6435. "200": {
  6436. "description": "Updated session",
  6437. "content": {
  6438. "application/json": {
  6439. "schema": {
  6440. "$ref": "#/components/schemas/Session"
  6441. }
  6442. }
  6443. }
  6444. },
  6445. "400": {
  6446. "description": "Bad request",
  6447. "content": {
  6448. "application/json": {
  6449. "schema": {
  6450. "$ref": "#/components/schemas/BadRequestError"
  6451. }
  6452. }
  6453. }
  6454. },
  6455. "404": {
  6456. "description": "Not found",
  6457. "content": {
  6458. "application/json": {
  6459. "schema": {
  6460. "$ref": "#/components/schemas/NotFoundError"
  6461. }
  6462. }
  6463. }
  6464. }
  6465. },
  6466. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  6467. "summary": "Revert message",
  6468. "requestBody": {
  6469. "content": {
  6470. "application/json": {
  6471. "schema": {
  6472. "type": "object",
  6473. "properties": {
  6474. "messageID": {
  6475. "type": "string",
  6476. "pattern": "^msg"
  6477. },
  6478. "partID": {
  6479. "type": "string",
  6480. "pattern": "^prt"
  6481. }
  6482. },
  6483. "required": ["messageID"],
  6484. "additionalProperties": false
  6485. }
  6486. }
  6487. }
  6488. },
  6489. "x-codeSamples": [
  6490. {
  6491. "lang": "js",
  6492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  6493. }
  6494. ]
  6495. }
  6496. },
  6497. "/session/{sessionID}/unrevert": {
  6498. "post": {
  6499. "tags": ["session"],
  6500. "operationId": "session.unrevert",
  6501. "parameters": [
  6502. {
  6503. "name": "sessionID",
  6504. "in": "path",
  6505. "schema": {
  6506. "type": "string",
  6507. "pattern": "^ses"
  6508. },
  6509. "required": true
  6510. },
  6511. {
  6512. "name": "directory",
  6513. "in": "query",
  6514. "schema": {
  6515. "type": "string"
  6516. },
  6517. "required": false
  6518. },
  6519. {
  6520. "name": "workspace",
  6521. "in": "query",
  6522. "schema": {
  6523. "type": "string"
  6524. },
  6525. "required": false
  6526. }
  6527. ],
  6528. "responses": {
  6529. "200": {
  6530. "description": "Updated session",
  6531. "content": {
  6532. "application/json": {
  6533. "schema": {
  6534. "$ref": "#/components/schemas/Session"
  6535. }
  6536. }
  6537. }
  6538. },
  6539. "400": {
  6540. "description": "Bad request",
  6541. "content": {
  6542. "application/json": {
  6543. "schema": {
  6544. "$ref": "#/components/schemas/BadRequestError"
  6545. }
  6546. }
  6547. }
  6548. },
  6549. "404": {
  6550. "description": "Not found",
  6551. "content": {
  6552. "application/json": {
  6553. "schema": {
  6554. "$ref": "#/components/schemas/NotFoundError"
  6555. }
  6556. }
  6557. }
  6558. }
  6559. },
  6560. "description": "Restore all previously reverted messages in a session.",
  6561. "summary": "Restore reverted messages",
  6562. "x-codeSamples": [
  6563. {
  6564. "lang": "js",
  6565. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  6566. }
  6567. ]
  6568. }
  6569. },
  6570. "/session/{sessionID}/permissions/{permissionID}": {
  6571. "post": {
  6572. "tags": ["session"],
  6573. "operationId": "permission.respond",
  6574. "parameters": [
  6575. {
  6576. "name": "sessionID",
  6577. "in": "path",
  6578. "schema": {
  6579. "type": "string",
  6580. "pattern": "^ses"
  6581. },
  6582. "required": true
  6583. },
  6584. {
  6585. "name": "permissionID",
  6586. "in": "path",
  6587. "schema": {
  6588. "type": "string",
  6589. "pattern": "^per"
  6590. },
  6591. "required": true
  6592. },
  6593. {
  6594. "name": "directory",
  6595. "in": "query",
  6596. "schema": {
  6597. "type": "string"
  6598. },
  6599. "required": false
  6600. },
  6601. {
  6602. "name": "workspace",
  6603. "in": "query",
  6604. "schema": {
  6605. "type": "string"
  6606. },
  6607. "required": false
  6608. }
  6609. ],
  6610. "responses": {
  6611. "200": {
  6612. "description": "Permission processed successfully",
  6613. "content": {
  6614. "application/json": {
  6615. "schema": {
  6616. "type": "boolean",
  6617. "description": "Permission processed successfully"
  6618. }
  6619. }
  6620. }
  6621. },
  6622. "400": {
  6623. "description": "Bad request",
  6624. "content": {
  6625. "application/json": {
  6626. "schema": {
  6627. "$ref": "#/components/schemas/BadRequestError"
  6628. }
  6629. }
  6630. }
  6631. },
  6632. "404": {
  6633. "description": "Not found",
  6634. "content": {
  6635. "application/json": {
  6636. "schema": {
  6637. "$ref": "#/components/schemas/NotFoundError"
  6638. }
  6639. }
  6640. }
  6641. }
  6642. },
  6643. "description": "Approve or deny a permission request from the AI assistant.",
  6644. "summary": "Respond to permission",
  6645. "deprecated": true,
  6646. "requestBody": {
  6647. "content": {
  6648. "application/json": {
  6649. "schema": {
  6650. "type": "object",
  6651. "properties": {
  6652. "response": {
  6653. "type": "string",
  6654. "enum": ["once", "always", "reject"]
  6655. }
  6656. },
  6657. "required": ["response"],
  6658. "additionalProperties": false
  6659. }
  6660. }
  6661. }
  6662. },
  6663. "x-codeSamples": [
  6664. {
  6665. "lang": "js",
  6666. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  6667. }
  6668. ]
  6669. }
  6670. },
  6671. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  6672. "delete": {
  6673. "tags": ["session"],
  6674. "operationId": "part.delete",
  6675. "parameters": [
  6676. {
  6677. "name": "sessionID",
  6678. "in": "path",
  6679. "schema": {
  6680. "type": "string",
  6681. "pattern": "^ses"
  6682. },
  6683. "required": true
  6684. },
  6685. {
  6686. "name": "messageID",
  6687. "in": "path",
  6688. "schema": {
  6689. "type": "string",
  6690. "pattern": "^msg"
  6691. },
  6692. "required": true
  6693. },
  6694. {
  6695. "name": "partID",
  6696. "in": "path",
  6697. "schema": {
  6698. "type": "string",
  6699. "pattern": "^prt"
  6700. },
  6701. "required": true
  6702. },
  6703. {
  6704. "name": "directory",
  6705. "in": "query",
  6706. "schema": {
  6707. "type": "string"
  6708. },
  6709. "required": false
  6710. },
  6711. {
  6712. "name": "workspace",
  6713. "in": "query",
  6714. "schema": {
  6715. "type": "string"
  6716. },
  6717. "required": false
  6718. }
  6719. ],
  6720. "responses": {
  6721. "200": {
  6722. "description": "Successfully deleted part",
  6723. "content": {
  6724. "application/json": {
  6725. "schema": {
  6726. "type": "boolean",
  6727. "description": "Successfully deleted part"
  6728. }
  6729. }
  6730. }
  6731. },
  6732. "400": {
  6733. "description": "Bad request",
  6734. "content": {
  6735. "application/json": {
  6736. "schema": {
  6737. "$ref": "#/components/schemas/BadRequestError"
  6738. }
  6739. }
  6740. }
  6741. },
  6742. "404": {
  6743. "description": "Not found",
  6744. "content": {
  6745. "application/json": {
  6746. "schema": {
  6747. "$ref": "#/components/schemas/NotFoundError"
  6748. }
  6749. }
  6750. }
  6751. }
  6752. },
  6753. "description": "Delete a part from a message.",
  6754. "x-codeSamples": [
  6755. {
  6756. "lang": "js",
  6757. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  6758. }
  6759. ]
  6760. },
  6761. "patch": {
  6762. "tags": ["session"],
  6763. "operationId": "part.update",
  6764. "parameters": [
  6765. {
  6766. "name": "sessionID",
  6767. "in": "path",
  6768. "schema": {
  6769. "type": "string",
  6770. "pattern": "^ses"
  6771. },
  6772. "required": true
  6773. },
  6774. {
  6775. "name": "messageID",
  6776. "in": "path",
  6777. "schema": {
  6778. "type": "string",
  6779. "pattern": "^msg"
  6780. },
  6781. "required": true
  6782. },
  6783. {
  6784. "name": "partID",
  6785. "in": "path",
  6786. "schema": {
  6787. "type": "string",
  6788. "pattern": "^prt"
  6789. },
  6790. "required": true
  6791. },
  6792. {
  6793. "name": "directory",
  6794. "in": "query",
  6795. "schema": {
  6796. "type": "string"
  6797. },
  6798. "required": false
  6799. },
  6800. {
  6801. "name": "workspace",
  6802. "in": "query",
  6803. "schema": {
  6804. "type": "string"
  6805. },
  6806. "required": false
  6807. }
  6808. ],
  6809. "responses": {
  6810. "200": {
  6811. "description": "Successfully updated part",
  6812. "content": {
  6813. "application/json": {
  6814. "schema": {
  6815. "$ref": "#/components/schemas/Part"
  6816. }
  6817. }
  6818. }
  6819. },
  6820. "400": {
  6821. "description": "Bad request",
  6822. "content": {
  6823. "application/json": {
  6824. "schema": {
  6825. "$ref": "#/components/schemas/BadRequestError"
  6826. }
  6827. }
  6828. }
  6829. },
  6830. "404": {
  6831. "description": "Not found",
  6832. "content": {
  6833. "application/json": {
  6834. "schema": {
  6835. "$ref": "#/components/schemas/NotFoundError"
  6836. }
  6837. }
  6838. }
  6839. }
  6840. },
  6841. "description": "Update a part in a message.",
  6842. "requestBody": {
  6843. "content": {
  6844. "application/json": {
  6845. "schema": {
  6846. "$ref": "#/components/schemas/Part"
  6847. }
  6848. }
  6849. }
  6850. },
  6851. "x-codeSamples": [
  6852. {
  6853. "lang": "js",
  6854. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  6855. }
  6856. ]
  6857. }
  6858. },
  6859. "/sync/start": {
  6860. "post": {
  6861. "tags": ["sync"],
  6862. "operationId": "sync.start",
  6863. "parameters": [
  6864. {
  6865. "name": "directory",
  6866. "in": "query",
  6867. "schema": {
  6868. "type": "string"
  6869. },
  6870. "required": false
  6871. },
  6872. {
  6873. "name": "workspace",
  6874. "in": "query",
  6875. "schema": {
  6876. "type": "string"
  6877. },
  6878. "required": false
  6879. }
  6880. ],
  6881. "responses": {
  6882. "200": {
  6883. "description": "Workspace sync started",
  6884. "content": {
  6885. "application/json": {
  6886. "schema": {
  6887. "type": "boolean",
  6888. "description": "Workspace sync started"
  6889. }
  6890. }
  6891. }
  6892. }
  6893. },
  6894. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  6895. "summary": "Start workspace sync",
  6896. "x-codeSamples": [
  6897. {
  6898. "lang": "js",
  6899. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  6900. }
  6901. ]
  6902. }
  6903. },
  6904. "/sync/replay": {
  6905. "post": {
  6906. "tags": ["sync"],
  6907. "operationId": "sync.replay",
  6908. "parameters": [
  6909. {
  6910. "name": "directory",
  6911. "in": "query",
  6912. "schema": {
  6913. "type": "string"
  6914. },
  6915. "required": false
  6916. },
  6917. {
  6918. "name": "workspace",
  6919. "in": "query",
  6920. "schema": {
  6921. "type": "string"
  6922. },
  6923. "required": false
  6924. }
  6925. ],
  6926. "responses": {
  6927. "200": {
  6928. "description": "Replayed sync events",
  6929. "content": {
  6930. "application/json": {
  6931. "schema": {
  6932. "type": "object",
  6933. "properties": {
  6934. "sessionID": {
  6935. "type": "string"
  6936. }
  6937. },
  6938. "required": ["sessionID"],
  6939. "additionalProperties": false,
  6940. "description": "Replayed sync events"
  6941. }
  6942. }
  6943. }
  6944. },
  6945. "400": {
  6946. "description": "Bad request",
  6947. "content": {
  6948. "application/json": {
  6949. "schema": {
  6950. "$ref": "#/components/schemas/BadRequestError"
  6951. }
  6952. }
  6953. }
  6954. }
  6955. },
  6956. "description": "Validate and replay a complete sync event history.",
  6957. "summary": "Replay sync events",
  6958. "requestBody": {
  6959. "content": {
  6960. "application/json": {
  6961. "schema": {
  6962. "type": "object",
  6963. "properties": {
  6964. "directory": {
  6965. "type": "string"
  6966. },
  6967. "events": {
  6968. "type": "array",
  6969. "minItems": 1,
  6970. "items": {
  6971. "type": "object",
  6972. "properties": {
  6973. "id": {
  6974. "type": "string"
  6975. },
  6976. "aggregateID": {
  6977. "type": "string"
  6978. },
  6979. "seq": {
  6980. "type": "integer",
  6981. "minimum": 0
  6982. },
  6983. "type": {
  6984. "type": "string"
  6985. },
  6986. "data": {
  6987. "type": "object"
  6988. }
  6989. },
  6990. "required": ["id", "aggregateID", "seq", "type", "data"],
  6991. "additionalProperties": false
  6992. }
  6993. }
  6994. },
  6995. "required": ["directory", "events"],
  6996. "additionalProperties": false
  6997. }
  6998. }
  6999. }
  7000. },
  7001. "x-codeSamples": [
  7002. {
  7003. "lang": "js",
  7004. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7005. }
  7006. ]
  7007. }
  7008. },
  7009. "/sync/steal": {
  7010. "post": {
  7011. "tags": ["sync"],
  7012. "operationId": "sync.steal",
  7013. "parameters": [
  7014. {
  7015. "name": "directory",
  7016. "in": "query",
  7017. "schema": {
  7018. "type": "string"
  7019. },
  7020. "required": false
  7021. },
  7022. {
  7023. "name": "workspace",
  7024. "in": "query",
  7025. "schema": {
  7026. "type": "string"
  7027. },
  7028. "required": false
  7029. }
  7030. ],
  7031. "responses": {
  7032. "200": {
  7033. "description": "Session stolen into workspace",
  7034. "content": {
  7035. "application/json": {
  7036. "schema": {
  7037. "type": "object",
  7038. "properties": {
  7039. "sessionID": {
  7040. "type": "string",
  7041. "pattern": "^ses"
  7042. }
  7043. },
  7044. "required": ["sessionID"],
  7045. "additionalProperties": false,
  7046. "description": "Session stolen into workspace"
  7047. }
  7048. }
  7049. }
  7050. },
  7051. "400": {
  7052. "description": "Bad request",
  7053. "content": {
  7054. "application/json": {
  7055. "schema": {
  7056. "$ref": "#/components/schemas/BadRequestError"
  7057. }
  7058. }
  7059. }
  7060. }
  7061. },
  7062. "description": "Update a session to belong to the current workspace through the sync event system.",
  7063. "summary": "Steal session into workspace",
  7064. "requestBody": {
  7065. "content": {
  7066. "application/json": {
  7067. "schema": {
  7068. "type": "object",
  7069. "properties": {
  7070. "sessionID": {
  7071. "type": "string",
  7072. "pattern": "^ses"
  7073. }
  7074. },
  7075. "required": ["sessionID"],
  7076. "additionalProperties": false
  7077. }
  7078. }
  7079. }
  7080. },
  7081. "x-codeSamples": [
  7082. {
  7083. "lang": "js",
  7084. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7085. }
  7086. ]
  7087. }
  7088. },
  7089. "/sync/history": {
  7090. "post": {
  7091. "tags": ["sync"],
  7092. "operationId": "sync.history.list",
  7093. "parameters": [
  7094. {
  7095. "name": "directory",
  7096. "in": "query",
  7097. "schema": {
  7098. "type": "string"
  7099. },
  7100. "required": false
  7101. },
  7102. {
  7103. "name": "workspace",
  7104. "in": "query",
  7105. "schema": {
  7106. "type": "string"
  7107. },
  7108. "required": false
  7109. }
  7110. ],
  7111. "responses": {
  7112. "200": {
  7113. "description": "Sync events",
  7114. "content": {
  7115. "application/json": {
  7116. "schema": {
  7117. "type": "array",
  7118. "items": {
  7119. "type": "object",
  7120. "properties": {
  7121. "id": {
  7122. "type": "string"
  7123. },
  7124. "aggregate_id": {
  7125. "type": "string"
  7126. },
  7127. "seq": {
  7128. "type": "integer",
  7129. "minimum": 0
  7130. },
  7131. "type": {
  7132. "type": "string"
  7133. },
  7134. "data": {
  7135. "type": "object"
  7136. }
  7137. },
  7138. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7139. "additionalProperties": false
  7140. },
  7141. "description": "Sync events"
  7142. }
  7143. }
  7144. }
  7145. },
  7146. "400": {
  7147. "description": "Bad request",
  7148. "content": {
  7149. "application/json": {
  7150. "schema": {
  7151. "$ref": "#/components/schemas/BadRequestError"
  7152. }
  7153. }
  7154. }
  7155. }
  7156. },
  7157. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  7158. "summary": "List sync events",
  7159. "requestBody": {
  7160. "content": {
  7161. "application/json": {
  7162. "schema": {
  7163. "type": "object",
  7164. "additionalProperties": {
  7165. "type": "integer",
  7166. "minimum": 0
  7167. }
  7168. }
  7169. }
  7170. }
  7171. },
  7172. "x-codeSamples": [
  7173. {
  7174. "lang": "js",
  7175. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  7176. }
  7177. ]
  7178. }
  7179. },
  7180. "/api/session": {
  7181. "get": {
  7182. "tags": ["v2"],
  7183. "operationId": "v2.session.list",
  7184. "parameters": [
  7185. {
  7186. "name": "directory",
  7187. "in": "query",
  7188. "schema": {
  7189. "type": "string"
  7190. },
  7191. "required": false
  7192. },
  7193. {
  7194. "name": "workspace",
  7195. "in": "query",
  7196. "schema": {
  7197. "type": "string"
  7198. },
  7199. "required": false
  7200. },
  7201. {
  7202. "name": "limit",
  7203. "in": "query",
  7204. "schema": {
  7205. "type": "number"
  7206. },
  7207. "required": false
  7208. },
  7209. {
  7210. "name": "order",
  7211. "in": "query",
  7212. "schema": {
  7213. "type": "string",
  7214. "enum": ["asc", "desc"]
  7215. },
  7216. "required": false
  7217. },
  7218. {
  7219. "name": "path",
  7220. "in": "query",
  7221. "schema": {
  7222. "type": "string"
  7223. },
  7224. "required": false
  7225. },
  7226. {
  7227. "name": "roots",
  7228. "in": "query",
  7229. "schema": {
  7230. "anyOf": [
  7231. {
  7232. "type": "boolean"
  7233. },
  7234. {
  7235. "type": "string",
  7236. "enum": ["true", "false"]
  7237. }
  7238. ]
  7239. },
  7240. "required": false
  7241. },
  7242. {
  7243. "name": "start",
  7244. "in": "query",
  7245. "schema": {
  7246. "type": "number"
  7247. },
  7248. "required": false
  7249. },
  7250. {
  7251. "name": "search",
  7252. "in": "query",
  7253. "schema": {
  7254. "type": "string"
  7255. },
  7256. "required": false
  7257. },
  7258. {
  7259. "name": "cursor",
  7260. "in": "query",
  7261. "schema": {
  7262. "type": "string",
  7263. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  7264. },
  7265. "required": false
  7266. }
  7267. ],
  7268. "responses": {
  7269. "200": {
  7270. "description": "V2SessionsResponse",
  7271. "content": {
  7272. "application/json": {
  7273. "schema": {
  7274. "$ref": "#/components/schemas/V2SessionsResponse"
  7275. }
  7276. }
  7277. }
  7278. },
  7279. "400": {
  7280. "description": "Bad request",
  7281. "content": {
  7282. "application/json": {
  7283. "schema": {
  7284. "$ref": "#/components/schemas/BadRequestError"
  7285. }
  7286. }
  7287. }
  7288. }
  7289. },
  7290. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  7291. "summary": "List v2 sessions",
  7292. "x-codeSamples": [
  7293. {
  7294. "lang": "js",
  7295. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  7296. }
  7297. ]
  7298. }
  7299. },
  7300. "/api/session/{sessionID}/prompt": {
  7301. "post": {
  7302. "tags": ["v2"],
  7303. "operationId": "v2.session.prompt",
  7304. "parameters": [
  7305. {
  7306. "name": "sessionID",
  7307. "in": "path",
  7308. "schema": {
  7309. "type": "string",
  7310. "pattern": "^ses"
  7311. },
  7312. "required": true
  7313. },
  7314. {
  7315. "name": "directory",
  7316. "in": "query",
  7317. "schema": {
  7318. "type": "string"
  7319. },
  7320. "required": false
  7321. },
  7322. {
  7323. "name": "workspace",
  7324. "in": "query",
  7325. "schema": {
  7326. "type": "string"
  7327. },
  7328. "required": false
  7329. }
  7330. ],
  7331. "responses": {
  7332. "200": {
  7333. "description": "Session.Message",
  7334. "content": {
  7335. "application/json": {
  7336. "schema": {
  7337. "$ref": "#/components/schemas/SessionMessage"
  7338. }
  7339. }
  7340. }
  7341. }
  7342. },
  7343. "description": "Create a v2 session message and queue it for the agent loop.",
  7344. "summary": "Send v2 message",
  7345. "requestBody": {
  7346. "content": {
  7347. "application/json": {
  7348. "schema": {
  7349. "type": "object",
  7350. "properties": {
  7351. "prompt": {
  7352. "$ref": "#/components/schemas/Prompt"
  7353. },
  7354. "delivery": {
  7355. "$ref": "#/components/schemas/SessionDelivery"
  7356. }
  7357. },
  7358. "required": ["prompt"],
  7359. "additionalProperties": false
  7360. }
  7361. }
  7362. }
  7363. },
  7364. "x-codeSamples": [
  7365. {
  7366. "lang": "js",
  7367. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  7368. }
  7369. ]
  7370. }
  7371. },
  7372. "/api/session/{sessionID}/compact": {
  7373. "post": {
  7374. "tags": ["v2"],
  7375. "operationId": "v2.session.compact",
  7376. "parameters": [
  7377. {
  7378. "name": "sessionID",
  7379. "in": "path",
  7380. "schema": {
  7381. "type": "string",
  7382. "pattern": "^ses"
  7383. },
  7384. "required": true
  7385. },
  7386. {
  7387. "name": "directory",
  7388. "in": "query",
  7389. "schema": {
  7390. "type": "string"
  7391. },
  7392. "required": false
  7393. },
  7394. {
  7395. "name": "workspace",
  7396. "in": "query",
  7397. "schema": {
  7398. "type": "string"
  7399. },
  7400. "required": false
  7401. }
  7402. ],
  7403. "responses": {
  7404. "204": {
  7405. "description": "<No Content>"
  7406. }
  7407. },
  7408. "description": "Compact a v2 session conversation.",
  7409. "summary": "Compact v2 session",
  7410. "x-codeSamples": [
  7411. {
  7412. "lang": "js",
  7413. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  7414. }
  7415. ]
  7416. }
  7417. },
  7418. "/api/session/{sessionID}/wait": {
  7419. "post": {
  7420. "tags": ["v2"],
  7421. "operationId": "v2.session.wait",
  7422. "parameters": [
  7423. {
  7424. "name": "sessionID",
  7425. "in": "path",
  7426. "schema": {
  7427. "type": "string",
  7428. "pattern": "^ses"
  7429. },
  7430. "required": true
  7431. },
  7432. {
  7433. "name": "directory",
  7434. "in": "query",
  7435. "schema": {
  7436. "type": "string"
  7437. },
  7438. "required": false
  7439. },
  7440. {
  7441. "name": "workspace",
  7442. "in": "query",
  7443. "schema": {
  7444. "type": "string"
  7445. },
  7446. "required": false
  7447. }
  7448. ],
  7449. "responses": {
  7450. "204": {
  7451. "description": "<No Content>"
  7452. }
  7453. },
  7454. "description": "Wait for a v2 session agent loop to become idle.",
  7455. "summary": "Wait for v2 session",
  7456. "x-codeSamples": [
  7457. {
  7458. "lang": "js",
  7459. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  7460. }
  7461. ]
  7462. }
  7463. },
  7464. "/api/session/{sessionID}/context": {
  7465. "get": {
  7466. "tags": ["v2"],
  7467. "operationId": "v2.session.context",
  7468. "parameters": [
  7469. {
  7470. "name": "sessionID",
  7471. "in": "path",
  7472. "schema": {
  7473. "type": "string",
  7474. "pattern": "^ses"
  7475. },
  7476. "required": true
  7477. },
  7478. {
  7479. "name": "directory",
  7480. "in": "query",
  7481. "schema": {
  7482. "type": "string"
  7483. },
  7484. "required": false
  7485. },
  7486. {
  7487. "name": "workspace",
  7488. "in": "query",
  7489. "schema": {
  7490. "type": "string"
  7491. },
  7492. "required": false
  7493. }
  7494. ],
  7495. "responses": {
  7496. "200": {
  7497. "description": "Success",
  7498. "content": {
  7499. "application/json": {
  7500. "schema": {
  7501. "type": "array",
  7502. "items": {
  7503. "$ref": "#/components/schemas/SessionMessage"
  7504. }
  7505. }
  7506. }
  7507. }
  7508. }
  7509. },
  7510. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  7511. "summary": "Get v2 session context",
  7512. "x-codeSamples": [
  7513. {
  7514. "lang": "js",
  7515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  7516. }
  7517. ]
  7518. }
  7519. },
  7520. "/api/session/{sessionID}/message": {
  7521. "get": {
  7522. "tags": ["v2 messages"],
  7523. "operationId": "v2.session.messages",
  7524. "parameters": [
  7525. {
  7526. "name": "sessionID",
  7527. "in": "path",
  7528. "schema": {
  7529. "type": "string",
  7530. "pattern": "^ses"
  7531. },
  7532. "required": true
  7533. },
  7534. {
  7535. "name": "directory",
  7536. "in": "query",
  7537. "schema": {
  7538. "type": "string"
  7539. },
  7540. "required": false
  7541. },
  7542. {
  7543. "name": "workspace",
  7544. "in": "query",
  7545. "schema": {
  7546. "type": "string"
  7547. },
  7548. "required": false
  7549. },
  7550. {
  7551. "name": "limit",
  7552. "in": "query",
  7553. "schema": {
  7554. "type": "number"
  7555. },
  7556. "required": false
  7557. },
  7558. {
  7559. "name": "order",
  7560. "in": "query",
  7561. "schema": {
  7562. "type": "string",
  7563. "enum": ["asc", "desc"]
  7564. },
  7565. "required": false
  7566. },
  7567. {
  7568. "name": "cursor",
  7569. "in": "query",
  7570. "schema": {
  7571. "type": "string",
  7572. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  7573. },
  7574. "required": false
  7575. }
  7576. ],
  7577. "responses": {
  7578. "200": {
  7579. "description": "V2SessionMessagesResponse",
  7580. "content": {
  7581. "application/json": {
  7582. "schema": {
  7583. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  7584. }
  7585. }
  7586. }
  7587. },
  7588. "400": {
  7589. "description": "Bad request",
  7590. "content": {
  7591. "application/json": {
  7592. "schema": {
  7593. "$ref": "#/components/schemas/BadRequestError"
  7594. }
  7595. }
  7596. }
  7597. }
  7598. },
  7599. "description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  7600. "summary": "Get v2 session messages",
  7601. "x-codeSamples": [
  7602. {
  7603. "lang": "js",
  7604. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  7605. }
  7606. ]
  7607. }
  7608. },
  7609. "/tui/append-prompt": {
  7610. "post": {
  7611. "tags": ["tui"],
  7612. "operationId": "tui.appendPrompt",
  7613. "parameters": [
  7614. {
  7615. "name": "directory",
  7616. "in": "query",
  7617. "schema": {
  7618. "type": "string"
  7619. },
  7620. "required": false
  7621. },
  7622. {
  7623. "name": "workspace",
  7624. "in": "query",
  7625. "schema": {
  7626. "type": "string"
  7627. },
  7628. "required": false
  7629. }
  7630. ],
  7631. "responses": {
  7632. "200": {
  7633. "description": "Prompt processed successfully",
  7634. "content": {
  7635. "application/json": {
  7636. "schema": {
  7637. "type": "boolean",
  7638. "description": "Prompt processed successfully"
  7639. }
  7640. }
  7641. }
  7642. },
  7643. "400": {
  7644. "description": "Bad request",
  7645. "content": {
  7646. "application/json": {
  7647. "schema": {
  7648. "$ref": "#/components/schemas/BadRequestError"
  7649. }
  7650. }
  7651. }
  7652. }
  7653. },
  7654. "description": "Append prompt to the TUI.",
  7655. "summary": "Append TUI prompt",
  7656. "requestBody": {
  7657. "content": {
  7658. "application/json": {
  7659. "schema": {
  7660. "type": "object",
  7661. "properties": {
  7662. "text": {
  7663. "type": "string"
  7664. }
  7665. },
  7666. "required": ["text"],
  7667. "additionalProperties": false
  7668. }
  7669. }
  7670. }
  7671. },
  7672. "x-codeSamples": [
  7673. {
  7674. "lang": "js",
  7675. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  7676. }
  7677. ]
  7678. }
  7679. },
  7680. "/tui/open-help": {
  7681. "post": {
  7682. "tags": ["tui"],
  7683. "operationId": "tui.openHelp",
  7684. "parameters": [
  7685. {
  7686. "name": "directory",
  7687. "in": "query",
  7688. "schema": {
  7689. "type": "string"
  7690. },
  7691. "required": false
  7692. },
  7693. {
  7694. "name": "workspace",
  7695. "in": "query",
  7696. "schema": {
  7697. "type": "string"
  7698. },
  7699. "required": false
  7700. }
  7701. ],
  7702. "responses": {
  7703. "200": {
  7704. "description": "Help dialog opened successfully",
  7705. "content": {
  7706. "application/json": {
  7707. "schema": {
  7708. "type": "boolean",
  7709. "description": "Help dialog opened successfully"
  7710. }
  7711. }
  7712. }
  7713. }
  7714. },
  7715. "description": "Open the help dialog in the TUI to display user assistance information.",
  7716. "summary": "Open help dialog",
  7717. "x-codeSamples": [
  7718. {
  7719. "lang": "js",
  7720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  7721. }
  7722. ]
  7723. }
  7724. },
  7725. "/tui/open-sessions": {
  7726. "post": {
  7727. "tags": ["tui"],
  7728. "operationId": "tui.openSessions",
  7729. "parameters": [
  7730. {
  7731. "name": "directory",
  7732. "in": "query",
  7733. "schema": {
  7734. "type": "string"
  7735. },
  7736. "required": false
  7737. },
  7738. {
  7739. "name": "workspace",
  7740. "in": "query",
  7741. "schema": {
  7742. "type": "string"
  7743. },
  7744. "required": false
  7745. }
  7746. ],
  7747. "responses": {
  7748. "200": {
  7749. "description": "Session dialog opened successfully",
  7750. "content": {
  7751. "application/json": {
  7752. "schema": {
  7753. "type": "boolean",
  7754. "description": "Session dialog opened successfully"
  7755. }
  7756. }
  7757. }
  7758. }
  7759. },
  7760. "description": "Open the session dialog.",
  7761. "summary": "Open sessions dialog",
  7762. "x-codeSamples": [
  7763. {
  7764. "lang": "js",
  7765. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  7766. }
  7767. ]
  7768. }
  7769. },
  7770. "/tui/open-themes": {
  7771. "post": {
  7772. "tags": ["tui"],
  7773. "operationId": "tui.openThemes",
  7774. "parameters": [
  7775. {
  7776. "name": "directory",
  7777. "in": "query",
  7778. "schema": {
  7779. "type": "string"
  7780. },
  7781. "required": false
  7782. },
  7783. {
  7784. "name": "workspace",
  7785. "in": "query",
  7786. "schema": {
  7787. "type": "string"
  7788. },
  7789. "required": false
  7790. }
  7791. ],
  7792. "responses": {
  7793. "200": {
  7794. "description": "Theme dialog opened successfully",
  7795. "content": {
  7796. "application/json": {
  7797. "schema": {
  7798. "type": "boolean",
  7799. "description": "Theme dialog opened successfully"
  7800. }
  7801. }
  7802. }
  7803. }
  7804. },
  7805. "description": "Open the theme dialog.",
  7806. "summary": "Open themes dialog",
  7807. "x-codeSamples": [
  7808. {
  7809. "lang": "js",
  7810. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  7811. }
  7812. ]
  7813. }
  7814. },
  7815. "/tui/open-models": {
  7816. "post": {
  7817. "tags": ["tui"],
  7818. "operationId": "tui.openModels",
  7819. "parameters": [
  7820. {
  7821. "name": "directory",
  7822. "in": "query",
  7823. "schema": {
  7824. "type": "string"
  7825. },
  7826. "required": false
  7827. },
  7828. {
  7829. "name": "workspace",
  7830. "in": "query",
  7831. "schema": {
  7832. "type": "string"
  7833. },
  7834. "required": false
  7835. }
  7836. ],
  7837. "responses": {
  7838. "200": {
  7839. "description": "Model dialog opened successfully",
  7840. "content": {
  7841. "application/json": {
  7842. "schema": {
  7843. "type": "boolean",
  7844. "description": "Model dialog opened successfully"
  7845. }
  7846. }
  7847. }
  7848. }
  7849. },
  7850. "description": "Open the model dialog.",
  7851. "summary": "Open models dialog",
  7852. "x-codeSamples": [
  7853. {
  7854. "lang": "js",
  7855. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  7856. }
  7857. ]
  7858. }
  7859. },
  7860. "/tui/submit-prompt": {
  7861. "post": {
  7862. "tags": ["tui"],
  7863. "operationId": "tui.submitPrompt",
  7864. "parameters": [
  7865. {
  7866. "name": "directory",
  7867. "in": "query",
  7868. "schema": {
  7869. "type": "string"
  7870. },
  7871. "required": false
  7872. },
  7873. {
  7874. "name": "workspace",
  7875. "in": "query",
  7876. "schema": {
  7877. "type": "string"
  7878. },
  7879. "required": false
  7880. }
  7881. ],
  7882. "responses": {
  7883. "200": {
  7884. "description": "Prompt submitted successfully",
  7885. "content": {
  7886. "application/json": {
  7887. "schema": {
  7888. "type": "boolean",
  7889. "description": "Prompt submitted successfully"
  7890. }
  7891. }
  7892. }
  7893. }
  7894. },
  7895. "description": "Submit the prompt.",
  7896. "summary": "Submit TUI prompt",
  7897. "x-codeSamples": [
  7898. {
  7899. "lang": "js",
  7900. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  7901. }
  7902. ]
  7903. }
  7904. },
  7905. "/tui/clear-prompt": {
  7906. "post": {
  7907. "tags": ["tui"],
  7908. "operationId": "tui.clearPrompt",
  7909. "parameters": [
  7910. {
  7911. "name": "directory",
  7912. "in": "query",
  7913. "schema": {
  7914. "type": "string"
  7915. },
  7916. "required": false
  7917. },
  7918. {
  7919. "name": "workspace",
  7920. "in": "query",
  7921. "schema": {
  7922. "type": "string"
  7923. },
  7924. "required": false
  7925. }
  7926. ],
  7927. "responses": {
  7928. "200": {
  7929. "description": "Prompt cleared successfully",
  7930. "content": {
  7931. "application/json": {
  7932. "schema": {
  7933. "type": "boolean",
  7934. "description": "Prompt cleared successfully"
  7935. }
  7936. }
  7937. }
  7938. }
  7939. },
  7940. "description": "Clear the prompt.",
  7941. "summary": "Clear TUI prompt",
  7942. "x-codeSamples": [
  7943. {
  7944. "lang": "js",
  7945. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  7946. }
  7947. ]
  7948. }
  7949. },
  7950. "/tui/execute-command": {
  7951. "post": {
  7952. "tags": ["tui"],
  7953. "operationId": "tui.executeCommand",
  7954. "parameters": [
  7955. {
  7956. "name": "directory",
  7957. "in": "query",
  7958. "schema": {
  7959. "type": "string"
  7960. },
  7961. "required": false
  7962. },
  7963. {
  7964. "name": "workspace",
  7965. "in": "query",
  7966. "schema": {
  7967. "type": "string"
  7968. },
  7969. "required": false
  7970. }
  7971. ],
  7972. "responses": {
  7973. "200": {
  7974. "description": "Command executed successfully",
  7975. "content": {
  7976. "application/json": {
  7977. "schema": {
  7978. "type": "boolean",
  7979. "description": "Command executed successfully"
  7980. }
  7981. }
  7982. }
  7983. },
  7984. "400": {
  7985. "description": "Bad request",
  7986. "content": {
  7987. "application/json": {
  7988. "schema": {
  7989. "$ref": "#/components/schemas/BadRequestError"
  7990. }
  7991. }
  7992. }
  7993. }
  7994. },
  7995. "description": "Execute a TUI command.",
  7996. "summary": "Execute TUI command",
  7997. "requestBody": {
  7998. "content": {
  7999. "application/json": {
  8000. "schema": {
  8001. "type": "object",
  8002. "properties": {
  8003. "command": {
  8004. "type": "string"
  8005. }
  8006. },
  8007. "required": ["command"],
  8008. "additionalProperties": false
  8009. }
  8010. }
  8011. }
  8012. },
  8013. "x-codeSamples": [
  8014. {
  8015. "lang": "js",
  8016. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8017. }
  8018. ]
  8019. }
  8020. },
  8021. "/tui/show-toast": {
  8022. "post": {
  8023. "tags": ["tui"],
  8024. "operationId": "tui.showToast",
  8025. "parameters": [
  8026. {
  8027. "name": "directory",
  8028. "in": "query",
  8029. "schema": {
  8030. "type": "string"
  8031. },
  8032. "required": false
  8033. },
  8034. {
  8035. "name": "workspace",
  8036. "in": "query",
  8037. "schema": {
  8038. "type": "string"
  8039. },
  8040. "required": false
  8041. }
  8042. ],
  8043. "responses": {
  8044. "200": {
  8045. "description": "Toast notification shown successfully",
  8046. "content": {
  8047. "application/json": {
  8048. "schema": {
  8049. "type": "boolean",
  8050. "description": "Toast notification shown successfully"
  8051. }
  8052. }
  8053. }
  8054. }
  8055. },
  8056. "description": "Show a toast notification in the TUI.",
  8057. "summary": "Show TUI toast",
  8058. "requestBody": {
  8059. "content": {
  8060. "application/json": {
  8061. "schema": {
  8062. "type": "object",
  8063. "properties": {
  8064. "title": {
  8065. "type": "string"
  8066. },
  8067. "message": {
  8068. "type": "string"
  8069. },
  8070. "variant": {
  8071. "type": "string",
  8072. "enum": ["info", "success", "warning", "error"]
  8073. },
  8074. "duration": {
  8075. "type": "integer",
  8076. "exclusiveMinimum": 0
  8077. }
  8078. },
  8079. "required": ["message", "variant"],
  8080. "additionalProperties": false
  8081. }
  8082. }
  8083. }
  8084. },
  8085. "x-codeSamples": [
  8086. {
  8087. "lang": "js",
  8088. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8089. }
  8090. ]
  8091. }
  8092. },
  8093. "/tui/publish": {
  8094. "post": {
  8095. "tags": ["tui"],
  8096. "operationId": "tui.publish",
  8097. "parameters": [
  8098. {
  8099. "name": "directory",
  8100. "in": "query",
  8101. "schema": {
  8102. "type": "string"
  8103. },
  8104. "required": false
  8105. },
  8106. {
  8107. "name": "workspace",
  8108. "in": "query",
  8109. "schema": {
  8110. "type": "string"
  8111. },
  8112. "required": false
  8113. }
  8114. ],
  8115. "responses": {
  8116. "200": {
  8117. "description": "Event published successfully",
  8118. "content": {
  8119. "application/json": {
  8120. "schema": {
  8121. "type": "boolean",
  8122. "description": "Event published successfully"
  8123. }
  8124. }
  8125. }
  8126. },
  8127. "400": {
  8128. "description": "Bad request",
  8129. "content": {
  8130. "application/json": {
  8131. "schema": {
  8132. "$ref": "#/components/schemas/BadRequestError"
  8133. }
  8134. }
  8135. }
  8136. }
  8137. },
  8138. "description": "Publish a TUI event.",
  8139. "summary": "Publish TUI event",
  8140. "requestBody": {
  8141. "content": {
  8142. "application/json": {
  8143. "schema": {
  8144. "anyOf": [
  8145. {
  8146. "$ref": "#/components/schemas/EventTuiPromptAppend"
  8147. },
  8148. {
  8149. "$ref": "#/components/schemas/EventTuiCommandExecute"
  8150. },
  8151. {
  8152. "$ref": "#/components/schemas/EventTuiToastShow"
  8153. },
  8154. {
  8155. "$ref": "#/components/schemas/EventTuiSessionSelect"
  8156. }
  8157. ]
  8158. }
  8159. }
  8160. }
  8161. },
  8162. "x-codeSamples": [
  8163. {
  8164. "lang": "js",
  8165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  8166. }
  8167. ]
  8168. }
  8169. },
  8170. "/tui/select-session": {
  8171. "post": {
  8172. "tags": ["tui"],
  8173. "operationId": "tui.selectSession",
  8174. "parameters": [
  8175. {
  8176. "name": "directory",
  8177. "in": "query",
  8178. "schema": {
  8179. "type": "string"
  8180. },
  8181. "required": false
  8182. },
  8183. {
  8184. "name": "workspace",
  8185. "in": "query",
  8186. "schema": {
  8187. "type": "string"
  8188. },
  8189. "required": false
  8190. }
  8191. ],
  8192. "responses": {
  8193. "200": {
  8194. "description": "Session selected successfully",
  8195. "content": {
  8196. "application/json": {
  8197. "schema": {
  8198. "type": "boolean",
  8199. "description": "Session selected successfully"
  8200. }
  8201. }
  8202. }
  8203. },
  8204. "400": {
  8205. "description": "Bad request",
  8206. "content": {
  8207. "application/json": {
  8208. "schema": {
  8209. "$ref": "#/components/schemas/BadRequestError"
  8210. }
  8211. }
  8212. }
  8213. },
  8214. "404": {
  8215. "description": "NotFoundError",
  8216. "content": {
  8217. "application/json": {
  8218. "schema": {
  8219. "$ref": "#/components/schemas/NotFoundError"
  8220. }
  8221. }
  8222. }
  8223. }
  8224. },
  8225. "description": "Navigate the TUI to display the specified session.",
  8226. "summary": "Select session",
  8227. "requestBody": {
  8228. "content": {
  8229. "application/json": {
  8230. "schema": {
  8231. "type": "object",
  8232. "properties": {
  8233. "sessionID": {
  8234. "type": "string",
  8235. "pattern": "^ses",
  8236. "description": "Session ID to navigate to"
  8237. }
  8238. },
  8239. "required": ["sessionID"],
  8240. "additionalProperties": false
  8241. }
  8242. }
  8243. }
  8244. },
  8245. "x-codeSamples": [
  8246. {
  8247. "lang": "js",
  8248. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  8249. }
  8250. ]
  8251. }
  8252. },
  8253. "/tui/control/next": {
  8254. "get": {
  8255. "tags": ["tui"],
  8256. "operationId": "tui.control.next",
  8257. "parameters": [
  8258. {
  8259. "name": "directory",
  8260. "in": "query",
  8261. "schema": {
  8262. "type": "string"
  8263. },
  8264. "required": false
  8265. },
  8266. {
  8267. "name": "workspace",
  8268. "in": "query",
  8269. "schema": {
  8270. "type": "string"
  8271. },
  8272. "required": false
  8273. }
  8274. ],
  8275. "responses": {
  8276. "200": {
  8277. "description": "Next TUI request",
  8278. "content": {
  8279. "application/json": {
  8280. "schema": {
  8281. "type": "object",
  8282. "properties": {
  8283. "path": {
  8284. "type": "string"
  8285. },
  8286. "body": {}
  8287. },
  8288. "required": ["path", "body"],
  8289. "additionalProperties": false,
  8290. "description": "Next TUI request"
  8291. }
  8292. }
  8293. }
  8294. }
  8295. },
  8296. "description": "Retrieve the next TUI request from the queue for processing.",
  8297. "summary": "Get next TUI request",
  8298. "x-codeSamples": [
  8299. {
  8300. "lang": "js",
  8301. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  8302. }
  8303. ]
  8304. }
  8305. },
  8306. "/tui/control/response": {
  8307. "post": {
  8308. "tags": ["tui"],
  8309. "operationId": "tui.control.response",
  8310. "parameters": [
  8311. {
  8312. "name": "directory",
  8313. "in": "query",
  8314. "schema": {
  8315. "type": "string"
  8316. },
  8317. "required": false
  8318. },
  8319. {
  8320. "name": "workspace",
  8321. "in": "query",
  8322. "schema": {
  8323. "type": "string"
  8324. },
  8325. "required": false
  8326. }
  8327. ],
  8328. "responses": {
  8329. "200": {
  8330. "description": "Response submitted successfully",
  8331. "content": {
  8332. "application/json": {
  8333. "schema": {
  8334. "type": "boolean",
  8335. "description": "Response submitted successfully"
  8336. }
  8337. }
  8338. }
  8339. }
  8340. },
  8341. "description": "Submit a response to the TUI request queue to complete a pending request.",
  8342. "summary": "Submit TUI response",
  8343. "requestBody": {
  8344. "content": {
  8345. "application/json": {
  8346. "schema": {}
  8347. }
  8348. }
  8349. },
  8350. "x-codeSamples": [
  8351. {
  8352. "lang": "js",
  8353. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  8354. }
  8355. ]
  8356. }
  8357. },
  8358. "/experimental/workspace/adapter": {
  8359. "get": {
  8360. "tags": ["workspace"],
  8361. "operationId": "experimental.workspace.adapter.list",
  8362. "parameters": [
  8363. {
  8364. "name": "directory",
  8365. "in": "query",
  8366. "schema": {
  8367. "type": "string"
  8368. },
  8369. "required": false
  8370. },
  8371. {
  8372. "name": "workspace",
  8373. "in": "query",
  8374. "schema": {
  8375. "type": "string"
  8376. },
  8377. "required": false
  8378. }
  8379. ],
  8380. "responses": {
  8381. "200": {
  8382. "description": "Workspace adapters",
  8383. "content": {
  8384. "application/json": {
  8385. "schema": {
  8386. "type": "array",
  8387. "items": {
  8388. "type": "object",
  8389. "properties": {
  8390. "type": {
  8391. "type": "string"
  8392. },
  8393. "name": {
  8394. "type": "string"
  8395. },
  8396. "description": {
  8397. "type": "string"
  8398. }
  8399. },
  8400. "required": ["type", "name", "description"],
  8401. "additionalProperties": false
  8402. },
  8403. "description": "Workspace adapters"
  8404. }
  8405. }
  8406. }
  8407. }
  8408. },
  8409. "description": "List all available workspace adapters for the current project.",
  8410. "summary": "List workspace adapters",
  8411. "x-codeSamples": [
  8412. {
  8413. "lang": "js",
  8414. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  8415. }
  8416. ]
  8417. }
  8418. },
  8419. "/experimental/workspace": {
  8420. "get": {
  8421. "tags": ["workspace"],
  8422. "operationId": "experimental.workspace.list",
  8423. "parameters": [
  8424. {
  8425. "name": "directory",
  8426. "in": "query",
  8427. "schema": {
  8428. "type": "string"
  8429. },
  8430. "required": false
  8431. },
  8432. {
  8433. "name": "workspace",
  8434. "in": "query",
  8435. "schema": {
  8436. "type": "string"
  8437. },
  8438. "required": false
  8439. }
  8440. ],
  8441. "responses": {
  8442. "200": {
  8443. "description": "Workspaces",
  8444. "content": {
  8445. "application/json": {
  8446. "schema": {
  8447. "type": "array",
  8448. "items": {
  8449. "$ref": "#/components/schemas/Workspace"
  8450. },
  8451. "description": "Workspaces"
  8452. }
  8453. }
  8454. }
  8455. }
  8456. },
  8457. "description": "List all workspaces.",
  8458. "summary": "List workspaces",
  8459. "x-codeSamples": [
  8460. {
  8461. "lang": "js",
  8462. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  8463. }
  8464. ]
  8465. },
  8466. "post": {
  8467. "tags": ["workspace"],
  8468. "operationId": "experimental.workspace.create",
  8469. "parameters": [
  8470. {
  8471. "name": "directory",
  8472. "in": "query",
  8473. "schema": {
  8474. "type": "string"
  8475. },
  8476. "required": false
  8477. },
  8478. {
  8479. "name": "workspace",
  8480. "in": "query",
  8481. "schema": {
  8482. "type": "string"
  8483. },
  8484. "required": false
  8485. }
  8486. ],
  8487. "responses": {
  8488. "200": {
  8489. "description": "Workspace created",
  8490. "content": {
  8491. "application/json": {
  8492. "schema": {
  8493. "$ref": "#/components/schemas/Workspace"
  8494. }
  8495. }
  8496. }
  8497. },
  8498. "400": {
  8499. "description": "Bad request",
  8500. "content": {
  8501. "application/json": {
  8502. "schema": {
  8503. "$ref": "#/components/schemas/BadRequestError"
  8504. }
  8505. }
  8506. }
  8507. }
  8508. },
  8509. "description": "Create a workspace for the current project.",
  8510. "summary": "Create workspace",
  8511. "requestBody": {
  8512. "content": {
  8513. "application/json": {
  8514. "schema": {
  8515. "type": "object",
  8516. "properties": {
  8517. "id": {
  8518. "type": "string",
  8519. "pattern": "^wrk"
  8520. },
  8521. "type": {
  8522. "type": "string"
  8523. },
  8524. "branch": {
  8525. "anyOf": [
  8526. {
  8527. "type": "string"
  8528. },
  8529. {
  8530. "type": "null"
  8531. }
  8532. ]
  8533. },
  8534. "extra": {
  8535. "anyOf": [
  8536. {},
  8537. {
  8538. "type": "null"
  8539. }
  8540. ]
  8541. }
  8542. },
  8543. "required": ["type"],
  8544. "additionalProperties": false
  8545. }
  8546. }
  8547. }
  8548. },
  8549. "x-codeSamples": [
  8550. {
  8551. "lang": "js",
  8552. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  8553. }
  8554. ]
  8555. }
  8556. },
  8557. "/experimental/workspace/sync-list": {
  8558. "post": {
  8559. "tags": ["workspace"],
  8560. "operationId": "experimental.workspace.syncList",
  8561. "parameters": [
  8562. {
  8563. "name": "directory",
  8564. "in": "query",
  8565. "schema": {
  8566. "type": "string"
  8567. },
  8568. "required": false
  8569. },
  8570. {
  8571. "name": "workspace",
  8572. "in": "query",
  8573. "schema": {
  8574. "type": "string"
  8575. },
  8576. "required": false
  8577. }
  8578. ],
  8579. "responses": {
  8580. "204": {
  8581. "description": "Workspace list synced"
  8582. }
  8583. },
  8584. "description": "Register missing workspaces returned by workspace adapters.",
  8585. "summary": "Sync workspace list",
  8586. "x-codeSamples": [
  8587. {
  8588. "lang": "js",
  8589. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  8590. }
  8591. ]
  8592. }
  8593. },
  8594. "/experimental/workspace/status": {
  8595. "get": {
  8596. "tags": ["workspace"],
  8597. "operationId": "experimental.workspace.status",
  8598. "parameters": [
  8599. {
  8600. "name": "directory",
  8601. "in": "query",
  8602. "schema": {
  8603. "type": "string"
  8604. },
  8605. "required": false
  8606. },
  8607. {
  8608. "name": "workspace",
  8609. "in": "query",
  8610. "schema": {
  8611. "type": "string"
  8612. },
  8613. "required": false
  8614. }
  8615. ],
  8616. "responses": {
  8617. "200": {
  8618. "description": "Workspace status",
  8619. "content": {
  8620. "application/json": {
  8621. "schema": {
  8622. "type": "array",
  8623. "items": {
  8624. "type": "object",
  8625. "properties": {
  8626. "workspaceID": {
  8627. "type": "string",
  8628. "pattern": "^wrk"
  8629. },
  8630. "status": {
  8631. "type": "string",
  8632. "enum": ["connected", "connecting", "disconnected", "error"]
  8633. }
  8634. },
  8635. "required": ["workspaceID", "status"],
  8636. "additionalProperties": false
  8637. },
  8638. "description": "Workspace status"
  8639. }
  8640. }
  8641. }
  8642. }
  8643. },
  8644. "description": "Get connection status for workspaces in the current project.",
  8645. "summary": "Workspace status",
  8646. "x-codeSamples": [
  8647. {
  8648. "lang": "js",
  8649. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  8650. }
  8651. ]
  8652. }
  8653. },
  8654. "/experimental/workspace/{id}": {
  8655. "delete": {
  8656. "tags": ["workspace"],
  8657. "operationId": "experimental.workspace.remove",
  8658. "parameters": [
  8659. {
  8660. "name": "id",
  8661. "in": "path",
  8662. "schema": {
  8663. "type": "string",
  8664. "pattern": "^wrk"
  8665. },
  8666. "required": true
  8667. },
  8668. {
  8669. "name": "directory",
  8670. "in": "query",
  8671. "schema": {
  8672. "type": "string"
  8673. },
  8674. "required": false
  8675. },
  8676. {
  8677. "name": "workspace",
  8678. "in": "query",
  8679. "schema": {
  8680. "type": "string"
  8681. },
  8682. "required": false
  8683. }
  8684. ],
  8685. "responses": {
  8686. "200": {
  8687. "description": "Workspace removed",
  8688. "content": {
  8689. "application/json": {
  8690. "schema": {
  8691. "$ref": "#/components/schemas/Workspace"
  8692. }
  8693. }
  8694. }
  8695. },
  8696. "400": {
  8697. "description": "Bad request",
  8698. "content": {
  8699. "application/json": {
  8700. "schema": {
  8701. "$ref": "#/components/schemas/BadRequestError"
  8702. }
  8703. }
  8704. }
  8705. }
  8706. },
  8707. "description": "Remove an existing workspace.",
  8708. "summary": "Remove workspace",
  8709. "x-codeSamples": [
  8710. {
  8711. "lang": "js",
  8712. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  8713. }
  8714. ]
  8715. }
  8716. },
  8717. "/experimental/workspace/warp": {
  8718. "post": {
  8719. "tags": ["workspace"],
  8720. "operationId": "experimental.workspace.warp",
  8721. "parameters": [
  8722. {
  8723. "name": "directory",
  8724. "in": "query",
  8725. "schema": {
  8726. "type": "string"
  8727. },
  8728. "required": false
  8729. },
  8730. {
  8731. "name": "workspace",
  8732. "in": "query",
  8733. "schema": {
  8734. "type": "string"
  8735. },
  8736. "required": false
  8737. }
  8738. ],
  8739. "responses": {
  8740. "204": {
  8741. "description": "Session warped"
  8742. },
  8743. "400": {
  8744. "description": "WorkspaceWarpError | VcsApplyError",
  8745. "content": {
  8746. "application/json": {
  8747. "schema": {
  8748. "anyOf": [
  8749. {
  8750. "$ref": "#/components/schemas/WorkspaceWarpError"
  8751. },
  8752. {
  8753. "$ref": "#/components/schemas/VcsApplyError"
  8754. }
  8755. ]
  8756. }
  8757. }
  8758. }
  8759. }
  8760. },
  8761. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  8762. "summary": "Warp session into workspace",
  8763. "requestBody": {
  8764. "content": {
  8765. "application/json": {
  8766. "schema": {
  8767. "type": "object",
  8768. "properties": {
  8769. "id": {
  8770. "anyOf": [
  8771. {
  8772. "type": "string",
  8773. "pattern": "^wrk"
  8774. },
  8775. {
  8776. "type": "null"
  8777. }
  8778. ]
  8779. },
  8780. "sessionID": {
  8781. "type": "string",
  8782. "pattern": "^ses"
  8783. },
  8784. "copyChanges": {
  8785. "type": "boolean"
  8786. }
  8787. },
  8788. "required": ["id", "sessionID"],
  8789. "additionalProperties": false
  8790. }
  8791. }
  8792. }
  8793. },
  8794. "x-codeSamples": [
  8795. {
  8796. "lang": "js",
  8797. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  8798. }
  8799. ]
  8800. }
  8801. },
  8802. "/pty/{ptyID}/connect": {
  8803. "get": {
  8804. "tags": ["pty"],
  8805. "operationId": "pty.connect",
  8806. "parameters": [
  8807. {
  8808. "name": "ptyID",
  8809. "in": "path",
  8810. "schema": {
  8811. "type": "string",
  8812. "pattern": "^pty"
  8813. },
  8814. "required": true
  8815. },
  8816. {
  8817. "name": "directory",
  8818. "in": "query",
  8819. "schema": {
  8820. "type": "string"
  8821. },
  8822. "required": false
  8823. },
  8824. {
  8825. "name": "workspace",
  8826. "in": "query",
  8827. "schema": {
  8828. "type": "string"
  8829. },
  8830. "required": false
  8831. }
  8832. ],
  8833. "responses": {
  8834. "200": {
  8835. "description": "Connected session",
  8836. "content": {
  8837. "application/json": {
  8838. "schema": {
  8839. "type": "boolean",
  8840. "description": "Connected session"
  8841. }
  8842. }
  8843. }
  8844. },
  8845. "403": {
  8846. "description": "Forbidden",
  8847. "content": {
  8848. "application/json": {
  8849. "schema": {
  8850. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  8851. }
  8852. }
  8853. }
  8854. },
  8855. "404": {
  8856. "description": "Not found",
  8857. "content": {
  8858. "application/json": {
  8859. "schema": {
  8860. "$ref": "#/components/schemas/NotFoundError"
  8861. }
  8862. }
  8863. }
  8864. }
  8865. },
  8866. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  8867. "summary": "Connect to PTY session",
  8868. "x-codeSamples": [
  8869. {
  8870. "lang": "js",
  8871. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  8872. }
  8873. ]
  8874. }
  8875. }
  8876. },
  8877. "components": {
  8878. "schemas": {
  8879. "Event": {
  8880. "anyOf": [
  8881. {
  8882. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  8883. },
  8884. {
  8885. "$ref": "#/components/schemas/EventFileEdited"
  8886. },
  8887. {
  8888. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  8889. },
  8890. {
  8891. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  8892. },
  8893. {
  8894. "$ref": "#/components/schemas/EventLspUpdated"
  8895. },
  8896. {
  8897. "$ref": "#/components/schemas/EventMessagePartDelta"
  8898. },
  8899. {
  8900. "$ref": "#/components/schemas/EventPermissionAsked"
  8901. },
  8902. {
  8903. "$ref": "#/components/schemas/EventPermissionReplied"
  8904. },
  8905. {
  8906. "$ref": "#/components/schemas/EventSessionDiff"
  8907. },
  8908. {
  8909. "$ref": "#/components/schemas/EventSessionError"
  8910. },
  8911. {
  8912. "$ref": "#/components/schemas/EventInstallationUpdated"
  8913. },
  8914. {
  8915. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  8916. },
  8917. {
  8918. "$ref": "#/components/schemas/EventQuestionAsked"
  8919. },
  8920. {
  8921. "$ref": "#/components/schemas/EventQuestionReplied"
  8922. },
  8923. {
  8924. "$ref": "#/components/schemas/EventQuestionRejected"
  8925. },
  8926. {
  8927. "$ref": "#/components/schemas/EventTodoUpdated"
  8928. },
  8929. {
  8930. "$ref": "#/components/schemas/EventSessionStatus"
  8931. },
  8932. {
  8933. "$ref": "#/components/schemas/EventSessionIdle"
  8934. },
  8935. {
  8936. "$ref": "#/components/schemas/EventSessionCompacted"
  8937. },
  8938. {
  8939. "$ref": "#/components/schemas/Event.tui.prompt.append"
  8940. },
  8941. {
  8942. "$ref": "#/components/schemas/Event.tui.command.execute"
  8943. },
  8944. {
  8945. "$ref": "#/components/schemas/EventTuiToastShow1"
  8946. },
  8947. {
  8948. "$ref": "#/components/schemas/Event.tui.session.select"
  8949. },
  8950. {
  8951. "$ref": "#/components/schemas/EventMcpToolsChanged"
  8952. },
  8953. {
  8954. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  8955. },
  8956. {
  8957. "$ref": "#/components/schemas/EventCommandExecuted"
  8958. },
  8959. {
  8960. "$ref": "#/components/schemas/EventProjectUpdated"
  8961. },
  8962. {
  8963. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  8964. },
  8965. {
  8966. "$ref": "#/components/schemas/EventWorkspaceReady"
  8967. },
  8968. {
  8969. "$ref": "#/components/schemas/EventWorkspaceFailed"
  8970. },
  8971. {
  8972. "$ref": "#/components/schemas/EventWorkspaceStatus"
  8973. },
  8974. {
  8975. "$ref": "#/components/schemas/EventWorktreeReady"
  8976. },
  8977. {
  8978. "$ref": "#/components/schemas/EventWorktreeFailed"
  8979. },
  8980. {
  8981. "$ref": "#/components/schemas/EventPtyCreated"
  8982. },
  8983. {
  8984. "$ref": "#/components/schemas/EventPtyUpdated"
  8985. },
  8986. {
  8987. "$ref": "#/components/schemas/EventPtyExited"
  8988. },
  8989. {
  8990. "$ref": "#/components/schemas/EventPtyDeleted"
  8991. },
  8992. {
  8993. "$ref": "#/components/schemas/EventMessageUpdated"
  8994. },
  8995. {
  8996. "$ref": "#/components/schemas/EventMessageRemoved"
  8997. },
  8998. {
  8999. "$ref": "#/components/schemas/EventMessagePartUpdated"
  9000. },
  9001. {
  9002. "$ref": "#/components/schemas/EventMessagePartRemoved"
  9003. },
  9004. {
  9005. "$ref": "#/components/schemas/EventSessionCreated"
  9006. },
  9007. {
  9008. "$ref": "#/components/schemas/EventSessionUpdated"
  9009. },
  9010. {
  9011. "$ref": "#/components/schemas/EventSessionDeleted"
  9012. },
  9013. {
  9014. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  9015. },
  9016. {
  9017. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  9018. },
  9019. {
  9020. "$ref": "#/components/schemas/EventSessionNextPrompted"
  9021. },
  9022. {
  9023. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  9024. },
  9025. {
  9026. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  9027. },
  9028. {
  9029. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  9030. },
  9031. {
  9032. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  9033. },
  9034. {
  9035. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  9036. },
  9037. {
  9038. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  9039. },
  9040. {
  9041. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  9042. },
  9043. {
  9044. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  9045. },
  9046. {
  9047. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  9048. },
  9049. {
  9050. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  9051. },
  9052. {
  9053. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  9054. },
  9055. {
  9056. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  9057. },
  9058. {
  9059. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  9060. },
  9061. {
  9062. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  9063. },
  9064. {
  9065. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  9066. },
  9067. {
  9068. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  9069. },
  9070. {
  9071. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  9072. },
  9073. {
  9074. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  9075. },
  9076. {
  9077. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  9078. },
  9079. {
  9080. "$ref": "#/components/schemas/EventSessionNextRetried"
  9081. },
  9082. {
  9083. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  9084. },
  9085. {
  9086. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  9087. },
  9088. {
  9089. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  9090. },
  9091. {
  9092. "$ref": "#/components/schemas/EventServerConnected"
  9093. },
  9094. {
  9095. "$ref": "#/components/schemas/EventGlobalDisposed"
  9096. }
  9097. ]
  9098. },
  9099. "OAuth": {
  9100. "type": "object",
  9101. "properties": {
  9102. "type": {
  9103. "type": "string",
  9104. "enum": ["oauth"]
  9105. },
  9106. "refresh": {
  9107. "type": "string"
  9108. },
  9109. "access": {
  9110. "type": "string"
  9111. },
  9112. "expires": {
  9113. "type": "integer",
  9114. "minimum": 0
  9115. },
  9116. "accountId": {
  9117. "type": "string"
  9118. },
  9119. "enterpriseUrl": {
  9120. "type": "string"
  9121. }
  9122. },
  9123. "required": ["type", "refresh", "access", "expires"],
  9124. "additionalProperties": false
  9125. },
  9126. "ApiAuth": {
  9127. "type": "object",
  9128. "properties": {
  9129. "type": {
  9130. "type": "string",
  9131. "enum": ["api"]
  9132. },
  9133. "key": {
  9134. "type": "string"
  9135. },
  9136. "metadata": {
  9137. "type": "object",
  9138. "additionalProperties": {
  9139. "type": "string"
  9140. }
  9141. }
  9142. },
  9143. "required": ["type", "key"],
  9144. "additionalProperties": false
  9145. },
  9146. "WellKnownAuth": {
  9147. "type": "object",
  9148. "properties": {
  9149. "type": {
  9150. "type": "string",
  9151. "enum": ["wellknown"]
  9152. },
  9153. "key": {
  9154. "type": "string"
  9155. },
  9156. "token": {
  9157. "type": "string"
  9158. }
  9159. },
  9160. "required": ["type", "key", "token"],
  9161. "additionalProperties": false
  9162. },
  9163. "Auth": {
  9164. "anyOf": [
  9165. {
  9166. "$ref": "#/components/schemas/OAuth"
  9167. },
  9168. {
  9169. "$ref": "#/components/schemas/ApiAuth"
  9170. },
  9171. {
  9172. "$ref": "#/components/schemas/WellKnownAuth"
  9173. }
  9174. ]
  9175. },
  9176. "PermissionRequest": {
  9177. "type": "object",
  9178. "properties": {
  9179. "id": {
  9180. "type": "string",
  9181. "pattern": "^per"
  9182. },
  9183. "sessionID": {
  9184. "type": "string",
  9185. "pattern": "^ses"
  9186. },
  9187. "permission": {
  9188. "type": "string"
  9189. },
  9190. "patterns": {
  9191. "type": "array",
  9192. "items": {
  9193. "type": "string"
  9194. }
  9195. },
  9196. "metadata": {
  9197. "type": "object"
  9198. },
  9199. "always": {
  9200. "type": "array",
  9201. "items": {
  9202. "type": "string"
  9203. }
  9204. },
  9205. "tool": {
  9206. "type": "object",
  9207. "properties": {
  9208. "messageID": {
  9209. "type": "string",
  9210. "pattern": "^msg"
  9211. },
  9212. "callID": {
  9213. "type": "string"
  9214. }
  9215. },
  9216. "required": ["messageID", "callID"],
  9217. "additionalProperties": false
  9218. }
  9219. },
  9220. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  9221. "additionalProperties": false
  9222. },
  9223. "SnapshotFileDiff": {
  9224. "type": "object",
  9225. "properties": {
  9226. "file": {
  9227. "type": "string"
  9228. },
  9229. "patch": {
  9230. "type": "string"
  9231. },
  9232. "additions": {
  9233. "type": "number"
  9234. },
  9235. "deletions": {
  9236. "type": "number"
  9237. },
  9238. "status": {
  9239. "type": "string",
  9240. "enum": ["added", "deleted", "modified"]
  9241. }
  9242. },
  9243. "required": ["additions", "deletions"],
  9244. "additionalProperties": false
  9245. },
  9246. "ProviderAuthError": {
  9247. "type": "object",
  9248. "properties": {
  9249. "name": {
  9250. "type": "string",
  9251. "enum": ["ProviderAuthError"]
  9252. },
  9253. "data": {
  9254. "type": "object",
  9255. "properties": {
  9256. "providerID": {
  9257. "type": "string"
  9258. },
  9259. "message": {
  9260. "type": "string"
  9261. }
  9262. },
  9263. "required": ["providerID", "message"],
  9264. "additionalProperties": false
  9265. }
  9266. },
  9267. "required": ["name", "data"],
  9268. "additionalProperties": false
  9269. },
  9270. "UnknownError": {
  9271. "type": "object",
  9272. "properties": {
  9273. "name": {
  9274. "type": "string",
  9275. "enum": ["UnknownError"]
  9276. },
  9277. "data": {
  9278. "type": "object",
  9279. "properties": {
  9280. "message": {
  9281. "type": "string"
  9282. }
  9283. },
  9284. "required": ["message"],
  9285. "additionalProperties": false
  9286. }
  9287. },
  9288. "required": ["name", "data"],
  9289. "additionalProperties": false
  9290. },
  9291. "MessageOutputLengthError": {
  9292. "type": "object",
  9293. "properties": {
  9294. "name": {
  9295. "type": "string",
  9296. "enum": ["MessageOutputLengthError"]
  9297. },
  9298. "data": {
  9299. "type": "object",
  9300. "properties": {}
  9301. }
  9302. },
  9303. "required": ["name", "data"],
  9304. "additionalProperties": false
  9305. },
  9306. "MessageAbortedError": {
  9307. "type": "object",
  9308. "properties": {
  9309. "name": {
  9310. "type": "string",
  9311. "enum": ["MessageAbortedError"]
  9312. },
  9313. "data": {
  9314. "type": "object",
  9315. "properties": {
  9316. "message": {
  9317. "type": "string"
  9318. }
  9319. },
  9320. "required": ["message"],
  9321. "additionalProperties": false
  9322. }
  9323. },
  9324. "required": ["name", "data"],
  9325. "additionalProperties": false
  9326. },
  9327. "StructuredOutputError": {
  9328. "type": "object",
  9329. "properties": {
  9330. "name": {
  9331. "type": "string",
  9332. "enum": ["StructuredOutputError"]
  9333. },
  9334. "data": {
  9335. "type": "object",
  9336. "properties": {
  9337. "message": {
  9338. "type": "string"
  9339. },
  9340. "retries": {
  9341. "type": "integer",
  9342. "minimum": 0
  9343. }
  9344. },
  9345. "required": ["message", "retries"],
  9346. "additionalProperties": false
  9347. }
  9348. },
  9349. "required": ["name", "data"],
  9350. "additionalProperties": false
  9351. },
  9352. "ContextOverflowError": {
  9353. "type": "object",
  9354. "properties": {
  9355. "name": {
  9356. "type": "string",
  9357. "enum": ["ContextOverflowError"]
  9358. },
  9359. "data": {
  9360. "type": "object",
  9361. "properties": {
  9362. "message": {
  9363. "type": "string"
  9364. },
  9365. "responseBody": {
  9366. "type": "string"
  9367. }
  9368. },
  9369. "required": ["message"],
  9370. "additionalProperties": false
  9371. }
  9372. },
  9373. "required": ["name", "data"],
  9374. "additionalProperties": false
  9375. },
  9376. "APIError": {
  9377. "type": "object",
  9378. "properties": {
  9379. "name": {
  9380. "type": "string",
  9381. "enum": ["APIError"]
  9382. },
  9383. "data": {
  9384. "type": "object",
  9385. "properties": {
  9386. "message": {
  9387. "type": "string"
  9388. },
  9389. "statusCode": {
  9390. "type": "integer",
  9391. "minimum": 0
  9392. },
  9393. "isRetryable": {
  9394. "type": "boolean"
  9395. },
  9396. "responseHeaders": {
  9397. "type": "object",
  9398. "additionalProperties": {
  9399. "type": "string"
  9400. }
  9401. },
  9402. "responseBody": {
  9403. "type": "string"
  9404. },
  9405. "metadata": {
  9406. "type": "object",
  9407. "additionalProperties": {
  9408. "type": "string"
  9409. }
  9410. }
  9411. },
  9412. "required": ["message", "isRetryable"],
  9413. "additionalProperties": false
  9414. }
  9415. },
  9416. "required": ["name", "data"],
  9417. "additionalProperties": false
  9418. },
  9419. "QuestionOption": {
  9420. "type": "object",
  9421. "properties": {
  9422. "label": {
  9423. "type": "string",
  9424. "description": "Display text (1-5 words, concise)"
  9425. },
  9426. "description": {
  9427. "type": "string",
  9428. "description": "Explanation of choice"
  9429. }
  9430. },
  9431. "required": ["label", "description"],
  9432. "additionalProperties": false
  9433. },
  9434. "QuestionInfo": {
  9435. "type": "object",
  9436. "properties": {
  9437. "question": {
  9438. "type": "string",
  9439. "description": "Complete question"
  9440. },
  9441. "header": {
  9442. "type": "string",
  9443. "description": "Very short label (max 30 chars)"
  9444. },
  9445. "options": {
  9446. "type": "array",
  9447. "items": {
  9448. "$ref": "#/components/schemas/QuestionOption"
  9449. },
  9450. "description": "Available choices"
  9451. },
  9452. "multiple": {
  9453. "type": "boolean"
  9454. },
  9455. "custom": {
  9456. "type": "boolean"
  9457. }
  9458. },
  9459. "required": ["question", "header", "options"],
  9460. "additionalProperties": false
  9461. },
  9462. "QuestionTool": {
  9463. "type": "object",
  9464. "properties": {
  9465. "messageID": {
  9466. "type": "string",
  9467. "pattern": "^msg"
  9468. },
  9469. "callID": {
  9470. "type": "string"
  9471. }
  9472. },
  9473. "required": ["messageID", "callID"],
  9474. "additionalProperties": false
  9475. },
  9476. "QuestionRequest": {
  9477. "type": "object",
  9478. "properties": {
  9479. "id": {
  9480. "type": "string",
  9481. "pattern": "^que"
  9482. },
  9483. "sessionID": {
  9484. "type": "string",
  9485. "pattern": "^ses"
  9486. },
  9487. "questions": {
  9488. "type": "array",
  9489. "items": {
  9490. "$ref": "#/components/schemas/QuestionInfo"
  9491. },
  9492. "description": "Questions to ask"
  9493. },
  9494. "tool": {
  9495. "$ref": "#/components/schemas/QuestionTool"
  9496. }
  9497. },
  9498. "required": ["id", "sessionID", "questions"],
  9499. "additionalProperties": false
  9500. },
  9501. "QuestionAnswer": {
  9502. "type": "array",
  9503. "items": {
  9504. "type": "string"
  9505. }
  9506. },
  9507. "QuestionReplied": {
  9508. "type": "object",
  9509. "properties": {
  9510. "sessionID": {
  9511. "type": "string",
  9512. "pattern": "^ses"
  9513. },
  9514. "requestID": {
  9515. "type": "string",
  9516. "pattern": "^que"
  9517. },
  9518. "answers": {
  9519. "type": "array",
  9520. "items": {
  9521. "$ref": "#/components/schemas/QuestionAnswer"
  9522. }
  9523. }
  9524. },
  9525. "required": ["sessionID", "requestID", "answers"],
  9526. "additionalProperties": false
  9527. },
  9528. "QuestionRejected": {
  9529. "type": "object",
  9530. "properties": {
  9531. "sessionID": {
  9532. "type": "string",
  9533. "pattern": "^ses"
  9534. },
  9535. "requestID": {
  9536. "type": "string",
  9537. "pattern": "^que"
  9538. }
  9539. },
  9540. "required": ["sessionID", "requestID"],
  9541. "additionalProperties": false
  9542. },
  9543. "Todo": {
  9544. "type": "object",
  9545. "properties": {
  9546. "content": {
  9547. "type": "string",
  9548. "description": "Brief description of the task"
  9549. },
  9550. "status": {
  9551. "type": "string",
  9552. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  9553. },
  9554. "priority": {
  9555. "type": "string",
  9556. "description": "Priority level of the task: high, medium, low"
  9557. }
  9558. },
  9559. "required": ["content", "status", "priority"],
  9560. "additionalProperties": false
  9561. },
  9562. "SessionStatus": {
  9563. "anyOf": [
  9564. {
  9565. "type": "object",
  9566. "properties": {
  9567. "type": {
  9568. "type": "string",
  9569. "enum": ["idle"]
  9570. }
  9571. },
  9572. "required": ["type"],
  9573. "additionalProperties": false
  9574. },
  9575. {
  9576. "type": "object",
  9577. "properties": {
  9578. "type": {
  9579. "type": "string",
  9580. "enum": ["retry"]
  9581. },
  9582. "attempt": {
  9583. "type": "integer",
  9584. "minimum": 0
  9585. },
  9586. "message": {
  9587. "type": "string"
  9588. },
  9589. "action": {
  9590. "type": "object",
  9591. "properties": {
  9592. "reason": {
  9593. "type": "string"
  9594. },
  9595. "provider": {
  9596. "type": "string"
  9597. },
  9598. "title": {
  9599. "type": "string"
  9600. },
  9601. "message": {
  9602. "type": "string"
  9603. },
  9604. "label": {
  9605. "type": "string"
  9606. },
  9607. "link": {
  9608. "type": "string"
  9609. }
  9610. },
  9611. "required": ["reason", "provider", "title", "message", "label"],
  9612. "additionalProperties": false
  9613. },
  9614. "next": {
  9615. "type": "integer",
  9616. "minimum": 0
  9617. }
  9618. },
  9619. "required": ["type", "attempt", "message", "next"],
  9620. "additionalProperties": false
  9621. },
  9622. {
  9623. "type": "object",
  9624. "properties": {
  9625. "type": {
  9626. "type": "string",
  9627. "enum": ["busy"]
  9628. }
  9629. },
  9630. "required": ["type"],
  9631. "additionalProperties": false
  9632. }
  9633. ]
  9634. },
  9635. "Event.tui.prompt.append": {
  9636. "type": "object",
  9637. "properties": {
  9638. "id": {
  9639. "type": "string"
  9640. },
  9641. "type": {
  9642. "type": "string",
  9643. "enum": ["tui.prompt.append"]
  9644. },
  9645. "properties": {
  9646. "type": "object",
  9647. "properties": {
  9648. "text": {
  9649. "type": "string"
  9650. }
  9651. },
  9652. "required": ["text"],
  9653. "additionalProperties": false
  9654. }
  9655. },
  9656. "required": ["id", "type", "properties"],
  9657. "additionalProperties": false
  9658. },
  9659. "Event.tui.command.execute": {
  9660. "type": "object",
  9661. "properties": {
  9662. "id": {
  9663. "type": "string"
  9664. },
  9665. "type": {
  9666. "type": "string",
  9667. "enum": ["tui.command.execute"]
  9668. },
  9669. "properties": {
  9670. "type": "object",
  9671. "properties": {
  9672. "command": {
  9673. "anyOf": [
  9674. {
  9675. "type": "string",
  9676. "enum": [
  9677. "session.list",
  9678. "session.new",
  9679. "session.share",
  9680. "session.interrupt",
  9681. "session.compact",
  9682. "session.page.up",
  9683. "session.page.down",
  9684. "session.line.up",
  9685. "session.line.down",
  9686. "session.half.page.up",
  9687. "session.half.page.down",
  9688. "session.first",
  9689. "session.last",
  9690. "prompt.clear",
  9691. "prompt.submit",
  9692. "agent.cycle"
  9693. ]
  9694. },
  9695. {
  9696. "type": "string"
  9697. }
  9698. ]
  9699. }
  9700. },
  9701. "required": ["command"],
  9702. "additionalProperties": false
  9703. }
  9704. },
  9705. "required": ["id", "type", "properties"],
  9706. "additionalProperties": false
  9707. },
  9708. "Event.tui.toast.show": {
  9709. "type": "object",
  9710. "properties": {
  9711. "id": {
  9712. "type": "string"
  9713. },
  9714. "type": {
  9715. "type": "string",
  9716. "enum": ["tui.toast.show"]
  9717. },
  9718. "properties": {
  9719. "type": "object",
  9720. "properties": {
  9721. "title": {
  9722. "type": "string"
  9723. },
  9724. "message": {
  9725. "type": "string"
  9726. },
  9727. "variant": {
  9728. "type": "string",
  9729. "enum": ["info", "success", "warning", "error"]
  9730. },
  9731. "duration": {
  9732. "type": "integer",
  9733. "exclusiveMinimum": 0
  9734. }
  9735. },
  9736. "required": ["message", "variant"],
  9737. "additionalProperties": false
  9738. }
  9739. },
  9740. "required": ["id", "type", "properties"],
  9741. "additionalProperties": false
  9742. },
  9743. "Event.tui.session.select": {
  9744. "type": "object",
  9745. "properties": {
  9746. "id": {
  9747. "type": "string"
  9748. },
  9749. "type": {
  9750. "type": "string",
  9751. "enum": ["tui.session.select"]
  9752. },
  9753. "properties": {
  9754. "type": "object",
  9755. "properties": {
  9756. "sessionID": {
  9757. "type": "string",
  9758. "pattern": "^ses",
  9759. "description": "Session ID to navigate to"
  9760. }
  9761. },
  9762. "required": ["sessionID"],
  9763. "additionalProperties": false
  9764. }
  9765. },
  9766. "required": ["id", "type", "properties"],
  9767. "additionalProperties": false
  9768. },
  9769. "Project": {
  9770. "type": "object",
  9771. "properties": {
  9772. "id": {
  9773. "type": "string"
  9774. },
  9775. "worktree": {
  9776. "type": "string"
  9777. },
  9778. "vcs": {
  9779. "type": "string",
  9780. "enum": ["git"]
  9781. },
  9782. "name": {
  9783. "type": "string"
  9784. },
  9785. "icon": {
  9786. "type": "object",
  9787. "properties": {
  9788. "url": {
  9789. "type": "string"
  9790. },
  9791. "override": {
  9792. "type": "string"
  9793. },
  9794. "color": {
  9795. "type": "string"
  9796. }
  9797. },
  9798. "additionalProperties": false
  9799. },
  9800. "commands": {
  9801. "type": "object",
  9802. "properties": {
  9803. "start": {
  9804. "type": "string",
  9805. "description": "Startup script to run when creating a new workspace (worktree)"
  9806. }
  9807. },
  9808. "additionalProperties": false
  9809. },
  9810. "time": {
  9811. "type": "object",
  9812. "properties": {
  9813. "created": {
  9814. "type": "integer",
  9815. "minimum": 0
  9816. },
  9817. "updated": {
  9818. "type": "integer",
  9819. "minimum": 0
  9820. },
  9821. "initialized": {
  9822. "type": "integer",
  9823. "minimum": 0
  9824. }
  9825. },
  9826. "required": ["created", "updated"],
  9827. "additionalProperties": false
  9828. },
  9829. "sandboxes": {
  9830. "type": "array",
  9831. "items": {
  9832. "type": "string"
  9833. }
  9834. }
  9835. },
  9836. "required": ["id", "worktree", "time", "sandboxes"],
  9837. "additionalProperties": false
  9838. },
  9839. "Pty": {
  9840. "type": "object",
  9841. "properties": {
  9842. "id": {
  9843. "type": "string",
  9844. "pattern": "^pty"
  9845. },
  9846. "title": {
  9847. "type": "string"
  9848. },
  9849. "command": {
  9850. "type": "string"
  9851. },
  9852. "args": {
  9853. "type": "array",
  9854. "items": {
  9855. "type": "string"
  9856. }
  9857. },
  9858. "cwd": {
  9859. "type": "string"
  9860. },
  9861. "status": {
  9862. "type": "string",
  9863. "enum": ["running", "exited"]
  9864. },
  9865. "pid": {
  9866. "type": "integer",
  9867. "exclusiveMinimum": 0
  9868. }
  9869. },
  9870. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  9871. "additionalProperties": false
  9872. },
  9873. "OutputFormatText": {
  9874. "type": "object",
  9875. "properties": {
  9876. "type": {
  9877. "type": "string",
  9878. "enum": ["text"]
  9879. }
  9880. },
  9881. "required": ["type"],
  9882. "additionalProperties": false
  9883. },
  9884. "JSONSchema": {
  9885. "type": "object"
  9886. },
  9887. "OutputFormatJsonSchema": {
  9888. "type": "object",
  9889. "properties": {
  9890. "type": {
  9891. "type": "string",
  9892. "enum": ["json_schema"]
  9893. },
  9894. "schema": {
  9895. "$ref": "#/components/schemas/JSONSchema"
  9896. },
  9897. "retryCount": {
  9898. "type": "integer",
  9899. "minimum": 0
  9900. }
  9901. },
  9902. "required": ["type", "schema"],
  9903. "additionalProperties": false
  9904. },
  9905. "OutputFormat": {
  9906. "anyOf": [
  9907. {
  9908. "$ref": "#/components/schemas/OutputFormatText"
  9909. },
  9910. {
  9911. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  9912. }
  9913. ]
  9914. },
  9915. "UserMessage": {
  9916. "type": "object",
  9917. "properties": {
  9918. "id": {
  9919. "type": "string",
  9920. "pattern": "^msg"
  9921. },
  9922. "sessionID": {
  9923. "type": "string",
  9924. "pattern": "^ses"
  9925. },
  9926. "role": {
  9927. "type": "string",
  9928. "enum": ["user"]
  9929. },
  9930. "time": {
  9931. "type": "object",
  9932. "properties": {
  9933. "created": {
  9934. "type": "integer",
  9935. "minimum": 0
  9936. }
  9937. },
  9938. "required": ["created"],
  9939. "additionalProperties": false
  9940. },
  9941. "format": {
  9942. "$ref": "#/components/schemas/OutputFormat"
  9943. },
  9944. "summary": {
  9945. "type": "object",
  9946. "properties": {
  9947. "title": {
  9948. "type": "string"
  9949. },
  9950. "body": {
  9951. "type": "string"
  9952. },
  9953. "diffs": {
  9954. "type": "array",
  9955. "items": {
  9956. "$ref": "#/components/schemas/SnapshotFileDiff"
  9957. }
  9958. }
  9959. },
  9960. "required": ["diffs"],
  9961. "additionalProperties": false
  9962. },
  9963. "agent": {
  9964. "type": "string"
  9965. },
  9966. "model": {
  9967. "type": "object",
  9968. "properties": {
  9969. "providerID": {
  9970. "type": "string"
  9971. },
  9972. "modelID": {
  9973. "type": "string"
  9974. },
  9975. "variant": {
  9976. "type": "string"
  9977. }
  9978. },
  9979. "required": ["providerID", "modelID"],
  9980. "additionalProperties": false
  9981. },
  9982. "system": {
  9983. "type": "string"
  9984. },
  9985. "tools": {
  9986. "type": "object",
  9987. "additionalProperties": {
  9988. "type": "boolean"
  9989. }
  9990. }
  9991. },
  9992. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  9993. "additionalProperties": false
  9994. },
  9995. "AssistantMessage": {
  9996. "type": "object",
  9997. "properties": {
  9998. "id": {
  9999. "type": "string",
  10000. "pattern": "^msg"
  10001. },
  10002. "sessionID": {
  10003. "type": "string",
  10004. "pattern": "^ses"
  10005. },
  10006. "role": {
  10007. "type": "string",
  10008. "enum": ["assistant"]
  10009. },
  10010. "time": {
  10011. "type": "object",
  10012. "properties": {
  10013. "created": {
  10014. "type": "integer",
  10015. "minimum": 0
  10016. },
  10017. "completed": {
  10018. "type": "integer",
  10019. "minimum": 0
  10020. }
  10021. },
  10022. "required": ["created"],
  10023. "additionalProperties": false
  10024. },
  10025. "error": {
  10026. "anyOf": [
  10027. {
  10028. "$ref": "#/components/schemas/ProviderAuthError"
  10029. },
  10030. {
  10031. "$ref": "#/components/schemas/UnknownError"
  10032. },
  10033. {
  10034. "$ref": "#/components/schemas/MessageOutputLengthError"
  10035. },
  10036. {
  10037. "$ref": "#/components/schemas/MessageAbortedError"
  10038. },
  10039. {
  10040. "$ref": "#/components/schemas/StructuredOutputError"
  10041. },
  10042. {
  10043. "$ref": "#/components/schemas/ContextOverflowError"
  10044. },
  10045. {
  10046. "$ref": "#/components/schemas/APIError"
  10047. }
  10048. ]
  10049. },
  10050. "parentID": {
  10051. "type": "string",
  10052. "pattern": "^msg"
  10053. },
  10054. "modelID": {
  10055. "type": "string"
  10056. },
  10057. "providerID": {
  10058. "type": "string"
  10059. },
  10060. "mode": {
  10061. "type": "string"
  10062. },
  10063. "agent": {
  10064. "type": "string"
  10065. },
  10066. "path": {
  10067. "type": "object",
  10068. "properties": {
  10069. "cwd": {
  10070. "type": "string"
  10071. },
  10072. "root": {
  10073. "type": "string"
  10074. }
  10075. },
  10076. "required": ["cwd", "root"],
  10077. "additionalProperties": false
  10078. },
  10079. "summary": {
  10080. "type": "boolean"
  10081. },
  10082. "cost": {
  10083. "type": "number"
  10084. },
  10085. "tokens": {
  10086. "type": "object",
  10087. "properties": {
  10088. "total": {
  10089. "type": "number"
  10090. },
  10091. "input": {
  10092. "type": "number"
  10093. },
  10094. "output": {
  10095. "type": "number"
  10096. },
  10097. "reasoning": {
  10098. "type": "number"
  10099. },
  10100. "cache": {
  10101. "type": "object",
  10102. "properties": {
  10103. "read": {
  10104. "type": "number"
  10105. },
  10106. "write": {
  10107. "type": "number"
  10108. }
  10109. },
  10110. "required": ["read", "write"],
  10111. "additionalProperties": false
  10112. }
  10113. },
  10114. "required": ["input", "output", "reasoning", "cache"],
  10115. "additionalProperties": false
  10116. },
  10117. "structured": {},
  10118. "variant": {
  10119. "type": "string"
  10120. },
  10121. "finish": {
  10122. "type": "string"
  10123. }
  10124. },
  10125. "required": [
  10126. "id",
  10127. "sessionID",
  10128. "role",
  10129. "time",
  10130. "parentID",
  10131. "modelID",
  10132. "providerID",
  10133. "mode",
  10134. "agent",
  10135. "path",
  10136. "cost",
  10137. "tokens"
  10138. ],
  10139. "additionalProperties": false
  10140. },
  10141. "Message": {
  10142. "anyOf": [
  10143. {
  10144. "$ref": "#/components/schemas/UserMessage"
  10145. },
  10146. {
  10147. "$ref": "#/components/schemas/AssistantMessage"
  10148. }
  10149. ]
  10150. },
  10151. "TextPart": {
  10152. "type": "object",
  10153. "properties": {
  10154. "id": {
  10155. "type": "string",
  10156. "pattern": "^prt"
  10157. },
  10158. "sessionID": {
  10159. "type": "string",
  10160. "pattern": "^ses"
  10161. },
  10162. "messageID": {
  10163. "type": "string",
  10164. "pattern": "^msg"
  10165. },
  10166. "type": {
  10167. "type": "string",
  10168. "enum": ["text"]
  10169. },
  10170. "text": {
  10171. "type": "string"
  10172. },
  10173. "synthetic": {
  10174. "type": "boolean"
  10175. },
  10176. "ignored": {
  10177. "type": "boolean"
  10178. },
  10179. "time": {
  10180. "type": "object",
  10181. "properties": {
  10182. "start": {
  10183. "type": "integer",
  10184. "minimum": 0
  10185. },
  10186. "end": {
  10187. "type": "integer",
  10188. "minimum": 0
  10189. }
  10190. },
  10191. "required": ["start"],
  10192. "additionalProperties": false
  10193. },
  10194. "metadata": {
  10195. "type": "object"
  10196. }
  10197. },
  10198. "required": ["id", "sessionID", "messageID", "type", "text"],
  10199. "additionalProperties": false
  10200. },
  10201. "SubtaskPart": {
  10202. "type": "object",
  10203. "properties": {
  10204. "id": {
  10205. "type": "string",
  10206. "pattern": "^prt"
  10207. },
  10208. "sessionID": {
  10209. "type": "string",
  10210. "pattern": "^ses"
  10211. },
  10212. "messageID": {
  10213. "type": "string",
  10214. "pattern": "^msg"
  10215. },
  10216. "type": {
  10217. "type": "string",
  10218. "enum": ["subtask"]
  10219. },
  10220. "prompt": {
  10221. "type": "string"
  10222. },
  10223. "description": {
  10224. "type": "string"
  10225. },
  10226. "agent": {
  10227. "type": "string"
  10228. },
  10229. "model": {
  10230. "type": "object",
  10231. "properties": {
  10232. "providerID": {
  10233. "type": "string"
  10234. },
  10235. "modelID": {
  10236. "type": "string"
  10237. }
  10238. },
  10239. "required": ["providerID", "modelID"],
  10240. "additionalProperties": false
  10241. },
  10242. "command": {
  10243. "type": "string"
  10244. }
  10245. },
  10246. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  10247. "additionalProperties": false
  10248. },
  10249. "ReasoningPart": {
  10250. "type": "object",
  10251. "properties": {
  10252. "id": {
  10253. "type": "string",
  10254. "pattern": "^prt"
  10255. },
  10256. "sessionID": {
  10257. "type": "string",
  10258. "pattern": "^ses"
  10259. },
  10260. "messageID": {
  10261. "type": "string",
  10262. "pattern": "^msg"
  10263. },
  10264. "type": {
  10265. "type": "string",
  10266. "enum": ["reasoning"]
  10267. },
  10268. "text": {
  10269. "type": "string"
  10270. },
  10271. "metadata": {
  10272. "type": "object"
  10273. },
  10274. "time": {
  10275. "type": "object",
  10276. "properties": {
  10277. "start": {
  10278. "type": "integer",
  10279. "minimum": 0
  10280. },
  10281. "end": {
  10282. "type": "integer",
  10283. "minimum": 0
  10284. }
  10285. },
  10286. "required": ["start"],
  10287. "additionalProperties": false
  10288. }
  10289. },
  10290. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  10291. "additionalProperties": false
  10292. },
  10293. "FilePartSourceText": {
  10294. "type": "object",
  10295. "properties": {
  10296. "value": {
  10297. "type": "string"
  10298. },
  10299. "start": {
  10300. "type": "number"
  10301. },
  10302. "end": {
  10303. "type": "number"
  10304. }
  10305. },
  10306. "required": ["value", "start", "end"],
  10307. "additionalProperties": false
  10308. },
  10309. "FileSource": {
  10310. "type": "object",
  10311. "properties": {
  10312. "text": {
  10313. "$ref": "#/components/schemas/FilePartSourceText"
  10314. },
  10315. "type": {
  10316. "type": "string",
  10317. "enum": ["file"]
  10318. },
  10319. "path": {
  10320. "type": "string"
  10321. }
  10322. },
  10323. "required": ["text", "type", "path"],
  10324. "additionalProperties": false
  10325. },
  10326. "Range": {
  10327. "type": "object",
  10328. "properties": {
  10329. "start": {
  10330. "type": "object",
  10331. "properties": {
  10332. "line": {
  10333. "type": "integer",
  10334. "minimum": 0
  10335. },
  10336. "character": {
  10337. "type": "integer",
  10338. "minimum": 0
  10339. }
  10340. },
  10341. "required": ["line", "character"],
  10342. "additionalProperties": false
  10343. },
  10344. "end": {
  10345. "type": "object",
  10346. "properties": {
  10347. "line": {
  10348. "type": "integer",
  10349. "minimum": 0
  10350. },
  10351. "character": {
  10352. "type": "integer",
  10353. "minimum": 0
  10354. }
  10355. },
  10356. "required": ["line", "character"],
  10357. "additionalProperties": false
  10358. }
  10359. },
  10360. "required": ["start", "end"],
  10361. "additionalProperties": false
  10362. },
  10363. "SymbolSource": {
  10364. "type": "object",
  10365. "properties": {
  10366. "text": {
  10367. "$ref": "#/components/schemas/FilePartSourceText"
  10368. },
  10369. "type": {
  10370. "type": "string",
  10371. "enum": ["symbol"]
  10372. },
  10373. "path": {
  10374. "type": "string"
  10375. },
  10376. "range": {
  10377. "$ref": "#/components/schemas/Range"
  10378. },
  10379. "name": {
  10380. "type": "string"
  10381. },
  10382. "kind": {
  10383. "type": "integer",
  10384. "minimum": 0
  10385. }
  10386. },
  10387. "required": ["text", "type", "path", "range", "name", "kind"],
  10388. "additionalProperties": false
  10389. },
  10390. "ResourceSource": {
  10391. "type": "object",
  10392. "properties": {
  10393. "text": {
  10394. "$ref": "#/components/schemas/FilePartSourceText"
  10395. },
  10396. "type": {
  10397. "type": "string",
  10398. "enum": ["resource"]
  10399. },
  10400. "clientName": {
  10401. "type": "string"
  10402. },
  10403. "uri": {
  10404. "type": "string"
  10405. }
  10406. },
  10407. "required": ["text", "type", "clientName", "uri"],
  10408. "additionalProperties": false
  10409. },
  10410. "FilePartSource": {
  10411. "anyOf": [
  10412. {
  10413. "$ref": "#/components/schemas/FileSource"
  10414. },
  10415. {
  10416. "$ref": "#/components/schemas/SymbolSource"
  10417. },
  10418. {
  10419. "$ref": "#/components/schemas/ResourceSource"
  10420. }
  10421. ]
  10422. },
  10423. "FilePart": {
  10424. "type": "object",
  10425. "properties": {
  10426. "id": {
  10427. "type": "string",
  10428. "pattern": "^prt"
  10429. },
  10430. "sessionID": {
  10431. "type": "string",
  10432. "pattern": "^ses"
  10433. },
  10434. "messageID": {
  10435. "type": "string",
  10436. "pattern": "^msg"
  10437. },
  10438. "type": {
  10439. "type": "string",
  10440. "enum": ["file"]
  10441. },
  10442. "mime": {
  10443. "type": "string"
  10444. },
  10445. "filename": {
  10446. "type": "string"
  10447. },
  10448. "url": {
  10449. "type": "string"
  10450. },
  10451. "source": {
  10452. "$ref": "#/components/schemas/FilePartSource"
  10453. }
  10454. },
  10455. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  10456. "additionalProperties": false
  10457. },
  10458. "ToolStatePending": {
  10459. "type": "object",
  10460. "properties": {
  10461. "status": {
  10462. "type": "string",
  10463. "enum": ["pending"]
  10464. },
  10465. "input": {
  10466. "type": "object"
  10467. },
  10468. "raw": {
  10469. "type": "string"
  10470. }
  10471. },
  10472. "required": ["status", "input", "raw"],
  10473. "additionalProperties": false
  10474. },
  10475. "ToolStateRunning": {
  10476. "type": "object",
  10477. "properties": {
  10478. "status": {
  10479. "type": "string",
  10480. "enum": ["running"]
  10481. },
  10482. "input": {
  10483. "type": "object"
  10484. },
  10485. "title": {
  10486. "type": "string"
  10487. },
  10488. "metadata": {
  10489. "type": "object"
  10490. },
  10491. "time": {
  10492. "type": "object",
  10493. "properties": {
  10494. "start": {
  10495. "type": "integer",
  10496. "minimum": 0
  10497. }
  10498. },
  10499. "required": ["start"],
  10500. "additionalProperties": false
  10501. }
  10502. },
  10503. "required": ["status", "input", "time"],
  10504. "additionalProperties": false
  10505. },
  10506. "ToolStateCompleted": {
  10507. "type": "object",
  10508. "properties": {
  10509. "status": {
  10510. "type": "string",
  10511. "enum": ["completed"]
  10512. },
  10513. "input": {
  10514. "type": "object"
  10515. },
  10516. "output": {
  10517. "type": "string"
  10518. },
  10519. "title": {
  10520. "type": "string"
  10521. },
  10522. "metadata": {
  10523. "type": "object"
  10524. },
  10525. "time": {
  10526. "type": "object",
  10527. "properties": {
  10528. "start": {
  10529. "type": "integer",
  10530. "minimum": 0
  10531. },
  10532. "end": {
  10533. "type": "integer",
  10534. "minimum": 0
  10535. },
  10536. "compacted": {
  10537. "type": "integer",
  10538. "minimum": 0
  10539. }
  10540. },
  10541. "required": ["start", "end"],
  10542. "additionalProperties": false
  10543. },
  10544. "attachments": {
  10545. "type": "array",
  10546. "items": {
  10547. "$ref": "#/components/schemas/FilePart"
  10548. }
  10549. }
  10550. },
  10551. "required": ["status", "input", "output", "title", "metadata", "time"],
  10552. "additionalProperties": false
  10553. },
  10554. "ToolStateError": {
  10555. "type": "object",
  10556. "properties": {
  10557. "status": {
  10558. "type": "string",
  10559. "enum": ["error"]
  10560. },
  10561. "input": {
  10562. "type": "object"
  10563. },
  10564. "error": {
  10565. "type": "string"
  10566. },
  10567. "metadata": {
  10568. "type": "object"
  10569. },
  10570. "time": {
  10571. "type": "object",
  10572. "properties": {
  10573. "start": {
  10574. "type": "integer",
  10575. "minimum": 0
  10576. },
  10577. "end": {
  10578. "type": "integer",
  10579. "minimum": 0
  10580. }
  10581. },
  10582. "required": ["start", "end"],
  10583. "additionalProperties": false
  10584. }
  10585. },
  10586. "required": ["status", "input", "error", "time"],
  10587. "additionalProperties": false
  10588. },
  10589. "ToolState": {
  10590. "anyOf": [
  10591. {
  10592. "$ref": "#/components/schemas/ToolStatePending"
  10593. },
  10594. {
  10595. "$ref": "#/components/schemas/ToolStateRunning"
  10596. },
  10597. {
  10598. "$ref": "#/components/schemas/ToolStateCompleted"
  10599. },
  10600. {
  10601. "$ref": "#/components/schemas/ToolStateError"
  10602. }
  10603. ]
  10604. },
  10605. "ToolPart": {
  10606. "type": "object",
  10607. "properties": {
  10608. "id": {
  10609. "type": "string",
  10610. "pattern": "^prt"
  10611. },
  10612. "sessionID": {
  10613. "type": "string",
  10614. "pattern": "^ses"
  10615. },
  10616. "messageID": {
  10617. "type": "string",
  10618. "pattern": "^msg"
  10619. },
  10620. "type": {
  10621. "type": "string",
  10622. "enum": ["tool"]
  10623. },
  10624. "callID": {
  10625. "type": "string"
  10626. },
  10627. "tool": {
  10628. "type": "string"
  10629. },
  10630. "state": {
  10631. "$ref": "#/components/schemas/ToolState"
  10632. },
  10633. "metadata": {
  10634. "type": "object"
  10635. }
  10636. },
  10637. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  10638. "additionalProperties": false
  10639. },
  10640. "StepStartPart": {
  10641. "type": "object",
  10642. "properties": {
  10643. "id": {
  10644. "type": "string",
  10645. "pattern": "^prt"
  10646. },
  10647. "sessionID": {
  10648. "type": "string",
  10649. "pattern": "^ses"
  10650. },
  10651. "messageID": {
  10652. "type": "string",
  10653. "pattern": "^msg"
  10654. },
  10655. "type": {
  10656. "type": "string",
  10657. "enum": ["step-start"]
  10658. },
  10659. "snapshot": {
  10660. "type": "string"
  10661. }
  10662. },
  10663. "required": ["id", "sessionID", "messageID", "type"],
  10664. "additionalProperties": false
  10665. },
  10666. "StepFinishPart": {
  10667. "type": "object",
  10668. "properties": {
  10669. "id": {
  10670. "type": "string",
  10671. "pattern": "^prt"
  10672. },
  10673. "sessionID": {
  10674. "type": "string",
  10675. "pattern": "^ses"
  10676. },
  10677. "messageID": {
  10678. "type": "string",
  10679. "pattern": "^msg"
  10680. },
  10681. "type": {
  10682. "type": "string",
  10683. "enum": ["step-finish"]
  10684. },
  10685. "reason": {
  10686. "type": "string"
  10687. },
  10688. "snapshot": {
  10689. "type": "string"
  10690. },
  10691. "cost": {
  10692. "type": "number"
  10693. },
  10694. "tokens": {
  10695. "type": "object",
  10696. "properties": {
  10697. "total": {
  10698. "type": "number"
  10699. },
  10700. "input": {
  10701. "type": "number"
  10702. },
  10703. "output": {
  10704. "type": "number"
  10705. },
  10706. "reasoning": {
  10707. "type": "number"
  10708. },
  10709. "cache": {
  10710. "type": "object",
  10711. "properties": {
  10712. "read": {
  10713. "type": "number"
  10714. },
  10715. "write": {
  10716. "type": "number"
  10717. }
  10718. },
  10719. "required": ["read", "write"],
  10720. "additionalProperties": false
  10721. }
  10722. },
  10723. "required": ["input", "output", "reasoning", "cache"],
  10724. "additionalProperties": false
  10725. }
  10726. },
  10727. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  10728. "additionalProperties": false
  10729. },
  10730. "SnapshotPart": {
  10731. "type": "object",
  10732. "properties": {
  10733. "id": {
  10734. "type": "string",
  10735. "pattern": "^prt"
  10736. },
  10737. "sessionID": {
  10738. "type": "string",
  10739. "pattern": "^ses"
  10740. },
  10741. "messageID": {
  10742. "type": "string",
  10743. "pattern": "^msg"
  10744. },
  10745. "type": {
  10746. "type": "string",
  10747. "enum": ["snapshot"]
  10748. },
  10749. "snapshot": {
  10750. "type": "string"
  10751. }
  10752. },
  10753. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  10754. "additionalProperties": false
  10755. },
  10756. "PatchPart": {
  10757. "type": "object",
  10758. "properties": {
  10759. "id": {
  10760. "type": "string",
  10761. "pattern": "^prt"
  10762. },
  10763. "sessionID": {
  10764. "type": "string",
  10765. "pattern": "^ses"
  10766. },
  10767. "messageID": {
  10768. "type": "string",
  10769. "pattern": "^msg"
  10770. },
  10771. "type": {
  10772. "type": "string",
  10773. "enum": ["patch"]
  10774. },
  10775. "hash": {
  10776. "type": "string"
  10777. },
  10778. "files": {
  10779. "type": "array",
  10780. "items": {
  10781. "type": "string"
  10782. }
  10783. }
  10784. },
  10785. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  10786. "additionalProperties": false
  10787. },
  10788. "AgentPart": {
  10789. "type": "object",
  10790. "properties": {
  10791. "id": {
  10792. "type": "string",
  10793. "pattern": "^prt"
  10794. },
  10795. "sessionID": {
  10796. "type": "string",
  10797. "pattern": "^ses"
  10798. },
  10799. "messageID": {
  10800. "type": "string",
  10801. "pattern": "^msg"
  10802. },
  10803. "type": {
  10804. "type": "string",
  10805. "enum": ["agent"]
  10806. },
  10807. "name": {
  10808. "type": "string"
  10809. },
  10810. "source": {
  10811. "type": "object",
  10812. "properties": {
  10813. "value": {
  10814. "type": "string"
  10815. },
  10816. "start": {
  10817. "type": "integer",
  10818. "minimum": 0
  10819. },
  10820. "end": {
  10821. "type": "integer",
  10822. "minimum": 0
  10823. }
  10824. },
  10825. "required": ["value", "start", "end"],
  10826. "additionalProperties": false
  10827. }
  10828. },
  10829. "required": ["id", "sessionID", "messageID", "type", "name"],
  10830. "additionalProperties": false
  10831. },
  10832. "RetryPart": {
  10833. "type": "object",
  10834. "properties": {
  10835. "id": {
  10836. "type": "string",
  10837. "pattern": "^prt"
  10838. },
  10839. "sessionID": {
  10840. "type": "string",
  10841. "pattern": "^ses"
  10842. },
  10843. "messageID": {
  10844. "type": "string",
  10845. "pattern": "^msg"
  10846. },
  10847. "type": {
  10848. "type": "string",
  10849. "enum": ["retry"]
  10850. },
  10851. "attempt": {
  10852. "type": "integer",
  10853. "minimum": 0
  10854. },
  10855. "error": {
  10856. "$ref": "#/components/schemas/APIError"
  10857. },
  10858. "time": {
  10859. "type": "object",
  10860. "properties": {
  10861. "created": {
  10862. "type": "integer",
  10863. "minimum": 0
  10864. }
  10865. },
  10866. "required": ["created"],
  10867. "additionalProperties": false
  10868. }
  10869. },
  10870. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  10871. "additionalProperties": false
  10872. },
  10873. "CompactionPart": {
  10874. "type": "object",
  10875. "properties": {
  10876. "id": {
  10877. "type": "string",
  10878. "pattern": "^prt"
  10879. },
  10880. "sessionID": {
  10881. "type": "string",
  10882. "pattern": "^ses"
  10883. },
  10884. "messageID": {
  10885. "type": "string",
  10886. "pattern": "^msg"
  10887. },
  10888. "type": {
  10889. "type": "string",
  10890. "enum": ["compaction"]
  10891. },
  10892. "auto": {
  10893. "type": "boolean"
  10894. },
  10895. "overflow": {
  10896. "type": "boolean"
  10897. },
  10898. "tail_start_id": {
  10899. "type": "string",
  10900. "pattern": "^msg"
  10901. }
  10902. },
  10903. "required": ["id", "sessionID", "messageID", "type", "auto"],
  10904. "additionalProperties": false
  10905. },
  10906. "Part": {
  10907. "anyOf": [
  10908. {
  10909. "$ref": "#/components/schemas/TextPart"
  10910. },
  10911. {
  10912. "$ref": "#/components/schemas/SubtaskPart"
  10913. },
  10914. {
  10915. "$ref": "#/components/schemas/ReasoningPart"
  10916. },
  10917. {
  10918. "$ref": "#/components/schemas/FilePart"
  10919. },
  10920. {
  10921. "$ref": "#/components/schemas/ToolPart"
  10922. },
  10923. {
  10924. "$ref": "#/components/schemas/StepStartPart"
  10925. },
  10926. {
  10927. "$ref": "#/components/schemas/StepFinishPart"
  10928. },
  10929. {
  10930. "$ref": "#/components/schemas/SnapshotPart"
  10931. },
  10932. {
  10933. "$ref": "#/components/schemas/PatchPart"
  10934. },
  10935. {
  10936. "$ref": "#/components/schemas/AgentPart"
  10937. },
  10938. {
  10939. "$ref": "#/components/schemas/RetryPart"
  10940. },
  10941. {
  10942. "$ref": "#/components/schemas/CompactionPart"
  10943. }
  10944. ]
  10945. },
  10946. "PermissionAction": {
  10947. "type": "string",
  10948. "enum": ["allow", "deny", "ask"]
  10949. },
  10950. "PermissionRule": {
  10951. "type": "object",
  10952. "properties": {
  10953. "permission": {
  10954. "type": "string"
  10955. },
  10956. "pattern": {
  10957. "type": "string"
  10958. },
  10959. "action": {
  10960. "$ref": "#/components/schemas/PermissionAction"
  10961. }
  10962. },
  10963. "required": ["permission", "pattern", "action"],
  10964. "additionalProperties": false
  10965. },
  10966. "PermissionRuleset": {
  10967. "type": "array",
  10968. "items": {
  10969. "$ref": "#/components/schemas/PermissionRule"
  10970. }
  10971. },
  10972. "Session": {
  10973. "type": "object",
  10974. "properties": {
  10975. "id": {
  10976. "type": "string",
  10977. "pattern": "^ses"
  10978. },
  10979. "slug": {
  10980. "type": "string"
  10981. },
  10982. "projectID": {
  10983. "type": "string"
  10984. },
  10985. "workspaceID": {
  10986. "type": "string",
  10987. "pattern": "^wrk"
  10988. },
  10989. "directory": {
  10990. "type": "string"
  10991. },
  10992. "path": {
  10993. "type": "string"
  10994. },
  10995. "parentID": {
  10996. "type": "string",
  10997. "pattern": "^ses"
  10998. },
  10999. "summary": {
  11000. "type": "object",
  11001. "properties": {
  11002. "additions": {
  11003. "type": "number"
  11004. },
  11005. "deletions": {
  11006. "type": "number"
  11007. },
  11008. "files": {
  11009. "type": "number"
  11010. },
  11011. "diffs": {
  11012. "type": "array",
  11013. "items": {
  11014. "$ref": "#/components/schemas/SnapshotFileDiff"
  11015. }
  11016. }
  11017. },
  11018. "required": ["additions", "deletions", "files"],
  11019. "additionalProperties": false
  11020. },
  11021. "cost": {
  11022. "type": "number"
  11023. },
  11024. "tokens": {
  11025. "type": "object",
  11026. "properties": {
  11027. "input": {
  11028. "type": "number"
  11029. },
  11030. "output": {
  11031. "type": "number"
  11032. },
  11033. "reasoning": {
  11034. "type": "number"
  11035. },
  11036. "cache": {
  11037. "type": "object",
  11038. "properties": {
  11039. "read": {
  11040. "type": "number"
  11041. },
  11042. "write": {
  11043. "type": "number"
  11044. }
  11045. },
  11046. "required": ["read", "write"],
  11047. "additionalProperties": false
  11048. }
  11049. },
  11050. "required": ["input", "output", "reasoning", "cache"],
  11051. "additionalProperties": false
  11052. },
  11053. "share": {
  11054. "type": "object",
  11055. "properties": {
  11056. "url": {
  11057. "type": "string"
  11058. }
  11059. },
  11060. "required": ["url"],
  11061. "additionalProperties": false
  11062. },
  11063. "title": {
  11064. "type": "string"
  11065. },
  11066. "agent": {
  11067. "type": "string"
  11068. },
  11069. "model": {
  11070. "type": "object",
  11071. "properties": {
  11072. "id": {
  11073. "type": "string"
  11074. },
  11075. "providerID": {
  11076. "type": "string"
  11077. },
  11078. "variant": {
  11079. "type": "string"
  11080. }
  11081. },
  11082. "required": ["id", "providerID"],
  11083. "additionalProperties": false
  11084. },
  11085. "version": {
  11086. "type": "string"
  11087. },
  11088. "time": {
  11089. "type": "object",
  11090. "properties": {
  11091. "created": {
  11092. "type": "integer",
  11093. "minimum": 0
  11094. },
  11095. "updated": {
  11096. "type": "integer",
  11097. "minimum": 0
  11098. },
  11099. "compacting": {
  11100. "type": "integer",
  11101. "minimum": 0
  11102. },
  11103. "archived": {
  11104. "type": "number"
  11105. }
  11106. },
  11107. "required": ["created", "updated"],
  11108. "additionalProperties": false
  11109. },
  11110. "permission": {
  11111. "$ref": "#/components/schemas/PermissionRuleset"
  11112. },
  11113. "revert": {
  11114. "type": "object",
  11115. "properties": {
  11116. "messageID": {
  11117. "type": "string",
  11118. "pattern": "^msg"
  11119. },
  11120. "partID": {
  11121. "type": "string",
  11122. "pattern": "^prt"
  11123. },
  11124. "snapshot": {
  11125. "type": "string"
  11126. },
  11127. "diff": {
  11128. "type": "string"
  11129. }
  11130. },
  11131. "required": ["messageID"],
  11132. "additionalProperties": false
  11133. }
  11134. },
  11135. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11136. "additionalProperties": false
  11137. },
  11138. "Prompt": {
  11139. "type": "object",
  11140. "properties": {
  11141. "text": {
  11142. "type": "string"
  11143. },
  11144. "files": {
  11145. "type": "array",
  11146. "items": {
  11147. "$ref": "#/components/schemas/PromptFileAttachment"
  11148. }
  11149. },
  11150. "agents": {
  11151. "type": "array",
  11152. "items": {
  11153. "$ref": "#/components/schemas/PromptAgentAttachment"
  11154. }
  11155. },
  11156. "references": {
  11157. "type": "array",
  11158. "items": {
  11159. "$ref": "#/components/schemas/PromptReferenceAttachment"
  11160. }
  11161. }
  11162. },
  11163. "required": ["text"],
  11164. "additionalProperties": false
  11165. },
  11166. "GlobalEvent": {
  11167. "type": "object",
  11168. "properties": {
  11169. "directory": {
  11170. "type": "string"
  11171. },
  11172. "project": {
  11173. "type": "string"
  11174. },
  11175. "workspace": {
  11176. "type": "string"
  11177. },
  11178. "payload": {
  11179. "anyOf": [
  11180. {
  11181. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  11182. },
  11183. {
  11184. "$ref": "#/components/schemas/EventFileEdited"
  11185. },
  11186. {
  11187. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  11188. },
  11189. {
  11190. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  11191. },
  11192. {
  11193. "$ref": "#/components/schemas/EventLspUpdated"
  11194. },
  11195. {
  11196. "$ref": "#/components/schemas/EventMessagePartDelta"
  11197. },
  11198. {
  11199. "$ref": "#/components/schemas/EventPermissionAsked"
  11200. },
  11201. {
  11202. "$ref": "#/components/schemas/EventPermissionReplied"
  11203. },
  11204. {
  11205. "$ref": "#/components/schemas/EventSessionDiff"
  11206. },
  11207. {
  11208. "$ref": "#/components/schemas/EventSessionError"
  11209. },
  11210. {
  11211. "$ref": "#/components/schemas/EventInstallationUpdated"
  11212. },
  11213. {
  11214. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11215. },
  11216. {
  11217. "$ref": "#/components/schemas/EventQuestionAsked"
  11218. },
  11219. {
  11220. "$ref": "#/components/schemas/EventQuestionReplied"
  11221. },
  11222. {
  11223. "$ref": "#/components/schemas/EventQuestionRejected"
  11224. },
  11225. {
  11226. "$ref": "#/components/schemas/EventTodoUpdated"
  11227. },
  11228. {
  11229. "$ref": "#/components/schemas/EventSessionStatus"
  11230. },
  11231. {
  11232. "$ref": "#/components/schemas/EventSessionIdle"
  11233. },
  11234. {
  11235. "$ref": "#/components/schemas/EventSessionCompacted"
  11236. },
  11237. {
  11238. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11239. },
  11240. {
  11241. "$ref": "#/components/schemas/Event.tui.command.execute"
  11242. },
  11243. {
  11244. "$ref": "#/components/schemas/Event.tui.toast.show"
  11245. },
  11246. {
  11247. "$ref": "#/components/schemas/Event.tui.session.select"
  11248. },
  11249. {
  11250. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11251. },
  11252. {
  11253. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11254. },
  11255. {
  11256. "$ref": "#/components/schemas/EventCommandExecuted"
  11257. },
  11258. {
  11259. "$ref": "#/components/schemas/EventProjectUpdated"
  11260. },
  11261. {
  11262. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11263. },
  11264. {
  11265. "$ref": "#/components/schemas/EventWorkspaceReady"
  11266. },
  11267. {
  11268. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11269. },
  11270. {
  11271. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11272. },
  11273. {
  11274. "$ref": "#/components/schemas/EventWorktreeReady"
  11275. },
  11276. {
  11277. "$ref": "#/components/schemas/EventWorktreeFailed"
  11278. },
  11279. {
  11280. "$ref": "#/components/schemas/EventPtyCreated"
  11281. },
  11282. {
  11283. "$ref": "#/components/schemas/EventPtyUpdated"
  11284. },
  11285. {
  11286. "$ref": "#/components/schemas/EventPtyExited"
  11287. },
  11288. {
  11289. "$ref": "#/components/schemas/EventPtyDeleted"
  11290. },
  11291. {
  11292. "$ref": "#/components/schemas/EventMessageUpdated"
  11293. },
  11294. {
  11295. "$ref": "#/components/schemas/EventMessageRemoved"
  11296. },
  11297. {
  11298. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11299. },
  11300. {
  11301. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11302. },
  11303. {
  11304. "$ref": "#/components/schemas/EventSessionCreated"
  11305. },
  11306. {
  11307. "$ref": "#/components/schemas/EventSessionUpdated"
  11308. },
  11309. {
  11310. "$ref": "#/components/schemas/EventSessionDeleted"
  11311. },
  11312. {
  11313. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11314. },
  11315. {
  11316. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11317. },
  11318. {
  11319. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11320. },
  11321. {
  11322. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11323. },
  11324. {
  11325. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11326. },
  11327. {
  11328. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11329. },
  11330. {
  11331. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11332. },
  11333. {
  11334. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11335. },
  11336. {
  11337. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11338. },
  11339. {
  11340. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11341. },
  11342. {
  11343. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11344. },
  11345. {
  11346. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11347. },
  11348. {
  11349. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11350. },
  11351. {
  11352. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11353. },
  11354. {
  11355. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11356. },
  11357. {
  11358. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11359. },
  11360. {
  11361. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11362. },
  11363. {
  11364. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11365. },
  11366. {
  11367. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11368. },
  11369. {
  11370. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11371. },
  11372. {
  11373. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11374. },
  11375. {
  11376. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11377. },
  11378. {
  11379. "$ref": "#/components/schemas/EventSessionNextRetried"
  11380. },
  11381. {
  11382. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11383. },
  11384. {
  11385. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11386. },
  11387. {
  11388. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11389. },
  11390. {
  11391. "$ref": "#/components/schemas/EventServerConnected"
  11392. },
  11393. {
  11394. "$ref": "#/components/schemas/EventGlobalDisposed"
  11395. },
  11396. {
  11397. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  11398. },
  11399. {
  11400. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  11401. },
  11402. {
  11403. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  11404. },
  11405. {
  11406. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  11407. },
  11408. {
  11409. "$ref": "#/components/schemas/SyncEventSessionCreated"
  11410. },
  11411. {
  11412. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  11413. },
  11414. {
  11415. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  11416. },
  11417. {
  11418. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  11419. },
  11420. {
  11421. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  11422. },
  11423. {
  11424. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  11425. },
  11426. {
  11427. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  11428. },
  11429. {
  11430. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  11431. },
  11432. {
  11433. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  11434. },
  11435. {
  11436. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  11437. },
  11438. {
  11439. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  11440. },
  11441. {
  11442. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  11443. },
  11444. {
  11445. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  11446. },
  11447. {
  11448. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  11449. },
  11450. {
  11451. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  11452. },
  11453. {
  11454. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  11455. },
  11456. {
  11457. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  11458. },
  11459. {
  11460. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  11461. },
  11462. {
  11463. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  11464. },
  11465. {
  11466. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  11467. },
  11468. {
  11469. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  11470. },
  11471. {
  11472. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  11473. },
  11474. {
  11475. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  11476. },
  11477. {
  11478. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  11479. },
  11480. {
  11481. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  11482. },
  11483. {
  11484. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  11485. },
  11486. {
  11487. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  11488. },
  11489. {
  11490. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  11491. },
  11492. {
  11493. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  11494. }
  11495. ]
  11496. }
  11497. },
  11498. "required": ["directory", "payload"],
  11499. "additionalProperties": false
  11500. },
  11501. "LogLevel": {
  11502. "type": "string",
  11503. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  11504. "description": "Log level"
  11505. },
  11506. "ServerConfig": {
  11507. "type": "object",
  11508. "properties": {
  11509. "port": {
  11510. "type": "integer",
  11511. "exclusiveMinimum": 0
  11512. },
  11513. "hostname": {
  11514. "type": "string"
  11515. },
  11516. "mdns": {
  11517. "type": "boolean"
  11518. },
  11519. "mdnsDomain": {
  11520. "type": "string"
  11521. },
  11522. "cors": {
  11523. "type": "array",
  11524. "items": {
  11525. "type": "string"
  11526. }
  11527. }
  11528. },
  11529. "additionalProperties": false,
  11530. "description": "Server configuration for opencode serve and web commands"
  11531. },
  11532. "ReferenceConfigEntry": {
  11533. "anyOf": [
  11534. {
  11535. "type": "string"
  11536. },
  11537. {
  11538. "type": "object",
  11539. "properties": {
  11540. "repository": {
  11541. "type": "string",
  11542. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  11543. },
  11544. "branch": {
  11545. "type": "string"
  11546. }
  11547. },
  11548. "required": ["repository"],
  11549. "additionalProperties": false
  11550. },
  11551. {
  11552. "type": "object",
  11553. "properties": {
  11554. "path": {
  11555. "type": "string",
  11556. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  11557. }
  11558. },
  11559. "required": ["path"],
  11560. "additionalProperties": false
  11561. }
  11562. ]
  11563. },
  11564. "ReferenceConfig": {
  11565. "type": "object",
  11566. "additionalProperties": {
  11567. "$ref": "#/components/schemas/ReferenceConfigEntry"
  11568. }
  11569. },
  11570. "PermissionActionConfig": {
  11571. "type": "string",
  11572. "enum": ["ask", "allow", "deny"]
  11573. },
  11574. "PermissionObjectConfig": {
  11575. "type": "object",
  11576. "additionalProperties": {
  11577. "$ref": "#/components/schemas/PermissionActionConfig"
  11578. }
  11579. },
  11580. "PermissionRuleConfig": {
  11581. "anyOf": [
  11582. {
  11583. "$ref": "#/components/schemas/PermissionActionConfig"
  11584. },
  11585. {
  11586. "$ref": "#/components/schemas/PermissionObjectConfig"
  11587. }
  11588. ]
  11589. },
  11590. "PermissionConfig": {
  11591. "anyOf": [
  11592. {
  11593. "$ref": "#/components/schemas/PermissionActionConfig"
  11594. },
  11595. {
  11596. "type": "object",
  11597. "properties": {
  11598. "read": {
  11599. "$ref": "#/components/schemas/PermissionRuleConfig"
  11600. },
  11601. "edit": {
  11602. "$ref": "#/components/schemas/PermissionRuleConfig"
  11603. },
  11604. "glob": {
  11605. "$ref": "#/components/schemas/PermissionRuleConfig"
  11606. },
  11607. "grep": {
  11608. "$ref": "#/components/schemas/PermissionRuleConfig"
  11609. },
  11610. "list": {
  11611. "$ref": "#/components/schemas/PermissionRuleConfig"
  11612. },
  11613. "bash": {
  11614. "$ref": "#/components/schemas/PermissionRuleConfig"
  11615. },
  11616. "task": {
  11617. "$ref": "#/components/schemas/PermissionRuleConfig"
  11618. },
  11619. "external_directory": {
  11620. "$ref": "#/components/schemas/PermissionRuleConfig"
  11621. },
  11622. "todowrite": {
  11623. "$ref": "#/components/schemas/PermissionActionConfig"
  11624. },
  11625. "question": {
  11626. "$ref": "#/components/schemas/PermissionActionConfig"
  11627. },
  11628. "webfetch": {
  11629. "$ref": "#/components/schemas/PermissionActionConfig"
  11630. },
  11631. "websearch": {
  11632. "$ref": "#/components/schemas/PermissionActionConfig"
  11633. },
  11634. "codesearch": {
  11635. "$ref": "#/components/schemas/PermissionActionConfig"
  11636. },
  11637. "repo_clone": {
  11638. "$ref": "#/components/schemas/PermissionRuleConfig"
  11639. },
  11640. "repo_overview": {
  11641. "$ref": "#/components/schemas/PermissionRuleConfig"
  11642. },
  11643. "lsp": {
  11644. "$ref": "#/components/schemas/PermissionRuleConfig"
  11645. },
  11646. "doom_loop": {
  11647. "$ref": "#/components/schemas/PermissionActionConfig"
  11648. },
  11649. "skill": {
  11650. "$ref": "#/components/schemas/PermissionRuleConfig"
  11651. }
  11652. },
  11653. "additionalProperties": {
  11654. "$ref": "#/components/schemas/PermissionRuleConfig"
  11655. }
  11656. }
  11657. ]
  11658. },
  11659. "AgentConfig": {
  11660. "type": "object",
  11661. "properties": {
  11662. "model": {
  11663. "type": "string"
  11664. },
  11665. "variant": {
  11666. "type": "string"
  11667. },
  11668. "temperature": {
  11669. "type": "number"
  11670. },
  11671. "top_p": {
  11672. "type": "number"
  11673. },
  11674. "prompt": {
  11675. "type": "string"
  11676. },
  11677. "tools": {
  11678. "type": "object",
  11679. "additionalProperties": {
  11680. "type": "boolean"
  11681. }
  11682. },
  11683. "disable": {
  11684. "type": "boolean"
  11685. },
  11686. "description": {
  11687. "type": "string"
  11688. },
  11689. "mode": {
  11690. "type": "string",
  11691. "enum": ["subagent", "primary", "all"]
  11692. },
  11693. "hidden": {
  11694. "type": "boolean"
  11695. },
  11696. "options": {
  11697. "type": "object"
  11698. },
  11699. "color": {
  11700. "anyOf": [
  11701. {
  11702. "type": "string",
  11703. "pattern": "^#[0-9a-fA-F]{6}$"
  11704. },
  11705. {
  11706. "type": "string",
  11707. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11708. }
  11709. ],
  11710. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  11711. },
  11712. "steps": {
  11713. "type": "integer",
  11714. "exclusiveMinimum": 0
  11715. },
  11716. "maxSteps": {
  11717. "type": "integer",
  11718. "exclusiveMinimum": 0
  11719. },
  11720. "permission": {
  11721. "$ref": "#/components/schemas/PermissionConfig"
  11722. }
  11723. },
  11724. "additionalProperties": {}
  11725. },
  11726. "ProviderConfig": {
  11727. "type": "object",
  11728. "properties": {
  11729. "api": {
  11730. "type": "string"
  11731. },
  11732. "name": {
  11733. "type": "string"
  11734. },
  11735. "env": {
  11736. "type": "array",
  11737. "items": {
  11738. "type": "string"
  11739. }
  11740. },
  11741. "id": {
  11742. "type": "string"
  11743. },
  11744. "npm": {
  11745. "type": "string"
  11746. },
  11747. "whitelist": {
  11748. "type": "array",
  11749. "items": {
  11750. "type": "string"
  11751. }
  11752. },
  11753. "blacklist": {
  11754. "type": "array",
  11755. "items": {
  11756. "type": "string"
  11757. }
  11758. },
  11759. "options": {
  11760. "type": "object",
  11761. "properties": {
  11762. "apiKey": {
  11763. "type": "string"
  11764. },
  11765. "baseURL": {
  11766. "type": "string"
  11767. },
  11768. "enterpriseUrl": {
  11769. "type": "string"
  11770. },
  11771. "setCacheKey": {
  11772. "type": "boolean"
  11773. },
  11774. "timeout": {
  11775. "anyOf": [
  11776. {
  11777. "type": "integer",
  11778. "exclusiveMinimum": 0
  11779. },
  11780. {
  11781. "type": "boolean",
  11782. "enum": [false]
  11783. }
  11784. ],
  11785. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  11786. },
  11787. "chunkTimeout": {
  11788. "type": "integer",
  11789. "exclusiveMinimum": 0
  11790. }
  11791. },
  11792. "additionalProperties": {}
  11793. },
  11794. "models": {
  11795. "type": "object",
  11796. "additionalProperties": {
  11797. "type": "object",
  11798. "properties": {
  11799. "id": {
  11800. "type": "string"
  11801. },
  11802. "name": {
  11803. "type": "string"
  11804. },
  11805. "family": {
  11806. "type": "string"
  11807. },
  11808. "release_date": {
  11809. "type": "string"
  11810. },
  11811. "attachment": {
  11812. "type": "boolean"
  11813. },
  11814. "reasoning": {
  11815. "type": "boolean"
  11816. },
  11817. "temperature": {
  11818. "type": "boolean"
  11819. },
  11820. "tool_call": {
  11821. "type": "boolean"
  11822. },
  11823. "interleaved": {
  11824. "anyOf": [
  11825. {
  11826. "type": "boolean",
  11827. "enum": [true]
  11828. },
  11829. {
  11830. "type": "object",
  11831. "properties": {
  11832. "field": {
  11833. "type": "string",
  11834. "enum": ["reasoning_content", "reasoning_details"]
  11835. }
  11836. },
  11837. "required": ["field"],
  11838. "additionalProperties": false
  11839. }
  11840. ]
  11841. },
  11842. "cost": {
  11843. "type": "object",
  11844. "properties": {
  11845. "input": {
  11846. "type": "number"
  11847. },
  11848. "output": {
  11849. "type": "number"
  11850. },
  11851. "cache_read": {
  11852. "type": "number"
  11853. },
  11854. "cache_write": {
  11855. "type": "number"
  11856. },
  11857. "context_over_200k": {
  11858. "type": "object",
  11859. "properties": {
  11860. "input": {
  11861. "type": "number"
  11862. },
  11863. "output": {
  11864. "type": "number"
  11865. },
  11866. "cache_read": {
  11867. "type": "number"
  11868. },
  11869. "cache_write": {
  11870. "type": "number"
  11871. }
  11872. },
  11873. "required": ["input", "output"],
  11874. "additionalProperties": false
  11875. }
  11876. },
  11877. "required": ["input", "output"],
  11878. "additionalProperties": false
  11879. },
  11880. "limit": {
  11881. "type": "object",
  11882. "properties": {
  11883. "context": {
  11884. "type": "number"
  11885. },
  11886. "input": {
  11887. "type": "number"
  11888. },
  11889. "output": {
  11890. "type": "number"
  11891. }
  11892. },
  11893. "required": ["context", "output"],
  11894. "additionalProperties": false
  11895. },
  11896. "modalities": {
  11897. "type": "object",
  11898. "properties": {
  11899. "input": {
  11900. "type": "array",
  11901. "items": {
  11902. "type": "string",
  11903. "enum": ["text", "audio", "image", "video", "pdf"]
  11904. }
  11905. },
  11906. "output": {
  11907. "type": "array",
  11908. "items": {
  11909. "type": "string",
  11910. "enum": ["text", "audio", "image", "video", "pdf"]
  11911. }
  11912. }
  11913. },
  11914. "required": ["input", "output"],
  11915. "additionalProperties": false
  11916. },
  11917. "experimental": {
  11918. "type": "boolean"
  11919. },
  11920. "status": {
  11921. "type": "string",
  11922. "enum": ["alpha", "beta", "deprecated", "active"]
  11923. },
  11924. "provider": {
  11925. "type": "object",
  11926. "properties": {
  11927. "npm": {
  11928. "type": "string"
  11929. },
  11930. "api": {
  11931. "type": "string"
  11932. }
  11933. },
  11934. "additionalProperties": false
  11935. },
  11936. "options": {
  11937. "type": "object"
  11938. },
  11939. "headers": {
  11940. "type": "object",
  11941. "additionalProperties": {
  11942. "type": "string"
  11943. }
  11944. },
  11945. "variants": {
  11946. "type": "object",
  11947. "additionalProperties": {
  11948. "type": "object",
  11949. "properties": {
  11950. "disabled": {
  11951. "type": "boolean"
  11952. }
  11953. },
  11954. "additionalProperties": {}
  11955. },
  11956. "description": "Variant-specific configuration"
  11957. }
  11958. },
  11959. "additionalProperties": false
  11960. }
  11961. }
  11962. },
  11963. "additionalProperties": false
  11964. },
  11965. "McpLocalConfig": {
  11966. "type": "object",
  11967. "properties": {
  11968. "type": {
  11969. "type": "string",
  11970. "enum": ["local"],
  11971. "description": "Type of MCP server connection"
  11972. },
  11973. "command": {
  11974. "type": "array",
  11975. "items": {
  11976. "type": "string"
  11977. },
  11978. "description": "Command and arguments to run the MCP server"
  11979. },
  11980. "environment": {
  11981. "type": "object",
  11982. "additionalProperties": {
  11983. "type": "string"
  11984. }
  11985. },
  11986. "enabled": {
  11987. "type": "boolean"
  11988. },
  11989. "timeout": {
  11990. "type": "integer",
  11991. "exclusiveMinimum": 0
  11992. }
  11993. },
  11994. "required": ["type", "command"],
  11995. "additionalProperties": false
  11996. },
  11997. "McpOAuthConfig": {
  11998. "type": "object",
  11999. "properties": {
  12000. "clientId": {
  12001. "type": "string"
  12002. },
  12003. "clientSecret": {
  12004. "type": "string"
  12005. },
  12006. "scope": {
  12007. "type": "string"
  12008. },
  12009. "redirectUri": {
  12010. "type": "string"
  12011. }
  12012. },
  12013. "additionalProperties": false
  12014. },
  12015. "McpRemoteConfig": {
  12016. "type": "object",
  12017. "properties": {
  12018. "type": {
  12019. "type": "string",
  12020. "enum": ["remote"],
  12021. "description": "Type of MCP server connection"
  12022. },
  12023. "url": {
  12024. "type": "string",
  12025. "description": "URL of the remote MCP server"
  12026. },
  12027. "enabled": {
  12028. "type": "boolean"
  12029. },
  12030. "headers": {
  12031. "type": "object",
  12032. "additionalProperties": {
  12033. "type": "string"
  12034. }
  12035. },
  12036. "oauth": {
  12037. "anyOf": [
  12038. {
  12039. "$ref": "#/components/schemas/McpOAuthConfig"
  12040. },
  12041. {
  12042. "type": "boolean",
  12043. "enum": [false]
  12044. }
  12045. ],
  12046. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  12047. },
  12048. "timeout": {
  12049. "type": "integer",
  12050. "exclusiveMinimum": 0
  12051. }
  12052. },
  12053. "required": ["type", "url"],
  12054. "additionalProperties": false
  12055. },
  12056. "LayoutConfig": {
  12057. "type": "string",
  12058. "enum": ["auto", "stretch"],
  12059. "description": "@deprecated Always uses stretch layout."
  12060. },
  12061. "ImageAttachmentConfig": {
  12062. "type": "object",
  12063. "properties": {
  12064. "auto_resize": {
  12065. "type": "boolean"
  12066. },
  12067. "max_width": {
  12068. "type": "integer",
  12069. "exclusiveMinimum": 0
  12070. },
  12071. "max_height": {
  12072. "type": "integer",
  12073. "exclusiveMinimum": 0
  12074. },
  12075. "max_base64_bytes": {
  12076. "type": "integer",
  12077. "exclusiveMinimum": 0
  12078. }
  12079. },
  12080. "additionalProperties": false
  12081. },
  12082. "AttachmentConfig": {
  12083. "type": "object",
  12084. "properties": {
  12085. "image": {
  12086. "$ref": "#/components/schemas/ImageAttachmentConfig"
  12087. }
  12088. },
  12089. "additionalProperties": false
  12090. },
  12091. "Config": {
  12092. "type": "object",
  12093. "properties": {
  12094. "$schema": {
  12095. "type": "string"
  12096. },
  12097. "shell": {
  12098. "type": "string"
  12099. },
  12100. "logLevel": {
  12101. "$ref": "#/components/schemas/LogLevel"
  12102. },
  12103. "server": {
  12104. "$ref": "#/components/schemas/ServerConfig"
  12105. },
  12106. "command": {
  12107. "type": "object",
  12108. "additionalProperties": {
  12109. "type": "object",
  12110. "properties": {
  12111. "template": {
  12112. "type": "string"
  12113. },
  12114. "description": {
  12115. "type": "string"
  12116. },
  12117. "agent": {
  12118. "type": "string"
  12119. },
  12120. "model": {
  12121. "type": "string"
  12122. },
  12123. "subtask": {
  12124. "type": "boolean"
  12125. }
  12126. },
  12127. "required": ["template"],
  12128. "additionalProperties": false
  12129. }
  12130. },
  12131. "skills": {
  12132. "type": "object",
  12133. "properties": {
  12134. "paths": {
  12135. "type": "array",
  12136. "items": {
  12137. "type": "string"
  12138. }
  12139. },
  12140. "urls": {
  12141. "type": "array",
  12142. "items": {
  12143. "type": "string"
  12144. }
  12145. }
  12146. },
  12147. "additionalProperties": false
  12148. },
  12149. "reference": {
  12150. "$ref": "#/components/schemas/ReferenceConfig"
  12151. },
  12152. "watcher": {
  12153. "type": "object",
  12154. "properties": {
  12155. "ignore": {
  12156. "type": "array",
  12157. "items": {
  12158. "type": "string"
  12159. }
  12160. }
  12161. },
  12162. "additionalProperties": false
  12163. },
  12164. "snapshot": {
  12165. "type": "boolean"
  12166. },
  12167. "plugin": {
  12168. "type": "array",
  12169. "items": {
  12170. "anyOf": [
  12171. {
  12172. "type": "string"
  12173. },
  12174. {
  12175. "type": "array",
  12176. "prefixItems": [
  12177. {
  12178. "type": "string"
  12179. },
  12180. {
  12181. "type": "object"
  12182. }
  12183. ],
  12184. "maxItems": 2,
  12185. "minItems": 2
  12186. }
  12187. ]
  12188. }
  12189. },
  12190. "share": {
  12191. "type": "string",
  12192. "enum": ["manual", "auto", "disabled"]
  12193. },
  12194. "autoshare": {
  12195. "type": "boolean"
  12196. },
  12197. "autoupdate": {
  12198. "anyOf": [
  12199. {
  12200. "type": "boolean"
  12201. },
  12202. {
  12203. "type": "string",
  12204. "enum": ["notify"]
  12205. }
  12206. ],
  12207. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  12208. },
  12209. "disabled_providers": {
  12210. "type": "array",
  12211. "items": {
  12212. "type": "string"
  12213. }
  12214. },
  12215. "enabled_providers": {
  12216. "type": "array",
  12217. "items": {
  12218. "type": "string"
  12219. }
  12220. },
  12221. "model": {
  12222. "type": "string"
  12223. },
  12224. "small_model": {
  12225. "type": "string"
  12226. },
  12227. "default_agent": {
  12228. "type": "string"
  12229. },
  12230. "username": {
  12231. "type": "string"
  12232. },
  12233. "mode": {
  12234. "type": "object",
  12235. "properties": {
  12236. "build": {
  12237. "$ref": "#/components/schemas/AgentConfig"
  12238. },
  12239. "plan": {
  12240. "$ref": "#/components/schemas/AgentConfig"
  12241. }
  12242. },
  12243. "additionalProperties": {
  12244. "$ref": "#/components/schemas/AgentConfig"
  12245. }
  12246. },
  12247. "agent": {
  12248. "type": "object",
  12249. "properties": {
  12250. "plan": {
  12251. "$ref": "#/components/schemas/AgentConfig"
  12252. },
  12253. "build": {
  12254. "$ref": "#/components/schemas/AgentConfig"
  12255. },
  12256. "general": {
  12257. "$ref": "#/components/schemas/AgentConfig"
  12258. },
  12259. "explore": {
  12260. "$ref": "#/components/schemas/AgentConfig"
  12261. },
  12262. "scout": {
  12263. "$ref": "#/components/schemas/AgentConfig"
  12264. },
  12265. "title": {
  12266. "$ref": "#/components/schemas/AgentConfig"
  12267. },
  12268. "summary": {
  12269. "$ref": "#/components/schemas/AgentConfig"
  12270. },
  12271. "compaction": {
  12272. "$ref": "#/components/schemas/AgentConfig"
  12273. }
  12274. },
  12275. "additionalProperties": {
  12276. "$ref": "#/components/schemas/AgentConfig"
  12277. }
  12278. },
  12279. "provider": {
  12280. "type": "object",
  12281. "additionalProperties": {
  12282. "$ref": "#/components/schemas/ProviderConfig"
  12283. }
  12284. },
  12285. "mcp": {
  12286. "type": "object",
  12287. "additionalProperties": {
  12288. "anyOf": [
  12289. {
  12290. "$ref": "#/components/schemas/McpLocalConfig"
  12291. },
  12292. {
  12293. "$ref": "#/components/schemas/McpRemoteConfig"
  12294. },
  12295. {
  12296. "type": "object",
  12297. "properties": {
  12298. "enabled": {
  12299. "type": "boolean"
  12300. }
  12301. },
  12302. "required": ["enabled"],
  12303. "additionalProperties": false
  12304. }
  12305. ]
  12306. }
  12307. },
  12308. "formatter": {
  12309. "anyOf": [
  12310. {
  12311. "type": "boolean"
  12312. },
  12313. {
  12314. "type": "object",
  12315. "additionalProperties": {
  12316. "type": "object",
  12317. "properties": {
  12318. "disabled": {
  12319. "type": "boolean"
  12320. },
  12321. "command": {
  12322. "type": "array",
  12323. "items": {
  12324. "type": "string"
  12325. }
  12326. },
  12327. "environment": {
  12328. "type": "object",
  12329. "additionalProperties": {
  12330. "type": "string"
  12331. }
  12332. },
  12333. "extensions": {
  12334. "type": "array",
  12335. "items": {
  12336. "type": "string"
  12337. }
  12338. }
  12339. },
  12340. "additionalProperties": false
  12341. }
  12342. }
  12343. ],
  12344. "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."
  12345. },
  12346. "lsp": {
  12347. "anyOf": [
  12348. {
  12349. "type": "boolean"
  12350. },
  12351. {
  12352. "type": "object",
  12353. "additionalProperties": {
  12354. "anyOf": [
  12355. {
  12356. "type": "object",
  12357. "properties": {
  12358. "disabled": {
  12359. "type": "boolean",
  12360. "enum": [true]
  12361. }
  12362. },
  12363. "required": ["disabled"],
  12364. "additionalProperties": false
  12365. },
  12366. {
  12367. "type": "object",
  12368. "properties": {
  12369. "command": {
  12370. "type": "array",
  12371. "items": {
  12372. "type": "string"
  12373. }
  12374. },
  12375. "extensions": {
  12376. "type": "array",
  12377. "items": {
  12378. "type": "string"
  12379. }
  12380. },
  12381. "disabled": {
  12382. "type": "boolean"
  12383. },
  12384. "env": {
  12385. "type": "object",
  12386. "additionalProperties": {
  12387. "type": "string"
  12388. }
  12389. },
  12390. "initialization": {
  12391. "type": "object"
  12392. }
  12393. },
  12394. "required": ["command"],
  12395. "additionalProperties": false
  12396. }
  12397. ]
  12398. }
  12399. }
  12400. ],
  12401. "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."
  12402. },
  12403. "instructions": {
  12404. "type": "array",
  12405. "items": {
  12406. "type": "string"
  12407. }
  12408. },
  12409. "layout": {
  12410. "$ref": "#/components/schemas/LayoutConfig"
  12411. },
  12412. "permission": {
  12413. "$ref": "#/components/schemas/PermissionConfig"
  12414. },
  12415. "tools": {
  12416. "type": "object",
  12417. "additionalProperties": {
  12418. "type": "boolean"
  12419. }
  12420. },
  12421. "attachment": {
  12422. "$ref": "#/components/schemas/AttachmentConfig"
  12423. },
  12424. "enterprise": {
  12425. "type": "object",
  12426. "properties": {
  12427. "url": {
  12428. "type": "string"
  12429. }
  12430. },
  12431. "additionalProperties": false
  12432. },
  12433. "tool_output": {
  12434. "type": "object",
  12435. "properties": {
  12436. "max_lines": {
  12437. "type": "integer",
  12438. "exclusiveMinimum": 0
  12439. },
  12440. "max_bytes": {
  12441. "type": "integer",
  12442. "exclusiveMinimum": 0
  12443. }
  12444. },
  12445. "additionalProperties": false
  12446. },
  12447. "compaction": {
  12448. "type": "object",
  12449. "properties": {
  12450. "auto": {
  12451. "type": "boolean"
  12452. },
  12453. "prune": {
  12454. "type": "boolean"
  12455. },
  12456. "tail_turns": {
  12457. "type": "integer",
  12458. "minimum": 0
  12459. },
  12460. "preserve_recent_tokens": {
  12461. "type": "integer",
  12462. "minimum": 0
  12463. },
  12464. "reserved": {
  12465. "type": "integer",
  12466. "minimum": 0
  12467. }
  12468. },
  12469. "additionalProperties": false
  12470. },
  12471. "experimental": {
  12472. "type": "object",
  12473. "properties": {
  12474. "disable_paste_summary": {
  12475. "type": "boolean"
  12476. },
  12477. "batch_tool": {
  12478. "type": "boolean"
  12479. },
  12480. "openTelemetry": {
  12481. "type": "boolean"
  12482. },
  12483. "primary_tools": {
  12484. "type": "array",
  12485. "items": {
  12486. "type": "string"
  12487. }
  12488. },
  12489. "continue_loop_on_deny": {
  12490. "type": "boolean"
  12491. },
  12492. "mcp_timeout": {
  12493. "type": "integer",
  12494. "exclusiveMinimum": 0
  12495. }
  12496. },
  12497. "additionalProperties": false
  12498. }
  12499. },
  12500. "additionalProperties": false
  12501. },
  12502. "Model": {
  12503. "type": "object",
  12504. "properties": {
  12505. "id": {
  12506. "type": "string"
  12507. },
  12508. "providerID": {
  12509. "type": "string"
  12510. },
  12511. "api": {
  12512. "type": "object",
  12513. "properties": {
  12514. "id": {
  12515. "type": "string"
  12516. },
  12517. "url": {
  12518. "type": "string"
  12519. },
  12520. "npm": {
  12521. "type": "string"
  12522. }
  12523. },
  12524. "required": ["id", "url", "npm"],
  12525. "additionalProperties": false
  12526. },
  12527. "name": {
  12528. "type": "string"
  12529. },
  12530. "family": {
  12531. "type": "string"
  12532. },
  12533. "capabilities": {
  12534. "type": "object",
  12535. "properties": {
  12536. "temperature": {
  12537. "type": "boolean"
  12538. },
  12539. "reasoning": {
  12540. "type": "boolean"
  12541. },
  12542. "attachment": {
  12543. "type": "boolean"
  12544. },
  12545. "toolcall": {
  12546. "type": "boolean"
  12547. },
  12548. "input": {
  12549. "type": "object",
  12550. "properties": {
  12551. "text": {
  12552. "type": "boolean"
  12553. },
  12554. "audio": {
  12555. "type": "boolean"
  12556. },
  12557. "image": {
  12558. "type": "boolean"
  12559. },
  12560. "video": {
  12561. "type": "boolean"
  12562. },
  12563. "pdf": {
  12564. "type": "boolean"
  12565. }
  12566. },
  12567. "required": ["text", "audio", "image", "video", "pdf"],
  12568. "additionalProperties": false
  12569. },
  12570. "output": {
  12571. "type": "object",
  12572. "properties": {
  12573. "text": {
  12574. "type": "boolean"
  12575. },
  12576. "audio": {
  12577. "type": "boolean"
  12578. },
  12579. "image": {
  12580. "type": "boolean"
  12581. },
  12582. "video": {
  12583. "type": "boolean"
  12584. },
  12585. "pdf": {
  12586. "type": "boolean"
  12587. }
  12588. },
  12589. "required": ["text", "audio", "image", "video", "pdf"],
  12590. "additionalProperties": false
  12591. },
  12592. "interleaved": {
  12593. "anyOf": [
  12594. {
  12595. "type": "boolean"
  12596. },
  12597. {
  12598. "type": "object",
  12599. "properties": {
  12600. "field": {
  12601. "type": "string",
  12602. "enum": ["reasoning_content", "reasoning_details"]
  12603. }
  12604. },
  12605. "required": ["field"],
  12606. "additionalProperties": false
  12607. }
  12608. ]
  12609. }
  12610. },
  12611. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  12612. "additionalProperties": false
  12613. },
  12614. "cost": {
  12615. "type": "object",
  12616. "properties": {
  12617. "input": {
  12618. "type": "number"
  12619. },
  12620. "output": {
  12621. "type": "number"
  12622. },
  12623. "cache": {
  12624. "type": "object",
  12625. "properties": {
  12626. "read": {
  12627. "type": "number"
  12628. },
  12629. "write": {
  12630. "type": "number"
  12631. }
  12632. },
  12633. "required": ["read", "write"],
  12634. "additionalProperties": false
  12635. },
  12636. "experimentalOver200K": {
  12637. "type": "object",
  12638. "properties": {
  12639. "input": {
  12640. "type": "number"
  12641. },
  12642. "output": {
  12643. "type": "number"
  12644. },
  12645. "cache": {
  12646. "type": "object",
  12647. "properties": {
  12648. "read": {
  12649. "type": "number"
  12650. },
  12651. "write": {
  12652. "type": "number"
  12653. }
  12654. },
  12655. "required": ["read", "write"],
  12656. "additionalProperties": false
  12657. }
  12658. },
  12659. "required": ["input", "output", "cache"],
  12660. "additionalProperties": false
  12661. }
  12662. },
  12663. "required": ["input", "output", "cache"],
  12664. "additionalProperties": false
  12665. },
  12666. "limit": {
  12667. "type": "object",
  12668. "properties": {
  12669. "context": {
  12670. "type": "number"
  12671. },
  12672. "input": {
  12673. "type": "number"
  12674. },
  12675. "output": {
  12676. "type": "number"
  12677. }
  12678. },
  12679. "required": ["context", "output"],
  12680. "additionalProperties": false
  12681. },
  12682. "status": {
  12683. "type": "string",
  12684. "enum": ["alpha", "beta", "deprecated", "active"]
  12685. },
  12686. "options": {
  12687. "type": "object"
  12688. },
  12689. "headers": {
  12690. "type": "object",
  12691. "additionalProperties": {
  12692. "type": "string"
  12693. }
  12694. },
  12695. "release_date": {
  12696. "type": "string"
  12697. },
  12698. "variants": {
  12699. "type": "object",
  12700. "additionalProperties": {
  12701. "type": "object"
  12702. }
  12703. }
  12704. },
  12705. "required": [
  12706. "id",
  12707. "providerID",
  12708. "api",
  12709. "name",
  12710. "capabilities",
  12711. "cost",
  12712. "limit",
  12713. "status",
  12714. "options",
  12715. "headers",
  12716. "release_date"
  12717. ],
  12718. "additionalProperties": false
  12719. },
  12720. "Provider": {
  12721. "type": "object",
  12722. "properties": {
  12723. "id": {
  12724. "type": "string"
  12725. },
  12726. "name": {
  12727. "type": "string"
  12728. },
  12729. "source": {
  12730. "type": "string",
  12731. "enum": ["env", "config", "custom", "api"]
  12732. },
  12733. "env": {
  12734. "type": "array",
  12735. "items": {
  12736. "type": "string"
  12737. }
  12738. },
  12739. "key": {
  12740. "type": "string"
  12741. },
  12742. "options": {
  12743. "type": "object"
  12744. },
  12745. "models": {
  12746. "type": "object",
  12747. "additionalProperties": {
  12748. "$ref": "#/components/schemas/Model"
  12749. }
  12750. }
  12751. },
  12752. "required": ["id", "name", "source", "env", "options", "models"],
  12753. "additionalProperties": false
  12754. },
  12755. "ConsoleState": {
  12756. "type": "object",
  12757. "properties": {
  12758. "consoleManagedProviders": {
  12759. "type": "array",
  12760. "items": {
  12761. "type": "string"
  12762. }
  12763. },
  12764. "activeOrgName": {
  12765. "type": "string"
  12766. },
  12767. "switchableOrgCount": {
  12768. "type": "integer",
  12769. "minimum": 0
  12770. }
  12771. },
  12772. "required": ["consoleManagedProviders", "switchableOrgCount"],
  12773. "additionalProperties": false
  12774. },
  12775. "effect_HttpApiError_InternalServerError": {
  12776. "type": "object",
  12777. "properties": {
  12778. "_tag": {
  12779. "type": "string",
  12780. "enum": ["InternalServerError"]
  12781. }
  12782. },
  12783. "required": ["_tag"],
  12784. "additionalProperties": false
  12785. },
  12786. "ToolListItem": {
  12787. "type": "object",
  12788. "properties": {
  12789. "id": {
  12790. "type": "string"
  12791. },
  12792. "description": {
  12793. "type": "string"
  12794. },
  12795. "parameters": {}
  12796. },
  12797. "required": ["id", "description", "parameters"],
  12798. "additionalProperties": false
  12799. },
  12800. "ToolList": {
  12801. "type": "array",
  12802. "items": {
  12803. "$ref": "#/components/schemas/ToolListItem"
  12804. }
  12805. },
  12806. "ToolIDs": {
  12807. "type": "array",
  12808. "items": {
  12809. "type": "string"
  12810. }
  12811. },
  12812. "WorktreeCreateInput": {
  12813. "type": "object",
  12814. "properties": {
  12815. "name": {
  12816. "type": "string"
  12817. },
  12818. "startCommand": {
  12819. "type": "string",
  12820. "description": "Additional startup script to run after the project's start command"
  12821. }
  12822. },
  12823. "additionalProperties": false
  12824. },
  12825. "Worktree": {
  12826. "type": "object",
  12827. "properties": {
  12828. "name": {
  12829. "type": "string"
  12830. },
  12831. "branch": {
  12832. "type": "string"
  12833. },
  12834. "directory": {
  12835. "type": "string"
  12836. }
  12837. },
  12838. "required": ["name", "directory"],
  12839. "additionalProperties": false
  12840. },
  12841. "WorktreeRemoveInput": {
  12842. "type": "object",
  12843. "properties": {
  12844. "directory": {
  12845. "type": "string"
  12846. }
  12847. },
  12848. "required": ["directory"],
  12849. "additionalProperties": false
  12850. },
  12851. "WorktreeResetInput": {
  12852. "type": "object",
  12853. "properties": {
  12854. "directory": {
  12855. "type": "string"
  12856. }
  12857. },
  12858. "required": ["directory"],
  12859. "additionalProperties": false
  12860. },
  12861. "ProjectSummary": {
  12862. "type": "object",
  12863. "properties": {
  12864. "id": {
  12865. "type": "string"
  12866. },
  12867. "name": {
  12868. "type": "string"
  12869. },
  12870. "worktree": {
  12871. "type": "string"
  12872. }
  12873. },
  12874. "required": ["id", "worktree"],
  12875. "additionalProperties": false
  12876. },
  12877. "GlobalSession": {
  12878. "type": "object",
  12879. "properties": {
  12880. "id": {
  12881. "type": "string",
  12882. "pattern": "^ses"
  12883. },
  12884. "slug": {
  12885. "type": "string"
  12886. },
  12887. "projectID": {
  12888. "type": "string"
  12889. },
  12890. "workspaceID": {
  12891. "type": "string",
  12892. "pattern": "^wrk"
  12893. },
  12894. "directory": {
  12895. "type": "string"
  12896. },
  12897. "path": {
  12898. "type": "string"
  12899. },
  12900. "parentID": {
  12901. "type": "string",
  12902. "pattern": "^ses"
  12903. },
  12904. "summary": {
  12905. "type": "object",
  12906. "properties": {
  12907. "additions": {
  12908. "type": "number"
  12909. },
  12910. "deletions": {
  12911. "type": "number"
  12912. },
  12913. "files": {
  12914. "type": "number"
  12915. },
  12916. "diffs": {
  12917. "type": "array",
  12918. "items": {
  12919. "$ref": "#/components/schemas/SnapshotFileDiff"
  12920. }
  12921. }
  12922. },
  12923. "required": ["additions", "deletions", "files"],
  12924. "additionalProperties": false
  12925. },
  12926. "cost": {
  12927. "type": "number"
  12928. },
  12929. "tokens": {
  12930. "type": "object",
  12931. "properties": {
  12932. "input": {
  12933. "type": "number"
  12934. },
  12935. "output": {
  12936. "type": "number"
  12937. },
  12938. "reasoning": {
  12939. "type": "number"
  12940. },
  12941. "cache": {
  12942. "type": "object",
  12943. "properties": {
  12944. "read": {
  12945. "type": "number"
  12946. },
  12947. "write": {
  12948. "type": "number"
  12949. }
  12950. },
  12951. "required": ["read", "write"],
  12952. "additionalProperties": false
  12953. }
  12954. },
  12955. "required": ["input", "output", "reasoning", "cache"],
  12956. "additionalProperties": false
  12957. },
  12958. "share": {
  12959. "type": "object",
  12960. "properties": {
  12961. "url": {
  12962. "type": "string"
  12963. }
  12964. },
  12965. "required": ["url"],
  12966. "additionalProperties": false
  12967. },
  12968. "title": {
  12969. "type": "string"
  12970. },
  12971. "agent": {
  12972. "type": "string"
  12973. },
  12974. "model": {
  12975. "type": "object",
  12976. "properties": {
  12977. "id": {
  12978. "type": "string"
  12979. },
  12980. "providerID": {
  12981. "type": "string"
  12982. },
  12983. "variant": {
  12984. "type": "string"
  12985. }
  12986. },
  12987. "required": ["id", "providerID"],
  12988. "additionalProperties": false
  12989. },
  12990. "version": {
  12991. "type": "string"
  12992. },
  12993. "time": {
  12994. "type": "object",
  12995. "properties": {
  12996. "created": {
  12997. "type": "integer",
  12998. "minimum": 0
  12999. },
  13000. "updated": {
  13001. "type": "integer",
  13002. "minimum": 0
  13003. },
  13004. "compacting": {
  13005. "type": "integer",
  13006. "minimum": 0
  13007. },
  13008. "archived": {
  13009. "type": "number"
  13010. }
  13011. },
  13012. "required": ["created", "updated"],
  13013. "additionalProperties": false
  13014. },
  13015. "permission": {
  13016. "$ref": "#/components/schemas/PermissionRuleset"
  13017. },
  13018. "revert": {
  13019. "type": "object",
  13020. "properties": {
  13021. "messageID": {
  13022. "type": "string",
  13023. "pattern": "^msg"
  13024. },
  13025. "partID": {
  13026. "type": "string",
  13027. "pattern": "^prt"
  13028. },
  13029. "snapshot": {
  13030. "type": "string"
  13031. },
  13032. "diff": {
  13033. "type": "string"
  13034. }
  13035. },
  13036. "required": ["messageID"],
  13037. "additionalProperties": false
  13038. },
  13039. "project": {
  13040. "anyOf": [
  13041. {
  13042. "$ref": "#/components/schemas/ProjectSummary"
  13043. },
  13044. {
  13045. "type": "null"
  13046. }
  13047. ]
  13048. }
  13049. },
  13050. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  13051. "additionalProperties": false
  13052. },
  13053. "McpResource": {
  13054. "type": "object",
  13055. "properties": {
  13056. "name": {
  13057. "type": "string"
  13058. },
  13059. "uri": {
  13060. "type": "string"
  13061. },
  13062. "description": {
  13063. "type": "string"
  13064. },
  13065. "mimeType": {
  13066. "type": "string"
  13067. },
  13068. "client": {
  13069. "type": "string"
  13070. }
  13071. },
  13072. "required": ["name", "uri", "client"],
  13073. "additionalProperties": false
  13074. },
  13075. "Symbol": {
  13076. "type": "object",
  13077. "properties": {
  13078. "name": {
  13079. "type": "string"
  13080. },
  13081. "kind": {
  13082. "type": "integer",
  13083. "minimum": 0
  13084. },
  13085. "location": {
  13086. "type": "object",
  13087. "properties": {
  13088. "uri": {
  13089. "type": "string"
  13090. },
  13091. "range": {
  13092. "$ref": "#/components/schemas/Range"
  13093. }
  13094. },
  13095. "required": ["uri", "range"],
  13096. "additionalProperties": false
  13097. }
  13098. },
  13099. "required": ["name", "kind", "location"],
  13100. "additionalProperties": false
  13101. },
  13102. "FileNode": {
  13103. "type": "object",
  13104. "properties": {
  13105. "name": {
  13106. "type": "string"
  13107. },
  13108. "path": {
  13109. "type": "string"
  13110. },
  13111. "absolute": {
  13112. "type": "string"
  13113. },
  13114. "type": {
  13115. "type": "string",
  13116. "enum": ["file", "directory"]
  13117. },
  13118. "ignored": {
  13119. "type": "boolean"
  13120. }
  13121. },
  13122. "required": ["name", "path", "absolute", "type", "ignored"],
  13123. "additionalProperties": false
  13124. },
  13125. "FileContent": {
  13126. "type": "object",
  13127. "properties": {
  13128. "type": {
  13129. "type": "string",
  13130. "enum": ["text", "binary"]
  13131. },
  13132. "content": {
  13133. "type": "string"
  13134. },
  13135. "diff": {
  13136. "type": "string"
  13137. },
  13138. "patch": {
  13139. "type": "object",
  13140. "properties": {
  13141. "oldFileName": {
  13142. "type": "string"
  13143. },
  13144. "newFileName": {
  13145. "type": "string"
  13146. },
  13147. "oldHeader": {
  13148. "type": "string"
  13149. },
  13150. "newHeader": {
  13151. "type": "string"
  13152. },
  13153. "hunks": {
  13154. "type": "array",
  13155. "items": {
  13156. "type": "object",
  13157. "properties": {
  13158. "oldStart": {
  13159. "type": "integer",
  13160. "minimum": 0
  13161. },
  13162. "oldLines": {
  13163. "type": "integer",
  13164. "minimum": 0
  13165. },
  13166. "newStart": {
  13167. "type": "integer",
  13168. "minimum": 0
  13169. },
  13170. "newLines": {
  13171. "type": "integer",
  13172. "minimum": 0
  13173. },
  13174. "lines": {
  13175. "type": "array",
  13176. "items": {
  13177. "type": "string"
  13178. }
  13179. }
  13180. },
  13181. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  13182. "additionalProperties": false
  13183. }
  13184. },
  13185. "index": {
  13186. "type": "string"
  13187. }
  13188. },
  13189. "required": ["oldFileName", "newFileName", "hunks"],
  13190. "additionalProperties": false
  13191. },
  13192. "encoding": {
  13193. "type": "string",
  13194. "enum": ["base64"]
  13195. },
  13196. "mimeType": {
  13197. "type": "string"
  13198. }
  13199. },
  13200. "required": ["type", "content"],
  13201. "additionalProperties": false
  13202. },
  13203. "File": {
  13204. "type": "object",
  13205. "properties": {
  13206. "path": {
  13207. "type": "string"
  13208. },
  13209. "added": {
  13210. "type": "integer",
  13211. "minimum": 0
  13212. },
  13213. "removed": {
  13214. "type": "integer",
  13215. "minimum": 0
  13216. },
  13217. "status": {
  13218. "type": "string",
  13219. "enum": ["added", "deleted", "modified"]
  13220. }
  13221. },
  13222. "required": ["path", "added", "removed", "status"],
  13223. "additionalProperties": false
  13224. },
  13225. "Path": {
  13226. "type": "object",
  13227. "properties": {
  13228. "home": {
  13229. "type": "string"
  13230. },
  13231. "state": {
  13232. "type": "string"
  13233. },
  13234. "config": {
  13235. "type": "string"
  13236. },
  13237. "worktree": {
  13238. "type": "string"
  13239. },
  13240. "directory": {
  13241. "type": "string"
  13242. }
  13243. },
  13244. "required": ["home", "state", "config", "worktree", "directory"],
  13245. "additionalProperties": false
  13246. },
  13247. "VcsInfo": {
  13248. "type": "object",
  13249. "properties": {
  13250. "branch": {
  13251. "type": "string"
  13252. },
  13253. "default_branch": {
  13254. "type": "string"
  13255. }
  13256. },
  13257. "additionalProperties": false
  13258. },
  13259. "VcsFileStatus": {
  13260. "type": "object",
  13261. "properties": {
  13262. "file": {
  13263. "type": "string"
  13264. },
  13265. "additions": {
  13266. "type": "number"
  13267. },
  13268. "deletions": {
  13269. "type": "number"
  13270. },
  13271. "status": {
  13272. "type": "string",
  13273. "enum": ["added", "deleted", "modified"]
  13274. }
  13275. },
  13276. "required": ["file", "additions", "deletions", "status"],
  13277. "additionalProperties": false
  13278. },
  13279. "VcsFileDiff": {
  13280. "type": "object",
  13281. "properties": {
  13282. "file": {
  13283. "type": "string"
  13284. },
  13285. "patch": {
  13286. "type": "string"
  13287. },
  13288. "additions": {
  13289. "type": "number"
  13290. },
  13291. "deletions": {
  13292. "type": "number"
  13293. },
  13294. "status": {
  13295. "type": "string",
  13296. "enum": ["added", "deleted", "modified"]
  13297. }
  13298. },
  13299. "required": ["file", "additions", "deletions"],
  13300. "additionalProperties": false
  13301. },
  13302. "VcsApplyError": {
  13303. "type": "object",
  13304. "properties": {
  13305. "name": {
  13306. "type": "string",
  13307. "enum": ["VcsApplyError"]
  13308. },
  13309. "data": {
  13310. "type": "object",
  13311. "properties": {
  13312. "message": {
  13313. "type": "string"
  13314. },
  13315. "reason": {
  13316. "type": "string",
  13317. "enum": ["non-git", "not-clean"]
  13318. }
  13319. },
  13320. "required": ["message", "reason"],
  13321. "additionalProperties": false
  13322. }
  13323. },
  13324. "required": ["name", "data"],
  13325. "additionalProperties": false
  13326. },
  13327. "Command": {
  13328. "type": "object",
  13329. "properties": {
  13330. "name": {
  13331. "type": "string"
  13332. },
  13333. "description": {
  13334. "type": "string"
  13335. },
  13336. "agent": {
  13337. "type": "string"
  13338. },
  13339. "model": {
  13340. "type": "string"
  13341. },
  13342. "source": {
  13343. "type": "string",
  13344. "enum": ["command", "mcp", "skill"]
  13345. },
  13346. "template": {
  13347. "type": "string"
  13348. },
  13349. "subtask": {
  13350. "type": "boolean"
  13351. },
  13352. "hints": {
  13353. "type": "array",
  13354. "items": {
  13355. "type": "string"
  13356. }
  13357. }
  13358. },
  13359. "required": ["name", "template", "hints"],
  13360. "additionalProperties": false
  13361. },
  13362. "Agent": {
  13363. "type": "object",
  13364. "properties": {
  13365. "name": {
  13366. "type": "string"
  13367. },
  13368. "description": {
  13369. "type": "string"
  13370. },
  13371. "mode": {
  13372. "type": "string",
  13373. "enum": ["subagent", "primary", "all"]
  13374. },
  13375. "native": {
  13376. "type": "boolean"
  13377. },
  13378. "hidden": {
  13379. "type": "boolean"
  13380. },
  13381. "topP": {
  13382. "type": "number"
  13383. },
  13384. "temperature": {
  13385. "type": "number"
  13386. },
  13387. "color": {
  13388. "type": "string"
  13389. },
  13390. "permission": {
  13391. "$ref": "#/components/schemas/PermissionRuleset"
  13392. },
  13393. "model": {
  13394. "type": "object",
  13395. "properties": {
  13396. "modelID": {
  13397. "type": "string"
  13398. },
  13399. "providerID": {
  13400. "type": "string"
  13401. }
  13402. },
  13403. "required": ["modelID", "providerID"],
  13404. "additionalProperties": false
  13405. },
  13406. "variant": {
  13407. "type": "string"
  13408. },
  13409. "prompt": {
  13410. "type": "string"
  13411. },
  13412. "options": {
  13413. "type": "object"
  13414. },
  13415. "steps": {
  13416. "type": "number"
  13417. }
  13418. },
  13419. "required": ["name", "mode", "permission", "options"],
  13420. "additionalProperties": false
  13421. },
  13422. "LSPStatus": {
  13423. "type": "object",
  13424. "properties": {
  13425. "id": {
  13426. "type": "string"
  13427. },
  13428. "name": {
  13429. "type": "string"
  13430. },
  13431. "root": {
  13432. "type": "string"
  13433. },
  13434. "status": {
  13435. "type": "string",
  13436. "enum": ["connected", "error"]
  13437. }
  13438. },
  13439. "required": ["id", "name", "root", "status"],
  13440. "additionalProperties": false
  13441. },
  13442. "FormatterStatus": {
  13443. "type": "object",
  13444. "properties": {
  13445. "name": {
  13446. "type": "string"
  13447. },
  13448. "extensions": {
  13449. "type": "array",
  13450. "items": {
  13451. "type": "string"
  13452. }
  13453. },
  13454. "enabled": {
  13455. "type": "boolean"
  13456. }
  13457. },
  13458. "required": ["name", "extensions", "enabled"],
  13459. "additionalProperties": false
  13460. },
  13461. "MCPStatusConnected": {
  13462. "type": "object",
  13463. "properties": {
  13464. "status": {
  13465. "type": "string",
  13466. "enum": ["connected"]
  13467. }
  13468. },
  13469. "required": ["status"],
  13470. "additionalProperties": false
  13471. },
  13472. "MCPStatusDisabled": {
  13473. "type": "object",
  13474. "properties": {
  13475. "status": {
  13476. "type": "string",
  13477. "enum": ["disabled"]
  13478. }
  13479. },
  13480. "required": ["status"],
  13481. "additionalProperties": false
  13482. },
  13483. "MCPStatusFailed": {
  13484. "type": "object",
  13485. "properties": {
  13486. "status": {
  13487. "type": "string",
  13488. "enum": ["failed"]
  13489. },
  13490. "error": {
  13491. "type": "string"
  13492. }
  13493. },
  13494. "required": ["status", "error"],
  13495. "additionalProperties": false
  13496. },
  13497. "MCPStatusNeedsAuth": {
  13498. "type": "object",
  13499. "properties": {
  13500. "status": {
  13501. "type": "string",
  13502. "enum": ["needs_auth"]
  13503. }
  13504. },
  13505. "required": ["status"],
  13506. "additionalProperties": false
  13507. },
  13508. "MCPStatusNeedsClientRegistration": {
  13509. "type": "object",
  13510. "properties": {
  13511. "status": {
  13512. "type": "string",
  13513. "enum": ["needs_client_registration"]
  13514. },
  13515. "error": {
  13516. "type": "string"
  13517. }
  13518. },
  13519. "required": ["status", "error"],
  13520. "additionalProperties": false
  13521. },
  13522. "MCPStatus": {
  13523. "anyOf": [
  13524. {
  13525. "$ref": "#/components/schemas/MCPStatusConnected"
  13526. },
  13527. {
  13528. "$ref": "#/components/schemas/MCPStatusDisabled"
  13529. },
  13530. {
  13531. "$ref": "#/components/schemas/MCPStatusFailed"
  13532. },
  13533. {
  13534. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13535. },
  13536. {
  13537. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13538. }
  13539. ]
  13540. },
  13541. "McpUnsupportedOAuthError": {
  13542. "type": "object",
  13543. "properties": {
  13544. "error": {
  13545. "type": "string"
  13546. }
  13547. },
  13548. "required": ["error"],
  13549. "additionalProperties": false
  13550. },
  13551. "NotFoundError": {
  13552. "type": "object",
  13553. "required": ["name", "data"],
  13554. "properties": {
  13555. "name": {
  13556. "type": "string",
  13557. "enum": ["NotFoundError"]
  13558. },
  13559. "data": {
  13560. "type": "object",
  13561. "required": ["message"],
  13562. "properties": {
  13563. "message": {
  13564. "type": "string"
  13565. }
  13566. }
  13567. }
  13568. }
  13569. },
  13570. "effect_HttpApiError_Forbidden": {
  13571. "type": "object",
  13572. "properties": {
  13573. "_tag": {
  13574. "type": "string",
  13575. "enum": ["Forbidden"]
  13576. }
  13577. },
  13578. "required": ["_tag"],
  13579. "additionalProperties": false
  13580. },
  13581. "ProviderAuthMethod": {
  13582. "type": "object",
  13583. "properties": {
  13584. "type": {
  13585. "type": "string",
  13586. "enum": ["oauth", "api"]
  13587. },
  13588. "label": {
  13589. "type": "string"
  13590. },
  13591. "prompts": {
  13592. "type": "array",
  13593. "items": {
  13594. "anyOf": [
  13595. {
  13596. "type": "object",
  13597. "properties": {
  13598. "type": {
  13599. "type": "string",
  13600. "enum": ["text"]
  13601. },
  13602. "key": {
  13603. "type": "string"
  13604. },
  13605. "message": {
  13606. "type": "string"
  13607. },
  13608. "placeholder": {
  13609. "type": "string"
  13610. },
  13611. "when": {
  13612. "type": "object",
  13613. "properties": {
  13614. "key": {
  13615. "type": "string"
  13616. },
  13617. "op": {
  13618. "type": "string",
  13619. "enum": ["eq", "neq"]
  13620. },
  13621. "value": {
  13622. "type": "string"
  13623. }
  13624. },
  13625. "required": ["key", "op", "value"],
  13626. "additionalProperties": false
  13627. }
  13628. },
  13629. "required": ["type", "key", "message"],
  13630. "additionalProperties": false
  13631. },
  13632. {
  13633. "type": "object",
  13634. "properties": {
  13635. "type": {
  13636. "type": "string",
  13637. "enum": ["select"]
  13638. },
  13639. "key": {
  13640. "type": "string"
  13641. },
  13642. "message": {
  13643. "type": "string"
  13644. },
  13645. "options": {
  13646. "type": "array",
  13647. "items": {
  13648. "type": "object",
  13649. "properties": {
  13650. "label": {
  13651. "type": "string"
  13652. },
  13653. "value": {
  13654. "type": "string"
  13655. },
  13656. "hint": {
  13657. "type": "string"
  13658. }
  13659. },
  13660. "required": ["label", "value"],
  13661. "additionalProperties": false
  13662. }
  13663. },
  13664. "when": {
  13665. "type": "object",
  13666. "properties": {
  13667. "key": {
  13668. "type": "string"
  13669. },
  13670. "op": {
  13671. "type": "string",
  13672. "enum": ["eq", "neq"]
  13673. },
  13674. "value": {
  13675. "type": "string"
  13676. }
  13677. },
  13678. "required": ["key", "op", "value"],
  13679. "additionalProperties": false
  13680. }
  13681. },
  13682. "required": ["type", "key", "message", "options"],
  13683. "additionalProperties": false
  13684. }
  13685. ]
  13686. }
  13687. }
  13688. },
  13689. "required": ["type", "label"],
  13690. "additionalProperties": false
  13691. },
  13692. "ProviderAuthAuthorization": {
  13693. "type": "object",
  13694. "properties": {
  13695. "url": {
  13696. "type": "string"
  13697. },
  13698. "method": {
  13699. "type": "string",
  13700. "enum": ["auto", "code"]
  13701. },
  13702. "instructions": {
  13703. "type": "string"
  13704. }
  13705. },
  13706. "required": ["url", "method", "instructions"],
  13707. "additionalProperties": false
  13708. },
  13709. "TextPartInput": {
  13710. "type": "object",
  13711. "properties": {
  13712. "id": {
  13713. "type": "string",
  13714. "pattern": "^prt"
  13715. },
  13716. "type": {
  13717. "type": "string",
  13718. "enum": ["text"]
  13719. },
  13720. "text": {
  13721. "type": "string"
  13722. },
  13723. "synthetic": {
  13724. "type": "boolean"
  13725. },
  13726. "ignored": {
  13727. "type": "boolean"
  13728. },
  13729. "time": {
  13730. "type": "object",
  13731. "properties": {
  13732. "start": {
  13733. "type": "integer",
  13734. "minimum": 0
  13735. },
  13736. "end": {
  13737. "type": "integer",
  13738. "minimum": 0
  13739. }
  13740. },
  13741. "required": ["start"],
  13742. "additionalProperties": false
  13743. },
  13744. "metadata": {
  13745. "type": "object"
  13746. }
  13747. },
  13748. "required": ["type", "text"],
  13749. "additionalProperties": false
  13750. },
  13751. "FilePartInput": {
  13752. "type": "object",
  13753. "properties": {
  13754. "id": {
  13755. "type": "string",
  13756. "pattern": "^prt"
  13757. },
  13758. "type": {
  13759. "type": "string",
  13760. "enum": ["file"]
  13761. },
  13762. "mime": {
  13763. "type": "string"
  13764. },
  13765. "filename": {
  13766. "type": "string"
  13767. },
  13768. "url": {
  13769. "type": "string"
  13770. },
  13771. "source": {
  13772. "$ref": "#/components/schemas/FilePartSource"
  13773. }
  13774. },
  13775. "required": ["type", "mime", "url"],
  13776. "additionalProperties": false
  13777. },
  13778. "AgentPartInput": {
  13779. "type": "object",
  13780. "properties": {
  13781. "id": {
  13782. "type": "string",
  13783. "pattern": "^prt"
  13784. },
  13785. "type": {
  13786. "type": "string",
  13787. "enum": ["agent"]
  13788. },
  13789. "name": {
  13790. "type": "string"
  13791. },
  13792. "source": {
  13793. "type": "object",
  13794. "properties": {
  13795. "value": {
  13796. "type": "string"
  13797. },
  13798. "start": {
  13799. "type": "integer",
  13800. "minimum": 0
  13801. },
  13802. "end": {
  13803. "type": "integer",
  13804. "minimum": 0
  13805. }
  13806. },
  13807. "required": ["value", "start", "end"],
  13808. "additionalProperties": false
  13809. }
  13810. },
  13811. "required": ["type", "name"],
  13812. "additionalProperties": false
  13813. },
  13814. "SubtaskPartInput": {
  13815. "type": "object",
  13816. "properties": {
  13817. "id": {
  13818. "type": "string",
  13819. "pattern": "^prt"
  13820. },
  13821. "type": {
  13822. "type": "string",
  13823. "enum": ["subtask"]
  13824. },
  13825. "prompt": {
  13826. "type": "string"
  13827. },
  13828. "description": {
  13829. "type": "string"
  13830. },
  13831. "agent": {
  13832. "type": "string"
  13833. },
  13834. "model": {
  13835. "type": "object",
  13836. "properties": {
  13837. "providerID": {
  13838. "type": "string"
  13839. },
  13840. "modelID": {
  13841. "type": "string"
  13842. }
  13843. },
  13844. "required": ["providerID", "modelID"],
  13845. "additionalProperties": false
  13846. },
  13847. "command": {
  13848. "type": "string"
  13849. }
  13850. },
  13851. "required": ["type", "prompt", "description", "agent"],
  13852. "additionalProperties": false
  13853. },
  13854. "V2SessionsResponse": {
  13855. "type": "object",
  13856. "properties": {
  13857. "items": {
  13858. "type": "array",
  13859. "items": {
  13860. "$ref": "#/components/schemas/SessionInfo"
  13861. }
  13862. },
  13863. "cursor": {
  13864. "type": "object",
  13865. "properties": {
  13866. "previous": {
  13867. "type": "string"
  13868. },
  13869. "next": {
  13870. "type": "string"
  13871. }
  13872. },
  13873. "additionalProperties": false
  13874. }
  13875. },
  13876. "required": ["items", "cursor"],
  13877. "additionalProperties": false
  13878. },
  13879. "V2SessionMessagesResponse": {
  13880. "type": "object",
  13881. "properties": {
  13882. "items": {
  13883. "type": "array",
  13884. "items": {
  13885. "$ref": "#/components/schemas/SessionMessage"
  13886. }
  13887. },
  13888. "cursor": {
  13889. "type": "object",
  13890. "properties": {
  13891. "previous": {
  13892. "type": "string"
  13893. },
  13894. "next": {
  13895. "type": "string"
  13896. }
  13897. },
  13898. "additionalProperties": false
  13899. }
  13900. },
  13901. "required": ["items", "cursor"],
  13902. "additionalProperties": false
  13903. },
  13904. "EventTuiPromptAppend": {
  13905. "type": "object",
  13906. "properties": {
  13907. "type": {
  13908. "type": "string",
  13909. "enum": ["tui.prompt.append"]
  13910. },
  13911. "properties": {
  13912. "type": "object",
  13913. "properties": {
  13914. "text": {
  13915. "type": "string"
  13916. }
  13917. },
  13918. "required": ["text"],
  13919. "additionalProperties": false
  13920. }
  13921. },
  13922. "required": ["type", "properties"],
  13923. "additionalProperties": false
  13924. },
  13925. "EventTuiCommandExecute": {
  13926. "type": "object",
  13927. "properties": {
  13928. "type": {
  13929. "type": "string",
  13930. "enum": ["tui.command.execute"]
  13931. },
  13932. "properties": {
  13933. "type": "object",
  13934. "properties": {
  13935. "command": {
  13936. "anyOf": [
  13937. {
  13938. "type": "string",
  13939. "enum": [
  13940. "session.list",
  13941. "session.new",
  13942. "session.share",
  13943. "session.interrupt",
  13944. "session.compact",
  13945. "session.page.up",
  13946. "session.page.down",
  13947. "session.line.up",
  13948. "session.line.down",
  13949. "session.half.page.up",
  13950. "session.half.page.down",
  13951. "session.first",
  13952. "session.last",
  13953. "prompt.clear",
  13954. "prompt.submit",
  13955. "agent.cycle"
  13956. ]
  13957. },
  13958. {
  13959. "type": "string"
  13960. }
  13961. ]
  13962. }
  13963. },
  13964. "required": ["command"],
  13965. "additionalProperties": false
  13966. }
  13967. },
  13968. "required": ["type", "properties"],
  13969. "additionalProperties": false
  13970. },
  13971. "EventTuiToastShow": {
  13972. "type": "object",
  13973. "properties": {
  13974. "type": {
  13975. "type": "string",
  13976. "enum": ["tui.toast.show"]
  13977. },
  13978. "properties": {
  13979. "type": "object",
  13980. "properties": {
  13981. "title": {
  13982. "type": "string"
  13983. },
  13984. "message": {
  13985. "type": "string"
  13986. },
  13987. "variant": {
  13988. "type": "string",
  13989. "enum": ["info", "success", "warning", "error"]
  13990. },
  13991. "duration": {
  13992. "type": "integer",
  13993. "exclusiveMinimum": 0
  13994. }
  13995. },
  13996. "required": ["message", "variant"],
  13997. "additionalProperties": false
  13998. }
  13999. },
  14000. "required": ["type", "properties"],
  14001. "additionalProperties": false
  14002. },
  14003. "EventTuiSessionSelect": {
  14004. "type": "object",
  14005. "properties": {
  14006. "type": {
  14007. "type": "string",
  14008. "enum": ["tui.session.select"]
  14009. },
  14010. "properties": {
  14011. "type": "object",
  14012. "properties": {
  14013. "sessionID": {
  14014. "type": "string",
  14015. "pattern": "^ses",
  14016. "description": "Session ID to navigate to"
  14017. }
  14018. },
  14019. "required": ["sessionID"],
  14020. "additionalProperties": false
  14021. }
  14022. },
  14023. "required": ["type", "properties"],
  14024. "additionalProperties": false
  14025. },
  14026. "Workspace": {
  14027. "type": "object",
  14028. "properties": {
  14029. "id": {
  14030. "type": "string",
  14031. "pattern": "^wrk"
  14032. },
  14033. "type": {
  14034. "type": "string"
  14035. },
  14036. "name": {
  14037. "type": "string"
  14038. },
  14039. "branch": {
  14040. "anyOf": [
  14041. {
  14042. "type": "string"
  14043. },
  14044. {
  14045. "type": "null"
  14046. }
  14047. ]
  14048. },
  14049. "directory": {
  14050. "anyOf": [
  14051. {
  14052. "type": "string"
  14053. },
  14054. {
  14055. "type": "null"
  14056. }
  14057. ]
  14058. },
  14059. "extra": {
  14060. "anyOf": [
  14061. {},
  14062. {
  14063. "type": "null"
  14064. }
  14065. ]
  14066. },
  14067. "projectID": {
  14068. "type": "string"
  14069. },
  14070. "timeUsed": {
  14071. "anyOf": [
  14072. {
  14073. "type": "number"
  14074. },
  14075. {
  14076. "type": "string",
  14077. "enum": ["NaN"]
  14078. },
  14079. {
  14080. "type": "string",
  14081. "enum": ["Infinity"]
  14082. },
  14083. {
  14084. "type": "string",
  14085. "enum": ["-Infinity"]
  14086. },
  14087. {
  14088. "type": "string",
  14089. "enum": ["Infinity", "-Infinity", "NaN"]
  14090. }
  14091. ]
  14092. }
  14093. },
  14094. "required": ["id", "type", "name", "projectID", "timeUsed"],
  14095. "additionalProperties": false
  14096. },
  14097. "WorkspaceWarpError": {
  14098. "type": "object",
  14099. "properties": {
  14100. "name": {
  14101. "type": "string",
  14102. "enum": ["WorkspaceWarpError"]
  14103. },
  14104. "data": {
  14105. "type": "object",
  14106. "properties": {
  14107. "message": {
  14108. "type": "string"
  14109. }
  14110. },
  14111. "required": ["message"],
  14112. "additionalProperties": false
  14113. }
  14114. },
  14115. "required": ["name", "data"],
  14116. "additionalProperties": false
  14117. },
  14118. "SyncEventMessageUpdated": {
  14119. "type": "object",
  14120. "properties": {
  14121. "type": {
  14122. "type": "string",
  14123. "enum": ["sync"]
  14124. },
  14125. "name": {
  14126. "type": "string",
  14127. "enum": ["message.updated.1"]
  14128. },
  14129. "id": {
  14130. "type": "string"
  14131. },
  14132. "seq": {
  14133. "type": "number"
  14134. },
  14135. "aggregateID": {
  14136. "type": "string",
  14137. "enum": ["sessionID"]
  14138. },
  14139. "data": {
  14140. "type": "object",
  14141. "properties": {
  14142. "sessionID": {
  14143. "type": "string",
  14144. "pattern": "^ses"
  14145. },
  14146. "info": {
  14147. "$ref": "#/components/schemas/Message"
  14148. }
  14149. },
  14150. "required": ["sessionID", "info"],
  14151. "additionalProperties": false
  14152. }
  14153. },
  14154. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14155. "additionalProperties": false
  14156. },
  14157. "SyncEventMessageRemoved": {
  14158. "type": "object",
  14159. "properties": {
  14160. "type": {
  14161. "type": "string",
  14162. "enum": ["sync"]
  14163. },
  14164. "name": {
  14165. "type": "string",
  14166. "enum": ["message.removed.1"]
  14167. },
  14168. "id": {
  14169. "type": "string"
  14170. },
  14171. "seq": {
  14172. "type": "number"
  14173. },
  14174. "aggregateID": {
  14175. "type": "string",
  14176. "enum": ["sessionID"]
  14177. },
  14178. "data": {
  14179. "type": "object",
  14180. "properties": {
  14181. "sessionID": {
  14182. "type": "string",
  14183. "pattern": "^ses"
  14184. },
  14185. "messageID": {
  14186. "type": "string",
  14187. "pattern": "^msg"
  14188. }
  14189. },
  14190. "required": ["sessionID", "messageID"],
  14191. "additionalProperties": false
  14192. }
  14193. },
  14194. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14195. "additionalProperties": false
  14196. },
  14197. "SyncEventMessagePartUpdated": {
  14198. "type": "object",
  14199. "properties": {
  14200. "type": {
  14201. "type": "string",
  14202. "enum": ["sync"]
  14203. },
  14204. "name": {
  14205. "type": "string",
  14206. "enum": ["message.part.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. "part": {
  14226. "$ref": "#/components/schemas/Part"
  14227. },
  14228. "time": {
  14229. "type": "integer",
  14230. "minimum": 0
  14231. }
  14232. },
  14233. "required": ["sessionID", "part", "time"],
  14234. "additionalProperties": false
  14235. }
  14236. },
  14237. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14238. "additionalProperties": false
  14239. },
  14240. "SyncEventMessagePartRemoved": {
  14241. "type": "object",
  14242. "properties": {
  14243. "type": {
  14244. "type": "string",
  14245. "enum": ["sync"]
  14246. },
  14247. "name": {
  14248. "type": "string",
  14249. "enum": ["message.part.removed.1"]
  14250. },
  14251. "id": {
  14252. "type": "string"
  14253. },
  14254. "seq": {
  14255. "type": "number"
  14256. },
  14257. "aggregateID": {
  14258. "type": "string",
  14259. "enum": ["sessionID"]
  14260. },
  14261. "data": {
  14262. "type": "object",
  14263. "properties": {
  14264. "sessionID": {
  14265. "type": "string",
  14266. "pattern": "^ses"
  14267. },
  14268. "messageID": {
  14269. "type": "string",
  14270. "pattern": "^msg"
  14271. },
  14272. "partID": {
  14273. "type": "string",
  14274. "pattern": "^prt"
  14275. }
  14276. },
  14277. "required": ["sessionID", "messageID", "partID"],
  14278. "additionalProperties": false
  14279. }
  14280. },
  14281. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14282. "additionalProperties": false
  14283. },
  14284. "SyncEventSessionCreated": {
  14285. "type": "object",
  14286. "properties": {
  14287. "type": {
  14288. "type": "string",
  14289. "enum": ["sync"]
  14290. },
  14291. "name": {
  14292. "type": "string",
  14293. "enum": ["session.created.1"]
  14294. },
  14295. "id": {
  14296. "type": "string"
  14297. },
  14298. "seq": {
  14299. "type": "number"
  14300. },
  14301. "aggregateID": {
  14302. "type": "string",
  14303. "enum": ["sessionID"]
  14304. },
  14305. "data": {
  14306. "type": "object",
  14307. "properties": {
  14308. "sessionID": {
  14309. "type": "string",
  14310. "pattern": "^ses"
  14311. },
  14312. "info": {
  14313. "$ref": "#/components/schemas/Session"
  14314. }
  14315. },
  14316. "required": ["sessionID", "info"],
  14317. "additionalProperties": false
  14318. }
  14319. },
  14320. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14321. "additionalProperties": false
  14322. },
  14323. "SyncEventSessionUpdated": {
  14324. "type": "object",
  14325. "properties": {
  14326. "type": {
  14327. "type": "string",
  14328. "enum": ["sync"]
  14329. },
  14330. "name": {
  14331. "type": "string",
  14332. "enum": ["session.updated.1"]
  14333. },
  14334. "id": {
  14335. "type": "string"
  14336. },
  14337. "seq": {
  14338. "type": "number"
  14339. },
  14340. "aggregateID": {
  14341. "type": "string",
  14342. "enum": ["sessionID"]
  14343. },
  14344. "data": {
  14345. "type": "object",
  14346. "properties": {
  14347. "sessionID": {
  14348. "type": "string",
  14349. "pattern": "^ses"
  14350. },
  14351. "info": {
  14352. "type": "object",
  14353. "properties": {
  14354. "id": {
  14355. "anyOf": [
  14356. {
  14357. "type": "string",
  14358. "pattern": "^ses"
  14359. },
  14360. {
  14361. "type": "null"
  14362. }
  14363. ]
  14364. },
  14365. "slug": {
  14366. "anyOf": [
  14367. {
  14368. "type": "string"
  14369. },
  14370. {
  14371. "type": "null"
  14372. }
  14373. ]
  14374. },
  14375. "projectID": {
  14376. "anyOf": [
  14377. {
  14378. "type": "string"
  14379. },
  14380. {
  14381. "type": "null"
  14382. }
  14383. ]
  14384. },
  14385. "workspaceID": {
  14386. "anyOf": [
  14387. {
  14388. "type": "string",
  14389. "pattern": "^wrk"
  14390. },
  14391. {
  14392. "type": "null"
  14393. }
  14394. ]
  14395. },
  14396. "directory": {
  14397. "anyOf": [
  14398. {
  14399. "type": "string"
  14400. },
  14401. {
  14402. "type": "null"
  14403. }
  14404. ]
  14405. },
  14406. "path": {
  14407. "anyOf": [
  14408. {
  14409. "type": "string"
  14410. },
  14411. {
  14412. "type": "null"
  14413. }
  14414. ]
  14415. },
  14416. "parentID": {
  14417. "anyOf": [
  14418. {
  14419. "type": "string",
  14420. "pattern": "^ses"
  14421. },
  14422. {
  14423. "type": "null"
  14424. }
  14425. ]
  14426. },
  14427. "summary": {
  14428. "anyOf": [
  14429. {
  14430. "type": "object",
  14431. "properties": {
  14432. "additions": {
  14433. "type": "number"
  14434. },
  14435. "deletions": {
  14436. "type": "number"
  14437. },
  14438. "files": {
  14439. "type": "number"
  14440. },
  14441. "diffs": {
  14442. "type": "array",
  14443. "items": {
  14444. "$ref": "#/components/schemas/SnapshotFileDiff"
  14445. }
  14446. }
  14447. },
  14448. "required": ["additions", "deletions", "files"],
  14449. "additionalProperties": false
  14450. },
  14451. {
  14452. "type": "null"
  14453. }
  14454. ]
  14455. },
  14456. "cost": {
  14457. "anyOf": [
  14458. {
  14459. "type": "number"
  14460. },
  14461. {
  14462. "type": "null"
  14463. }
  14464. ]
  14465. },
  14466. "tokens": {
  14467. "anyOf": [
  14468. {
  14469. "type": "object",
  14470. "properties": {
  14471. "input": {
  14472. "type": "number"
  14473. },
  14474. "output": {
  14475. "type": "number"
  14476. },
  14477. "reasoning": {
  14478. "type": "number"
  14479. },
  14480. "cache": {
  14481. "type": "object",
  14482. "properties": {
  14483. "read": {
  14484. "type": "number"
  14485. },
  14486. "write": {
  14487. "type": "number"
  14488. }
  14489. },
  14490. "required": ["read", "write"],
  14491. "additionalProperties": false
  14492. }
  14493. },
  14494. "required": ["input", "output", "reasoning", "cache"],
  14495. "additionalProperties": false
  14496. },
  14497. {
  14498. "type": "null"
  14499. }
  14500. ]
  14501. },
  14502. "share": {
  14503. "type": "object",
  14504. "properties": {
  14505. "url": {
  14506. "anyOf": [
  14507. {
  14508. "type": "string"
  14509. },
  14510. {
  14511. "type": "null"
  14512. }
  14513. ]
  14514. }
  14515. },
  14516. "additionalProperties": false
  14517. },
  14518. "title": {
  14519. "anyOf": [
  14520. {
  14521. "type": "string"
  14522. },
  14523. {
  14524. "type": "null"
  14525. }
  14526. ]
  14527. },
  14528. "agent": {
  14529. "anyOf": [
  14530. {
  14531. "type": "string"
  14532. },
  14533. {
  14534. "type": "null"
  14535. }
  14536. ]
  14537. },
  14538. "model": {
  14539. "anyOf": [
  14540. {
  14541. "type": "object",
  14542. "properties": {
  14543. "id": {
  14544. "type": "string"
  14545. },
  14546. "providerID": {
  14547. "type": "string"
  14548. },
  14549. "variant": {
  14550. "type": "string"
  14551. }
  14552. },
  14553. "required": ["id", "providerID"],
  14554. "additionalProperties": false
  14555. },
  14556. {
  14557. "type": "null"
  14558. }
  14559. ]
  14560. },
  14561. "version": {
  14562. "anyOf": [
  14563. {
  14564. "type": "string"
  14565. },
  14566. {
  14567. "type": "null"
  14568. }
  14569. ]
  14570. },
  14571. "time": {
  14572. "type": "object",
  14573. "properties": {
  14574. "created": {
  14575. "anyOf": [
  14576. {
  14577. "type": "integer",
  14578. "minimum": 0
  14579. },
  14580. {
  14581. "type": "null"
  14582. }
  14583. ]
  14584. },
  14585. "updated": {
  14586. "anyOf": [
  14587. {
  14588. "type": "integer",
  14589. "minimum": 0
  14590. },
  14591. {
  14592. "type": "null"
  14593. }
  14594. ]
  14595. },
  14596. "compacting": {
  14597. "anyOf": [
  14598. {
  14599. "type": "integer",
  14600. "minimum": 0
  14601. },
  14602. {
  14603. "type": "null"
  14604. }
  14605. ]
  14606. },
  14607. "archived": {
  14608. "anyOf": [
  14609. {
  14610. "type": "number"
  14611. },
  14612. {
  14613. "type": "null"
  14614. }
  14615. ]
  14616. }
  14617. },
  14618. "additionalProperties": false
  14619. },
  14620. "permission": {
  14621. "anyOf": [
  14622. {
  14623. "$ref": "#/components/schemas/PermissionRuleset"
  14624. },
  14625. {
  14626. "type": "null"
  14627. }
  14628. ]
  14629. },
  14630. "revert": {
  14631. "anyOf": [
  14632. {
  14633. "type": "object",
  14634. "properties": {
  14635. "messageID": {
  14636. "type": "string",
  14637. "pattern": "^msg"
  14638. },
  14639. "partID": {
  14640. "type": "string",
  14641. "pattern": "^prt"
  14642. },
  14643. "snapshot": {
  14644. "type": "string"
  14645. },
  14646. "diff": {
  14647. "type": "string"
  14648. }
  14649. },
  14650. "required": ["messageID"],
  14651. "additionalProperties": false
  14652. },
  14653. {
  14654. "type": "null"
  14655. }
  14656. ]
  14657. }
  14658. },
  14659. "additionalProperties": false
  14660. }
  14661. },
  14662. "required": ["sessionID", "info"],
  14663. "additionalProperties": false
  14664. }
  14665. },
  14666. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14667. "additionalProperties": false
  14668. },
  14669. "SyncEventSessionDeleted": {
  14670. "type": "object",
  14671. "properties": {
  14672. "type": {
  14673. "type": "string",
  14674. "enum": ["sync"]
  14675. },
  14676. "name": {
  14677. "type": "string",
  14678. "enum": ["session.deleted.1"]
  14679. },
  14680. "id": {
  14681. "type": "string"
  14682. },
  14683. "seq": {
  14684. "type": "number"
  14685. },
  14686. "aggregateID": {
  14687. "type": "string",
  14688. "enum": ["sessionID"]
  14689. },
  14690. "data": {
  14691. "type": "object",
  14692. "properties": {
  14693. "sessionID": {
  14694. "type": "string",
  14695. "pattern": "^ses"
  14696. },
  14697. "info": {
  14698. "$ref": "#/components/schemas/Session"
  14699. }
  14700. },
  14701. "required": ["sessionID", "info"],
  14702. "additionalProperties": false
  14703. }
  14704. },
  14705. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14706. "additionalProperties": false
  14707. },
  14708. "SyncEventSessionNextAgentSwitched": {
  14709. "type": "object",
  14710. "properties": {
  14711. "type": {
  14712. "type": "string",
  14713. "enum": ["sync"]
  14714. },
  14715. "name": {
  14716. "type": "string",
  14717. "enum": ["session.next.agent.switched.1"]
  14718. },
  14719. "id": {
  14720. "type": "string"
  14721. },
  14722. "seq": {
  14723. "type": "number"
  14724. },
  14725. "aggregateID": {
  14726. "type": "string",
  14727. "enum": ["sessionID"]
  14728. },
  14729. "data": {
  14730. "type": "object",
  14731. "properties": {
  14732. "timestamp": {
  14733. "type": "number"
  14734. },
  14735. "sessionID": {
  14736. "type": "string",
  14737. "pattern": "^ses"
  14738. },
  14739. "agent": {
  14740. "type": "string"
  14741. }
  14742. },
  14743. "required": ["timestamp", "sessionID", "agent"],
  14744. "additionalProperties": false
  14745. }
  14746. },
  14747. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14748. "additionalProperties": false
  14749. },
  14750. "SyncEventSessionNextModelSwitched": {
  14751. "type": "object",
  14752. "properties": {
  14753. "type": {
  14754. "type": "string",
  14755. "enum": ["sync"]
  14756. },
  14757. "name": {
  14758. "type": "string",
  14759. "enum": ["session.next.model.switched.1"]
  14760. },
  14761. "id": {
  14762. "type": "string"
  14763. },
  14764. "seq": {
  14765. "type": "number"
  14766. },
  14767. "aggregateID": {
  14768. "type": "string",
  14769. "enum": ["sessionID"]
  14770. },
  14771. "data": {
  14772. "type": "object",
  14773. "properties": {
  14774. "timestamp": {
  14775. "type": "number"
  14776. },
  14777. "sessionID": {
  14778. "type": "string",
  14779. "pattern": "^ses"
  14780. },
  14781. "model": {
  14782. "type": "object",
  14783. "properties": {
  14784. "id": {
  14785. "type": "string"
  14786. },
  14787. "providerID": {
  14788. "type": "string"
  14789. },
  14790. "variant": {
  14791. "type": "string"
  14792. }
  14793. },
  14794. "required": ["id", "providerID", "variant"],
  14795. "additionalProperties": false
  14796. }
  14797. },
  14798. "required": ["timestamp", "sessionID", "model"],
  14799. "additionalProperties": false
  14800. }
  14801. },
  14802. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14803. "additionalProperties": false
  14804. },
  14805. "SyncEventSessionNextPrompted": {
  14806. "type": "object",
  14807. "properties": {
  14808. "type": {
  14809. "type": "string",
  14810. "enum": ["sync"]
  14811. },
  14812. "name": {
  14813. "type": "string",
  14814. "enum": ["session.next.prompted.1"]
  14815. },
  14816. "id": {
  14817. "type": "string"
  14818. },
  14819. "seq": {
  14820. "type": "number"
  14821. },
  14822. "aggregateID": {
  14823. "type": "string",
  14824. "enum": ["sessionID"]
  14825. },
  14826. "data": {
  14827. "type": "object",
  14828. "properties": {
  14829. "timestamp": {
  14830. "type": "number"
  14831. },
  14832. "sessionID": {
  14833. "type": "string",
  14834. "pattern": "^ses"
  14835. },
  14836. "prompt": {
  14837. "$ref": "#/components/schemas/Prompt"
  14838. }
  14839. },
  14840. "required": ["timestamp", "sessionID", "prompt"],
  14841. "additionalProperties": false
  14842. }
  14843. },
  14844. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14845. "additionalProperties": false
  14846. },
  14847. "SyncEventSessionNextSynthetic": {
  14848. "type": "object",
  14849. "properties": {
  14850. "type": {
  14851. "type": "string",
  14852. "enum": ["sync"]
  14853. },
  14854. "name": {
  14855. "type": "string",
  14856. "enum": ["session.next.synthetic.1"]
  14857. },
  14858. "id": {
  14859. "type": "string"
  14860. },
  14861. "seq": {
  14862. "type": "number"
  14863. },
  14864. "aggregateID": {
  14865. "type": "string",
  14866. "enum": ["sessionID"]
  14867. },
  14868. "data": {
  14869. "type": "object",
  14870. "properties": {
  14871. "timestamp": {
  14872. "type": "number"
  14873. },
  14874. "sessionID": {
  14875. "type": "string",
  14876. "pattern": "^ses"
  14877. },
  14878. "text": {
  14879. "type": "string"
  14880. }
  14881. },
  14882. "required": ["timestamp", "sessionID", "text"],
  14883. "additionalProperties": false
  14884. }
  14885. },
  14886. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14887. "additionalProperties": false
  14888. },
  14889. "SyncEventSessionNextShellStarted": {
  14890. "type": "object",
  14891. "properties": {
  14892. "type": {
  14893. "type": "string",
  14894. "enum": ["sync"]
  14895. },
  14896. "name": {
  14897. "type": "string",
  14898. "enum": ["session.next.shell.started.1"]
  14899. },
  14900. "id": {
  14901. "type": "string"
  14902. },
  14903. "seq": {
  14904. "type": "number"
  14905. },
  14906. "aggregateID": {
  14907. "type": "string",
  14908. "enum": ["sessionID"]
  14909. },
  14910. "data": {
  14911. "type": "object",
  14912. "properties": {
  14913. "timestamp": {
  14914. "type": "number"
  14915. },
  14916. "sessionID": {
  14917. "type": "string",
  14918. "pattern": "^ses"
  14919. },
  14920. "callID": {
  14921. "type": "string"
  14922. },
  14923. "command": {
  14924. "type": "string"
  14925. }
  14926. },
  14927. "required": ["timestamp", "sessionID", "callID", "command"],
  14928. "additionalProperties": false
  14929. }
  14930. },
  14931. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14932. "additionalProperties": false
  14933. },
  14934. "SyncEventSessionNextShellEnded": {
  14935. "type": "object",
  14936. "properties": {
  14937. "type": {
  14938. "type": "string",
  14939. "enum": ["sync"]
  14940. },
  14941. "name": {
  14942. "type": "string",
  14943. "enum": ["session.next.shell.ended.1"]
  14944. },
  14945. "id": {
  14946. "type": "string"
  14947. },
  14948. "seq": {
  14949. "type": "number"
  14950. },
  14951. "aggregateID": {
  14952. "type": "string",
  14953. "enum": ["sessionID"]
  14954. },
  14955. "data": {
  14956. "type": "object",
  14957. "properties": {
  14958. "timestamp": {
  14959. "type": "number"
  14960. },
  14961. "sessionID": {
  14962. "type": "string",
  14963. "pattern": "^ses"
  14964. },
  14965. "callID": {
  14966. "type": "string"
  14967. },
  14968. "output": {
  14969. "type": "string"
  14970. }
  14971. },
  14972. "required": ["timestamp", "sessionID", "callID", "output"],
  14973. "additionalProperties": false
  14974. }
  14975. },
  14976. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14977. "additionalProperties": false
  14978. },
  14979. "SyncEventSessionNextStepStarted": {
  14980. "type": "object",
  14981. "properties": {
  14982. "type": {
  14983. "type": "string",
  14984. "enum": ["sync"]
  14985. },
  14986. "name": {
  14987. "type": "string",
  14988. "enum": ["session.next.step.started.1"]
  14989. },
  14990. "id": {
  14991. "type": "string"
  14992. },
  14993. "seq": {
  14994. "type": "number"
  14995. },
  14996. "aggregateID": {
  14997. "type": "string",
  14998. "enum": ["sessionID"]
  14999. },
  15000. "data": {
  15001. "type": "object",
  15002. "properties": {
  15003. "timestamp": {
  15004. "type": "number"
  15005. },
  15006. "sessionID": {
  15007. "type": "string",
  15008. "pattern": "^ses"
  15009. },
  15010. "agent": {
  15011. "type": "string"
  15012. },
  15013. "model": {
  15014. "type": "object",
  15015. "properties": {
  15016. "id": {
  15017. "type": "string"
  15018. },
  15019. "providerID": {
  15020. "type": "string"
  15021. },
  15022. "variant": {
  15023. "type": "string"
  15024. }
  15025. },
  15026. "required": ["id", "providerID", "variant"],
  15027. "additionalProperties": false
  15028. },
  15029. "snapshot": {
  15030. "type": "string"
  15031. }
  15032. },
  15033. "required": ["timestamp", "sessionID", "agent", "model"],
  15034. "additionalProperties": false
  15035. }
  15036. },
  15037. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15038. "additionalProperties": false
  15039. },
  15040. "SyncEventSessionNextStepEnded": {
  15041. "type": "object",
  15042. "properties": {
  15043. "type": {
  15044. "type": "string",
  15045. "enum": ["sync"]
  15046. },
  15047. "name": {
  15048. "type": "string",
  15049. "enum": ["session.next.step.ended.1"]
  15050. },
  15051. "id": {
  15052. "type": "string"
  15053. },
  15054. "seq": {
  15055. "type": "number"
  15056. },
  15057. "aggregateID": {
  15058. "type": "string",
  15059. "enum": ["sessionID"]
  15060. },
  15061. "data": {
  15062. "type": "object",
  15063. "properties": {
  15064. "timestamp": {
  15065. "type": "number"
  15066. },
  15067. "sessionID": {
  15068. "type": "string",
  15069. "pattern": "^ses"
  15070. },
  15071. "finish": {
  15072. "type": "string"
  15073. },
  15074. "cost": {
  15075. "type": "number"
  15076. },
  15077. "tokens": {
  15078. "type": "object",
  15079. "properties": {
  15080. "input": {
  15081. "type": "number"
  15082. },
  15083. "output": {
  15084. "type": "number"
  15085. },
  15086. "reasoning": {
  15087. "type": "number"
  15088. },
  15089. "cache": {
  15090. "type": "object",
  15091. "properties": {
  15092. "read": {
  15093. "type": "number"
  15094. },
  15095. "write": {
  15096. "type": "number"
  15097. }
  15098. },
  15099. "required": ["read", "write"],
  15100. "additionalProperties": false
  15101. }
  15102. },
  15103. "required": ["input", "output", "reasoning", "cache"],
  15104. "additionalProperties": false
  15105. },
  15106. "snapshot": {
  15107. "type": "string"
  15108. }
  15109. },
  15110. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  15111. "additionalProperties": false
  15112. }
  15113. },
  15114. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15115. "additionalProperties": false
  15116. },
  15117. "SyncEventSessionNextStepFailed": {
  15118. "type": "object",
  15119. "properties": {
  15120. "type": {
  15121. "type": "string",
  15122. "enum": ["sync"]
  15123. },
  15124. "name": {
  15125. "type": "string",
  15126. "enum": ["session.next.step.failed.1"]
  15127. },
  15128. "id": {
  15129. "type": "string"
  15130. },
  15131. "seq": {
  15132. "type": "number"
  15133. },
  15134. "aggregateID": {
  15135. "type": "string",
  15136. "enum": ["sessionID"]
  15137. },
  15138. "data": {
  15139. "type": "object",
  15140. "properties": {
  15141. "timestamp": {
  15142. "type": "number"
  15143. },
  15144. "sessionID": {
  15145. "type": "string",
  15146. "pattern": "^ses"
  15147. },
  15148. "error": {
  15149. "$ref": "#/components/schemas/SessionErrorUnknown"
  15150. }
  15151. },
  15152. "required": ["timestamp", "sessionID", "error"],
  15153. "additionalProperties": false
  15154. }
  15155. },
  15156. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15157. "additionalProperties": false
  15158. },
  15159. "SyncEventSessionNextTextStarted": {
  15160. "type": "object",
  15161. "properties": {
  15162. "type": {
  15163. "type": "string",
  15164. "enum": ["sync"]
  15165. },
  15166. "name": {
  15167. "type": "string",
  15168. "enum": ["session.next.text.started.1"]
  15169. },
  15170. "id": {
  15171. "type": "string"
  15172. },
  15173. "seq": {
  15174. "type": "number"
  15175. },
  15176. "aggregateID": {
  15177. "type": "string",
  15178. "enum": ["sessionID"]
  15179. },
  15180. "data": {
  15181. "type": "object",
  15182. "properties": {
  15183. "timestamp": {
  15184. "type": "number"
  15185. },
  15186. "sessionID": {
  15187. "type": "string",
  15188. "pattern": "^ses"
  15189. }
  15190. },
  15191. "required": ["timestamp", "sessionID"],
  15192. "additionalProperties": false
  15193. }
  15194. },
  15195. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15196. "additionalProperties": false
  15197. },
  15198. "SyncEventSessionNextTextDelta": {
  15199. "type": "object",
  15200. "properties": {
  15201. "type": {
  15202. "type": "string",
  15203. "enum": ["sync"]
  15204. },
  15205. "name": {
  15206. "type": "string",
  15207. "enum": ["session.next.text.delta.1"]
  15208. },
  15209. "id": {
  15210. "type": "string"
  15211. },
  15212. "seq": {
  15213. "type": "number"
  15214. },
  15215. "aggregateID": {
  15216. "type": "string",
  15217. "enum": ["sessionID"]
  15218. },
  15219. "data": {
  15220. "type": "object",
  15221. "properties": {
  15222. "timestamp": {
  15223. "type": "number"
  15224. },
  15225. "sessionID": {
  15226. "type": "string",
  15227. "pattern": "^ses"
  15228. },
  15229. "delta": {
  15230. "type": "string"
  15231. }
  15232. },
  15233. "required": ["timestamp", "sessionID", "delta"],
  15234. "additionalProperties": false
  15235. }
  15236. },
  15237. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15238. "additionalProperties": false
  15239. },
  15240. "SyncEventSessionNextTextEnded": {
  15241. "type": "object",
  15242. "properties": {
  15243. "type": {
  15244. "type": "string",
  15245. "enum": ["sync"]
  15246. },
  15247. "name": {
  15248. "type": "string",
  15249. "enum": ["session.next.text.ended.1"]
  15250. },
  15251. "id": {
  15252. "type": "string"
  15253. },
  15254. "seq": {
  15255. "type": "number"
  15256. },
  15257. "aggregateID": {
  15258. "type": "string",
  15259. "enum": ["sessionID"]
  15260. },
  15261. "data": {
  15262. "type": "object",
  15263. "properties": {
  15264. "timestamp": {
  15265. "type": "number"
  15266. },
  15267. "sessionID": {
  15268. "type": "string",
  15269. "pattern": "^ses"
  15270. },
  15271. "text": {
  15272. "type": "string"
  15273. }
  15274. },
  15275. "required": ["timestamp", "sessionID", "text"],
  15276. "additionalProperties": false
  15277. }
  15278. },
  15279. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15280. "additionalProperties": false
  15281. },
  15282. "SyncEventSessionNextReasoningStarted": {
  15283. "type": "object",
  15284. "properties": {
  15285. "type": {
  15286. "type": "string",
  15287. "enum": ["sync"]
  15288. },
  15289. "name": {
  15290. "type": "string",
  15291. "enum": ["session.next.reasoning.started.1"]
  15292. },
  15293. "id": {
  15294. "type": "string"
  15295. },
  15296. "seq": {
  15297. "type": "number"
  15298. },
  15299. "aggregateID": {
  15300. "type": "string",
  15301. "enum": ["sessionID"]
  15302. },
  15303. "data": {
  15304. "type": "object",
  15305. "properties": {
  15306. "timestamp": {
  15307. "type": "number"
  15308. },
  15309. "sessionID": {
  15310. "type": "string",
  15311. "pattern": "^ses"
  15312. },
  15313. "reasoningID": {
  15314. "type": "string"
  15315. }
  15316. },
  15317. "required": ["timestamp", "sessionID", "reasoningID"],
  15318. "additionalProperties": false
  15319. }
  15320. },
  15321. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15322. "additionalProperties": false
  15323. },
  15324. "SyncEventSessionNextReasoningDelta": {
  15325. "type": "object",
  15326. "properties": {
  15327. "type": {
  15328. "type": "string",
  15329. "enum": ["sync"]
  15330. },
  15331. "name": {
  15332. "type": "string",
  15333. "enum": ["session.next.reasoning.delta.1"]
  15334. },
  15335. "id": {
  15336. "type": "string"
  15337. },
  15338. "seq": {
  15339. "type": "number"
  15340. },
  15341. "aggregateID": {
  15342. "type": "string",
  15343. "enum": ["sessionID"]
  15344. },
  15345. "data": {
  15346. "type": "object",
  15347. "properties": {
  15348. "timestamp": {
  15349. "type": "number"
  15350. },
  15351. "sessionID": {
  15352. "type": "string",
  15353. "pattern": "^ses"
  15354. },
  15355. "reasoningID": {
  15356. "type": "string"
  15357. },
  15358. "delta": {
  15359. "type": "string"
  15360. }
  15361. },
  15362. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  15363. "additionalProperties": false
  15364. }
  15365. },
  15366. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15367. "additionalProperties": false
  15368. },
  15369. "SyncEventSessionNextReasoningEnded": {
  15370. "type": "object",
  15371. "properties": {
  15372. "type": {
  15373. "type": "string",
  15374. "enum": ["sync"]
  15375. },
  15376. "name": {
  15377. "type": "string",
  15378. "enum": ["session.next.reasoning.ended.1"]
  15379. },
  15380. "id": {
  15381. "type": "string"
  15382. },
  15383. "seq": {
  15384. "type": "number"
  15385. },
  15386. "aggregateID": {
  15387. "type": "string",
  15388. "enum": ["sessionID"]
  15389. },
  15390. "data": {
  15391. "type": "object",
  15392. "properties": {
  15393. "timestamp": {
  15394. "type": "number"
  15395. },
  15396. "sessionID": {
  15397. "type": "string",
  15398. "pattern": "^ses"
  15399. },
  15400. "reasoningID": {
  15401. "type": "string"
  15402. },
  15403. "text": {
  15404. "type": "string"
  15405. }
  15406. },
  15407. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  15408. "additionalProperties": false
  15409. }
  15410. },
  15411. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15412. "additionalProperties": false
  15413. },
  15414. "SyncEventSessionNextToolInputStarted": {
  15415. "type": "object",
  15416. "properties": {
  15417. "type": {
  15418. "type": "string",
  15419. "enum": ["sync"]
  15420. },
  15421. "name": {
  15422. "type": "string",
  15423. "enum": ["session.next.tool.input.started.1"]
  15424. },
  15425. "id": {
  15426. "type": "string"
  15427. },
  15428. "seq": {
  15429. "type": "number"
  15430. },
  15431. "aggregateID": {
  15432. "type": "string",
  15433. "enum": ["sessionID"]
  15434. },
  15435. "data": {
  15436. "type": "object",
  15437. "properties": {
  15438. "timestamp": {
  15439. "type": "number"
  15440. },
  15441. "sessionID": {
  15442. "type": "string",
  15443. "pattern": "^ses"
  15444. },
  15445. "callID": {
  15446. "type": "string"
  15447. },
  15448. "name": {
  15449. "type": "string"
  15450. }
  15451. },
  15452. "required": ["timestamp", "sessionID", "callID", "name"],
  15453. "additionalProperties": false
  15454. }
  15455. },
  15456. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15457. "additionalProperties": false
  15458. },
  15459. "SyncEventSessionNextToolInputDelta": {
  15460. "type": "object",
  15461. "properties": {
  15462. "type": {
  15463. "type": "string",
  15464. "enum": ["sync"]
  15465. },
  15466. "name": {
  15467. "type": "string",
  15468. "enum": ["session.next.tool.input.delta.1"]
  15469. },
  15470. "id": {
  15471. "type": "string"
  15472. },
  15473. "seq": {
  15474. "type": "number"
  15475. },
  15476. "aggregateID": {
  15477. "type": "string",
  15478. "enum": ["sessionID"]
  15479. },
  15480. "data": {
  15481. "type": "object",
  15482. "properties": {
  15483. "timestamp": {
  15484. "type": "number"
  15485. },
  15486. "sessionID": {
  15487. "type": "string",
  15488. "pattern": "^ses"
  15489. },
  15490. "callID": {
  15491. "type": "string"
  15492. },
  15493. "delta": {
  15494. "type": "string"
  15495. }
  15496. },
  15497. "required": ["timestamp", "sessionID", "callID", "delta"],
  15498. "additionalProperties": false
  15499. }
  15500. },
  15501. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15502. "additionalProperties": false
  15503. },
  15504. "SyncEventSessionNextToolInputEnded": {
  15505. "type": "object",
  15506. "properties": {
  15507. "type": {
  15508. "type": "string",
  15509. "enum": ["sync"]
  15510. },
  15511. "name": {
  15512. "type": "string",
  15513. "enum": ["session.next.tool.input.ended.1"]
  15514. },
  15515. "id": {
  15516. "type": "string"
  15517. },
  15518. "seq": {
  15519. "type": "number"
  15520. },
  15521. "aggregateID": {
  15522. "type": "string",
  15523. "enum": ["sessionID"]
  15524. },
  15525. "data": {
  15526. "type": "object",
  15527. "properties": {
  15528. "timestamp": {
  15529. "type": "number"
  15530. },
  15531. "sessionID": {
  15532. "type": "string",
  15533. "pattern": "^ses"
  15534. },
  15535. "callID": {
  15536. "type": "string"
  15537. },
  15538. "text": {
  15539. "type": "string"
  15540. }
  15541. },
  15542. "required": ["timestamp", "sessionID", "callID", "text"],
  15543. "additionalProperties": false
  15544. }
  15545. },
  15546. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15547. "additionalProperties": false
  15548. },
  15549. "SyncEventSessionNextToolCalled": {
  15550. "type": "object",
  15551. "properties": {
  15552. "type": {
  15553. "type": "string",
  15554. "enum": ["sync"]
  15555. },
  15556. "name": {
  15557. "type": "string",
  15558. "enum": ["session.next.tool.called.1"]
  15559. },
  15560. "id": {
  15561. "type": "string"
  15562. },
  15563. "seq": {
  15564. "type": "number"
  15565. },
  15566. "aggregateID": {
  15567. "type": "string",
  15568. "enum": ["sessionID"]
  15569. },
  15570. "data": {
  15571. "type": "object",
  15572. "properties": {
  15573. "timestamp": {
  15574. "type": "number"
  15575. },
  15576. "sessionID": {
  15577. "type": "string",
  15578. "pattern": "^ses"
  15579. },
  15580. "callID": {
  15581. "type": "string"
  15582. },
  15583. "tool": {
  15584. "type": "string"
  15585. },
  15586. "input": {
  15587. "type": "object"
  15588. },
  15589. "provider": {
  15590. "type": "object",
  15591. "properties": {
  15592. "executed": {
  15593. "type": "boolean"
  15594. },
  15595. "metadata": {
  15596. "type": "object"
  15597. }
  15598. },
  15599. "required": ["executed"],
  15600. "additionalProperties": false
  15601. }
  15602. },
  15603. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  15604. "additionalProperties": false
  15605. }
  15606. },
  15607. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15608. "additionalProperties": false
  15609. },
  15610. "SyncEventSessionNextToolProgress": {
  15611. "type": "object",
  15612. "properties": {
  15613. "type": {
  15614. "type": "string",
  15615. "enum": ["sync"]
  15616. },
  15617. "name": {
  15618. "type": "string",
  15619. "enum": ["session.next.tool.progress.1"]
  15620. },
  15621. "id": {
  15622. "type": "string"
  15623. },
  15624. "seq": {
  15625. "type": "number"
  15626. },
  15627. "aggregateID": {
  15628. "type": "string",
  15629. "enum": ["sessionID"]
  15630. },
  15631. "data": {
  15632. "type": "object",
  15633. "properties": {
  15634. "timestamp": {
  15635. "type": "number"
  15636. },
  15637. "sessionID": {
  15638. "type": "string",
  15639. "pattern": "^ses"
  15640. },
  15641. "callID": {
  15642. "type": "string"
  15643. },
  15644. "structured": {
  15645. "type": "object"
  15646. },
  15647. "content": {
  15648. "type": "array",
  15649. "items": {
  15650. "anyOf": [
  15651. {
  15652. "$ref": "#/components/schemas/ToolTextContent"
  15653. },
  15654. {
  15655. "$ref": "#/components/schemas/ToolFileContent"
  15656. }
  15657. ]
  15658. }
  15659. }
  15660. },
  15661. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  15662. "additionalProperties": false
  15663. }
  15664. },
  15665. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15666. "additionalProperties": false
  15667. },
  15668. "SyncEventSessionNextToolSuccess": {
  15669. "type": "object",
  15670. "properties": {
  15671. "type": {
  15672. "type": "string",
  15673. "enum": ["sync"]
  15674. },
  15675. "name": {
  15676. "type": "string",
  15677. "enum": ["session.next.tool.success.1"]
  15678. },
  15679. "id": {
  15680. "type": "string"
  15681. },
  15682. "seq": {
  15683. "type": "number"
  15684. },
  15685. "aggregateID": {
  15686. "type": "string",
  15687. "enum": ["sessionID"]
  15688. },
  15689. "data": {
  15690. "type": "object",
  15691. "properties": {
  15692. "timestamp": {
  15693. "type": "number"
  15694. },
  15695. "sessionID": {
  15696. "type": "string",
  15697. "pattern": "^ses"
  15698. },
  15699. "callID": {
  15700. "type": "string"
  15701. },
  15702. "structured": {
  15703. "type": "object"
  15704. },
  15705. "content": {
  15706. "type": "array",
  15707. "items": {
  15708. "anyOf": [
  15709. {
  15710. "$ref": "#/components/schemas/ToolTextContent"
  15711. },
  15712. {
  15713. "$ref": "#/components/schemas/ToolFileContent"
  15714. }
  15715. ]
  15716. }
  15717. },
  15718. "provider": {
  15719. "type": "object",
  15720. "properties": {
  15721. "executed": {
  15722. "type": "boolean"
  15723. },
  15724. "metadata": {
  15725. "type": "object"
  15726. }
  15727. },
  15728. "required": ["executed"],
  15729. "additionalProperties": false
  15730. }
  15731. },
  15732. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  15733. "additionalProperties": false
  15734. }
  15735. },
  15736. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15737. "additionalProperties": false
  15738. },
  15739. "SyncEventSessionNextToolFailed": {
  15740. "type": "object",
  15741. "properties": {
  15742. "type": {
  15743. "type": "string",
  15744. "enum": ["sync"]
  15745. },
  15746. "name": {
  15747. "type": "string",
  15748. "enum": ["session.next.tool.failed.1"]
  15749. },
  15750. "id": {
  15751. "type": "string"
  15752. },
  15753. "seq": {
  15754. "type": "number"
  15755. },
  15756. "aggregateID": {
  15757. "type": "string",
  15758. "enum": ["sessionID"]
  15759. },
  15760. "data": {
  15761. "type": "object",
  15762. "properties": {
  15763. "timestamp": {
  15764. "type": "number"
  15765. },
  15766. "sessionID": {
  15767. "type": "string",
  15768. "pattern": "^ses"
  15769. },
  15770. "callID": {
  15771. "type": "string"
  15772. },
  15773. "error": {
  15774. "$ref": "#/components/schemas/SessionErrorUnknown"
  15775. },
  15776. "provider": {
  15777. "type": "object",
  15778. "properties": {
  15779. "executed": {
  15780. "type": "boolean"
  15781. },
  15782. "metadata": {
  15783. "type": "object"
  15784. }
  15785. },
  15786. "required": ["executed"],
  15787. "additionalProperties": false
  15788. }
  15789. },
  15790. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  15791. "additionalProperties": false
  15792. }
  15793. },
  15794. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15795. "additionalProperties": false
  15796. },
  15797. "SyncEventSessionNextRetried": {
  15798. "type": "object",
  15799. "properties": {
  15800. "type": {
  15801. "type": "string",
  15802. "enum": ["sync"]
  15803. },
  15804. "name": {
  15805. "type": "string",
  15806. "enum": ["session.next.retried.1"]
  15807. },
  15808. "id": {
  15809. "type": "string"
  15810. },
  15811. "seq": {
  15812. "type": "number"
  15813. },
  15814. "aggregateID": {
  15815. "type": "string",
  15816. "enum": ["sessionID"]
  15817. },
  15818. "data": {
  15819. "type": "object",
  15820. "properties": {
  15821. "timestamp": {
  15822. "type": "number"
  15823. },
  15824. "sessionID": {
  15825. "type": "string",
  15826. "pattern": "^ses"
  15827. },
  15828. "attempt": {
  15829. "type": "number"
  15830. },
  15831. "error": {
  15832. "$ref": "#/components/schemas/SessionNextRetry_error"
  15833. }
  15834. },
  15835. "required": ["timestamp", "sessionID", "attempt", "error"],
  15836. "additionalProperties": false
  15837. }
  15838. },
  15839. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15840. "additionalProperties": false
  15841. },
  15842. "SyncEventSessionNextCompactionStarted": {
  15843. "type": "object",
  15844. "properties": {
  15845. "type": {
  15846. "type": "string",
  15847. "enum": ["sync"]
  15848. },
  15849. "name": {
  15850. "type": "string",
  15851. "enum": ["session.next.compaction.started.1"]
  15852. },
  15853. "id": {
  15854. "type": "string"
  15855. },
  15856. "seq": {
  15857. "type": "number"
  15858. },
  15859. "aggregateID": {
  15860. "type": "string",
  15861. "enum": ["sessionID"]
  15862. },
  15863. "data": {
  15864. "type": "object",
  15865. "properties": {
  15866. "timestamp": {
  15867. "type": "number"
  15868. },
  15869. "sessionID": {
  15870. "type": "string",
  15871. "pattern": "^ses"
  15872. },
  15873. "reason": {
  15874. "type": "string",
  15875. "enum": ["auto", "manual"]
  15876. }
  15877. },
  15878. "required": ["timestamp", "sessionID", "reason"],
  15879. "additionalProperties": false
  15880. }
  15881. },
  15882. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15883. "additionalProperties": false
  15884. },
  15885. "SyncEventSessionNextCompactionDelta": {
  15886. "type": "object",
  15887. "properties": {
  15888. "type": {
  15889. "type": "string",
  15890. "enum": ["sync"]
  15891. },
  15892. "name": {
  15893. "type": "string",
  15894. "enum": ["session.next.compaction.delta.1"]
  15895. },
  15896. "id": {
  15897. "type": "string"
  15898. },
  15899. "seq": {
  15900. "type": "number"
  15901. },
  15902. "aggregateID": {
  15903. "type": "string",
  15904. "enum": ["sessionID"]
  15905. },
  15906. "data": {
  15907. "type": "object",
  15908. "properties": {
  15909. "timestamp": {
  15910. "type": "number"
  15911. },
  15912. "sessionID": {
  15913. "type": "string",
  15914. "pattern": "^ses"
  15915. },
  15916. "text": {
  15917. "type": "string"
  15918. }
  15919. },
  15920. "required": ["timestamp", "sessionID", "text"],
  15921. "additionalProperties": false
  15922. }
  15923. },
  15924. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15925. "additionalProperties": false
  15926. },
  15927. "SyncEventSessionNextCompactionEnded": {
  15928. "type": "object",
  15929. "properties": {
  15930. "type": {
  15931. "type": "string",
  15932. "enum": ["sync"]
  15933. },
  15934. "name": {
  15935. "type": "string",
  15936. "enum": ["session.next.compaction.ended.1"]
  15937. },
  15938. "id": {
  15939. "type": "string"
  15940. },
  15941. "seq": {
  15942. "type": "number"
  15943. },
  15944. "aggregateID": {
  15945. "type": "string",
  15946. "enum": ["sessionID"]
  15947. },
  15948. "data": {
  15949. "type": "object",
  15950. "properties": {
  15951. "timestamp": {
  15952. "type": "number"
  15953. },
  15954. "sessionID": {
  15955. "type": "string",
  15956. "pattern": "^ses"
  15957. },
  15958. "text": {
  15959. "type": "string"
  15960. },
  15961. "include": {
  15962. "type": "string"
  15963. }
  15964. },
  15965. "required": ["timestamp", "sessionID", "text"],
  15966. "additionalProperties": false
  15967. }
  15968. },
  15969. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15970. "additionalProperties": false
  15971. },
  15972. "EventServerInstanceDisposed": {
  15973. "type": "object",
  15974. "properties": {
  15975. "id": {
  15976. "type": "string"
  15977. },
  15978. "type": {
  15979. "type": "string",
  15980. "enum": ["server.instance.disposed"]
  15981. },
  15982. "properties": {
  15983. "type": "object",
  15984. "properties": {
  15985. "directory": {
  15986. "type": "string"
  15987. }
  15988. },
  15989. "required": ["directory"],
  15990. "additionalProperties": false
  15991. }
  15992. },
  15993. "required": ["id", "type", "properties"],
  15994. "additionalProperties": false
  15995. },
  15996. "EventFileEdited": {
  15997. "type": "object",
  15998. "properties": {
  15999. "id": {
  16000. "type": "string"
  16001. },
  16002. "type": {
  16003. "type": "string",
  16004. "enum": ["file.edited"]
  16005. },
  16006. "properties": {
  16007. "type": "object",
  16008. "properties": {
  16009. "file": {
  16010. "type": "string"
  16011. }
  16012. },
  16013. "required": ["file"],
  16014. "additionalProperties": false
  16015. }
  16016. },
  16017. "required": ["id", "type", "properties"],
  16018. "additionalProperties": false
  16019. },
  16020. "EventFileWatcherUpdated": {
  16021. "type": "object",
  16022. "properties": {
  16023. "id": {
  16024. "type": "string"
  16025. },
  16026. "type": {
  16027. "type": "string",
  16028. "enum": ["file.watcher.updated"]
  16029. },
  16030. "properties": {
  16031. "type": "object",
  16032. "properties": {
  16033. "file": {
  16034. "type": "string"
  16035. },
  16036. "event": {
  16037. "type": "string",
  16038. "enum": ["add", "change", "unlink"]
  16039. }
  16040. },
  16041. "required": ["file", "event"],
  16042. "additionalProperties": false
  16043. }
  16044. },
  16045. "required": ["id", "type", "properties"],
  16046. "additionalProperties": false
  16047. },
  16048. "EventLspClientDiagnostics": {
  16049. "type": "object",
  16050. "properties": {
  16051. "id": {
  16052. "type": "string"
  16053. },
  16054. "type": {
  16055. "type": "string",
  16056. "enum": ["lsp.client.diagnostics"]
  16057. },
  16058. "properties": {
  16059. "type": "object",
  16060. "properties": {
  16061. "serverID": {
  16062. "type": "string"
  16063. },
  16064. "path": {
  16065. "type": "string"
  16066. }
  16067. },
  16068. "required": ["serverID", "path"],
  16069. "additionalProperties": false
  16070. }
  16071. },
  16072. "required": ["id", "type", "properties"],
  16073. "additionalProperties": false
  16074. },
  16075. "EventLspUpdated": {
  16076. "type": "object",
  16077. "properties": {
  16078. "id": {
  16079. "type": "string"
  16080. },
  16081. "type": {
  16082. "type": "string",
  16083. "enum": ["lsp.updated"]
  16084. },
  16085. "properties": {
  16086. "type": "object",
  16087. "properties": {}
  16088. }
  16089. },
  16090. "required": ["id", "type", "properties"],
  16091. "additionalProperties": false
  16092. },
  16093. "EventMessagePartDelta": {
  16094. "type": "object",
  16095. "properties": {
  16096. "id": {
  16097. "type": "string"
  16098. },
  16099. "type": {
  16100. "type": "string",
  16101. "enum": ["message.part.delta"]
  16102. },
  16103. "properties": {
  16104. "type": "object",
  16105. "properties": {
  16106. "sessionID": {
  16107. "type": "string",
  16108. "pattern": "^ses"
  16109. },
  16110. "messageID": {
  16111. "type": "string",
  16112. "pattern": "^msg"
  16113. },
  16114. "partID": {
  16115. "type": "string",
  16116. "pattern": "^prt"
  16117. },
  16118. "field": {
  16119. "type": "string"
  16120. },
  16121. "delta": {
  16122. "type": "string"
  16123. }
  16124. },
  16125. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  16126. "additionalProperties": false
  16127. }
  16128. },
  16129. "required": ["id", "type", "properties"],
  16130. "additionalProperties": false
  16131. },
  16132. "EventPermissionAsked": {
  16133. "type": "object",
  16134. "properties": {
  16135. "id": {
  16136. "type": "string"
  16137. },
  16138. "type": {
  16139. "type": "string",
  16140. "enum": ["permission.asked"]
  16141. },
  16142. "properties": {
  16143. "$ref": "#/components/schemas/PermissionRequest"
  16144. }
  16145. },
  16146. "required": ["id", "type", "properties"],
  16147. "additionalProperties": false
  16148. },
  16149. "EventPermissionReplied": {
  16150. "type": "object",
  16151. "properties": {
  16152. "id": {
  16153. "type": "string"
  16154. },
  16155. "type": {
  16156. "type": "string",
  16157. "enum": ["permission.replied"]
  16158. },
  16159. "properties": {
  16160. "type": "object",
  16161. "properties": {
  16162. "sessionID": {
  16163. "type": "string",
  16164. "pattern": "^ses"
  16165. },
  16166. "requestID": {
  16167. "type": "string",
  16168. "pattern": "^per"
  16169. },
  16170. "reply": {
  16171. "type": "string",
  16172. "enum": ["once", "always", "reject"]
  16173. }
  16174. },
  16175. "required": ["sessionID", "requestID", "reply"],
  16176. "additionalProperties": false
  16177. }
  16178. },
  16179. "required": ["id", "type", "properties"],
  16180. "additionalProperties": false
  16181. },
  16182. "EventSessionDiff": {
  16183. "type": "object",
  16184. "properties": {
  16185. "id": {
  16186. "type": "string"
  16187. },
  16188. "type": {
  16189. "type": "string",
  16190. "enum": ["session.diff"]
  16191. },
  16192. "properties": {
  16193. "type": "object",
  16194. "properties": {
  16195. "sessionID": {
  16196. "type": "string",
  16197. "pattern": "^ses"
  16198. },
  16199. "diff": {
  16200. "type": "array",
  16201. "items": {
  16202. "$ref": "#/components/schemas/SnapshotFileDiff"
  16203. }
  16204. }
  16205. },
  16206. "required": ["sessionID", "diff"],
  16207. "additionalProperties": false
  16208. }
  16209. },
  16210. "required": ["id", "type", "properties"],
  16211. "additionalProperties": false
  16212. },
  16213. "EventSessionError": {
  16214. "type": "object",
  16215. "properties": {
  16216. "id": {
  16217. "type": "string"
  16218. },
  16219. "type": {
  16220. "type": "string",
  16221. "enum": ["session.error"]
  16222. },
  16223. "properties": {
  16224. "type": "object",
  16225. "properties": {
  16226. "sessionID": {
  16227. "type": "string",
  16228. "pattern": "^ses"
  16229. },
  16230. "error": {
  16231. "anyOf": [
  16232. {
  16233. "$ref": "#/components/schemas/ProviderAuthError"
  16234. },
  16235. {
  16236. "$ref": "#/components/schemas/UnknownError"
  16237. },
  16238. {
  16239. "$ref": "#/components/schemas/MessageOutputLengthError"
  16240. },
  16241. {
  16242. "$ref": "#/components/schemas/MessageAbortedError"
  16243. },
  16244. {
  16245. "$ref": "#/components/schemas/StructuredOutputError"
  16246. },
  16247. {
  16248. "$ref": "#/components/schemas/ContextOverflowError"
  16249. },
  16250. {
  16251. "$ref": "#/components/schemas/APIError"
  16252. }
  16253. ]
  16254. }
  16255. },
  16256. "additionalProperties": false
  16257. }
  16258. },
  16259. "required": ["id", "type", "properties"],
  16260. "additionalProperties": false
  16261. },
  16262. "EventInstallationUpdated": {
  16263. "type": "object",
  16264. "properties": {
  16265. "id": {
  16266. "type": "string"
  16267. },
  16268. "type": {
  16269. "type": "string",
  16270. "enum": ["installation.updated"]
  16271. },
  16272. "properties": {
  16273. "type": "object",
  16274. "properties": {
  16275. "version": {
  16276. "type": "string"
  16277. }
  16278. },
  16279. "required": ["version"],
  16280. "additionalProperties": false
  16281. }
  16282. },
  16283. "required": ["id", "type", "properties"],
  16284. "additionalProperties": false
  16285. },
  16286. "EventInstallationUpdate-available": {
  16287. "type": "object",
  16288. "properties": {
  16289. "id": {
  16290. "type": "string"
  16291. },
  16292. "type": {
  16293. "type": "string",
  16294. "enum": ["installation.update-available"]
  16295. },
  16296. "properties": {
  16297. "type": "object",
  16298. "properties": {
  16299. "version": {
  16300. "type": "string"
  16301. }
  16302. },
  16303. "required": ["version"],
  16304. "additionalProperties": false
  16305. }
  16306. },
  16307. "required": ["id", "type", "properties"],
  16308. "additionalProperties": false
  16309. },
  16310. "EventQuestionAsked": {
  16311. "type": "object",
  16312. "properties": {
  16313. "id": {
  16314. "type": "string"
  16315. },
  16316. "type": {
  16317. "type": "string",
  16318. "enum": ["question.asked"]
  16319. },
  16320. "properties": {
  16321. "$ref": "#/components/schemas/QuestionRequest"
  16322. }
  16323. },
  16324. "required": ["id", "type", "properties"],
  16325. "additionalProperties": false
  16326. },
  16327. "EventQuestionReplied": {
  16328. "type": "object",
  16329. "properties": {
  16330. "id": {
  16331. "type": "string"
  16332. },
  16333. "type": {
  16334. "type": "string",
  16335. "enum": ["question.replied"]
  16336. },
  16337. "properties": {
  16338. "$ref": "#/components/schemas/QuestionReplied"
  16339. }
  16340. },
  16341. "required": ["id", "type", "properties"],
  16342. "additionalProperties": false
  16343. },
  16344. "EventQuestionRejected": {
  16345. "type": "object",
  16346. "properties": {
  16347. "id": {
  16348. "type": "string"
  16349. },
  16350. "type": {
  16351. "type": "string",
  16352. "enum": ["question.rejected"]
  16353. },
  16354. "properties": {
  16355. "$ref": "#/components/schemas/QuestionRejected"
  16356. }
  16357. },
  16358. "required": ["id", "type", "properties"],
  16359. "additionalProperties": false
  16360. },
  16361. "EventTodoUpdated": {
  16362. "type": "object",
  16363. "properties": {
  16364. "id": {
  16365. "type": "string"
  16366. },
  16367. "type": {
  16368. "type": "string",
  16369. "enum": ["todo.updated"]
  16370. },
  16371. "properties": {
  16372. "type": "object",
  16373. "properties": {
  16374. "sessionID": {
  16375. "type": "string",
  16376. "pattern": "^ses"
  16377. },
  16378. "todos": {
  16379. "type": "array",
  16380. "items": {
  16381. "$ref": "#/components/schemas/Todo"
  16382. }
  16383. }
  16384. },
  16385. "required": ["sessionID", "todos"],
  16386. "additionalProperties": false
  16387. }
  16388. },
  16389. "required": ["id", "type", "properties"],
  16390. "additionalProperties": false
  16391. },
  16392. "EventSessionStatus": {
  16393. "type": "object",
  16394. "properties": {
  16395. "id": {
  16396. "type": "string"
  16397. },
  16398. "type": {
  16399. "type": "string",
  16400. "enum": ["session.status"]
  16401. },
  16402. "properties": {
  16403. "type": "object",
  16404. "properties": {
  16405. "sessionID": {
  16406. "type": "string",
  16407. "pattern": "^ses"
  16408. },
  16409. "status": {
  16410. "$ref": "#/components/schemas/SessionStatus"
  16411. }
  16412. },
  16413. "required": ["sessionID", "status"],
  16414. "additionalProperties": false
  16415. }
  16416. },
  16417. "required": ["id", "type", "properties"],
  16418. "additionalProperties": false
  16419. },
  16420. "EventSessionIdle": {
  16421. "type": "object",
  16422. "properties": {
  16423. "id": {
  16424. "type": "string"
  16425. },
  16426. "type": {
  16427. "type": "string",
  16428. "enum": ["session.idle"]
  16429. },
  16430. "properties": {
  16431. "type": "object",
  16432. "properties": {
  16433. "sessionID": {
  16434. "type": "string",
  16435. "pattern": "^ses"
  16436. }
  16437. },
  16438. "required": ["sessionID"],
  16439. "additionalProperties": false
  16440. }
  16441. },
  16442. "required": ["id", "type", "properties"],
  16443. "additionalProperties": false
  16444. },
  16445. "EventSessionCompacted": {
  16446. "type": "object",
  16447. "properties": {
  16448. "id": {
  16449. "type": "string"
  16450. },
  16451. "type": {
  16452. "type": "string",
  16453. "enum": ["session.compacted"]
  16454. },
  16455. "properties": {
  16456. "type": "object",
  16457. "properties": {
  16458. "sessionID": {
  16459. "type": "string",
  16460. "pattern": "^ses"
  16461. }
  16462. },
  16463. "required": ["sessionID"],
  16464. "additionalProperties": false
  16465. }
  16466. },
  16467. "required": ["id", "type", "properties"],
  16468. "additionalProperties": false
  16469. },
  16470. "EventMcpToolsChanged": {
  16471. "type": "object",
  16472. "properties": {
  16473. "id": {
  16474. "type": "string"
  16475. },
  16476. "type": {
  16477. "type": "string",
  16478. "enum": ["mcp.tools.changed"]
  16479. },
  16480. "properties": {
  16481. "type": "object",
  16482. "properties": {
  16483. "server": {
  16484. "type": "string"
  16485. }
  16486. },
  16487. "required": ["server"],
  16488. "additionalProperties": false
  16489. }
  16490. },
  16491. "required": ["id", "type", "properties"],
  16492. "additionalProperties": false
  16493. },
  16494. "EventMcpBrowserOpenFailed": {
  16495. "type": "object",
  16496. "properties": {
  16497. "id": {
  16498. "type": "string"
  16499. },
  16500. "type": {
  16501. "type": "string",
  16502. "enum": ["mcp.browser.open.failed"]
  16503. },
  16504. "properties": {
  16505. "type": "object",
  16506. "properties": {
  16507. "mcpName": {
  16508. "type": "string"
  16509. },
  16510. "url": {
  16511. "type": "string"
  16512. }
  16513. },
  16514. "required": ["mcpName", "url"],
  16515. "additionalProperties": false
  16516. }
  16517. },
  16518. "required": ["id", "type", "properties"],
  16519. "additionalProperties": false
  16520. },
  16521. "EventCommandExecuted": {
  16522. "type": "object",
  16523. "properties": {
  16524. "id": {
  16525. "type": "string"
  16526. },
  16527. "type": {
  16528. "type": "string",
  16529. "enum": ["command.executed"]
  16530. },
  16531. "properties": {
  16532. "type": "object",
  16533. "properties": {
  16534. "name": {
  16535. "type": "string"
  16536. },
  16537. "sessionID": {
  16538. "type": "string",
  16539. "pattern": "^ses"
  16540. },
  16541. "arguments": {
  16542. "type": "string"
  16543. },
  16544. "messageID": {
  16545. "type": "string",
  16546. "pattern": "^msg"
  16547. }
  16548. },
  16549. "required": ["name", "sessionID", "arguments", "messageID"],
  16550. "additionalProperties": false
  16551. }
  16552. },
  16553. "required": ["id", "type", "properties"],
  16554. "additionalProperties": false
  16555. },
  16556. "EventProjectUpdated": {
  16557. "type": "object",
  16558. "properties": {
  16559. "id": {
  16560. "type": "string"
  16561. },
  16562. "type": {
  16563. "type": "string",
  16564. "enum": ["project.updated"]
  16565. },
  16566. "properties": {
  16567. "$ref": "#/components/schemas/Project"
  16568. }
  16569. },
  16570. "required": ["id", "type", "properties"],
  16571. "additionalProperties": false
  16572. },
  16573. "EventVcsBranchUpdated": {
  16574. "type": "object",
  16575. "properties": {
  16576. "id": {
  16577. "type": "string"
  16578. },
  16579. "type": {
  16580. "type": "string",
  16581. "enum": ["vcs.branch.updated"]
  16582. },
  16583. "properties": {
  16584. "type": "object",
  16585. "properties": {
  16586. "branch": {
  16587. "type": "string"
  16588. }
  16589. },
  16590. "additionalProperties": false
  16591. }
  16592. },
  16593. "required": ["id", "type", "properties"],
  16594. "additionalProperties": false
  16595. },
  16596. "EventWorkspaceReady": {
  16597. "type": "object",
  16598. "properties": {
  16599. "id": {
  16600. "type": "string"
  16601. },
  16602. "type": {
  16603. "type": "string",
  16604. "enum": ["workspace.ready"]
  16605. },
  16606. "properties": {
  16607. "type": "object",
  16608. "properties": {
  16609. "name": {
  16610. "type": "string"
  16611. }
  16612. },
  16613. "required": ["name"],
  16614. "additionalProperties": false
  16615. }
  16616. },
  16617. "required": ["id", "type", "properties"],
  16618. "additionalProperties": false
  16619. },
  16620. "EventWorkspaceFailed": {
  16621. "type": "object",
  16622. "properties": {
  16623. "id": {
  16624. "type": "string"
  16625. },
  16626. "type": {
  16627. "type": "string",
  16628. "enum": ["workspace.failed"]
  16629. },
  16630. "properties": {
  16631. "type": "object",
  16632. "properties": {
  16633. "message": {
  16634. "type": "string"
  16635. }
  16636. },
  16637. "required": ["message"],
  16638. "additionalProperties": false
  16639. }
  16640. },
  16641. "required": ["id", "type", "properties"],
  16642. "additionalProperties": false
  16643. },
  16644. "EventWorkspaceStatus": {
  16645. "type": "object",
  16646. "properties": {
  16647. "id": {
  16648. "type": "string"
  16649. },
  16650. "type": {
  16651. "type": "string",
  16652. "enum": ["workspace.status"]
  16653. },
  16654. "properties": {
  16655. "type": "object",
  16656. "properties": {
  16657. "workspaceID": {
  16658. "type": "string",
  16659. "pattern": "^wrk"
  16660. },
  16661. "status": {
  16662. "type": "string",
  16663. "enum": ["connected", "connecting", "disconnected", "error"]
  16664. }
  16665. },
  16666. "required": ["workspaceID", "status"],
  16667. "additionalProperties": false
  16668. }
  16669. },
  16670. "required": ["id", "type", "properties"],
  16671. "additionalProperties": false
  16672. },
  16673. "EventWorktreeReady": {
  16674. "type": "object",
  16675. "properties": {
  16676. "id": {
  16677. "type": "string"
  16678. },
  16679. "type": {
  16680. "type": "string",
  16681. "enum": ["worktree.ready"]
  16682. },
  16683. "properties": {
  16684. "type": "object",
  16685. "properties": {
  16686. "name": {
  16687. "type": "string"
  16688. },
  16689. "branch": {
  16690. "type": "string"
  16691. }
  16692. },
  16693. "required": ["name"],
  16694. "additionalProperties": false
  16695. }
  16696. },
  16697. "required": ["id", "type", "properties"],
  16698. "additionalProperties": false
  16699. },
  16700. "EventWorktreeFailed": {
  16701. "type": "object",
  16702. "properties": {
  16703. "id": {
  16704. "type": "string"
  16705. },
  16706. "type": {
  16707. "type": "string",
  16708. "enum": ["worktree.failed"]
  16709. },
  16710. "properties": {
  16711. "type": "object",
  16712. "properties": {
  16713. "message": {
  16714. "type": "string"
  16715. }
  16716. },
  16717. "required": ["message"],
  16718. "additionalProperties": false
  16719. }
  16720. },
  16721. "required": ["id", "type", "properties"],
  16722. "additionalProperties": false
  16723. },
  16724. "EventPtyCreated": {
  16725. "type": "object",
  16726. "properties": {
  16727. "id": {
  16728. "type": "string"
  16729. },
  16730. "type": {
  16731. "type": "string",
  16732. "enum": ["pty.created"]
  16733. },
  16734. "properties": {
  16735. "type": "object",
  16736. "properties": {
  16737. "info": {
  16738. "$ref": "#/components/schemas/Pty"
  16739. }
  16740. },
  16741. "required": ["info"],
  16742. "additionalProperties": false
  16743. }
  16744. },
  16745. "required": ["id", "type", "properties"],
  16746. "additionalProperties": false
  16747. },
  16748. "EventPtyUpdated": {
  16749. "type": "object",
  16750. "properties": {
  16751. "id": {
  16752. "type": "string"
  16753. },
  16754. "type": {
  16755. "type": "string",
  16756. "enum": ["pty.updated"]
  16757. },
  16758. "properties": {
  16759. "type": "object",
  16760. "properties": {
  16761. "info": {
  16762. "$ref": "#/components/schemas/Pty"
  16763. }
  16764. },
  16765. "required": ["info"],
  16766. "additionalProperties": false
  16767. }
  16768. },
  16769. "required": ["id", "type", "properties"],
  16770. "additionalProperties": false
  16771. },
  16772. "EventPtyExited": {
  16773. "type": "object",
  16774. "properties": {
  16775. "id": {
  16776. "type": "string"
  16777. },
  16778. "type": {
  16779. "type": "string",
  16780. "enum": ["pty.exited"]
  16781. },
  16782. "properties": {
  16783. "type": "object",
  16784. "properties": {
  16785. "id": {
  16786. "type": "string",
  16787. "pattern": "^pty"
  16788. },
  16789. "exitCode": {
  16790. "type": "integer",
  16791. "minimum": 0
  16792. }
  16793. },
  16794. "required": ["id", "exitCode"],
  16795. "additionalProperties": false
  16796. }
  16797. },
  16798. "required": ["id", "type", "properties"],
  16799. "additionalProperties": false
  16800. },
  16801. "EventPtyDeleted": {
  16802. "type": "object",
  16803. "properties": {
  16804. "id": {
  16805. "type": "string"
  16806. },
  16807. "type": {
  16808. "type": "string",
  16809. "enum": ["pty.deleted"]
  16810. },
  16811. "properties": {
  16812. "type": "object",
  16813. "properties": {
  16814. "id": {
  16815. "type": "string",
  16816. "pattern": "^pty"
  16817. }
  16818. },
  16819. "required": ["id"],
  16820. "additionalProperties": false
  16821. }
  16822. },
  16823. "required": ["id", "type", "properties"],
  16824. "additionalProperties": false
  16825. },
  16826. "EventMessageUpdated": {
  16827. "type": "object",
  16828. "properties": {
  16829. "id": {
  16830. "type": "string"
  16831. },
  16832. "type": {
  16833. "type": "string",
  16834. "enum": ["message.updated"]
  16835. },
  16836. "properties": {
  16837. "type": "object",
  16838. "properties": {
  16839. "sessionID": {
  16840. "type": "string",
  16841. "pattern": "^ses"
  16842. },
  16843. "info": {
  16844. "$ref": "#/components/schemas/Message"
  16845. }
  16846. },
  16847. "required": ["sessionID", "info"],
  16848. "additionalProperties": false
  16849. }
  16850. },
  16851. "required": ["id", "type", "properties"],
  16852. "additionalProperties": false
  16853. },
  16854. "EventMessageRemoved": {
  16855. "type": "object",
  16856. "properties": {
  16857. "id": {
  16858. "type": "string"
  16859. },
  16860. "type": {
  16861. "type": "string",
  16862. "enum": ["message.removed"]
  16863. },
  16864. "properties": {
  16865. "type": "object",
  16866. "properties": {
  16867. "sessionID": {
  16868. "type": "string",
  16869. "pattern": "^ses"
  16870. },
  16871. "messageID": {
  16872. "type": "string",
  16873. "pattern": "^msg"
  16874. }
  16875. },
  16876. "required": ["sessionID", "messageID"],
  16877. "additionalProperties": false
  16878. }
  16879. },
  16880. "required": ["id", "type", "properties"],
  16881. "additionalProperties": false
  16882. },
  16883. "EventMessagePartUpdated": {
  16884. "type": "object",
  16885. "properties": {
  16886. "id": {
  16887. "type": "string"
  16888. },
  16889. "type": {
  16890. "type": "string",
  16891. "enum": ["message.part.updated"]
  16892. },
  16893. "properties": {
  16894. "type": "object",
  16895. "properties": {
  16896. "sessionID": {
  16897. "type": "string",
  16898. "pattern": "^ses"
  16899. },
  16900. "part": {
  16901. "$ref": "#/components/schemas/Part"
  16902. },
  16903. "time": {
  16904. "type": "integer",
  16905. "minimum": 0
  16906. }
  16907. },
  16908. "required": ["sessionID", "part", "time"],
  16909. "additionalProperties": false
  16910. }
  16911. },
  16912. "required": ["id", "type", "properties"],
  16913. "additionalProperties": false
  16914. },
  16915. "EventMessagePartRemoved": {
  16916. "type": "object",
  16917. "properties": {
  16918. "id": {
  16919. "type": "string"
  16920. },
  16921. "type": {
  16922. "type": "string",
  16923. "enum": ["message.part.removed"]
  16924. },
  16925. "properties": {
  16926. "type": "object",
  16927. "properties": {
  16928. "sessionID": {
  16929. "type": "string",
  16930. "pattern": "^ses"
  16931. },
  16932. "messageID": {
  16933. "type": "string",
  16934. "pattern": "^msg"
  16935. },
  16936. "partID": {
  16937. "type": "string",
  16938. "pattern": "^prt"
  16939. }
  16940. },
  16941. "required": ["sessionID", "messageID", "partID"],
  16942. "additionalProperties": false
  16943. }
  16944. },
  16945. "required": ["id", "type", "properties"],
  16946. "additionalProperties": false
  16947. },
  16948. "EventSessionCreated": {
  16949. "type": "object",
  16950. "properties": {
  16951. "id": {
  16952. "type": "string"
  16953. },
  16954. "type": {
  16955. "type": "string",
  16956. "enum": ["session.created"]
  16957. },
  16958. "properties": {
  16959. "type": "object",
  16960. "properties": {
  16961. "sessionID": {
  16962. "type": "string",
  16963. "pattern": "^ses"
  16964. },
  16965. "info": {
  16966. "$ref": "#/components/schemas/Session"
  16967. }
  16968. },
  16969. "required": ["sessionID", "info"],
  16970. "additionalProperties": false
  16971. }
  16972. },
  16973. "required": ["id", "type", "properties"],
  16974. "additionalProperties": false
  16975. },
  16976. "EventSessionUpdated": {
  16977. "type": "object",
  16978. "properties": {
  16979. "id": {
  16980. "type": "string"
  16981. },
  16982. "type": {
  16983. "type": "string",
  16984. "enum": ["session.updated"]
  16985. },
  16986. "properties": {
  16987. "type": "object",
  16988. "properties": {
  16989. "sessionID": {
  16990. "type": "string",
  16991. "pattern": "^ses"
  16992. },
  16993. "info": {
  16994. "$ref": "#/components/schemas/Session"
  16995. }
  16996. },
  16997. "required": ["sessionID", "info"],
  16998. "additionalProperties": false
  16999. }
  17000. },
  17001. "required": ["id", "type", "properties"],
  17002. "additionalProperties": false
  17003. },
  17004. "EventSessionDeleted": {
  17005. "type": "object",
  17006. "properties": {
  17007. "id": {
  17008. "type": "string"
  17009. },
  17010. "type": {
  17011. "type": "string",
  17012. "enum": ["session.deleted"]
  17013. },
  17014. "properties": {
  17015. "type": "object",
  17016. "properties": {
  17017. "sessionID": {
  17018. "type": "string",
  17019. "pattern": "^ses"
  17020. },
  17021. "info": {
  17022. "$ref": "#/components/schemas/Session"
  17023. }
  17024. },
  17025. "required": ["sessionID", "info"],
  17026. "additionalProperties": false
  17027. }
  17028. },
  17029. "required": ["id", "type", "properties"],
  17030. "additionalProperties": false
  17031. },
  17032. "EventSessionNextAgentSwitched": {
  17033. "type": "object",
  17034. "properties": {
  17035. "id": {
  17036. "type": "string"
  17037. },
  17038. "type": {
  17039. "type": "string",
  17040. "enum": ["session.next.agent.switched"]
  17041. },
  17042. "properties": {
  17043. "type": "object",
  17044. "properties": {
  17045. "timestamp": {
  17046. "type": "number"
  17047. },
  17048. "sessionID": {
  17049. "type": "string",
  17050. "pattern": "^ses"
  17051. },
  17052. "agent": {
  17053. "type": "string"
  17054. }
  17055. },
  17056. "required": ["timestamp", "sessionID", "agent"],
  17057. "additionalProperties": false
  17058. }
  17059. },
  17060. "required": ["id", "type", "properties"],
  17061. "additionalProperties": false
  17062. },
  17063. "EventSessionNextModelSwitched": {
  17064. "type": "object",
  17065. "properties": {
  17066. "id": {
  17067. "type": "string"
  17068. },
  17069. "type": {
  17070. "type": "string",
  17071. "enum": ["session.next.model.switched"]
  17072. },
  17073. "properties": {
  17074. "type": "object",
  17075. "properties": {
  17076. "timestamp": {
  17077. "type": "number"
  17078. },
  17079. "sessionID": {
  17080. "type": "string",
  17081. "pattern": "^ses"
  17082. },
  17083. "model": {
  17084. "type": "object",
  17085. "properties": {
  17086. "id": {
  17087. "type": "string"
  17088. },
  17089. "providerID": {
  17090. "type": "string"
  17091. },
  17092. "variant": {
  17093. "type": "string"
  17094. }
  17095. },
  17096. "required": ["id", "providerID", "variant"],
  17097. "additionalProperties": false
  17098. }
  17099. },
  17100. "required": ["timestamp", "sessionID", "model"],
  17101. "additionalProperties": false
  17102. }
  17103. },
  17104. "required": ["id", "type", "properties"],
  17105. "additionalProperties": false
  17106. },
  17107. "PromptSource": {
  17108. "type": "object",
  17109. "properties": {
  17110. "start": {
  17111. "type": "number"
  17112. },
  17113. "end": {
  17114. "type": "number"
  17115. },
  17116. "text": {
  17117. "type": "string"
  17118. }
  17119. },
  17120. "required": ["start", "end", "text"],
  17121. "additionalProperties": false
  17122. },
  17123. "PromptFileAttachment": {
  17124. "type": "object",
  17125. "properties": {
  17126. "uri": {
  17127. "type": "string"
  17128. },
  17129. "mime": {
  17130. "type": "string"
  17131. },
  17132. "name": {
  17133. "type": "string"
  17134. },
  17135. "description": {
  17136. "type": "string"
  17137. },
  17138. "source": {
  17139. "$ref": "#/components/schemas/PromptSource"
  17140. }
  17141. },
  17142. "required": ["uri", "mime"],
  17143. "additionalProperties": false
  17144. },
  17145. "PromptAgentAttachment": {
  17146. "type": "object",
  17147. "properties": {
  17148. "name": {
  17149. "type": "string"
  17150. },
  17151. "source": {
  17152. "$ref": "#/components/schemas/PromptSource"
  17153. }
  17154. },
  17155. "required": ["name"],
  17156. "additionalProperties": false
  17157. },
  17158. "PromptReferenceAttachment": {
  17159. "type": "object",
  17160. "properties": {
  17161. "name": {
  17162. "type": "string"
  17163. },
  17164. "kind": {
  17165. "type": "string",
  17166. "enum": ["local", "git", "invalid"]
  17167. },
  17168. "uri": {
  17169. "type": "string"
  17170. },
  17171. "repository": {
  17172. "type": "string"
  17173. },
  17174. "branch": {
  17175. "type": "string"
  17176. },
  17177. "target": {
  17178. "type": "string"
  17179. },
  17180. "targetUri": {
  17181. "type": "string"
  17182. },
  17183. "problem": {
  17184. "type": "string"
  17185. },
  17186. "source": {
  17187. "$ref": "#/components/schemas/PromptSource"
  17188. }
  17189. },
  17190. "required": ["name", "kind"],
  17191. "additionalProperties": false
  17192. },
  17193. "EventSessionNextPrompted": {
  17194. "type": "object",
  17195. "properties": {
  17196. "id": {
  17197. "type": "string"
  17198. },
  17199. "type": {
  17200. "type": "string",
  17201. "enum": ["session.next.prompted"]
  17202. },
  17203. "properties": {
  17204. "type": "object",
  17205. "properties": {
  17206. "timestamp": {
  17207. "type": "number"
  17208. },
  17209. "sessionID": {
  17210. "type": "string",
  17211. "pattern": "^ses"
  17212. },
  17213. "prompt": {
  17214. "$ref": "#/components/schemas/Prompt"
  17215. }
  17216. },
  17217. "required": ["timestamp", "sessionID", "prompt"],
  17218. "additionalProperties": false
  17219. }
  17220. },
  17221. "required": ["id", "type", "properties"],
  17222. "additionalProperties": false
  17223. },
  17224. "EventSessionNextSynthetic": {
  17225. "type": "object",
  17226. "properties": {
  17227. "id": {
  17228. "type": "string"
  17229. },
  17230. "type": {
  17231. "type": "string",
  17232. "enum": ["session.next.synthetic"]
  17233. },
  17234. "properties": {
  17235. "type": "object",
  17236. "properties": {
  17237. "timestamp": {
  17238. "type": "number"
  17239. },
  17240. "sessionID": {
  17241. "type": "string",
  17242. "pattern": "^ses"
  17243. },
  17244. "text": {
  17245. "type": "string"
  17246. }
  17247. },
  17248. "required": ["timestamp", "sessionID", "text"],
  17249. "additionalProperties": false
  17250. }
  17251. },
  17252. "required": ["id", "type", "properties"],
  17253. "additionalProperties": false
  17254. },
  17255. "EventSessionNextShellStarted": {
  17256. "type": "object",
  17257. "properties": {
  17258. "id": {
  17259. "type": "string"
  17260. },
  17261. "type": {
  17262. "type": "string",
  17263. "enum": ["session.next.shell.started"]
  17264. },
  17265. "properties": {
  17266. "type": "object",
  17267. "properties": {
  17268. "timestamp": {
  17269. "type": "number"
  17270. },
  17271. "sessionID": {
  17272. "type": "string",
  17273. "pattern": "^ses"
  17274. },
  17275. "callID": {
  17276. "type": "string"
  17277. },
  17278. "command": {
  17279. "type": "string"
  17280. }
  17281. },
  17282. "required": ["timestamp", "sessionID", "callID", "command"],
  17283. "additionalProperties": false
  17284. }
  17285. },
  17286. "required": ["id", "type", "properties"],
  17287. "additionalProperties": false
  17288. },
  17289. "EventSessionNextShellEnded": {
  17290. "type": "object",
  17291. "properties": {
  17292. "id": {
  17293. "type": "string"
  17294. },
  17295. "type": {
  17296. "type": "string",
  17297. "enum": ["session.next.shell.ended"]
  17298. },
  17299. "properties": {
  17300. "type": "object",
  17301. "properties": {
  17302. "timestamp": {
  17303. "type": "number"
  17304. },
  17305. "sessionID": {
  17306. "type": "string",
  17307. "pattern": "^ses"
  17308. },
  17309. "callID": {
  17310. "type": "string"
  17311. },
  17312. "output": {
  17313. "type": "string"
  17314. }
  17315. },
  17316. "required": ["timestamp", "sessionID", "callID", "output"],
  17317. "additionalProperties": false
  17318. }
  17319. },
  17320. "required": ["id", "type", "properties"],
  17321. "additionalProperties": false
  17322. },
  17323. "EventSessionNextStepStarted": {
  17324. "type": "object",
  17325. "properties": {
  17326. "id": {
  17327. "type": "string"
  17328. },
  17329. "type": {
  17330. "type": "string",
  17331. "enum": ["session.next.step.started"]
  17332. },
  17333. "properties": {
  17334. "type": "object",
  17335. "properties": {
  17336. "timestamp": {
  17337. "type": "number"
  17338. },
  17339. "sessionID": {
  17340. "type": "string",
  17341. "pattern": "^ses"
  17342. },
  17343. "agent": {
  17344. "type": "string"
  17345. },
  17346. "model": {
  17347. "type": "object",
  17348. "properties": {
  17349. "id": {
  17350. "type": "string"
  17351. },
  17352. "providerID": {
  17353. "type": "string"
  17354. },
  17355. "variant": {
  17356. "type": "string"
  17357. }
  17358. },
  17359. "required": ["id", "providerID", "variant"],
  17360. "additionalProperties": false
  17361. },
  17362. "snapshot": {
  17363. "type": "string"
  17364. }
  17365. },
  17366. "required": ["timestamp", "sessionID", "agent", "model"],
  17367. "additionalProperties": false
  17368. }
  17369. },
  17370. "required": ["id", "type", "properties"],
  17371. "additionalProperties": false
  17372. },
  17373. "EventSessionNextStepEnded": {
  17374. "type": "object",
  17375. "properties": {
  17376. "id": {
  17377. "type": "string"
  17378. },
  17379. "type": {
  17380. "type": "string",
  17381. "enum": ["session.next.step.ended"]
  17382. },
  17383. "properties": {
  17384. "type": "object",
  17385. "properties": {
  17386. "timestamp": {
  17387. "type": "number"
  17388. },
  17389. "sessionID": {
  17390. "type": "string",
  17391. "pattern": "^ses"
  17392. },
  17393. "finish": {
  17394. "type": "string"
  17395. },
  17396. "cost": {
  17397. "type": "number"
  17398. },
  17399. "tokens": {
  17400. "type": "object",
  17401. "properties": {
  17402. "input": {
  17403. "type": "number"
  17404. },
  17405. "output": {
  17406. "type": "number"
  17407. },
  17408. "reasoning": {
  17409. "type": "number"
  17410. },
  17411. "cache": {
  17412. "type": "object",
  17413. "properties": {
  17414. "read": {
  17415. "type": "number"
  17416. },
  17417. "write": {
  17418. "type": "number"
  17419. }
  17420. },
  17421. "required": ["read", "write"],
  17422. "additionalProperties": false
  17423. }
  17424. },
  17425. "required": ["input", "output", "reasoning", "cache"],
  17426. "additionalProperties": false
  17427. },
  17428. "snapshot": {
  17429. "type": "string"
  17430. }
  17431. },
  17432. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17433. "additionalProperties": false
  17434. }
  17435. },
  17436. "required": ["id", "type", "properties"],
  17437. "additionalProperties": false
  17438. },
  17439. "SessionErrorUnknown": {
  17440. "type": "object",
  17441. "properties": {
  17442. "type": {
  17443. "type": "string",
  17444. "enum": ["unknown"]
  17445. },
  17446. "message": {
  17447. "type": "string"
  17448. }
  17449. },
  17450. "required": ["type", "message"],
  17451. "additionalProperties": false
  17452. },
  17453. "EventSessionNextStepFailed": {
  17454. "type": "object",
  17455. "properties": {
  17456. "id": {
  17457. "type": "string"
  17458. },
  17459. "type": {
  17460. "type": "string",
  17461. "enum": ["session.next.step.failed"]
  17462. },
  17463. "properties": {
  17464. "type": "object",
  17465. "properties": {
  17466. "timestamp": {
  17467. "type": "number"
  17468. },
  17469. "sessionID": {
  17470. "type": "string",
  17471. "pattern": "^ses"
  17472. },
  17473. "error": {
  17474. "$ref": "#/components/schemas/SessionErrorUnknown"
  17475. }
  17476. },
  17477. "required": ["timestamp", "sessionID", "error"],
  17478. "additionalProperties": false
  17479. }
  17480. },
  17481. "required": ["id", "type", "properties"],
  17482. "additionalProperties": false
  17483. },
  17484. "EventSessionNextTextStarted": {
  17485. "type": "object",
  17486. "properties": {
  17487. "id": {
  17488. "type": "string"
  17489. },
  17490. "type": {
  17491. "type": "string",
  17492. "enum": ["session.next.text.started"]
  17493. },
  17494. "properties": {
  17495. "type": "object",
  17496. "properties": {
  17497. "timestamp": {
  17498. "type": "number"
  17499. },
  17500. "sessionID": {
  17501. "type": "string",
  17502. "pattern": "^ses"
  17503. }
  17504. },
  17505. "required": ["timestamp", "sessionID"],
  17506. "additionalProperties": false
  17507. }
  17508. },
  17509. "required": ["id", "type", "properties"],
  17510. "additionalProperties": false
  17511. },
  17512. "EventSessionNextTextDelta": {
  17513. "type": "object",
  17514. "properties": {
  17515. "id": {
  17516. "type": "string"
  17517. },
  17518. "type": {
  17519. "type": "string",
  17520. "enum": ["session.next.text.delta"]
  17521. },
  17522. "properties": {
  17523. "type": "object",
  17524. "properties": {
  17525. "timestamp": {
  17526. "type": "number"
  17527. },
  17528. "sessionID": {
  17529. "type": "string",
  17530. "pattern": "^ses"
  17531. },
  17532. "delta": {
  17533. "type": "string"
  17534. }
  17535. },
  17536. "required": ["timestamp", "sessionID", "delta"],
  17537. "additionalProperties": false
  17538. }
  17539. },
  17540. "required": ["id", "type", "properties"],
  17541. "additionalProperties": false
  17542. },
  17543. "EventSessionNextTextEnded": {
  17544. "type": "object",
  17545. "properties": {
  17546. "id": {
  17547. "type": "string"
  17548. },
  17549. "type": {
  17550. "type": "string",
  17551. "enum": ["session.next.text.ended"]
  17552. },
  17553. "properties": {
  17554. "type": "object",
  17555. "properties": {
  17556. "timestamp": {
  17557. "type": "number"
  17558. },
  17559. "sessionID": {
  17560. "type": "string",
  17561. "pattern": "^ses"
  17562. },
  17563. "text": {
  17564. "type": "string"
  17565. }
  17566. },
  17567. "required": ["timestamp", "sessionID", "text"],
  17568. "additionalProperties": false
  17569. }
  17570. },
  17571. "required": ["id", "type", "properties"],
  17572. "additionalProperties": false
  17573. },
  17574. "EventSessionNextReasoningStarted": {
  17575. "type": "object",
  17576. "properties": {
  17577. "id": {
  17578. "type": "string"
  17579. },
  17580. "type": {
  17581. "type": "string",
  17582. "enum": ["session.next.reasoning.started"]
  17583. },
  17584. "properties": {
  17585. "type": "object",
  17586. "properties": {
  17587. "timestamp": {
  17588. "type": "number"
  17589. },
  17590. "sessionID": {
  17591. "type": "string",
  17592. "pattern": "^ses"
  17593. },
  17594. "reasoningID": {
  17595. "type": "string"
  17596. }
  17597. },
  17598. "required": ["timestamp", "sessionID", "reasoningID"],
  17599. "additionalProperties": false
  17600. }
  17601. },
  17602. "required": ["id", "type", "properties"],
  17603. "additionalProperties": false
  17604. },
  17605. "EventSessionNextReasoningDelta": {
  17606. "type": "object",
  17607. "properties": {
  17608. "id": {
  17609. "type": "string"
  17610. },
  17611. "type": {
  17612. "type": "string",
  17613. "enum": ["session.next.reasoning.delta"]
  17614. },
  17615. "properties": {
  17616. "type": "object",
  17617. "properties": {
  17618. "timestamp": {
  17619. "type": "number"
  17620. },
  17621. "sessionID": {
  17622. "type": "string",
  17623. "pattern": "^ses"
  17624. },
  17625. "reasoningID": {
  17626. "type": "string"
  17627. },
  17628. "delta": {
  17629. "type": "string"
  17630. }
  17631. },
  17632. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17633. "additionalProperties": false
  17634. }
  17635. },
  17636. "required": ["id", "type", "properties"],
  17637. "additionalProperties": false
  17638. },
  17639. "EventSessionNextReasoningEnded": {
  17640. "type": "object",
  17641. "properties": {
  17642. "id": {
  17643. "type": "string"
  17644. },
  17645. "type": {
  17646. "type": "string",
  17647. "enum": ["session.next.reasoning.ended"]
  17648. },
  17649. "properties": {
  17650. "type": "object",
  17651. "properties": {
  17652. "timestamp": {
  17653. "type": "number"
  17654. },
  17655. "sessionID": {
  17656. "type": "string",
  17657. "pattern": "^ses"
  17658. },
  17659. "reasoningID": {
  17660. "type": "string"
  17661. },
  17662. "text": {
  17663. "type": "string"
  17664. }
  17665. },
  17666. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17667. "additionalProperties": false
  17668. }
  17669. },
  17670. "required": ["id", "type", "properties"],
  17671. "additionalProperties": false
  17672. },
  17673. "EventSessionNextToolInputStarted": {
  17674. "type": "object",
  17675. "properties": {
  17676. "id": {
  17677. "type": "string"
  17678. },
  17679. "type": {
  17680. "type": "string",
  17681. "enum": ["session.next.tool.input.started"]
  17682. },
  17683. "properties": {
  17684. "type": "object",
  17685. "properties": {
  17686. "timestamp": {
  17687. "type": "number"
  17688. },
  17689. "sessionID": {
  17690. "type": "string",
  17691. "pattern": "^ses"
  17692. },
  17693. "callID": {
  17694. "type": "string"
  17695. },
  17696. "name": {
  17697. "type": "string"
  17698. }
  17699. },
  17700. "required": ["timestamp", "sessionID", "callID", "name"],
  17701. "additionalProperties": false
  17702. }
  17703. },
  17704. "required": ["id", "type", "properties"],
  17705. "additionalProperties": false
  17706. },
  17707. "EventSessionNextToolInputDelta": {
  17708. "type": "object",
  17709. "properties": {
  17710. "id": {
  17711. "type": "string"
  17712. },
  17713. "type": {
  17714. "type": "string",
  17715. "enum": ["session.next.tool.input.delta"]
  17716. },
  17717. "properties": {
  17718. "type": "object",
  17719. "properties": {
  17720. "timestamp": {
  17721. "type": "number"
  17722. },
  17723. "sessionID": {
  17724. "type": "string",
  17725. "pattern": "^ses"
  17726. },
  17727. "callID": {
  17728. "type": "string"
  17729. },
  17730. "delta": {
  17731. "type": "string"
  17732. }
  17733. },
  17734. "required": ["timestamp", "sessionID", "callID", "delta"],
  17735. "additionalProperties": false
  17736. }
  17737. },
  17738. "required": ["id", "type", "properties"],
  17739. "additionalProperties": false
  17740. },
  17741. "EventSessionNextToolInputEnded": {
  17742. "type": "object",
  17743. "properties": {
  17744. "id": {
  17745. "type": "string"
  17746. },
  17747. "type": {
  17748. "type": "string",
  17749. "enum": ["session.next.tool.input.ended"]
  17750. },
  17751. "properties": {
  17752. "type": "object",
  17753. "properties": {
  17754. "timestamp": {
  17755. "type": "number"
  17756. },
  17757. "sessionID": {
  17758. "type": "string",
  17759. "pattern": "^ses"
  17760. },
  17761. "callID": {
  17762. "type": "string"
  17763. },
  17764. "text": {
  17765. "type": "string"
  17766. }
  17767. },
  17768. "required": ["timestamp", "sessionID", "callID", "text"],
  17769. "additionalProperties": false
  17770. }
  17771. },
  17772. "required": ["id", "type", "properties"],
  17773. "additionalProperties": false
  17774. },
  17775. "EventSessionNextToolCalled": {
  17776. "type": "object",
  17777. "properties": {
  17778. "id": {
  17779. "type": "string"
  17780. },
  17781. "type": {
  17782. "type": "string",
  17783. "enum": ["session.next.tool.called"]
  17784. },
  17785. "properties": {
  17786. "type": "object",
  17787. "properties": {
  17788. "timestamp": {
  17789. "type": "number"
  17790. },
  17791. "sessionID": {
  17792. "type": "string",
  17793. "pattern": "^ses"
  17794. },
  17795. "callID": {
  17796. "type": "string"
  17797. },
  17798. "tool": {
  17799. "type": "string"
  17800. },
  17801. "input": {
  17802. "type": "object"
  17803. },
  17804. "provider": {
  17805. "type": "object",
  17806. "properties": {
  17807. "executed": {
  17808. "type": "boolean"
  17809. },
  17810. "metadata": {
  17811. "type": "object"
  17812. }
  17813. },
  17814. "required": ["executed"],
  17815. "additionalProperties": false
  17816. }
  17817. },
  17818. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17819. "additionalProperties": false
  17820. }
  17821. },
  17822. "required": ["id", "type", "properties"],
  17823. "additionalProperties": false
  17824. },
  17825. "ToolTextContent": {
  17826. "type": "object",
  17827. "properties": {
  17828. "type": {
  17829. "type": "string",
  17830. "enum": ["text"]
  17831. },
  17832. "text": {
  17833. "type": "string"
  17834. }
  17835. },
  17836. "required": ["type", "text"],
  17837. "additionalProperties": false
  17838. },
  17839. "ToolFileContent": {
  17840. "type": "object",
  17841. "properties": {
  17842. "type": {
  17843. "type": "string",
  17844. "enum": ["file"]
  17845. },
  17846. "uri": {
  17847. "type": "string"
  17848. },
  17849. "mime": {
  17850. "type": "string"
  17851. },
  17852. "name": {
  17853. "type": "string"
  17854. }
  17855. },
  17856. "required": ["type", "uri", "mime"],
  17857. "additionalProperties": false
  17858. },
  17859. "EventSessionNextToolProgress": {
  17860. "type": "object",
  17861. "properties": {
  17862. "id": {
  17863. "type": "string"
  17864. },
  17865. "type": {
  17866. "type": "string",
  17867. "enum": ["session.next.tool.progress"]
  17868. },
  17869. "properties": {
  17870. "type": "object",
  17871. "properties": {
  17872. "timestamp": {
  17873. "type": "number"
  17874. },
  17875. "sessionID": {
  17876. "type": "string",
  17877. "pattern": "^ses"
  17878. },
  17879. "callID": {
  17880. "type": "string"
  17881. },
  17882. "structured": {
  17883. "type": "object"
  17884. },
  17885. "content": {
  17886. "type": "array",
  17887. "items": {
  17888. "anyOf": [
  17889. {
  17890. "$ref": "#/components/schemas/ToolTextContent"
  17891. },
  17892. {
  17893. "$ref": "#/components/schemas/ToolFileContent"
  17894. }
  17895. ]
  17896. }
  17897. }
  17898. },
  17899. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17900. "additionalProperties": false
  17901. }
  17902. },
  17903. "required": ["id", "type", "properties"],
  17904. "additionalProperties": false
  17905. },
  17906. "EventSessionNextToolSuccess": {
  17907. "type": "object",
  17908. "properties": {
  17909. "id": {
  17910. "type": "string"
  17911. },
  17912. "type": {
  17913. "type": "string",
  17914. "enum": ["session.next.tool.success"]
  17915. },
  17916. "properties": {
  17917. "type": "object",
  17918. "properties": {
  17919. "timestamp": {
  17920. "type": "number"
  17921. },
  17922. "sessionID": {
  17923. "type": "string",
  17924. "pattern": "^ses"
  17925. },
  17926. "callID": {
  17927. "type": "string"
  17928. },
  17929. "structured": {
  17930. "type": "object"
  17931. },
  17932. "content": {
  17933. "type": "array",
  17934. "items": {
  17935. "anyOf": [
  17936. {
  17937. "$ref": "#/components/schemas/ToolTextContent"
  17938. },
  17939. {
  17940. "$ref": "#/components/schemas/ToolFileContent"
  17941. }
  17942. ]
  17943. }
  17944. },
  17945. "provider": {
  17946. "type": "object",
  17947. "properties": {
  17948. "executed": {
  17949. "type": "boolean"
  17950. },
  17951. "metadata": {
  17952. "type": "object"
  17953. }
  17954. },
  17955. "required": ["executed"],
  17956. "additionalProperties": false
  17957. }
  17958. },
  17959. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17960. "additionalProperties": false
  17961. }
  17962. },
  17963. "required": ["id", "type", "properties"],
  17964. "additionalProperties": false
  17965. },
  17966. "EventSessionNextToolFailed": {
  17967. "type": "object",
  17968. "properties": {
  17969. "id": {
  17970. "type": "string"
  17971. },
  17972. "type": {
  17973. "type": "string",
  17974. "enum": ["session.next.tool.failed"]
  17975. },
  17976. "properties": {
  17977. "type": "object",
  17978. "properties": {
  17979. "timestamp": {
  17980. "type": "number"
  17981. },
  17982. "sessionID": {
  17983. "type": "string",
  17984. "pattern": "^ses"
  17985. },
  17986. "callID": {
  17987. "type": "string"
  17988. },
  17989. "error": {
  17990. "$ref": "#/components/schemas/SessionErrorUnknown"
  17991. },
  17992. "provider": {
  17993. "type": "object",
  17994. "properties": {
  17995. "executed": {
  17996. "type": "boolean"
  17997. },
  17998. "metadata": {
  17999. "type": "object"
  18000. }
  18001. },
  18002. "required": ["executed"],
  18003. "additionalProperties": false
  18004. }
  18005. },
  18006. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  18007. "additionalProperties": false
  18008. }
  18009. },
  18010. "required": ["id", "type", "properties"],
  18011. "additionalProperties": false
  18012. },
  18013. "SessionNextRetry_error": {
  18014. "type": "object",
  18015. "properties": {
  18016. "message": {
  18017. "type": "string"
  18018. },
  18019. "statusCode": {
  18020. "type": "number"
  18021. },
  18022. "isRetryable": {
  18023. "type": "boolean"
  18024. },
  18025. "responseHeaders": {
  18026. "type": "object",
  18027. "additionalProperties": {
  18028. "type": "string"
  18029. }
  18030. },
  18031. "responseBody": {
  18032. "type": "string"
  18033. },
  18034. "metadata": {
  18035. "type": "object",
  18036. "additionalProperties": {
  18037. "type": "string"
  18038. }
  18039. }
  18040. },
  18041. "required": ["message", "isRetryable"],
  18042. "additionalProperties": false
  18043. },
  18044. "EventSessionNextRetried": {
  18045. "type": "object",
  18046. "properties": {
  18047. "id": {
  18048. "type": "string"
  18049. },
  18050. "type": {
  18051. "type": "string",
  18052. "enum": ["session.next.retried"]
  18053. },
  18054. "properties": {
  18055. "type": "object",
  18056. "properties": {
  18057. "timestamp": {
  18058. "type": "number"
  18059. },
  18060. "sessionID": {
  18061. "type": "string",
  18062. "pattern": "^ses"
  18063. },
  18064. "attempt": {
  18065. "type": "number"
  18066. },
  18067. "error": {
  18068. "$ref": "#/components/schemas/SessionNextRetry_error"
  18069. }
  18070. },
  18071. "required": ["timestamp", "sessionID", "attempt", "error"],
  18072. "additionalProperties": false
  18073. }
  18074. },
  18075. "required": ["id", "type", "properties"],
  18076. "additionalProperties": false
  18077. },
  18078. "EventSessionNextCompactionStarted": {
  18079. "type": "object",
  18080. "properties": {
  18081. "id": {
  18082. "type": "string"
  18083. },
  18084. "type": {
  18085. "type": "string",
  18086. "enum": ["session.next.compaction.started"]
  18087. },
  18088. "properties": {
  18089. "type": "object",
  18090. "properties": {
  18091. "timestamp": {
  18092. "type": "number"
  18093. },
  18094. "sessionID": {
  18095. "type": "string",
  18096. "pattern": "^ses"
  18097. },
  18098. "reason": {
  18099. "type": "string",
  18100. "enum": ["auto", "manual"]
  18101. }
  18102. },
  18103. "required": ["timestamp", "sessionID", "reason"],
  18104. "additionalProperties": false
  18105. }
  18106. },
  18107. "required": ["id", "type", "properties"],
  18108. "additionalProperties": false
  18109. },
  18110. "EventSessionNextCompactionDelta": {
  18111. "type": "object",
  18112. "properties": {
  18113. "id": {
  18114. "type": "string"
  18115. },
  18116. "type": {
  18117. "type": "string",
  18118. "enum": ["session.next.compaction.delta"]
  18119. },
  18120. "properties": {
  18121. "type": "object",
  18122. "properties": {
  18123. "timestamp": {
  18124. "type": "number"
  18125. },
  18126. "sessionID": {
  18127. "type": "string",
  18128. "pattern": "^ses"
  18129. },
  18130. "text": {
  18131. "type": "string"
  18132. }
  18133. },
  18134. "required": ["timestamp", "sessionID", "text"],
  18135. "additionalProperties": false
  18136. }
  18137. },
  18138. "required": ["id", "type", "properties"],
  18139. "additionalProperties": false
  18140. },
  18141. "EventSessionNextCompactionEnded": {
  18142. "type": "object",
  18143. "properties": {
  18144. "id": {
  18145. "type": "string"
  18146. },
  18147. "type": {
  18148. "type": "string",
  18149. "enum": ["session.next.compaction.ended"]
  18150. },
  18151. "properties": {
  18152. "type": "object",
  18153. "properties": {
  18154. "timestamp": {
  18155. "type": "number"
  18156. },
  18157. "sessionID": {
  18158. "type": "string",
  18159. "pattern": "^ses"
  18160. },
  18161. "text": {
  18162. "type": "string"
  18163. },
  18164. "include": {
  18165. "type": "string"
  18166. }
  18167. },
  18168. "required": ["timestamp", "sessionID", "text"],
  18169. "additionalProperties": false
  18170. }
  18171. },
  18172. "required": ["id", "type", "properties"],
  18173. "additionalProperties": false
  18174. },
  18175. "EventServerConnected": {
  18176. "type": "object",
  18177. "properties": {
  18178. "id": {
  18179. "type": "string"
  18180. },
  18181. "type": {
  18182. "type": "string",
  18183. "enum": ["server.connected"]
  18184. },
  18185. "properties": {
  18186. "type": "object",
  18187. "properties": {}
  18188. }
  18189. },
  18190. "required": ["id", "type", "properties"],
  18191. "additionalProperties": false
  18192. },
  18193. "EventGlobalDisposed": {
  18194. "type": "object",
  18195. "properties": {
  18196. "id": {
  18197. "type": "string"
  18198. },
  18199. "type": {
  18200. "type": "string",
  18201. "enum": ["global.disposed"]
  18202. },
  18203. "properties": {
  18204. "type": "object",
  18205. "properties": {}
  18206. }
  18207. },
  18208. "required": ["id", "type", "properties"],
  18209. "additionalProperties": false
  18210. },
  18211. "SessionInfo": {
  18212. "type": "object",
  18213. "properties": {
  18214. "id": {
  18215. "type": "string",
  18216. "pattern": "^ses"
  18217. },
  18218. "parentID": {
  18219. "type": "string",
  18220. "pattern": "^ses"
  18221. },
  18222. "projectID": {
  18223. "type": "string"
  18224. },
  18225. "workspaceID": {
  18226. "type": "string",
  18227. "pattern": "^wrk"
  18228. },
  18229. "path": {
  18230. "type": "string"
  18231. },
  18232. "agent": {
  18233. "type": "string"
  18234. },
  18235. "model": {
  18236. "type": "object",
  18237. "properties": {
  18238. "id": {
  18239. "type": "string"
  18240. },
  18241. "providerID": {
  18242. "type": "string"
  18243. },
  18244. "variant": {
  18245. "type": "string"
  18246. }
  18247. },
  18248. "required": ["id", "providerID", "variant"],
  18249. "additionalProperties": false
  18250. },
  18251. "cost": {
  18252. "type": "number"
  18253. },
  18254. "tokens": {
  18255. "type": "object",
  18256. "properties": {
  18257. "input": {
  18258. "type": "number"
  18259. },
  18260. "output": {
  18261. "type": "number"
  18262. },
  18263. "reasoning": {
  18264. "type": "number"
  18265. },
  18266. "cache": {
  18267. "type": "object",
  18268. "properties": {
  18269. "read": {
  18270. "type": "number"
  18271. },
  18272. "write": {
  18273. "type": "number"
  18274. }
  18275. },
  18276. "required": ["read", "write"],
  18277. "additionalProperties": false
  18278. }
  18279. },
  18280. "required": ["input", "output", "reasoning", "cache"],
  18281. "additionalProperties": false
  18282. },
  18283. "time": {
  18284. "type": "object",
  18285. "properties": {
  18286. "created": {
  18287. "type": "number"
  18288. },
  18289. "updated": {
  18290. "type": "number"
  18291. },
  18292. "archived": {
  18293. "type": "number"
  18294. }
  18295. },
  18296. "required": ["created", "updated"],
  18297. "additionalProperties": false
  18298. },
  18299. "title": {
  18300. "type": "string"
  18301. }
  18302. },
  18303. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  18304. "additionalProperties": false
  18305. },
  18306. "SessionDelivery": {
  18307. "type": "string",
  18308. "enum": ["immediate", "deferred"]
  18309. },
  18310. "SessionMessageAgentSwitched": {
  18311. "type": "object",
  18312. "properties": {
  18313. "id": {
  18314. "type": "string"
  18315. },
  18316. "metadata": {
  18317. "type": "object"
  18318. },
  18319. "time": {
  18320. "type": "object",
  18321. "properties": {
  18322. "created": {
  18323. "type": "number"
  18324. }
  18325. },
  18326. "required": ["created"],
  18327. "additionalProperties": false
  18328. },
  18329. "type": {
  18330. "type": "string",
  18331. "enum": ["agent-switched"]
  18332. },
  18333. "agent": {
  18334. "type": "string"
  18335. }
  18336. },
  18337. "required": ["id", "time", "type", "agent"],
  18338. "additionalProperties": false
  18339. },
  18340. "SessionMessageModelSwitched": {
  18341. "type": "object",
  18342. "properties": {
  18343. "id": {
  18344. "type": "string"
  18345. },
  18346. "metadata": {
  18347. "type": "object"
  18348. },
  18349. "time": {
  18350. "type": "object",
  18351. "properties": {
  18352. "created": {
  18353. "type": "number"
  18354. }
  18355. },
  18356. "required": ["created"],
  18357. "additionalProperties": false
  18358. },
  18359. "type": {
  18360. "type": "string",
  18361. "enum": ["model-switched"]
  18362. },
  18363. "model": {
  18364. "type": "object",
  18365. "properties": {
  18366. "id": {
  18367. "type": "string"
  18368. },
  18369. "providerID": {
  18370. "type": "string"
  18371. },
  18372. "variant": {
  18373. "type": "string"
  18374. }
  18375. },
  18376. "required": ["id", "providerID", "variant"],
  18377. "additionalProperties": false
  18378. }
  18379. },
  18380. "required": ["id", "time", "type", "model"],
  18381. "additionalProperties": false
  18382. },
  18383. "SessionMessageUser": {
  18384. "type": "object",
  18385. "properties": {
  18386. "id": {
  18387. "type": "string"
  18388. },
  18389. "metadata": {
  18390. "type": "object"
  18391. },
  18392. "time": {
  18393. "type": "object",
  18394. "properties": {
  18395. "created": {
  18396. "type": "number"
  18397. }
  18398. },
  18399. "required": ["created"],
  18400. "additionalProperties": false
  18401. },
  18402. "text": {
  18403. "type": "string"
  18404. },
  18405. "files": {
  18406. "type": "array",
  18407. "items": {
  18408. "$ref": "#/components/schemas/PromptFileAttachment"
  18409. }
  18410. },
  18411. "agents": {
  18412. "type": "array",
  18413. "items": {
  18414. "$ref": "#/components/schemas/PromptAgentAttachment"
  18415. }
  18416. },
  18417. "references": {
  18418. "type": "array",
  18419. "items": {
  18420. "$ref": "#/components/schemas/PromptReferenceAttachment"
  18421. }
  18422. },
  18423. "type": {
  18424. "type": "string",
  18425. "enum": ["user"]
  18426. }
  18427. },
  18428. "required": ["id", "time", "text", "type"],
  18429. "additionalProperties": false
  18430. },
  18431. "SessionMessageSynthetic": {
  18432. "type": "object",
  18433. "properties": {
  18434. "id": {
  18435. "type": "string"
  18436. },
  18437. "metadata": {
  18438. "type": "object"
  18439. },
  18440. "time": {
  18441. "type": "object",
  18442. "properties": {
  18443. "created": {
  18444. "type": "number"
  18445. }
  18446. },
  18447. "required": ["created"],
  18448. "additionalProperties": false
  18449. },
  18450. "sessionID": {
  18451. "type": "string",
  18452. "pattern": "^ses"
  18453. },
  18454. "text": {
  18455. "type": "string"
  18456. },
  18457. "type": {
  18458. "type": "string",
  18459. "enum": ["synthetic"]
  18460. }
  18461. },
  18462. "required": ["id", "time", "sessionID", "text", "type"],
  18463. "additionalProperties": false
  18464. },
  18465. "SessionMessageShell": {
  18466. "type": "object",
  18467. "properties": {
  18468. "id": {
  18469. "type": "string"
  18470. },
  18471. "metadata": {
  18472. "type": "object"
  18473. },
  18474. "time": {
  18475. "type": "object",
  18476. "properties": {
  18477. "created": {
  18478. "type": "number"
  18479. },
  18480. "completed": {
  18481. "type": "number"
  18482. }
  18483. },
  18484. "required": ["created"],
  18485. "additionalProperties": false
  18486. },
  18487. "type": {
  18488. "type": "string",
  18489. "enum": ["shell"]
  18490. },
  18491. "callID": {
  18492. "type": "string"
  18493. },
  18494. "command": {
  18495. "type": "string"
  18496. },
  18497. "output": {
  18498. "type": "string"
  18499. }
  18500. },
  18501. "required": ["id", "time", "type", "callID", "command", "output"],
  18502. "additionalProperties": false
  18503. },
  18504. "SessionMessageAssistantText": {
  18505. "type": "object",
  18506. "properties": {
  18507. "type": {
  18508. "type": "string",
  18509. "enum": ["text"]
  18510. },
  18511. "text": {
  18512. "type": "string"
  18513. }
  18514. },
  18515. "required": ["type", "text"],
  18516. "additionalProperties": false
  18517. },
  18518. "SessionMessageAssistantReasoning": {
  18519. "type": "object",
  18520. "properties": {
  18521. "type": {
  18522. "type": "string",
  18523. "enum": ["reasoning"]
  18524. },
  18525. "id": {
  18526. "type": "string"
  18527. },
  18528. "text": {
  18529. "type": "string"
  18530. }
  18531. },
  18532. "required": ["type", "id", "text"],
  18533. "additionalProperties": false
  18534. },
  18535. "SessionMessageToolStatePending": {
  18536. "type": "object",
  18537. "properties": {
  18538. "status": {
  18539. "type": "string",
  18540. "enum": ["pending"]
  18541. },
  18542. "input": {
  18543. "type": "string"
  18544. }
  18545. },
  18546. "required": ["status", "input"],
  18547. "additionalProperties": false
  18548. },
  18549. "SessionMessageToolStateRunning": {
  18550. "type": "object",
  18551. "properties": {
  18552. "status": {
  18553. "type": "string",
  18554. "enum": ["running"]
  18555. },
  18556. "input": {
  18557. "type": "object"
  18558. },
  18559. "structured": {
  18560. "type": "object"
  18561. },
  18562. "content": {
  18563. "type": "array",
  18564. "items": {
  18565. "anyOf": [
  18566. {
  18567. "$ref": "#/components/schemas/ToolTextContent"
  18568. },
  18569. {
  18570. "$ref": "#/components/schemas/ToolFileContent"
  18571. }
  18572. ]
  18573. }
  18574. }
  18575. },
  18576. "required": ["status", "input", "structured", "content"],
  18577. "additionalProperties": false
  18578. },
  18579. "SessionMessageToolStateCompleted": {
  18580. "type": "object",
  18581. "properties": {
  18582. "status": {
  18583. "type": "string",
  18584. "enum": ["completed"]
  18585. },
  18586. "input": {
  18587. "type": "object"
  18588. },
  18589. "attachments": {
  18590. "type": "array",
  18591. "items": {
  18592. "$ref": "#/components/schemas/PromptFileAttachment"
  18593. }
  18594. },
  18595. "content": {
  18596. "type": "array",
  18597. "items": {
  18598. "anyOf": [
  18599. {
  18600. "$ref": "#/components/schemas/ToolTextContent"
  18601. },
  18602. {
  18603. "$ref": "#/components/schemas/ToolFileContent"
  18604. }
  18605. ]
  18606. }
  18607. },
  18608. "structured": {
  18609. "type": "object"
  18610. }
  18611. },
  18612. "required": ["status", "input", "content", "structured"],
  18613. "additionalProperties": false
  18614. },
  18615. "SessionMessageToolStateError": {
  18616. "type": "object",
  18617. "properties": {
  18618. "status": {
  18619. "type": "string",
  18620. "enum": ["error"]
  18621. },
  18622. "input": {
  18623. "type": "object"
  18624. },
  18625. "content": {
  18626. "type": "array",
  18627. "items": {
  18628. "anyOf": [
  18629. {
  18630. "$ref": "#/components/schemas/ToolTextContent"
  18631. },
  18632. {
  18633. "$ref": "#/components/schemas/ToolFileContent"
  18634. }
  18635. ]
  18636. }
  18637. },
  18638. "structured": {
  18639. "type": "object"
  18640. },
  18641. "error": {
  18642. "$ref": "#/components/schemas/SessionErrorUnknown"
  18643. }
  18644. },
  18645. "required": ["status", "input", "content", "structured", "error"],
  18646. "additionalProperties": false
  18647. },
  18648. "SessionMessageAssistantTool": {
  18649. "type": "object",
  18650. "properties": {
  18651. "type": {
  18652. "type": "string",
  18653. "enum": ["tool"]
  18654. },
  18655. "id": {
  18656. "type": "string"
  18657. },
  18658. "name": {
  18659. "type": "string"
  18660. },
  18661. "provider": {
  18662. "type": "object",
  18663. "properties": {
  18664. "executed": {
  18665. "type": "boolean"
  18666. },
  18667. "metadata": {
  18668. "type": "object"
  18669. }
  18670. },
  18671. "required": ["executed"],
  18672. "additionalProperties": false
  18673. },
  18674. "state": {
  18675. "anyOf": [
  18676. {
  18677. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  18678. },
  18679. {
  18680. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  18681. },
  18682. {
  18683. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  18684. },
  18685. {
  18686. "$ref": "#/components/schemas/SessionMessageToolStateError"
  18687. }
  18688. ]
  18689. },
  18690. "time": {
  18691. "type": "object",
  18692. "properties": {
  18693. "created": {
  18694. "type": "number"
  18695. },
  18696. "ran": {
  18697. "type": "number"
  18698. },
  18699. "completed": {
  18700. "type": "number"
  18701. },
  18702. "pruned": {
  18703. "type": "number"
  18704. }
  18705. },
  18706. "required": ["created"],
  18707. "additionalProperties": false
  18708. }
  18709. },
  18710. "required": ["type", "id", "name", "state", "time"],
  18711. "additionalProperties": false
  18712. },
  18713. "SessionMessageAssistant": {
  18714. "type": "object",
  18715. "properties": {
  18716. "id": {
  18717. "type": "string"
  18718. },
  18719. "metadata": {
  18720. "type": "object"
  18721. },
  18722. "time": {
  18723. "type": "object",
  18724. "properties": {
  18725. "created": {
  18726. "type": "number"
  18727. },
  18728. "completed": {
  18729. "type": "number"
  18730. }
  18731. },
  18732. "required": ["created"],
  18733. "additionalProperties": false
  18734. },
  18735. "type": {
  18736. "type": "string",
  18737. "enum": ["assistant"]
  18738. },
  18739. "agent": {
  18740. "type": "string"
  18741. },
  18742. "model": {
  18743. "type": "object",
  18744. "properties": {
  18745. "id": {
  18746. "type": "string"
  18747. },
  18748. "providerID": {
  18749. "type": "string"
  18750. },
  18751. "variant": {
  18752. "type": "string"
  18753. }
  18754. },
  18755. "required": ["id", "providerID", "variant"],
  18756. "additionalProperties": false
  18757. },
  18758. "content": {
  18759. "type": "array",
  18760. "items": {
  18761. "anyOf": [
  18762. {
  18763. "$ref": "#/components/schemas/SessionMessageAssistantText"
  18764. },
  18765. {
  18766. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  18767. },
  18768. {
  18769. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  18770. }
  18771. ]
  18772. }
  18773. },
  18774. "snapshot": {
  18775. "type": "object",
  18776. "properties": {
  18777. "start": {
  18778. "type": "string"
  18779. },
  18780. "end": {
  18781. "type": "string"
  18782. }
  18783. },
  18784. "additionalProperties": false
  18785. },
  18786. "finish": {
  18787. "type": "string"
  18788. },
  18789. "cost": {
  18790. "type": "number"
  18791. },
  18792. "tokens": {
  18793. "type": "object",
  18794. "properties": {
  18795. "input": {
  18796. "type": "number"
  18797. },
  18798. "output": {
  18799. "type": "number"
  18800. },
  18801. "reasoning": {
  18802. "type": "number"
  18803. },
  18804. "cache": {
  18805. "type": "object",
  18806. "properties": {
  18807. "read": {
  18808. "type": "number"
  18809. },
  18810. "write": {
  18811. "type": "number"
  18812. }
  18813. },
  18814. "required": ["read", "write"],
  18815. "additionalProperties": false
  18816. }
  18817. },
  18818. "required": ["input", "output", "reasoning", "cache"],
  18819. "additionalProperties": false
  18820. },
  18821. "error": {
  18822. "$ref": "#/components/schemas/SessionErrorUnknown"
  18823. }
  18824. },
  18825. "required": ["id", "time", "type", "agent", "model", "content"],
  18826. "additionalProperties": false
  18827. },
  18828. "SessionMessageCompaction": {
  18829. "type": "object",
  18830. "properties": {
  18831. "type": {
  18832. "type": "string",
  18833. "enum": ["compaction"]
  18834. },
  18835. "reason": {
  18836. "type": "string",
  18837. "enum": ["auto", "manual"]
  18838. },
  18839. "summary": {
  18840. "type": "string"
  18841. },
  18842. "include": {
  18843. "type": "string"
  18844. },
  18845. "id": {
  18846. "type": "string"
  18847. },
  18848. "metadata": {
  18849. "type": "object"
  18850. },
  18851. "time": {
  18852. "type": "object",
  18853. "properties": {
  18854. "created": {
  18855. "type": "number"
  18856. }
  18857. },
  18858. "required": ["created"],
  18859. "additionalProperties": false
  18860. }
  18861. },
  18862. "required": ["type", "reason", "summary", "id", "time"],
  18863. "additionalProperties": false
  18864. },
  18865. "SessionMessage": {
  18866. "anyOf": [
  18867. {
  18868. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  18869. },
  18870. {
  18871. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  18872. },
  18873. {
  18874. "$ref": "#/components/schemas/SessionMessageUser"
  18875. },
  18876. {
  18877. "$ref": "#/components/schemas/SessionMessageSynthetic"
  18878. },
  18879. {
  18880. "$ref": "#/components/schemas/SessionMessageShell"
  18881. },
  18882. {
  18883. "$ref": "#/components/schemas/SessionMessageAssistant"
  18884. },
  18885. {
  18886. "$ref": "#/components/schemas/SessionMessageCompaction"
  18887. }
  18888. ]
  18889. },
  18890. "EventTuiToastShow1": {
  18891. "type": "object",
  18892. "properties": {
  18893. "id": {
  18894. "type": "string"
  18895. },
  18896. "type": {
  18897. "type": "string",
  18898. "enum": ["tui.toast.show"]
  18899. },
  18900. "properties": {
  18901. "type": "object",
  18902. "properties": {
  18903. "title": {
  18904. "type": "string"
  18905. },
  18906. "message": {
  18907. "type": "string"
  18908. },
  18909. "variant": {
  18910. "type": "string",
  18911. "enum": ["info", "success", "warning", "error"]
  18912. },
  18913. "duration": {
  18914. "type": "integer",
  18915. "exclusiveMinimum": 0
  18916. }
  18917. },
  18918. "required": ["message", "variant"],
  18919. "additionalProperties": false
  18920. }
  18921. },
  18922. "required": ["id", "type", "properties"],
  18923. "additionalProperties": false
  18924. },
  18925. "BadRequestError": {
  18926. "type": "object",
  18927. "required": ["name", "data"],
  18928. "properties": {
  18929. "name": {
  18930. "type": "string",
  18931. "enum": ["BadRequest"]
  18932. },
  18933. "data": {
  18934. "type": "object",
  18935. "required": ["message"],
  18936. "properties": {
  18937. "message": {
  18938. "type": "string"
  18939. },
  18940. "kind": {
  18941. "type": "string",
  18942. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  18943. }
  18944. }
  18945. }
  18946. }
  18947. }
  18948. }
  18949. },
  18950. "security": [],
  18951. "tags": [
  18952. {
  18953. "name": "control",
  18954. "description": "Control plane routes."
  18955. },
  18956. {
  18957. "name": "global",
  18958. "description": "Global server routes."
  18959. },
  18960. {
  18961. "name": "event",
  18962. "description": "Instance event stream route."
  18963. },
  18964. {
  18965. "name": "config",
  18966. "description": "Experimental HttpApi config routes."
  18967. },
  18968. {
  18969. "name": "experimental",
  18970. "description": "Experimental HttpApi read-only routes."
  18971. },
  18972. {
  18973. "name": "file",
  18974. "description": "Experimental HttpApi file routes."
  18975. },
  18976. {
  18977. "name": "instance",
  18978. "description": "Experimental HttpApi instance read routes."
  18979. },
  18980. {
  18981. "name": "mcp",
  18982. "description": "Experimental HttpApi MCP routes."
  18983. },
  18984. {
  18985. "name": "project",
  18986. "description": "Experimental HttpApi project routes."
  18987. },
  18988. {
  18989. "name": "pty",
  18990. "description": "Experimental HttpApi PTY routes."
  18991. },
  18992. {
  18993. "name": "question",
  18994. "description": "Question routes."
  18995. },
  18996. {
  18997. "name": "permission",
  18998. "description": "Experimental HttpApi permission routes."
  18999. },
  19000. {
  19001. "name": "provider",
  19002. "description": "Experimental HttpApi provider routes."
  19003. },
  19004. {
  19005. "name": "session",
  19006. "description": "Experimental HttpApi session routes."
  19007. },
  19008. {
  19009. "name": "sync",
  19010. "description": "Experimental HttpApi sync routes."
  19011. },
  19012. {
  19013. "name": "v2",
  19014. "description": "Experimental v2 routes."
  19015. },
  19016. {
  19017. "name": "v2 messages",
  19018. "description": "Experimental v2 message routes."
  19019. },
  19020. {
  19021. "name": "tui",
  19022. "description": "Experimental HttpApi TUI routes."
  19023. },
  19024. {
  19025. "name": "workspace",
  19026. "description": "Experimental HttpApi workspace routes."
  19027. },
  19028. {
  19029. "name": "pty",
  19030. "description": "PTY websocket route."
  19031. }
  19032. ]
  19033. }